/* ──────────────────────────────────────────────────────────────────────────
 * Almost-paper — base tokens (theme-invariant within this design system)
 *
 * Phase 1 port from factory/site/src/styles/tokens.css (2026-05-20).
 * Palette tokens live in themes/light.css and themes/dark.css.
 *
 * Scoping: every variable here applies only when [data-design-system="almost-paper"]
 * is set on a parent element (typically <html>).
 *
 * Tokens included (theme-invariant):
 *   - font families
 *   - type scale (1.25 ratio)
 *   - spacing scale (24-25px line-height rhythm)
 *   - structure measures (text column width, sidebar widths)
 *   - radius (minimal — almost-paper doesn't lean rounded)
 *   - motion (150ms ease-out-quart hover, 220ms state transitions)
 *
 * Tokens NOT included (palette — see themes/*.css):
 *   - paper / bg / surfaces
 *   - ink / text
 *   - accent / focus / status colors
 * ──────────────────────────────────────────────────────────────────────── */

[data-design-system="almost-paper"] {
  /* ── TYPE ──
   * General Sans (Fontshare) as body — distinctive, not on Impeccable's
   * reflex-reject list. JetBrains Mono for code — mono as accent, not voice.
   * Single family + weight contrast over family pairing. */

  --font-sans: "General Sans", -apple-system, "Helvetica Neue", sans-serif;
  --font-mono: "JetBrains Mono", "SF Mono", Menlo, Consolas, monospace;
  --font-display: var(--font-sans); /* deliberate: no display serif */

  --type-base: 16px;
  --type-leading: 1.55;

  /* Modular scale: 1.25 ratio between steps (per rules/design-rules.md) */
  --t-xs:  0.75rem;   /* 12px */
  --t-sm:  0.875rem;  /* 14px */
  --t-base: 1rem;     /* 16px */
  --t-lg:  1.25rem;   /* 20px */
  --t-xl:  1.625rem;  /* 26px */
  --t-2xl: 2.125rem;  /* 34px */
  --t-3xl: 2.75rem;   /* 44px */
  --t-4xl: 3.5rem;    /* 56px */
  --t-5xl: clamp(3.5rem, 6.5vw, 5.5rem);

  /* ── SPACE ──
   * Vertical rhythm tied to body line-height (24-25px on 16px/1.55).
   * Every gap is a multiple. */

  --r:    0.25rem;   /* 4px  — tight pairs */
  --r-1:  0.5rem;    /* 8px  — sibling pairs */
  --r-2:  0.75rem;   /* 12px — sibling pairs (looser) */
  --r-3:  1rem;      /* 16px — within group */
  --r-4:  1.5rem;    /* 24px — between paragraphs (= line-height) */
  --r-6:  2.25rem;   /* 36px — between subgroups */
  --r-8:  3rem;      /* 48px — section-internal break */
  --r-12: 4.5rem;    /* 72px — between sections */
  --r-16: 6rem;      /* 96px — major section break */

  /* ── STRUCTURE ── */

  --measure-text: 64ch;       /* prose column */
  --measure-wide: 1280px;     /* page max */
  --margin-page: clamp(1.5rem, 5vw, 4rem);

  /* Marginalia: Tufte-style wide right margin for sidenotes / meta */
  --col-content: minmax(0, 64ch);
  --col-margin: minmax(0, 18ch);
  --gap-content-margin: 2.5rem;

  /* Sidebar — lockable hover-expand (factory's canonical pattern).
   * Collapsed = icon-only rail; expanded = icons + labels. */
  --sidebar-w: 60px;
  --sidebar-w-expanded: 220px;

  /* ── RADIUS ──
   * Minimal — almost-paper doesn't lean rounded. */
  --radius: 2px;

  /* ── MOTION ──
   * Quiet — calm reads as substantial.
   * 150ms ease-out-quart hover, 220ms state. No entrance animations. */

  --t-hover: 150ms cubic-bezier(0.25, 1, 0.5, 1);
  --t-state: 220ms cubic-bezier(0.25, 1, 0.5, 1);
}

/* ============================================================
   EquiTrak company website. The original EquiTrak site's blue scheme (user
   direction 2026-09-27): navy ground #0b1224 to #0b1020, white type, light blue
   #7f9bff for highlights, royal blue #2450d6 for buttons, heavy rules, and a
   navy-to-blue band as the one colourful element.
   Sizes and spacing use the shared named values (tokens.css, vendored from the
   factory's almost-paper list); this file adds only the site's palette and its
   display sizes, all named here in :root.
   ============================================================ */
