/*
  OutOS. production deck - First Proof Dark approved as the principal
  site. Scene paging with synchronized layer parallax, richer masthead
  field, the software carousel, one inverted paper scene. Montserrat
  500, letter-spacing 0, monochrome.
*/
:root {
  --ink-bg: #0C0C0C;
  --tx: #F4F4F0;
  --tx-muted: rgba(244,244,240,0.62);
  --tx-dim: rgba(244,244,240,0.38);
  --hair: rgba(244,244,240,0.16);
  --hair-strong: rgba(244,244,240,0.38);
  --paper: #F4F4F0;
  --paper-ink: #0A0A0A;
  --paper-muted: rgba(10,10,10,0.58);
  --paper-hair: rgba(10,10,10,0.2);
  --page-t: 880ms cubic-bezier(0.16, 1, 0.3, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: clamp(15px, 14px + 0.2vw, 19px); }
body {
  background: var(--ink-bg);
  color: var(--tx);
  font-family: "Montserrat", "Inter", "Segoe UI Variable Display", "Segoe UI", system-ui, sans-serif;
  font-weight: 500;
  line-height: 1.55;
  font-variant-numeric: tabular-nums;
  overflow-x: hidden;
}
/* paged mode locks native scroll; the engine moves the stage */
html.paged, html.paged body { overflow: hidden; height: 100%; }
.mono { font-family: "Cascadia Mono", Consolas, ui-monospace, monospace; }
a { color: inherit; }

/* ---------- fixed parallax backdrop ------------------------------------- */
.backdrop { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.backdrop .dotfar,
.backdrop .dotnear {
  position: absolute;
  inset: -60% 0;
  will-change: transform;
  transition: transform var(--page-t);
}
.backdrop .dotfar {
  background-image: radial-gradient(circle, rgba(244,244,240,0.10) 1px, transparent 1.5px);
  background-size: 210px 230px;
}
.backdrop .dotnear {
  background-image: radial-gradient(circle, rgba(244,244,240,0.17) 1.2px, transparent 1.8px);
  background-size: 120px 135px;
  background-position: 60px 40px;
}

/* ---------- top bar ------------------------------------------------------ */
.topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 30px;
  padding: 13px 26px;
  background: rgba(12,12,12,0.86);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--hair);
}
.topbar .brand { line-height: 0; }
.topbar .brand img { height: 30px; width: auto; display: block; }
.topbar .menu { display: flex; gap: 6px; flex-wrap: wrap; min-width: 0; }
.topbar .menu a {
  text-decoration: none;
  color: var(--tx-muted);
  font-size: 0.82rem;
  font-weight: 600;
  padding: 7px 12px;
  transition: color 0.2s ease;
}
.topbar .menu a:hover, .topbar .menu a.on { color: var(--tx); }
.topbar .meta {
  margin-left: auto;
  font-size: 0.64rem;
  text-transform: uppercase;
  color: var(--tx-dim);
  white-space: nowrap;
}

/* ---------- stage + scenes ----------------------------------------------- */
.stage {
  position: relative;
  z-index: 1;
  will-change: transform;
  transition: transform var(--page-t);
}
html:not(.paged) .stage { transition: none; }
.scene {
  position: relative;
  min-height: 100svh;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-bottom: 1px solid var(--hair);
  padding: 90px 0 60px;
}
html.paged .scene { height: 100vh; min-height: 0; }
.scene .inner {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100vw - 48px));
  opacity: 0;
  transform: translateY(34px);
  transition: opacity 1.05s ease, transform 1.05s cubic-bezier(0.16, 1, 0.3, 1);
}
.scene.in .inner { opacity: 1; transform: none; }

.ghost {
  position: absolute;
  right: -2vw;
  bottom: -6vh;
  z-index: 1;
  font-size: clamp(220px, 44vw, 620px);
  font-weight: 300;
  line-height: 0.8;
  color: rgba(244,244,240,0.045);
  pointer-events: none;
  will-change: transform;
  transition: transform var(--page-t);
}
.scene.invert .ghost { color: rgba(10,10,10,0.05); }

