/* ==========================================================================
   Farshad Nassiri — Tech-Enabled Finance / Fractional CFO
   Design system: minimal, editorial, decision-first.
   ========================================================================== */

/* ---------- Tokens ---------- */
:root {
  --bg:            #FAFAF7;
  --bg-alt:        #F2F1EC;
  --surface:       #FFFFFF;
  --surface-2:     #F7F6F2;
  --ink:           #101315;
  --ink-2:         #33393D;
  --muted:         #6B7379;
  --faint:         #9AA1A6;
  --line:          #E3E1DA;
  --line-strong:   #CFCCC2;
  --accent:        #0E6F5C;
  --accent-ink:    #0A5546;
  --accent-soft:   #E3F0EC;
  --warn:          #B4581F;
  --warn-soft:     #F7EBE1;
  --danger:        #A3312B;
  --danger-soft:   #F7E7E6;
  --pos:           #0E6F5C;
  --neg:           #A3312B;

  --radius:        14px;
  --radius-sm:     9px;
  --radius-lg:     22px;

  --shadow-sm:     0 1px 2px rgba(16,19,21,.04), 0 1px 1px rgba(16,19,21,.03);
  --shadow:        0 2px 4px rgba(16,19,21,.03), 0 8px 24px -12px rgba(16,19,21,.12);
  --shadow-lg:     0 4px 8px rgba(16,19,21,.04), 0 24px 60px -24px rgba(16,19,21,.20);

  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --serif: "Newsreader", Iowan Old Style, Georgia, "Times New Roman", serif;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --wrap: 1140px;
  --gut: clamp(20px, 5vw, 48px);
  --nav-h: 66px;
}

