:root {
  --bg: #f7f9fc;
  --bg-alt: #eef2f9;
  --panel: #ffffff;
  --border: #e4e9f2;
  --text: #0b1220;
  --muted: #64748b;
  --accent: #2563eb;
  --accent-dark: #1d4ed8;
  --accent-soft: #eaf1ff;
  --accent-text: #ffffff;
  --good: #16a34a;
  --good-soft: #e8f8ee;
  --radius: 20px;
  --radius-sm: 12px;
  --shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 8px 24px rgba(15, 23, 42, 0.06);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0a0e17;
    --bg-alt: #0f1420;
    --panel: #141a26;
    --border: #232a38;
    --text: #eef1f8;
    --muted: #94a0b8;
    --accent: #5b8def;
    --accent-dark: #7ba3f2;
    --accent-soft: rgba(91, 141, 239, 0.14);
    --accent-text: #06121f;
    --good: #35c48c;
    --good-soft: rgba(53, 196, 140, 0.14);
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.4);
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---- Nav ---- */

.nav {
  border-bottom: 1px solid var(--border);
  background: var(--panel);
}

.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 18px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.05rem;
  text-decoration: none;
  color: var(--text);
}

.brand-mark {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: var(--accent-soft);
  border: 1.5px solid var(--accent);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
}

.nav-links {
  display: flex;
  gap: 28px;
  font-size: 0.9rem;
  color: var(--muted);
}

.nav-links a { text-decoration: none; }
.nav-links a:hover { color: var(--text); }

@media (max-width: 640px) {
  .nav-links { display: none; }
}

/* ---- Buttons ---- */

.primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  padding: 13px 18px;
  border-radius: var(--radius-sm);
  border: none;
  background: var(--accent);
  color: var(--accent-text);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  margin-top: 16px;
  transition: background 0.15s ease;
}

button.primary:hover { background: var(--accent-dark); }

button.primary:disabled {
  opacity: 0.5;
  cursor: default;
}

.btn-nav {
  width: auto;
  margin-top: 0;
  padding: 10px 18px;
  font-size: 0.88rem;
  white-space: nowrap;
  text-decoration: none;
}

/* ---- Hero ---- */

.hero {
  padding: 64px 24px 40px;
}

.hero-inner {
  max-width: 1100px;
  margin: 0 auto;
}

.badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--accent-soft);
  color: var(--accent-dark);
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 20px;
}

.hero h1 {
  font-size: 2.6rem;
  line-height: 1.12;
  margin: 0 0 16px;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.hero h1 .accent-line { color: var(--accent); display: block; }

.hero p.lead {
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.6;
  max-width: 560px;
  margin: 0;
}

@media (max-width: 640px) {
  .hero h1 { font-size: 2rem; }
}

/* ---- Quote card (the functional app) ---- */

.quote-section { padding: 8px 24px 56px; }
.quote-wrap { max-width: 640px; margin: 0 auto; }

.panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px;
}

.panel-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
}

.panel-icon {
  width: 40px;
  height: 40px;
  min-width: 40px;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}

.panel-head h2 {
  margin: 0;
  font-size: 1.05rem;
}

.panel-head p {
  margin: 2px 0 0;
  font-size: 0.82rem;
  color: var(--muted);
}

label {
  display: block;
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 6px;
}

.search-box {
  position: relative;
}

input[type="text"], input[type="password"], input[type="file"], input[type="number"],
input[type="email"], input[type="tel"], select, textarea {
  width: 100%;
  padding: 13px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-size: 1rem;
}

textarea {
  font-family: inherit;
  line-height: 1.5;
  resize: vertical;
}

input[type="text"]:focus, input[type="email"]:focus, input[type="tel"]:focus,
select:focus, textarea:focus {
  outline: 2px solid var(--accent);
  outline-offset: -1px;
}

.suggestions {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  z-index: 5;
  box-shadow: var(--shadow);
}

