/* =========================================================================
   ATLAS - concept site
   Aesthetic: dark technical / editorial. Not an official design system.
   Tokens: CSS custom properties. Theme locked page-wide, toggleable.
   Radius rule (documented, applied everywhere):
     surfaces 12px  ·  controls 8px  ·  tags 999px
   ========================================================================= */

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { min-height: 100%; }
img, svg, video { display: block; max-width: 100%; }
button, input, textarea, select { font: inherit; color: inherit; }
a { color: inherit; }

/* ---------- tokens: single light system ---------- */
:root {
  color-scheme: light;

  --bg:        #fbfbf9;   /* page field, a shade off pure white */
  --bg-2:      #ffffff;   /* panels and cards sit above the field */
  --bg-3:      #f1f1ee;   /* hover and rest states */
  --bg-inset:  #f6f6f3;   /* code, terminals, wells */

  --line:        rgba(24,24,20,.11);
  --line-strong: rgba(24,24,20,.22);

  --text:   #191918;
  --text-2: #55555c;
  --text-3: #84848c;

  --accent:      #c2440d;
  --accent-soft: rgba(194,68,13,.075);
  --accent-line: rgba(194,68,13,.30);
  --on-accent:   #ffffff;

  /* semantic - used ONLY for real state in product content */
  --sig-blocked: #b3261e;
  --sig-clear:   #1f7a4d;

  --shadow: 0 1px 2px rgba(24,24,20,.05), 0 14px 36px rgba(24,24,20,.07);

  --r-surface: 12px;
  --r-control: 8px;
  --r-tag: 999px;

  --wrap: 1240px;
  --wrap-narrow: 780px;
  --gut: clamp(1.25rem, 4vw, 2.5rem);
  --sp: clamp(5rem, 9vw, 8.5rem);

  --font: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", "JetBrains Mono", monospace;

  --ease: cubic-bezier(.16,1,.3,1);
}

/* ---------- base ---------- */
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* film grain - fixed, non-scrolling, never repaints with content */
body::after {
  content: "";
  position: fixed; inset: 0;
  z-index: 90;
  pointer-events: none;
  opacity: .028;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

::selection { background: var(--accent); color: var(--on-accent); }

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

/* ---------- layout ---------- */
.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gut); }
.wrap-narrow { width: 100%; max-width: var(--wrap-narrow); margin-inline: auto; padding-inline: var(--gut); }
.section { padding-block: var(--sp); }
.section--tight { padding-block: clamp(3.5rem, 6vw, 5.5rem); }
.section--inset { background: var(--bg-2); border-block: 1px solid var(--line); }
.hr { height: 1px; background: var(--line); border: 0; }

.skip {
  position: absolute; left: 1rem; top: -100px;
  background: var(--accent); color: var(--on-accent);
  padding: .6rem 1rem; border-radius: var(--r-control); z-index: 200;
  transition: top .2s var(--ease);
}
.skip:focus { top: 1rem; }

/* ---------- typography ---------- */
h1, h2, h3, h4 { font-weight: 500; letter-spacing: -0.025em; line-height: 1.08; }
h1 { font-size: clamp(2.5rem, 5.6vw, 4.6rem); }
h2 { font-size: clamp(1.95rem, 3.6vw, 3.05rem); line-height: 1.1; }
h3 { font-size: clamp(1.15rem, 1.6vw, 1.45rem); line-height: 1.25; letter-spacing: -0.015em; }
h4 { font-size: 1rem; letter-spacing: -0.005em; }

p { color: var(--text-2); }
.lede { font-size: clamp(1.05rem, 1.5vw, 1.3rem); line-height: 1.5; color: var(--text-2); max-width: 62ch; letter-spacing: -0.01em; }
.body { max-width: 65ch; }
.small { font-size: .875rem; line-height: 1.55; }
.muted { color: var(--text-3); }
.on-text { color: var(--text); }
.mono { font-family: var(--mono); font-size: .8rem; letter-spacing: .01em; }
.accent { color: var(--accent); }
em { font-style: italic; line-height: 1.15; padding-bottom: .06em; }

.eyebrow {
  font-family: var(--mono);
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .2em;
  color: var(--text-3);
  display: block;
  margin-bottom: 1.15rem;
}

.stack > * + * { margin-top: 1.1rem; }
.stack-lg > * + * { margin-top: 2rem; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  white-space: nowrap;
  padding: .78rem 1.4rem;
  border-radius: var(--r-control);
  border: 1px solid transparent;
  font-size: .93rem; font-weight: 500; letter-spacing: -0.005em;
  text-decoration: none;
  cursor: pointer;
  transition: transform .18s var(--ease), background-color .18s var(--ease), border-color .18s var(--ease), color .18s var(--ease);
}
.btn:active { transform: translateY(1px) scale(.99); }