html[data-theme="dark"] {
  --bg:            #0B0D0E;
  --bg-alt:        #101315;
  --surface:       #14181A;
  --surface-2:     #191E20;
  --ink:           #ECEEEF;
  --ink-2:         #C7CCCF;
  --muted:         #949B9F;
  --faint:         #6E7579;
  --line:          #23292C;
  --line-strong:   #333B3F;
  --accent:        #4FD3AF;
  --accent-ink:    #7FE5C8;
  --accent-soft:   #102A25;
  --warn:          #E0954F;
  --warn-soft:     #2A2018;
  --danger:        #E0736B;
  --danger-soft:   #2B1A19;
  --pos:           #4FD3AF;
  --neg:           #E0736B;

  --shadow-sm:     0 1px 2px rgba(0,0,0,.4);
  --shadow:        0 2px 4px rgba(0,0,0,.3), 0 8px 24px -12px rgba(0,0,0,.6);
  --shadow-lg:     0 4px 8px rgba(0,0,0,.3), 0 24px 60px -24px rgba(0,0,0,.8);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 24px); }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16.5px;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-feature-settings: "kern" 1, "liga" 1, "cv11" 1;
}
img, svg { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
::selection { background: var(--accent); color: #fff; }
html[data-theme="dark"] ::selection { color: #08110F; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

/* ---------- Typography ---------- */
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 500; letter-spacing: -.014em; line-height: 1.14; text-wrap: balance; }
h1 { font-size: clamp(2.35rem, 5.4vw, 4.05rem); line-height: 1.06; letter-spacing: -.026em; }
h2 { font-size: clamp(1.75rem, 3.3vw, 2.6rem); letter-spacing: -.02em; }
h3 { font-size: clamp(1.15rem, 1.7vw, 1.36rem); line-height: 1.28; }
h4 { font-size: 1.03rem; font-family: var(--sans); font-weight: 600; letter-spacing: -.008em; line-height: 1.4; }
p { text-wrap: pretty; }
.lede { font-size: clamp(1.05rem, 1.6vw, 1.24rem); line-height: 1.6; color: var(--ink-2); max-width: 62ch; }
.muted { color: var(--muted); }
.small { font-size: .875rem; line-height: 1.55; }
.xsmall { font-size: .795rem; line-height: 1.5; }
.num { font-variant-numeric: tabular-nums; font-feature-settings: "tnum" 1; }
strong, b { font-weight: 600; color: var(--ink); }
em { font-style: italic; }

.eyebrow {
  font-size: .705rem; font-weight: 600; letter-spacing: .13em; text-transform: uppercase;
  color: var(--muted); display: block; margin-bottom: 1rem;
}
.eyebrow--accent { color: var(--accent); }

/* ---------- Layout ---------- */
.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gut); }
.wrap--narrow { max-width: 800px; }
.wrap--wide { max-width: 1320px; }
.section { padding-block: clamp(64px, 8.5vw, 118px); }
.section--tight { padding-block: clamp(48px, 6vw, 76px); }
.section--alt { background: var(--bg-alt); }
.section--line { border-top: 1px solid var(--line); }
.stack > * + * { margin-top: 1rem; }
.stack-lg > * + * { margin-top: 1.75rem; }
.grid { display: grid; gap: 20px; }
.grid > *, .split > *, .demo-layout > *, .kpi-grid > * { min-width: 0; }
.g-2 { grid-template-columns: repeat(2, minmax(0,1fr)); }
.g-3 { grid-template-columns: repeat(3, minmax(0,1fr)); }
.g-4 { grid-template-columns: repeat(4, minmax(0,1fr)); }
@media (max-width: 940px) { .g-3, .g-4 { grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media (max-width: 620px) { .g-2, .g-3, .g-4 { grid-template-columns: 1fr; } }

.split { display: grid; grid-template-columns: minmax(0, .82fr) minmax(0, 1.18fr); gap: clamp(28px, 5vw, 68px); align-items: start; }
@media (max-width: 900px) { .split { grid-template-columns: 1fr; gap: 32px; } }
.section-head { max-width: 66ch; margin-bottom: clamp(32px, 4vw, 52px); }
.section-head p { color: var(--ink-2); margin-top: .85rem; font-size: 1.04rem; }

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 100; height: var(--nav-h);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid transparent; transition: border-color .25s, background .25s;
}
.nav.is-stuck { border-bottom-color: var(--line); }
.nav__in { height: 100%; display: flex; align-items: center; gap: 24px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 600; letter-spacing: -.02em; font-size: 1rem; margin-right: auto; }
.brand__mark {
  width: 26px; height: 26px; border-radius: 7px; background: var(--ink); color: var(--bg);
  display: grid; place-items: center; font-size: .68rem; font-weight: 700; letter-spacing: 0;
  flex: none; align-self: center; font-family: var(--sans);
}
.brand__sub { color: var(--muted); font-weight: 400; font-size: .78rem; letter-spacing: 0; }
@media (max-width: 560px) { .brand__sub { display: none; } }
.nav__links {
  display: flex; align-items: center; gap: 2px; padding: 3px;
  border: 1px solid var(--line); border-radius: 999px; background: var(--surface-2);
}
.nav__links a {
  padding: 7px 14px; border-radius: 999px; font-size: .845rem; color: var(--muted);
  font-weight: 500; letter-spacing: -.004em; white-space: nowrap;
  transition: background .18s, color .18s, box-shadow .18s;
}
.nav__links a:hover { color: var(--ink); background: var(--surface); }
.nav__links a.is-active {
  color: var(--ink); font-weight: 600; background: var(--surface); box-shadow: var(--shadow-sm);
}
.nav__actions { display: flex; align-items: center; gap: 10px; }
@media (max-width: 900px) { .nav__links { display: none; } }

.icon-btn {
  width: 36px; height: 36px; display: grid; place-items: center; border-radius: 9px;
  border: 1px solid var(--line); background: transparent; cursor: pointer; color: var(--ink-2);
  transition: background .18s, border-color .18s, color .18s;
}
.icon-btn:hover { background: var(--surface-2); color: var(--ink); border-color: var(--line-strong); }
.icon-btn svg { width: 16px; height: 16px; }
.nav__toggle { display: none; }
@media (max-width: 900px) { .nav__toggle { display: grid; } }
@media (max-width: 620px) { .nav__actions > .btn { display: none; } }

.drawer {
  position: fixed; inset: var(--nav-h) 0 0 0; z-index: 99; background: var(--bg);
  padding: 18px var(--gut) 40px; overflow-y: auto;
  transform: translateY(-8px); opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s;
}
.drawer.is-open { opacity: 1; transform: none; pointer-events: auto; }
.drawer a { display: block; padding: 13px 0; border-bottom: 1px solid var(--line); font-size: 1.05rem; font-family: var(--serif); }
.drawer .btn { margin-top: 22px; width: 100%; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 20px; border-radius: 999px; font-size: .905rem; font-weight: 550;
  letter-spacing: -.006em; border: 1px solid transparent; cursor: pointer;
  transition: transform .16s cubic-bezier(.2,.7,.3,1), background .18s, border-color .18s, box-shadow .18s, color .18s;
  white-space: nowrap; text-align: center;
}
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--ink); color: var(--bg); }
.btn--primary:hover { background: var(--accent-ink); box-shadow: var(--shadow); }
html[data-theme="dark"] .btn--primary { background: var(--ink); color: #0B0D0E; }
html[data-theme="dark"] .btn--primary:hover { background: var(--accent); }
.btn--ghost { border-color: var(--line-strong); color: var(--ink); background: transparent; }
.btn--ghost:hover { background: var(--surface-2); border-color: var(--ink-2); }
.btn--accent { background: var(--accent); color: #fff; }
html[data-theme="dark"] .btn--accent { color: #07110E; }
.btn--accent:hover { filter: brightness(1.06); box-shadow: var(--shadow); }
.btn--sm { padding: 8px 15px; font-size: .84rem; }
.btn--lg { padding: 15px 26px; font-size: .97rem; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }

.link-arrow {
  display: inline-flex; align-items: center; gap: 6px; font-size: .885rem; font-weight: 550;
  color: var(--accent); border-bottom: 1px solid transparent; transition: gap .18s, border-color .18s;
}
.link-arrow::after { content: "→"; transition: transform .18s; font-size: .95em; }
.link-arrow:hover { gap: 9px; }
.link-arrow:hover::after { transform: translateX(1px); }

/* ---------- Cards ---------- */
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: clamp(20px, 2.4vw, 28px); transition: border-color .2s, box-shadow .25s, transform .25s;
  position: relative; display: flex; flex-direction: column;
}
a.card:hover, .card--hover:hover { border-color: var(--line-strong); box-shadow: var(--shadow); transform: translateY(-2px); }
.card__top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.card h3 + p, .card h4 + p { margin-top: .5rem; color: var(--muted); font-size: .925rem; }
.card__foot { margin-top: auto; padding-top: 18px; }

.tile-num {
  font-family: var(--serif); font-size: .95rem; color: var(--faint);
  border: 1px solid var(--line); width: 30px; height: 30px; border-radius: 8px;
  display: grid; place-items: center; flex: none;
}

/* ---------- Badges / pills ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px;
  font-size: .715rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase;
  background: var(--surface-2); color: var(--muted); border: 1px solid var(--line);
}
.badge--accent { background: var(--accent-soft); color: var(--accent-ink); border-color: transparent; }
html[data-theme="dark"] .badge--accent { color: var(--accent); }
.badge--warn { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.badge--danger { background: var(--danger-soft); color: var(--danger); border-color: transparent; }
.badge--dot::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

.tag {
  display: inline-flex; align-items: center; padding: 5px 11px; border-radius: 999px;
  font-size: .8rem; border: 1px solid var(--line); color: var(--ink-2); background: var(--surface);
  transition: border-color .18s, background .18s, color .18s;
}
a.tag:hover, .tag.is-active { border-color: var(--ink); color: var(--ink); }
.tag.is-active { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.tag-row { display: flex; flex-wrap: wrap; gap: 8px; }

/* ---------- Hero ---------- */
.hero { position: relative; padding-block: clamp(56px, 8vw, 104px) clamp(48px, 6vw, 76px); overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: -30% -10% auto -10%; height: 620px; z-index: -1;
  background:
    radial-gradient(52% 50% at 22% 22%, color-mix(in srgb, var(--accent) 12%, transparent) 0%, transparent 68%),
    radial-gradient(46% 46% at 82% 8%, color-mix(in srgb, var(--warn) 8%, transparent) 0%, transparent 66%);
  filter: blur(6px); pointer-events: none;
}
/* The headline leads on the homepage, so it gets the wider column. */
.hero .split { grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); }
@media (max-width: 900px) { .hero .split { grid-template-columns: 1fr; } }
.hero h1 { max-width: 18ch; }
.hero .figure { padding: clamp(16px, 2.4vw, 26px); }
.hero__lede { margin-top: 1.5rem; }
.hero__cta { margin-top: 2.1rem; }
.hero__meta { margin-top: 2.6rem; padding-top: 1.4rem; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 10px 26px; }
.hero__meta span { font-size: .825rem; color: var(--muted); display: inline-flex; align-items: center; gap: 7px; }
.hero__meta span::before { content: ""; width: 4px; height: 4px; border-radius: 50%; background: var(--accent); flex: none; }

/* Hero KPI panel */
.panel {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg); overflow: hidden;
}
.panel__bar {
  display: flex; align-items: center; gap: 8px; padding: 12px 18px;
  border-bottom: 1px solid var(--line); background: var(--surface-2);
}
.panel__bar h4 { font-size: .84rem; font-weight: 600; letter-spacing: -.005em; }
.panel__body { padding: clamp(16px, 2.2vw, 24px); }
.dot-row { display: flex; gap: 5px; margin-right: 6px; }
.dot-row i { width: 8px; height: 8px; border-radius: 50%; background: var(--line-strong); display: block; }

