/* PRIMER · Vol. 01 · Automatic */

:root {
  --paper: #efe9dd;
  --paper-2: #e7e0d2;
  --ink: #17140f;
  --ink-soft: #453d31;
  --muted: #6f6452;
  --rule: rgba(23, 20, 15, 0.16);
  --rule-strong: rgba(23, 20, 15, 0.36);
  --brass: #a9772f;
  --brass-bright: #c39345;
  --blue: #2f4a67;
  --night: #16130f;
  --night-ink: #efe8da;
  --night-soft: #c9c0af;

  --serif: "Instrument Serif", "Iowan Old Style", "Times New Roman", serif;
  --sans: "Instrument Sans", "Helvetica Neue", Arial, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SF Mono", monospace;

  --pad-x: 96px;
  --pad-y: 44px;
  --hud-h: 56px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  background: #0c0b09;
}

body {
  font-family: var(--sans);
  color: var(--ink);
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: rgba(169, 119, 47, 0.28); }

button { font: inherit; color: inherit; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- viewport and stage ---------- */

.viewport {
  position: fixed;
  inset: 0 0 var(--hud-h) 0;
  overflow: hidden;
}

body.chrome-hidden .viewport { inset: 0; }
body.chrome-hidden .hud { transform: translateY(100%); opacity: 0; pointer-events: none; }

.stage {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 1920px;
  height: 1080px;
  flex: none;
  background: var(--paper);
  transform: translate(-50%, -50%) scale(0.7);
  transform-origin: center center;
  box-shadow: 0 40px 120px rgba(0, 0, 0, 0.55);
  overflow: hidden;
}

.slide {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  padding: var(--pad-y) var(--pad-x) 36px;
  background: var(--paper);
  color: var(--ink);
  opacity: 0;
  visibility: hidden;
  transform: translateY(14px);
  transition: opacity 0.5s ease, transform 0.5s ease, visibility 0s linear 0.5s;
  overflow: hidden;
}

.slide.is-active {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition: opacity 0.5s ease, transform 0.5s ease;
  z-index: 1;
}

.slide--night {
  --ink: var(--night-ink);
  --ink-soft: var(--night-soft);
  --muted: #9a907d;
  --rule: rgba(239, 232, 218, 0.16);
  --rule-strong: rgba(239, 232, 218, 0.36);
  --brass: #c9964a;
  --brass-bright: #dfae63;
  --blue: #88a6c8;
  background: var(--night);
  color: var(--ink);
}

/* ---------- rail and foot ---------- */

.rail {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  padding-bottom: 15px;
  border-bottom: 1px solid var(--rule);
  font-family: var(--mono);
  font-size: 17px;
  line-height: 1;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  flex: none;
}

.rail-left { display: flex; align-items: center; gap: 16px; }

.mark {
  position: relative;
  padding-left: 16px;
  color: var(--ink);
  font-weight: 500;
  letter-spacing: 0.22em;
}

.mark::before {
  content: "";
  position: absolute;
  left: 0;
  top: -1px;
  width: 6px;
  height: 6px;
  background: var(--brass);
}

.rail-sep { color: var(--rule-strong); opacity: 0.8; }

.rail-right { text-align: right; }

.foot {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 40px;
  padding-top: 13px;
  border-top: 1px solid var(--rule);
  font-family: var(--mono);
  font-size: 17px;
  line-height: 1.3;
  letter-spacing: 0.06em;
  color: var(--muted);
  flex: none;
}

.pagenum {
  font-size: 17px;
  letter-spacing: 0.16em;
  color: var(--ink);
  white-space: nowrap;
}

.pagenum span { color: var(--muted); }

/* ---------- type ---------- */

.kicker {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0;
  font-family: var(--mono);
  font-size: 18px;
  font-weight: 400;
  line-height: 1;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--brass);
  flex: none;
}

.kicker::before {
  content: "";
  width: 5px;
  height: 5px;
  background: currentColor;
  flex: none;
}