:root {
  --bg: #0b1020;
  --bg-soft: #0f1830;
  --bg-raise: #152449;
  --ink: #ffffff;
  --ink-2: #c3cbdb;
  --ash: #9aa4ba;
  --line: #26325a;
  --line-soft: #1a2444;
  --accent: #7f9bff;
  --accent-hi: #a9bcff;
  --btn: #2450d6;
  --btn-hover: #1b3fb0;
  --band: linear-gradient(100deg, #0b1224 0%, #152449 35%, #1b3fb0 70%, #2450d6 100%);

  --d-hero: clamp(2.75rem, 6.2vw, 5.25rem);
  --d-page: clamp(2.5rem, 5vw, 4.25rem);
  --d-sec: clamp(2rem, 4.2vw, 3.25rem);
  --lead: clamp(1.25rem, 1.9vw, 1.625rem);

  --btn-ink: var(--ink);
  --neg: var(--accent);   /* blue look: the accent was already neutral for a shortfall */

  --wrap: 1200px;
  --top-h: 64px;
  --rule: 3px;
}

/* ------------------------------------------------------------
   Deck look. Taken from "EquiTrak Investor Overview v2.pptx" (Drive, 28 Sep 2026):
   its near-black navy-teal grounds, cool off-whites and the bright green it uses
   for every accent, sampled from the slide XML. Build with `node build.mjs --deck`.
   Only the palette changes; every size, space and rule is shared with the blue look
   so the two can be compared on composition rather than colour.
   ------------------------------------------------------------ */
:root[data-look='deck'] {
  --bg: #020f17;
  --bg-soft: #021f2e;
  --bg-raise: #032d42;
  --ink: #f4f8fa;
  --ink-2: #bfd3dc;
  --ash: #a9c1cc;
  --line: #0a4257;
  --line-soft: #04202d;
  --accent: #62d84e;
  --accent-hi: #8ce87b;
  --btn: #62d84e;
  --btn-hover: #4fc23c;
  --btn-ink: #020f17;
  /* no teal midpoint: a teal-to-light gradient is read as cyan slop (CLAUDE.md) */
  --band: linear-gradient(100deg, #020f17 0%, #04212f 40%, #14612c 76%, #62d84e 100%);
  /* green reads as good, so a shortfall must not wear it. Amber is the project's
     established dark-surface colour (CLAUDE.md, the /investment pages). */
  --neg: #f0b35c;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: var(--top-h); }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  font-family: var(--font-sans);
  font-size: var(--t-base);
  line-height: var(--type-leading);
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
h1, h2, h3 { text-wrap: balance; }
p { text-wrap: pretty; }
ul, ol { list-style: none; }
button { font: inherit; cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--r-6); }
.skip { position: absolute; left: -999px; top: 0; background: var(--btn); color: var(--btn-ink); padding: var(--r-1) var(--r-3); z-index: 50; }
.skip:focus { left: var(--r-3); top: var(--r-3); }

/* ---------- top bar ---------- */
.top { position: sticky; top: 0; z-index: 30; background: var(--bg); border-bottom: 1px solid var(--line-soft); }
.top-in { height: var(--top-h); display: flex; align-items: center; justify-content: space-between; gap: var(--r-4); }
.brand { font-size: var(--t-lg); font-weight: 700; letter-spacing: -0.03em; color: var(--ink); }
.brand:hover { text-decoration: none; color: var(--accent); }
.nav { display: flex; align-items: center; gap: var(--r-4); font-size: var(--t-sm); font-weight: 500; }
.nav a { color: var(--ink-2); white-space: nowrap; }
.nav a:hover { color: var(--ink); text-decoration: none; }
.nav a[aria-current='page'] { color: var(--accent); }
.menu { display: none; background: none; border: 1px solid var(--line); border-radius: var(--radius); color: var(--ink); padding: var(--r-1) var(--r-3); font-size: var(--t-sm); font-weight: 600; }

.btn {
  display: inline-flex; align-items: center; gap: var(--r-1);
  background: var(--btn); color: var(--btn-ink);
  border: 1px solid var(--btn); border-radius: var(--radius);
  padding: var(--r-2) var(--r-4);
  font-size: var(--t-base); font-weight: 700;
  transition: background-color var(--t-hover), border-color var(--t-hover);
}
.btn:hover { background: var(--btn-hover); border-color: var(--btn-hover); text-decoration: none; }
.nav .btn, .nav .btn:hover { color: var(--btn-ink); }
.btn-sm { padding: var(--r-1) var(--r-3); font-size: var(--t-sm); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { background: var(--bg-raise); border-color: var(--ash); }
.actions { display: flex; flex-wrap: wrap; gap: var(--r-3); margin-top: var(--r-8); }

/* ---------- hero (home) and page heads ---------- */

.head { padding: var(--r-16) 0 var(--r-8); }
.head-in { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: var(--r-12); align-items: end; padding-bottom: var(--r-8); border-bottom: var(--rule) solid var(--ink); }
.head h1 { font-size: var(--d-page); font-weight: 700; line-height: 0.98; letter-spacing: -0.04em; }
.head-lead { font-size: var(--t-lg); line-height: 1.45; color: var(--ink-2); max-width: 44ch; }

/* ---------- sections: heading column beside content column ---------- */
.sec { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: var(--r-12); align-items: start; padding: var(--r-12) 0 var(--r-16); border-top: 1px solid var(--line-soft); }
.sec:first-of-type { border-top: none; }
.sec-head { position: sticky; top: calc(var(--top-h) + var(--r-6)); }
.sec-head h2 { font-size: var(--t-3xl); font-weight: 700; line-height: 1.04; letter-spacing: -0.035em; }
.sec-lead { margin-top: var(--r-3); font-size: var(--t-lg); line-height: 1.4; color: var(--ink-2); max-width: 34ch; }
.sec-main > :first-child { margin-top: 0; }
/* content that needs the full width: heading on top */
.sec-stack { grid-template-columns: minmax(0, 1fr); gap: var(--r-6); }
.sec-stack .sec-head { position: static; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--r-12); align-items: end; }
.sec-stack .sec-head h2 { max-width: 18ch; }
.sec-stack .sec-lead { margin-top: 0; max-width: 44ch; }
.sec-main h3, .cta h3 { font-size: var(--t-lg); font-weight: 700; line-height: 1.3; letter-spacing: -0.01em; }
.note { margin-top: var(--r-4); font-size: var(--t-sm); color: var(--ash); max-width: 64ch; }
.prose { margin-top: var(--r-4); display: grid; gap: var(--r-3); color: var(--ink-2); max-width: 62ch; font-size: var(--t-lg); line-height: 1.5; }

/* label | paragraph rows */
.rows { margin-top: var(--r-6); border-top: var(--rule) solid var(--ink); }
.rows > div { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 8fr); gap: var(--r-6); padding: var(--r-4) 0; border-bottom: 1px solid var(--line-soft); }
.rows dt { font-size: var(--t-lg); font-weight: 700; line-height: 1.3; }
.rows dt small { display: block; margin-top: var(--r); font-size: var(--t-sm); font-weight: 500; color: var(--ash); }
.rows dd { color: var(--ink-2); max-width: 60ch; }
.rows dd strong { color: var(--ink); font-weight: 600; }
/* a real count keeps its numbers: the ten buyer's questions */
.rows.numbered { counter-reset: q; }
.rows.numbered > div { counter-increment: q; }
.rows.numbered dt::before { content: counter(q, decimal-leading-zero); display: block; margin-bottom: var(--r); font-family: var(--font-mono); font-size: var(--t-sm); font-weight: 500; color: var(--accent); }
.rows dd .ask { display: block; margin-top: var(--r-1); color: var(--accent-hi); font-weight: 500; }

/* numbered steps: big numeral, title, text */
.steps { margin-top: var(--r-6); border-top: var(--rule) solid var(--ink); counter-reset: step; }
.steps > li { counter-increment: step; display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: var(--r-1) var(--r-4); padding: var(--r-4) 0; border-bottom: 1px solid var(--line-soft); }
.steps > li::before { grid-row: 1 / span 2; content: counter(step, decimal-leading-zero); font-size: var(--t-2xl); font-weight: 700; line-height: 1; letter-spacing: -0.04em; color: var(--accent); }
.steps h3 small { display: block; margin-top: var(--r); font-size: var(--t-sm); font-weight: 500; color: var(--ash); letter-spacing: 0; }
.steps p { grid-column: 2; color: var(--ink-2); max-width: 58ch; }
/* four things, no order implied: a plain two-by-two */
.grid2 { margin-top: var(--r-6); display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 var(--r-8); border-top: var(--rule) solid var(--ink); }
.grid2 > div { padding: var(--r-4) 0 var(--r-6); border-bottom: 1px solid var(--line-soft); }
.grid2 h3 { margin-bottom: var(--r-1); }
.grid2 p { color: var(--ink-2); }

/* equal columns separated by hairlines */
.cols { margin-top: var(--r-6); display: grid; border-top: var(--rule) solid var(--ink); border-bottom: 1px solid var(--line); }
.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cols > * { padding: var(--r-4) var(--r-4) var(--r-6) 0; }
.cols > * + * { padding-left: var(--r-4); border-left: 1px solid var(--line); }
.cols h3 { margin-bottom: var(--r-1); }
.cols p { color: var(--ink-2); }
.cols .big { display: block; font-size: var(--t-4xl); font-weight: 700; line-height: 1; letter-spacing: -0.04em; color: var(--accent); margin-bottom: var(--r-2); }
.cols .role { font-size: var(--t-base); color: var(--accent); font-weight: 600; margin-bottom: var(--r-2); }

/* quotes with their source beside them */
.quotes { margin-top: var(--r-6); border-top: var(--rule) solid var(--ink); }
.quotes figure { display: grid; grid-template-columns: minmax(0, 1fr) 200px; gap: var(--r-6); align-items: baseline; padding: var(--r-4) 0; border-bottom: 1px solid var(--line-soft); }
.quotes blockquote { font-size: var(--t-lg); font-weight: 500; line-height: 1.4; max-width: 56ch; }
.quotes figcaption { font-size: var(--t-sm); color: var(--ash); }

/* tables */
.table { width: 100%; border-collapse: collapse; margin-top: var(--r-6); border-top: var(--rule) solid var(--ink); }
.table th, .table td { text-align: left; vertical-align: top; padding: var(--r-3) var(--r-3) var(--r-3) 0; border-bottom: 1px solid var(--line-soft); }
.table thead th { font-family: var(--font-mono); font-size: var(--t-xs); font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ash); border-bottom-color: var(--line); }
.table tbody th { font-size: var(--t-base); font-weight: 700; color: var(--ink); }
.table td { color: var(--ink-2); font-size: var(--t-base); }
.table .us th, .table .us td { background: var(--bg-raise); color: var(--ink); }
.table .us th, .table .us td { padding-left: var(--r-3); }
.table .yes { color: var(--accent-hi); font-weight: 600; }
.tag { display: inline-block; margin-left: var(--r-1); padding: var(--r) var(--r-1); line-height: 1; border-radius: var(--radius); background: var(--accent); color: var(--bg); font-size: var(--t-xs); font-weight: 700; vertical-align: middle; }