.kpi-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; }
@media (max-width: 560px) { .kpi-grid { grid-template-columns: repeat(2, minmax(0,1fr)); } }
.kpi { background: var(--surface); padding: 14px 16px; }
.kpi__label { font-size: .705rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 600; }
.kpi__val { font-family: var(--serif); font-size: 1.62rem; line-height: 1.2; margin-top: 5px; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.kpi__delta { font-size: .78rem; margin-top: 3px; font-variant-numeric: tabular-nums; color: var(--muted); }
.pos { color: var(--pos); }
.neg { color: var(--neg); }

/* ---------- Question cards (problem-first) ---------- */
.qcard {
  display: flex; flex-direction: column; gap: 10px; padding: 22px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  transition: border-color .2s, box-shadow .25s, transform .25s;
}
.qcard:hover { border-color: var(--line-strong); box-shadow: var(--shadow); transform: translateY(-2px); }
.qcard__q { font-family: var(--serif); font-size: 1.2rem; line-height: 1.3; letter-spacing: -.012em; }
.qcard__a { font-size: .9rem; color: var(--muted); flex: 1; }
.qcard__foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 6px; }

/* ---------- Feature list ---------- */
/* The marker is positioned rather than laid out as a grid/flex item: as a track
   it would split any inline markup in the item (a <strong>, a link) onto its own
   line, because each text run becomes a separate anonymous item. */