.suggestions button {
  display: block;
  width: 100%;
  text-align: left;
  padding: 12px 14px;
  background: none;
  border: none;
  color: var(--text);
  font-size: 0.95rem;
  cursor: pointer;
}

.suggestions button:hover,
.suggestions button:focus {
  background: var(--accent-soft);
}

.selected-model {
  margin-top: 18px;
  padding: 14px;
  border-radius: var(--radius-sm);
  background: var(--accent-soft);
  border: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.selected-model strong { font-size: 1rem; }

.selected-model button {
  background: var(--panel);
  border: 1px solid var(--border);
  color: var(--muted);
  border-radius: 8px;
  padding: 6px 10px;
  cursor: pointer;
  font-size: 0.8rem;
}

.condition-select {
  margin-top: 20px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.condition-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
}

.condition-btn.active {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent-dark);
}

.condition-icon { font-size: 1.2rem; }

/* ---- Legal pages and links ---------------------------------------------------------------- */
.legal { max-width: 760px; margin: 0 auto; padding: 40px 20px 64px; color: var(--text); line-height: 1.65; }
.legal h1 { font-size: 2rem; margin: 4px 0 12px; }
.legal h2 { font-size: 1.15rem; margin: 36px 0 10px; scroll-margin-top: 80px; }
.legal p, .legal li { font-size: .98rem; }
.legal ul { padding-left: 1.25rem; }
.legal li { margin: 4px 0; }
.legal a { color: var(--accent-dark, #1e40af); }
.legal-kicker { font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted, #64748b); margin: 0; }
.legal-lead { font-size: 1.05rem; color: var(--muted, #475569); }
.legal-table-wrap { overflow-x: auto; margin: 12px 0; }
.legal-table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.legal-table th, .legal-table td { text-align: left; vertical-align: top; padding: 9px 10px; border-bottom: 1px solid var(--border); }
.legal-table th { background: var(--bg); font-weight: 600; }
.legal code { font-size: .85em; background: var(--bg); padding: 1px 5px; border-radius: 4px; }
.legal-foot { margin-top: 40px; }
/* Facts only ClearFrank can supply. Loud on purpose, so none survive to launch. */
.todo { background: #fef08a; color: #713f12; padding: 0 4px; border-radius: 3px; font-weight: 600; }
.legal-footer { text-align: center; padding: 24px 16px 40px; font-size: .85rem; color: var(--muted, #64748b); border-top: 1px solid var(--border); }
.legal-footer a, .footer-legal a { color: inherit; }
.footer-legal { text-align: center; font-size: .8rem; color: var(--muted, #64748b); padding: 18px 16px 4px; }
.declare-check { display: flex; gap: 10px; align-items: flex-start; margin: 16px 0 6px; padding: 12px 14px;
  border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--bg); font-size: .9rem; line-height: 1.45; cursor: pointer; }
.declare-check input { margin-top: 3px; flex: 0 0 auto; }
.legal-note { font-size: .82rem; color: var(--muted, #64748b); margin: 10px 0; line-height: 1.5; }
.legal-note a { color: var(--accent-dark, #1e40af); }

.condition-text { display: flex; flex-direction: column; align-items: flex-start; text-align: left; line-height: 1.25; }
.condition-text small { font-size: .75rem; font-weight: 400; color: var(--muted, #64748b); margin-top: 2px; }
.condition-btn.active .condition-text small { color: inherit; opacity: .8; }

/* Spans both columns of the condition grid, directly under the two buttons. */
.condition-defs { grid-column: 1 / -1; font-size: .85rem; color: var(--text); background: var(--bg);
  border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 10px 14px; }
.condition-defs summary { cursor: pointer; font-weight: 600; color: var(--accent-dark, #1e40af); }
.condition-defs p { margin: 8px 0 4px; }
.condition-defs ul { margin: 4px 0 8px; padding-left: 1.2rem; }
.condition-defs li { margin: 2px 0; }
@media (max-width: 480px) { .condition-btn { justify-content: flex-start; padding: 12px; } }

.deals {
  margin-top: 20px;
  display: grid;
  gap: 12px;
}

.deal-card {
  padding: 18px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg);
  cursor: pointer;
}

.deal-card.selected {
  border-color: var(--good);
  background: var(--good-soft);
}

.deal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.deal-name {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--muted);
}

.deal-card.selected .deal-name { color: var(--good); }

.deal-badge {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--good);
  border: 1px solid var(--good);
  border-radius: 999px;
  padding: 2px 8px;
}

.deal-amount {
  font-size: 1.7rem;
  font-weight: 700;
}

.deal-detail {
  margin-top: 6px;
  font-size: 0.8rem;
  color: var(--muted);
}

/* ── Step 1: network picker ─────────────────────────────────────────────────── */
.network-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
  margin-top: 4px;
}
.network-tile {
  --net: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 68px;
  padding: 14px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border);
  background: var(--panel);
  cursor: pointer;
  font: inherit;
  transition: border-color .15s, box-shadow .15s, transform .1s;
}
.network-tile:hover {
  border-color: var(--net);
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.08);
  transform: translateY(-1px);
}
.network-name { font-weight: 700; font-size: 0.98rem; color: var(--net); text-align: center; }
.network-logo { max-height: 40px; max-width: 88%; object-fit: contain; display: block; }
.network-note { margin-top: 14px; font-size: 0.78rem; color: var(--muted); text-align: center; }

.network-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  margin-bottom: 16px;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  font-size: 0.82rem;
  color: var(--muted);
}
.network-dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.network-chip strong { color: var(--text); }
.network-chip button {
  margin-left: 6px; border: none; background: none; font: inherit; font-weight: 600;
  color: var(--accent); cursor: pointer; text-decoration: underline;
}

/* Branded network deal card */
.deal-card.deal-network {
  --net: var(--accent);
  border-color: var(--net);
  border-width: 2px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.10);
}
.deal-card.deal-network .deal-name,
.deal-card.deal-network .deal-amount { color: var(--net); }
.deal-badge.best { color: #fff; background: var(--net); border-color: var(--net); }
.deal-card.bps-card { cursor: default; }

/* Network deal: the three ways to take it — bill credit / in-store / cash */
.deal-alts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 12px;
}
.deal-alt {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--panel);
  cursor: pointer;
  transition: border-color 0.12s, box-shadow 0.12s, transform 0.12s;
}
.deal-alt:hover { border-color: var(--net); transform: translateY(-1px); }
.deal-alt.selected {
  border-color: var(--net);
  border-width: 2px;
  padding: 7px 9px;   /* keep box size steady when the border thickens */
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--net) 18%, transparent);
}
.deal-alt-label { font-size: 0.7rem; font-weight: 600; color: var(--muted); }
.deal-alt-value { font-size: 1.05rem; font-weight: 700; color: var(--text); line-height: 1.1; }
.deal-alt-note { font-size: 0.68rem; color: var(--muted); }
.deal-alt.best {
  border-color: var(--net);
  background: color-mix(in srgb, var(--net) 8%, var(--panel));
}
.deal-alt.best .deal-alt-value { color: var(--net); }
@media (max-width: 420px) {
  .deal-alts { grid-template-columns: 1fr; }
}

/* "Checking your network" reveal */
.deal-card.checking { cursor: default; }
.network-searching { display: flex; gap: 6px; margin-top: 12px; }
.network-searching .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--net); opacity: 0.3;
  animation: netpulse 1s infinite ease-in-out;
}
.network-searching .dot:nth-child(2) { animation-delay: .15s; }
.network-searching .dot:nth-child(3) { animation-delay: .30s; }
@keyframes netpulse { 0%, 100% { opacity: .3; transform: scale(1); } 50% { opacity: 1; transform: scale(1.25); } }

.result {
  margin-top: 24px;
  text-align: center;
  padding: 24px;
  border-radius: var(--radius);
  background: var(--good);
  color: #06231a;
}

.result .amount {
  font-size: 2.2rem;
  font-weight: 700;
}

.result .sub {
  font-size: 0.85rem;
  opacity: 0.8;
  margin-top: 4px;
}

.result .detail {
  font-size: 0.8rem;
  opacity: 0.85;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(0, 0, 0, 0.15);
}

.result.verified {
  background: var(--accent);
  color: var(--accent-text);
}

.hint {
  margin-top: 16px;
  font-size: 0.8rem;
  color: var(--muted);
  text-align: center;
}

.hidden { display: none !important; }

/* ---- Icons ----
   [data-icon] elements get their SVG injected by icons.js. Badge-style containers
   (.panel-icon, .stat-icon, .feature-icon, .brand-mark, etc.) already define their own
   box size + centering, so the SVG itself is just sized to 1em of whatever font-size
   its container has -- no separate width/height on the container element itself. */

[data-icon] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

[data-icon] svg {
  width: 1em;
  height: 1em;
  display: block;
}

.icon-inline {
  vertical-align: -0.15em;
  margin-left: 2px;
}

.diagnostic {
  margin-top: 20px;
  text-align: center;
}

.diagnostic-panel {
  margin-top: 24px;
  padding: 24px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.diagnostic-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 28px;
}

@media (max-width: 640px) {
  .diagnostic-grid { grid-template-columns: 1fr; }
}

.diagnostic-steps h3 {
  margin: 0 0 12px;
  font-size: 0.95rem;
}

.app-buttons {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
}

.app-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px;
  border-radius: var(--radius-sm);
  background: var(--text);
  color: var(--bg);
  font-size: 0.78rem;
  font-weight: 600;
  text-decoration: none;
}

.diag-steps-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 16px;
}

.diag-steps-list li {
  display: flex;
  gap: 12px;
}

.step-badge {
  width: 24px;
  height: 24px;
  min-width: 24px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  font-weight: 700;
}

.diag-steps-list strong {
  display: block;
  font-size: 0.88rem;
  margin-bottom: 2px;
}

.diag-steps-list p {
  margin: 0;
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.45;
}

.qr-card {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 20px;
  text-align: center;
}

.qr-card img#diagnosticQr {
  width: 160px;
  height: 160px;
  border-radius: 8px;
  background: #fff;
  padding: 8px;
}

.qr-hint {
  margin: 14px 0 8px;
  font-size: 0.78rem;
  color: var(--muted);
}

.code-copy-row {
  display: flex;
  gap: 8px;
}

.code-copy-row input {
  text-align: center;
  font-weight: 700;
  letter-spacing: 0.05em;
  font-size: 1rem;
}

.copy-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 16px;
  border-radius: var(--radius-sm);
  border: none;
  background: var(--accent);
  color: var(--accent-text);
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  white-space: nowrap;
}

