/* =============================================================================
   oclium.com — design system.

   This is the marketing site's port of the console's M6 "Observatory" design
   system (oclium-portal `src/app.css`). Every TOKEN below is copied
   value-for-value from the app so oclium.com and app.oclium.com read as one
   product: cool-gray chrome, white widget panels, flat brand purple, 4px
   radii, hairline seams, Lato (400/700/900 only) + Fira Mono for machine data.

   The site is static — no build step — so the app's Tailwind `@theme` entries
   become plain custom properties here. If a token changes in app.css, change
   it here in the same pass.

   What the site ADDS on top of the app's vocabulary is a narrative layer:
   the landing page is told as a talk — numbered acts, one idea per screen,
   the console itself as the only illustration. Those components live under
   "Story" below. They are deliberately few.

   Rules carried from the app:
   - Lato has no 500/600 master. Sans text uses 400, 700 or 900 — never else.
     Fira Mono DOES ship a 500 and we load it; mono weights of 500 are real.
   - `--ink-lo` is the app's dense-grid label rung and never carries body
     copy. On a marketing page every label is TEXT, so labels here use
     `--muted` (AA on every ground) instead.
   - Solid accent is reserved for the primary CTA. Everything else that is
     "on" uses `--accent-wash` + `--accent-ink`.
   ========================================================================= */

/* --- Light: the M6 primary ground ---------------------------------------- */
:root {
  color-scheme: light dark;

  --surface-950: #e9e9f0;
  --surface-900: #f6f6f9;
  --surface-800: #ffffff;
  --surface-700: #fafafc;
  --surface-600: #efeff6;
  --surface-500: #e3e3ee;
  --surface-400: #cfcfdd;
  --surface-300: #8f91a4;
  --surface-200: #5f6172;
  --surface-100: #3c3e4c;
  --surface-50: #2e2e3a;

  --ink-hi: #2e2e3a;
  --ink: #43455a;
  --ink-mid: #5f6172;
  --ink-lo: #85879b;
  --muted: #686a7c;

  --line: rgb(40 40 124 / 0.13);
  --line-strong: rgb(37 37 101 / 0.22);
  --line-faint: rgb(42 42 135 / 0.075);

  --accent: #632ca6;
  --accent-ink: #632ca6;
  --on-accent: #ffffff;
  --accent-dim: #4e2183;
  --accent-wash: #efe7f9;
  --accent-line: #d9c8ef;

  --success: #2f9e5f;
  --success-wash: #e6f4ec;
  --success-line: #bfe3cd;
  --success-ink: #1f7a46;

  --crit: #cf3c4f;  --crit-wash: #fbeaec;  --crit-line: #f0c1c8;  --crit-ink: #a92f40;
  --high: #dd7622;  --high-wash: #fdf0e3;  --high-line: #f2cfa8;  --high-ink: #9c4e0b;
  --med: #e2ab18;   --med-wash: #fbf4dd;   --med-line: #ecd98f;   --med-ink: #7a5f00;
  --low: #5b87c7;   --low-wash: #e9f0f9;   --low-line: #cbd9ed;   --low-ink: #35619e;
  --info: #8c90a3;  --info-wash: #eeeff3;  --info-line: #dbdce2;  --info-ink: #5f6172;

  --s1: #7a4bc9; --s2: #4a7ddc; --s3: #2fa4a9; --s4: #58a55c; --s5: #b088e0;

  --shadow-widget: 0 1px 2px rgb(25 25 50 / 0.05);
  --shadow-pop: 0 2px 6px rgb(25 25 50 / 0.12);
  --shadow-frame: 0 1px 3px rgb(30 30 60 / 0.08), 0 10px 30px rgb(30 30 60 / 0.08);

  --r: 4px;
  --r-lg: 6px;
  --r-pill: 999px;

  --sans: "Lato", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Fira Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --page: 1180px;
  --gutter: 28px;
  --header-h: 56px;
}