.btn--primary { background: var(--accent); color: var(--on-accent); }
.btn--primary:hover { background: color-mix(in srgb, var(--accent) 86%, white); }

.btn--ghost { border-color: var(--line-strong); color: var(--text); background: transparent; }
.btn--ghost:hover { border-color: var(--text-2); background: var(--bg-3); }

.btn--sm { padding: .55rem 1rem; font-size: .85rem; }

.btn-row { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; }

.link {
  color: var(--text); text-decoration: none;
  border-bottom: 1px solid var(--accent-line);
  padding-bottom: 1px;
  transition: color .18s var(--ease), border-color .18s var(--ease);
}
.link:hover { color: var(--accent); border-color: var(--accent); }

.arrow-link {
  display: inline-flex; align-items: center; gap: .5rem;
  text-decoration: none; font-size: .92rem; font-weight: 500; color: var(--text);
}
.arrow-link svg { transition: transform .22s var(--ease); }
.arrow-link:hover { color: var(--accent); }
.arrow-link:hover svg { transform: translateX(4px); }

/* ---------- tags ---------- */
.tag {
  display: inline-flex; align-items: center; gap: .4rem;
  font-family: var(--mono); font-size: .68rem; text-transform: uppercase; letter-spacing: .12em;
  padding: .3rem .7rem;
  border-radius: var(--r-tag);
  border: 1px solid var(--line);
  color: var(--text-3);
  background: var(--bg-2);
}
.tag--accent { color: var(--accent); border-color: var(--accent-line); background: var(--accent-soft); }
.tag--blocked { color: var(--sig-blocked); border-color: color-mix(in srgb, var(--sig-blocked) 40%, transparent); background: color-mix(in srgb, var(--sig-blocked) 10%, transparent); }
.tag--clear { color: var(--sig-clear); border-color: color-mix(in srgb, var(--sig-clear) 40%, transparent); background: color-mix(in srgb, var(--sig-clear) 10%, transparent); }

/* =========================================================================
   NAV
   ========================================================================= */
.nav-sentinel { position: absolute; top: 0; height: 1px; width: 100%; }

.nav {
  position: sticky; top: 0; z-index: 80;
  height: 68px;
  display: flex; align-items: center;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(14px) saturate(160%);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  border-bottom: 1px solid transparent;
  transition: border-color .25s var(--ease), background-color .25s var(--ease);
}
.nav.is-stuck { border-bottom-color: var(--line); background: color-mix(in srgb, var(--bg) 94%, transparent); }
@media (prefers-reduced-transparency: reduce) { .nav { background: var(--bg); backdrop-filter: none; } }

.nav__inner { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gut); display: flex; align-items: center; gap: 2rem; }

.brand { display: flex; align-items: center; gap: .6rem; text-decoration: none; flex-shrink: 0; }
.brand__mark { width: 22px; height: 22px; flex-shrink: 0; }
.brand__mark rect, .brand__mark path { transition: fill .25s var(--ease); }
.brand__name { font-size: 1.02rem; font-weight: 600; letter-spacing: .01em; }

.nav__links { display: flex; align-items: center; gap: 1.6rem; margin-left: auto; }
.nav__link {
  text-decoration: none; font-size: .89rem; color: var(--text-2); font-weight: 450;
  white-space: nowrap;
  transition: color .18s var(--ease);
}
.nav__link:hover { color: var(--text); }
.nav__link[aria-current="page"] { color: var(--text); }

.nav__actions { display: flex; align-items: center; gap: .6rem; margin-left: 1.4rem; }

.icon-btn {
  width: 36px; height: 36px;
  display: grid; place-items: center;
  border-radius: var(--r-control);
  border: 1px solid var(--line);
  background: transparent; color: var(--text-2);
  cursor: pointer;
  transition: color .18s var(--ease), border-color .18s var(--ease), background-color .18s var(--ease);
}
.icon-btn:hover { color: var(--text); border-color: var(--line-strong); background: var(--bg-3); }
.icon-btn svg { width: 17px; height: 17px; }

.nav__burger { display: none; }

.nav-drawer {
  position: fixed; inset: 68px 0 0 0; z-index: 79;
  background: var(--bg);
  padding: 2rem var(--gut) 3rem;
  overflow-y: auto;
  transform: translateY(-8px);
  opacity: 0; visibility: hidden;
  transition: opacity .22s var(--ease), transform .22s var(--ease), visibility .22s;
}
.nav-drawer.is-open { opacity: 1; visibility: visible; transform: none; }
.nav-drawer a {
  display: block; padding: .9rem 0; text-decoration: none;
  font-size: 1.35rem; letter-spacing: -0.02em;
  border-bottom: 1px solid var(--line);
  color: var(--text);
}
.nav-drawer .btn { margin-top: 1.75rem; width: 100%; }