.checklist { list-style: none; padding: 0; display: grid; gap: 11px; }
.checklist li { position: relative; padding-left: 28px; font-size: .935rem; color: var(--ink-2); }
.checklist li::before {
  content: ""; position: absolute; left: 0; top: 4px; width: 17px; height: 17px; border-radius: 50%;
  background-color: var(--accent-soft);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'%3E%3Cpath d='M3 7.3l2.6 2.6L11 4.4' fill='none' stroke='%230E6F5C' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-size: 12px 12px; background-repeat: no-repeat; background-position: center;
}
html[data-theme="dark"] .checklist li::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'%3E%3Cpath d='M3 7.3l2.6 2.6L11 4.4' fill='none' stroke='%234FD3AF' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

.dashlist { list-style: none; padding: 0; display: grid; gap: 9px; }
.dashlist li { position: relative; padding-left: 24px; font-size: .92rem; color: var(--ink-2); }
.dashlist li::before { content: "—"; position: absolute; left: 0; top: 0; color: var(--faint); }

/* ---------- Callout ---------- */
.callout {
  border-left: 2px solid var(--accent); padding: 4px 0 4px 20px; color: var(--ink-2);
}
.callout--box {
  border: 1px solid var(--line); border-left-width: 2px; border-left-color: var(--accent);
  border-radius: var(--radius-sm); padding: 18px 20px; background: var(--surface);
}
.callout--warn { border-left-color: var(--warn); }
.callout h4 { margin-bottom: .4rem; }

/* ---------- Table ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
table.data { width: 100%; border-collapse: collapse; font-size: .875rem; min-width: 560px; }
table.data th, table.data td { padding: 11px 14px; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.data thead th {
  font-size: .705rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted);
  font-weight: 600; background: var(--surface-2); position: sticky; top: 0; z-index: 1;
}
table.data tbody tr:last-child td { border-bottom: none; }
table.data tbody tr:hover { background: var(--surface-2); }
table.data td.n, table.data th.n { text-align: right; font-variant-numeric: tabular-nums; }
table.data td.flag, table.data .flag { color: var(--danger); font-weight: 550; }
table.data--wrap { min-width: 0; }
table.data--wrap td { white-space: normal; vertical-align: top; }
table.data td.wrap-cell { white-space: normal; min-width: 220px; }
.finding { display: block; }
.finding + .finding { margin-top: 6px; }
.finding .badge { margin-right: 5px; vertical-align: 1px; }
tr.is-flagged { background: color-mix(in srgb, var(--danger-soft) 60%, transparent); }
tr.is-flagged:hover { background: var(--danger-soft); }

/* ---------- Accordion ---------- */
.acc { border-top: 1px solid var(--line); }
.acc details { border-bottom: 1px solid var(--line); }
.acc summary {
  list-style: none; cursor: pointer; padding: 20px 40px 20px 0; position: relative;
  font-family: var(--serif); font-size: 1.16rem; letter-spacing: -.012em; line-height: 1.35;
}
.acc summary::-webkit-details-marker { display: none; }
.acc summary::after {
  content: "+"; position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  font-family: var(--sans); font-size: 1.3rem; color: var(--muted); font-weight: 300; transition: transform .22s;
}
.acc details[open] summary::after { content: "−"; }
.acc summary:hover { color: var(--accent); }
.acc__body { padding: 0 0 22px; color: var(--ink-2); font-size: .95rem; max-width: 72ch; }
.acc__body > * + * { margin-top: .8rem; }

