/* Nimble PoC styles.
   Colours are CSS variables. The <html> tag carries data-palette (study | ed)
   and data-mode (light | dark). Each of the 4 combinations sets the same tokens. */

/* ---------- Theme tokens ---------- */

/* Logo Study, light (default) */
:root {
  --bg: #FDFFD7;
  --surface: #FFFFFF;
  --surface-2: #F5F7E1;
  --text: #12304A;
  --muted: #4A6178;
  --border: #E1E5C6;
  --brand: #3291D1;
  --link: #1F6FA6;
  --cta: #3291D1;
  --cta-hover: #2A80BA;
  --cta-ink: #FFFFFF;
  --cta-soft: rgba(50, 145, 209, 0.12);
  --dot: #EB8264;
  --accent: #EB8264;
  --soft: #7AD497;
  --soft-ink: #12304A;
  --mascot: #3291D1;
  --mascot-face: #12304A;
  --mascot-tile: #7AD497;
  --hero-bg: #3291D1;
  --hero-ink: #FDFFD7;
  --danger: #B3261E;
  --shadow: 0 10px 30px rgba(18, 48, 74, 0.12);
  color-scheme: light;
}

/* Logo Study, dark */
html[data-palette="study"][data-mode="dark"] {
  --bg: #0E1F31;
  --surface: #152B42;
  --surface-2: #1B3550;
  --text: #FDFFD7;
  --muted: #B5C2CE;
  --border: #284766;
  --brand: #5AAEE6;
  --link: #8CC8F0;
  --cta: #3291D1;
  --cta-hover: #4AA3E0;
  --cta-ink: #FFFFFF;
  --cta-soft: rgba(90, 174, 230, 0.18);
  --dot: #EB8264;
  --accent: #EB8264;
  --soft: #2E6B4A;
  --soft-ink: #FDFFD7;
  --mascot: #3291D1;
  --mascot-face: #12304A;
  --mascot-tile: #2E6B4A;
  --hero-bg: #12304A;
  --hero-ink: #FDFFD7;
  --danger: #FF8A80;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  color-scheme: dark;
}

/* Ed's Palette, light */
html[data-palette="ed"][data-mode="light"] {
  --bg: #FFFFFF;
  --surface: #FFFFFF;
  --surface-2: #F4F5F8;
  --text: #0B132B;
  --muted: #4B5268;
  --border: #E3E5EC;
  --brand: #0B132B;
  --link: #C7300F;
  --cta: #FF4A22;
  --cta-hover: #E83E18;
  --cta-ink: #FFFFFF;
  --cta-soft: rgba(255, 74, 34, 0.10);
  --dot: #FF4A22;
  --accent: #FF4A22;
  --soft: #FFE4DC;
  --soft-ink: #0B132B;
  --mascot: #FF4A22;
  --mascot-face: #0B132B;
  --mascot-tile: #FFE4DC;
  --hero-bg: #0B132B;
  --hero-ink: #FFFFFF;
  --danger: #B3261E;
  --shadow: 0 10px 30px rgba(11, 19, 43, 0.12);
  color-scheme: light;
}

/* Ed's Palette, dark */
html[data-palette="ed"][data-mode="dark"] {
  --bg: #0B132B;
  --surface: #141E3C;
  --surface-2: #1A264A;
  --text: #FFFFFF;
  --muted: #AEB4C6;
  --border: #27335A;
  --brand: #FFFFFF;
  --link: #FF8A6E;
  --cta: #FF4A22;
  --cta-hover: #FF6640;
  --cta-ink: #FFFFFF;
  --cta-soft: rgba(255, 74, 34, 0.16);
  --dot: #FF4A22;
  --accent: #FF4A22;
  --soft: #1F2B52;
  --soft-ink: #FFFFFF;
  --mascot: #FF4A22;
  --mascot-face: #0B132B;
  --mascot-tile: #1F2B52;
  --hero-bg: #060B1C;
  --hero-ink: #FFFFFF;
  --danger: #FF8A80;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  color-scheme: dark;
}