/* --- Dark: the app's `data-theme='dark'` values --------------------------- */
@media (prefers-color-scheme: dark) {
  :root {
    --surface-950: #0d0d13;
    --surface-900: #14141c;
    --surface-800: #1c1c26;
    --surface-700: #181820;
    --surface-600: #26262f;
    --surface-500: #2f2f3b;
    --surface-400: #3d3d4b;
    --surface-300: #6e7080;
    --surface-200: #9a9cab;
    --surface-100: #c9cad3;
    --surface-50: #e6e7ec;

    --ink-hi: #f2f3f7;
    --ink: #dcdde5;
    --ink-mid: #a9abbb;
    --ink-lo: #8a8c9d;
    --muted: #a9abbb;

    --line: rgb(255 255 255 / 0.1);
    --line-strong: rgb(255 255 255 / 0.18);
    --line-faint: rgb(255 255 255 / 0.06);

    /* Dark accent is a LIGHT purple: white on it is only 3.71:1, so ink on a
       solid accent fill is dark; accent-as-text uses the lighter rung. */
    --accent: #9a6ae0;
    --accent-ink: #b58ceb;
    --on-accent: #14141c;
    --accent-dim: #b58ceb;
    --accent-wash: #251c3d;
    --accent-line: #453268;

    --success: #46b877; --success-wash: #14291d; --success-line: #235c3a; --success-ink: #7fd6a3;

    --crit: #f2545b; --crit-wash: #33191d; --crit-line: #5c2a30; --crit-ink: #ff9098;
    --high: #f08a2e; --high-wash: #33240f; --high-line: #5e4320; --high-ink: #ffb066;
    --med: #e8c33f;  --med-wash: #302a10;  --med-line: #574c20;  --med-ink: #f3d777;
    --low: #6fa8e8;  --low-wash: #16233a;  --low-line: #2b4468;  --low-ink: #9cc6f5;
    --info: #8c90a3; --info-wash: #23242c; --info-line: #383a46; --info-ink: #b8bac7;

    --s1: #9d78e0; --s2: #6d9fe8; --s3: #46bfc4; --s4: #78c47c; --s5: #c9a6f0;

    --shadow-widget: 0 1px 2px rgb(0 0 0 / 0.5);
    --shadow-pop: 0 2px 8px rgb(0 0 0 / 0.6);
    --shadow-frame: 0 1px 3px rgb(0 0 0 / 0.6), 0 10px 30px rgb(0 0 0 / 0.45);
  }
}

/* =========================================================================
   Base
   ========================================================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

[id] { scroll-margin-top: calc(var(--header-h) + 18px); }

body {
  background: var(--surface-900);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.tabular { font-variant-numeric: tabular-nums; }
::selection { background: var(--accent-wash); color: var(--ink-hi); }
a { color: inherit; }
img, svg { display: block; max-width: 100%; }
b, strong { font-weight: 700; color: var(--ink-hi); }
code, .mono { font-family: var(--mono); }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 2px; }

.skip {
  position: fixed; top: 10px; left: 50%; z-index: 100;
  transform: translate(-50%, -300%);
  background: var(--surface-800); color: var(--ink-hi);
  border: 1px solid var(--line-strong); border-radius: var(--r);
  padding: 8px 14px; font-size: 14px; font-weight: 700; text-decoration: none;
  box-shadow: var(--shadow-pop);
}
.skip:focus { transform: translate(-50%, 0); }

.wrap { max-width: var(--page); margin: 0 auto; padding: 0 var(--gutter); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* =========================================================================
   Type
   ========================================================================= */
.display {
  font-weight: 900;
  color: var(--ink-hi);
  letter-spacing: -0.025em;
  line-height: 1.02;
  text-wrap: balance;
}
h1.display { font-size: clamp(2.4rem, 5.6vw, 4.25rem); max-width: 20ch; }
h2.display { font-size: clamp(1.95rem, 4.4vw, 3.3rem); line-height: 1.06; letter-spacing: -0.02em; max-width: 16ch; }
h3.display { font-size: clamp(1.4rem, 2.6vw, 1.9rem); line-height: 1.15; letter-spacing: -0.015em; }

.lead {
  font-size: clamp(1.1rem, 1.45vw, 1.3rem);
  line-height: 1.55;
  color: var(--ink);
  max-width: 36rem;
  margin-top: 26px;
}
.lead + .lead { margin-top: 18px; }
.lead b { color: var(--ink-hi); }