/* ---------- Demo controls ---------- */
.controls { display: grid; gap: 20px; }
.ctrl { display: grid; gap: 7px; }
.ctrl__head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.ctrl__label { font-size: .8rem; font-weight: 550; color: var(--ink-2); }
.ctrl__val { font-size: .875rem; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--accent-ink); }
html[data-theme="dark"] .ctrl__val { color: var(--accent); }
.ctrl__hint { font-size: .75rem; color: var(--faint); }

input[type="range"] {
  -webkit-appearance: none; appearance: none; width: 100%; height: 22px; background: transparent; cursor: pointer;
}
input[type="range"]::-webkit-slider-runnable-track { height: 4px; border-radius: 999px; background: var(--line-strong); }
input[type="range"]::-moz-range-track { height: 4px; border-radius: 999px; background: var(--line-strong); }
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 17px; height: 17px; border-radius: 50%; background: var(--surface);
  border: 2px solid var(--accent); margin-top: -6.5px; box-shadow: var(--shadow-sm); transition: transform .15s;
}
input[type="range"]::-moz-range-thumb {
  width: 15px; height: 15px; border-radius: 50%; background: var(--surface);
  border: 2px solid var(--accent); box-shadow: var(--shadow-sm);
}
input[type="range"]:hover::-webkit-slider-thumb { transform: scale(1.12); }
input[type="range"]:active::-webkit-slider-thumb { transform: scale(1.05); }

.field { display: grid; gap: 6px; }
.field label { font-size: .8rem; font-weight: 550; color: var(--ink-2); }
.field input, .field select, .field textarea {
  width: 100%; padding: 11px 13px; border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--surface); font-size: .93rem; transition: border-color .18s, box-shadow .18s;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft);
}
.field textarea { resize: vertical; min-height: 118px; line-height: 1.55; }
.field__hint { font-size: .765rem; color: var(--faint); }
.field select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 4.5L6 8l3.5-3.5' fill='none' stroke='%236B7379' stroke-width='1.4' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; background-size: 12px; padding-right: 34px; }

.seg { display: inline-flex; padding: 3px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 999px; gap: 2px; flex-wrap: wrap; }
.seg button {
  border: none; background: transparent; padding: 7px 14px; border-radius: 999px; cursor: pointer;
  font-size: .82rem; font-weight: 550; color: var(--muted); transition: background .18s, color .18s;
}
.seg button:hover { color: var(--ink); }
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm); }

/* Three long options will not sit on one line in a narrow sidebar. */
.seg--stack { flex-direction: column; width: 100%; }
.seg--stack button { width: 100%; text-align: left; padding-inline: 13px; }

.switch { display: flex; align-items: center; gap: 11px; cursor: pointer; font-size: .89rem; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch__track {
  width: 38px; height: 22px; border-radius: 999px; background: var(--line-strong); position: relative;
  transition: background .2s; flex: none;
}
.switch__track::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%;
  background: #fff; transition: transform .2s; box-shadow: 0 1px 2px rgba(0,0,0,.2);
}
.switch input:checked + .switch__track { background: var(--accent); }
.switch input:checked + .switch__track::after { transform: translateX(16px); }
.switch input:focus-visible + .switch__track { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------- Chart ---------- */
.chart { width: 100%; }
.chart svg { width: 100%; height: auto; overflow: visible; }
.chart text { font-family: var(--sans); font-variant-numeric: tabular-nums; }
.legend { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 14px; }
.legend span { display: inline-flex; align-items: center; gap: 7px; font-size: .795rem; color: var(--muted); }
.legend i { width: 10px; height: 10px; border-radius: 3px; display: block; flex: none; }

.insight {
  border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface-2);
  padding: 20px 22px;
}
.insight__label {
  font-size: .705rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--accent-ink);
  display: flex; align-items: center; gap: 8px; margin-bottom: 10px;
}
html[data-theme="dark"] .insight__label { color: var(--accent); }
.insight p { font-size: .945rem; color: var(--ink-2); }
.insight p + p { margin-top: .65rem; }

