/* Thrivantix site styles. One file, no inline styles anywhere (the CSP allows none).
   Theme: "Warm Ledger". Light is the brand's home; dark is a warm charcoal counterpart.
   Coral is the BRAND color only. Red means something is wrong, green means money in or done,
   teal is neutral data, amber is caution.
   Tokens are declared three times on purpose: light on :root, dark for the OS setting when the
   visitor has not chosen (no-JS safe), and dark for the explicit choice. tests/theme.test.mjs
   keeps the two dark blocks identical, and tests/contrast.test.mjs checks AA on both themes. */

@font-face { font-family: 'Figtree'; font-style: normal; font-weight: 400 900; font-display: swap; src: url('/fonts/Figtree-variable.woff2') format('woff2'); }
@font-face { font-family: 'IBM Plex Mono'; font-style: normal; font-weight: 400; font-display: swap; src: url('/fonts/IBMPlexMono-400.woff2') format('woff2'); }
@font-face { font-family: 'IBM Plex Mono'; font-style: normal; font-weight: 500; font-display: swap; src: url('/fonts/IBMPlexMono-500.woff2') format('woff2'); }

:root {
  --ground: #F7F5F3; --surface: #FFFFFF; --surface-2: #F0EDEA; --rule: #E7E3DF; --rule-soft: #F0ECE8;
  --ink: #1C1A19; --ink-mid: #4A4744; --ink-soft: #6B6661;
  --accent: #F4573C; --accent-fill: #D63E24; --accent-fill-hover: #BE3219; --accent-text: #C2381C; --accent-soft: #FDEAE5; --on-accent: #FFFFFF;
  --positive: #12875A; --positive-text: #0C6A46; --positive-soft: #DCF0E5;
  --negative: #E0453E; --negative-text: #B42B25; --negative-soft: #FBE0DE;
  --info: #1596B8; --info-text: #0D6C86; --info-soft: #DDF0F6;
  --amber: #F0B429; --amber-text: #7D5600; --amber-soft: #FDF0D0;
  --shadow: 0 1px 2px rgba(28,26,25,.04), 0 8px 24px -16px rgba(28,26,25,.14);
  --shadow-lift: 0 2px 4px rgba(28,26,25,.05), 0 24px 48px -24px rgba(28,26,25,.22);
  --header-bg: rgba(247,245,243,.86);
  --tile: #0E1A33;

  --font: 'Figtree', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  --radius: 10px; --radius-lg: 16px;
  --container: 1120px; --gutter: clamp(20px, 4vw, 40px);
  /* Vertical rhythm: every section break uses these. */
  --space-section: clamp(40px, 5vw, 68px); --space-section-tight: clamp(24px, 3.2vw, 40px); --space-head: clamp(22px, 2.8vw, 34px); --space-block: clamp(22px, 3vw, 36px);
  --ease: cubic-bezier(.2, .7, .2, 1);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ground: #191614; --surface: #231F1D; --surface-2: #2C2724; --rule: #3B3431; --rule-soft: #2F2A27;
    --ink: #F5F0EB; --ink-mid: #D3CBC4; --ink-soft: #A69C94;
    --accent: #F4573C; --accent-fill: #D63E24; --accent-fill-hover: #BE3219; --accent-text: #FF917A; --accent-soft: #3B221C; --on-accent: #FFFFFF;
    --positive: #3DBB85; --positive-text: #6AD3A4; --positive-soft: #18332A;
    --negative: #F0655E; --negative-text: #F58A84; --negative-soft: #3F201E;
    --info: #45B7D6; --info-text: #74CCE4; --info-soft: #15313B;
    --amber: #F0B429; --amber-text: #F3C557; --amber-soft: #3A2E13;
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 10px 28px -18px rgba(0,0,0,.7);
    --shadow-lift: 0 2px 4px rgba(0,0,0,.3), 0 28px 56px -24px rgba(0,0,0,.8);
    --header-bg: rgba(25,22,20,.84);
    --tile: #0E1A33;
  }
}
:root[data-theme="dark"] {
    --ground: #191614; --surface: #231F1D; --surface-2: #2C2724; --rule: #3B3431; --rule-soft: #2F2A27;
    --ink: #F5F0EB; --ink-mid: #D3CBC4; --ink-soft: #A69C94;
    --accent: #F4573C; --accent-fill: #D63E24; --accent-fill-hover: #BE3219; --accent-text: #FF917A; --accent-soft: #3B221C; --on-accent: #FFFFFF;
    --positive: #3DBB85; --positive-text: #6AD3A4; --positive-soft: #18332A;
    --negative: #F0655E; --negative-text: #F58A84; --negative-soft: #3F201E;
    --info: #45B7D6; --info-text: #74CCE4; --info-soft: #15313B;
    --amber: #F0B429; --amber-text: #F3C557; --amber-soft: #3A2E13;
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 10px 28px -18px rgba(0,0,0,.7);
    --shadow-lift: 0 2px 4px rgba(0,0,0,.3), 0 28px 56px -24px rgba(0,0,0,.8);
    --header-bg: rgba(25,22,20,.84);
    --tile: #0E1A33;
}