/* ---------- Base ---------- */

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Nunito", "Avenir Next", Avenir, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.25s, color 0.25s;
}

h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 0.5em; font-weight: 800; }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.3rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }
a { color: var(--link); }
img, svg { max-width: 100%; }

.wrap { width: 100%; max-width: 1160px; margin: 0 auto; padding: 0 16px; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

:focus-visible { outline: 3px solid var(--dot); outline-offset: 2px; }

/* ---------- Demo banner ---------- */

.demo-banner {
  background: var(--soft);
  color: var(--soft-ink);
  font-size: 0.85rem;
  text-align: center;
  padding: 6px 16px;
  font-weight: 600;
}

/* ---------- Header ---------- */

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  transition: background-color 0.25s;
}
.header-inner {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  padding-top: 10px; padding-bottom: 10px;
}

.logo {
  font-weight: 800; font-size: 2rem; letter-spacing: -0.03em;
  color: var(--brand); text-decoration: none; line-height: 1;
  display: inline-flex; align-items: baseline;
}
.logo-i { position: relative; display: inline-block; }
.logo-dot {
  position: absolute; left: 50%; top: -0.02em;
  width: 0.24em; height: 0.24em; border-radius: 50%;
  background: var(--dot); transform: translateX(-50%);
}

.main-nav { display: flex; gap: 18px; margin-left: 8px; }
.main-nav a { color: var(--text); text-decoration: none; font-weight: 700; font-size: 0.95rem; }
.main-nav a:hover { color: var(--link); }

.header-tools { margin-left: auto; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

.palette-switch {
  display: inline-flex; border: 1px solid var(--border); border-radius: 999px;
  padding: 3px; background: var(--surface-2);
}
.palette-switch button, .mode-toggle {
  font: inherit; font-size: 0.82rem; font-weight: 700; cursor: pointer;
  border: 0; border-radius: 999px; padding: 6px 12px;
  background: transparent; color: var(--text);
  display: inline-flex; align-items: center; gap: 6px;
}
.palette-switch button[aria-pressed="true"] { background: var(--cta); color: var(--cta-ink); }
.swatch { display: inline-flex; gap: 2px; }
.swatch i { width: 9px; height: 9px; border-radius: 50%; display: block; border: 1px solid rgba(0,0,0,0.15); }

.mode-toggle { border: 1px solid var(--border); background: var(--surface-2); }

.call-link {
  font-weight: 800; font-size: 0.92rem; color: var(--text); text-decoration: none; white-space: nowrap;
}
.call-link span { color: var(--muted); font-weight: 600; }

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

.btn {
  font: inherit; font-weight: 800; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 2px solid transparent; border-radius: 999px;
  padding: 13px 26px; text-decoration: none;
  background: var(--cta); color: var(--cta-ink);
  transition: background-color 0.15s, transform 0.1s;
}
.btn:hover { background: var(--cta-hover); }
.btn:active { transform: translateY(1px); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--border); }
.btn-ghost:hover { background: var(--surface-2); }
.btn-small { padding: 8px 16px; font-size: 0.9rem; }
.btn-light { background: var(--hero-ink); color: var(--hero-bg); }
.btn-light:hover { background: var(--hero-ink); opacity: 0.9; }

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

.hero { background: var(--hero-bg); color: var(--hero-ink); padding: 48px 0 64px; transition: background-color 0.25s; }
.hero-grid { display: grid; grid-template-columns: 1fr 1.15fr; gap: 40px; align-items: start; }
.hero h1 { font-size: clamp(2rem, 4.2vw, 3rem); letter-spacing: -0.02em; margin-top: 20px; }
.hero-sub { font-size: 1.15rem; opacity: 0.9; max-width: 460px; }
.values { list-style: none; padding: 0; margin: 20px 0 0; display: grid; gap: 8px; }
.values li { display: flex; gap: 10px; align-items: center; font-weight: 700; font-size: 1rem; opacity: 0.95; }
.values li::before {
  content: ""; width: 12px; height: 12px; border-radius: 50%; background: var(--dot); flex: none;
}
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; }
.hero .btn-ghost { color: var(--hero-ink); border-color: currentColor; }
.hero .btn-ghost:hover { background: rgba(255,255,255,0.1); }