.demo-layout { display: grid; grid-template-columns: 296px minmax(0,1fr); gap: clamp(24px, 3vw, 40px); align-items: start; }
@media (max-width: 900px) { .demo-layout { grid-template-columns: 1fr; } }
.demo-side { display: grid; gap: 22px; }
@media (min-width: 901px) and (min-height: 900px) {
  .demo-side { position: sticky; top: calc(var(--nav-h) + 24px); }
}

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--line); padding-block: clamp(44px, 5vw, 64px) 32px; background: var(--bg-alt); }
.footer__grid { display: grid; grid-template-columns: 1.5fr repeat(3, 1fr); gap: 34px; }
@media (max-width: 860px) { .footer__grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .footer__grid { grid-template-columns: 1fr; } }
.footer h5 { font-size: .705rem; text-transform: uppercase; letter-spacing: .11em; color: var(--muted); font-weight: 600; margin-bottom: 14px; }
.footer nav a { display: block; padding: 5px 0; font-size: .885rem; color: var(--ink-2); transition: color .18s; }
.footer nav a:hover { color: var(--accent); }
.footer__base {
  margin-top: 42px; padding-top: 22px; border-top: 1px solid var(--line);
  display: flex; flex-wrap: wrap; gap: 12px 24px; justify-content: space-between; align-items: center;
  font-size: .795rem; color: var(--muted);
}
.footer__legal { max-width: 74ch; font-size: .765rem; color: var(--faint); margin-top: 18px; line-height: 1.55; }