.headline {
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  font-size: 92px;
  line-height: 0.98;
  letter-spacing: -0.022em;
  color: var(--ink);
  text-wrap: balance;
}

.headline em { font-style: italic; }

.split .headline { font-size: 84px; }

.body {
  margin: 0;
  max-width: 660px;
  font-size: 28px;
  line-height: 1.46;
  color: var(--ink-soft);
  text-wrap: pretty;
}

.body strong { font-weight: 500; color: var(--ink); }

/* ---------- slide head ---------- */

.slide-head {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 80px;
  align-items: end;
  padding: 50px 0 34px;
  flex: none;
}

.slide-head--tight { padding: 40px 0 22px; }

.slide-head > div:first-child { display: flex; flex-direction: column; gap: 20px; align-items: flex-start; }
.head-side { padding-bottom: 6px; }

/* ---------- cover ---------- */

.cover {
  flex: 1;
  display: grid;
  grid-template-columns: 1.12fr 0.88fr;
  align-items: center;
  gap: 10px;
  min-height: 0;
}

.cover-copy { padding-left: 2px; }

.cover-title {
  margin: 28px 0 0 -10px;
  font-family: var(--serif);
  font-weight: 400;
  font-size: 204px;
  line-height: 0.8;
  letter-spacing: -0.045em;
  color: var(--ink);
}

.cover-title .dot { color: var(--brass); }

.cover-sub {
  margin: 38px 0 0;
  max-width: 580px;
  font-size: 34px;
  line-height: 1.34;
  color: var(--ink-soft);
  text-wrap: pretty;
}

.cover-meta {
  display: flex;
  gap: 42px;
  margin-top: 62px;
  font-family: var(--mono);
  font-size: 17px;
  line-height: 1;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.cover-meta b { display: block; margin-bottom: 9px; font-weight: 500; color: var(--ink); }

.cover-figure {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 0;
  height: 100%;
}

.cover-figure .fig,
.cover-figure svg {
  width: 690px;
  max-width: 100%;
  height: auto;
  overflow: visible;
}

.cover-figure figcaption {
  margin-top: 14px;
  font-family: var(--mono);
  font-size: 16px;
  letter-spacing: 0.08em;
  color: var(--muted);
}

/* ---------- split layouts ---------- */

.split {
  flex: 1;
  display: grid;
  grid-template-columns: 0.92fr 1.08fr;
  align-items: center;
  gap: 90px;
  min-height: 0;
  padding: 20px 0 26px;
}

.split--fig-right { grid-template-columns: 0.88fr 1.12fr; }
.split--fig-left { grid-template-columns: 1.08fr 0.92fr; }
.split--fig-mid { grid-template-columns: 1fr 1fr; gap: 70px; }

.copy {
  display: flex;
  flex-direction: column;
  gap: 28px;
  align-items: flex-start;
  max-width: 680px;
}

.copy--right { justify-self: start; }

.split .fig-wrap,
.split .fig-bleed {
  min-height: 0;
  height: 100%;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  align-items: center;
  justify-items: center;
}

.split .fig-wrap .fig {
  width: 100%;
  height: 100%;
  min-height: 0;
}

.fig-wrap figcaption,
.fig-bleed figcaption,
.fig-wide figcaption {
  margin-top: 8px;
  font-family: var(--mono);
  font-size: 16px;
  line-height: 1.4;
  letter-spacing: 0.06em;
  color: var(--muted);
  text-align: center;
}

.split--fig-bleed { grid-template-columns: 0.95fr 1.05fr; gap: 0; }

.fig-bleed {
  position: relative;
  width: 100%;
  height: 100%;
  align-items: center;
  justify-content: center;
}

.fig-bleed .fig {
  width: 820px;
  max-width: 118%;
  height: auto;
  margin-right: -190px;
  overflow: visible;
}

.fig-bleed figcaption {
  position: absolute;
  bottom: 8px;
  right: 0;
  text-align: right;
}

/* ---------- facts and stats ---------- */

.facts {
  width: 100%;
  border-top: 1px solid var(--rule-strong);
  margin-top: 2px;
}

.fact {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: baseline;
  padding: 15px 0 14px;
  border-bottom: 1px solid var(--rule);
}

.fact .k { font-size: 21px; color: var(--muted); }

.fact .v {
  font-family: var(--mono);
  font-size: 18px;
  line-height: 1.3;
  letter-spacing: 0.01em;
  color: var(--ink);
  text-align: right;
}

.stat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  width: 100%;
  border-top: 1px solid var(--rule-strong);
  border-left: 1px solid var(--rule);
}