@media (max-width: 900px) {
  .nav__links { display: none; }
  .nav__burger { display: grid; }
  .nav__actions { margin-left: auto; }
}
/* Below this the primary action would crowd the burger. It stays available
   at the foot of the drawer. */
@media (max-width: 480px) {
  .nav__actions > .btn { display: none; }
}

/* =========================================================================
   HERO (asymmetric split)
   ========================================================================= */
.hero { position: relative; padding-top: clamp(3rem, 6vw, 5.5rem); padding-bottom: clamp(4rem, 7vw, 7rem); overflow: hidden; }
.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}
.hero__title { max-width: 15ch; }
.hero__sub { margin-top: 1.6rem; max-width: 46ch; font-size: clamp(1.02rem, 1.35vw, 1.18rem); line-height: 1.55; }
.hero__cta { margin-top: 2.4rem; }

.hero__figure {
  position: relative;
  border-radius: var(--r-surface);
  overflow: hidden;
  border: 1px solid var(--line);
  aspect-ratio: 1 / 1.12;
  background: var(--bg-2);
}
/* Placeholder photography is treated as atmospheric texture, not as subject
   matter: desaturated, softened and duotoned so the composition reads as a
   graphic field. Swap in art-directed assets and drop the blur. */
.hero__figure img {
  width: 100%; height: 100%; object-fit: cover;
  opacity: .42;
  filter: grayscale(1) contrast(1.05) blur(2px);
  transform: scale(1.06);
}
.hero__figure::after {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(200deg, transparent 8%, var(--bg-2) 92%),
    linear-gradient(65deg, color-mix(in srgb, var(--accent) 34%, transparent), transparent 62%);
}

/* strata ladder overlaid on hero figure - real content, not chrome */
.strata {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 2;
  padding: 1.25rem;
  display: grid; gap: 1px;
}
.strata__row {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: .9rem;
  padding: .62rem .85rem;
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--line);
  font-family: var(--mono); font-size: .7rem; letter-spacing: .08em; text-transform: uppercase;
  color: var(--text-2);
}
.strata__row:first-child { border-radius: var(--r-control) var(--r-control) 0 0; }
.strata__row:last-child { border-radius: 0 0 var(--r-control) var(--r-control); }
.strata__row + .strata__row { border-top: 0; }
.strata__row[data-live="true"] { color: var(--text); border-color: var(--accent-line); background: color-mix(in srgb, var(--accent) 12%, color-mix(in srgb, var(--bg) 72%, transparent)); }
.strata__bar { height: 4px; background: var(--line-strong); border-radius: 2px; position: relative; overflow: hidden; }
.strata__bar i {
  position: absolute; inset: 0; width: 100%;
  background: var(--accent); border-radius: 2px;
  transform-origin: left; transform: scaleX(0);
  transition: transform 1.1s var(--ease);
}
.strata__row:nth-child(2) .strata__bar i { transition-delay: .1s; }
.strata__row:nth-child(3) .strata__bar i { transition-delay: .2s; }
.strata__row:nth-child(4) .strata__bar i { transition-delay: .3s; }
.is-in .strata__bar i { transform: scaleX(var(--fill, .5)); }

@media (max-width: 900px) {
  .hero__grid { grid-template-columns: 1fr; }
  .hero__figure { aspect-ratio: 16 / 11; }
  .hero__title { max-width: 100%; }
}

/* =========================================================================
   LOGO WALL (connectors)
   ========================================================================= */
.logowall { border-block: 1px solid var(--line); padding-block: 2.6rem; }
.logowall__label { font-size: .85rem; color: var(--text-3); margin-bottom: 1.6rem; }
.logowall__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(72px, 1fr));
  gap: clamp(1.25rem, 2.6vw, 2.25rem);
  align-items: center;
}
.logowall__grid img {
  height: 24px; width: auto; margin-inline: auto;
  opacity: .55;
  transition: opacity .22s var(--ease);
}
.logowall__grid img:hover { opacity: 1; }

/* =========================================================================
   FAILURE MODES (editorial stagger list)
   ========================================================================= */
.modes { display: grid; gap: 0; margin-top: 3.5rem; }
.mode {
  display: grid;
  grid-template-columns: 5.5rem minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(1rem, 3vw, 2.5rem);
  align-items: start;
  padding-block: clamp(1.9rem, 3.5vw, 2.9rem);
  border-top: 1px solid var(--line);
}
.mode:last-child { border-bottom: 1px solid var(--line); }
.mode__cost {
  font-family: var(--mono); font-size: .7rem; letter-spacing: .14em; text-transform: uppercase;
  color: var(--text-3); padding-top: .45rem;
}
.mode__title { transition: color .2s var(--ease); }
.mode:hover .mode__title { color: var(--accent); }
.mode__body { color: var(--text-2); }
.mode--lead { grid-template-columns: 5.5rem minmax(0, 1fr); }
.mode--lead .mode__title { font-size: clamp(1.5rem, 2.6vw, 2.1rem); font-weight: 500; letter-spacing: -0.025em; }
.mode--lead .mode__body { font-size: 1.05rem; margin-top: .9rem; max-width: 58ch; }

