/* RIVPN.io — "the relationship ledger", public edition.
   One family (Atkinson Hyperlegible Next) carries every word; Mono appears only for real addresses and commands.
   Night ink and paper come from the console; the amber thread is used for the gate and the current page only.
   No inline styles or scripts anywhere (strict CSP in _headers). */

@font-face { font-family: "Atkinson Next"; src: url("/assets/fonts/atkinson-next-400.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Atkinson Next"; src: url("/assets/fonts/atkinson-next-400-italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Atkinson Next"; src: url("/assets/fonts/atkinson-next-700.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Atkinson Mono"; src: url("/assets/fonts/atkinson-mono-400.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }

:root {
  --night: #1a1c33;
  --night-2: #262947;
  --night-3: #2c2f55;
  --night-ink: #c9cce0;
  --night-faint: #8d91ad;
  --paper: #f3f4f8;
  --surface: #ffffff;
  --ink: #1a1c33;
  --muted: #565b74;
  --line: #dde0ea;
  --line-soft: #eceef4;
  --thread: #f2b33d;
  --refused: #e87b74;
  --stop: #bf3a2f;
  --live: #1f7a4d;
  --warn: #a15c00;
  --rel-1: #2a78d6; --rel-2: #eb6834; --rel-3: #1baf7a; --rel-4: #eda100; --rel-5: #e87ba4; --rel-6: #008300; --rel-7: #6250d6;
  --ui: "Atkinson Next", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --code: "Atkinson Mono", ui-monospace, "SF Mono", Consolas, monospace;
  --measure: 38rem;
  --wide: 76rem;
  --gutter: clamp(1.25rem, 4vw, 3rem);
  --step--1: 0.875rem;
  --step-0: 1.0625rem;
  --step-1: 1.3rem;
  --step-2: 1.62rem;
  --step-3: clamp(1.9rem, 3.2vw, 2.5rem);
  --step-4: clamp(2.4rem, 5vw, 3.75rem);
  --step-5: clamp(2.6rem, 6.6vw, 5.4rem);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 5rem; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--ui); font-size: var(--step-0); line-height: 1.55; font-variant-numeric: tabular-nums; text-rendering: optimizeLegibility; }
img, video, svg { max-width: 100%; display: block; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--thread); outline-offset: 3px; border-radius: 4px; }
p { margin: 0 0 1rem; max-width: var(--measure); }
h1, h2, h3, h4 { margin: 0; line-height: 1.12; letter-spacing: -0.018em; font-weight: 700; }
h2 { font-size: var(--step-4); letter-spacing: -0.03em; line-height: 1.04; }
h3 { font-size: var(--step-1); letter-spacing: -0.01em; line-height: 1.25; }
h4 { font-size: var(--step-0); letter-spacing: 0; }
code, .mono { font-family: var(--code); font-size: 0.92em; letter-spacing: -0.01em; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 1rem; top: -4rem; background: var(--thread); color: var(--night); padding: 0.6rem 1rem; z-index: 99; font-weight: 700; border-radius: 6px; }
.skip:focus { top: 1rem; }

.wrap { width: 100%; max-width: var(--wide); margin: 0 auto; padding: 0 var(--gutter); }

/* ── header ── */
.top { position: sticky; top: 0; z-index: 50; background: rgba(26, 28, 51, 0.92); backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px); color: var(--night-ink); border-bottom: 1px solid rgba(255,255,255,0.06); }
.top .wrap { display: flex; align-items: center; gap: 2rem; height: 4.25rem; }
.brand { display: flex; align-items: center; gap: 0.65rem; color: #fff; text-decoration: none; flex: none; }
.brand svg { width: 34px; height: 34px; }
.brand strong { font-size: 1.28rem; letter-spacing: 0.05em; }
.nav { display: flex; gap: 0.25rem; margin-right: auto; }
.nav a { color: var(--night-ink); text-decoration: none; padding: 0.45rem 0.75rem; border-radius: 6px; font-size: 0.98rem; }
.nav a:hover { color: #fff; background: rgba(255,255,255,0.06); }
.nav a[aria-current="page"] { color: #fff; box-shadow: inset 0 -2px 0 var(--thread); border-radius: 0; }
.top-actions { display: flex; align-items: center; gap: 0.6rem; }
.signin { color: var(--night-ink); text-decoration: none; padding: 0.45rem 0.6rem; font-size: 0.98rem; }
.signin:hover { color: #fff; }
.menu-btn { display: none; margin-left: auto; background: none; border: 1px solid rgba(255,255,255,0.2); color: #fff; border-radius: 6px; padding: 0.4rem 0.75rem; font: inherit; cursor: pointer; }

/* ── buttons ── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; font: inherit; font-weight: 700; text-decoration: none; cursor: pointer;
  padding: 0.78rem 1.35rem; border-radius: 999px; border: 1.5px solid transparent; line-height: 1.2; transition: background-color .15s, color .15s, border-color .15s; }
.btn-primary { background: var(--thread); color: var(--night); }
.btn-primary:hover { background: #ffc451; }
.btn-ghost { border-color: rgba(255,255,255,0.32); color: #fff; }
.btn-ghost:hover { border-color: #fff; }
.btn-dark { background: var(--night); color: #fff; }
.btn-dark:hover { background: var(--night-3); }
.btn-line { border-color: var(--ink); color: var(--ink); }
.btn-line:hover { background: var(--ink); color: #fff; }
.btn-sm { padding: 0.5rem 1rem; font-size: 0.95rem; }
.btn svg { width: 1.05em; height: 1.05em; }

/* ── hero (home) ── */
.hero { position: relative; background: radial-gradient(120% 90% at 70% 35%, #2c2f55 0%, #1a1c33 55%, #121428 100%); color: #fff; overflow: hidden; isolation: isolate; }
.hero .gate { position: absolute; inset: 0; z-index: -1; width: 100%; height: 100%; }
.hero .wrap { min-height: min(46rem, calc(100svh - 4.25rem)); display: grid; align-content: center; padding-top: 5rem; padding-bottom: 6rem; }
.hero h1 { font-size: var(--step-5); letter-spacing: -0.04em; line-height: 0.98; max-width: 12.5ch; }
.hero h1 span { display: block; }
.hero h1 span + span { color: var(--night-ink); }
.hero .lede { font-size: var(--step-1); line-height: 1.45; color: var(--night-ink); max-width: 34rem; margin: 1.8rem 0 2.2rem; }
.hero .ctas { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.ticker { position: absolute; right: var(--gutter); bottom: 2.25rem; width: min(25rem, 42vw); background: rgba(18,20,40,0.82); border: 1px solid rgba(255,255,255,0.1); border-left: 3px solid var(--refused); border-radius: 10px; padding: 0.95rem 1.1rem; font-size: 0.93rem; color: var(--night-ink); backdrop-filter: blur(6px); }
.ticker .t-head { display: flex; justify-content: space-between; gap: 1rem; color: #fff; font-weight: 700; margin-bottom: 0.3rem; }
.ticker .t-head small { font-weight: 400; color: var(--night-faint); }
.ticker p { margin: 0; }
.ticker code { color: #fff; }
.ticker .t-rule { margin-top: 0.35rem; color: var(--night-faint); font-size: 0.86rem; }
.ticker.swap { animation: tickerIn .5s ease-out; }
@keyframes tickerIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ── page hero (inner pages) ── */
.phero { background: var(--night); color: #fff; position: relative; overflow: hidden; }
.phero .wrap { padding-top: clamp(4rem, 9vw, 7rem); padding-bottom: clamp(3.5rem, 7vw, 5.5rem); position: relative; }
.phero .kicker { color: var(--thread); font-weight: 700; margin: 0 0 1rem; }
.phero h1 { font-size: var(--step-4); letter-spacing: -0.035em; line-height: 1.02; max-width: 18ch; }
.phero .lede { color: var(--night-ink); font-size: var(--step-1); line-height: 1.45; max-width: 38rem; margin: 1.5rem 0 0; }
.phero .ctas { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 2rem; }
.phero .strand { position: absolute; inset: auto 0 0 0; height: 100%; z-index: 0; pointer-events: none; opacity: 0.85; }
.phero .wrap > * { position: relative; z-index: 1; }

/* ── sections ── */
.sec { padding: clamp(4.5rem, 9vw, 7.5rem) 0; }
.sec-tight { padding: clamp(3rem, 6vw, 4.5rem) 0; }
.sec-white { background: var(--surface); }
.sec-night { background: var(--night); color: #fff; }
.sec-night p, .sec-night .muted { color: var(--night-ink); }
.sec-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 0.9fr); gap: 1.5rem 4rem; align-items: end; margin-bottom: clamp(2.5rem, 5vw, 4rem); }
.sec-head h2 { max-width: 16ch; }
.sec-head p { margin: 0; color: var(--muted); font-size: var(--step-1); line-height: 1.45; }
.sec-night .sec-head p { color: var(--night-ink); }
.muted { color: var(--muted); }
.small { font-size: var(--step--1); }
.source { font-size: 0.82rem; color: var(--muted); }
.sec-night .source { color: var(--night-faint); }

/* problem ledger: what breaks on the left, what RIVPN does on the right */
.ledger { border-top: 2px solid var(--ink); }
.ledger-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1rem 4rem; padding: 2rem 0; border-bottom: 1px solid var(--line); }
.ledger-row h3 { margin-bottom: 0.5rem; }
.ledger-row p { margin: 0; color: var(--muted); }
.ledger-row .fix { padding-left: 1.4rem; border-left: 3px solid var(--rel, var(--rel-1)); }
.ledger-row .fix h3 { color: var(--ink); }
.ledger-row:nth-child(2) .fix { --rel: var(--rel-3); }
.ledger-row:nth-child(3) .fix { --rel: var(--rel-7); }
.ledger-row:nth-child(4) .fix { --rel: var(--rel-2); }
.ledger-head { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; padding: 0.9rem 0; color: var(--muted); font-size: 0.95rem; border-bottom: 1px solid var(--line); }

/* stats */
.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2.5rem 4rem; margin-top: 3.5rem; }
.fact .num { font-size: clamp(3.4rem, 8vw, 6rem); font-weight: 700; line-height: 0.9; letter-spacing: -0.045em; }
.fact .num.stop { color: var(--stop); }
.fact p { margin: 0.8rem 0 0.4rem; font-size: var(--step-1); line-height: 1.35; max-width: 26rem; }

/* film */
.film { position: relative; border-radius: 14px; overflow: hidden; background: #000; box-shadow: 0 30px 80px -30px rgba(10,12,30,.65); }
.film video { width: 100%; aspect-ratio: 16 / 9; }

/* four steps — a real sequence */
.steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); counter-reset: step; border-top: 1px solid rgba(255,255,255,0.14); }
.step { padding: 1.8rem 1.6rem 0.5rem 0; position: relative; }
.step + .step { padding-left: 1.6rem; border-left: 1px solid rgba(255,255,255,0.14); }
.step .n { font-family: var(--code); color: var(--thread); font-size: 0.95rem; }
.step h3 { font-size: var(--step-2); margin: 0.5rem 0 0.7rem; }
.step p { font-size: 0.98rem; }
.sec:not(.sec-night) .steps { border-top-color: var(--line); }
.sec:not(.sec-night) .step + .step { border-left-color: var(--line); }
.sec:not(.sec-night) .step .n { color: var(--warn); }

/* scenario player */
.player { display: grid; grid-template-columns: 17rem minmax(0, 1fr); gap: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.player [role="tablist"] { display: flex; flex-direction: column; border-right: 1px solid var(--line); background: #fafbfd; }
.player [role="tab"] { text-align: left; font: inherit; border: 0; background: none; padding: 1.15rem 1.3rem; cursor: pointer; border-bottom: 1px solid var(--line-soft); color: var(--muted); display: grid; gap: 0.15rem; border-left: 3px solid transparent; }
.player [role="tab"] strong { color: var(--ink); font-size: 1.02rem; }
.player [role="tab"] span { font-size: 0.88rem; }
.player [role="tab"][aria-selected="true"] { background: var(--surface); border-left-color: var(--c, var(--rel-1)); }
.player [role="tab"]:hover { color: var(--ink); }
.player [role="tabpanel"] { padding: 1.6rem 1.8rem 1.8rem; min-width: 0; }
.scene { width: 100%; height: auto; margin: 0.2rem 0 1.2rem; }
.scene .lbl { font-family: var(--ui); font-size: 13px; fill: var(--muted); }
.scene .lbl-strong { font-family: var(--ui); font-size: 14px; font-weight: 700; fill: var(--ink); }
.scene .addr { font-family: var(--code); font-size: 12.5px; fill: var(--muted); }
.why { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1.25rem 2rem; }
.why dl { margin: 0; display: grid; grid-template-columns: 6.5rem minmax(0, 1fr); gap: 0.45rem 1rem; font-size: 0.95rem; align-content: start; }
.why dt { color: var(--muted); }
.why dd { margin: 0; overflow-wrap: anywhere; }
.why .panel-title { font-weight: 700; margin: 0 0 0.7rem; display: flex; align-items: center; gap: 0.5rem; }
.why .panel-title::before { content: ""; width: 0.65rem; height: 0.65rem; border-radius: 2px; background: var(--stop); }
.why .next h4 { margin-bottom: 0.4rem; }
.why .next p { font-size: 0.95rem; color: var(--muted); }
.ri-note { margin-top: 1rem; padding: 0.85rem 1rem; background: #f6f3ff; border-radius: 8px; font-size: 0.92rem; color: #3b3270; max-width: none; }
.sample { font-size: 0.8rem; color: var(--muted); margin-top: 0.8rem; }

/* console tour */
.tour > div { min-width: 0; }
.tour { display: grid; grid-template-columns: 19rem minmax(0, 1fr); gap: 2.5rem; align-items: start; }
.tour-list { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--line); }
.tour-list button { width: 100%; text-align: left; font: inherit; background: none; border: 0; border-bottom: 1px solid var(--line); padding: 1rem 0 1rem 1rem; cursor: pointer; color: var(--muted); border-left: 3px solid transparent; }
.tour-list button strong { display: block; color: var(--ink); }
.tour-list button span { display: none; font-size: 0.93rem; margin-top: 0.35rem; }
.tour-list button[aria-selected="true"] { border-left-color: var(--thread); }
.tour-list button[aria-selected="true"] span { display: block; }
.shot { margin: 0; }
.shot .frame { border-radius: 12px; overflow: hidden; border: 1px solid var(--line); box-shadow: 0 24px 60px -28px rgba(26,28,51,.45); background: var(--surface); }
.shot img { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; object-position: top left; }
.shot figcaption { margin-top: 0.8rem; font-size: 0.85rem; color: var(--muted); }

/* five outcomes */
.outcomes { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0; border-top: 1px solid rgba(255,255,255,0.14); }
.outcome { padding: 1.6rem 1.3rem 0 0; }
.outcome + .outcome { padding-left: 1.3rem; border-left: 1px solid rgba(255,255,255,0.14); }
.outcome i { display: block; width: 2.2rem; height: 4px; border-radius: 4px; background: var(--c); margin-bottom: 1.2rem; }
.outcome h3 { margin-bottom: 0.6rem; }
.outcome p { font-size: 0.96rem; }
.principle { margin-top: clamp(3rem, 6vw, 4.5rem); display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 2rem 4rem; align-items: center; }
.principle blockquote { margin: 0; font-size: var(--step-3); line-height: 1.15; letter-spacing: -0.025em; font-weight: 700; color: #fff; }

/* audience split */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
.door { display: flex; flex-direction: column; gap: 1rem; padding: clamp(1.8rem, 4vw, 2.8rem); border-radius: 16px; text-decoration: none; min-height: 22rem; transition: transform .2s ease; }
.door:hover { transform: translateY(-3px); }
.door h3 { font-size: var(--step-3); letter-spacing: -0.025em; line-height: 1.08; }
.door p { margin: 0; }
.door ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 0.45rem; }
.door li { padding-left: 1.1rem; position: relative; }
.door li::before { content: ""; position: absolute; left: 0; top: 0.68em; width: 0.45rem; height: 2px; background: currentColor; opacity: 0.6; }
.door .go { margin-top: auto; font-weight: 700; text-decoration: underline; text-underline-offset: 0.25em; }
.door-ciso { background: var(--night); color: #fff; }
.door-ciso p, .door-ciso li { color: var(--night-ink); }
.door-cio { background: var(--surface); color: var(--ink); border: 1px solid var(--line); }
.door-cio p, .door-cio li { color: var(--muted); }

/* industries index */
.ind-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.ind-grid a { display: block; padding: 1.5rem 1.5rem 1.6rem; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); text-decoration: none; background: var(--surface); position: relative; }
.ind-grid a::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--c); transform: scaleY(0); transform-origin: top; transition: transform .2s ease; }
.ind-grid a:hover::before, .ind-grid a:focus-visible::before { transform: scaleY(1); }
.ind-grid h3 { margin-bottom: 0.45rem; }
.ind-grid p { margin: 0; color: var(--muted); font-size: 0.96rem; }

/* deployment facts */
.specs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2.2rem 3rem; }
.spec h3 { font-size: 1.08rem; margin-bottom: 0.4rem; }
.spec p { margin: 0; color: var(--muted); font-size: 0.98rem; }
.sec-night .spec p { color: var(--night-ink); }

/* CTA band */
.cta-band { background: var(--thread); color: var(--night); }
.cta-band .wrap { display: grid; grid-template-columns: minmax(0, 1.3fr) auto; gap: 2rem 4rem; align-items: center; padding-top: clamp(3.5rem, 7vw, 5rem); padding-bottom: clamp(3.5rem, 7vw, 5rem); }
.cta-band h2 { font-size: var(--step-3); max-width: 20ch; }
.cta-band p { margin: 1rem 0 0; font-size: var(--step-1); line-height: 1.4; }
.cta-band .ctas { display: flex; gap: 0.75rem; flex-wrap: wrap; }

/* tables */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
table { width: 100%; border-collapse: collapse; font-size: 0.97rem; }
th, td { text-align: left; vertical-align: top; padding: 0.95rem 1.1rem; border-bottom: 1px solid var(--line-soft); }
thead th { font-weight: 700; color: var(--muted); font-size: 0.9rem; background: #fafbfd; border-bottom: 1px solid var(--line); }
tbody tr:last-child td, tbody tr:last-child th { border-bottom: 0; }
tbody th { font-weight: 700; width: 22%; }
.pill { display: inline-flex; align-items: center; gap: 0.4rem; font-size: 0.86rem; font-weight: 700; white-space: nowrap; }
.pill::before { content: ""; width: 0.55rem; height: 0.55rem; border-radius: 50%; background: currentColor; }
.pill.today { color: var(--live); }
.pill.ri { color: #5444c4; }
.pill.dev { color: var(--warn); }
.pill.plan { color: var(--muted); }
.pill.ri::before { border-radius: 2px; transform: rotate(45deg); }
.pill.plan::before { background: none; border: 1.5px solid currentColor; }
.legend { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; margin: 0 0 1rem; font-size: 0.92rem; color: var(--muted); }

/* columns of prose */
.cols-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2.5rem 4rem; }
.cols-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2.5rem 3rem; }
.item h3 { margin-bottom: 0.55rem; }
.item p { color: var(--muted); margin: 0; }
.sec-night .item p { color: var(--night-ink); }
.item .rule { display: block; width: 2rem; height: 3px; border-radius: 3px; background: var(--c, var(--thread)); margin-bottom: 1rem; }

/* industries page */
.ind-nav { position: sticky; top: 4.25rem; z-index: 20; background: rgba(243,244,248,0.95); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.ind-nav .wrap { display: flex; gap: 0.35rem; overflow-x: auto; padding-top: 0.6rem; padding-bottom: 0.6rem; scrollbar-width: none; }
.ind-nav .wrap::-webkit-scrollbar { display: none; }
.ind-nav a { flex: none; text-decoration: none; padding: 0.4rem 0.85rem; border-radius: 999px; font-size: 0.93rem; color: var(--muted); border: 1px solid transparent; }
.ind-nav a:hover { color: var(--ink); border-color: var(--line); }
.ind-nav a.on { color: var(--ink); background: var(--surface); border-color: var(--line); box-shadow: inset 3px 0 0 var(--c); }
.vertical { padding: clamp(3.5rem, 7vw, 5.5rem) 0; border-bottom: 1px solid var(--line); }
.vertical:nth-of-type(even) { background: var(--surface); }
.v-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1.5rem 4rem; margin-bottom: 2.5rem; }
.v-head h2 { font-size: var(--step-3); letter-spacing: -0.028em; max-width: 18ch; display: flex; gap: 0.9rem; align-items: baseline; }
.v-head h2::before { content: ""; flex: none; width: 0.9rem; height: 0.9rem; border-radius: 3px; background: var(--c); transform: translateY(-0.05em); }
.v-head .situation { font-size: var(--step-1); line-height: 1.45; color: var(--muted); margin: 0; }
.v-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 2.5rem 4rem; }
.v-body h3 { font-size: 1.05rem; margin: 0 0 0.5rem; }
.v-body .block + .block { margin-top: 1.6rem; }
.v-body p { color: var(--muted); }
.v-body ul { margin: 0; padding-left: 1.1rem; color: var(--muted); display: grid; gap: 0.4rem; }
.v-body li::marker { color: var(--c); }
.rels { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--surface); }
.rels .rels-head { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) 6.5rem; gap: 1rem; padding: 0.7rem 1rem 0.7rem 1.2rem; font-size: 0.85rem; color: var(--muted); background: #fafbfd; border-bottom: 1px solid var(--line); }
.rel { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) 6.5rem; gap: 1rem; padding: 0.9rem 1rem 0.9rem 1.2rem; border-bottom: 1px solid var(--line-soft); border-left: 4px solid var(--rc); font-size: 0.93rem; }
.rel:last-child { border-bottom: 0; }
.rel strong { display: block; }
.rel span { color: var(--muted); font-size: 0.86rem; }
.rel code { font-size: 0.84rem; color: var(--ink); }
.rel .end { color: var(--muted); font-size: 0.86rem; }
.rel.refused { border-left-color: var(--stop); background: #fdf6f5; }
.rel.refused strong { color: var(--stop); }
.rels-note { font-size: 0.8rem; color: var(--muted); margin: 0.6rem 0 0; }
.proves { margin-top: 1.6rem; padding: 1.1rem 1.2rem; border-radius: 10px; background: var(--paper); border: 1px dashed var(--line); }
.vertical:nth-of-type(odd) .proves { background: var(--surface); }
.proves h3 { margin-bottom: 0.3rem; }
.proves p { margin: 0; }

/* architecture diagram */
.arch { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: clamp(1rem, 3vw, 2rem); }
.arch svg { width: 100%; height: auto; }
.arch text { font-family: var(--ui); }
.arch .t-strong { font-size: 15px; font-weight: 700; fill: var(--ink); }
.arch .t { font-size: 13px; fill: var(--muted); }
.arch .t-mono { font-family: var(--code); font-size: 12px; fill: var(--muted); }

/* pilot form */
.form { display: grid; gap: 1.1rem; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: clamp(1.5rem, 3vw, 2.2rem); }
.form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; }
.form label { display: grid; gap: 0.35rem; font-weight: 700; font-size: 0.95rem; }
.form label span { font-weight: 400; color: var(--muted); font-size: 0.88rem; }
.form input, .form select, .form textarea { font: inherit; font-weight: 400; padding: 0.7rem 0.8rem; border: 1px solid #c9cddb; border-radius: 8px; background: #fff; color: var(--ink); width: 100%; }
.form textarea { min-height: 7rem; resize: vertical; }
.form input:focus, .form select:focus, .form textarea:focus { outline: 3px solid rgba(242,179,61,.55); border-color: var(--ink); }
.form .fine { font-size: 0.86rem; color: var(--muted); margin: 0; }
.form .err { color: var(--stop); font-size: 0.9rem; margin: 0; min-height: 1.2em; }
.form fieldset { border: 0; padding: 0; margin: 0; display: grid; gap: 0.5rem; }
.form legend { font-weight: 700; font-size: 0.95rem; margin-bottom: 0.4rem; }
.choices { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; }
.choices label { font-weight: 400; display: flex; gap: 0.55rem; align-items: flex-start; padding: 0.65rem 0.8rem; border: 1px solid var(--line); border-radius: 8px; cursor: pointer; }
.choices input { width: auto; margin-top: 0.25rem; accent-color: var(--night); }
.choices label:has(input:checked) { border-color: var(--ink); background: #f7f8fb; }

/* footer */
.foot { background: #121428; color: var(--night-ink); padding: 4rem 0 2.5rem; font-size: 0.95rem; }
.foot .grid { display: grid; grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr)); gap: 2rem 3rem; }
.foot h4 { color: #fff; font-size: 0.98rem; margin-bottom: 0.8rem; }
.foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.45rem; }
.foot a { color: var(--night-ink); text-decoration: none; }
.foot a:hover { color: #fff; text-decoration: underline; }
.foot .tag { color: #fff; font-weight: 700; font-size: 1.15rem; line-height: 1.3; margin: 1rem 0 0.5rem; max-width: 20rem; }
.foot .base { margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid rgba(255,255,255,0.08); display: flex; flex-wrap: wrap; gap: 0.5rem 2rem; justify-content: space-between; color: var(--night-faint); font-size: 0.86rem; }
.foot .base p { margin: 0; max-width: none; }

/* page-level helpers */
.lead-in { font-size: var(--step-1); line-height: 1.45; color: var(--muted); max-width: 42rem; }
.stack > * + * { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; } .mt-3 { margin-top: 3rem; } .mt-4 { margin-top: 4rem; }
.c1 { --c: var(--rel-1); --rc: var(--rel-1); } .c2 { --c: var(--rel-2); --rc: var(--rel-2); } .c3 { --c: var(--rel-3); --rc: var(--rel-3); }
.c4 { --c: var(--rel-4); --rc: var(--rel-4); } .c5 { --c: var(--rel-5); --rc: var(--rel-5); } .c6 { --c: var(--rel-6); --rc: var(--rel-6); }
.c7 { --c: var(--rel-7); --rc: var(--rel-7); } .cT { --c: var(--thread); --rc: var(--thread); } .cR { --c: var(--refused); --rc: var(--stop); }
.questions { counter-reset: q; display: grid; gap: 1.2rem; padding: 0; margin: 0; list-style: none; }
.questions li { counter-increment: q; display: grid; grid-template-columns: 2.5rem 1fr; font-size: var(--step-1); line-height: 1.4; }
.questions li::before { content: counter(q); font-family: var(--code); color: var(--thread); font-size: 1rem; padding-top: 0.25rem; }
.notfound { min-height: 60vh; display: grid; align-content: center; }

/* ── responsive ── */
@media (max-width: 1080px) {
  .nav { display: none; }
  .menu-btn { display: inline-block; }
  .top-actions .signin { display: none; }
  .top-actions { margin-left: 0; }
  .top.open .nav { display: flex; flex-direction: column; position: absolute; top: 4.25rem; left: 0; right: 0; background: var(--night); padding: 0.75rem var(--gutter) 1.25rem; border-bottom: 1px solid rgba(255,255,255,0.08); }
  .top.open .nav a { padding: 0.8rem 0.25rem; font-size: 1.05rem; border-bottom: 1px solid rgba(255,255,255,0.06); border-radius: 0; }
  .top.open .nav .m-signin { display: block; }
  .outcomes { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 2rem; }
  .outcome + .outcome { padding-left: 0; border-left: 0; }
  .outcome { padding-right: 1.5rem; }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .step:nth-child(3) { padding-left: 0; border-left: 0; }
  .tour { grid-template-columns: 1fr; }
  .tour-list { display: flex; overflow-x: auto; border-top: 0; gap: 0.25rem; scrollbar-width: none; }
  .tour-list li { flex: none; }
  .tour-list button { border: 1px solid var(--line); border-radius: 999px; padding: 0.45rem 0.9rem; }
  .tour-list button[aria-selected="true"] { background: var(--ink); border-color: var(--ink); }
  .tour-list button[aria-selected="true"] strong { color: #fff; }
  .tour-list button span, .tour-list button[aria-selected="true"] span { display: none; }
  .tour-caption { display: block; }
  .ind-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .foot .grid { grid-template-columns: 1fr 1fr; }
}
.nav .m-signin { display: none; }
.tour-caption { display: none; margin: 0 0 1rem; color: var(--muted); }
@media (max-width: 860px) {
  .sec-head, .ledger-row, .principle, .v-head, .v-body, .cols-2, .split, .why, .cta-band .wrap, .ledger-head { grid-template-columns: 1fr; }
  .ledger-head { display: none; }
  .ledger-row { gap: 1.2rem; }
  .cols-3, .specs { grid-template-columns: 1fr 1fr; }
  .player { grid-template-columns: 1fr; }
  .player [role="tablist"] { flex-direction: row; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--line); scrollbar-width: none; }
  .player [role="tab"] { flex: none; border-left: 0; border-bottom: 3px solid transparent; padding: 0.9rem 1rem; }
  .player [role="tab"] span { display: none; }
  .player [role="tab"][aria-selected="true"] { border-bottom-color: var(--c, var(--rel-1)); }
  .player [role="tabpanel"] { padding: 1.3rem 1.1rem 1.4rem; }
  .ticker { position: relative; right: auto; bottom: auto; width: auto; margin: -3rem var(--gutter) 2rem; }
  .hero .wrap { padding-top: 13.5rem; padding-bottom: 4rem; }
  .facts { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  :root { --step-0: 1rem; }
  .steps, .outcomes, .cols-3, .specs, .ind-grid, .choices, .form .row { grid-template-columns: 1fr; }
  .step + .step { padding-left: 0; border-left: 0; border-top: 1px solid rgba(255,255,255,0.14); }
  .sec:not(.sec-night) .step + .step { border-top-color: var(--line); }
  .why dl { grid-template-columns: 5.5rem minmax(0, 1fr); }
  .rels .rels-head { display: none; }
  .rel { grid-template-columns: 1fr; gap: 0.3rem; }
  .foot .grid { grid-template-columns: 1fr; }
  .top-actions .btn { padding: 0.5rem 0.85rem; font-size: 0.92rem; }
  .brand strong { font-size: 1.1rem; }
  .top .wrap { gap: 0.75rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
@media (max-width: 1080px) { .tour-caption { display: block; } }
.phero .strand { -webkit-mask-image: linear-gradient(to right, transparent 38%, #000 70%); mask-image: linear-gradient(to right, transparent 38%, #000 70%); }
@media (max-width: 860px) { .phero .strand { opacity: 0.35; } }