/* ---------- CTA band ---------- */
.cta-band {
  background: var(--ink); color: var(--bg); border-radius: var(--radius-lg);
  padding: clamp(34px, 5vw, 60px); position: relative; overflow: hidden;
}
html[data-theme="dark"] .cta-band { background: var(--surface); border: 1px solid var(--line); color: var(--ink); }
.cta-band::after {
  content: ""; position: absolute; right: -12%; top: -60%; width: 480px; height: 480px; border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--accent) 30%, transparent), transparent 65%);
  pointer-events: none;
}
.cta-band h2 { max-width: 20ch; position: relative; }
.cta-band p { color: color-mix(in srgb, var(--bg) 74%, transparent); max-width: 56ch; margin-top: 1rem; position: relative; }
html[data-theme="dark"] .cta-band p { color: var(--muted); }
.cta-band .btn-row { margin-top: 2rem; position: relative; }
.cta-band .btn--primary { background: var(--bg); color: var(--ink); }
.cta-band .btn--primary:hover { background: var(--accent); color: #fff; }
html[data-theme="dark"] .cta-band .btn--primary { background: var(--ink); color: #0B0D0E; }
.cta-band .btn--ghost { border-color: color-mix(in srgb, var(--bg) 34%, transparent); color: var(--bg); }
.cta-band .btn--ghost:hover { background: color-mix(in srgb, var(--bg) 12%, transparent); border-color: var(--bg); }
html[data-theme="dark"] .cta-band .btn--ghost { border-color: var(--line-strong); color: var(--ink); }

/* ---------- Price card ---------- */
.price-card { display: flex; flex-direction: column; gap: 6px; }
.price { display: flex; align-items: baseline; gap: 10px; font-family: var(--serif); }
.price__now { font-size: 2.6rem; letter-spacing: -.03em; line-height: 1; }
.price__unit { font-size: .85rem; color: var(--muted); font-family: var(--sans); }

/* ---------- Page header ---------- */
.pagehead { padding-block: clamp(44px, 6vw, 82px) clamp(28px, 3.5vw, 44px); }
.pagehead h1 { font-size: clamp(2rem, 4.2vw, 3.1rem); max-width: 20ch; }
.pagehead .lede { margin-top: 1.2rem; }
.crumb { font-size: .8rem; color: var(--muted); margin-bottom: 1.1rem; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.crumb a:hover { color: var(--accent); }
.crumb span { color: var(--faint); }

/* ---------- Reveal ---------- */
html.js .reveal { opacity: 0; transform: translateY(14px); transition: opacity .6s cubic-bezier(.2,.7,.3,1), transform .6s cubic-bezier(.2,.7,.3,1); }
html.js .reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { html.js .reveal { opacity: 1; transform: none; } }

/* ---------- Misc ---------- */
.hr { height: 1px; background: var(--line); border: 0; }
.center { text-align: center; }
.mt-0 { margin-top: 0 !important; }
.mt-1 { margin-top: .5rem; } .mt-2 { margin-top: 1rem; } .mt-3 { margin-top: 1.6rem; } .mt-4 { margin-top: 2.4rem; }
.mb-2 { margin-bottom: 1rem; } .mb-3 { margin-bottom: 1.6rem; }
.flex { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.between { justify-content: space-between; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 200; background: var(--ink); color: var(--bg);
  padding: 10px 16px; border-radius: 8px; transition: top .2s; font-size: .88rem;
}
.skip-link:focus { top: 12px; }
.note { font-size: .78rem; color: var(--faint); }

/* ==========================================================================
   Question-led components
   ========================================================================== */

/* ---------- Question selector (homepage hero) ---------- */
.qpicker { display: grid; gap: 8px; }
.qpicker button {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left;
  padding: 14px 16px; border-radius: var(--radius-sm); cursor: pointer;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink-2);
  font-size: .95rem; font-weight: 500; line-height: 1.35;
  transition: border-color .18s, background .18s, color .18s, transform .18s, box-shadow .18s;
}
.qpicker button:hover { border-color: var(--line-strong); color: var(--ink); transform: translateX(2px); }
.qpicker button[aria-pressed="true"] {
  border-color: var(--accent); background: var(--accent-soft); color: var(--ink);
  font-weight: 600; box-shadow: var(--shadow-sm);
}
.qpicker__mark {
  width: 26px; height: 26px; border-radius: 8px; flex: none; display: grid; place-items: center;
  background: var(--surface-2); color: var(--muted); font-size: .72rem; font-weight: 700;
  border: 1px solid var(--line); transition: background .18s, color .18s, border-color .18s;
}
.qpicker button[aria-pressed="true"] .qpicker__mark {
  background: var(--accent); color: #fff; border-color: transparent;
}
html[data-theme="dark"] .qpicker button[aria-pressed="true"] .qpicker__mark { color: #07110E; }

/* ---------- Answer panel ---------- */
.answer { display: grid; gap: 18px; }
.answer__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.answer__q { font-family: var(--serif); font-size: 1.28rem; line-height: 1.28; letter-spacing: -.015em; }
.answer__take {
  border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--surface-2);
  padding: 15px 17px; font-size: .92rem; color: var(--ink-2); line-height: 1.55;
}
.answer__take strong { color: var(--ink); }
.answer__get {
  display: flex; align-items: flex-start; gap: 10px; font-size: .84rem; color: var(--muted);
  padding-top: 14px; border-top: 1px solid var(--line);
}
.answer__get b { color: var(--accent-ink); font-weight: 600; }
html[data-theme="dark"] .answer__get b { color: var(--accent); }

/* ---------- Tabs ---------- */
.tabs { display: flex; gap: 3px; padding: 4px; background: var(--surface-2);
  border: 1px solid var(--line); border-radius: 999px; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs button {
  border: none; background: transparent; cursor: pointer; white-space: nowrap;
  padding: 8px 16px; border-radius: 999px; font-size: .85rem; font-weight: 500; color: var(--muted);
  transition: background .18s, color .18s, box-shadow .18s;
}
.tabs button:hover { color: var(--ink); }
.tabs button[aria-selected="true"] {
  background: var(--surface); color: var(--ink); font-weight: 600; box-shadow: var(--shadow-sm);
}
.tabpanel[hidden] { display: none !important; }
.tabpanel { animation: fade .3s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .tabpanel { animation: none; } }

/* ---------- "What this covers / what it does not" ---------- */
.coverage { display: grid; grid-template-columns: minmax(0,.9fr) minmax(0,1.1fr); gap: 0; }
@media (max-width: 800px) { .coverage { grid-template-columns: 1fr; } }
.coverage__l, .coverage__r { padding: clamp(20px, 2.4vw, 28px); }
.coverage__l { background: var(--surface-2); border-right: 1px solid var(--line); }
@media (max-width: 800px) { .coverage__l { border-right: none; border-bottom: 1px solid var(--line); } }
.meter { display: flex; align-items: baseline; gap: 10px; margin-bottom: 6px; }
.meter__n { font-family: var(--serif); font-size: 2.6rem; line-height: 1; letter-spacing: -.03em; color: var(--accent-ink); }
html[data-theme="dark"] .meter__n { color: var(--accent); }
.meter__t { font-size: .87rem; color: var(--muted); }
.meter__bar { height: 6px; border-radius: 999px; background: var(--line); overflow: hidden; margin-top: 12px; }
.meter__fill { height: 100%; border-radius: 999px; background: var(--accent); }

/* ---------- Illustrations ---------- */
.illus { color: var(--accent); width: 100%; height: auto; display: block; }
.illus--muted { color: var(--line-strong); }
.figure {
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface-2);
  padding: clamp(18px, 3vw, 34px); display: grid; place-items: center;
}
.figure--flat { background: transparent; border: none; padding: 0; }

/* ---------- Price note ---------- */
.price__from { font-size: .95rem; color: var(--muted); font-family: var(--sans); align-self: flex-end; }

/* ---------- Compact FAQ inside a card ---------- */
.acc--tight summary { padding: 15px 34px 15px 0; font-size: 1.02rem; }
.acc--tight .acc__body { padding-bottom: 16px; font-size: .9rem; }

/* ==========================================================================
   Problem-led navigation
   ========================================================================== */

/* ---------- The one nav item that is the front door ---------- */
.nav__links a.nav__special {
  color: var(--accent-ink); font-weight: 650; background: var(--accent-soft);
  display: inline-flex; align-items: center; gap: 7px; padding-right: 8px;
}
html[data-theme="dark"] .nav__links a.nav__special { color: var(--accent); }
.nav__links a.nav__special:hover { background: var(--accent); color: #fff; }
html[data-theme="dark"] .nav__links a.nav__special:hover { color: #07110E; }
.nav__links a.nav__special.is-active { background: var(--accent); color: #fff; }
html[data-theme="dark"] .nav__links a.nav__special.is-active { color: #07110E; }
.nav__tag {
  font-size: .625rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase;
  background: var(--accent); color: #fff; padding: 3px 7px; border-radius: 999px; line-height: 1;
}
html[data-theme="dark"] .nav__tag { color: #07110E; }
.nav__links a.nav__special:hover .nav__tag,
.nav__links a.nav__special.is-active .nav__tag { background: var(--surface); color: var(--accent-ink); }
.drawer a.nav__special { color: var(--accent-ink); font-weight: 600; }
html[data-theme="dark"] .drawer a.nav__special { color: var(--accent); }

/* ---------- Numbered walkthrough ---------- */
.steps { display: grid; gap: 0; position: relative; }
.step {
  display: grid; grid-template-columns: 42px minmax(0, 1fr); gap: 20px;
  padding-bottom: 26px; position: relative;
}
.step:last-child { padding-bottom: 0; }
.step::before {
  content: ""; position: absolute; left: 20px; top: 38px; bottom: 0; width: 1px;
  background: var(--line);
}
.step:last-child::before { display: none; }
.step__n {
  width: 40px; height: 40px; border-radius: 50%; flex: none; display: grid; place-items: center;
  background: var(--surface); border: 1px solid var(--line-strong); color: var(--muted);
  font-family: var(--serif); font-size: 1.02rem; z-index: 1; position: relative;
}
.step--now .step__n { background: var(--accent); border-color: transparent; color: #fff; }
html[data-theme="dark"] .step--now .step__n { color: #07110E; }
.step--last .step__n { background: var(--ink); border-color: transparent; color: var(--bg); }
.step__b { padding-top: 6px; }
.step__l {
  font-size: .68rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: var(--faint); display: block; margin-bottom: 5px;
}
.step h4 { font-size: 1.06rem; margin-bottom: .45rem; }
.step p { font-size: .93rem; color: var(--ink-2); }
.step p + p { margin-top: .55rem; }
.step .checklist, .step .dashlist { margin-top: .7rem; }

/* ---------- Problem cards on the hub page ---------- */
.pcard {
  display: flex; flex-direction: column; gap: 9px; padding: 22px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  transition: border-color .2s, box-shadow .25s, transform .25s;
}
a.pcard:hover { border-color: var(--line-strong); box-shadow: var(--shadow); transform: translateY(-2px); }
.pcard > .badge { align-self: flex-start; }
.pcard__p { font-family: var(--serif); font-size: 1.12rem; line-height: 1.32; letter-spacing: -.012em; }
.pcard__a { font-size: .875rem; color: var(--muted); flex: 1; }
.pcard__f { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 4px; }
.pcard--worked { border-color: var(--accent); background: var(--accent-soft); }
.pcard--worked .pcard__a { color: var(--ink-2); }

/* ---------- Theme band on the hub page ---------- */
.band-head {
  display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap;
  padding-bottom: 14px; margin-bottom: 22px; border-bottom: 1px solid var(--line);
}
.band-head h2 { font-size: clamp(1.3rem, 2vw, 1.65rem); }
.band-head p { font-size: .9rem; color: var(--muted); margin-left: auto; max-width: 46ch; }
@media (max-width: 760px) { .band-head p { margin-left: 0; } }

/* ---------- Three-step funnel diagram ---------- */
.funnel { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 0; }
@media (max-width: 780px) { .funnel { grid-template-columns: 1fr; } }
.funnel__s { padding: clamp(22px, 3vw, 32px); position: relative; }
.funnel__s + .funnel__s { border-left: 1px solid var(--line); }
@media (max-width: 780px) {
  .funnel__s + .funnel__s { border-left: none; border-top: 1px solid var(--line); }
}
.funnel__n {
  font-family: var(--serif); font-size: 2.1rem; line-height: 1; color: var(--accent);
  letter-spacing: -.03em; display: block; margin-bottom: 12px;
}
.funnel__s h4 { font-size: 1.05rem; margin-bottom: .4rem; }
.funnel__s p { font-size: .9rem; color: var(--muted); }