@media (max-width: 780px) {
  .mode, .mode--lead { grid-template-columns: 1fr; gap: .7rem; }
  .mode__cost { padding-top: 0; }
}

/* =========================================================================
   CHAIN (scroll-stepped)
   ========================================================================= */
.chain { position: relative; }
.chain__track {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  margin-top: 3.5rem;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--r-surface);
  overflow: hidden;
}
.chain__step {
  background: var(--bg);
  padding: clamp(1.6rem, 2.6vw, 2.4rem);
  position: relative;
  min-height: 200px;
  transition: background-color .5s var(--ease);
}
.chain__step.is-in { background: var(--bg-2); }
.chain__step::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 2px;
  background: var(--accent);
  transform: scaleX(0); transform-origin: left;
  transition: transform .7s var(--ease);
}
.chain__step.is-in::before { transform: scaleX(1); }
.chain__step:nth-child(2)::before { transition-delay: .12s; }
.chain__step:nth-child(3)::before { transition-delay: .24s; }
.chain__step:nth-child(4)::before { transition-delay: .36s; }
.chain__word { font-size: clamp(1.25rem, 2vw, 1.7rem); font-weight: 500; letter-spacing: -0.025em; }
.chain__desc { margin-top: .7rem; font-size: .92rem; color: var(--text-2); }
.chain__meta { margin-top: 1.4rem; }

@media (max-width: 860px) { .chain__track { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .chain__track { grid-template-columns: 1fr; } }

/* =========================================================================
   BENTO
   ========================================================================= */
.bento {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 14px;
  margin-top: 3.5rem;
}
.cell {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--r-surface);
  padding: clamp(1.5rem, 2.4vw, 2.1rem);
  background: var(--bg-2);
  overflow: hidden;
  display: flex; flex-direction: column;
  min-height: 230px;
  text-decoration: none;
  transition: border-color .22s var(--ease), transform .22s var(--ease);
}
a.cell:hover { border-color: var(--line-strong); transform: translateY(-2px); }
.cell__top { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: auto; }
.cell__ref { font-family: var(--mono); font-size: .68rem; letter-spacing: .14em; color: var(--text-3); text-transform: uppercase; }
.cell h3 { margin-top: 1.6rem; }
.cell p { margin-top: .65rem; font-size: .92rem; max-width: 42ch; }
.cell__go { margin-top: 1.2rem; color: var(--accent); font-size: .85rem; font-weight: 500; }

.cell--a { grid-column: span 4; min-height: 320px; }
.cell--b { grid-column: span 2; }
.cell--c { grid-column: span 2; }
.cell--d { grid-column: span 4; }
.cell--e { grid-column: span 3; }
.cell--f { grid-column: span 3; }

/* photographic cell */
.cell--photo { justify-content: flex-end; border-color: var(--line); }
.cell--photo img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  opacity: .38; filter: grayscale(1) contrast(1.02) blur(2px); transform: scale(1.06);
  z-index: 0;
}
.cell--photo::after {
  content: ""; position: absolute; inset: 0; z-index: 1;
  /* The photograph reads as a band across the top of the cell; copy sits on
     solid surface below it so contrast never depends on the image. */
  background:
    linear-gradient(0deg, var(--bg-2) 72%, color-mix(in srgb, var(--bg-2) 50%, transparent) 92%, transparent),
    linear-gradient(240deg, color-mix(in srgb, var(--accent) 26%, transparent), transparent 55%);
}
.cell--photo > *:not(img) { position: relative; z-index: 2; }

/* gradient cell */
.cell--grad { background:
    radial-gradient(120% 100% at 100% 0%, color-mix(in srgb, var(--accent) 26%, transparent), transparent 62%),
    var(--bg-2);
}

.cell__code {
  margin-top: 1.4rem;
  font-family: var(--mono); font-size: .74rem; line-height: 1.75;
  color: var(--text-2);
  white-space: pre;
  overflow-x: auto;
  padding: .9rem 1rem;
  background: var(--bg-inset);
  border: 1px solid var(--line);
  border-radius: var(--r-control);
}
.cell__code b { color: var(--accent); font-weight: 400; }

@media (max-width: 1000px) {
  .bento { grid-template-columns: repeat(2, 1fr); }
  .cell--a, .cell--b, .cell--c, .cell--d, .cell--e, .cell--f { grid-column: span 2; }
}
@media (max-width: 640px) {
  .bento { grid-template-columns: 1fr; }
  .cell--a, .cell--b, .cell--c, .cell--d, .cell--e, .cell--f { grid-column: span 1; }
}

/* =========================================================================
   QUESTION (role-switch panel)
   ========================================================================= */