/* ---------- Journey card + tabs ---------- */

.journey-card {
  background: var(--surface); color: var(--text);
  border-radius: 24px; box-shadow: var(--shadow); overflow: hidden;
  border: 1px solid var(--border);
}
.tabs { display: grid; grid-template-columns: 1fr 1fr; background: var(--surface-2); }
.tab {
  font: inherit; font-weight: 800; font-size: 1rem; cursor: pointer;
  border: 0; background: transparent; color: var(--muted);
  padding: 16px 12px; border-bottom: 3px solid transparent;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
}
.tab small { font-weight: 600; font-size: 0.78rem; }
.tab[aria-selected="true"] { background: var(--surface); color: var(--text); border-bottom-color: var(--cta); }

.panel { padding: 22px 24px 26px; }
.panel[hidden] { display: none; }

.panel-bar {
  display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap;
  font-size: 0.85rem; color: var(--muted); margin-bottom: 14px;
}
.panel-bar a { font-weight: 800; color: var(--text); text-decoration: none; white-space: nowrap; }

.introducer-badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--cta-soft); color: var(--text);
  border-radius: 999px; padding: 4px 10px; font-weight: 700;
}

/* Progress */
.progress { height: 8px; border-radius: 999px; background: var(--surface-2); overflow: hidden; margin-bottom: 18px; }
.progress-bar { height: 100%; width: 0; background: var(--cta); border-radius: inherit; transition: width 0.35s ease; }

/* Ed + speech bubble */
.ed-row { display: flex; gap: 14px; align-items: flex-end; margin-bottom: 18px; }
.ed-avatar { width: 76px; flex: none; }
.ed-avatar svg { display: block; width: 100%; height: auto; overflow: visible; }
.bubble {
  background: var(--cta-soft); border-radius: 18px 18px 18px 4px;
  padding: 14px 16px; font-weight: 800; font-size: 1.2rem; line-height: 1.35;
  animation: pop 0.25s ease;
}
.bubble.handoff { background: var(--accent); color: #12304A; }
html[data-palette="ed"] .bubble.handoff { color: #FFFFFF; }

@keyframes pop { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.ed-body { fill: var(--mascot); transition: fill 0.25s; }
.ed-face { fill: var(--mascot-face); }
.ed-line { stroke: var(--mascot-face); stroke-width: 5; stroke-linecap: round; fill: none; }
.ed-dot { fill: var(--dot); }
.ed-svg.lean { transform-origin: 50% 100%; animation: lean 3s ease-in-out infinite; }
.ed-svg.busy { transform-origin: 50% 100%; animation: bob 0.6s ease-in-out infinite; }
@keyframes lean { 0%, 100% { transform: rotate(0); } 50% { transform: rotate(-4deg); } }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }

/* Step body */
.step { animation: pop 0.25s ease; }
.help { color: var(--muted); font-size: 0.92rem; margin: -6px 0 14px; display: flex; gap: 6px; }
.help::before {
  content: "?"; flex: none; width: 20px; height: 20px; border-radius: 50%;
  border: 2px solid var(--muted); font-size: 0.75rem; font-weight: 800;
  display: inline-flex; align-items: center; justify-content: center; margin-top: 1px;
}
.note { color: var(--muted); font-size: 0.88rem; margin: 8px 0 0; }
.small-print { color: var(--muted); font-size: 0.8rem; margin: 12px 0 0; }

.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.field { display: grid; gap: 4px; }
.field label { font-size: 0.85rem; font-weight: 700; color: var(--muted); }

input[type="text"], input[type="email"], input[type="tel"], input[type="number"],
input[type="date"], input[type="time"], input[type="search"], select, textarea {
  font: inherit; font-size: 1.05rem; width: 100%;
  padding: 13px 14px; border-radius: 12px;
  border: 2px solid var(--border); background: var(--surface); color: var(--text);
}
input:focus, select:focus, textarea:focus { border-color: var(--cta); outline: none; }
textarea { min-height: 110px; resize: vertical; }
.money { position: relative; }
.money::before {
  content: "£"; position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  font-weight: 800; color: var(--muted);
}
.money input { padding-left: 30px; }

.inline-row { display: flex; gap: 10px; }
.inline-row input { flex: 1; }

/* Choice buttons */
.options { display: grid; gap: 8px; }
.options.grid { grid-template-columns: 1fr 1fr; }
.options.chips { grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); }
.option {
  font: inherit; font-weight: 700; text-align: left; cursor: pointer;
  border: 2px solid var(--border); border-radius: 14px;
  padding: 12px 14px; background: var(--surface); color: var(--text);
  transition: border-color 0.15s, background-color 0.15s;
  display: flex; flex-direction: column; gap: 2px;
}
.options.chips .option { text-align: center; align-items: center; padding: 12px 6px; }
.option small { font-weight: 600; color: var(--muted); font-size: 0.8rem; }
.option:hover { border-color: var(--cta); }
.option[aria-pressed="true"], .option.selected { border-color: var(--cta); background: var(--cta-soft); }

.check {
  display: flex; gap: 10px; align-items: flex-start; cursor: pointer;
  font-size: 0.92rem; margin-top: 12px;
}
.check input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--cta); flex: none; }