/* link list: where to go next */
.next { margin-top: var(--r-6); border-top: var(--rule) solid var(--ink); }
.next a { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 8fr) auto; gap: var(--r-6); align-items: baseline; padding: var(--r-4) 0; border-bottom: 1px solid var(--line-soft); color: var(--ink); transition: background-color var(--t-hover); }
.next a:hover { background: var(--bg-soft); text-decoration: none; }
.next strong { font-size: var(--t-lg); font-weight: 700; }
.next span { color: var(--ink-2); }
.next i { font-style: normal; color: var(--accent); font-weight: 700; }

/* questions */
.qa { margin-top: var(--r-6); border-top: var(--rule) solid var(--ink); }
.qa details { border-bottom: 1px solid var(--line-soft); }
.qa summary { cursor: pointer; list-style: none; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--r-4); padding: var(--r-4) 0; font-size: var(--t-lg); font-weight: 700; line-height: 1.3; }
.qa summary::-webkit-details-marker { display: none; }
.qa summary::after { content: '+'; color: var(--accent); font-weight: 700; }
.qa details[open] summary::after { content: '−'; }
.qa details p { padding: 0 0 var(--r-4); color: var(--ink-2); max-width: 66ch; }

/* stage statement and closing call */
.stage { margin-top: var(--r-6); padding: var(--r-6); background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--radius); display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: var(--r-6); }
.stage h3 { font-size: var(--t-xl); letter-spacing: -0.02em; line-height: 1.15; }
.stage p { color: var(--ink-2); max-width: 60ch; }
.stage p + p { margin-top: var(--r-2); }
.cta { padding: var(--r-16) 0; border-top: 12px solid; border-image: var(--band) 1; }
.cta-in { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: var(--r-12); align-items: end; }
.cta h2 { font-size: var(--d-sec); font-weight: 700; line-height: 1; letter-spacing: -0.035em; max-width: 16ch; }
.cta p { color: var(--ink-2); max-width: 46ch; }