/* Chapter marker: `01 — Why we exist`. The app's uppercase mono label idiom. */
.chapter {
  display: flex; align-items: center; gap: 12px;
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 26px;
}
.chapter::before { content: ""; width: 28px; height: 1px; background: var(--accent); }
.chapter .n { color: var(--accent-ink); }

/* The belief line: the one sentence a section exists to land. */
.belief {
  margin-top: 34px;
  padding-left: 20px;
  border-left: 3px solid var(--accent);
  font-weight: 900; color: var(--ink-hi);
  font-size: clamp(1.35rem, 2.4vw, 1.9rem);
  line-height: 1.2; letter-spacing: -0.015em;
  max-width: 24ch;
  text-wrap: balance;
}

.label {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--muted);
}
.caption {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.02em;
  color: var(--muted); margin-top: 10px;
}

/* =========================================================================
   Controls — the app's button recipe
   ========================================================================= */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 38px; padding: 0 16px;
  border-radius: var(--r); border: 1px solid var(--line-strong);
  background: var(--surface-800); color: var(--ink-hi);
  font-family: var(--sans); font-size: 14px; font-weight: 700; line-height: 1;
  text-decoration: none; white-space: nowrap; cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.btn:hover { background: var(--surface-600); border-color: var(--surface-400); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: var(--accent-dim); border-color: var(--accent-dim); }
.btn-quiet { background: transparent; border-color: transparent; color: var(--ink-mid); }
.btn-quiet:hover { background: var(--accent-wash); border-color: transparent; color: var(--accent-ink); }
.btn-lg { height: 46px; padding: 0 22px; font-size: 15px; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; align-items: center; }
.actions .aside { font-size: 14px; color: var(--muted); }

.link { color: var(--accent-ink); font-weight: 700; text-decoration: none; text-underline-offset: 3px; }
.link:hover { text-decoration: underline; }

/* =========================================================================
   Header
   ========================================================================= */
.site-header {
  position: sticky; top: 0; z-index: 50;
  height: var(--header-h);
  background: var(--surface-800);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { height: 100%; display: flex; align-items: center; gap: 28px; }

.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink-hi); }
.brand .word { font-weight: 900; font-size: 19px; letter-spacing: -0.02em; line-height: 1; }

/* Element tile: a periodic-table cell for Oc. Number and mass only at >=40px. */
.tile { flex: none; width: 28px; height: 28px; }
.tile rect { fill: var(--accent); }
.tile text { fill: var(--on-accent); font-family: var(--sans); font-weight: 900; }
.tile .num, .tile .mass { display: none; }
.tile-lg { width: 48px; height: 48px; }
.tile-lg .num, .tile-lg .mass { display: block; font-weight: 400; }

.site-nav { display: flex; align-items: center; gap: 4px; margin-left: 8px; }
.site-nav a {
  display: inline-flex; align-items: center; height: 32px; padding: 0 10px;
  border-radius: var(--r);
  font-size: 14px; color: var(--ink-mid); text-decoration: none;
}
.site-nav a:hover { background: var(--surface-600); color: var(--ink-hi); }
.site-nav a[aria-current="page"] { color: var(--accent-ink); background: var(--accent-wash); }
.site-header .cta { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.site-header .cta .btn { height: 34px; }

@media (max-width: 860px) {
  .site-nav a.hide-md { display: none; }
  .site-header .wrap { gap: 16px; }
}
@media (max-width: 560px) {
  .site-nav { display: none; }
  .site-header .cta .btn-quiet { display: none; }
}

/* =========================================================================
   Story — the landing page as a talk
   ========================================================================= */
.act { padding: clamp(72px, 9vw, 128px) 0; border-top: 1px solid var(--line); }
.act.hero { border-top: 0; padding-top: clamp(56px, 8vw, 112px); }

.act-grid {
  display: grid;
  grid-template-columns: minmax(0, 6fr) minmax(0, 6fr);
  gap: clamp(40px, 6vw, 88px);
  align-items: center;
}
.act-grid.wide { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
.act-grid.text { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
.act-grid > .copy { min-width: 0; }
.act-grid > .art { min-width: 0; }
.act-grid.reverse > .art { order: -1; }
@media (max-width: 900px) {
  .act-grid, .act-grid.wide, .act-grid.text { grid-template-columns: 1fr; gap: 40px; }
  .act-grid.reverse > .art { order: 0; }
}

.hero .lead { font-size: clamp(1.15rem, 1.6vw, 1.38rem); }
.hero-facts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 30px; }
.hero-facts span {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 10px; border: 1px solid var(--line); border-radius: var(--r);
  background: var(--surface-800); font-family: var(--mono); font-size: 12px; color: var(--ink-mid);
}
.hero-facts span::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--success); }