/* ---- Base ------------------------------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 88px; }
body { margin: 0; background: var(--ground); color: var(--ink-mid); font-family: var(--font); font-size: 17px; line-height: 1.6;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; overflow-x: hidden; }
h1, h2, h3, h4 { color: var(--ink); font-weight: 700; line-height: 1.12; letter-spacing: -.022em; margin: 0; text-wrap: balance; }
h1 { font-size: clamp(2.35rem, 1.2rem + 4.6vw, 4.4rem); font-weight: 800; letter-spacing: -.035em; line-height: 1.02; }
h2 { font-size: clamp(1.75rem, 1.2rem + 2vw, 2.6rem); letter-spacing: -.028em; }
h3 { font-size: 1.2rem; letter-spacing: -.015em; line-height: 1.25; }
h4 { font-size: 1rem; letter-spacing: -.005em; line-height: 1.3; }
p { margin: 0; text-wrap: pretty; }
a { color: var(--accent-text); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
img, svg { max-width: 100%; }
img { height: auto; display: block; }
strong { color: var(--ink); font-weight: 600; }
ul, ol { margin: 0; padding: 0; list-style: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
::selection { background: var(--accent); color: #fff; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--ink); color: var(--ground); padding: 10px 14px; border-radius: 8px; font-weight: 600; text-decoration: none; transition: top .15s var(--ease); }
.skip:focus { top: 12px; }

.container { width: 100%; max-width: calc(var(--container) + 2 * var(--gutter)); margin-inline: auto; padding-inline: var(--gutter); }
.narrow { max-width: 760px; }
.section { padding-block: var(--space-section); }
.section-tight { padding-block: var(--space-section-tight); }
.section-tight + .section:not(.section-alt) { padding-top: var(--space-section-tight); }
.section-alt { background: var(--surface-2); border-block: 1px solid var(--rule); }
.section-head { max-width: 720px; margin-bottom: var(--space-head); }
.section-head h2 + p, .section-head .eyebrow + h2 { margin-top: 14px; }
.section-head p { font-size: 1.12rem; }
.section-head p.eyebrow { font-size: .76rem; }
.stack > * + * { margin-top: 16px; }
.stack-lg > * + * { margin-top: 28px; }
.center { text-align: center; margin-inline: auto; }
.muted { color: var(--ink-soft); }
.mt-md { margin-top: 20px; } .mt-lg { margin-top: var(--space-block); }
.mark-tile { width: 36px; height: 36px; flex: none; }
.small { font-size: .9rem; }

/* The eyebrow carries the wordmark's long-i bar: a short coral rule, then a mono label. */
.eyebrow { display: flex; align-items: center; gap: 10px; font-family: var(--mono); font-size: .76rem; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-soft); }
.eyebrow::before { content: ""; flex: none; width: 22px; height: 3px; border-radius: 1px; background: var(--accent); }
.center .eyebrow, .eyebrow.center { justify-content: center; }
.lede { font-size: clamp(1.1rem, 1rem + .5vw, 1.3rem); line-height: 1.5; color: var(--ink-mid); }
.fig, .num, time, .mono { font-family: var(--mono); font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.pos { color: var(--positive-text); } .neg { color: var(--negative-text); } .inf { color: var(--info-text); } .amb { color: var(--amber-text); }

/* ---- Buttons and links ----------------------------------------------------------------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 12px 22px; border: 1px solid transparent; border-radius: 999px;
  font: 600 1rem/1 var(--font); letter-spacing: -.005em; text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background-color .18s var(--ease), border-color .18s var(--ease), transform .18s var(--ease), box-shadow .18s var(--ease); }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent-fill); color: var(--on-accent); box-shadow: 0 1px 0 rgba(255,255,255,.18) inset, 0 6px 16px -8px rgba(214,62,36,.7); }
.btn-primary:hover { background: var(--accent-fill-hover); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--rule); }
.btn-ghost:hover { background: var(--surface); border-color: var(--ink-soft); }
.btn-sm { min-height: 38px; padding: 8px 16px; font-size: .92rem; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.textlink { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--rule); padding-bottom: 2px; transition: border-color .18s var(--ease), gap .18s var(--ease); }
.textlink::after { content: "\2192"; color: var(--accent-text); font-family: var(--mono); }
.textlink:hover { border-color: var(--accent); gap: 10px; }

/* ---- Header ---------------------------------------------------------------------------- */
.site-header { position: sticky; top: 0; z-index: 50; background: var(--header-bg); -webkit-backdrop-filter: saturate(1.4) blur(14px); backdrop-filter: saturate(1.4) blur(14px); border-bottom: 1px solid var(--rule); }
.header-row { display: flex; align-items: center; gap: 12px 28px; min-height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 9px; text-decoration: none; color: var(--ink); flex: none; border-radius: 6px; }
.brand-mark { width: 22px; height: 25px; flex: none; }
.brand-mark .m-a { fill: #F98C74; stroke: #F98C74; } .brand-mark .m-b { fill: #F4573C; stroke: #F4573C; } .brand-mark .m-c { stroke: #D63E24; }
.wordmark { font-family: var(--font); font-weight: 800; font-size: 1.32rem; letter-spacing: -.03em; color: var(--ink); white-space: nowrap; line-height: 1; }
.wordmark .wm-i { position: relative; display: inline-block; }
.wordmark .wm-i::after { content: ""; position: absolute; left: 50%; transform: translateX(-50%); background: var(--accent); }
.wordmark .wm-long::after { top: .15em; width: .34em; height: max(.085em, 2px); border-radius: .02em; }
.wordmark .wm-dot::after { top: .11em; width: .19em; height: .19em; border-radius: 50%; }
.brand-desc { font-family: var(--mono); font-size: .68rem; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-soft); padding-left: 10px; margin-left: 2px; border-left: 1px solid var(--rule); line-height: 1.6; }
.nav { display: flex; gap: 2px; margin-left: auto; }
.nav a { padding: 8px 12px; border-radius: 8px; color: var(--ink-mid); font-weight: 500; font-size: .95rem; text-decoration: none; transition: background-color .15s var(--ease), color .15s var(--ease); }
.nav a:hover { background: var(--surface-2); color: var(--ink); }
.nav a[aria-current="page"] { color: var(--ink); font-weight: 600; box-shadow: inset 0 -2px 0 var(--accent); border-radius: 8px 8px 0 0; }
.header-tools { display: flex; align-items: center; gap: 12px; flex: none; }
.theme-switch { display: inline-flex; margin: 0; padding: 3px; border: 1px solid var(--rule); border-radius: 999px; background: var(--surface); min-width: 0; }
.theme-switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.theme-switch label { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 999px; color: var(--ink-soft); cursor: pointer; transition: background-color .15s var(--ease), color .15s var(--ease); }
.theme-switch label svg { width: 15px; height: 15px; }
.theme-switch label:hover { color: var(--ink); }
.theme-switch input:checked + label { background: var(--surface-2); color: var(--ink); box-shadow: inset 0 0 0 1px var(--rule); }
.theme-switch input:focus-visible + label { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (max-width: 1020px) { .brand-desc { display: none; } }
@media (max-width: 860px) {
  .header-row { flex-wrap: wrap; padding-top: 10px; gap: 6px 12px; }
  .header-tools { margin-left: auto; }
  .nav { order: 3; width: calc(100% + 2 * var(--gutter)); margin: 0 calc(-1 * var(--gutter)); padding: 0 calc(var(--gutter) - 12px) 6px; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .nav::-webkit-scrollbar { display: none; }
  .nav a { flex: none; padding: 10px 12px; }
  html { scroll-padding-top: 120px; }
}
@media (max-width: 400px) { .header-tools .btn { display: none; } }
@media (max-width: 420px) { .wordmark { font-size: 1.18rem; } .header-tools { gap: 8px; } .header-tools .btn-sm { padding-inline: 12px; } .theme-switch label { width: 27px; height: 27px; } }

/* ---- Hero ------------------------------------------------------------------------------ */
.hero { position: relative; padding-block: clamp(28px, 4vw, 52px) 0; overflow: hidden; }
/* Ledger paper: faint ruled lines that fade out, behind the hero only. */
.hero::before { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image: repeating-linear-gradient(to bottom, transparent 0 39px, var(--rule) 39px 40px);
  -webkit-mask-image: radial-gradient(120% 90% at 85% 0%, #000 0%, transparent 62%); mask-image: radial-gradient(120% 90% at 85% 0%, #000 0%, transparent 62%); opacity: .8; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.02fr) minmax(0, .98fr); gap: clamp(32px, 5vw, 72px); align-items: center; }
.hero-copy > * + * { margin-top: 22px; }
.hero-copy h1 em { font-style: normal; color: var(--accent-text); }
.hero-copy .lede { max-width: 34em; }
.hero-note { display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: .9rem; color: var(--ink-soft); }
.hero-note li { display: inline-flex; align-items: center; gap: 8px; }
.hero-note li::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); flex: none; }
@media (max-width: 920px) { .hero-grid { grid-template-columns: 1fr; } }
/* "There is more" cue under the hero: a real link to the next section, with a chevron that nudges down. */
.scroll-cue { display: flex; width: fit-content; margin: clamp(20px, 3vw, 36px) auto 0; padding: 10px 16px 14px; align-items: center; gap: 8px; flex-direction: column; color: var(--ink-mid); font-weight: 600; font-size: .95rem; text-decoration: none; border-radius: 12px; transition: color .18s var(--ease); }
.scroll-cue svg { width: 22px; height: 22px; color: var(--accent-text); }
.scroll-cue:hover { color: var(--ink); }
.rules { counter-reset: r; }
.rules > li { counter-increment: r; position: relative; padding: 12px 0 12px 40px; border-top: 1px solid var(--rule-soft); }
.rules > li:first-child { border-top: 0; }
.rules > li::before { content: counter(r, decimal-leading-zero); position: absolute; left: 0; top: 14px; font-family: var(--mono); font-size: .8rem; color: var(--accent-text); }
code { font-family: var(--mono); font-size: .9em; background: var(--surface-2); border: 1px solid var(--rule); border-radius: 5px; padding: 1px 6px; color: var(--ink); white-space: nowrap; }
q { color: var(--ink); font-weight: 600; }
.versus-policy .versus-row { grid-template-columns: 240px minmax(0, 1fr); }
.versus-policy .versus-head .versus-what { color: var(--ink-soft); }
.versus-policy .versus-head .versus-with { grid-column: 2; }

.page-hero { padding-block: clamp(28px, 4vw, 52px) var(--space-section-tight); position: relative; overflow: hidden; }
.page-hero::before { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image: repeating-linear-gradient(to bottom, transparent 0 39px, var(--rule) 39px 40px);
  -webkit-mask-image: radial-gradient(100% 100% at 100% 0%, #000 0%, transparent 55%); mask-image: radial-gradient(100% 100% at 100% 0%, #000 0%, transparent 55%); opacity: .7; }
.page-hero h1 { font-size: clamp(2.1rem, 1.2rem + 3.6vw, 3.6rem); max-width: 16em; }
.page-hero .lede { max-width: 40em; }
.page-hero > .container > * + * { margin-top: 20px; }
.crew-id { display: flex; align-items: center; gap: 14px; }
.crew-id .crew-icon { width: 56px; height: 56px; }
.crew-id-name { font-weight: 700; color: var(--ink); font-size: 1.15rem; letter-spacing: -.015em; line-height: 1.2; }
.crew-id-role { font-family: var(--mono); font-size: .76rem; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-soft); }

/* ---- Cards, chips, grids --------------------------------------------------------------- */
.card { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); box-shadow: var(--shadow); padding: clamp(20px, 2.4vw, 28px); }
.card > * + * { margin-top: 12px; }
.card h3 + p { margin-top: 8px; }
a.card { display: block; color: inherit; text-decoration: none; transition: transform .25s var(--ease), box-shadow .25s var(--ease), border-color .25s var(--ease); }
a.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lift); border-color: var(--ink-soft); }
.grid-2, .grid-3, .grid-4 { display: grid; gap: clamp(16px, 2vw, 24px); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 980px) { .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 72px); align-items: center; }
.split-top { align-items: start; }
.split > .split-copy > * + * { margin-top: 16px; }
@media (min-width: 861px) { .split-rev > :first-child { order: 2; } }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }

.chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-family: var(--mono); font-size: .72rem; font-weight: 500; letter-spacing: .03em; line-height: 1.5; white-space: nowrap; background: var(--surface-2); color: var(--ink-mid); border: 1px solid var(--rule); }
.chip::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex: none; }
.chip-live { background: var(--positive-soft); color: var(--positive-text); border-color: transparent; }
.chip-partial { background: var(--amber-soft); color: var(--amber-text); border-color: transparent; }
.chip-planned { background: var(--surface-2); color: var(--ink-soft); }
.chip-info { background: var(--info-soft); color: var(--info-text); border-color: transparent; }
.chip-neg { background: var(--negative-soft); color: var(--negative-text); border-color: transparent; }
.chip-demo { background: var(--accent-soft); color: var(--accent-text); border-color: transparent; }
.chip-plain::before { display: none; }

/* ---- Crew ------------------------------------------------------------------------------ */
.crew-icon { width: 48px; height: 48px; border-radius: 23%; flex: none; box-shadow: 0 6px 14px -8px rgba(14,26,51,.7); }
.crew-card { display: flex; flex-direction: column; gap: 14px; position: relative; }
.crew-card > * + * { margin-top: 0; }
.crew-card .crew-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.crew-card h3 { font-size: 1.45rem; letter-spacing: -.025em; }
.crew-card .crew-job { color: var(--ink); font-weight: 600; }
.crew-card .crew-more { margin-top: auto; padding-top: 6px; font-weight: 600; color: var(--ink); display: inline-flex; gap: 6px; align-items: center; }
.crew-card .crew-more::after { content: "\2192"; font-family: var(--mono); color: var(--accent-text); transition: transform .2s var(--ease); }
a.crew-card:hover .crew-more::after { transform: translateX(4px); }