.qsplit {
  display: grid;
  grid-template-columns: minmax(0, .82fr) minmax(0, 1.18fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: start;
}
.roles { display: flex; gap: .5rem; flex-wrap: wrap; margin-bottom: 1.5rem; }
.role {
  padding: .5rem .95rem;
  border-radius: var(--r-tag);
  border: 1px solid var(--line);
  background: transparent;
  color: var(--text-3);
  font-size: .84rem; font-weight: 500;
  cursor: pointer;
  transition: color .18s var(--ease), border-color .18s var(--ease), background-color .18s var(--ease);
}
.role:hover { color: var(--text); border-color: var(--line-strong); }
.role[aria-selected="true"] { color: var(--on-accent); background: var(--accent); border-color: var(--accent); }

.qcard {
  border: 1px solid var(--line);
  border-radius: var(--r-surface);
  background: var(--bg-2);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.qcard__head { padding: 1.4rem 1.5rem 1.2rem; border-bottom: 1px solid var(--line); }
.qcard__q { font-size: clamp(1.08rem, 1.5vw, 1.28rem); font-weight: 500; letter-spacing: -0.02em; color: var(--text); line-height: 1.35; }
.qcard__ev { margin-top: .85rem; font-family: var(--mono); font-size: .74rem; color: var(--text-3); line-height: 1.6; }
.qcard__body { padding: 1.25rem 1.5rem 1.5rem; }
.qcard__opts { display: grid; gap: .5rem; }
.qopt {
  display: flex; align-items: flex-start; gap: .85rem;
  width: 100%; text-align: left;
  padding: .85rem 1rem;
  border: 1px solid var(--line);
  border-radius: var(--r-control);
  background: var(--bg);
  color: var(--text);
  font-size: .92rem;
  cursor: pointer;
  transition: border-color .18s var(--ease), background-color .18s var(--ease), transform .12s var(--ease);
}
.qopt:hover { border-color: var(--accent-line); background: var(--accent-soft); }
.qopt:active { transform: scale(.995); }
.qopt__key { font-family: var(--mono); font-size: .7rem; color: var(--text-3); padding-top: .2rem; flex-shrink: 0; }
.qopt__note { display: block; color: var(--text-3); font-size: .8rem; margin-top: .2rem; }
.qcard__escapes { display: flex; flex-wrap: wrap; gap: .45rem; margin-top: 1rem; padding-top: 1rem; border-top: 1px dashed var(--line); }
.qcard__stakes {
  padding: 1rem 1.5rem;
  background: var(--accent-soft);
  border-top: 1px solid var(--accent-line);
  font-size: .88rem; color: var(--text);
}
.qpanel[hidden] { display: none; }

@media (max-width: 900px) { .qsplit { grid-template-columns: 1fr; } }

/* =========================================================================
   TABLE (difference report / spec tables)
   ========================================================================= */
.tablewrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-surface); background: var(--bg-2); }
table.data { width: 100%; border-collapse: collapse; min-width: 640px; }
table.data th, table.data td { text-align: left; padding: 1rem 1.25rem; vertical-align: top; }
table.data thead th {
  font-family: var(--mono); font-size: .68rem; text-transform: uppercase; letter-spacing: .14em;
  color: var(--text-3); font-weight: 400;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
table.data tbody tr + tr { border-top: 1px solid var(--line); }
table.data td { font-size: .92rem; color: var(--text-2); }
table.data td:first-child { color: var(--text); font-weight: 450; }
table.data td .mono { color: var(--text-3); }
table.data tr[data-state="blocked"] td:first-child { color: var(--sig-blocked); }
.num { font-family: var(--mono); font-size: .85rem; color: var(--text); }

/* =========================================================================
   PHASES (scroll-snap rail)
   ========================================================================= */
.rail {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(280px, 1fr);
  gap: 14px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 1rem;
  margin-top: 3rem;
  scrollbar-width: thin;
}
.rail::-webkit-scrollbar { height: 6px; }
.rail::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 3px; }
.phase {
  scroll-snap-align: start;
  border: 1px solid var(--line);
  border-radius: var(--r-surface);
  padding: 1.6rem;
  background: var(--bg-2);
  display: flex; flex-direction: column;
  min-height: 260px;
}
.phase[data-now="true"] { border-color: var(--accent-line); background: color-mix(in srgb, var(--accent) 7%, var(--bg-2)); }
.phase__name { font-size: 1.2rem; font-weight: 500; letter-spacing: -0.02em; }
.phase__caps { font-family: var(--mono); font-size: .7rem; letter-spacing: .1em; color: var(--text-3); margin-top: .5rem; }
.phase__body { margin-top: 1rem; font-size: .9rem; }
.phase__out { margin-top: auto; padding-top: 1.4rem; font-size: .84rem; color: var(--text-3); border-top: 1px solid var(--line); }