/* Chapter rail — fixed on wide screens, hidden otherwise. */
.rail {
  position: fixed; left: 22px; top: 50%; transform: translateY(-50%);
  display: none; flex-direction: column; gap: 14px; z-index: 40;
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em;
}
.rail a { display: flex; align-items: center; gap: 10px; color: var(--muted); text-decoration: none; }
.rail a::before { content: ""; width: 14px; height: 1px; background: var(--line-strong); transition: width 0.15s, background 0.15s; }
.rail a:hover { color: var(--ink-hi); }
.rail a.is-active { color: var(--accent-ink); }
.rail a.is-active::before { width: 24px; background: var(--accent); }
.rail .t { display: none; }
.rail a.is-active .t { display: inline; text-transform: uppercase; }
@media (min-width: 1360px) { .rail { display: flex; } }

/* --- Panels: the app's widget --------------------------------------------- */
.panel {
  background: var(--surface-800);
  border: 1px solid var(--line);
  border-radius: var(--r);
  box-shadow: var(--shadow-widget);
  overflow: hidden;
}
.panel-head {
  display: flex; align-items: center; gap: 10px;
  min-height: 40px; padding: 0 14px;
  border-bottom: 1px solid var(--line);
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--muted);
}
.panel-head .grow { flex: 1; }
.panel-head .id { color: var(--ink-hi); letter-spacing: 0; text-transform: none; font-size: 12px; }
.panel-body { padding: 14px; }
.panel-foot { padding: 10px 14px; border-top: 1px solid var(--line); background: var(--surface-700); font-size: 13px; color: var(--ink-mid); }
.panel + .caption { margin-top: 10px; }

.badge {
  display: inline-flex; align-items: center; gap: 6px;
  height: 20px; padding: 0 8px; border-radius: var(--r-pill);
  font-family: var(--mono); font-size: 11px; font-weight: 500; letter-spacing: 0.02em;
  border: 1px solid var(--info-line); background: var(--info-wash); color: var(--info-ink);
  text-transform: none;
}
.badge.crit { border-color: var(--crit-line); background: var(--crit-wash); color: var(--crit-ink); }
.badge.high { border-color: var(--high-line); background: var(--high-wash); color: var(--high-ink); }
.badge.med  { border-color: var(--med-line);  background: var(--med-wash);  color: var(--med-ink); }
.badge.low  { border-color: var(--low-line);  background: var(--low-wash);  color: var(--low-ink); }
.badge.ok   { border-color: var(--success-line); background: var(--success-wash); color: var(--success-ink); }
.badge.acc  { border-color: var(--accent-line); background: var(--accent-wash); color: var(--accent-ink); }

.kv { display: grid; grid-template-columns: max-content 1fr; gap: 8px 18px; font-size: 13px; }
.kv dt { font-family: var(--mono); font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); padding-top: 2px; }
.kv dd { color: var(--ink-hi); }
.kv dd .mono { font-size: 12.5px; color: var(--ink); }