.copy-btn.copied { background: var(--good); }

.session-status {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 14px 0 0;
  font-size: 0.78rem;
  color: var(--muted);
}

.live-status-card {
  margin-top: 14px;
  background: var(--good-soft);
  border: 1px solid var(--good);
  border-radius: var(--radius-sm);
  padding: 16px;
}

.live-status-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: 10px;
}

.live-status-badge {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--good);
  border: 1px solid var(--good);
  border-radius: 999px;
  padding: 2px 10px;
}

.live-status-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.live-status-list li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  color: var(--text);
}

.live-status-dot {
  width: 7px;
  height: 7px;
  min-width: 7px;
  border-radius: 999px;
  background: var(--muted);
}

.live-status-list li.done .live-status-dot { background: var(--good); }

.privacy-note {
  margin-top: 14px;
  display: flex;
  gap: 10px;
  padding: 14px;
  border-radius: var(--radius-sm);
  background: var(--good-soft);
  color: var(--text);
}

.privacy-note .icon { color: var(--good); margin-top: 2px; }

.privacy-note p {
  margin: 0;
  font-size: 0.78rem;
  line-height: 1.5;
  color: var(--muted);
}

.checklist {
  margin-top: 16px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
}

@media (max-width: 480px) {
  .checklist { grid-template-columns: 1fr; }
}