/* calculator and form */
.calc { margin-top: var(--r-6); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--r-12); border-top: var(--rule) solid var(--ink); padding-top: var(--r-6); }
.field { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--r) var(--r-3); padding: var(--r-2) 0; border-bottom: 1px solid var(--line-soft); }
.field label { font-weight: 600; }
.field output { font-variant-numeric: tabular-nums; font-weight: 700; color: var(--accent); }
.field input[type='range'] { grid-column: 1 / -1; width: 100%; accent-color: var(--accent); }
.field small { grid-column: 1 / -1; font-size: var(--t-sm); color: var(--ash); }
.result { display: grid; align-content: start; }
.result-line { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--r-3); padding: var(--r-3) 0; border-bottom: 1px solid var(--line-soft); }
.result-line span small { display: block; font-size: var(--t-sm); color: var(--ash); }
.result-line b { font-size: var(--t-xl); font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.result-total { border-top: var(--rule) solid var(--ink); border-bottom: none; margin-top: var(--r-3); }
.result-total b { font-size: var(--t-3xl); color: var(--accent); line-height: 1; }
.form { margin-top: var(--r-6); border-top: var(--rule) solid var(--ink); padding-top: var(--r-6); display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--r-4) var(--r-6); }
.form .full { grid-column: 1 / -1; }
.form label { display: grid; gap: var(--r-1); font-weight: 600; }
.form input, .form select, .form textarea { font: inherit; color: var(--ink); background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--radius); padding: var(--r-2) var(--r-3); }
.form textarea { min-height: 140px; resize: vertical; }
.form-msg { color: var(--accent-hi); font-weight: 600; }

/* ============================================================
   Home page: a landing page. Every section has its own shape; the product is
   on the first screen; one pinned showcase; colour arrives in full-width bands.
   ============================================================ */