.link-btn {
  font: inherit; background: none; border: 0; padding: 0; cursor: pointer;
  color: var(--link); text-decoration: underline; font-size: 0.9rem; font-weight: 700;
}

.suggestions { list-style: none; margin: 6px 0 0; padding: 0; border: 2px solid var(--border); border-radius: 12px; overflow: hidden; }
.suggestions li button {
  font: inherit; width: 100%; text-align: left; cursor: pointer;
  border: 0; border-bottom: 1px solid var(--border); background: var(--surface); color: var(--text);
  padding: 10px 14px; display: flex; justify-content: space-between; gap: 10px;
}
.suggestions li:last-child button { border-bottom: 0; }
.suggestions li button:hover, .suggestions li button.selected { background: var(--cta-soft); }
.suggestions small { color: var(--muted); }

.error { color: var(--danger); font-weight: 700; font-size: 0.9rem; margin: 10px 0 0; min-height: 1px; }

.step-actions { display: flex; align-items: center; gap: 12px; margin-top: 20px; flex-wrap: wrap; }
.step-actions .btn { flex: 1 1 auto; }
.back-btn {
  font: inherit; font-weight: 700; cursor: pointer; background: none; border: 0;
  color: var(--muted); padding: 10px 4px;
}
.back-btn:hover { color: var(--text); }

/* End screens */
.end-screen { animation: pop 0.3s ease; }
.end-screen h3 { font-size: 1.35rem; }
.summary { list-style: none; padding: 0; margin: 14px 0; display: grid; gap: 6px; font-size: 0.92rem; }
.summary li { display: flex; justify-content: space-between; gap: 12px; border-bottom: 1px dashed var(--border); padding-bottom: 6px; }
.summary li span:first-child { color: var(--muted); }
.summary li span:last-child { font-weight: 700; text-align: right; }

.sample-flag {
  font-size: 0.8rem; font-weight: 700; color: var(--muted);
  background: var(--surface-2); border-radius: 8px; padding: 6px 10px; margin: 0 0 12px;
}
.quotes { display: grid; gap: 10px; }
.quote {
  border: 2px solid var(--border); border-radius: 16px; padding: 14px 16px;
  display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; align-items: center;
}
.quote.best { border-color: var(--cta); }
.quote-name { font-weight: 800; }
.quote-tag {
  display: inline-block; font-size: 0.72rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.04em;
  background: var(--cta); color: var(--cta-ink); border-radius: 6px; padding: 2px 6px; margin-left: 6px; vertical-align: middle;
}
.quote-price { font-weight: 800; font-size: 1.5rem; text-align: right; }
.quote-price small { display: block; font-size: 0.8rem; font-weight: 600; color: var(--muted); }
.quote-meta { color: var(--muted); font-size: 0.85rem; grid-column: 1 / -1; }
.quote .btn { grid-column: 1 / -1; margin-top: 6px; }
.quote:not(.best) .btn { background: transparent; color: var(--text); border-color: var(--border); }
.quote:not(.best) .btn:hover { background: var(--surface-2); }