.checklist-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 0.8rem;
  background: var(--bg);
  border: 1px solid var(--border);
}

.checklist-item .icon { width: 1.1em; height: 1.1em; }
.checklist-item.pass .icon { color: var(--good); }
.checklist-item.fail .icon { color: #e05a5a; }
.checklist-item.fail { border-color: #e05a5a; }

/* ---- Trust strip ---- */

.trust-strip {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--bg-alt);
  padding: 28px 24px;
}

.trust-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.trust-copy {
  font-size: 0.85rem;
  color: var(--muted);
  max-width: 220px;
}

.trust-channels {
  display: flex;
  gap: 28px;
  flex-wrap: wrap;
}

.trust-channel {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text);
}

.trust-badge {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 16px;
  font-size: 0.8rem;
  text-align: center;
  color: var(--muted);
}

.trust-badge strong {
  display: block;
  font-size: 1.1rem;
  color: var(--text);
}

/* ---- Stats ---- */

.stats {
  padding: 48px 24px;
}

.stats-grid {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  /* minmax(0, 1fr), not 1fr: a bare 1fr track has min-width:auto, so a card whose contents won't
     shrink forces the track wider than its share and the grid overflows the viewport. Cost 4px of
     horizontal scroll on a 375px screen. */
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

@media (max-width: 800px) {
  .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.stat-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 20px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--panel);
}