.lp-hero { padding: var(--r-12) 0 var(--r-16); }
.lp-hero-top { display: grid; gap: var(--r-6); margin-bottom: var(--r-8); }
.lp-hero h1 { font-size: var(--d-hero); font-weight: 700; line-height: 0.95; letter-spacing: -0.045em; max-width: 21ch; }
.lp-hero-side { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: var(--r-12); align-items: end; }
.lp-hero-side .actions { justify-content: flex-end; }
.lp-hero h1 em { font-style: normal; color: var(--accent); }
.lp-hero-side p { font-size: var(--t-lg); line-height: 1.45; color: var(--ink-2); max-width: 40ch; }
.lp-hero-side .actions { margin-top: 0; }

/* product fragments: the interface itself, drawn in HTML on synthetic data */
.ui { border: 1px solid var(--line); border-radius: var(--r-1); background: var(--bg-soft); overflow: hidden; font-size: var(--t-sm); }
.ui-hero { display: grid; grid-template-columns: 220px minmax(0, 1fr); }
.ui figcaption, .ui-hero figcaption { grid-column: 1 / -1; padding: var(--r-2) var(--r-4); border-top: 1px solid var(--line-soft); color: var(--ash); font-size: var(--t-xs); }
.ui-side { padding: var(--r-4); border-right: 1px solid var(--line-soft); background: var(--bg); }
.ui-app { font-weight: 700; margin-bottom: var(--r-3); }
.ui-side ul { display: grid; gap: var(--r); margin-bottom: var(--r-4); }
.ui-side li { display: flex; justify-content: space-between; gap: var(--r-1); padding: var(--r-1) var(--r-2); border-radius: var(--radius); color: var(--ink-2); }
.ui-side li.on { background: var(--bg-raise); color: var(--ink); font-weight: 600; }
.ui-side li span { color: var(--ash); font-size: var(--t-xs); white-space: nowrap; align-self: center; }
.ui-side-h { font-family: var(--font-mono); font-size: var(--t-xs); letter-spacing: 0.08em; text-transform: uppercase; color: var(--ash); margin-bottom: var(--r-1); }
.ui-main { padding: var(--r-4); min-width: 0; }
.ui-bar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: var(--r-2); margin-bottom: var(--r-4); }
.ui-title { font-size: var(--t-base); font-weight: 700; color: var(--ink); }
.ui-chips { display: flex; flex-wrap: wrap; gap: var(--r); }
.ui-chips span { padding: var(--r) var(--r-1); border: 1px solid var(--line); border-radius: var(--radius); color: var(--ink-2); font-size: var(--t-xs); line-height: 1.3; }
.ui-chips .ok { border-color: var(--accent); color: var(--accent-hi); }
.ui-kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border: 1px solid var(--line-soft); border-radius: var(--radius); margin-bottom: var(--r-4); }
.ui-kpis > div { padding: var(--r-3) var(--r-4); }
.ui-kpis > div + div { border-left: 1px solid var(--line-soft); }
.ui-kpis dt { color: var(--ash); font-size: var(--t-xs); }
.ui-kpis dd { font-size: var(--t-2xl); font-weight: 700; letter-spacing: -0.03em; line-height: 1.15; font-variant-numeric: tabular-nums; }
.ui-kpis .neg dd { color: var(--neg); }
.ui-kpis small { font-size: var(--t-sm); font-weight: 600; letter-spacing: 0; }
.ui-panels { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--r-4); }
.ui-panel { border: 1px solid var(--line-soft); border-radius: var(--radius); padding: var(--r-3) var(--r-4) var(--r-4); }
.ui-panel-h { color: var(--ash); font-size: var(--t-xs); margin-bottom: var(--r-2); }
.bars { display: grid; gap: var(--r-2); }
.bars li { display: grid; grid-template-columns: 92px minmax(0, 1fr) 64px; gap: var(--r-2); align-items: center; color: var(--ink-2); }
.bars i { display: block; height: var(--r-2); width: var(--w); border-radius: var(--radius); background: var(--neg); transform-origin: 0 50%; }
.bars b { text-align: right; color: var(--ink); font-variant-numeric: tabular-nums; }
.ui-table { width: 100%; border-collapse: collapse; }
.ui-table th { text-align: left; font-weight: 500; color: var(--ash); font-size: var(--t-xs); padding: var(--r-1) var(--r-2) var(--r-1) 0; border-bottom: 1px solid var(--line); }
.ui-table td { padding: var(--r-2) var(--r-2) var(--r-2) 0; border-bottom: 1px solid var(--line-soft); color: var(--ink-2); font-variant-numeric: tabular-nums; }
.ui-table td:first-child { color: var(--ink); font-weight: 600; }
.ui-table tr:last-child td { border-bottom: none; }
.ui-foot { margin-top: var(--r-3); color: var(--ash); font-size: var(--t-xs); }
.st { display: inline-block; padding: var(--r) var(--r-1); border: 1px solid var(--line); border-radius: var(--radius); font-size: var(--t-xs); line-height: 1.3; color: var(--ink-2); white-space: nowrap; }
.st.doing { border-color: var(--accent); color: var(--accent-hi); }
.st.done { border-color: var(--accent); background: var(--accent); color: var(--bg); font-weight: 700; }
.ui-chart { display: block; width: 100%; height: auto; margin-bottom: var(--r-3); }
.c-base { stroke: var(--ash); stroke-width: 1.5; stroke-dasharray: 5 5; }
.c-plan { fill: none; stroke: var(--line); stroke-width: 2; }
.c-act { fill: none; stroke: var(--accent); stroke-width: 3.5; stroke-linejoin: round; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 0; }
.c-lab { fill: var(--ash); font-size: 12px; font-family: var(--font-sans); }
.c-val { fill: var(--accent-hi); font-size: 12px; font-weight: 700; font-family: var(--font-sans); }
.ui-sum { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--line-soft); }
.ui-sum > div { padding: var(--r-2) var(--r-2) 0 0; }
.ui-sum dt { color: var(--ash); font-size: var(--t-xs); }
.ui-sum dd { font-size: var(--t-lg); font-weight: 700; font-variant-numeric: tabular-nums; }
.ui-sum .tot dd { color: var(--accent); }