.loading-dots { display: inline-flex; gap: 5px; margin-left: 6px; }
.loading-dots i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; animation: blink 1s infinite; }
.loading-dots i:nth-child(2) { animation-delay: 0.15s; }
.loading-dots i:nth-child(3) { animation-delay: 0.3s; }
@keyframes blink { 0%, 100% { opacity: 0.2; } 50% { opacity: 1; } }

/* ---------- Trust bar ---------- */

.trust-bar { background: var(--surface-2); border-bottom: 1px solid var(--border); }
.trust-bar ul {
  list-style: none; margin: 0; padding: 14px 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 32px;
  font-weight: 700; font-size: 0.92rem;
}
.trust-bar .stars { color: #F5B700; letter-spacing: 2px; }

/* ---------- Sections ---------- */

section.block { padding: 72px 0; }
section.block.alt { background: var(--surface-2); }
.eyebrow { font-weight: 800; text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.78rem; color: var(--link); margin-bottom: 8px; }
.lead { font-size: 1.15rem; color: var(--muted); max-width: 720px; }

.about-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 48px; align-items: center; }
.ed-tile {
  background: var(--mascot-tile); border-radius: 24px; padding: 40px;
  display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center;
}
.ed-tile svg { width: 160px; height: auto; overflow: visible; }
.ed-tile p { margin: 0; font-weight: 800; font-size: 1.15rem; }
.ed-faces { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; width: 100%; margin-top: 8px; }
.ed-faces figure { margin: 0; background: var(--surface); border-radius: 14px; padding: 10px 6px; }
.ed-faces svg { width: 52px; }
.ed-faces figcaption { font-size: 0.78rem; font-weight: 700; }

.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; margin-top: 28px; }
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: 18px; padding: 20px;
  display: flex; flex-direction: column; gap: 8px;
}
.card p { color: var(--muted); font-size: 0.95rem; margin: 0; flex: 1; }
.card .card-link { font-weight: 800; color: var(--link); text-decoration: none; font-size: 0.92rem; }
.card-icon {
  width: 40px; height: 40px; border-radius: 12px; background: var(--cta-soft); color: var(--text);
  display: inline-flex; align-items: center; justify-content: center; font-size: 1.25rem;
}
.tag {
  align-self: flex-start; font-size: 0.72rem; font-weight: 800; border-radius: 6px; padding: 2px 8px;
  background: var(--soft); color: var(--soft-ink);
}

.benefits { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; margin-top: 28px; }
.benefit { background: var(--surface); border: 1px solid var(--border); border-radius: 18px; padding: 18px; }
.benefit h3 { margin-bottom: 4px; }
.benefit p { margin: 0; color: var(--muted); font-size: 0.95rem; }

.boomerang {
  margin-top: 32px; background: var(--hero-bg); color: var(--hero-ink);
  border-radius: 24px; padding: 32px; display: grid; grid-template-columns: auto 1fr; gap: 24px; align-items: center;
}
.boomerang-mark {
  width: 72px; height: 72px; border-radius: 50%; background: var(--dot);
  display: flex; align-items: center; justify-content: center; font-size: 2rem; color: #fff;
}
.boomerang h3 { font-size: 1.5rem; }
.boomerang p { margin: 0; }

.steps { list-style: none; counter-reset: step; padding: 0; margin: 32px 0 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.steps li { counter-increment: step; background: var(--surface); border: 1px solid var(--border); border-radius: 18px; padding: 18px; }
.steps li::before {
  content: counter(step); display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 50%; background: var(--cta); color: var(--cta-ink);
  font-weight: 800; margin-bottom: 10px;
}
.steps h3 { margin-bottom: 4px; }
.steps p { margin: 0; color: var(--muted); font-size: 0.92rem; }
.intro-cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 28px; }