.stat-icon {
  width: 42px;
  height: 42px;
  min-width: 42px;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
}

.stat-number { font-size: 1.3rem; font-weight: 800; line-height: 1.1; }
.stat-label { font-size: 0.8rem; color: var(--muted); margin-top: 2px; }

/* ---- Section headings ---- */

.section-head {
  text-align: center;
  max-width: 560px;
  margin: 0 auto 36px;
}

.section-head h2 {
  font-size: 1.7rem;
  margin: 0 0 8px;
}

.section-head p {
  color: var(--muted);
  margin: 0;
  font-size: 0.95rem;
}

/* ---- Feature grid ---- */

.features { padding: 48px 24px; }

.features-grid {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
}

@media (max-width: 900px) {
  .features-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 520px) {
  .features-grid { grid-template-columns: 1fr; }
}

.feature-card {
  padding: 22px 18px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--panel);
  text-align: center;
}

.feature-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  margin: 0 auto 14px;
}

.feature-card h3 {
  font-size: 0.95rem;
  margin: 0 0 6px;
}

.feature-card p {
  font-size: 0.82rem;
  color: var(--muted);
  margin: 0;
  line-height: 1.5;
}

/* ---- How it works steps ---- */

.steps-section {
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 56px 24px;
}

.steps-grid {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  position: relative;
}

@media (max-width: 800px) {
  .steps-grid { grid-template-columns: 1fr; }
}

.step-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 22px;
}

.step-number {
  width: 30px;
  height: 30px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-text);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: 14px;
}

.step-card h3 {
  margin: 0 0 6px;
  font-size: 1rem;
}

.step-card p {
  margin: 0;
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.5;
}

/* ---- CTA banner ---- */

.cta-banner {
  margin: 48px 24px;
  max-width: 1100px;
  margin-left: auto;
  margin-right: auto;
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  border-radius: var(--radius);
  padding: 32px;
  color: #fff;
  text-align: center;
}

.cta-banner h2 {
  margin: 0 0 6px;
  font-size: 1.4rem;
}

.cta-banner p {
  margin: 0 0 20px;
  opacity: 0.9;
  font-size: 0.9rem;
}