/* three honest credibility points under the hero window */
.facts { margin-top: var(--r-6); display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: var(--rule) solid var(--ink); }
.facts > div { padding: var(--r-4) var(--r-6) 0 0; }
.facts > div + div { padding-left: var(--r-6); border-left: 1px solid var(--line); }
.facts dt { font-size: var(--t-lg); font-weight: 700; line-height: 1.3; margin-bottom: var(--r-1); }
.facts dd { color: var(--ink-2); max-width: 40ch; }

/* how it starts: four steps on one timeline */
.path { padding: var(--r-16) 0 var(--r-8); }
.path-head, .five-head { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: var(--r-12); align-items: end; margin-bottom: var(--r-8); }
.path-head h2, .five-head h2 { font-size: var(--d-sec); font-weight: 700; line-height: 1; letter-spacing: -0.035em; max-width: 16ch; }
.path-head p, .five-head p { font-size: var(--t-lg); color: var(--ink-2); }
.path-steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--r-6); border-top: 1px solid var(--line); }
.path-steps li { position: relative; padding-top: var(--r-4); }
.path-steps li::before { content: ''; position: absolute; top: calc(-1 * var(--r) - 1px); left: 0; width: var(--r-2); height: var(--r-2); border-radius: 50%; background: var(--accent); }
.path-when { display: block; font-family: var(--font-mono); font-size: var(--t-xs); letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent); margin-bottom: var(--r-1); }
.path-steps h3 { font-size: var(--t-lg); font-weight: 700; line-height: 1.3; margin-bottom: var(--r-1); }
.path-steps p { color: var(--ink-2); }
.path-more { margin-top: var(--r-6); font-weight: 700; }

/* five numbers: one strip, five columns, no big digits (they would be a promise) */
.five { padding: var(--r-12) 0 var(--r-16); }
.five-strip { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); border-top: var(--rule) solid var(--ink); border-bottom: 1px solid var(--line); }
.five-strip > div { padding: var(--r-4) var(--r-4) var(--r-6) 0; }
.five-strip > div + div { padding-left: var(--r-4); border-left: 1px solid var(--line); }
.five-strip dt { font-size: var(--t-lg); font-weight: 700; line-height: 1.3; margin-bottom: var(--r-1); }
.five-strip dd { color: var(--ink-2); font-size: var(--t-sm); }

/* the pinned showcase: three panels that stack as you scroll. Pure CSS, nothing hidden */
.show { padding: var(--r-8) 0 var(--r-16); }
.show-h { font-size: var(--d-sec); font-weight: 700; line-height: 1; letter-spacing: -0.035em; margin-bottom: var(--r-8); }
.stackset { display: grid; gap: var(--r-6); }
.stack {
  position: sticky; top: calc(var(--top-h) + var(--r-4));
  display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: var(--r-8); align-items: center;
  min-height: min(520px, 68vh);
  padding: var(--r-6) var(--r-6) var(--r-6) var(--r-8);
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--r-1);
}
.stack:nth-child(2) { top: calc(var(--top-h) + var(--r-4) + var(--r-3)); }
.stack:nth-child(3) { top: calc(var(--top-h) + var(--r-4) + var(--r-3) + var(--r-3)); }
.stack-text .stack-word { font-size: var(--d-page); font-weight: 700; line-height: 1; letter-spacing: -0.045em; color: var(--accent); margin-bottom: var(--r-3); }
.stack-text h3 { font-size: var(--t-xl); font-weight: 700; line-height: 1.3; letter-spacing: -0.02em; margin-bottom: var(--r-2); }
.stack-text p { color: var(--ink-2); max-width: 44ch; }
.stack-text a { display: inline-block; margin-top: var(--r-4); font-weight: 700; }