/* App table */
.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th {
  text-align: left; padding: 8px 12px;
  font-family: var(--mono); font-size: 11px; font-weight: 400; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--muted); border-bottom: 1px solid var(--line); background: var(--surface-700);
  white-space: nowrap;
}
.tbl td { padding: 9px 12px; border-bottom: 1px solid var(--line-faint); color: var(--ink); vertical-align: middle; white-space: nowrap; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tbody tr:hover td { background: var(--surface-700); }
.tbl .m { font-family: var(--mono); font-size: 12.5px; }
.tbl .hi { color: var(--ink-hi); font-weight: 700; }
.tbl .num { text-align: right; font-variant-numeric: tabular-nums; }
.tbl-wrap { overflow-x: auto; }

/* --- Evidence list inside the case panel --------------------------------- */
.evidence { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 12px; }
.evidence a, .evidence div {
  display: block; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r);
  background: var(--surface-700); text-decoration: none; color: var(--ink-hi); font-size: 13px; font-weight: 700;
}
.evidence small { display: block; font-family: var(--mono); font-size: 11px; font-weight: 400; color: var(--muted); margin-top: 3px; }
@media (max-width: 480px) { .evidence { grid-template-columns: 1fr; } }

/* --- Compare rows (act 02) ------------------------------------------------ */
.compare { border-top: 1px solid var(--line); }
.compare .row {
  display: grid; grid-template-columns: minmax(150px, 1fr) 2fr; gap: 20px; align-items: baseline;
  padding: 22px 0; border-bottom: 1px solid var(--line);
}
.compare .who { font-weight: 700; color: var(--ink-mid); font-size: 15px; }
.compare .what { font-weight: 900; color: var(--ink-hi); font-size: clamp(1.25rem, 2.2vw, 1.7rem); letter-spacing: -0.015em; line-height: 1.15; }
.compare .row.us .who { color: var(--accent-ink); }
.compare .row.us .what { color: var(--accent-ink); }
@media (max-width: 520px) { .compare .row { grid-template-columns: 1fr; gap: 6px; } }

/* --- Diagram (act 03) ------------------------------------------------------ */
.diagram { width: 100%; height: auto; }
.diagram .box { fill: var(--surface-800); stroke: var(--line-strong); }
.diagram .box.acc { stroke: var(--accent); }
.diagram .t { fill: var(--ink-hi); font-family: var(--sans); font-weight: 700; font-size: 13px; }
.diagram .s { fill: var(--muted); font-family: var(--mono); font-size: 10px; letter-spacing: 0.05em; }
.diagram .ok { fill: var(--success-ink); font-family: var(--mono); font-size: 10.5px; }
.diagram .flow { stroke: var(--accent); stroke-width: 1.5; fill: none; }
.diagram .none { stroke: var(--line-strong); stroke-dasharray: 4 4; fill: none; }
.diagram .dot { fill: var(--accent); }
.diagram .well { fill: var(--surface-700); stroke: var(--line); }