.cta-banner .btn-cta {
  display: inline-block;
  background: #fff;
  color: var(--accent-dark);
  border-radius: var(--radius-sm);
  padding: 12px 22px;
  font-weight: 700;
  font-size: 0.9rem;
  text-decoration: none;
}

/* ---- Footer ---- */

.site-footer {
  border-top: 1px solid var(--border);
  padding: 32px 24px 48px;
}

.footer-grid {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

@media (max-width: 700px) {
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
}

.footer-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.82rem;
  color: var(--muted);
}

.footer-item .footer-icon { font-size: 1rem; }
.footer-item strong { display: block; color: var(--text); font-size: 0.85rem; }

.admin-link {
  display: block;
  text-align: center;
  margin-top: 32px;
  color: var(--muted);
  font-size: 0.75rem;
  text-decoration: none;
}

/* ---- Admin page bits (reused across /admin) ---- */

.wrap {
  max-width: 640px;
  margin: 0 auto;
  padding: 48px 20px 80px;
}

header.page {
  text-align: center;
  margin-bottom: 32px;
}

header.page h1 {
  font-size: 1.5rem;
  margin: 0 0 6px;
}

header.page p {
  color: var(--muted);
  margin: 0;
}

.status-banner {
  margin-bottom: 20px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  border: 1px solid var(--border);
  color: var(--muted);
}

.status-banner.ok { border-color: var(--good); color: var(--good); }
.status-banner.error { border-color: #e05a5a; color: #e05a5a; }

.admin-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.9rem;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}

.admin-row:last-child { border-bottom: none; }

/* ---- Checkout ---- */

.link-btn {
  display: block;
  width: 100%;
  margin-top: 10px;
  padding: 0;
  border: none;
  background: none;
  color: var(--muted);
  font-size: 0.82rem;
  text-decoration: underline;
  cursor: pointer;
  text-align: center;
}

.checkout-form {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.checkout-form form {
  margin-top: 18px;
  display: grid;
  gap: 14px;
}

.checkout-form label {
  margin-bottom: 4px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.payout-select {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 4px;
}

.payout-btn {
  padding: 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
}

.payout-btn.active {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent-dark);
}

.checkout-confirm {
  margin-top: 24px;
  text-align: center;
}

.next-steps {
  margin-top: 18px;
  padding: 16px;
  border-radius: var(--radius-sm);
  background: var(--bg-alt);
  border: 1px solid var(--border);
  text-align: left;
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.6;
}

.next-steps strong { color: var(--text); }

/* ---- Embeddable widget (iframe content) ----
   The widget renders inside an iframe on a partner's site, so it drops the marketing shell
   and page chrome: no nav, no hero, transparent background so it sits on the partner's own
   page colour, and no outer margins that would fight their layout. */

.widget-body {
  background: transparent;
  min-height: 0;
}

.widget-root {
  max-width: 640px;
  margin: 0 auto;
  padding: 4px;
}

.widget-panel {
  box-shadow: none;
}

.widget-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 12px 0 4px;
  font-size: 0.75rem;
  color: var(--muted);
}

.widget-footer .icon { color: var(--good); }
.widget-footer strong { color: var(--text); font-weight: 600; }

/* The partner embed is usually narrower than the full site, so the diagnostic screen
   stacks to one column earlier than the standalone page does. */
@media (max-width: 820px) {
  .widget-diagnostic-grid { grid-template-columns: 1fr; }
}

/* ---- Stock room ---- */

.stock-views {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.stock-view {
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 7px 14px;
  font-size: 0.85rem;
  color: var(--muted);
  cursor: pointer;
}

.stock-view.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.stock-filters {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}

.stock-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 16px;
}

.stock-counts {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  margin: 20px 0 12px;
  font-size: 0.82rem;
  color: var(--muted);
}

.stock-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
}