.stat {
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 18px 0 16px 20px;
  border-right: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}

.stat-v {
  font-family: var(--serif);
  font-size: 46px;
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.stat-k {
  font-family: var(--mono);
  font-size: 14px;
  line-height: 1.3;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ---------- premise chain ---------- */

.premise {
  flex: 1;
  display: grid;
  grid-template-columns: 1.18fr 0.82fr;
  gap: 110px;
  align-items: center;
  min-height: 0;
  padding: 10px 0 30px;
}

.chain { position: relative; padding-left: 0; }

.chain-step {
  position: relative;
  display: grid;
  grid-template-columns: 58px 1fr;
  gap: 26px;
  padding: 25px 0 25px 0;
  border-top: 1px solid var(--rule);
}

.chain-step:last-child { border-bottom: 1px solid var(--rule); }

.chain-num {
  font-family: var(--mono);
  font-size: 16px;
  letter-spacing: 0.1em;
  color: var(--brass);
  padding-top: 5px;
}

.chain-step h3 {
  margin: 0 0 7px;
  font-size: 32px;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.chain-step p { margin: 0; font-size: 22px; line-height: 1.4; color: var(--muted); }

.pull {
  border-top: 1px solid var(--rule-strong);
  padding-top: 26px;
}

.pull p {
  margin: 0;
  font-family: var(--serif);
  font-style: italic;
  font-size: 42px;
  line-height: 1.18;
  letter-spacing: -0.01em;
  color: var(--ink);
  text-wrap: pretty;
}

.pull span {
  display: block;
  margin-top: 24px;
  font-family: var(--mono);
  font-size: 15px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ---------- wide figures ---------- */

.fig-wide {
  flex: 1;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  align-items: center;
  justify-items: center;
  min-height: 0;
  padding-bottom: 4px;
}

.fig-wide .fig {
  width: 100%;
  height: 100%;
  min-height: 0;
  overflow: visible;
}

.fig-hero {
  flex: 1;
  display: grid;
  place-items: center;
  min-height: 0;
  padding: 2px 0 4px;
}

.fig-hero .fig {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  min-height: 0;
  overflow: visible;
}

/* ---------- anatomy ---------- */

.anatomy {
  flex: 1;
  display: grid;
  grid-template-columns: 1.06fr 0.94fr;
  gap: 64px;
  align-items: center;
  min-height: 0;
  padding: 4px 0 20px;
}

.anatomy-fig {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  align-items: center;
  justify-items: center;
  min-height: 0;
  height: 100%;
}

.anatomy-fig .fig {
  width: 100%;
  height: 100%;
  min-height: 0;
  overflow: visible;
}

.anatomy-fig figcaption {
  margin-top: 6px;
  font-family: var(--mono);
  font-size: 14px;
  letter-spacing: 0.05em;
  color: var(--muted);
  text-align: center;
}

.legend {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--rule-strong);
}

.legend li {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 14px;
  align-items: baseline;
  padding: 11px 0 10px;
  border-bottom: 1px solid var(--rule);
}

.legend-num {
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.08em;
  color: var(--brass);
}

.legend b {
  display: block;
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.005em;
  color: var(--ink);
}

.legend span {
  display: block;
  margin-top: 2px;
  font-size: 17px;
  line-height: 1.35;
  color: var(--muted);
}

/* ---------- closing ---------- */

.closing {
  flex: 1;
  display: grid;
  grid-template-columns: 1.22fr 0.78fr;
  gap: 100px;
  align-items: center;
  min-height: 0;
  padding: 20px 0 40px;
  position: relative;
  z-index: 1;
}

.closing-main { display: flex; flex-direction: column; align-items: flex-start; gap: 30px; }

.closing-line {
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  font-size: 92px;
  line-height: 1.02;
  letter-spacing: -0.025em;
  color: var(--ink);
}

.closing-line em { font-style: italic; color: var(--brass-bright); }

.closing .body { max-width: 620px; font-size: 27px; }

.closing-actions { display: flex; align-items: center; gap: 26px; margin-top: 8px; }

.btn {
  appearance: none;
  border: 1px solid var(--rule-strong);
  background: transparent;
  padding: 15px 24px;
  font-family: var(--mono);
  font-size: 15px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink);
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.btn:hover { background: var(--brass); border-color: var(--brass); color: #17140f; }

.closing-note {
  font-family: var(--mono);
  font-size: 15px;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.colophon {
  border-left: 1px solid var(--rule);
  padding-left: 34px;
  font-size: 18px;
  line-height: 1.5;
  color: var(--muted);
}

.colophon p { margin: 0 0 16px; max-width: 340px; }

.colophon-mark {
  font-family: var(--serif);
  font-size: 40px !important;
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin-bottom: 22px !important;
}

.slide--closing::before {
  content: "";
  position: absolute;
  right: -260px;
  top: 40px;
  width: 880px;
  height: 880px;
  border: 1px solid rgba(239, 232, 218, 0.07);
  border-radius: 50%;
  pointer-events: none;
}

/* ---------- figure internals ---------- */

.fig { display: block; overflow: visible; }

.fig .ln {
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.fig .hair { stroke-width: 1; opacity: 0.55; }

.fig .brass { stroke: var(--brass); }

.fig .blue { stroke: var(--blue); }

.fig .dash { stroke-dasharray: 2 9; }

.fig .lead { stroke-width: 1; stroke-dasharray: 1 7; opacity: 0.65; }

.fig text {
  font-family: var(--mono);
  font-size: 18px;
  letter-spacing: 0.1em;
  fill: var(--muted);
}

.fig .lbl {
  font-size: 18px;
  letter-spacing: 0.14em;
  fill: var(--ink-soft);
}

.fig .lbl-strong { fill: var(--ink); }

.fig .num { fill: var(--brass); font-size: 16px; letter-spacing: 0.06em; }

.fig .tick-num { font-size: 15px; letter-spacing: 0.02em; fill: var(--muted); }

.fig .fig-title {
  font-size: 15px;
  letter-spacing: 0.16em;
  fill: var(--muted);
  text-transform: uppercase;
}

.fig .dial-num {
  font-family: var(--serif);
  font-size: 38px;
  letter-spacing: 0.03em;
  fill: var(--ink);
}

.fig .dial-brand {
  font-family: var(--mono);
  font-size: 17px;
  letter-spacing: 0.38em;
  fill: var(--ink);
}

.fig .dial-script {
  font-family: var(--serif);
  font-style: italic;
  font-size: 36px;
  letter-spacing: 0;
  fill: var(--ink);
}

.fig .dial-small {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  fill: var(--muted);
}

.fig .date-num {
  font-family: var(--mono);
  font-size: 20px;
  letter-spacing: 0;
  fill: var(--ink);
}

.fig .dial-hand {
  fill: var(--paper-2);
  stroke: currentColor;
  stroke-width: 2;
  stroke-linejoin: round;
}

.fig .dial-ring { opacity: 0.07; }

.fig .dot-fill { fill: var(--ink); stroke: none; }
.fig .brass-fill { fill: var(--brass); stroke: none; }
.fig .blue-fill { fill: var(--blue); stroke: none; }
.fig .paper-fill { fill: var(--paper); }
.fig .night-fill { fill: var(--night); }

/* ---------- reveal ---------- */

[data-reveal] { opacity: 0; transform: translateY(16px); }

.slide.is-active [data-reveal] {
  animation: rise 0.8s cubic-bezier(0.2, 0.7, 0.2, 1) forwards;
  animation-delay: var(--d, 0s);
}

@keyframes rise {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---------- HUD ---------- */

.hud {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: var(--hud-h);
  z-index: 40;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 20px;
  padding: 0 22px;
  background: #0c0b09;
  border-top: 1px solid #221e18;
  color: #a99f8c;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.progress {
  position: absolute;
  inset: 0 0 auto;
  height: 2px;
  background: #221e18;
  overflow: hidden;
}

.progress i {
  display: block;
  width: 100%;
  height: 100%;
  background: var(--brass-bright);
  transform: scaleX(0.0769);
  transform-origin: left center;
  transition: transform 0.45s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.hud-left { display: flex; align-items: baseline; gap: 16px; min-width: 0; }

.hud-mark { color: #efe8da; letter-spacing: 0.24em; font-weight: 500; }

.hud-meta { color: #6f6759; letter-spacing: 0.1em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.hud-center { display: flex; align-items: center; gap: 4px; }

.hud-btn {
  appearance: none;
  width: 42px;
  height: 42px;
  border: 0;
  background: transparent;
  display: grid;
  place-items: center;
  cursor: pointer;
  color: #b8ae9c;
  transition: background 0.18s ease, color 0.18s ease;
}

.hud-btn svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.6; }

.hud-btn:hover:not(:disabled) { background: #1c1915; color: #efe8da; }

.hud-btn:disabled { opacity: 0.28; cursor: default; }

.hud-btn--small { width: 36px; height: 36px; }

.hud-count {
  display: flex;
  align-items: baseline;
  gap: 7px;
  padding: 0 12px;
  font-size: 12px;
  letter-spacing: 0.12em;
  color: #6f6759;
}

.hud-count b { font-size: 14px; font-weight: 500; color: #efe8da; letter-spacing: 0.1em; }

.hud-right { display: flex; align-items: center; justify-content: flex-end; gap: 8px; }

.hud-text {
  appearance: none;
  border: 0;
  background: transparent;
  padding: 12px 14px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #b8ae9c;
  cursor: pointer;
}

.hud-text:hover { color: #efe8da; background: #1c1915; }

.hud button:focus-visible,
.btn:focus-visible,
.index button:focus-visible {
  outline: 1px solid var(--brass-bright);
  outline-offset: 2px;
}

/* ---------- index ---------- */

.index {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: var(--paper);
  color: var(--ink);
  overflow-y: auto;
  padding: 52px 6vw 40px;
}

.index[hidden] { display: none; }

.index-inner { max-width: 1520px; margin: 0 auto; display: flex; flex-direction: column; min-height: 100%; }

.index-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 40px;
  border-bottom: 1px solid var(--rule-strong);
  padding-bottom: 22px;
}

.index-kicker {
  display: block;
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--brass);
  margin-bottom: 16px;
}

.index-head h2 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  font-size: 86px;
  line-height: 0.9;
  letter-spacing: -0.03em;
}

.index-close {
  appearance: none;
  border: 1px solid var(--rule-strong);
  background: transparent;
  padding: 12px 20px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
  color: var(--ink);
}

.index-close:hover { background: var(--ink); color: var(--paper); }

.index-list {
  list-style: none;
  margin: 26px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 70px;
  align-content: start;
  flex: 1;
}

.index-list li { border-bottom: 1px solid var(--rule); }

.index-item {
  appearance: none;
  border: 0;
  background: transparent;
  width: 100%;
  display: grid;
  grid-template-columns: 46px 1fr auto;
  gap: 12px;
  align-items: baseline;
  padding: 15px 6px 14px;
  text-align: left;
  cursor: pointer;
  color: var(--ink);
  transition: background 0.18s ease, padding-left 0.18s ease;
}

.index-item:hover { background: rgba(169, 119, 47, 0.08); padding-left: 12px; }

.index-item .n {
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.08em;
  color: var(--brass);
}

.index-item .t {
  font-family: var(--serif);
  font-size: 30px;
  line-height: 1.1;
  letter-spacing: -0.01em;
}

.index-item .s {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}

.index-item.is-current .t { color: var(--brass); }

.index-item.is-current .s::before {
  content: "";
  display: inline-block;
  width: 5px;
  height: 5px;
  margin-right: 8px;
  vertical-align: 1px;
  background: var(--brass);
}

.index-foot {
  margin: auto 0 0;
  padding-top: 22px;
  border-top: 1px solid var(--rule);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ---------- misc ---------- */

.noscript {
  position: fixed;
  inset: auto 20px 80px;
  z-index: 100;
  background: var(--paper);
  color: var(--ink);
  padding: 20px;
  font-family: var(--mono);
  font-size: 14px;
}

/* ---------- responsive ---------- */

@media (max-width: 900px) {
  :root { --hud-h: 52px; }
  .hud { padding: 0 10px; grid-template-columns: auto 1fr auto; }
  .hud-left { display: none; }
  .hud-right { gap: 0; }
  .hud-meta { display: none; }
  .index { padding: 32px 22px 24px; }
  .index-list { grid-template-columns: 1fr; }
  .index-head h2 { font-size: 64px; }
  .index-item .t { font-size: 26px; }
}

/* ---------- mobile reader ---------- */

@media (max-width: 800px) {
  html, body { height: auto; overflow-x: hidden; overflow-y: auto; }

  .viewport { position: static; inset: auto; overflow: visible; }

  .stage {
    position: static;
    left: auto;
    top: auto;
    width: 100%;
    height: auto;
    transform: none !important;
    box-shadow: none;
    overflow: visible;
  }

  .hud { display: none; }

  .slide {
    position: relative;
    inset: auto;
    width: 100%;
    height: auto;
    min-height: 100svh;
    padding: 22px 20px 26px;
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
    border-bottom: 1px solid var(--rule);
  }

  [data-reveal] { opacity: 1 !important; transform: none !important; animation: none !important; }

  .rail { font-size: 10px; letter-spacing: 0.14em; gap: 12px; padding-bottom: 12px; }
  .rail-left { gap: 10px; }
  .mark { padding-left: 11px; }
  .mark::before { width: 4px; height: 4px; }

  .cover { display: flex; flex-direction: column; align-items: stretch; flex: none; gap: 18px; padding-top: 28px; }
  .cover-copy { order: 1; }
  .cover-figure { order: 2; height: auto; margin-top: 8px; }
  .cover-title { font-size: 64px; margin: 18px 0 0 -2px; }
  .cover-sub { font-size: 20px; line-height: 1.4; margin-top: 18px; max-width: none; }
  .cover-meta { margin-top: 28px; gap: 18px; font-size: 10px; flex-wrap: wrap; }
  .cover-meta b { margin-bottom: 5px; }
  .cover-figure .fig, .cover-figure svg { width: 100%; max-width: 330px; }
  .cover-figure figcaption { font-size: 11px; margin-top: 8px; }

  .slide-head { display: flex; flex-direction: column; gap: 14px; padding: 28px 0 18px; align-items: flex-start; }
  .slide-head--tight { padding: 24px 0 14px; }
  .slide-head > div:first-child { gap: 14px; }
  .head-side { padding: 0; }
  .headline, .split .headline { font-size: 42px; line-height: 1.02; }
  .body { font-size: 18px; line-height: 1.55; max-width: none; }

  .kicker { font-size: 12px; gap: 10px; }
  .kicker::before { width: 4px; height: 4px; }

  .split, .split--fig-left, .split--fig-right, .split--fig-mid, .split--fig-bleed {
    display: flex;
    flex-direction: column;
    flex: none;
    gap: 22px;
    padding: 6px 0 18px;
    align-items: stretch;
  }
  .copy, .copy--right { order: 1; max-width: none; gap: 18px; }
  .fig-wrap, .fig-bleed, .fig-wide, .fig-hero, .anatomy-fig {
    order: 2;
    height: auto !important;
    min-height: 0;
    padding: 0;
  }
  .fig-wrap .fig, .fig-wide .fig, .fig-hero .fig, .anatomy-fig .fig {
    width: 100%;
    height: auto;
    max-height: none;
  }
  .fig-bleed .fig { width: 100%; margin: 0; }
  .fig-bleed figcaption { position: static; text-align: left; }
  .fig-wrap figcaption, .fig-wide figcaption, .anatomy-fig figcaption { font-size: 11px; text-align: left; margin-top: 6px; }

  .premise { display: flex; flex-direction: column; flex: none; gap: 26px; padding: 4px 0 18px; align-items: stretch; }
  .chain-step { grid-template-columns: 34px 1fr; gap: 12px; padding: 18px 0; }
  .chain-step h3 { font-size: 22px; }
  .chain-step p { font-size: 15px; }
  .chain-num { font-size: 12px; padding-top: 3px; }
  .pull { padding-top: 18px; }
  .pull p { font-size: 27px; }
  .pull span { font-size: 11px; margin-top: 14px; }

  .facts { margin-top: 6px; }
  .fact { grid-template-columns: 1fr; gap: 3px; padding: 11px 0 10px; }
  .fact .k { font-size: 16px; }
  .fact .v { font-size: 13px; text-align: left; }
  .stat-grid { margin-top: 4px; }
  .stat { padding: 12px 0 11px 14px; }
  .stat-v { font-size: 32px; }
  .stat-k { font-size: 10px; }

  .anatomy { display: flex; flex-direction: column; flex: none; gap: 20px; padding: 0 0 16px; align-items: stretch; }
  .legend { order: 2; }
  .legend li { grid-template-columns: 32px 1fr; padding: 9px 0 8px; }
  .legend b { font-size: 18px; }
  .legend span { font-size: 14px; }
  .legend-num { font-size: 11px; }

  .closing { display: flex; flex-direction: column; flex: none; gap: 30px; padding: 24px 0 20px; align-items: stretch; }
  .closing-line { font-size: 44px; }
  .closing .body { font-size: 18px; }
  .closing-actions { flex-direction: column; align-items: flex-start; gap: 14px; margin-top: 4px; }
  .closing-note { font-size: 11px; display: none; }
  .colophon { border-left: 0; border-top: 1px solid var(--rule); padding: 18px 0 0; font-size: 15px; }
  .colophon p { max-width: none; }
  .colophon-mark { font-size: 32px !important; margin-bottom: 12px !important; }
  .slide--closing::before { display: none; }

  .foot { margin-top: auto; padding-top: 20px; font-size: 10px; line-height: 1.5; gap: 14px; }
  .pagenum { font-size: 11px; }

  .index { padding: 26px 20px 20px; }
  .index-head h2 { font-size: 52px; }
  .index-list { grid-template-columns: 1fr; margin-top: 18px; }
  .index-item { grid-template-columns: 36px 1fr; gap: 8px; padding: 13px 2px 12px; }
  .index-item .t { font-size: 24px; }
  .index-item .s { display: none; }
}

@media (max-height: 560px) {
  :root { --hud-h: 46px; }
  .hud-btn { width: 38px; height: 38px; }
}

/* ---------- reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  [data-reveal] { opacity: 1; transform: none; }
  .slide { transform: none; }
}

/* ---------- print ---------- */

@media print {
  @page { size: 1920px 1080px; margin: 0; }

  html, body { background: #fff; overflow: visible; height: auto; }
  .hud, .index, .noscript { display: none !important; }
  .viewport { position: static; inset: auto; display: block; overflow: visible; }
  .stage { position: static; left: auto; top: auto; width: 1920px; height: auto; transform: none !important; box-shadow: none; overflow: visible; }
  .slide {
    position: relative;
    inset: auto;
    width: 1920px;
    height: 1080px;
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
    page-break-after: always;
    break-after: page;
  }
  .slide:last-child { page-break-after: auto; break-after: auto; }
  [data-reveal] { opacity: 1 !important; transform: none !important; animation: none !important; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