/* =========================================================================
   MANIFESTO / pull statement
   ========================================================================= */
.manifesto { background: var(--bg-2); border-block: 1px solid var(--line); }
.manifesto__text {
  font-size: clamp(1.6rem, 3.6vw, 2.9rem);
  line-height: 1.22; letter-spacing: -0.03em; font-weight: 400;
  color: var(--text);
  max-width: 22ch;
}
.manifesto__grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr); gap: clamp(2rem, 5vw, 4rem); align-items: end; }
@media (max-width: 860px) { .manifesto__grid { grid-template-columns: 1fr; } .manifesto__text { max-width: 100%; } }

/* =========================================================================
   PRINCIPLES / numbered grid
   ========================================================================= */
.principles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 clamp(2rem, 5vw, 4rem); margin-top: 3rem; }
.principle { padding-block: 1.75rem; border-top: 1px solid var(--line); }
.principle__k { font-family: var(--mono); font-size: .7rem; color: var(--accent); letter-spacing: .14em; }
.principle h3 { margin-top: .7rem; font-size: 1.12rem; }
.principle p { margin-top: .55rem; font-size: .92rem; }
@media (max-width: 760px) { .principles { grid-template-columns: 1fr; } }

/* =========================================================================
   SPLIT feature rows (used max twice per page)
   ========================================================================= */
.feat {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}
.feat--flip .feat__media { order: -1; }
.feat__media {
  border-radius: var(--r-surface); overflow: hidden; border: 1px solid var(--line);
  aspect-ratio: 5 / 4; background: var(--bg-2); position: relative;
}
.feat__media img {
  width: 100%; height: 100%; object-fit: cover;
  opacity: .4; filter: grayscale(1) contrast(1.02) blur(2px); transform: scale(1.06);
}
.feat__media::after {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(140deg, color-mix(in srgb, var(--accent) 30%, transparent), transparent 62%),
    linear-gradient(20deg, color-mix(in srgb, var(--bg-2) 70%, transparent), transparent 60%);
}
@media (max-width: 860px) { .feat { grid-template-columns: 1fr; } .feat--flip .feat__media { order: 0; } }

/* =========================================================================
   CODE BLOCK (envelope, YAML)
   ========================================================================= */
.code {
  border: 1px solid var(--line);
  border-radius: var(--r-surface);
  background: var(--bg-inset);
  overflow: hidden;
}
.code__bar {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: .7rem 1rem;
  border-bottom: 1px solid var(--line);
  font-family: var(--mono); font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; color: var(--text-3);
}
.code pre {
  margin: 0; padding: 1.25rem;
  overflow-x: auto;
  font-family: var(--mono); font-size: .78rem; line-height: 1.85;
  color: var(--text-2);
}
.code .k { color: var(--text); }
.code .v { color: var(--accent); }
.code .c { color: var(--text-3); font-style: italic; }

.copy-btn {
  border: 1px solid var(--line); background: transparent; color: var(--text-3);
  font-family: var(--mono); font-size: .68rem; letter-spacing: .1em; text-transform: uppercase;
  padding: .3rem .65rem; border-radius: var(--r-control); cursor: pointer;
  transition: color .18s var(--ease), border-color .18s var(--ease);
}
.copy-btn:hover { color: var(--text); border-color: var(--line-strong); }

/* =========================================================================
   BOARD columns (evidence states)
   ========================================================================= */
.board { display: grid; grid-template-columns: repeat(5, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r-surface); overflow: hidden; margin-top: 3rem; }
.col { background: var(--bg-2); padding: 1.25rem 1rem; min-height: 220px; }
.col__h { display: flex; align-items: baseline; justify-content: space-between; gap: .5rem; padding-bottom: .9rem; border-bottom: 1px solid var(--line); }
.col__name { font-size: .9rem; font-weight: 500; }
.col__n { font-family: var(--mono); font-size: .78rem; color: var(--text-3); }
.col__gate { margin-top: .9rem; font-size: .78rem; color: var(--text-3); line-height: 1.55; }
.col__gate strong { color: var(--accent); font-weight: 500; display: block; font-family: var(--mono); font-size: .66rem; letter-spacing: .12em; text-transform: uppercase; margin-bottom: .35rem; }
@media (max-width: 980px) { .board { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .board { grid-template-columns: 1fr; } }

/* =========================================================================
   PAGE HEADER (inner pages)
   ========================================================================= */
.phead { padding-top: clamp(3rem, 6vw, 5rem); padding-bottom: clamp(2.5rem, 5vw, 4rem); border-bottom: 1px solid var(--line); position: relative; }
.phead__grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: clamp(1.5rem, 4vw, 3.5rem); align-items: end; }
.phead h1 { font-size: clamp(2.2rem, 4.6vw, 3.9rem); max-width: 16ch; }
.phead .lede { margin-top: 1.3rem; }
.phead__aside { display: grid; gap: .8rem; padding-bottom: .4rem; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 1rem; padding-block: .6rem; border-top: 1px solid var(--line); font-size: .85rem; }
.kv dt { font-family: var(--mono); font-size: .68rem; letter-spacing: .12em; text-transform: uppercase; color: var(--text-3); padding-top: .15rem; }
.kv dd { margin: 0; color: var(--text-2); }
@media (max-width: 860px) { .phead__grid { grid-template-columns: 1fr; } .phead h1 { max-width: 100%; } }