.faq { max-width: 820px; margin-top: 24px; }
.faq details { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; margin-bottom: 10px; }
.faq summary { cursor: pointer; padding: 16px 18px; font-weight: 800; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.3rem; line-height: 1; color: var(--link); }
.faq details[open] summary::after { content: "−"; }
.faq details p { padding: 0 18px 16px; margin: 0; color: var(--muted); }

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

.site-footer { background: var(--hero-bg); color: var(--hero-ink); padding: 48px 0 32px; font-size: 0.92rem; }
.site-footer .logo { color: var(--hero-ink); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; }
.site-footer h4 { font-size: 0.95rem; margin-bottom: 10px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.site-footer a { color: var(--hero-ink); }
.legal { margin-top: 32px; padding-top: 18px; border-top: 1px solid rgba(255,255,255,0.2); font-size: 0.8rem; opacity: 0.85; }

/* ---------- Toast ---------- */

.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(20px);
  background: var(--text); color: var(--bg); padding: 12px 18px; border-radius: 12px;
  font-weight: 700; font-size: 0.92rem; box-shadow: var(--shadow);
  opacity: 0; pointer-events: none; transition: opacity 0.2s, transform 0.2s; z-index: 100;
  max-width: calc(100% - 32px);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- Leads page ---------- */

.leads-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin: 40px 0 20px; }
.leads-head h1 { margin: 0; font-size: 2rem; }
.leads-tools { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.filter { display: inline-flex; border: 1px solid var(--border); border-radius: 999px; padding: 3px; background: var(--surface-2); }
.filter button {
  font: inherit; font-size: 0.85rem; font-weight: 700; cursor: pointer;
  border: 0; border-radius: 999px; padding: 6px 14px; background: transparent; color: var(--text);
}
.filter button[aria-pressed="true"] { background: var(--cta); color: var(--cta-ink); }

.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; margin-bottom: 20px; }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 14px 16px; }
.stat b { display: block; font-size: 1.7rem; line-height: 1.1; }
.stat span { color: var(--muted); font-size: 0.85rem; font-weight: 700; }

.table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; margin-bottom: 48px; }
table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
th, td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--border); vertical-align: top; }
th { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); background: var(--surface-2); white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
td.nowrap { white-space: nowrap; }
.pill {
  display: inline-block; font-size: 0.75rem; font-weight: 800; border-radius: 999px; padding: 2px 10px; white-space: nowrap;
  background: var(--cta-soft); color: var(--text);
}
.pill.referral { background: var(--soft); color: var(--soft-ink); }
.empty { text-align: center; padding: 48px 16px; color: var(--muted); }
.empty svg { width: 90px; margin-bottom: 8px; }

/* ---------- Minimal layout: one view at a time ---------- */