/* ---- Product mock: an illustration of the extension, built from HTML so it themes ------- */
.mock { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius-lg); box-shadow: var(--shadow-lift); overflow: hidden; margin: 0; font-size: .92rem; }
.mock-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--rule); background: var(--ground); }
.mock-title { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; color: var(--ink); letter-spacing: -.015em; min-width: 0; }
.mock-title .crew-icon { width: 24px; height: 24px; box-shadow: none; }
.mock-crumb { color: var(--ink-soft); font-weight: 500; }
.mock-body { padding: 16px; }
.mock-body > * + * { margin-top: 12px; }
.mock-h { font-family: var(--mono); font-size: .7rem; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-soft); }
.mock-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 14px; align-items: center; padding: 12px 0; border-top: 1px solid var(--rule-soft); }
.mock-row:first-child { border-top: 0; padding-top: 0; }
.mock-row:last-child { padding-bottom: 0; }
.mock-row-main { min-width: 0; }
.mock-row-title { color: var(--ink); font-weight: 600; line-height: 1.35; }
.mock-row-sub { color: var(--ink-soft); font-size: .84rem; line-height: 1.45; }
.mock-row-fig { font-family: var(--mono); font-variant-numeric: tabular-nums; color: var(--ink); font-weight: 500; text-align: right; white-space: nowrap; }
.mock-btn { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 8px; border: 1px solid var(--rule); background: var(--surface); color: var(--ink); font-weight: 600; font-size: .82rem; white-space: nowrap; }
.mock-btn-primary { background: var(--accent-fill); border-color: transparent; color: var(--on-accent); }
.mock-foot { padding: 10px 16px; border-top: 1px solid var(--rule); background: var(--ground); color: var(--ink-soft); font-size: .8rem; display: flex; gap: 8px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
figure.mock-wrap { margin: 0; }
.mock-wrap figcaption, .mock-caption { margin-top: 12px; font-size: .82rem; color: var(--ink-soft); }
@media (max-width: 420px) { .mock-row { grid-template-columns: 1fr; } .mock-row-fig { text-align: left; } }

/* Home doors inside the hero mock */
.doors { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.door { border: 1px solid var(--rule); border-radius: var(--radius); padding: 14px; background: var(--surface); display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.door-top { display: flex; align-items: center; gap: 9px; font-weight: 700; color: var(--ink); letter-spacing: -.015em; }
.door-top .crew-icon { width: 28px; height: 28px; box-shadow: none; }
.door-fig { font-family: var(--mono); font-variant-numeric: tabular-nums; font-size: 1.35rem; font-weight: 500; color: var(--ink); letter-spacing: -.03em; line-height: 1.1; }
.door-fig.pos { color: var(--positive-text); }
.door-line { color: var(--ink-soft); font-size: .82rem; line-height: 1.4; }
.door .meter { margin-top: 2px; }
@media (max-width: 400px) { .doors { grid-template-columns: 1fr; } }

/* Meter (storage thermometer and the like). Width comes from a w-NN class: no inline styles. */
.meter { height: 8px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.meter-fill { display: block; height: 100%; border-radius: inherit; background: var(--info); }
.meter-ok .meter-fill { background: var(--positive); } .meter-amber .meter-fill { background: var(--amber); } .meter-red .meter-fill { background: var(--negative); }
.w-5{width:5%}.w-10{width:10%}.w-15{width:15%}.w-20{width:20%}.w-25{width:25%}.w-30{width:30%}.w-35{width:35%}.w-40{width:40%}.w-45{width:45%}.w-50{width:50%}
.w-55{width:55%}.w-60{width:60%}.w-65{width:65%}.w-70{width:70%}.w-75{width:75%}.w-68{width:68%}.w-78{width:78%}.w-80{width:80%}.w-85{width:85%}.w-90{width:90%}.w-95{width:95%}.w-100{width:100%}

.mock-row .meter, .mock-body > .meter { margin-top: 8px; max-width: 320px; }
.mock-body > .meter { margin-top: 6px; }
.card h3 .chip, .status-col h3 .chip { vertical-align: middle; margin-left: 6px; }
.log-h { font-size: 1.25rem; letter-spacing: -.018em; }
.ladder .step-n, .timeline .step-n { display: block; font-size: .72rem; color: var(--ink-soft); line-height: 1.3; }
.timeline li.is-wait { border-style: dashed; background: transparent; } .timeline li.is-wait .step-v { color: var(--ink-soft); }
.mock-drop { border: 1.5px dashed var(--rule); border-radius: 8px; padding: 10px 12px; color: var(--ink-soft); font-size: .84rem; text-align: center; }

/* Price ladder (Flo) and order timeline (Piper): horizontal steps that wrap */
.ladder, .timeline { display: flex; flex-wrap: wrap; gap: 8px; counter-reset: step; }
.ladder li, .timeline li { flex: 1 1 86px; border: 1px solid var(--rule); border-radius: 8px; padding: 8px 10px; background: var(--surface); min-width: 0; }
.ladder .step-k, .timeline .step-k { display: block; font-family: var(--mono); font-size: .68rem; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-soft); }
.ladder .step-v, .timeline .step-v { display: block; font-family: var(--mono); font-variant-numeric: tabular-nums; color: var(--ink); font-weight: 500; }
.ladder li.is-now, .timeline li.is-now { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.ladder li.is-done, .timeline li.is-done { background: var(--surface-2); }
.ladder li.is-done .step-v, .timeline li.is-done .step-v { color: var(--ink-mid); }
.timeline li.is-done .step-k::after { content: " \2713"; color: var(--positive-text); }

/* Simple ledger table */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--rule); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
table.ledger { width: 100%; border-collapse: collapse; font-size: .92rem; min-width: 520px; }
table.ledger th, table.ledger td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--rule-soft); vertical-align: top; }
table.ledger thead th { font-family: var(--mono); font-size: .7rem; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-soft); font-weight: 500; background: var(--ground); border-bottom: 1px solid var(--rule); }
table.ledger tbody tr:last-child td, table.ledger tbody tr:last-child th { border-bottom: 0; }
table.ledger tbody th { color: var(--ink); font-weight: 600; }
table.ledger td.num, table.ledger th.num { text-align: right; white-space: nowrap; }