/* --- Pipeline stepper (act 04) --------------------------------------------- */
.steps { display: grid; grid-template-columns: repeat(7, 1fr); gap: 0; margin-top: 8px; }
.step { position: relative; padding: 14px 12px 12px 0; border-top: 1px solid var(--line-strong); }
.step::before {
  content: ""; position: absolute; top: -4px; left: 0; width: 7px; height: 7px; border-radius: 50%;
  background: var(--surface-900); border: 1.5px solid var(--line-strong);
}
.step.on { border-top-color: var(--accent); }
.step.on::before { background: var(--accent); border-color: var(--accent); }
.step .n { font-family: var(--mono); font-size: 11px; color: var(--muted); letter-spacing: 0.08em; }
.step .t { display: block; font-weight: 900; color: var(--ink-hi); font-size: 15px; margin-top: 4px; letter-spacing: -0.01em; }
.step .d { display: block; font-size: 12.5px; color: var(--ink-mid); line-height: 1.4; margin-top: 4px; }
@media (max-width: 900px) { .steps { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 560px) { .steps { grid-template-columns: repeat(2, 1fr); } }

.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.chip {
  display: inline-flex; align-items: center; height: 24px; padding: 0 9px;
  border: 1px solid var(--line); border-radius: var(--r); background: var(--surface-800);
  font-family: var(--mono); font-size: 12px; color: var(--ink);
}
.chip i { font-style: normal; color: var(--muted); margin-left: 6px; font-size: 10.5px; letter-spacing: 0.06em; text-transform: uppercase; }

/* --- Risk bands (act 05) --------------------------------------------------- */
.bands { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.band .bar { height: 10px; border-radius: 2px; }
.band .t { display: block; margin-top: 8px; font-family: var(--mono); font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-mid); }
.band .r { display: block; font-size: 12.5px; color: var(--muted); margin-top: 2px; line-height: 1.35; }
.band.info .bar { background: var(--info); }
.band.low .bar  { background: var(--low); }
.band.med .bar  { background: var(--med); }
.band.high .bar { background: var(--high); }
.band.crit .bar { background: var(--crit); }
@media (max-width: 560px) { .band .r { display: none; } }

.policy { margin-top: 18px; }
.policy .row {
  display: grid; grid-template-columns: 120px 1fr auto; gap: 14px; align-items: center;
  padding: 10px 14px; border-top: 1px solid var(--line-faint); font-size: 13.5px;
}
.policy .row:first-child { border-top: 0; }
.policy .k { font-family: var(--mono); font-size: 12px; color: var(--ink-hi); }
.policy .v { color: var(--ink-mid); }
.policy .row.gate { background: var(--accent-wash); border-top: 1px solid var(--accent-line); }
.policy .row.gate .k, .policy .row.gate .v { color: var(--ink-hi); }
@media (max-width: 480px) { .policy .row { grid-template-columns: 1fr; gap: 4px; } }

/* --- Evidence viewer (act 06) --------------------------------------------- */
.viewer-tabs { display: flex; gap: 2px; }
.viewer-tabs span { display: inline-flex; align-items: center; height: 40px; padding: 0 12px; border-bottom: 2px solid transparent; margin-bottom: -1px; font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.viewer-tabs span.on { color: var(--accent-ink); border-bottom-color: var(--accent); }
.frames { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); }
.frame { background: var(--surface-800); padding: 12px; }
.frame .scene { aspect-ratio: 4 / 3; border-radius: var(--r); background: var(--surface-950); border: 1px solid var(--line); overflow: hidden; }
.frame .scene svg { width: 100%; height: 100%; }
.frame h4 { font-size: 14px; font-weight: 900; color: var(--ink-hi); margin-top: 12px; letter-spacing: -0.01em; }
.frame p { font-size: 12.5px; color: var(--ink-mid); line-height: 1.45; margin-top: 4px; }
@media (max-width: 720px) { .frames { grid-template-columns: 1fr; } }
.scene .grid { stroke: var(--surface-500); stroke-width: 0.5; }
.scene .path { stroke: var(--accent); stroke-width: 1.5; fill: none; }
.scene .path.ghost { stroke: var(--crit); }
.scene .p { fill: var(--ink-mid); }
.scene .p.hot { fill: var(--crit); }
.scene .p.me { fill: var(--accent); }
.scene .lbl { fill: var(--muted); font-family: var(--mono); font-size: 7px; letter-spacing: 0.05em; }
.scene .ring { stroke: var(--crit); fill: none; stroke-width: 1; }
.scene .cloud { fill: var(--accent); opacity: 0.55; }
.scene .cloud.hot { fill: var(--crit); opacity: 0.85; }
.scene .axis { stroke: var(--surface-400); stroke-width: 0.6; }
.scene .scrub { stroke: var(--surface-400); }
.scene .scrub-on { stroke: var(--accent); stroke-width: 2; }
.scene .hud { fill: var(--surface-800); stroke: var(--line); }

/* --- Stats strip (act 07) ------------------------------------------------- */
.stats { display: grid; grid-template-columns: repeat(5, 1fr); border: 1px solid var(--line); border-radius: var(--r); background: var(--surface-800); overflow: hidden; }
.stat { padding: 18px 18px 16px; border-left: 1px solid var(--line); }
.stat:first-child { border-left: 0; }
.stat .v { display: block; font-weight: 900; font-size: clamp(1.4rem, 2.2vw, 1.9rem); color: var(--ink-hi); letter-spacing: -0.02em; line-height: 1; font-variant-numeric: tabular-nums; }
.stat .l { display: block; margin-top: 8px; font-family: var(--mono); font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); line-height: 1.4; }
@media (max-width: 860px) { .stats { grid-template-columns: repeat(3, 1fr); } .stat:nth-child(4) { border-left: 0; } .stat:nth-child(n+4) { border-top: 1px solid var(--line); } }
@media (max-width: 480px) { .stats { grid-template-columns: 1fr 1fr; } .stat:nth-child(odd) { border-left: 0; } .stat:nth-child(4) { border-left: 1px solid var(--line); } .stat:nth-child(n+3) { border-top: 1px solid var(--line); } }