body { min-height: 100vh; display: flex; flex-direction: column; }
main { flex: 1; display: flex; flex-direction: column; }
.view[hidden] { display: none !important; }
.view-home { flex: 1; display: flex; }
.view-home .hero { flex: 1; display: flex; align-items: center; padding: 40px 0; }
.hero-grid { align-items: center; }
.hero-trust { font-size: 0.9rem; font-weight: 700; opacity: 0.85; margin-top: 20px; }
.hero-trust .stars { color: #F5B700; letter-spacing: 1px; }

.main-nav a[aria-current="page"] { color: var(--link); text-decoration: underline; text-underline-offset: 6px; text-decoration-thickness: 2px; }

/* Theme pop-up */
.theme-menu { position: relative; }
.theme-btn {
  font: inherit; font-size: 0.88rem; font-weight: 700; cursor: pointer;
  border: 1px solid var(--border); border-radius: 999px; padding: 7px 12px;
  background: var(--surface-2); color: var(--text);
}
.theme-pop {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 60;
  background: var(--surface); border: 1px solid var(--border); border-radius: 16px;
  box-shadow: var(--shadow); padding: 14px; width: max-content; max-width: calc(100vw - 32px);
  display: grid; gap: 8px; justify-items: start;
}
.theme-pop[hidden] { display: none; }
.theme-pop-label { margin: 0; font-size: 0.75rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.theme-pop .theme-pop-label + .palette-switch, .theme-pop .theme-pop-label + .mode-toggle { margin-bottom: 4px; }

.call-icon { font-size: 0.95rem; }

/* Slim footer */
.mini-footer { border-top: 1px solid var(--border); font-size: 0.8rem; color: var(--muted); }
.mini-footer-inner { display: flex; flex-wrap: wrap; gap: 6px 18px; padding-top: 12px; padding-bottom: 12px; }
.mini-footer-inner span { margin-right: auto; }
.mini-footer a { color: var(--muted); }

/* Referral code entry */
.code-input {
  font-size: 1.8rem !important; font-weight: 800; letter-spacing: 0.4em; text-align: center;
  font-variant-numeric: tabular-nums; max-width: 300px;
}

/* New code reveal on onboarding */
.code-reveal {
  background: var(--cta-soft); border: 2px dashed var(--cta); border-radius: 18px;
  padding: 18px; text-align: center; margin-bottom: 16px;
}
.code-label { margin: 0; font-size: 0.8rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }
.code-value {
  margin: 4px 0 10px; font-size: 2.6rem; font-weight: 800; letter-spacing: 0.25em;
  font-variant-numeric: tabular-nums; line-height: 1.1;
}
.end-screen > .btn { width: 100%; margin-top: 4px; }

/* Leads page: Leads | Advisors tabs */
.admin-tabs { display: flex; gap: 6px; margin-top: 28px; border-bottom: 2px solid var(--border); }
.admin-tab {
  font: inherit; font-weight: 800; cursor: pointer; background: none; border: 0;
  color: var(--muted); padding: 10px 16px; margin-bottom: -2px; border-bottom: 3px solid transparent;
  display: inline-flex; align-items: center; gap: 8px;
}
.admin-tab[aria-selected="true"] { color: var(--text); border-bottom-color: var(--cta); }
.admin-tab .count {
  font-size: 0.75rem; background: var(--surface-2); border: 1px solid var(--border);
  border-radius: 999px; padding: 1px 8px; color: var(--text);
}
.admin-tabs + section .leads-head { margin-top: 20px; }

/* ---------- Responsive ---------- */

@media (max-width: 980px) {
  .hero-grid, .about-grid { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr 1fr; }
  .view-home .hero { align-items: flex-start; padding: 24px 0 32px; }
  .hero-trust { display: none; }
}

@media (max-width: 640px) {
  body { font-size: 16px; }
  .header-inner { gap: 10px; flex-wrap: nowrap; }
  .logo { font-size: 1.6rem; }
  .main-nav { gap: 12px; margin-left: 4px; }
  .main-nav a { font-size: 0.85rem; }
  .header-tools { gap: 6px; }
  .theme-btn-text, .call-text { display: none; }
  .theme-btn { padding: 6px 9px; }
  .hero h1 { font-size: 1.75rem; margin-top: 0; }
  .hero-sub { font-size: 1rem; margin-bottom: 0; }
  .palette-switch button, .mode-toggle { padding: 6px 9px; font-size: 0.78rem; }
  .swatch { display: none; }
  .hero { padding: 28px 0 40px; }
  .panel { padding: 18px 16px 22px; }
  .options.grid { grid-template-columns: 1fr; }
  .field-row { grid-template-columns: 1fr; }
  .ed-avatar { width: 60px; }
  .bubble { font-size: 1.08rem; }
  .steps { grid-template-columns: 1fr; }
  .boomerang { grid-template-columns: 1fr; padding: 24px; }
  .footer-grid { grid-template-columns: 1fr; }
  .ed-faces svg { width: 40px; }
  section.block { padding: 52px 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}