/* ---- Lists ----------------------------------------------------------------------------- */
.ticks > li, .dots > li, .plans > li { position: relative; padding-left: 28px; }
.ticks > li + li, .dots > li + li, .plans > li + li { margin-top: 10px; }
.ticks > li::before { content: ""; position: absolute; left: 2px; top: .42em; width: 14px; height: 8px; border-left: 2px solid var(--positive); border-bottom: 2px solid var(--positive); transform: rotate(-45deg) scale(.8); transform-origin: left center; }
.dots > li::before { content: ""; position: absolute; left: 6px; top: .62em; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.plans > li::before { content: ""; position: absolute; left: 5px; top: .56em; width: 9px; height: 9px; border-radius: 50%; border: 1.5px solid var(--ink-soft); }
.steps { counter-reset: s; display: grid; gap: clamp(16px, 2vw, 24px); }
.steps.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .steps.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.steps > li { counter-increment: s; position: relative; padding-top: 44px; }
.steps > li::before { content: counter(s, decimal-leading-zero); position: absolute; top: 0; left: 0; font-family: var(--mono); font-size: .82rem; font-weight: 500; color: var(--accent-text); letter-spacing: .04em; }
.steps > li::after { content: ""; position: absolute; top: 28px; left: 0; right: 0; height: 1px; background: var(--rule); }
.steps > li > * + * { margin-top: 8px; }
@media (max-width: 980px) { .steps.grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .steps.grid-3, .steps.grid-4 { grid-template-columns: 1fr; } }

/* Today vs planned */
.status-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(16px, 2vw, 24px); }
.status-col > h3 { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
@media (max-width: 720px) { .status-cols { grid-template-columns: 1fr; } }
.today-row { display: grid; grid-template-columns: 180px minmax(0, 1fr) minmax(0, 1fr); gap: 16px 28px; padding: 24px 0; border-top: 1px solid var(--rule); }
.today-row:last-child { border-bottom: 1px solid var(--rule); }
.today-who { display: flex; gap: 12px; align-items: flex-start; }
.today-who .crew-icon { width: 36px; height: 36px; }
.today-who strong { display: block; font-size: 1.05rem; line-height: 1.2; margin-bottom: 4px; }
.today-row h4 { font-family: var(--mono); font-weight: 500; font-size: .7rem; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-soft); margin-bottom: 10px; }
.today-row ul { font-size: .95rem; }
@media (max-width: 860px) { .today-row { grid-template-columns: 1fr; gap: 16px; } }