/* colour arrives in bands: dark panels on the navy-to-amber sweep */
.band { background: var(--band); padding: var(--r-12) 0; }
.band-in { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--r-4); }
.band-head, .q { background: var(--bg); border-radius: var(--r-1); padding: var(--r-6); }
.band-head { grid-column: span 5; display: grid; align-content: space-between; gap: var(--r-6); }
.band-head h2 { font-size: var(--d-sec); font-weight: 700; line-height: 1; letter-spacing: -0.035em; }
.band-head p { color: var(--ink-2); }
.q { grid-column: span 6; display: grid; align-content: space-between; gap: var(--r-4); }
.q-big { grid-column: span 7; }
.q blockquote { font-size: var(--t-lg); font-weight: 500; line-height: 1.4; }
.q-big blockquote { font-size: var(--t-2xl); font-weight: 600; line-height: 1.3; letter-spacing: -0.02em; }
.q figcaption { color: var(--ash); font-size: var(--t-sm); }
.band-in-cta { background: var(--bg); border-radius: var(--r-1); padding: var(--r-12) var(--r-8); grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: var(--r-12); align-items: end; }
.band-in-cta h2 { font-size: var(--d-page); font-weight: 700; line-height: 0.98; letter-spacing: -0.04em; max-width: 12ch; }
.band-in-cta p { color: var(--ink-2); max-width: 46ch; }
.band-in-cta .actions { margin-top: var(--r-4); }
.next-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--r-4); margin-top: var(--r-4); }
.next-row a { display: grid; align-content: start; gap: var(--r); padding: var(--r-4) var(--r-6); background: var(--bg); border-radius: var(--r-1); color: var(--ink); transition: background-color var(--t-hover); }
.next-row a:hover { background: var(--bg-raise); text-decoration: none; }
.next-row strong { font-size: var(--t-lg); font-weight: 700; }
.next-row span { color: var(--ink-2); font-size: var(--t-sm); }

/* tiles of different sizes */
.pieces { padding: var(--r-16) 0 var(--r-8); }
.pieces-head { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: var(--r-12); align-items: end; margin-bottom: var(--r-8); }
.pieces-head h2 { font-size: var(--d-sec); font-weight: 700; line-height: 1; letter-spacing: -0.035em; max-width: 16ch; }
.pieces-head p { font-size: var(--t-lg); color: var(--ink-2); }
.tiles { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--r-4); }
.tile { grid-column: span 5; display: grid; align-content: start; gap: var(--r-2); padding: var(--r-6); background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--r-1); color: var(--ink); transition: background-color var(--t-hover), border-color var(--t-hover); }
.tile-wide { grid-column: span 7; }
.tile:hover { background: var(--bg-raise); border-color: var(--ash); text-decoration: none; }
.tile h3 { font-size: var(--t-xl); font-weight: 700; line-height: 1.3; letter-spacing: -0.02em; }
.tile > p { color: var(--ink-2); max-width: 52ch; }
.tile .tile-go { color: var(--accent); font-weight: 700; margin-top: var(--r-2); }
.trig, .signs { margin-top: var(--r-3); border-top: 1px solid var(--line); font-size: var(--t-sm); }
.trig li, .signs li { display: flex; justify-content: space-between; gap: var(--r-3); padding: var(--r-2) 0; border-bottom: 1px solid var(--line-soft); color: var(--ink-2); }
.trig b { color: var(--ink); font-weight: 600; }
.signs span { color: var(--accent-hi); font-weight: 600; }
.flow { margin-top: var(--r-3); display: flex; flex-wrap: wrap; align-items: center; gap: var(--r-2); font-size: var(--t-sm); }
.flow span, .flow b { padding: var(--r-1) var(--r-2); border: 1px solid var(--line); border-radius: var(--radius); }
.flow b { border-color: var(--accent); color: var(--accent-hi); }
.flow i { font-style: normal; color: var(--ash); }

/* gentle, once-only reveal. Hidden state exists only when script AND motion are both
   available (root class set in <head>), never above the fold, never for automation. */
@media (prefers-reduced-motion: no-preference) {
  .reveal-js .reveal { opacity: 0; transform: translateY(var(--r-4)); }
  .reveal-js .reveal.is-visible { opacity: 1; transform: none; transition: opacity 500ms cubic-bezier(0.25, 1, 0.5, 1), transform 500ms cubic-bezier(0.25, 1, 0.5, 1); }
  /* motion inside the product fragments: bars fill, the line draws */
  .reveal-js .reveal-ui .bars i { transform: scaleX(0); }
  .reveal-js .reveal-ui.is-visible .bars i { transform: none; transition: transform 700ms cubic-bezier(0.25, 1, 0.5, 1); }
  .reveal-js .reveal-ui.is-visible .bars li:nth-child(2) i { transition-delay: 80ms; }
  .reveal-js .reveal-ui.is-visible .bars li:nth-child(3) i { transition-delay: 160ms; }
  .reveal-js .reveal-ui.is-visible .bars li:nth-child(4) i { transition-delay: 240ms; }
  .reveal-js .reveal-ui.is-visible .bars li:nth-child(5) i { transition-delay: 320ms; }
  .reveal-js .reveal-ui .c-act { stroke-dashoffset: 1; }
  .reveal-js .reveal-ui.is-visible .c-act { stroke-dashoffset: 0; transition: stroke-dashoffset 1100ms cubic-bezier(0.25, 1, 0.5, 1) 150ms; }
}
@media print { .reveal, .reveal-ui * { opacity: 1 !important; transform: none !important; } .stack { position: static; } }