.status { margin-top: 26px; display: grid; gap: 8px; }
.status .row { display: grid; grid-template-columns: 110px 1fr; gap: 14px; font-size: 14px; align-items: baseline; }
.status .row .k { font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.status .row .v { color: var(--ink-hi); }

/* --- Pricing ladder ------------------------------------------------------- */
.ladder { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.plan { display: flex; flex-direction: column; border-top: 3px solid var(--line-strong); }
.plan.hi { border-top-color: var(--accent); }
.plan .panel-body { padding: 18px 18px 20px; flex: 1; display: flex; flex-direction: column; }
.plan .name { font-weight: 900; font-size: 17px; color: var(--ink-hi); letter-spacing: -0.01em; display: flex; align-items: center; gap: 8px; }
.plan .tag { font-size: 14px; color: var(--ink-mid); margin-top: 4px; }
.plan .price { margin-top: 16px; font-weight: 900; font-size: clamp(1.9rem, 3vw, 2.4rem); color: var(--ink-hi); letter-spacing: -0.03em; line-height: 1; font-variant-numeric: tabular-nums; }
.plan .price small { font-family: var(--mono); font-size: 12px; font-weight: 400; color: var(--muted); letter-spacing: 0.02em; margin-left: 6px; }
.plan .per { font-family: var(--mono); font-size: 11.5px; color: var(--muted); margin-top: 6px; }
.plan ul { list-style: none; margin-top: 16px; display: grid; gap: 7px; font-size: 14px; color: var(--ink); }
.plan li { padding-left: 16px; position: relative; }
.plan li::before { content: ""; position: absolute; left: 0; top: 9px; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.plan li.no { color: var(--muted); }
.plan li.no::before { background: var(--surface-400); }
.plan .actions { margin-top: auto; padding-top: 22px; }
.plan .actions .btn { width: 100%; }
@media (max-width: 860px) { .ladder { grid-template-columns: 1fr; } }

/* --- Closing CTA ------------------------------------------------------------ */
.close .inner { max-width: 44rem; }
.close .display { max-width: 18ch; }
.close .actions { margin-top: 30px; }

/* =========================================================================
   Content pages (pricing / security / privacy / terms / onboarding / 404)
   ========================================================================= */
.doc { padding: clamp(48px, 7vw, 96px) 0 clamp(72px, 9vw, 120px); }
.doc .inner { max-width: 760px; }
.doc .inner.wide { max-width: var(--page); }
.doc .kicker { display: flex; align-items: center; gap: 12px; font-family: var(--mono); font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); margin-bottom: 22px; }
.doc .kicker::before { content: ""; width: 28px; height: 1px; background: var(--accent); }
.doc h1 { font-weight: 900; color: var(--ink-hi); letter-spacing: -0.025em; line-height: 1.04; font-size: clamp(2.1rem, 5vw, 3.6rem); text-wrap: balance; max-width: 16ch; }
.doc .lede { font-size: clamp(1.05rem, 1.4vw, 1.2rem); line-height: 1.55; color: var(--ink); margin-top: 22px; max-width: 38rem; }
.doc h2 { font-weight: 900; color: var(--ink-hi); font-size: clamp(1.35rem, 2.2vw, 1.7rem); letter-spacing: -0.015em; line-height: 1.2; margin-top: 56px; padding-top: 22px; border-top: 1px solid var(--line); }
.doc h3 { font-weight: 900; color: var(--ink-hi); font-size: 1.05rem; margin-top: 28px; }
.doc p { margin-top: 14px; max-width: 42rem; }
.doc ul, .doc ol { margin-top: 14px; padding-left: 0; list-style: none; display: grid; gap: 10px; max-width: 42rem; }
.doc li { padding-left: 18px; position: relative; }
.doc ul li::before { content: ""; position: absolute; left: 0; top: 10px; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.doc ol { counter-reset: n; }
.doc ol li { padding-left: 28px; }
.doc ol li::before { counter-increment: n; content: counter(n, decimal-leading-zero); position: absolute; left: 0; top: 2px; font-family: var(--mono); font-size: 12px; color: var(--accent-ink); }
.doc a:not(.btn) { color: var(--accent-ink); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--accent-line); }
.doc a:not(.btn):hover { text-decoration-color: var(--accent); }
.doc code { font-family: var(--mono); font-size: 0.9em; background: var(--surface-600); border: 1px solid var(--line); border-radius: 3px; padding: 1px 5px; color: var(--ink-hi); }
.doc pre { margin-top: 14px; padding: 14px 16px; background: var(--surface-800); border: 1px solid var(--line); border-radius: var(--r); overflow-x: auto; font-family: var(--mono); font-size: 13px; line-height: 1.5; color: var(--ink-hi); }
.doc pre code { background: none; border: 0; padding: 0; font-size: inherit; }
.doc table { width: 100%; border-collapse: collapse; margin-top: 16px; font-size: 14px; background: var(--surface-800); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.doc th { text-align: left; padding: 9px 12px; font-family: var(--mono); font-size: 11px; font-weight: 400; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); background: var(--surface-700); border-bottom: 1px solid var(--line); }
.doc td { padding: 10px 12px; border-bottom: 1px solid var(--line-faint); vertical-align: top; }
.doc tr:last-child td { border-bottom: 0; }
.doc .note {
  margin-top: 22px; padding: 14px 16px; max-width: 42rem;
  background: var(--surface-800); border: 1px solid var(--line); border-left: 3px solid var(--accent); border-radius: var(--r);
  font-size: 14.5px; color: var(--ink);
}
.doc .note .t { display: block; font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent-ink); margin-bottom: 6px; }
.doc .cols { display: grid; grid-template-columns: 1fr 1fr; gap: 24px 32px; margin-top: 8px; }
.doc .cols > * { margin-top: 0; }
.doc .cols h3 { margin-top: 20px; }
@media (max-width: 720px) { .doc .cols { grid-template-columns: 1fr; } }
.doc .actions { margin-top: 40px; }
.doc .faq h3 { margin-top: 26px; }
.doc .faq p { margin-top: 8px; }
.doc .steps-list li { padding: 14px 0 14px 34px; border-top: 1px solid var(--line); }
.doc .steps-list li::before { top: 16px; }

/* =========================================================================
   Footer
   ========================================================================= */
.site-footer { border-top: 1px solid var(--line); background: var(--surface-800); padding: 48px 0 40px; margin-top: 24px; }
.site-footer .grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 32px; }
.site-footer .col h5 { font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); font-weight: 400; margin-bottom: 12px; }
.site-footer .col a { display: block; font-size: 14px; color: var(--ink-mid); text-decoration: none; padding: 4px 0; }
.site-footer .col a:hover { color: var(--accent-ink); }
.site-footer .col a.brand { display: inline-flex; padding: 0; }
.site-footer .about { max-width: 30rem; }
.site-footer .about p { font-size: 14px; color: var(--ink-mid); margin-top: 14px; }
.site-footer .about .brand .word { font-size: 22px; }
.site-footer .legal { margin-top: 36px; padding-top: 18px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 10px 24px; font-family: var(--mono); font-size: 11.5px; color: var(--muted); }
@media (max-width: 760px) { .site-footer .grid { grid-template-columns: 1fr 1fr; } .site-footer .about { grid-column: 1 / -1; } }

/* Specificity overrides: the ladder also appears inside `.doc` on /pricing/,
   where the doc list/actions rules would otherwise win. */
.doc .plan ul { display: grid; gap: 7px; margin-top: 16px; max-width: none; }
.doc .plan li { padding-left: 16px; }
.doc .plan li::before { top: 9px; }
.doc .plan .actions { margin-top: auto; padding-top: 22px; }
@media (max-width: 560px) { .tbl .hide-sm { display: none; } }