/* ---- Principle band, callouts, quotes --------------------------------------------------- */
.principle { padding: 24px 0 0; border-top: 2px solid var(--ink); }
.principle > * + * { margin-top: 8px; }
.principle .principle-n { font-family: var(--mono); font-size: .74rem; letter-spacing: .08em; color: var(--ink-soft); text-transform: uppercase; }
.callout { border: 1px solid var(--rule); border-left: 3px solid var(--accent); border-radius: var(--radius); background: var(--surface); padding: 20px 24px; box-shadow: var(--shadow); }
.callout > * + * { margin-top: 8px; }
.callout-info { border-left-color: var(--info); } .callout-amber { border-left-color: var(--amber); } .callout-pos { border-left-color: var(--positive); }
.quote { font-size: clamp(1.4rem, 1rem + 1.8vw, 2.2rem); line-height: 1.22; letter-spacing: -.025em; font-weight: 700; color: var(--ink); text-wrap: balance; }
.quote em { font-style: normal; color: var(--accent-text); }

/* Pain cards and the without/with comparison */
.pain { border-top: 3px solid var(--negative); }
.pain-k { font-family: var(--mono); font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: var(--negative-text); }
.versus { border: 1px solid var(--rule); border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow); overflow: hidden; }
.versus-row { display: grid; grid-template-columns: 190px minmax(0, 1fr) minmax(0, 1fr); border-top: 1px solid var(--rule-soft); }
.versus-row > span { padding: 16px 22px; }
.versus-head { border-top: 0; background: var(--ground); border-bottom: 1px solid var(--rule); font-family: var(--mono); font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; }
.versus-head .versus-without { grid-column: 2; color: var(--ink-soft); }
.versus-head .versus-with { color: var(--positive-text); }
.versus-what { font-weight: 600; color: var(--ink); }
.versus-row:not(.versus-head) .versus-without { color: var(--ink-soft); }
.versus-row:not(.versus-head) .versus-with { color: var(--ink); font-weight: 500; position: relative; padding-left: 50px; background: linear-gradient(to right, var(--positive-soft), transparent 70%); }
.versus-row:not(.versus-head) .versus-with::before { content: ""; position: absolute; left: 22px; top: 1.45em; width: 14px; height: 8px; border-left: 2px solid var(--positive); border-bottom: 2px solid var(--positive); transform: rotate(-45deg) scale(.8); transform-origin: left center; }
.versus .chip { margin-left: 4px; vertical-align: middle; }
@media (max-width: 760px) {
  .versus-head { display: none; }
  .versus-row { grid-template-columns: 1fr; padding: 14px 0; }
  .versus-row > span { padding: 4px 18px; }
  .versus-row:not(.versus-head) .versus-without::before { content: "Without: "; font-family: var(--mono); font-size: .72rem; letter-spacing: .06em; text-transform: uppercase; }
  .versus-row:not(.versus-head) .versus-with { padding: 8px 18px 8px 46px; margin-top: 6px; }
  .versus-row:not(.versus-head) .versus-with::before { left: 18px; top: 1em; }
}
.eyebrow .chip { margin-left: 4px; text-transform: none; }