.stock-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.stock-table th {
  text-align: left;
  padding: 8px 10px;
  border-bottom: 1px solid var(--border);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.stock-table td {
  padding: 12px 10px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

.stock-sub {
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.5;
}

.stock-grade {
  display: inline-block;
  margin-top: 4px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--border);
  font-size: 0.72rem;
}

.stock-status {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  white-space: nowrap;
  background: var(--border);
  color: var(--text);
}

.stock-status-in_stock { background: #dcfce7; color: #166534; }
.stock-status-reserved { background: #fef3c7; color: #92400e; }
.stock-status-sold { background: #dbeafe; color: #1e40af; }
.stock-status-returned { background: #ede9fe; color: #5b21b6; }
.stock-status-scrapped { background: #fee2e2; color: #991b1b; }

/* The stock table carries more columns than a phone can show — let it scroll on its own. */
@media (max-width: 720px) {
  #stockList { overflow-x: auto; }
  .stock-table { min-width: 720px; }
}

/* The status pills use fixed pastels, so they need their own dark-mode pairs. */
@media (prefers-color-scheme: dark) {
  .stock-status-in_stock { background: rgba(53, 196, 140, 0.16); color: #6ee7b7; }
  .stock-status-reserved { background: rgba(245, 158, 11, 0.16); color: #fcd34d; }
  .stock-status-sold { background: rgba(91, 141, 239, 0.18); color: #93b4f7; }
  .stock-status-returned { background: rgba(167, 139, 250, 0.16); color: #c4b5fd; }
  .stock-status-scrapped { background: rgba(239, 68, 68, 0.16); color: #fca5a5; }
}


/* device photos in the widget */
.suggestions button { display: flex; align-items: center; gap: 10px; }
.cf-thumb { flex: none; width: 34px; height: 34px; display: grid; place-items: center; }
.cf-mn { flex: 1; }
.cf-thumb .cf-img, .cf-selimg .cf-img { width: 100%; height: 100%; object-fit: contain; }
.cf-ph { color: #94a3b8; }
.selected-model { justify-content: flex-start; }
.selected-model button { margin-left: auto; }
.cf-selimg { flex: none; width: 44px; height: 44px; display: grid; place-items: center; }
.cf-selimg:empty { display: none; }

/* ---- Carbon strip ------------------------------------------------------------------------
   Sits under the four options, not inside them: the avoided emissions are the same whichever
   route the customer takes, and repeating the figure on each card read as four separate savings. */
.carbon-strip {
  display: flex;
  gap: .75rem;
  align-items: flex-start;
  margin-top: 1rem;
  padding: .9rem 1rem;
  border: 1px solid #bbf7d0;
  border-left: 4px solid #16a34a;
  border-radius: 10px;
  background: #f0fdf4;
}
.carbon-strip .icon { flex: 0 0 auto; width: 20px; height: 20px; color: #15803d; margin-top: .1rem; }
.carbon-strip .carbon-head { font-size: .95rem; color: #14532d; line-height: 1.45; }
.carbon-strip .carbon-head strong { font-weight: 700; white-space: nowrap; }
.carbon-strip .carbon-sub { margin-top: .3rem; font-size: .82rem; color: #3f6212; line-height: 1.5; }
@media (max-width: 480px) {
  .carbon-strip { padding: .8rem .85rem; }
  .carbon-strip .carbon-head { font-size: .9rem; }
  .carbon-strip .carbon-sub { font-size: .78rem; }
}

/* ---- "Selling as a business?" — sits right of the network-step heading ---- */
.biz-link {
  margin-left: auto;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 15px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--panel);
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}

.biz-link:hover,
.biz-link:focus-visible {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent-dark);
}

/* On a phone the head stacks, so the link drops under the heading instead of squeezing it. */
@media (max-width: 620px) {
  .panel-head { flex-wrap: wrap; }
  .biz-link { margin-left: 0; width: 100%; justify-content: center; }
}

.muted-inline {
  color: var(--muted);
  font-weight: 400;
}

.demo-notice {
  margin: 0 0 24px;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-alt);
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.55;
}

.demo-notice strong { color: var(--text); }
