/* The Covenant — a night-temple film for Sourcery.
   Fonts: Cormorant Garamond, Cinzel, JetBrains Mono (SIL OFL 1.1, self-hosted). */

@font-face { font-family: 'Cormorant Garamond'; font-style: normal; font-weight: 400; font-display: swap; src: url('../fonts/cormorant-garamond-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'Cormorant Garamond'; font-style: normal; font-weight: 500; font-display: swap; src: url('../fonts/cormorant-garamond-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family: 'Cormorant Garamond'; font-style: normal; font-weight: 600; font-display: swap; src: url('../fonts/cormorant-garamond-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: 'Cormorant Garamond'; font-style: italic; font-weight: 500; font-display: swap; src: url('../fonts/cormorant-garamond-latin-500-italic.woff2') format('woff2'); }
@font-face { font-family: 'Cinzel'; font-style: normal; font-weight: 400; font-display: swap; src: url('../fonts/cinzel-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'Cinzel'; font-style: normal; font-weight: 600; font-display: swap; src: url('../fonts/cinzel-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: 'JetBrains Mono'; font-style: normal; font-weight: 400; font-display: swap; src: url('../fonts/jetbrains-mono-latin-400-normal.woff2') format('woff2'); }

:root {
  --ink-0: #04050b;
  --ink-1: #07080f;
  --ink-2: #0c0f24;
  --ink-3: #151a45;
  --panel: rgba(13, 16, 38, 0.78);
  --panel-edge: rgba(227, 192, 122, 0.2);
  --gold: #e3c07a;
  --gold-2: #c9a25a;
  --gold-dim: #8f7443;
  --lamp: #ffe2a8;
  --text: #ece4d2;
  --muted: #b9b7cb;
  --faint: #9290ad;
  --refuse: #e8917f;
  --refuse-wash: rgba(232, 145, 127, 0.1);
  --accept-wash: rgba(227, 192, 122, 0.1);
  --serif: 'Cormorant Garamond', 'Cormorant', 'EB Garamond', Georgia, 'Times New Roman', serif;
  --caps: 'Cinzel', 'Trajan Pro', 'Cormorant Garamond', Georgia, serif;
  --mono: 'JetBrains Mono', ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;
  --gutter: clamp(16px, 5vw, 64px);
  --measure: 1180px;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html {
  background:
    radial-gradient(120% 70% at 50% -10%, #1a1f52 0%, rgba(26, 31, 82, 0) 60%),
    linear-gradient(180deg, #0a0c1d 0%, #07080f 40%, #06070d 100%);
  background-color: var(--ink-1);
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(19px, 0.55vw + 15px, 21px);
  line-height: 1.55;
  font-kerning: normal;
  font-variant-ligatures: common-ligatures;
  font-variant-numeric: lining-nums;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(90% 55% at 50% 118%, rgba(242, 201, 111, 0.13), rgba(242, 201, 111, 0) 70%);
  z-index: 0;
}

.sky {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

main, .masthead, .colophon { position: relative; z-index: 1; }

a { color: var(--gold); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { color: var(--lamp); }
:focus-visible { outline: 2px solid var(--lamp); outline-offset: 3px; border-radius: 6px; }
::selection { background: rgba(227, 192, 122, 0.35); color: #fff; }

h1, h2, h3 { font-weight: 500; margin: 0; }
p { margin: 0; }
code, pre { font-family: var(--mono); }

.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 20;
  background: var(--gold); color: #140f04; padding: 10px 16px; border-radius: 8px;
  font-family: var(--caps); font-size: 13px; letter-spacing: 0.1em; text-decoration: none;
}
.skip-link:focus { top: 12px; }

.eyebrow {
  font-family: var(--caps);
  font-size: 12.5px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 22px;
}

.fine { font-size: 15.5px; line-height: 1.5; color: var(--faint); }
.nowrap { white-space: nowrap; }
.soft { color: var(--muted); }

/* ------------------------------------------------------------ masthead -- */

.masthead {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px var(--gutter);
  background: rgba(7, 8, 15, 0.72);
  -webkit-backdrop-filter: blur(12px) saturate(1.2);
  backdrop-filter: blur(12px) saturate(1.2);
  border-bottom: 1px solid rgba(227, 192, 122, 0.08);
}
.wordmark {
  display: inline-flex; align-items: center; gap: 10px;
  color: var(--text); text-decoration: none;
  font-family: var(--caps); font-size: 15px; letter-spacing: 0.24em; text-transform: uppercase;
}
.wordmark svg { width: 30px; height: 20px; fill: none; stroke: var(--gold); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.masthead nav { display: flex; gap: clamp(14px, 2vw, 28px); }
.masthead nav a {
  font-family: var(--caps); font-size: 11.5px; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--muted); text-decoration: none; padding: 6px 0;
}
.masthead nav a:hover { color: var(--lamp); }

/* ---------------------------------------------------------------- hero -- */

.hero {
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  grid-template-rows: 1fr auto auto;
  justify-items: center;
  align-items: end;
  padding: 120px var(--gutter) 28px;
  text-align: center;
  gap: 18px;
}
.hero-copy { max-width: 1140px; align-self: center; }
.hero h1 {
  font-size: clamp(42px, 6vw, 88px);
  line-height: 1.03;
  letter-spacing: -0.015em;
  text-wrap: balance;
}
.hero h1 .soft { color: var(--gold); font-style: italic; }
.lead { font-size: clamp(20px, 1.2vw + 13px, 27px); line-height: 1.45; color: var(--muted); max-width: 44ch; margin: 26px auto 0; text-wrap: pretty; }
.hero-note { margin-top: 18px; font-style: italic; color: var(--faint); font-size: 18px; }

.temple { width: auto; height: clamp(170px, 34vh, 360px); max-width: 94vw; overflow: visible; }
.temple .lines { fill: none; stroke: var(--gold); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; opacity: 0.92; }
.temple .door { animation: door 7s ease-in-out infinite; }
.temple .spill { animation: door 7s ease-in-out infinite; }
@keyframes door { 0%, 100% { opacity: 0.78; } 50% { opacity: 1; } }

.descend {
  display: inline-flex; flex-direction: column; align-items: center; gap: 10px;
  font-family: var(--caps); font-size: 11px; letter-spacing: 0.34em; text-transform: uppercase;
  color: var(--faint); text-decoration: none; padding-bottom: 6px;
}
.descend::after { content: ''; width: 1px; height: 42px; background: linear-gradient(var(--gold), transparent); animation: descend 2.6s ease-in-out infinite; transform-origin: top; }
@keyframes descend { 0% { transform: scaleY(0); opacity: 0; } 30% { opacity: 1; } 100% { transform: scaleY(1); opacity: 0; } }

/* ---------------------------------------------------------- text scenes -- */

section { scroll-margin-top: 72px; }

.scene-text {
  max-width: var(--measure);
  margin: 0 auto;
  padding: clamp(96px, 15vh, 190px) var(--gutter);
}
.scene-text h2, .gate-head h2, .follow h2 {
  font-size: clamp(36px, 4.4vw, 68px);
  line-height: 1.05;
  letter-spacing: -0.01em;
  text-wrap: balance;
  max-width: 20ch;
}
.statement { font-size: clamp(30px, 3.5vw, 54px) !important; line-height: 1.14 !important; max-width: 22ch !important; }
p.statement { margin-top: 22px; font-style: italic; }
.body { margin-top: 22px; max-width: 40ch; color: var(--muted); }
.body-wide { margin-top: 26px; max-width: 58ch; color: var(--muted); font-size: clamp(20px, 0.8vw + 14px, 24px); }

.js [data-reveal] { opacity: 0; transform: translateY(18px); transition: opacity 1s ease, transform 1s cubic-bezier(.2, .7, .1, 1); }
.js [data-reveal].in { opacity: 1; transform: none; }

/* the distance */
.gap { margin: 64px 0 0; }
.gap-track { display: flex; align-items: center; justify-content: center; min-height: 90px; }
.gap-line {
  height: 1px;
  width: calc(min(62vw, 660px) * (1 - var(--p, 0) * 0.86));
  background: linear-gradient(90deg, rgba(227, 192, 122, 0.2), var(--lamp), rgba(227, 192, 122, 0.2));
  box-shadow: 0 0 12px rgba(255, 226, 168, 0.4);
}
.gap-end { position: relative; display: grid; justify-items: center; }
.gap-end i { width: 12px; height: 12px; border-radius: 50%; background: var(--lamp); box-shadow: 0 0 18px 4px rgba(255, 214, 140, 0.5); }
.gap-end b { position: absolute; top: 22px; white-space: nowrap; font-weight: 500; font-style: italic; color: var(--muted); font-size: 18px; }
.gap figcaption { margin-top: 34px; text-align: center; font-size: clamp(22px, 1.4vw + 14px, 32px); line-height: 1.3; color: var(--text); max-width: 32ch; margin-left: auto; margin-right: auto; text-wrap: balance; }

/* substitutions */
.subs { list-style: none; margin: 44px 0 0; padding: 0; display: grid; gap: 10px; }
.subs li {
  font-size: clamp(22px, 2.3vw, 36px);
  line-height: 1.25;
  padding: 10px 0;
  border-bottom: 1px solid rgba(227, 192, 122, 0.1);
}
.subs .a { color: var(--text); }
.subs .b { color: var(--text); }
.subs s {
  text-decoration: none;
  color: var(--muted);
  background: linear-gradient(var(--refuse), var(--refuse)) no-repeat 0 58% / 0% 2px;
  transition: background-size 0.9s ease 0.5s, opacity 0.9s ease 0.5s, color 0.9s ease 0.5s;
}
.subs em { font-style: italic; color: var(--gold); opacity: 0; transition: opacity 0.8s ease 1.2s; margin-left: 0.25em; }
.subs li.in s { background-size: 100% 2px; opacity: 0.55; }
.subs li.in em { opacity: 1; }

.question { margin: 60px 0 0; padding: 0 0 0 28px; border-left: 2px solid var(--gold); }
.question p { font-size: clamp(26px, 2.6vw, 42px); line-height: 1.2; font-style: italic; color: var(--lamp); max-width: 30ch; }

/* ----------------------------------------------------------- inscription -- */

.scene { position: relative; height: 560vh; }
.scene-sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  justify-items: center;
  align-content: center;
  gap: clamp(18px, 3.2vh, 40px);
  padding: 84px var(--gutter) 28px;
  text-align: center;
}
.scene-head .eyebrow { margin-bottom: 14px; }
.scene-head h2 { font-size: clamp(34px, 3.8vw, 58px); line-height: 1.05; }
.scene-lead { margin-top: 12px; color: var(--muted); max-width: 52ch; margin-left: auto; margin-right: auto; font-size: clamp(18px, 0.6vw + 14px, 21px); }

.inscription {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.16em;
  white-space: nowrap;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(34px, 7.4vw, 118px);
  line-height: 1;
  color: var(--gold);
  padding: 0.12em 0 0.3em;
}
.inscription svg { fill: none; stroke: currentColor; stroke-width: clamp(2px, 0.22vw, 3.4px); stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; overflow: visible; }
.inscription svg path { vector-effect: non-scaling-stroke; }
.inscription sub { font-size: 0.42em; vertical-align: baseline; position: relative; top: 0.32em; margin-left: 0.02em; }
.turn { display: inline-flex; align-items: flex-end; }
.turn > svg { width: 0.56em; height: 0.92em; }
.subscript { display: inline-flex; align-items: center; gap: 0.08em; font-size: 0.34em; transform: translateY(0.5em); margin-left: 0.04em; }
.subscript .wedge { width: 0.62em; height: 0.62em; }
.subscript .comma { margin: 0 0.12em 0 0; }
.arrow { position: relative; display: inline-flex; flex-direction: column; align-items: center; margin: 0 0.12em; }
.arrow-label { font-size: 0.4em; display: inline-flex; gap: 0.2em; align-items: baseline; margin-bottom: -0.1em; }
.arrow-label .slash { color: var(--gold-dim); }
.arrow-line { width: 2.1em; height: 0.26em; }

.sym { transition: opacity 0.55s ease, color 0.55s ease, text-shadow 0.55s ease, filter 0.55s ease; }
.scene:not([data-step="all"]):not([data-step="six"]) .sym { opacity: 0.24; }
.scene[data-step="c"] .sym[data-k="c"],
.scene[data-step="turn"] .sym[data-k="turn"],
.scene[data-step="ark"] .sym[data-k="ark"],
.scene[data-step="i"] .sym[data-k="i"],
.scene[data-step="s0"] .sym[data-k="s0"],
.scene[data-step="d"] .sym[data-k="d"],
.scene[data-step="w"] .sym[data-k="w"],
.scene[data-step="s1"] .sym[data-k="s1"] {
  opacity: 1;
  color: var(--lamp);
  text-shadow: 0 0 28px rgba(255, 214, 140, 0.55);
  filter: drop-shadow(0 0 10px rgba(255, 214, 140, 0.45));
}
.scene[data-step="six"] .inscription { color: var(--lamp); filter: drop-shadow(0 0 14px rgba(255, 214, 140, 0.35)); }

.captions { position: relative; list-style: none; margin: 0; padding: 0; width: min(760px, 100%); min-height: 13.5em; align-self: start; }
.captions > li { position: absolute; inset: 0 0 auto 0; opacity: 0; transform: translateY(12px); transition: opacity 0.55s ease, transform 0.55s ease; pointer-events: none; }
.captions h3 { font-size: clamp(24px, 1.2vw + 16px, 34px); color: var(--text); margin-bottom: 10px; font-weight: 600; }
.captions h3 i { color: var(--gold); }
.captions p { color: var(--muted); font-size: clamp(19px, 0.5vw + 15px, 22px); max-width: 44ch; margin: 0 auto; }
.captions p.ref { max-width: none; }
.captions p i { color: var(--text); }
.captions .ref { margin-top: 14px; font-family: var(--caps); font-size: 11.5px; letter-spacing: 0.24em; text-transform: uppercase; color: var(--gold); }
.six { text-align: left; display: inline-grid; gap: 4px; margin: 6px auto 0; padding-left: 1.4em; color: var(--muted); font-size: clamp(18px, 0.5vw + 14px, 21px); counter-reset: six; list-style: none; }
.six li { counter-increment: six; position: relative; }
.six li::before { content: counter(six); position: absolute; left: -1.75em; top: 0.3em; width: 1.35em; height: 1.35em; border-radius: 50%; border: 1px solid var(--gold); color: var(--gold); font-family: var(--mono); font-style: normal; font-size: 0.62em; line-height: 1; display: grid; place-items: center; }
.scene[data-step="all"] .captions li[data-k="all"],
.scene[data-step="c"] .captions li[data-k="c"],
.scene[data-step="turn"] .captions li[data-k="turn"],
.scene[data-step="ark"] .captions li[data-k="ark"],
.scene[data-step="i"] .captions li[data-k="i"],
.scene[data-step="s0"] .captions li[data-k="s0"],
.scene[data-step="d"] .captions li[data-k="d"],
.scene[data-step="w"] .captions li[data-k="w"],
.scene[data-step="s1"] .captions li[data-k="s1"],
.scene[data-step="six"] .captions li[data-k="six"] { opacity: 1; transform: none; pointer-events: auto; }

.scene-rail { display: flex; gap: 10px; }
.scene-rail span { width: 6px; height: 6px; border-radius: 50%; background: rgba(227, 192, 122, 0.25); transition: background 0.4s, transform 0.4s; }
.scene-rail span.on { background: var(--lamp); transform: scale(1.5); box-shadow: 0 0 10px rgba(255, 214, 140, 0.6); }

/* Static presentation: small screens, reduced motion, or no JS */
.scene.static { height: auto; }
.scene.static .scene-sticky { position: static; height: auto; padding-top: clamp(96px, 14vh, 160px); padding-bottom: clamp(60px, 10vh, 120px); grid-template-rows: auto; }
.scene.static .sym { opacity: 1 !important; }
.scene.static .captions { min-height: 0; display: grid; gap: 30px; text-align: left; }
.scene.static .captions > li { position: static; opacity: 1; transform: none; pointer-events: auto; padding-top: 26px; border-top: 1px solid rgba(227, 192, 122, 0.14); }
.scene.static .captions p { margin: 0; }
.scene.static .captions p.ref { margin-top: 12px; }
.scene.static .six { margin: 6px 0 0; }
.scene.static .scene-rail { display: none; }
.no-js .scene { height: auto; }

/* ---------------------------------------------------- Ark and covenant -- */

.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: clamp(28px, 5vw, 80px); align-items: center; }
.formula {
  margin-top: 28px;
  font-family: var(--caps);
  font-size: clamp(13px, 0.4vw + 10px, 15px);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--lamp);
  line-height: 2;
}
.formula span { border-bottom: 1px solid rgba(227, 192, 122, 0.4); }
.formula b { color: var(--gold); font-weight: 600; padding: 0 0.2em; }

.ark-svg { width: 100%; height: auto; overflow: visible; }
.ark-ring { stroke: var(--gold); stroke-width: 1.5; }
.ark-label { font-family: var(--caps); font-size: 13.5px; letter-spacing: 0.3em; fill: var(--gold); }
.cov-fill { fill: url(#cov-fill); stroke: var(--gold); stroke-width: 1.6; }
.cov-ghost { fill: none; stroke: var(--refuse); stroke-width: 1.5; stroke-dasharray: 5 7; opacity: 0.75; }
.cov-label { font-family: var(--caps); font-size: 17px; letter-spacing: 0.28em; fill: var(--lamp); text-anchor: middle; }
.cov-sub { font-family: var(--serif); font-style: italic; font-size: 21px; fill: var(--muted); text-anchor: middle; }
.cov-cannot { font-family: var(--serif); font-style: italic; font-size: 21px; fill: var(--refuse); text-anchor: middle; }
.cov-breathe { transform-origin: 330px 262px; animation: breathe 10s ease-in-out infinite; }
@keyframes breathe { 0%, 100% { transform: scale(0.97); } 50% { transform: scale(1.035); } }

.axioms { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(20px, 3vw, 44px); margin-top: clamp(56px, 8vh, 96px); }
.axioms figure { margin: 0; padding-top: 22px; border-top: 1px solid rgba(227, 192, 122, 0.35); }
.axioms blockquote { margin: 0; font-style: italic; font-size: clamp(23px, 1vw + 15px, 29px); line-height: 1.2; color: var(--lamp); }
.axioms figcaption { margin-top: 12px; color: var(--muted); font-size: 18px; }

/* -------------------------------------------------------- commandments -- */

.commandments { text-align: center; }
.commandments h2 { margin: 0 auto; }
.stamp-line {
  display: inline-block;
  margin-top: 22px;
  padding: 8px 18px;
  border-top: 1px dashed rgba(227, 192, 122, 0.5);
  border-bottom: 1px dashed rgba(227, 192, 122, 0.5);
  font-family: var(--caps);
  font-size: 12px;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--gold);
}
.tablets { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(18px, 3vw, 44px); margin-top: 56px; text-align: left; }
.tablet {
  position: relative;
  padding: clamp(64px, 7vw, 92px) clamp(22px, 3vw, 46px) clamp(30px, 3vw, 44px);
  border-radius: 48% 48% 20px 20px / 120px 120px 20px 20px;
  background:
    var(--noise, none),
    radial-gradient(120% 70% at 50% 0%, rgba(255, 226, 168, 0.08), rgba(255, 226, 168, 0) 60%),
    linear-gradient(180deg, #1a1e45 0%, #12153a 55%, #0e1030 100%);
  border: 1px solid rgba(227, 192, 122, 0.24);
  box-shadow: inset 0 1px 0 rgba(255, 236, 190, 0.08), inset 0 -30px 60px rgba(0, 0, 0, 0.35), 0 40px 90px -50px rgba(0, 0, 0, 0.9);
}
.tablet::before { content: ''; position: absolute; inset: 12px; border-radius: inherit; border: 1px solid rgba(227, 192, 122, 0.12); pointer-events: none; }
.tablet ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 22px; }
.tablet li { display: grid; grid-template-columns: 3.2em minmax(0, 1fr); column-gap: 10px; }
.tablet .num { grid-row: span 2; font-family: var(--caps); font-weight: 600; font-size: 22px; color: var(--gold); text-shadow: 0 1px 0 rgba(0, 0, 0, 0.7), 0 0 18px rgba(227, 192, 122, 0.25); padding-top: 2px; }
.tablet h3 { font-family: var(--caps); font-weight: 600; font-size: clamp(14px, 0.4vw + 11px, 16.5px); letter-spacing: 0.08em; color: var(--lamp); text-shadow: 0 1px 0 rgba(0, 0, 0, 0.8); }
.tablet p { margin-top: 5px; color: var(--muted); font-size: clamp(17.5px, 0.4vw + 14px, 19.5px); line-height: 1.45; text-shadow: 0 1px 0 rgba(0, 0, 0, 0.6); }

.unsealed { display: flex; align-items: center; gap: clamp(18px, 3vw, 36px); max-width: 860px; margin: 56px auto 0; text-align: left; }
.seal { flex: 0 0 auto; width: clamp(92px, 11vw, 124px); height: auto; overflow: visible; }
.seal-rim { fill: none; stroke: var(--gold); stroke-width: 1.2; stroke-dasharray: 3 6; }
.seal-wax { fill: #5e2622; stroke: #8f3b33; stroke-width: 1.2; opacity: 0.9; }
.seal-crack { fill: none; stroke: #07080f; stroke-width: 2.4; stroke-linejoin: round; }
.seal text { font-family: var(--caps); font-size: 8.6px; letter-spacing: 0.22em; fill: var(--gold); }
.unsealed .body { margin: 0; max-width: none; }
.unsealed .fine { margin-top: 12px; font-style: italic; }

/* ---------------------------------------------------------------- gate -- */

.gate { max-width: 1360px; margin: 0 auto; padding: clamp(96px, 14vh, 170px) var(--gutter) clamp(60px, 10vh, 120px); }
.gate-head { max-width: 860px; }
.gate-head .scene-lead { margin: 18px 0 0; max-width: 58ch; font-size: clamp(19px, 0.6vw + 15px, 23px); }
.magic { margin-top: 14px; font-style: italic; color: var(--gold); font-size: 19px; }

.gate-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin-top: 44px; align-items: start; }
.gate-lower { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 20px; margin-top: 20px; align-items: start; }

.panel {
  background: var(--panel);
  border: 1px solid var(--panel-edge);
  border-radius: 18px;
  padding: clamp(18px, 2vw, 26px);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  box-shadow: 0 30px 80px -44px rgba(0, 0, 0, 0.9);
  min-width: 0;
}
.panel h3 { font-family: var(--caps); font-weight: 600; font-size: 13px; letter-spacing: 0.24em; text-transform: uppercase; color: var(--gold); }

.lamp-row { display: flex; align-items: center; gap: 12px; }
.lamp-row h3 { font-size: 12.5px; letter-spacing: 0.16em; }
.lamp { width: 128px; height: auto; flex: 0 0 auto; overflow: visible; }
.lamp .vessel { fill: #2b2412; stroke: var(--gold); stroke-width: 1.4; }
.lamp .vessel-line, .lamp .foot { fill: none; stroke: var(--gold-dim); stroke-width: 1.2; }
.lamp .foot { fill: #211b0d; stroke: var(--gold); }
.lamp .flame, .lamp .halo { opacity: 0; transition: opacity 0.9s ease; transform-origin: 104px 46px; }
.lamp .smoke { fill: none; stroke: var(--faint); stroke-width: 1.2; stroke-linecap: round; opacity: 0.45; transition: opacity 0.9s ease; animation: smoke 5s ease-in-out infinite; }
.lamp[data-lit="true"] .flame { opacity: 1; animation: flicker 2.4s ease-in-out infinite; }
.lamp[data-lit="true"] .halo { opacity: 1; animation: halo 3.2s ease-in-out infinite; }
.lamp[data-lit="true"] .smoke { opacity: 0; }
@keyframes flicker { 0%, 100% { transform: scale(1, 1) skewX(0deg); } 25% { transform: scale(0.96, 1.05) skewX(2deg); } 50% { transform: scale(1.03, 0.97) skewX(-1.5deg); } 75% { transform: scale(0.98, 1.03) skewX(1deg); } }
@keyframes halo { 0%, 100% { opacity: 0.8; } 50% { opacity: 1; } }
@keyframes smoke { 0%, 100% { transform: translateY(0); opacity: 0.35; } 50% { transform: translateY(-3px); opacity: 0.55; } }
.oil { margin-top: 6px; color: var(--muted); font-size: 17px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.oil-drops { display: inline-flex; gap: 4px; }
.oil-drops i { width: 8px; height: 11px; border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%; background: var(--gold); box-shadow: 0 0 8px rgba(227, 192, 122, 0.5); }

.facts { margin: 16px 0 0; display: grid; gap: 6px; }
.facts > div { display: grid; grid-template-columns: 7.2em minmax(0, 1fr); gap: 10px; align-items: baseline; }
.facts dt { font-family: var(--caps); font-size: 10.5px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--faint); }
.facts dd { margin: 0; font-size: 16px; color: var(--text); overflow-wrap: anywhere; }
.facts code { font-size: 12px; color: var(--lamp); }
.facts dd.pulse, .facts code.pulse { animation: pulse 1.4s ease; }
@keyframes pulse { 0% { text-shadow: 0 0 0 rgba(255, 214, 140, 0); } 30% { text-shadow: 0 0 14px rgba(255, 214, 140, 0.9); color: #fff; } 100% { text-shadow: 0 0 0 rgba(255, 214, 140, 0); } }

.tree { margin: 16px 0 0; }
.tree svg { width: 100%; height: auto; overflow: visible; display: block; }
.tree figcaption { margin-top: 6px; font-size: 15px; color: var(--muted); }
.tree .edge { stroke: rgba(227, 192, 122, 0.3); stroke-width: 1; fill: none; }
.tree .edge.hot { stroke: var(--lamp); stroke-width: 1.6; filter: drop-shadow(0 0 4px rgba(255, 214, 140, 0.8)); }
.tree .node { fill: #0c0f24; stroke: var(--gold-dim); stroke-width: 1.2; }
.tree .node.hot { stroke: var(--lamp); fill: #2a220e; }
.tree .keystone { fill: #2a220e; stroke: var(--gold); stroke-width: 1.4; }
.tree .keystone.hot { stroke: var(--lamp); filter: drop-shadow(0 0 8px rgba(255, 214, 140, 0.8)); }
.tree text { font-family: var(--mono); font-size: 8.5px; fill: var(--muted); }
.tree .root-label { font-size: 9px; fill: var(--lamp); }
.tree .leaf-label { font-size: 8px; fill: var(--faint); }

.cells { list-style: none; margin: 14px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 8px; }
.cells li { padding: 9px 11px; border-radius: 10px; background: rgba(255, 226, 168, 0.04); border: 1px solid rgba(227, 192, 122, 0.16); min-width: 0; }
.cells .k { display: block; font-family: var(--mono); font-size: 11px; color: var(--gold); }
.cells .v { display: block; font-size: 17px; line-height: 1.25; color: var(--text); overflow-wrap: anywhere; }
.cells .id { display: block; font-family: var(--mono); font-size: 10px; color: var(--faint); }
.cells li.new { animation: rise 1.2s cubic-bezier(.2, .7, .1, 1); border-color: var(--lamp); }
@keyframes rise { 0% { transform: translateY(8px); opacity: 0; box-shadow: 0 0 0 rgba(255, 214, 140, 0); } 40% { opacity: 1; box-shadow: 0 0 24px rgba(255, 214, 140, 0.45); } 100% { transform: none; box-shadow: 0 0 0 rgba(255, 214, 140, 0); } }

/* composer */
.composer fieldset { border: 0; padding: 0; margin: 18px 0 0; min-width: 0; }
.composer legend { padding: 0; margin-bottom: 8px; font-family: var(--caps); font-size: 10.5px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--faint); }
.visually-hidden, .seg input, .preset input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; pointer-events: none; }
.seg { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.seg label {
  position: relative; display: grid; gap: 1px; text-align: center; cursor: pointer;
  padding: 8px 6px; border-radius: 10px; border: 1px solid rgba(227, 192, 122, 0.2);
  background: rgba(255, 226, 168, 0.03); transition: border-color 0.2s, background 0.2s;
}
.seg label b { font-weight: 600; font-size: 17px; line-height: 1.2; }
.seg label small { font-size: 13px; color: var(--faint); line-height: 1.2; }
.seg label:hover { border-color: rgba(227, 192, 122, 0.5); }
.seg input:checked + span { color: var(--lamp); }
.seg label:has(input:checked) { border-color: var(--gold); background: rgba(227, 192, 122, 0.12); box-shadow: 0 0 0 1px rgba(227, 192, 122, 0.35) inset; }
.seg label:has(input:focus-visible), .preset:has(input:focus-visible) { outline: 2px solid var(--lamp); outline-offset: 2px; }

.preset-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.preset {
  position: relative; display: block; cursor: pointer;
  padding: 8px 10px 9px; border-radius: 10px; border: 1px solid rgba(227, 192, 122, 0.14);
  background: rgba(255, 226, 168, 0.02); transition: border-color 0.2s, background 0.2s;
}
.preset:hover { border-color: rgba(227, 192, 122, 0.42); }
.preset:has(input:checked) { border-color: var(--gold); background: rgba(227, 192, 122, 0.1); }
.preset b { display: block; font-weight: 600; font-size: 16.5px; line-height: 1.25; }
.preset.unavailable { opacity: 0.55; }
.preset-blurb { margin-top: 10px; min-height: 2.9em; font-size: 16px; line-height: 1.4; font-style: italic; color: var(--muted); }

.note-field { display: grid; gap: 6px; margin-top: 10px; font-size: 15px; color: var(--muted); }
.note-field input, .composer input[type="text"] {
  font: inherit; font-size: 17px; color: var(--text); background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(227, 192, 122, 0.3); border-radius: 8px; padding: 8px 10px; width: 100%;
}
.mischief label { display: flex; gap: 10px; align-items: baseline; font-size: 17px; line-height: 1.35; color: var(--muted); margin-top: 6px; cursor: pointer; }
.mischief .hint { white-space: nowrap; }
.mischief input { accent-color: var(--gold); width: 16px; height: 16px; flex: 0 0 auto; transform: translateY(2px); }
.mischief input:disabled + * , .mischief label:has(input:disabled) { opacity: 0.55; cursor: not-allowed; }
.hint { font-size: 14px; color: var(--faint); font-style: italic; }

.btn-gold {
  margin-top: 20px;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%;
  padding: 14px 22px;
  border: 0; border-radius: 999px; cursor: pointer;
  font-family: var(--caps); font-weight: 600; font-size: 13px; letter-spacing: 0.2em; text-transform: uppercase;
  color: #1b1404;
  background: linear-gradient(180deg, #f6dea4 0%, #e3c07a 48%, #c9a25a 100%);
  box-shadow: 0 0 0 1px rgba(255, 236, 190, 0.35) inset, 0 12px 40px -12px rgba(242, 201, 111, 0.55);
  transition: transform 0.15s ease, box-shadow 0.2s ease, filter 0.2s ease;
}
.btn-gold:hover { filter: brightness(1.06); box-shadow: 0 0 0 1px rgba(255, 236, 190, 0.5) inset, 0 16px 50px -12px rgba(242, 201, 111, 0.75); }
.btn-gold:active { transform: translateY(1px); }
.btn-gold:disabled { opacity: 0.55; cursor: progress; }
.btn-gold.big { width: auto; padding: 18px 34px; font-size: 14px; }
.availability { margin-top: 8px; min-height: 1.3em; font-size: 15px; font-style: italic; color: var(--refuse); }

.wire { margin-top: 14px; }
.wire summary, .covenant-panel summary { cursor: pointer; font-size: 15.5px; color: var(--muted); }
.wire summary:hover, .covenant-panel summary:hover { color: var(--lamp); }
.wire pre, .covenant-panel pre {
  margin: 10px 0 0; padding: 12px; border-radius: 10px; max-height: 240px; overflow: auto;
  background: rgba(0, 0, 0, 0.35); border: 1px solid rgba(227, 192, 122, 0.14);
  font-size: 11.5px; line-height: 1.55; color: #d8d3c4; white-space: pre-wrap; word-break: break-all;
}
.covenant-panel pre { white-space: pre; word-break: normal; }

/* judgment */
.stages { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 4px; }
.stages li { display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 10px; padding: 8px 6px; border-radius: 10px; transition: background 0.3s; }
.stages .dot {
  width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; margin-top: 2px;
  border: 1px solid rgba(227, 192, 122, 0.35); color: var(--faint);
  font-family: var(--caps); font-size: 11px; transition: all 0.35s ease;
}
.stages b { display: block; font-weight: 600; font-size: 17.5px; line-height: 1.3; }
.stages small { display: block; font-size: 14.5px; line-height: 1.35; color: var(--faint); margin-top: 1px; overflow-wrap: anywhere; }
.stages li.running .dot { border-color: var(--lamp); color: var(--lamp); box-shadow: 0 0 14px rgba(255, 214, 140, 0.6); }
.stages li.ok .dot { background: var(--gold); border-color: var(--gold); color: #1b1404; box-shadow: 0 0 14px rgba(227, 192, 122, 0.5); }
.stages li.ok small { color: var(--muted); }
.stages li.fail { background: var(--refuse-wash); }
.stages li.fail .dot { background: var(--refuse); border-color: var(--refuse); color: #1f0c08; box-shadow: 0 0 14px rgba(232, 145, 127, 0.5); }
.stages li.fail small { color: var(--refuse); }
.stages li.skipped { opacity: 0.45; }

.verdict { margin-top: 16px; padding: 16px; border-radius: 12px; border: 1px solid rgba(227, 192, 122, 0.16); min-height: 96px; }
.verdict-idle { color: var(--faint); font-style: italic; font-size: 17px; }
.verdict.accepted { background: var(--accept-wash); border-color: rgba(227, 192, 122, 0.55); }
.verdict.refused { background: var(--refuse-wash); border-color: rgba(232, 145, 127, 0.5); }
.verdict h4 { margin: 0; font-family: var(--caps); font-weight: 600; font-size: 13px; letter-spacing: 0.22em; text-transform: uppercase; }
.verdict.accepted h4 { color: var(--gold); }
.verdict.refused h4 { color: var(--refuse); }
.verdict p { margin-top: 8px; font-size: 17.5px; line-height: 1.45; color: var(--text); }
.verdict .ref { font-family: var(--caps); font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--gold); margin-top: 10px; }
.verdict code { font-size: 11.5px; color: var(--lamp); overflow-wrap: anywhere; }

/* covenant */
.rules { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 8px; }
.rules li { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; gap: 10px; align-items: baseline; padding: 8px 10px; border-radius: 10px; border: 1px solid rgba(227, 192, 122, 0.12); }
.rules .rule-name { font-family: var(--caps); font-weight: 600; color: var(--gold); }
.rules .rule-state { font-size: 14px; color: var(--faint); font-style: italic; white-space: nowrap; }
.rules li.held .rule-state { color: var(--gold); }
.rules li.broken { border-color: rgba(232, 145, 127, 0.6); background: var(--refuse-wash); }
.rules li.broken .rule-state { color: var(--refuse); }
.rules li.changed { animation: rise 1.2s cubic-bezier(.2, .7, .1, 1); }

/* journal */
.journal-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.journal { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 6px; max-height: 360px; overflow: auto; }
.journal li { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 10px; padding: 9px 10px; border-radius: 10px; border: 1px solid rgba(227, 192, 122, 0.12); }
.journal .seq { font-family: var(--caps); font-size: 12px; color: var(--gold); padding-top: 3px; }
.journal .what { font-size: 16.5px; line-height: 1.3; }
.journal .what b { font-weight: 600; }
.journal .out { display: block; font-size: 14.5px; color: var(--muted); }
.journal .wid { display: block; font-family: var(--mono); font-size: 10.5px; color: var(--faint); overflow-wrap: anywhere; }
.journal li.rejected { border-style: dashed; }
.journal li.rejected .seq { color: var(--refuse); }
.journal li.rejected .out { color: var(--refuse); }
.journal li.fresh { animation: rise 1.2s cubic-bezier(.2, .7, .1, 1); }
.journal li.forged { border-color: var(--refuse); background: var(--refuse-wash); }
.journal .empty { display: block; color: var(--faint); font-style: italic; font-size: 16px; border: 0; padding: 4px 0; }

.replay { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.btn-line {
  font-family: var(--caps); font-weight: 600; font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--gold); background: transparent; border: 1px solid rgba(227, 192, 122, 0.45);
  padding: 10px 14px; border-radius: 999px; cursor: pointer; transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.btn-line:hover { background: rgba(227, 192, 122, 0.12); color: var(--lamp); border-color: var(--gold); }
.btn-line:disabled { opacity: 0.45; cursor: not-allowed; }
.forgery { margin-top: 12px; color: var(--refuse); font-size: 16px; font-style: italic; }
.replay-lines { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 4px; }
.replay-lines li { display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: 8px; font-size: 15.5px; line-height: 1.4; color: var(--muted); animation: fadein 0.4s ease both; }
.replay-lines li::before { content: '✓'; color: var(--gold); font-family: var(--mono); }
.replay-lines li.bad { color: var(--refuse); }
.replay-lines li.bad::before { content: '✗'; color: var(--refuse); }
.replay-lines li.final { color: var(--text); font-weight: 600; }
@keyframes fadein { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

.disclaimer { margin-top: 22px; font-size: 15px; color: var(--faint); max-width: 90ch; font-style: italic; }

/* ------------------------------------------------------------- witness -- */

.witness .quote { margin: 30px 0 0; padding-left: 22px; border-left: 2px solid var(--gold); font-style: italic; font-size: clamp(21px, 1vw + 14px, 26px); line-height: 1.35; color: var(--lamp); max-width: 38ch; }
.chain { margin: 0; }
.chain svg { width: 100%; height: auto; overflow: visible; }
.chain figcaption { margin-top: 10px; color: var(--muted); font-size: 17px; font-style: italic; }
.chain .spine { stroke: rgba(227, 192, 122, 0.45); stroke-width: 1.5; }
.chain .genesis { fill: var(--lamp); }
.chain .acc { fill: var(--gold); stroke: var(--lamp); stroke-width: 1; }
.chain .rej { fill: none; stroke: var(--refuse); stroke-width: 1.4; }
.chain .rej-link { stroke: rgba(232, 145, 127, 0.5); stroke-dasharray: 3 4; stroke-width: 1.2; }
.chain text { font-family: var(--mono); font-size: 10.5px; fill: var(--muted); }
.chain .lbl-caps { font-family: var(--caps); font-size: 11px; letter-spacing: 0.2em; fill: var(--gold); }

/* ---------------------------------------------------------- federation -- */

.federation h2 { max-width: 16ch; }
.fed-wrap { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); gap: clamp(24px, 4vw, 64px); align-items: center; margin-top: 40px; }
#constellation { width: 100%; height: clamp(300px, 36vw, 460px); display: block; }
.fed-copy .body { margin-top: 0; }
.maxims { list-style: none; margin: 26px 0 0; padding: 0; display: grid; gap: 14px; }
.maxims li { font-style: italic; font-size: clamp(20px, 0.8vw + 14px, 24px); color: var(--lamp); line-height: 1.3; padding-left: 18px; border-left: 1px solid rgba(227, 192, 122, 0.4); }
.fed-copy .fine { margin-top: 26px; }

/* ------------------------------------------------------------- promise -- */

.litany { list-style: none; margin: 44px 0 0; padding: 0; display: grid; gap: clamp(8px, 1.4vh, 16px); }
.litany li { font-size: clamp(24px, 2.7vw, 44px); line-height: 1.16; letter-spacing: -0.005em; }
.litany li span:last-child { color: var(--muted); }
.litany em { font-style: italic; color: var(--gold); padding: 0 0.12em; }
.coda { margin-top: 56px; max-width: 46ch; font-style: italic; color: var(--lamp); font-size: clamp(21px, 1vw + 14px, 27px); line-height: 1.38; }

/* --------------------------------------------------------------- built -- */

.stack b { color: var(--text); font-weight: 600; }
.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin-top: 48px; }
.card { background: var(--panel); border: 1px solid var(--panel-edge); border-radius: 18px; padding: clamp(20px, 2.2vw, 30px); display: grid; align-content: start; gap: 12px; }
.card-kicker { font-family: var(--caps); font-size: 11.5px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--gold); }
.card h3 { font-size: clamp(26px, 1.2vw + 18px, 34px); line-height: 1.1; }
.card p { color: var(--muted); }
.card .card-line { font-style: italic; color: var(--lamp); }
.soon { color: var(--lamp); }
.card-soon { border-color: rgba(255, 226, 168, 0.4); box-shadow: 0 0 60px -30px rgba(255, 214, 140, 0.45); }

/* -------------------------------------------------------------- ledger -- */

.ledger-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: clamp(24px, 4vw, 64px); margin-top: 44px; align-items: start; }
.status { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
.status li { position: relative; padding-left: 26px; color: var(--muted); }
.status li::before { content: ''; position: absolute; left: 2px; top: 0.62em; width: 8px; height: 8px; transform: rotate(45deg); border: 1px solid var(--gold); }
.status b { color: var(--text); font-weight: 600; }
.promises { width: 100%; border-collapse: collapse; }
.promises caption { text-align: left; font-family: var(--caps); font-size: 12px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--gold); padding-bottom: 14px; }
.promises th, .promises td { text-align: left; vertical-align: top; padding: 12px 10px 12px 0; border-top: 1px solid rgba(227, 192, 122, 0.18); }
.promises thead th { font-family: var(--caps); font-size: 10.5px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--faint); font-weight: 400; border-top: 0; }
.promises tbody th { font-weight: 600; font-size: 19px; line-height: 1.3; width: 52%; }
.promises td { color: var(--muted); font-size: 17px; }

/* -------------------------------------------------------------- follow -- */

.follow { max-width: 900px; margin: 0 auto; padding: clamp(110px, 16vh, 200px) var(--gutter) clamp(90px, 14vh, 160px); text-align: center; }
.follow h2 { margin: 0 auto; max-width: 18ch; }
.follow .lead { margin-bottom: 36px; }
.follow-note { margin-top: 20px; font-style: italic; color: var(--lamp); }

.colophon { text-align: center; padding: 40px var(--gutter) 56px; border-top: 1px solid rgba(227, 192, 122, 0.12); }
.wordmark-foot { font-family: var(--caps); font-size: 12.5px; letter-spacing: 0.3em; text-transform: uppercase; color: var(--gold); }
.colophon .fine { margin: 12px auto 0; max-width: 70ch; }

/* ---------------------------------------------------------------- film -- */

.screen { margin: 44px 0 0; }
.screen-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(227, 192, 122, 0.3);
  background: #05060c;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.6), 0 40px 120px -40px rgba(242, 201, 111, 0.35), 0 30px 80px -40px rgba(0, 0, 0, 0.9);
}
.screen video { display: block; width: 100%; height: 100%; object-fit: cover; background: #05060c; }
.screen-bar { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-top: 14px; color: var(--muted); font-size: 16.5px; font-style: italic; }
.screen-actions { display: inline-flex; align-items: center; gap: 16px; font-style: normal; }
.screen-link { font-family: var(--caps); font-size: 11.5px; letter-spacing: 0.18em; text-transform: uppercase; text-decoration: none; }
.btn-line[aria-pressed="true"] { background: rgba(227, 192, 122, 0.16); color: var(--lamp); border-color: var(--gold); }

.films-page main { padding-top: 40px; }
.films-hero { max-width: var(--measure); margin: 0 auto; padding: clamp(110px, 16vh, 170px) var(--gutter) 0; }
.films-hero h1 { font-size: clamp(40px, 5.4vw, 80px); line-height: 1.04; letter-spacing: -0.012em; max-width: 16ch; }
.films-hero .lead { margin: 22px 0 0; max-width: 56ch; }
.screening { max-width: 1180px; margin: 0 auto; padding: 0 var(--gutter); }
.screening .screen { margin-top: clamp(36px, 6vh, 64px); }
.chapters { list-style: none; margin: 20px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.chapters button {
  width: 100%; text-align: left; cursor: pointer; font: inherit; font-size: 17px; color: var(--text);
  background: rgba(255, 226, 168, 0.03); border: 1px solid rgba(227, 192, 122, 0.18); border-radius: 10px; padding: 10px 12px;
  transition: border-color 0.2s, background 0.2s;
}
.chapters button:hover { border-color: var(--gold); background: rgba(227, 192, 122, 0.1); }
.chapters button span { font-family: var(--mono); font-size: 12px; color: var(--gold); margin-right: 8px; }
.techniques { margin: 36px 0 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 36px; }
.techniques > div { padding-top: 16px; border-top: 1px solid rgba(227, 192, 122, 0.22); }
.techniques dt { font-family: var(--caps); font-weight: 600; font-size: 12.5px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--gold); }
.techniques dd { margin: 8px 0 0; color: var(--muted); }
.techniques code, .transcript code { font-size: 0.8em; color: var(--lamp); }
.prov { margin-top: 30px; }
.prov-facts { margin: 0; display: grid; gap: 10px; }
.prov-facts > div { display: grid; grid-template-columns: 9.5em minmax(0, 1fr); gap: 14px; }
.prov-facts dt { font-family: var(--caps); font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--faint); padding-top: 4px; }
.prov-facts dd { margin: 0; color: var(--muted); font-size: 17px; overflow-wrap: anywhere; }
.prov-facts code { font-size: 12.5px; color: var(--lamp); }
.prov-table { width: 100%; border-collapse: collapse; margin-top: 26px; font-size: 16px; }
.prov-table th, .prov-table td { text-align: left; padding: 10px 12px 10px 0; border-top: 1px solid rgba(227, 192, 122, 0.16); vertical-align: top; color: var(--muted); }
.prov-table thead th { font-family: var(--caps); font-size: 10.5px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--faint); font-weight: 400; border-top: 0; }
.prov-table tbody th { font-weight: 600; color: var(--text); }
.prov-table code { font-size: 12px; color: var(--lamp); }
.transcript-lines { margin: 30px 0 0; padding-left: 1.3em; display: grid; gap: 14px; color: var(--muted); max-width: 70ch; }
.transcript-lines b { color: var(--text); font-weight: 600; }
.transcript-lines s { color: var(--faint); text-decoration-color: var(--refuse); }
.transcript-lines em { color: var(--gold); }
.transcript .fine { margin-top: 24px; }

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

@media (min-width: 1200px) {
  .gate-grid .judgment { position: sticky; top: 76px; }
}

@media (max-width: 1199px) {
  .gate-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gate-grid .judgment { grid-column: 1 / -1; }
}

@media (max-width: 979px) {
  .gate-lower { grid-template-columns: minmax(0, 1fr); }
  .cards { grid-template-columns: minmax(0, 1fr); }
  .ledger-grid, .split, .fed-wrap { grid-template-columns: minmax(0, 1fr); }
  .axioms { grid-template-columns: minmax(0, 1fr); }
  .ark-svg { max-width: 560px; margin: 0 auto; }
}

@media (max-width: 819px) {
  .chapters { grid-template-columns: minmax(0, 1fr); }
  .techniques { grid-template-columns: minmax(0, 1fr); }
  .prov-facts > div { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .prov-table thead th:nth-child(2), .prov-table td:nth-child(2) { display: none; }

  .masthead nav a:not(:nth-child(3)) { display: none; }
  .scene { height: auto; }
  .scene-sticky { position: static; height: auto; }
  .gate-grid { grid-template-columns: minmax(0, 1fr); }
  .tablets { grid-template-columns: minmax(0, 1fr); }
  .tablet { border-radius: 46% 46% 18px 18px / 80px 80px 18px 18px; }
  .unsealed { flex-direction: column; text-align: center; }
  .unsealed > div { text-align: left; }
  .inscription { font-size: clamp(30px, 9.4vw, 64px); }
  .subs li { font-size: clamp(21px, 5.6vw, 28px); }
  .hero { padding-top: 104px; }
}

@media (max-width: 420px) {
  .seg label b { font-size: 15.5px; }
  .seg label small { font-size: 12px; }
  .facts > div { grid-template-columns: 6.4em minmax(0, 1fr); }
  .masthead { padding: 12px 16px; }
  .wordmark span { font-size: 13px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; transition-delay: 0s !important; }
  .js [data-reveal] { opacity: 1 !important; transform: none !important; }
  .scene { height: auto; }
  .scene-sticky { position: static; height: auto; }
  .gap-line { width: calc(min(62vw, 660px) * 0.35); }
}