/* The three-beat line: reads, prepares, you click */
.beats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border: 1px solid var(--rule); border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow); overflow: hidden; }
.beat { padding: clamp(20px, 2.6vw, 32px); position: relative; }
.beat + .beat { border-left: 1px solid var(--rule); }
.beat > * + * { margin-top: 8px; }
.beat-k { font-family: var(--mono); font-size: .74rem; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-soft); }
.beat-you { background: var(--accent-soft); }
.beat-you .beat-k { color: var(--accent-text); }
@media (max-width: 760px) { .beats { grid-template-columns: 1fr; } .beat + .beat { border-left: 0; border-top: 1px solid var(--rule); } }

/* Shared memory diagram: four nodes joined by labeled hand-offs */
.flow { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; position: relative; }
.flow-node { position: relative; padding: 0 16px 0 0; }
.flow-node + .flow-node { padding-left: 16px; border-left: 1px dashed var(--rule); }
.flow-node > * + * { margin-top: 10px; }
.flow-node .crew-icon { width: 44px; height: 44px; }
.flow-node h3 { font-size: 1.1rem; }
.flow-node p { font-size: .95rem; }
.flow-gives { font-family: var(--mono); font-size: .74rem; color: var(--ink-soft); letter-spacing: .02em; line-height: 1.5; padding-top: 10px; border-top: 1px solid var(--rule); }
.flow-gives b { color: var(--accent-text); font-weight: 500; }
@media (max-width: 900px) { .flow { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 0; } .flow-node:nth-child(3) { padding-left: 0; border-left: 0; } }
@media (max-width: 560px) { .flow { grid-template-columns: 1fr; } .flow-node + .flow-node { padding-left: 0; border-left: 0; padding-top: 24px; border-top: 1px dashed var(--rule); } .flow-node { padding-right: 0; } }

/* ---- FAQ and prose --------------------------------------------------------------------- */
.faq { border-top: 1px solid var(--rule); }
.faq details { border-bottom: 1px solid var(--rule); }
.faq summary { list-style: none; cursor: pointer; padding: 20px 44px 20px 0; position: relative; font-weight: 600; font-size: 1.1rem; color: var(--ink); letter-spacing: -.012em; line-height: 1.35; transition: color .15s var(--ease); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::before, .faq summary::after { content: ""; position: absolute; right: 8px; top: 50%; width: 14px; height: 2px; margin-top: -1px; background: var(--accent); border-radius: 1px; transition: transform .25s var(--ease); }
.faq summary::after { transform: rotate(90deg); }
.faq details[open] summary::after { transform: rotate(0deg); }
.faq summary:hover { color: var(--accent-text); }
.faq .faq-a { padding: 0 44px 22px 0; max-width: 66ch; }
.faq .faq-a > * + * { margin-top: 12px; }
.faq-group + .faq-group { margin-top: var(--space-block); }
.faq-group > h2 { font-size: 1.5rem; margin-bottom: 16px; }
.prose { max-width: 70ch; }
.prose > * + * { margin-top: 16px; }
.prose h2 { font-size: 1.6rem; margin-top: 36px; }
.prose h3 { margin-top: 28px; }
.prose ul { list-style: none; }
.prose ul > li { position: relative; padding-left: 26px; }
.prose ul > li + li { margin-top: 8px; }
.prose ul > li::before { content: ""; position: absolute; left: 6px; top: .62em; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.log-entry { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 12px 32px; padding: 28px 0; border-top: 1px solid var(--rule); }
.log-entry:last-child { border-bottom: 1px solid var(--rule); }
.log-entry time { color: var(--ink-soft); font-size: .88rem; }
.log-entry > div > * + * { margin-top: 10px; }
@media (max-width: 640px) { .log-entry { grid-template-columns: 1fr; } }

/* ---- Waitlist band --------------------------------------------------------------------- */
.cta-band { background: var(--surface-2); border-top: 1px solid var(--rule); }
.cta-inner { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: clamp(28px, 5vw, 72px); align-items: center; }
.cta-inner > div > * + * { margin-top: 14px; }
.waitlist { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius-lg); box-shadow: var(--shadow); padding: clamp(20px, 2.6vw, 28px); }
.waitlist label { display: block; font-family: var(--mono); font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-soft); margin-bottom: 8px; }
.waitlist-row { display: flex; gap: 10px; }
.waitlist input { flex: 1; min-width: 0; min-height: 48px; padding: 10px 16px; border-radius: 999px; border: 1px solid var(--rule); background: var(--ground); color: var(--ink); font: 500 1rem var(--font); transition: border-color .15s var(--ease), box-shadow .15s var(--ease); }
.waitlist input::placeholder { color: var(--ink-soft); opacity: 1; }
.waitlist input:hover { border-color: var(--ink-soft); }
.waitlist input:focus-visible { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.waitlist-msg { margin-top: 12px; font-weight: 600; font-size: .95rem; min-height: 0; }
.waitlist-msg:empty { display: none; }
.waitlist-msg[data-state="ok"] { color: var(--positive-text); }
.waitlist-msg[data-state="error"] { color: var(--negative-text); }
.waitlist-msg[data-state="todo"], .waitlist-msg[data-state="busy"] { color: var(--amber-text); }
.waitlist-fine { margin-top: 10px; font-size: .84rem; color: var(--ink-soft); }
.waitlist[aria-busy="true"] button { opacity: .7; pointer-events: none; }
@media (max-width: 860px) { .cta-inner { grid-template-columns: 1fr; } }
@media (max-width: 460px) { .waitlist-row { flex-direction: column; } .waitlist-row .btn { width: 100%; } }

/* Crew pager at the foot of each crew page */
.pager { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(12px, 2vw, 20px); }
.pager a { display: flex; align-items: center; gap: 12px; padding: 16px; border: 1px solid var(--rule); border-radius: var(--radius); background: var(--surface); text-decoration: none; color: var(--ink-mid); font-size: .92rem; line-height: 1.35; transition: transform .25s var(--ease), box-shadow .25s var(--ease), border-color .25s var(--ease); }
.pager a:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--ink-soft); }
.pager a strong { display: block; font-size: 1.02rem; }
.pager .crew-icon { width: 36px; height: 36px; }
@media (max-width: 760px) { .pager { grid-template-columns: 1fr; } }