/* =========================================================================
   HUB LINKS (platform page)
   ========================================================================= */
.hubs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 3rem; }
.hub {
  display: block; text-decoration: none;
  border: 1px solid var(--line); border-radius: var(--r-surface);
  padding: clamp(1.5rem, 2.4vw, 2rem);
  background: var(--bg-2);
  transition: border-color .22s var(--ease), transform .22s var(--ease);
}
.hub:hover { border-color: var(--accent-line); transform: translateY(-2px); }
.hub__ref { font-family: var(--mono); font-size: .68rem; letter-spacing: .14em; color: var(--accent); text-transform: uppercase; }
.hub h3 { margin-top: .8rem; }
.hub p { margin-top: .6rem; font-size: .92rem; }
@media (max-width: 760px) { .hubs { grid-template-columns: 1fr; } }

/* =========================================================================
   PAGER
   ========================================================================= */
.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line); border-top: 1px solid var(--line); }
.pager a { background: var(--bg); padding: clamp(1.75rem, 3vw, 2.5rem) var(--gut); text-decoration: none; transition: background-color .22s var(--ease); }
.pager a:hover { background: var(--bg-2); }
.pager a:last-child { text-align: right; }
.pager__dir { font-family: var(--mono); font-size: .68rem; letter-spacing: .14em; text-transform: uppercase; color: var(--text-3); }
.pager__t { display: block; margin-top: .5rem; font-size: clamp(1.05rem, 1.8vw, 1.4rem); letter-spacing: -0.02em; color: var(--text); }
@media (max-width: 600px) { .pager { grid-template-columns: 1fr; } .pager a:last-child { text-align: left; } }

/* =========================================================================
   CTA BAND
   ========================================================================= */
.cta { border-top: 1px solid var(--line); background:
  radial-gradient(80% 130% at 12% 0%, color-mix(in srgb, var(--accent) 15%, transparent), transparent 60%), var(--bg); }
.cta__grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: clamp(2rem, 5vw, 4rem); align-items: end; }
.cta h2 { max-width: 16ch; }
@media (max-width: 800px) { .cta__grid { grid-template-columns: 1fr; } }

/* =========================================================================
   FOOTER
   ========================================================================= */
.foot { border-top: 1px solid var(--line); padding-block: clamp(3rem, 5vw, 4.5rem) 2rem; background: var(--bg-2); }
.foot__grid { display: grid; grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr)); gap: clamp(2rem, 4vw, 3rem); }
.foot__col h4 { font-family: var(--mono); font-size: .68rem; letter-spacing: .14em; text-transform: uppercase; color: var(--text-3); font-weight: 400; margin-bottom: 1rem; }
.foot__col a:not(.brand) { display: block; text-decoration: none; color: var(--text-2); font-size: .9rem; padding-block: .35rem; transition: color .18s var(--ease); }
.foot__col a:not(.brand):hover { color: var(--accent); }
.foot__note { margin-top: 1rem; font-size: .88rem; color: var(--text-3); max-width: 34ch; }
.foot__base { margin-top: clamp(2.5rem, 5vw, 4rem); padding-top: 1.5rem; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between; font-size: .82rem; color: var(--text-3); }
@media (max-width: 820px) { .foot__grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .foot__grid { grid-template-columns: 1fr; } }

/* =========================================================================
   FORM
   ========================================================================= */
.form { display: grid; gap: 1.35rem; }
.field { display: grid; gap: .5rem; }
.field label { font-size: .88rem; font-weight: 500; color: var(--text); }
.field input, .field select, .field textarea {
  width: 100%;
  padding: .8rem .95rem;
  background: var(--bg-2);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-control);
  color: var(--text);
  font-size: .95rem;
  transition: border-color .18s var(--ease), background-color .18s var(--ease);
}
.field input::placeholder, .field textarea::placeholder { color: var(--text-3); }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--accent); outline: none; background: var(--bg); }
.field textarea { resize: vertical; min-height: 130px; }
.field__help { font-size: .82rem; color: var(--text-3); }
.field__err { font-size: .82rem; color: var(--sig-blocked); display: none; }
.field.is-invalid input, .field.is-invalid select, .field.is-invalid textarea { border-color: var(--sig-blocked); }
.field.is-invalid .field__err { display: block; }