.arc {
  position: absolute;
  border: 1px solid var(--hair);
  border-radius: 50%;
  pointer-events: none;
  -webkit-mask-image: conic-gradient(#000 0 110deg, transparent 110deg 360deg);
  mask-image: conic-gradient(#000 0 110deg, transparent 110deg 360deg);
  animation: arc-turn 90s linear infinite;
}
.arc.a1 { width: 130vmax; height: 130vmax; left: -75vmax; top: -55vmax; }
.arc.a2 { width: 90vmax; height: 90vmax; left: -48vmax; top: -30vmax; animation-duration: 140s; animation-direction: reverse; }
.arc.a3 { width: 70vmax; height: 70vmax; right: -40vmax; bottom: -42vmax; left: auto; top: auto; animation-duration: 110s; }
@keyframes arc-turn {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}
.scene.invert .arc { border-color: var(--paper-hair); }

/* masthead star field - the richer page-one background */
.mastfield {
  position: absolute;
  inset: -20%;
  pointer-events: none;
  will-change: transform;
}
.mastfield.f1 {
  background-image: radial-gradient(circle, rgba(244,244,240,0.22) 1.2px, transparent 1.8px);
  background-size: 150px 165px;
  animation: mast-drift 120s linear infinite;
}
.mastfield.f2 {
  background-image: radial-gradient(circle, rgba(244,244,240,0.3) 1.5px, transparent 2.2px);
  background-size: 320px 280px;
  background-position: 80px 120px;
  animation: mast-drift 80s linear infinite reverse;
}
.mastfield.tw {
  background-image: radial-gradient(circle, rgba(244,244,240,0.7) 1.4px, transparent 2.4px);
  background-size: 480px 400px;
  background-position: 140px 60px;
  animation: mast-twinkle 5s ease-in-out infinite;
}
@keyframes mast-drift {
  0% { transform: translateY(0); }
  100% { transform: translateY(140px); }
}
@keyframes mast-twinkle {
  0%, 100% { opacity: 0.1; }
  50% { opacity: 0.9; }
}

/* ---------- type --------------------------------------------------------- */
.kicker { font-size: 0.76rem; font-weight: 600; color: var(--tx-dim); margin-bottom: 16px; min-height: 1.2em; }
.display-xl { font-size: clamp(38px, 6.6vw, 106px); font-weight: 500; line-height: 1.04; white-space: nowrap; }
.display-m { font-size: clamp(30px, 4.6vw, 64px); font-weight: 500; line-height: 1.06; max-width: 22ch; }
.body-txt { margin-top: 22px; max-width: 36em; color: var(--tx-muted); font-size: 1.02rem; }
.body-txt b { color: var(--tx); font-weight: 600; }
.marg-cap { font-size: 0.72rem; font-weight: 600; text-transform: uppercase; color: var(--tx-dim); margin-bottom: 16px; }
.subcap { margin-top: 14px; font-size: 0.78rem; color: var(--tx-dim); max-width: 60ch; }
.scroll-cue {
  position: absolute;
  bottom: 26px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  color: var(--tx-dim);
  font-size: 0.74rem;
  animation: cue 8s ease-in-out infinite;
}
@keyframes cue { 0%, 100% { opacity: 0.25; } 50% { opacity: 0.85; } }
.mast { padding-top: 6vh; }
.mast img { height: clamp(64px, 10vh, 112px); width: auto; display: block; margin-bottom: 22px; }
.lead-line { color: var(--tx-muted); font-size: 1.05rem; margin-bottom: 14px; }
.corner-tag {
  position: absolute;
  left: 26px;
  bottom: 24px;
  z-index: 2;
  font-size: 0.72rem;
  color: var(--tx-dim);
  min-height: 1.2em;
}
.display-xl .hl { display: block; }
.display-xl .breathe { animation: hero-breathe 7s ease-in-out infinite; }
.display-xl .breathe.d2 { animation-delay: 1.4s; }
@keyframes hero-breathe {
  0%, 100% { opacity: 0.5; text-shadow: none; }
  50% { opacity: 1; text-shadow: 0 0 34px rgba(244,244,240,0.28); }
}

/* ---------- inventory ----------------------------------------------------- */
.inv { margin-top: 38px; display: grid; }
.inv-row {
  display: grid;
  grid-template-columns: minmax(56px, 110px) 1fr minmax(120px, 260px);
  column-gap: 22px;
  align-items: baseline;
  padding: 19px 0;
  border-top: 1px solid var(--hair);
}
.inv-row:last-child { border-bottom: 1px solid var(--hair); }
.inv-row .no { color: var(--tx-dim); font-weight: 300; font-size: 1.3rem; }
.inv-row .what { font-size: clamp(19px, 2.4vw, 30px); font-weight: 500; line-height: 1.15; }
.inv-row .state { font-size: 0.7rem; font-weight: 600; text-transform: uppercase; color: var(--tx-muted); text-align: right; }
.inv-row.struck .what { text-decoration: line-through; text-decoration-thickness: 1px; color: var(--tx-muted); }
.inv-row.struck .state { color: var(--tx); }

/* ---------- the software carousel ---------------------------------------- */
.carousel {
  position: relative;
  margin-top: 30px;
  perspective: 1400px;
  overflow: hidden;
}
.car-track {
  position: relative;
  display: grid;
  align-items: start;
  overflow: hidden;
}
.car-slide {
  position: relative;
  grid-area: 1 / 1;
  display: grid;
  justify-items: center;
  align-content: start;
  gap: 14px;
  opacity: 0;
  pointer-events: none;
  transform: translateX(34%) rotateY(-24deg) scale(0.84);
  transition: transform 0.72s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.5s ease;
}
.car-slide.active { opacity: 1; pointer-events: auto; transform: none; }
.car-slide.prev { opacity: 0.07; transform: translateX(-36%) rotateY(24deg) scale(0.82); }
.car-slide.next { opacity: 0.07; transform: translateX(36%) rotateY(-24deg) scale(0.82); }
.car-cap { font-size: 0.78rem; color: var(--tx-dim); max-width: 64ch; text-align: center; }
.car-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  margin-top: 18px;
}
.car-btn {
  width: 46px;
  height: 46px;
  border: 1px solid var(--hair-strong);
  border-radius: 50%;
  background: transparent;
  color: var(--tx);
  font: inherit;
  font-size: 1.1rem;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}
.car-btn:hover { background: var(--tx); color: var(--ink-bg); transform: translateY(-2px); }
.car-dots { display: flex; gap: 8px; }
.car-dots span {
  width: 7px; height: 7px;
  border-radius: 50%;
  border: 1px solid var(--hair-strong);
  transition: background 0.3s ease;
}
.car-dots span.on { background: var(--tx); }

/* OS concept frames */
.os-frame {
  position: relative;
  width: min(820px, calc(100vw - 80px));
  aspect-ratio: 16 / 9.4;
  border: 1px solid var(--hair-strong);
  background: #101012;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(0,0,0,0.45);
}
.os-top {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 14px;
  border-bottom: 1px solid var(--hair);
  font-size: 0.7rem;
}
.os-top .os-brand { font-weight: 700; }
.os-top .os-title { color: var(--tx-muted); font-weight: 600; }
.os-top .os-flag { margin-left: auto; color: var(--tx-dim); }
.os-desk { position: relative; flex: 1; }
.os-window {
  position: absolute;
  left: 5%;
  top: 9%;
  width: 46%;
  height: 64%;
  border: 1px solid var(--hair);
  background: #131316;
}
.os-winbar { display: flex; gap: 6px; padding: 7px 10px; border-bottom: 1px solid var(--hair); }
.os-winbar span { width: 7px; height: 7px; border-radius: 50%; border: 1px solid var(--hair-strong); }
.os-rows { padding: 10px; display: grid; gap: 10px; }
.os-row { display: flex; gap: 10px; align-items: center; }
.os-row i { width: 14px; height: 14px; border: 1px solid var(--hair-strong); flex: 0 0 auto; }
.os-row b { height: 1px; flex: 1; background: var(--hair); }
.os-row em { font-style: normal; font-size: 0.62rem; color: var(--tx-dim); white-space: nowrap; }
.os-row.ok i { background: var(--tx); }
.os-palette {
  position: absolute;
  left: 18%;
  bottom: 14%;
  width: 64%;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--hair-strong);
  background: rgba(12,12,13,0.95);
  padding: 13px 16px;
  font-size: 0.86rem;
}
.os-palette .os-prompt { color: var(--tx-dim); }
.os-palette .os-cmd { color: var(--tx); min-height: 1.2em; }
.tcaret { display: inline-block; width: 0.5em; height: 1.05em; vertical-align: text-bottom; background: var(--tx); }
.tcaret.blink { animation: caret 1s steps(2, jump-none) infinite; }
.os-approve {
  position: absolute;
  right: 6%;
  top: 16%;
  width: 36%;
  border: 1px solid var(--tx);
  background: #0C0C0C;
  padding: 14px 16px;
  display: grid;
  gap: 8px;
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.os-approve.show { opacity: 1; transform: none; }
.os-approve strong { font-size: 0.82rem; }
.os-approve p { font-size: 0.68rem; color: var(--tx-muted); }
.os-actions { display: flex; gap: 8px; justify-content: flex-end; font-size: 0.68rem; }
.os-actions span { border: 1px solid var(--hair-strong); padding: 4px 10px; color: var(--tx-muted); }
.os-actions .allow { background: var(--tx); color: var(--paper-ink); border-color: var(--tx); font-weight: 600; }
.os-dock { display: flex; justify-content: center; gap: 10px; padding: 9px 0; border-top: 1px solid var(--hair); }
.os-dock span { width: 9px; height: 9px; border: 1px solid var(--hair-strong); border-radius: 50%; }
/* install-flow slide */
.os-steps {
  position: absolute;
  left: 8%;
  top: 12%;
  width: 50%;
  display: grid;
  gap: 12px;
}
.os-gate {
  position: absolute;
  right: 6%;
  bottom: 14%;
  width: 40%;
  border: 1px double var(--hair-strong);
  background: #0C0C0C;
  padding: 13px 15px;
  display: grid;
  gap: 6px;
}
.os-gate label { font-size: 0.6rem; text-transform: uppercase; font-weight: 700; color: var(--tx-dim); }
.os-gate .val { font-size: 0.9rem; }
.os-gate .ok-line { font-size: 0.62rem; color: var(--tx-muted); }
/* rollback slide */
.os-states {
  position: absolute;
  inset: 12% 8%;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 18px;
  align-items: center;
}
.os-state {
  border: 1px solid var(--hair);
  background: #131316;
  padding: 16px;
  display: grid;
  gap: 8px;
}
.os-state strong { font-size: 0.78rem; }
.os-state .bar { height: 5px; background: var(--hair); }
.os-state .bar.lit { background: var(--tx); }
.os-state em { font-style: normal; font-size: 0.62rem; color: var(--tx-dim); }
.os-arrow { font-size: 1.6rem; color: var(--tx-muted); }

/* ---------- figures -------------------------------------------------------- */
.figs { display: flex; flex-wrap: wrap; gap: 6vw; margin-top: 38px; align-items: end; }
.fig .big { font-size: clamp(74px, 12.5vw, 190px); font-weight: 300; line-height: 0.95; }
.fig .cap { display: block; margin-top: 10px; font-size: 0.72rem; font-weight: 600; text-transform: uppercase; color: var(--tx-dim); max-width: 30ch; }

/* ---------- proof wheel ----------------------------------------------------- */
.wheel-stage { position: absolute; left: 0; top: 50%; z-index: 1; pointer-events: none; }
.wheel {
  position: absolute;
  width: 176vh; height: 176vh;
  left: -92vh; top: -88vh;
  animation: wheel-turn 70s linear infinite;
}
@keyframes wheel-turn {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}
.wheel .pair {
  position: absolute;
  left: 50%; top: 50%;
  font-family: "Cascadia Mono", Consolas, ui-monospace, monospace;
  font-size: clamp(15px, 2vh, 24px);
  color: rgba(244,244,240,0.6);
}
.wheel .ring { position: absolute; inset: 6vh; border: 1px solid var(--hair); border-radius: 50%; }
.wheel-copy { margin-left: clamp(110px, 50vh, 52vw); }

/* ---------- gate ------------------------------------------------------------ */
.gate-stage { position: relative; display: inline-block; padding: 8vmin 7vmin; perspective: 800px; margin-top: 10px; }
.specimen {
  font-family: "Cascadia Mono", Consolas, ui-monospace, monospace;
  font-size: clamp(28px, 5.8vw, 80px);
  line-height: 1.1;
  min-height: 1.2em;
}
.specimen .bad { color: var(--tx-dim); text-decoration: line-through; }
.specimen .caret {
  display: inline-block;
  width: 0.55em; height: 1em;
  vertical-align: text-bottom;
  background: var(--tx);
  animation: caret 1s steps(2, jump-none) infinite;
}
@keyframes caret { 50% { opacity: 0; } }
.lock {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px solid rgba(244,244,240,0.4);
  pointer-events: none;
  transition: transform 0.9s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.4s ease;
}
.lock.top {
  -webkit-mask-image: conic-gradient(from -90deg, #000 0 150deg, transparent 150deg 360deg);
  mask-image: conic-gradient(from -90deg, #000 0 150deg, transparent 150deg 360deg);
  transform: rotateX(12deg) rotate(-14deg);
}
.lock.bot {
  -webkit-mask-image: conic-gradient(from 90deg, #000 0 150deg, transparent 150deg 360deg);
  mask-image: conic-gradient(from 90deg, #000 0 150deg, transparent 150deg 360deg);
  transform: rotateX(12deg) rotate(14deg);
}
.gate-stage.locked .lock.top,
.gate-stage.locked .lock.bot { transform: rotateX(12deg) rotate(0deg); border-color: rgba(244,244,240,0.7); }
.refusal { font-family: "Cascadia Mono", Consolas, ui-monospace, monospace; font-size: 0.78rem; color: var(--tx-muted); min-height: 1.3em; }
.specimen-cap { margin-top: 10px; font-size: 0.82rem; color: var(--tx-dim); max-width: 56ch; }
.limits { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 44px; margin-top: 30px; }
.limit-row {
  display: grid;
  grid-template-columns: minmax(90px, 130px) 1fr;
  column-gap: 18px;
  align-items: baseline;
  padding: 13px 0;
  border-top: 1px solid var(--hair);
}
.limit-row .k { font-family: "Cascadia Mono", Consolas, ui-monospace, monospace; font-size: 0.82rem; font-weight: 700; }
.limit-row .v { color: var(--tx-muted); font-size: 0.9rem; }

/* ---------- artifact (paper scene) ------------------------------------------- */
.scene.invert { background: var(--paper); color: var(--paper-ink); border-bottom-color: var(--paper-hair); }
.scene.invert .marg-cap { color: rgba(10,10,10,0.42); }
.scene.invert .body-txt { color: var(--paper-muted); }
.scene.invert .body-txt b { color: var(--paper-ink); }
.pdots {
  position: absolute;
  inset: -45% 0;
  pointer-events: none;
  will-change: transform;
  transition: transform var(--page-t);
}
.pdots.p1 {
  background-image: radial-gradient(circle, rgba(10,10,10,0.20) 1.2px, transparent 1.7px);
  background-size: 180px 200px;
}
.pdots.p2 {
  background-image: radial-gradient(circle, rgba(10,10,10,0.32) 1.5px, transparent 2.1px);
  background-size: 100px 115px;
  background-position: 50px 35px;
}
.filename {
  margin-top: 26px;
  font-family: "Cascadia Mono", Consolas, ui-monospace, monospace;
  font-size: clamp(20px, 4vw, 52px);
  overflow-wrap: anywhere;
}
.dl-link {
  display: inline-block;
  margin-top: 34px;
  font-size: clamp(30px, 5.4vw, 76px);
  font-weight: 500;
  line-height: 1.08;
  text-decoration: none;
  border-bottom: 3px solid var(--paper-ink);
  padding-bottom: 6px;
  transition: border-bottom-width 0.15s ease;
}
.dl-link:hover, .dl-link:focus-visible { border-bottom-width: 6px; }
.dl-link.unavailable { opacity: 0.45; cursor: not-allowed; border-bottom-style: dashed; }
.reqs { margin-top: 26px; font-size: 0.9rem; color: var(--paper-muted); max-width: 52ch; }
.status-line {
  margin-top: 8px;
  font-family: "Cascadia Mono", Consolas, ui-monospace, monospace;
  font-size: 0.78rem;
  color: rgba(10,10,10,0.45);
  min-height: 1.3em;
}

/* ---------- direction + signoff ----------------------------------------------- */
.dir { margin-top: 34px; display: grid; }
.dir-row {
  display: grid;
  grid-template-columns: minmax(100px, 190px) 1fr minmax(130px, 240px);
  column-gap: 22px;
  align-items: baseline;
  padding: 15px 0;
  border-top: 1px solid var(--hair);
}
.dir-row:last-child { border-bottom: 1px solid var(--hair); }
.dir-row .when { font-size: 0.7rem; font-weight: 600; text-transform: uppercase; color: var(--tx-muted); }
.dir-row .what { font-size: clamp(16px, 1.9vw, 24px); font-weight: 500; }
.dir-row .state { font-size: 0.7rem; font-weight: 600; text-transform: uppercase; color: var(--tx-dim); text-align: right; }
.closer { margin-top: 26px; font-size: 1.02rem; font-weight: 600; max-width: 36em; }
.signoff {
  margin-top: clamp(30px, 6vh, 60px);
  display: flex;
  align-items: baseline;
  gap: 0.18em;
  font-size: clamp(34px, 6vw, 84px);
  font-weight: 500;
  line-height: 1;
}
.signoff img { height: 0.92em; width: auto; transform: translateY(0.12em); }
.links-row { display: flex; flex-wrap: wrap; gap: 8px 26px; margin-top: 28px; font-size: 0.86rem; }
.links-row a { color: var(--tx-muted); text-decoration: none; border-bottom: 1px solid var(--hair-strong); }
.links-row a:hover { color: var(--tx); border-bottom-color: var(--tx); }

/* ---------- content pages (procedure) in deck language -------------------- */
.page-main {
  position: relative;
  z-index: 1;
  width: min(1180px, calc(100vw - 48px));
  margin: 0 auto;
  padding: 130px 0 80px;
}
.page-main .ghost { position: fixed; }
.rungs { display: grid; margin-top: 36px; }
.rung {
  display: flex;
  gap: 18px;
  padding: 22px 0;
  border-top: 1px solid var(--hair);
}
.rung .idx { flex: 0 0 auto; color: var(--tx-dim); font-size: 0.95rem; padding-top: 6px; }
.rung strong { display: block; font-size: 1.45rem; }
.rung p { color: var(--tx-muted); font-size: 1.08rem; max-width: 68ch; margin-top: 8px; line-height: 1.65; }
.rung .tok {
  display: inline-block;
  margin-top: 10px;
  font-size: 0.74rem;
  color: var(--tx-muted);
  border: 1px solid var(--hair);
  padding: 3px 9px;
}
.gate-head { margin-top: 64px; }
.gate-demo {
  border: 1px double var(--hair-strong);
  background: rgba(16,16,18,0.9);
  padding: 22px;
  margin-top: 26px;
  max-width: 720px;
}
.gate-demo .cap { color: var(--tx-dim); font-size: 0.74rem; margin-bottom: 12px; }
.gate-demo label { display: block; color: var(--tx-dim); font-size: 0.72rem; font-weight: 700; text-transform: uppercase; margin-bottom: 8px; }
.gate-demo input {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--hair-strong);
  background: var(--ink-bg);
  color: var(--tx);
  padding: 10px 13px;
  font-family: "Cascadia Mono", Consolas, ui-monospace, monospace;
  font-size: 1rem;
}
.gate-demo input:focus { outline: 2px solid var(--tx); outline-offset: 2px; }
.gate-demo .verdict { margin-top: 12px; min-height: 1.4em; font-family: "Cascadia Mono", Consolas, ui-monospace, monospace; font-size: 0.84rem; color: var(--tx-muted); }
.gate-demo .verdict.ok { color: var(--tx); }
.refusal-rows { margin-top: 36px; display: grid; }
.refusal-rows .row {
  display: grid;
  grid-template-columns: minmax(120px, 200px) 1fr;
  column-gap: 20px;
  align-items: baseline;
  padding: 13px 0;
  border-top: 1px solid var(--hair);
}
.refusal-rows .row span { font-size: 0.7rem; font-weight: 600; text-transform: uppercase; color: var(--tx-dim); }
.refusal-rows .row strong { font-family: "Cascadia Mono", Consolas, ui-monospace, monospace; font-size: 0.95rem; font-weight: 400; color: var(--tx-muted); }

/* expanding readout rows */
.acc { border-top: 1px solid var(--hair); }
.acc:last-child { border-bottom: 1px solid var(--hair); }
.acc-head {
  display: flex;
  align-items: baseline;
  gap: 18px;
  width: 100%;
  padding: 22px 0;
  background: none;
  border: 0;
  color: var(--tx);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.acc-head .idx { flex: 0 0 auto; color: var(--tx-dim); font-size: 0.95rem; }
.acc-head strong { flex: 1; font-size: 1.45rem; font-weight: 500; transition: color 0.2s ease; }
.acc-head .chev {
  flex: 0 0 auto;
  font-size: 1.1rem;
  color: var(--tx-dim);
  transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1), color 0.2s ease;
}
.acc-head:hover strong { color: var(--tx); }
.acc-head:hover .chev { color: var(--tx); }
.acc.open .acc-head .chev { transform: rotate(135deg); }
.acc-body {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.55s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.45s ease;
  opacity: 0;
}
.acc.open .acc-body { grid-template-rows: 1fr; opacity: 1; }
.acc-body > div { overflow: hidden; }
.acc-body p { color: var(--tx-muted); font-size: 1.08rem; line-height: 1.65; max-width: 68ch; padding-bottom: 22px; }
.acc-body .tok {
  display: inline-block;
  margin-bottom: 22px;
  font-size: 0.74rem;
  color: var(--tx-muted);
  border: 1px solid var(--hair);
  padding: 3px 9px;
}

/* back to top */
.totop {
  position: fixed;
  right: 22px;
  bottom: 20px;
  z-index: 25;
  border: 1px solid var(--hair-strong);
  background: rgba(12,12,12,0.8);
  color: var(--tx-muted);
  font-size: 0.72rem;
  padding: 9px 14px;
  cursor: pointer;
  transition: color 0.2s ease, background 0.2s ease;
}
.totop:hover { color: var(--ink-bg); background: var(--tx); }

@media (prefers-reduced-motion: reduce) {
  .scene .inner { opacity: 1; transform: none; transition: none; }
  .arc, .wheel, .mastfield, .display-xl .breathe { animation: none; }
  .scroll-cue { animation: none; }
  .specimen .caret, .tcaret { animation: none; }
  .car-slide, .backdrop .dotfar, .backdrop .dotnear, .ghost, .pdots { transition: none; }
}

@media (max-width: 920px) {
  .topbar { gap: 12px; padding: 10px 14px; max-width: 100vw; overflow: hidden; }
  .topbar .meta { display: none; }
  .topbar .brand img { height: 24px; }
  .limits { grid-template-columns: 1fr; }
  .inv-row { grid-template-columns: 44px 1fr; }
  .inv-row .state { grid-column: 2; text-align: left; margin-top: 3px; }
  .dir-row { grid-template-columns: 1fr; row-gap: 3px; }
  .dir-row .state { text-align: left; }
  .ghost { right: 0; font-size: clamp(150px, 56vw, 300px); }
  .wheel-stage { top: 100%; left: 50%; }
  .wheel { width: 120vw; height: 120vw; left: -60vw; top: -60vw; }
  .wheel-copy { margin-left: 0; margin-bottom: 40vw; }
  .os-window { width: 60%; }
  .os-approve { width: 46%; }
  .scene {
    display: block;
    min-height: 100svh;
    padding: 82px 0 54px;
  }
  .scene .inner {
    margin: 0 auto;
  }
  .mast {
    padding-top: clamp(44px, 10svh, 110px);
  }
}

@media (max-width: 620px) {
  .topbar {
    align-items: center;
    gap: 18px;
    min-height: 58px;
    padding: 10px 16px;
  }
  .topbar .brand {
    flex: 0 0 auto;
  }
  .topbar .brand img { height: 24px; }
  .topbar .menu {
    width: auto;
    flex: 1 1 auto;
    flex-wrap: nowrap;
    gap: 18px;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    -webkit-mask-image: linear-gradient(90deg, #000 0 calc(100% - 34px), transparent 100%);
    mask-image: linear-gradient(90deg, #000 0 calc(100% - 34px), transparent 100%);
  }
  .topbar .menu::-webkit-scrollbar {
    display: none;
  }
  .topbar .menu a {
    flex: 0 0 auto;
    padding: 0;
    font-size: 0.72rem;
    line-height: 1.2;
  }
  .scene {
    display: block;
    min-height: 100svh;
    padding: 76px 0 44px;
  }
  .scene .inner {
    width: min(1180px, calc(100vw - 48px));
    margin: 0 auto;
  }
  .mast {
    padding-top: clamp(22px, 6svh, 56px);
  }
  .mast img {
    height: clamp(58px, 8svh, 76px);
    margin-bottom: 16px;
  }
  .lead-line {
    max-width: 23ch;
    margin-bottom: 12px;
    font-size: 0.98rem;
    line-height: 1.45;
  }
  .display-xl {
    font-size: clamp(43px, 13vw, 58px);
    line-height: 0.98;
    white-space: normal;
  }
  .scroll-cue {
    bottom: 34px;
  }
  .page-main {
    width: min(1180px, calc(100vw - 48px));
    padding: 98px 0 56px;
  }
  .page-main .ghost { display: none; }
  .corner-tag { display: none; }
  .page-main .marg-cap { margin-bottom: 12px; }
  .page-main .display-m {
    font-size: clamp(35px, 10.8vw, 48px);
    line-height: 1;
    max-width: 11ch;
  }
  .body-txt {
    margin-top: 16px;
    font-size: 0.94rem;
    line-height: 1.55;
  }
  .carousel { margin-top: 20px; }
  .car-slide { gap: 10px; }
  .car-slide.prev,
  .car-slide.next {
    opacity: 0;
    transform: translateX(0) scale(0.96);
  }
  .car-cap {
    max-width: 34ch;
    font-size: 0.7rem;
    line-height: 1.35;
  }
  .car-nav {
    gap: 12px;
    margin-top: 12px;
  }
  .car-btn {
    width: 40px;
    height: 40px;
  }
  .os-frame {
    width: 100%;
    aspect-ratio: 4 / 3;
  }
  .os-top {
    gap: 8px;
    padding: 7px 9px;
    font-size: 0.58rem;
  }
  .os-top .os-flag {
    max-width: 48%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .os-window {
    left: 7%;
    top: 13%;
    width: 58%;
    height: 55%;
  }
  .os-rows { gap: 8px; padding: 9px; }
  .os-row { gap: 8px; }
  .os-row i { width: 12px; height: 12px; }
  .os-row em {
    font-size: 0.52rem;
    line-height: 1.25;
    white-space: normal;
  }
  .os-palette {
    left: 10%;
    bottom: 18%;
    width: 80%;
    overflow: hidden;
    gap: 7px;
    padding: 9px 10px;
    font-size: 0.64rem;
  }
  .os-cmd {
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;
  }
  .os-approve {
    right: 7%;
    top: 13%;
    width: 56%;
    padding: 10px;
    gap: 6px;
  }
  .os-approve strong { font-size: 0.7rem; }
  .os-approve p { font-size: 0.58rem; }
  .os-actions { gap: 6px; font-size: 0.58rem; }
  .os-actions span { padding: 3px 7px; }
  .os-steps {
    left: 6%;
    top: 13%;
    width: 88%;
    gap: 8px;
  }
  .os-gate {
    left: 8%;
    right: auto;
    bottom: 12%;
    width: 84%;
    padding: 10px;
  }
  .os-gate .val { font-size: 0.72rem; }
  .os-gate .ok-line { font-size: 0.54rem; }
  .os-states {
    inset: 10% 7%;
    grid-template-columns: 1fr;
    gap: 8px;
    align-items: stretch;
  }
  .os-state { padding: 10px; gap: 6px; }
  .os-state strong { font-size: 0.66rem; }
  .os-state em { font-size: 0.54rem; }
  .os-arrow { display: none; }
  .links-row { gap: 10px 20px; }
}