/* ---- Footer ---------------------------------------------------------------------------- */
.site-footer { border-top: 1px solid var(--rule); background: var(--ground); padding-top: var(--space-section-tight); font-size: .93rem; }
.footer-grid { display: grid; grid-template-columns: 1.5fr repeat(3, minmax(0, 1fr)); gap: 32px; }
.footer-brand > * + * { margin-top: 10px; }
.footer-brand p { color: var(--ink-soft); max-width: 30em; }
.site-footer nav h2 { font-family: var(--mono); font-size: .7rem; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-soft); margin-bottom: 12px; }
.site-footer nav a { display: block; padding: 5px 0; color: var(--ink-mid); text-decoration: none; }
.site-footer nav a:hover { color: var(--ink); text-decoration: underline; text-decoration-color: var(--accent); }
.footer-base { margin-top: var(--space-block); padding-block: 20px 28px; border-top: 1px solid var(--rule); color: var(--ink-soft); font-family: var(--mono); font-size: .76rem; letter-spacing: .02em; }
@media (max-width: 820px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-brand { grid-column: 1 / -1; } }
@media (max-width: 420px) { .footer-grid { grid-template-columns: 1fr; } }

.notfound { min-height: 56vh; display: grid; place-items: center; text-align: center; }
.notfound .container > * + * { margin-top: 20px; }
.notfound .fig { font-size: .9rem; color: var(--ink-soft); letter-spacing: .08em; }
.notfound .btn-row { justify-content: center; }

/* ---- Motion ---------------------------------------------------------------------------- */
/* Content is visible by default. Only when scripts run (html.js) and the visitor has not asked
   for reduced motion do sections rise in as they enter the view. */
@media (prefers-reduced-motion: no-preference) {
  .js .reveal { opacity: 0; transform: translateY(16px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
  .js .reveal.in { opacity: 1; transform: none; }
  .js .reveal-kids > * { opacity: 0; transform: translateY(14px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
  .js .reveal-kids.in > * { opacity: 1; transform: none; }
  .js .reveal-kids.in > :nth-child(2) { transition-delay: .07s; } .js .reveal-kids.in > :nth-child(3) { transition-delay: .14s; }
  .js .reveal-kids.in > :nth-child(4) { transition-delay: .21s; } .js .reveal-kids.in > :nth-child(5) { transition-delay: .28s; }
  .js .reveal-kids.in > :nth-child(6) { transition-delay: .35s; }
  .hero-copy > * { animation: rise .8s var(--ease) both; }
  .hero-copy > :nth-child(2) { animation-delay: .06s; } .hero-copy > :nth-child(3) { animation-delay: .12s; }
  .hero-copy > :nth-child(4) { animation-delay: .18s; } .hero-copy > :nth-child(5) { animation-delay: .24s; }
  .hero-visual { animation: rise 1s var(--ease) .15s both; }
  .hero-visual .door { animation: rise .7s var(--ease) both; }
  .hero-visual .door:nth-child(1) { animation-delay: .45s; } .hero-visual .door:nth-child(2) { animation-delay: .55s; }
  .hero-visual .door:nth-child(3) { animation-delay: .65s; } .hero-visual .door:nth-child(4) { animation-delay: .75s; }
  .hero-visual .meter-fill { animation: fill 1.2s var(--ease) 1s both; transform-origin: left center; }
  .scroll-cue svg { animation: nudge 1.8s var(--ease) 1.4s infinite; }
  .wordmark .wm-long::after { animation: bar .7s var(--ease) .2s both; }
}
@keyframes nudge { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(6px); } }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes fill { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes bar { from { transform: translateX(-50%) scaleX(0); } to { transform: translateX(-50%) scaleX(1); } }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
@media print {
  .site-header, .site-footer, .cta-band, .skip { display: none !important; }
  body { background: #fff; }
}