.form__status { display: none; padding: 1rem 1.15rem; border-radius: var(--r-control); font-size: .9rem; border: 1px solid; }
.form__status.is-on { display: block; }
.form__status[data-kind="ok"] { color: var(--sig-clear); border-color: color-mix(in srgb, var(--sig-clear) 40%, transparent); background: color-mix(in srgb, var(--sig-clear) 9%, transparent); }
.form__status[data-kind="err"] { color: var(--sig-blocked); border-color: color-mix(in srgb, var(--sig-blocked) 40%, transparent); background: color-mix(in srgb, var(--sig-blocked) 9%, transparent); }

.btn[aria-busy="true"] { opacity: .7; pointer-events: none; }

.formsplit { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: clamp(2rem, 5vw, 4.5rem); align-items: start; }
@media (max-width: 880px) { .formsplit { grid-template-columns: 1fr; } }
.two-up { display: grid; grid-template-columns: 1fr 1fr; gap: 1.35rem; }
@media (max-width: 560px) { .two-up { grid-template-columns: 1fr; } }

/* =========================================================================
   MISC content blocks
   ========================================================================= */
.notecard {
  border: 1px solid var(--line); border-left: 2px solid var(--accent);
  border-radius: 0 var(--r-surface) var(--r-surface) 0;
  padding: 1.4rem 1.6rem; background: var(--bg-2);
}
.notecard p { color: var(--text); }

.ladder {
  display: grid; gap: 1px;
  background: var(--line); border: 1px solid var(--line);
  border-radius: var(--r-surface); overflow: hidden; margin-top: 2.5rem;
  container-type: inline-size;
}
/* Collapses on its own width, so a ladder placed in a narrow column
   behaves the same as one at a narrow viewport. */
@container (max-width: 620px) {
  .rung { grid-template-columns: auto 1fr; }
  .rung__m { grid-column: 2; text-align: left; }
}
.rung { background: var(--bg-2); padding: 1.1rem 1.4rem; display: grid; grid-template-columns: auto 1fr auto; gap: 1.2rem; align-items: center; }
.rung__n { font-family: var(--mono); font-size: .72rem; color: var(--text-3); }
.rung__t { font-size: .96rem; color: var(--text); }
.rung__m { font-size: .82rem; color: var(--text-3); text-align: right; }
@media (max-width: 620px) { .rung { grid-template-columns: auto 1fr; } .rung__m { grid-column: 2; text-align: left; } }

.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(1.5rem, 3vw, 3rem); margin-top: 3rem; }
.stat { border-top: 1px solid var(--line); padding-top: 1.25rem; }
.stat__v { font-family: var(--mono); font-size: clamp(1.7rem, 3.2vw, 2.5rem); color: var(--text); letter-spacing: -0.02em; }
.stat__l { margin-top: .6rem; font-size: .88rem; color: var(--text-2); max-width: 30ch; }
@media (max-width: 720px) { .stats { grid-template-columns: 1fr; } }

.chips { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 2rem; }

.accordion { border-top: 1px solid var(--line); margin-top: 2.5rem; }
.acc { border-bottom: 1px solid var(--line); }
.acc__btn {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 1.5rem;
  padding: 1.35rem 0; background: none; border: 0; cursor: pointer; text-align: left;
  font-size: 1.05rem; font-weight: 450; letter-spacing: -0.015em; color: var(--text);
}
.acc__btn:hover { color: var(--accent); }
.acc__icon { flex-shrink: 0; width: 16px; height: 16px; position: relative; }
.acc__icon::before, .acc__icon::after { content: ""; position: absolute; background: currentColor; border-radius: 1px; }
.acc__icon::before { left: 0; right: 0; top: 7.5px; height: 1.5px; }
.acc__icon::after { top: 0; bottom: 0; left: 7.5px; width: 1.5px; transition: transform .25s var(--ease); }
.acc[data-open="true"] .acc__icon::after { transform: scaleY(0); }
.acc__panel { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .3s var(--ease); }
.acc[data-open="true"] .acc__panel { grid-template-rows: 1fr; }
.acc__inner { overflow: hidden; }
.acc__inner > div { padding-bottom: 1.5rem; max-width: 68ch; }

/* =========================================================================
   REVEAL (IntersectionObserver driven)
   ========================================================================= */
[data-reveal] { opacity: 0; transform: translateY(18px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
[data-reveal].is-in { opacity: 1; transform: none; }
[data-reveal-delay="1"] { transition-delay: .07s; }
[data-reveal-delay="2"] { transition-delay: .14s; }
[data-reveal-delay="3"] { transition-delay: .21s; }
[data-reveal-delay="4"] { transition-delay: .28s; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
  [data-reveal] { opacity: 1; transform: none; }
  .strata__bar i { transform: scaleX(var(--fill, .5)); }
  .chain__step::before { transform: scaleX(1); }
}