/* ---------- footer ---------- */
.foot { border-top: 1px solid var(--line-soft); padding: var(--r-12) 0 var(--r-8); color: var(--ink-2); font-size: var(--t-sm); }
.foot-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr)); gap: var(--r-8); }
.foot-brand { font-size: var(--t-xl); font-weight: 700; letter-spacing: -0.03em; color: var(--ink); margin-bottom: var(--r-1); }
.foot-line { max-width: 34ch; }
.foot-h { font-family: var(--font-mono); font-size: var(--t-xs); letter-spacing: 0.08em; text-transform: uppercase; color: var(--ash); margin-bottom: var(--r-2); }
.foot ul { display: grid; gap: var(--r-1); }
.foot a { color: var(--ink-2); }
.foot a:hover { color: var(--ink); }
.foot-legal { margin-top: var(--r-8); padding-top: var(--r-4); border-top: 1px solid var(--line-soft); color: var(--ash); max-width: 68ch; }

/* ---------- narrow screens ---------- */
@media (max-width: 980px) {
  .menu { display: block; }
  .nav { display: none; position: absolute; left: 0; right: 0; top: var(--top-h); flex-direction: column; align-items: flex-start; gap: var(--r-3); padding: var(--r-4) var(--r-6) var(--r-6); background: var(--bg); border-bottom: 1px solid var(--line); font-size: var(--t-base); }
  .nav.open { display: flex; }
  .head-in, .cta-in, .calc, .stage, .sec, .sec-stack .sec-head { grid-template-columns: minmax(0, 1fr); gap: var(--r-4); }
  .sec-head { position: static; }
  .sec-lead { max-width: 52ch; }
  .foot-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .wrap { padding: 0 var(--r-4); }
  .nav { padding: var(--r-4); }
  .sec { padding: var(--r-8) 0 var(--r-12); }
  .rows > div, .quotes figure, .form { grid-template-columns: minmax(0, 1fr); gap: var(--r-1); }
  .steps > li { grid-template-columns: 48px minmax(0, 1fr); }
  .grid2 { grid-template-columns: minmax(0, 1fr); }
  .cols-2, .cols-3 { grid-template-columns: minmax(0, 1fr); }
  .cols > * + * { padding-left: 0; border-left: none; border-top: 1px solid var(--line); }
  .next a { grid-template-columns: minmax(0, 1fr) auto; gap: var(--r-1) var(--r-3); }
  .next span { grid-column: 1 / -1; grid-row: 2; }
  .table { display: block; overflow-x: auto; }
  .table thead, .table tbody { display: table; min-width: 560px; width: 100%; }
}

/* ---------- home page on narrow screens ---------- */
@media (max-width: 980px) {
  .lp-hero-side, .pieces-head, .band-in-cta { grid-template-columns: minmax(0, 1fr); gap: var(--r-4); }
  .lp-hero-side .actions { justify-content: flex-start; }
  .ui-hero { grid-template-columns: minmax(0, 1fr); }
  .ui-side { display: none; }
  .stack { position: static; grid-template-columns: minmax(0, 1fr); gap: var(--r-6); min-height: 0; padding: var(--r-6); }
  .band-head, .q, .q-big { grid-column: 1 / -1; }
  .facts, .next-row { grid-template-columns: minmax(0, 1fr); }
  .facts > div + div { padding-left: 0; border-left: none; border-top: 1px solid var(--line); }
  .path-head, .five-head { grid-template-columns: minmax(0, 1fr); gap: var(--r-3); }
  .path-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .five-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .five-strip > div:nth-child(odd) { padding-left: 0; border-left: none; }
  .five-strip > div { border-bottom: 1px solid var(--line-soft); }
  .tile, .tile-wide { grid-column: 1 / -1; }
}
@media (max-width: 720px) {
  .ui-panels { grid-template-columns: minmax(0, 1fr); }
  .ui-kpis dd { font-size: var(--t-xl); }
  .ui-kpis > div { padding: var(--r-2) var(--r-3); }
  .ui-sum { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--r-2) 0; }
  .ui-main { overflow-x: auto; }
  .ui-table { min-width: 460px; }
  .stack, .band-head, .q, .tile { padding: var(--r-4); }
  .path-steps, .five-strip { grid-template-columns: minmax(0, 1fr); }
  .five-strip > div { padding-left: 0; border-left: none; }
  .band-in-cta { padding: var(--r-8) var(--r-4); }
}
