/* ===================================================
   APOSTOL SYSTEMS — v4 console
   One room. The machine answers. Every visible element is either the
   machine, an instrument, or the visitor's hand on the controls.
   =================================================== */

:root {
  --void:       #060505;
  --carbon:     #0d0b09;
  --gold:       #d4af37;
  --gold-warm:  #e6c56b;
  --gold-dim:   #8a6f2b;
  --hair:       rgba(212, 175, 55, 0.30);
  --hair-strong:rgba(212, 175, 55, 0.62);
  --glass:      rgba(10, 8, 6, 0.58);
  --text:       #eadfc4;
  --text-muted: #9a917e;
  --radius:     18px;
  --pill:       999px;
  --ease:       cubic-bezier(.2, .9, .2, 1);
  --edge:       clamp(20px, 4.5vw, 72px);
  --demo-panel-width: min(760px, 58vw);
  --demo-gap: clamp(14px, 1.5vw, 24px);
  --signal:     #b64a36;
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html { background: var(--void); -webkit-text-size-adjust: 100%; }

body {
  background: var(--void);
  color: var(--text);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-weight: 300;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

::selection { background: rgba(212, 175, 55, 0.28); color: #fff6de; }
:focus-visible { outline: 1px solid var(--gold-warm); outline-offset: 3px; border-radius: 4px; }
a { color: inherit; text-decoration: none; }

.display {
  font-family: 'Velox Chronos Display', Georgia, serif;
  font-weight: 400;
  letter-spacing: 0.02em;
  line-height: 1.06;
}
.eyebrow {
  font-size: 0.66rem;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: var(--gold-dim);
  font-weight: 500;
}

/* ---------- stage ---------- */

#stage {
  position: fixed; inset: 0;
  width: 100%; height: 100%;
  display: block;
  z-index: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity 1200ms var(--ease);
}
html.has-3d #stage { opacity: 1; }
html.booting #stage { opacity: 0; }

/* vignette + grain: the cinematic envelope */
html.has-3d body::before {
  content: '';
  position: fixed; inset: 0;
  z-index: 2; pointer-events: none;
  background: radial-gradient(115% 88% at 50% 45%, transparent 52%, rgba(0, 0, 0, 0.5) 100%);
}
#grain {
  position: fixed; inset: -3%;
  z-index: 3; pointer-events: none;
  opacity: 0.07;
  mix-blend-mode: soft-light;
  animation: grain 0.9s steps(3) infinite;
}
.render-minimal #grain { display: none; }
@keyframes grain {
  0%, 100% { transform: translate(0, 0); }
  33%      { transform: translate(-14px, 9px); }
  66%      { transform: translate(11px, -7px); }
}
.no-3d #grain, .no-3d body::before { display: none; }

#boot-veil {
  position: fixed; inset: 0; z-index: 60;
  display: grid; place-items: center;
  background: var(--void);
  transition: opacity 900ms var(--ease);
}
#boot-veil i {
  width: 34px; height: 34px;
  border: 1px solid var(--hair);
  border-top-color: var(--gold-warm);
  border-radius: 50%;
  animation: bootspin 0.9s linear infinite;
}
@keyframes bootspin { to { transform: rotate(360deg); } }
html:not(.booting) #boot-veil { opacity: 0; pointer-events: none; }
/* JS accelerates the reveal; CSS guarantees it. Without this, a blocked script
   left the page a permanent black rectangle. */
#boot-veil { animation: veiloff 600ms var(--ease) 2.8s forwards; }
@keyframes veiloff { to { opacity: 0; visibility: hidden; } }

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

/* corner brackets: drawn, not decorated */
.frame {
  position: fixed; inset: calc(var(--edge) * 0.55);
  z-index: 4; pointer-events: none;
}
.frame i {
  position: absolute;
  width: 26px; height: 26px;
  border: 0 solid rgba(212, 175, 55, 0.4);
  opacity: 0;
  transition: opacity 800ms var(--ease) 900ms;
}
.arrived .frame i { opacity: 1; }
.frame i:nth-child(1) { top: 0;    left: 0;   border-top-width: 1px; border-left-width: 1px; }
.frame i:nth-child(2) { top: 0;    right: 0;  border-top-width: 1px; border-right-width: 1px; }
.frame i:nth-child(3) { bottom: 0; left: 0;   border-bottom-width: 1px; border-left-width: 1px; }
.frame i:nth-child(4) { bottom: 0; right: 0;  border-bottom-width: 1px; border-right-width: 1px; }
.no-3d .frame { display: none; }

/* every HUD element rises on arrival, staggered */
.hud {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 700ms var(--ease), transform 700ms var(--ease);
}
.arrived .hud { opacity: 1; transform: none; }
/* the question dock must not wait for the machine */
.dock.hud { animation: dockin 700ms var(--ease) 1.15s forwards; }
@keyframes dockin { to { opacity: 1; transform: none; } }
.arrived .hud.h1 { transition-delay: 250ms; }
.arrived .hud.h2 { transition-delay: 450ms; }
.arrived .hud.h3 { transition-delay: 650ms; }
.arrived .hud.h4 { transition-delay: 850ms; }
.no-3d .hud { opacity: 1; transform: none; }

/* ---------- chrome ---------- */

.topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem var(--edge);
  pointer-events: none;
}
.brand { display: flex; align-items: center; gap: 0.7rem; }
.topbar .brand, .topbar .meet-minerva { pointer-events: auto; }
.brand-mark { width: 25px; height: 25px; display: block; }
.brand-word {
  font-size: 0.7rem;
  letter-spacing: 0.36em;
  text-transform: uppercase;
  font-weight: 500;
}
.brand-word b { font-weight: 500; color: var(--gold-warm); }
.topbar-tools {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 2.8vw, 2.8rem);
  margin-left: auto;
}
.meet-minerva {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 44px;
  color: var(--gold-warm);
  font-size: 0.56rem;
  font-weight: 500;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  white-space: nowrap;
  transition: color 240ms var(--ease), transform 240ms var(--ease);
}
.meet-minerva span { font-size: 1rem; line-height: 1; }
.meet-minerva:hover, .meet-minerva:focus-visible { color: #fff4d8; transform: translateX(2px); }

/* fields */
.intake { display: grid; gap: 0.72rem; }
.field { display: grid; gap: 0.32rem; }
.field > span {
  font-size: 0.7rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--gold-warm);
}
.field input, .field select {
  width: 100%;
  padding: 0.62rem 0.85rem;
  background: rgba(6, 5, 5, 0.66);
  border: 1px solid rgba(212, 175, 55, 0.22);
  border-radius: 10px;
  color: var(--text);
  font: inherit;
  font-size: 0.92rem;
  transition: border-color 220ms var(--ease), box-shadow 220ms var(--ease);
}
.field select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--gold-dim) 50%),
                    linear-gradient(135deg, var(--gold-dim) 50%, transparent 50%);
  background-position: right 1.05rem center, right 0.72rem center;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 2.2rem;
}
.field select option { background: var(--carbon); color: var(--text); }
.field input::placeholder { color: rgba(154, 145, 126, 0.5); }
.field input:focus, .field select:focus {
  outline: none;
  border-color: var(--hair-strong);
  box-shadow: 0 0 0 1px rgba(230, 197, 107, 0.16), 0 0 22px rgba(212, 175, 55, 0.14);
}
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0.72rem; }

.cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  padding: 0.72rem 1.5rem;
  border-radius: var(--pill);
  border: 1px solid var(--hair-strong);
  background: transparent;
  color: var(--gold-warm);
  font: inherit;
  font-size: 0.64rem;
  font-weight: 500;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  cursor: pointer;
  transition: box-shadow 260ms var(--ease), border-color 260ms var(--ease),
              color 260ms var(--ease), transform 260ms var(--ease);
}
.cta svg { width: 15px; height: 15px; }
.cta:hover, .cta:focus-visible {
  color: #fff4d8;
  border-color: var(--gold-warm);
  box-shadow: 0 0 0 1px rgba(230, 197, 107, 0.18), 0 0 32px rgba(212, 175, 55, 0.28);
  transform: translateY(-1px);
}
.cta--wide { width: 100%; }
.cta[disabled] { opacity: 0.45; cursor: default; transform: none; box-shadow: none; }

.form-status {
  margin-top: 0.85rem;
  padding: 0.75rem 0.9rem;
  border-radius: 10px;
  border: 1px solid var(--hair);
  background: rgba(212, 175, 55, 0.05);
  font-size: 0.84rem;
}
.form-status[hidden] { display: none; }
.form-status a { color: var(--gold-warm); border-bottom: 1px solid var(--hair); }
.form-status code {
  display: block; margin-top: 0.5rem;
  font-size: 0.72rem; color: var(--text-muted);
  white-space: pre-wrap; max-height: 26vh; overflow: auto;
}
.form-note { font-size: 0.68rem; color: var(--text-muted); margin-top: 0.8rem; line-height: 1.5; }


/* ---------- diagram labels: the visitor's own words, pinned to the machine ---------- */

#labels { position: fixed; inset: 0; z-index: 6; pointer-events: none; overflow: hidden; transition: opacity 900ms var(--ease); }
#labels.fade { opacity: 0; }
.dlabel {
  position: absolute; top: 0; left: 0;
  max-width: 30vw;
  padding: 0.32rem 0.7rem;
  border: 1px solid rgba(212, 175, 55, 0.28);
  border-radius: 8px;
  background: rgba(6, 5, 5, 0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  font-size: clamp(0.66rem, 1vw, 0.8rem);
  letter-spacing: 0.06em;
  color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  opacity: 0;
  transition: opacity 700ms var(--ease);
}
.dlabel.show { opacity: 1; }
.dlabel--core { border-color: rgba(230, 197, 107, 0.5); font-size: clamp(0.74rem, 1.15vw, 0.92rem); }

/* ---------- flat fallback ---------- */

.no-3d body {
  background:
    radial-gradient(70% 50% at 50% 30%, rgba(212, 175, 55, 0.08), transparent 65%),
    var(--void);
}
.no-3d .dock {
  position: static; translate: none;
  width: min(560px, 92vw);
  margin: 7rem auto 1.6rem;
}
.no-3d .step { display: grid; gap: 0.32rem; margin-bottom: 0.7rem; }
.no-3d .dock-nav { justify-content: flex-end; }
.no-3d #stepDots { display: none; }
.no-3d .sectors { position: static; justify-content: center; margin: 1.6rem 0 4rem; }

/* ---------- sub-pages ---------- */

.page-ambient {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(60% 42% at 50% 0%, rgba(212, 175, 55, 0.10), transparent 68%),
    radial-gradient(90% 60% at 50% 100%, rgba(212, 175, 55, 0.04), transparent 70%);
}
.page {
  position: relative; z-index: 2;
  max-width: 920px;
  margin: 0 auto;
  padding: clamp(6.5rem, 14vh, 9rem) var(--edge) 5rem;
}
.page-header { border-bottom: 1px solid rgba(212, 175, 55, 0.16); padding-bottom: 2rem; }
.page-header .eyebrow { display: block; }
.page-header h1 { font-size: clamp(2.4rem, 5.5vw, 4rem); margin: 0.6rem 0 0.4rem; }
.back-link {
  display: flex; width: fit-content;
  align-items: center; gap: 0.5rem;
  min-height: 44px;
  margin-bottom: 1.1rem;
  font-size: 0.6rem; letter-spacing: 0.28em; text-transform: uppercase;
  color: var(--gold-dim);
  transition: color 240ms var(--ease);
}
.back-link:hover { color: var(--gold-warm); }
.block { padding: 2.4rem 0; border-bottom: 1px solid rgba(212, 175, 55, 0.12); }
.block p { color: var(--text-muted); max-width: 66ch; }
.block p + p { margin-top: 0.8rem; }
.actions { display: flex; flex-wrap: wrap; gap: 0.7rem; margin-top: 1.2rem; }
.reveal { opacity: 0; transform: translateY(16px); transition: opacity 700ms var(--ease), transform 700ms var(--ease); }
.reveal.visible { opacity: 1; transform: none; }

/* ---------- Meet Minerva ---------- */

.minerva-page-shell { background: #040506; }
.minerva-ambient {
  background:
    radial-gradient(44% 32% at 74% 22%, rgba(230, 197, 107, 0.11), transparent 72%),
    radial-gradient(52% 36% at 48% 0%, rgba(212, 175, 55, 0.08), transparent 70%),
    linear-gradient(180deg, #040506 0%, #070604 58%, #040506 100%);
}
.minerva-page { max-width: 1180px; padding-top: clamp(5.8rem, 10vh, 7.8rem); }
.minerva-hero {
  min-height: min(760px, calc(100svh - 7rem));
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(350px, 0.95fr);
  align-items: center;
  gap: clamp(2rem, 6vw, 6.5rem);
  padding: clamp(1.5rem, 3vh, 2.8rem) 0 clamp(3rem, 7vh, 5.5rem);
  border-bottom: 1px solid rgba(212, 175, 55, 0.16);
}
.minerva-hero-copy { position: relative; z-index: 2; min-width: 0; }
.minerva-hero h1 {
  max-width: 11ch;
  margin: 0.7rem 0 1rem;
  font-size: clamp(3rem, 6.4vw, 5.8rem);
  line-height: 0.98;
}
.minerva-lede {
  max-width: 58ch;
  color: #bdb39f;
  font-size: clamp(1rem, 1.4vw, 1.16rem);
  line-height: 1.72;
}
.minerva-actions { align-items: center; gap: 1rem 1.4rem; margin-top: 1.7rem; }
.minerva-actions .cta, .minerva-closing .cta { min-height: 44px; }
.minerva-text-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--text-muted);
  font-size: 0.64rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  border-bottom: 1px solid transparent;
  transition: color 240ms var(--ease), border-color 240ms var(--ease);
}
.minerva-text-link:hover, .minerva-text-link:focus-visible {
  color: var(--gold-warm);
  border-bottom-color: var(--hair-strong);
}
.minerva-portrait {
  position: relative;
  min-width: 0;
  min-height: clamp(330px, 42vw, 610px);
  display: grid;
  place-items: center;
  isolation: isolate;
}
.minerva-portrait::before,
.minerva-portrait::after {
  content: '';
  position: absolute;
  left: 50%; top: 50%;
  translate: -50% -50%;
  border-radius: 50%;
  pointer-events: none;
}
.minerva-portrait::before {
  z-index: -2;
  width: 78%; aspect-ratio: 1;
  background: radial-gradient(circle, rgba(230, 197, 107, 0.12), rgba(212, 175, 55, 0.025) 44%, transparent 72%);
  filter: blur(10px);
}
.minerva-portrait::after {
  z-index: -1;
  width: 56%; aspect-ratio: 1;
  border: 1px solid rgba(230, 197, 107, 0.14);
  box-shadow: 0 0 70px rgba(212, 175, 55, 0.08), inset 0 0 50px rgba(212, 175, 55, 0.035);
}
.minerva-portrait img {
  display: block;
  width: min(100%, 640px);
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 0 22px rgba(230, 197, 107, 0.16)) drop-shadow(0 32px 60px rgba(0, 0, 0, 0.58));
}
.minerva-intro,
.minerva-company {
  display: grid;
  grid-template-columns: minmax(220px, 0.72fr) minmax(0, 1.28fr);
  gap: clamp(1.5rem, 6vw, 6rem);
  align-items: start;
}
.minerva-intro h2,
.minerva-company h2,
.minerva-growth h2,
.minerva-page > .block > h2,
.minerva-closing h2 {
  margin-top: 0.6rem;
  color: #f0e7d2;
  font-size: clamp(2rem, 4.4vw, 3.65rem);
  line-height: 1.04;
}
.minerva-intro > .eyebrow { grid-column: 1; }
.minerva-intro > h2 { grid-column: 1; }
.minerva-intro > .minerva-copy { grid-column: 2; grid-row: 1 / span 2; padding-top: 0.15rem; }
.minerva-copy p { max-width: 66ch; color: #aaa18f; font-size: clamp(0.98rem, 1.3vw, 1.08rem); line-height: 1.78; }
.minerva-copy p + p { margin-top: 1rem; }
.minerva-steps {
  margin-top: 2rem;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  list-style: none;
  border-top: 1px solid rgba(212, 175, 55, 0.2);
  border-bottom: 1px solid rgba(212, 175, 55, 0.2);
}
.minerva-steps li {
  position: relative;
  min-height: 200px;
  padding: clamp(1.3rem, 3vw, 2.25rem);
  border-bottom: 1px solid rgba(212, 175, 55, 0.12);
}
.minerva-steps li:nth-child(odd) { border-right: 1px solid rgba(212, 175, 55, 0.12); }
.minerva-steps li:nth-last-child(-n + 2) { border-bottom: 0; }
.minerva-step-number {
  display: block;
  margin-bottom: 1.8rem;
  color: var(--gold-dim);
  font-size: 0.56rem;
  font-weight: 500;
  letter-spacing: 0.3em;
}
.minerva-steps h3,
.minerva-outcomes h3 {
  color: #e9dfc8;
  font-family: 'Velox Chronos Display', Georgia, serif;
  font-size: clamp(1.25rem, 2.1vw, 1.65rem);
  font-weight: 400;
  line-height: 1.18;
}
.minerva-steps p,
.minerva-outcomes p {
  margin-top: 0.55rem;
  color: var(--text-muted);
  line-height: 1.68;
}
.minerva-growth {
  display: grid;
  grid-template-columns: minmax(220px, 0.72fr) minmax(0, 1.28fr);
  gap: clamp(1.5rem, 6vw, 6rem);
}
.minerva-outcomes {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 0.5rem;
  border-top: 1px solid rgba(212, 175, 55, 0.16);
}
.minerva-outcomes article {
  padding: 1.5rem clamp(1rem, 2.5vw, 2rem) 0;
  border-left: 1px solid rgba(212, 175, 55, 0.12);
}
.minerva-outcomes article:first-child { padding-left: 0; border-left: 0; }
.minerva-outcomes article:last-child { padding-right: 0; }
.minerva-company > .eyebrow { grid-column: 1; }
.minerva-company > h2 { grid-column: 1; }
.minerva-company > .minerva-copy { grid-column: 2; grid-row: 1 / span 2; padding-top: 0.15rem; }
.minerva-closing {
  margin-top: clamp(3rem, 8vh, 6rem);
  padding: clamp(2rem, 5vw, 4.5rem);
  border: 1px solid rgba(230, 197, 107, 0.3);
  background:
    linear-gradient(135deg, rgba(230, 197, 107, 0.06), transparent 44%),
    rgba(8, 7, 5, 0.56);
  text-align: center;
}
.minerva-closing h2 { max-width: 17ch; margin-left: auto; margin-right: auto; }
.minerva-closing p { max-width: 64ch; margin: 1rem auto 0; color: var(--text-muted); }
.minerva-closing .actions { justify-content: center; margin-top: 1.5rem; }

.foot {
  position: relative; z-index: 2;
  padding: 2.2rem var(--edge);
  border-top: 1px solid rgba(212, 175, 55, 0.14);
  display: flex; flex-wrap: wrap; gap: 1rem;
  justify-content: space-between; align-items: center;
  font-size: 0.66rem; letter-spacing: 0.16em; color: var(--text-muted);
}
.foot nav { display: flex; flex-wrap: wrap; gap: 1.3rem; }
.foot a { display: inline-flex; align-items: center; min-height: 44px; }
.foot a:hover { color: var(--gold-warm); }
.foot a[aria-current='page'] { color: var(--gold-warm); }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 70;
  padding: 0.7rem 1.2rem;
  background: var(--carbon); border: 1px solid var(--hair-strong);
  border-radius: 0 0 10px 0;
  color: var(--gold-warm);
  font-size: 0.66rem; letter-spacing: 0.2em; text-transform: uppercase;
}
.skip-link:focus { left: 0; }


/* ---------- orientation layouts ---------- */

/* Desktop + landscape: machine above, dock floating low-center. No scroll. */
html.has-3d, html.has-3d body { overflow: hidden; height: 100%; }

/* Short landscape (phone rotated): dock right, machine left */
@media (max-height: 480px) and (min-aspect-ratio: 5/4) {
  .dock {
    left: auto; right: 1rem; bottom: 50%;
    translate: 0 50%;
    width: min(400px, 52vw);
  }
  .sectors { bottom: 0.8rem; }
}

/* Portrait phone: machine top half, dock lower */
@media (max-width: 900px) and (orientation: portrait) {
  .dock { bottom: clamp(1.2rem, 6vh, 3rem); }
  .dlabel { max-width: 44vw; }
  .frame { display: none; }
}

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

/* narrow phones: sectors must never truncate */
@media (max-width: 480px) {
  .sectors { left: 0; right: 0; justify-content: center; gap: 1.1rem; }
  .sector span { font-size: 0.76rem; letter-spacing: 0.18em; }
  .dlabel { max-width: 38vw; font-size: 0.62rem; }
}

/* ================= v6: demos hero + pillars carrying the CTA ================= */

/* --- three clickable demos --- */

.demos {
  position: fixed; z-index: 12;
  left: 50%; translate: -50% 0;
  bottom: clamp(9.5rem, 22vh, 14rem);
  width: min(1080px, calc(100vw - 2rem));
}
.demos-rail { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(0.6rem, 1.4vw, 1.1rem); }

.demo {
  display: grid; gap: 0.3rem; text-align: left;
  padding: 0.95rem 1.05rem 0.85rem;
  border-radius: 14px;
  border: 1px solid var(--hair);
  background: linear-gradient(180deg, rgba(230,197,107,0.05), transparent 45%), rgba(10,8,6,0.5);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  color: var(--text); font: inherit; cursor: pointer;
  transition: transform 320ms var(--ease), border-color 320ms var(--ease), box-shadow 320ms var(--ease);
}
.demo:hover, .demo:focus-visible {
  transform: translateY(-3px);
  border-color: var(--hair-strong);
  box-shadow: 0 16px 44px rgba(0,0,0,0.5), 0 0 30px rgba(212,175,55,0.14);
}
.demo[aria-pressed='true'] {
  border-color: var(--gold-warm);
  box-shadow: 0 0 0 1px rgba(230,197,107,0.25), 0 0 34px rgba(212,175,55,0.25);
}
.demo-industry { font-size: 0.56rem; letter-spacing: 0.32em; text-transform: uppercase; color: var(--gold-warm); }
.demo-name {
  font-family: 'Velox Chronos Display', Georgia, serif;
  font-size: clamp(0.95rem, 1.25vw, 1.14rem);
  line-height: 1.15; letter-spacing: 0.01em;
}
.demo-go {
  display: inline-flex; align-items: center; gap: 0.35rem;
  font-size: 0.56rem; letter-spacing: 0.28em; text-transform: uppercase;
  color: var(--gold-dim); margin-top: 0.15rem;
}
.demo-go svg { width: 13px; height: 13px; }
.demo:hover .demo-go { color: var(--gold-warm); }

.demo-close[hidden] { display: none; }
.demo-close {
  display: block; margin: 0.85rem auto 0;
  background: none; border: 0; cursor: pointer;
  color: var(--gold-dim); font: inherit;
  font-size: 0.58rem; letter-spacing: 0.28em; text-transform: uppercase;
  min-height: 44px;
}
.demo-close:hover { color: var(--gold-warm); }

/* while a demo plays the rail shrinks so the diagram owns the frame */
.state-demo .demos { bottom: clamp(1.2rem, 4vh, 2.2rem); }
.state-demo .demo-name { font-size: clamp(0.8rem, 1vw, 0.95rem); }
.state-demo .demo-go { display: none; }
.state-demo .pillars { opacity: 0; pointer-events: none; }
.state-intake .demos { opacity: 0; pointer-events: none; }

/* --- the three pillars: name + the CTA that opens the intake --- */

.pillars {
  position: fixed; z-index: 12;
  left: 50%; translate: -50% 0;
  bottom: clamp(1.2rem, 3.5vh, 2.2rem);
  width: min(1080px, calc(100vw - 2rem));
  display: flex; flex-wrap: nowrap; justify-content: center; align-items: start;
  gap: clamp(0.8rem, 2.4vw, 2.4rem);
  transition: opacity 500ms var(--ease);
}
.pillar { display: grid; gap: 0.3rem; justify-items: center; }
.pillar-name {
  font-family: 'Velox Chronos Display', Georgia, serif;
  font-size: clamp(0.9rem, 1.15vw, 1.1rem);
  letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--text);
  border-bottom: 1px solid transparent;
  transition: color 260ms var(--ease), border-color 260ms var(--ease);
}
.pillar-name:hover { color: var(--gold-warm); border-bottom-color: var(--hair); }
.pillar-cta {
  display: inline-flex; align-items: center; gap: 0.4rem;
  white-space: nowrap;
  padding: 0.4rem 0.85rem; min-height: 44px;
  border-radius: var(--pill); border: 1px solid var(--hair);
  background: transparent; color: var(--gold-warm);
  font: inherit; font-size: 0.55rem; font-weight: 500;
  letter-spacing: 0.24em; text-transform: uppercase; cursor: pointer;
  transition: border-color 260ms var(--ease), box-shadow 260ms var(--ease), color 260ms var(--ease);
}
.pillar-cta svg { width: 13px; height: 13px; }
.pillar-cta:hover, .pillar-cta:focus-visible {
  color: #fff4d8; border-color: var(--gold-warm);
  box-shadow: 0 0 26px rgba(212,175,55,0.25);
}

/* --- tagline in the topbar --- */
.tagline {
  max-width: 42ch; margin-left: 0;
  font-size: 0.72rem; line-height: 1.5; color: var(--text-muted); text-align: right;
}

/* --- the intake dock, revealed by a pillar CTA --- */

.dock {
  position: fixed; z-index: 20;
  left: 50%; top: 50%; translate: -50% -50%;
  width: min(520px, calc(100vw - 1.6rem));
  max-height: calc(100vh - 3rem);
  overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--gold-dim) transparent;
  padding: 1.5rem 1.5rem 1.25rem;
  border-radius: var(--radius); border: 1px solid var(--hair-strong);
  background: linear-gradient(180deg, rgba(230,197,107,0.06), transparent 40%), rgba(8,6,5,0.82);
  backdrop-filter: blur(22px) saturate(115%); -webkit-backdrop-filter: blur(22px) saturate(115%);
  box-shadow: inset 0 1px 0 rgba(230,197,107,0.14), 0 30px 90px rgba(0,0,0,0.7);
  animation: dockpop 420ms var(--ease);
}
@keyframes dockpop { from { opacity: 0; transform: translateY(14px) scale(0.98); } }
.dock[hidden] { display: none; }
.dock h2 { font-size: clamp(1.2rem, 1.8vw, 1.5rem); margin: 0.35rem 0 0.85rem; }
.scope-note { margin: -0.35rem 0 1rem; color: var(--text-muted); font-size: 0.72rem; line-height: 1.5; }
.dock-close {
  position: absolute; top: 0.5rem; right: 0.6rem;
  width: 44px; height: 44px;
  background: none; border: 0; cursor: pointer;
  color: var(--gold-dim); font-size: 1.4rem; line-height: 1;
}
.dock-close:hover { color: var(--gold-warm); }

.step { display: none; }
.step.active { display: grid; gap: 0.32rem; animation: steprise 380ms var(--ease); }
@keyframes steprise { from { opacity: 0; transform: translateY(8px); } }
.step.shake { animation: shake 360ms var(--ease); }
@keyframes shake { 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }

.dock-nav { display: flex; align-items: center; justify-content: space-between; gap: 0.8rem; margin-top: 1rem; }
#stepDots { display: flex; gap: 0.45rem; }
#stepDots i { width: 14px; height: 2px; border-radius: 2px; background: rgba(212,175,55,0.22);
  transition: background 300ms var(--ease), width 300ms var(--ease); }
#stepDots i.done { background: var(--gold-warm); }
#stepDots i.now { background: var(--gold); width: 26px; }
#stepBack { background: none; border: 0; cursor: pointer; color: var(--gold-dim); font: inherit;
  font-size: 0.6rem; letter-spacing: 0.26em; text-transform: uppercase; padding: 0.4rem 0.2rem; min-height: 44px; }
#stepBack:hover { color: var(--gold-warm); }
#stepBack[hidden] { visibility: hidden; display: block; }
.dock .cta { padding: 0.6rem 1.6rem; min-height: 44px; }
.form-note { font-size: 0.66rem; color: var(--text-muted); margin-top: 0.6rem; line-height: 1.5; }

/* --- diagram labels --- */
#labels { position: fixed; inset: 0; z-index: 6; pointer-events: none; overflow: hidden;
  transition: opacity 700ms var(--ease); }
.state-intake #labels { opacity: 1; }
.dlabel {
  position: absolute; top: 0; left: 0; max-width: 30vw;
  padding: 0.3rem 0.66rem;
  border: 1px solid rgba(212,175,55,0.28); border-radius: 8px;
  background: rgba(6,5,5,0.6);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  font-size: clamp(0.62rem, 0.95vw, 0.78rem); letter-spacing: 0.06em; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  opacity: 0; transition: opacity 600ms var(--ease);
}
.dlabel.show { opacity: 1; }

/* --- flat fallback: everything visible, no state machine --- */
.no-3d body { background: radial-gradient(70% 50% at 50% 25%, rgba(212,175,55,0.08), transparent 65%), var(--void); }
.no-3d .demos, .no-3d .pillars, .no-3d .dock {
  position: static; translate: none; width: min(760px, 92vw); margin: 1.6rem auto; max-height: none; overflow: visible;
}
.no-3d .dock[hidden] { display: block; }
.no-3d .dock-close, .no-3d .demo-close { display: none; }
.no-3d .demos { margin-top: 6rem; }
.no-3d .step { display: grid; gap: 0.32rem; margin-bottom: 0.7rem; }
.no-3d #stepDots { display: none; }
.no-3d .tagline { text-align: left; margin: 0.6rem 0 0; }
.no-3d .topbar { position: static; display: block; }

/* --- orientation --- */
html.has-3d, html.has-3d body { overflow: hidden; height: 100%; }

@media (max-width: 900px) {
  .tagline { display: none; }
  .demos { bottom: clamp(7.5rem, 22vh, 11rem); width: calc(100vw - 1.2rem); }
  .demos-rail { grid-template-columns: 1fr; gap: 0.45rem; }
  .demo { padding: 0.62rem 0.8rem; grid-template-columns: 1fr auto; align-items: center; }
  .demo-name { grid-column: 1; font-size: 0.86rem; }
  .demo-industry { grid-column: 1; }
  .demo-go { grid-column: 2; grid-row: 1 / span 2; margin: 0; }
  /* each pillar becomes one compact row: name left, its CTA right */
  .pillars {
    flex-direction: column; flex-wrap: nowrap;
    gap: 0.4rem; bottom: 0.8rem;
    width: calc(100vw - 1.2rem);
  }
  .pillar {
    grid-template-columns: 1fr auto; align-items: center; justify-items: stretch;
    gap: 0.6rem; width: 100%;
    padding: 0.15rem 0.55rem;
    border: 1px solid rgba(212,175,55,0.16); border-radius: 10px;
    background: rgba(10,8,6,0.42);
    backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  }
  .pillar-name { font-size: 0.78rem; letter-spacing: 0.14em; text-align: left; }
  .pillar-cta {
    font-size: 0.48rem; padding: 0.3rem 0.6rem; letter-spacing: 0.14em;
    min-height: 40px; border-color: rgba(212,175,55,0.4);
  }
  .demos { bottom: 11.2rem; }
  .frame { display: none; }
  .dlabel { max-width: 42vw; }
}

@media (max-width: 780px) {
  .minerva-page { padding-top: 5.6rem; }
  .minerva-hero {
    min-height: 0;
    grid-template-columns: 1fr;
    gap: 1.4rem;
    padding-top: 1rem;
  }
  .minerva-hero h1 { max-width: 12ch; font-size: clamp(2.8rem, 12.5vw, 4.7rem); }
  .minerva-portrait { min-height: 0; }
  .minerva-portrait img { width: min(100%, 520px); }
  .minerva-intro,
  .minerva-company,
  .minerva-growth { grid-template-columns: 1fr; gap: 1rem; }
  .minerva-intro > .eyebrow,
  .minerva-intro > h2,
  .minerva-intro > .minerva-copy,
  .minerva-company > .eyebrow,
  .minerva-company > h2,
  .minerva-company > .minerva-copy { grid-column: 1; grid-row: auto; }
  .minerva-outcomes { grid-template-columns: 1fr; }
  .minerva-outcomes article,
  .minerva-outcomes article:first-child,
  .minerva-outcomes article:last-child {
    padding: 1.35rem 0;
    border-left: 0;
    border-bottom: 1px solid rgba(212, 175, 55, 0.12);
  }
  .minerva-outcomes article:last-child { border-bottom: 0; }
}

@media (max-width: 560px) {
  .minerva-steps { grid-template-columns: 1fr; }
  .minerva-steps li,
  .minerva-steps li:nth-child(odd),
  .minerva-steps li:nth-last-child(-n + 2) {
    min-height: 0;
    border-right: 0;
    border-bottom: 1px solid rgba(212, 175, 55, 0.12);
  }
  .minerva-steps li:last-child { border-bottom: 0; }
  .minerva-step-number { margin-bottom: 1rem; }
  .minerva-closing { padding: 1.7rem 1.15rem; }
}

@media (max-width: 360px) {
  .brand-word { font-size: 0.62rem; letter-spacing: 0.27em; }
  .meet-minerva { font-size: 0.5rem; letter-spacing: 0.16em; }
  .topbar-tools { gap: 0.5rem; }
}

/* short landscape: demos left column, pillars beneath */
@media (max-height: 520px) and (min-aspect-ratio: 5/4) {
  .demos { left: auto; right: 1rem; translate: none; bottom: auto; top: 3.2rem; width: min(330px, 44vw); }
  .demos-rail { grid-template-columns: 1fr; gap: 0.35rem; }
  .demo { padding: 0.45rem 0.7rem; }
  .demo-name { font-size: 0.76rem; }
  .pillars { right: 1rem; left: auto; translate: none; bottom: 0.6rem; gap: 0.9rem; }
  .dock { max-height: calc(100vh - 1.2rem); }
}

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

@media (max-width: 420px) {
  .pillar-cta span { font-size: 0; }
  .pillar-cta span::after { content: 'Start'; font-size: 0.5rem; }
  .demos { bottom: 10.6rem; }
}

/* ================= Track A repairs (blind-user findings) ================= */

/* A3: the ONLY sentence explaining the business must exist at every
   breakpoint. It was hidden on phones, leaving zero explanatory words. */
@media (max-width: 900px) {
  .tagline {
    display: block;
    position: fixed; left: 0; right: 0;
    top: 3.1rem; z-index: 11;
    margin: 0; padding: 0 1rem;
    text-align: center; font-size: 0.68rem; line-height: 1.45;
    color: var(--text-muted);
    max-width: none;
  }
}
@media (max-height: 520px) and (min-aspect-ratio: 5/4) {
  .tagline { display: none; }   /* no room in phone landscape; demos carry it */
}

/* A8 + A9: pillars read as links and carry the owner's own sub-page sentence */
.pillar-arrow {
  font-style: normal; margin-left: 0.35rem;
  color: var(--gold-dim); transition: transform 260ms var(--ease), color 260ms var(--ease);
  display: inline-block;
}
.pillar-name:hover .pillar-arrow { color: var(--gold-warm); transform: translateX(3px); }
.pillar-lede {
  font-size: 0.66rem; line-height: 1.4; color: var(--text-muted);
  text-align: center; max-width: 22ch; margin: 0.1rem 0 0.25rem;
}

/* A7: nothing may intercept a tap meant for a control beneath it */
.demos { pointer-events: none; }
.demos-rail, .demo, .demo-actions, .demo-replay, .demo-close { pointer-events: auto; }
.pillars { pointer-events: none; }
.pillar, .pillar-name, .pillar-cta { pointer-events: auto; }

/* B2: terminal demo state offers replay + close */
.demo-actions { display: flex; justify-content: center; gap: 1.4rem; margin-top: 0.85rem; }
.demo-actions[hidden] { display: none; }
.demo-replay, .demo-close {
  background: none; border: 0; cursor: pointer; min-height: 44px;
  color: var(--gold-dim); font: inherit;
  font-size: 0.58rem; letter-spacing: 0.28em; text-transform: uppercase;
}
.demo-replay { color: var(--gold-warm); }
.demo-replay:hover, .demo-close:hover { color: #fff4d8; }

/* A10: diagram labels must not sit under the dock */
.state-intake .dlabel { max-width: 24vw; }

/* A2: phone portrait — the page scrolls, and the last row is fully reachable */


/* ============ layout/overlapping-hit-target — structural fix ============
   demos and pillars were two independently bottom-anchored fixed blocks, so
   growing one (adding pillar ledes) pushed it up into the other and it stole
   the taps. One stack, normal flow inside it: they cannot collide. */
.hud-stack {
  position: fixed; z-index: 12;
  left: 50%; translate: -50% 0;
  bottom: clamp(1.2rem, 3.5vh, 2.2rem);
  width: min(1080px, calc(100vw - 2rem));
  display: flex; flex-direction: column; align-items: stretch;
  gap: clamp(0.7rem, 1.8vh, 1.4rem);
  pointer-events: none;
}
.hud-stack .demos,
.hud-stack .pillars {
  position: static; left: auto; right: auto; bottom: auto;
  translate: none; width: 100%;
}

@media (max-height: 520px) and (min-aspect-ratio: 5/4) {
  /* Phone landscape: the stack must FIT. Fixed top+bottom on a flex column
     silently overflows — the last pillar CTA ended up 150px below a viewport
     that could not scroll. Cap it and let it scroll inside itself. */
  .hud-stack {
    left: auto; right: 0.8rem; translate: none;
    top: 2.8rem; bottom: 0.7rem; width: min(360px, 48vw);
    justify-content: flex-start;
    max-height: calc(100vh - 3.5rem);
    overflow-y: auto; overscroll-behavior: contain;
    scrollbar-width: thin; scrollbar-color: var(--gold-dim) transparent;
    gap: 0.45rem;
  }
  .hud-stack .demos-rail { gap: 0.3rem; }
  .demo { padding: 0.4rem 0.6rem; }
  .demo-name { font-size: 0.72rem; }
  .demo-industry { font-size: 0.5rem; letter-spacing: 0.24em; }
  .demo-go { display: none; }
  .pillars { flex-direction: column; gap: 0.3rem; }
  .pillar { grid-template-columns: 1fr auto; align-items: center; gap: 0.5rem;
    padding: 0.1rem 0.4rem; border: 1px solid rgba(212,175,55,0.16);
    border-radius: 9px; background: rgba(10,8,6,0.42); }
  .pillar-name { font-size: 0.68rem; letter-spacing: 0.12em; text-align: left; }
  .pillar-lede { display: none; }
  .pillar-cta { font-size: 0.44rem; padding: 0.25rem 0.5rem; min-height: 36px;
    letter-spacing: 0.12em; }
  .pillar-cta span { font-size: 0; }
  .pillar-cta span::after { content: 'Start'; font-size: 0.46rem; }
}

/* ================= demo readout: real data, real answer ================= */

.readout {
  position: fixed; z-index: 14;
  right: var(--edge); top: 50%; translate: 0 -50%;
  width: min(430px, 38vw);
  max-height: 74vh; overflow-y: auto;
  scrollbar-width: thin; scrollbar-color: var(--gold-dim) transparent;
  padding: 1rem 1.1rem 1.1rem;
  border-radius: var(--radius); border: 1px solid var(--hair);
  background: linear-gradient(180deg, rgba(230,197,107,0.05), transparent 40%), rgba(8,6,5,0.8);
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  box-shadow: inset 0 1px 0 rgba(230,197,107,0.12), 0 24px 70px rgba(0,0,0,0.6);
  animation: dockpop 420ms var(--ease);
}
.readout[hidden] { display: none; }
.readout-proof[hidden], .readout-classic[hidden] { display: none; }
.readout-head { display: flex; align-items: baseline; gap: 0.6rem; flex-wrap: wrap; margin-bottom: 0.6rem; }
.readout-tag {
  font-size: 0.5rem; letter-spacing: 0.28em; text-transform: uppercase;
  color: var(--void); background: var(--gold-warm);
  padding: 0.16rem 0.42rem; border-radius: 3px; font-weight: 600;
}
.readout-note { font-size: 0.66rem; color: var(--text-muted); }

.readout-table { max-height: 30vh; overflow: auto; border-radius: 8px; }
.readout-table table { width: 100%; border-collapse: collapse; font-size: 0.66rem; }
.readout-table th {
  position: sticky; top: 0; text-align: left; font-weight: 500;
  font-size: 0.54rem; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--gold-warm); background: rgba(8,6,5,0.96);
  padding: 0.34rem 0.45rem; border-bottom: 1px solid var(--hair);
}
.readout-table td {
  padding: 0.28rem 0.45rem; color: var(--text-muted);
  border-bottom: 1px solid rgba(212,175,55,0.08);
  font-variant-numeric: tabular-nums; white-space: nowrap;
}
.readout[data-case="apprenticeship"] .readout-table table { table-layout: fixed; }
.readout[data-case="apprenticeship"] .readout-table th,
.readout[data-case="apprenticeship"] .readout-table td {
  white-space: normal; overflow-wrap: anywhere; vertical-align: top;
}
.readout[data-case="apprenticeship"] .readout-table th:nth-child(1) { width: 28%; }
.readout[data-case="apprenticeship"] .readout-table th:nth-child(2) { width: 34%; }
.readout[data-case="apprenticeship"] .readout-table th:nth-child(3) { width: 38%; }
.readout-table tr:hover td { color: var(--text); background: rgba(212,175,55,0.04); }

.readout-stats {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(88px, 1fr));
  gap: 0.35rem; margin-top: 0.7rem;
  opacity: 0; transform: translateY(6px);
  transition: opacity 600ms var(--ease), transform 600ms var(--ease);
}
.readout.stage-stats .readout-stats { opacity: 1; transform: none; }
.readout-stats > div {
  padding: 0.4rem 0.5rem; border: 1px solid rgba(212,175,55,0.16); border-radius: 8px;
  background: rgba(212,175,55,0.03);
}
.readout-stats dt { font-size: 0.5rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--gold-dim); }
.readout-stats dd {
  margin: 0.15rem 0 0; font-family: 'Velox Chronos Display', Georgia, serif;
  font-size: 0.98rem; color: var(--text); font-variant-numeric: tabular-nums;
}

.readout-verdict {
  margin-top: 0.75rem; padding: 0.6rem 0.7rem;
  border-left: 2px solid var(--gold-warm); border-radius: 0 8px 8px 0;
  background: rgba(212,175,55,0.07);
  font-size: 0.8rem; line-height: 1.45; color: var(--text);
  opacity: 0; transform: translateY(6px);
  transition: opacity 700ms var(--ease), transform 700ms var(--ease);
}
.readout.stage-verdict .readout-verdict { opacity: 1; transform: none; }
.readout-check {
  margin-top: 0.45rem; font-size: 0.6rem; color: var(--text-muted);
  font-variant-numeric: tabular-nums;
  opacity: 0; transition: opacity 700ms var(--ease) 200ms;
}
.readout.stage-verdict .readout-check { opacity: 0.85; }

/* The apprenticeship is a causal proof, not a result table. The first layer
   tells the story; every source row and run identity remains inspectable. */
.readout[data-case="apprenticeship"] {
  width: min(680px, 50vw); max-height: 82vh;
}
.readout[data-case="apprenticeship"] .readout-head {
  margin-bottom: 0.65rem;
}
.proof-premise {
  padding: 0.7rem 0.8rem; border: 1px solid rgba(230,197,107,0.3);
  border-radius: 10px; background: rgba(212,175,55,0.07);
}
.proof-premise strong {
  display: block; color: var(--text); font-family: 'Velox Chronos Display', Georgia, serif;
  font-size: 1.08rem; font-weight: 400;
}
.proof-premise p, .proof-copy {
  margin: 0.28rem 0 0; color: var(--text-muted); font-size: 0.67rem; line-height: 1.5;
}
.proof-at-a-glance {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.35rem;
  margin-top: 0.45rem;
}
.proof-glance-item {
  min-width: 0; padding: 0.42rem 0.48rem; border: 1px solid rgba(113,174,132,0.24);
  border-radius: 7px; background: rgba(113,174,132,0.035);
}
.proof-glance-item span { display: block; color: var(--gold-dim); font-size: 0.46rem; line-height: 1.3; }
.proof-glance-item strong { display: block; margin-top: 0.2rem; color: #d8e5db; font-size: 0.58rem; line-height: 1.35; }
.proof-section { padding-top: 0.85rem; margin-top: 0.8rem; border-top: 1px solid var(--hair); }
.proof-section-head { display: flex; align-items: baseline; gap: 0.55rem; margin-bottom: 0.45rem; }
.proof-number { color: var(--gold-warm); font-size: 0.48rem; letter-spacing: 0.18em; }
.proof-section h3 {
  margin: 0; color: var(--text); font-family: 'Velox Chronos Display', Georgia, serif;
  font-size: 0.98rem; font-weight: 400;
}
.proof-source-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.45rem; margin-top: 0.55rem; }
.proof-source-card {
  min-width: 0; padding: 0.55rem; border: 1px solid rgba(212,175,55,0.16);
  border-radius: 8px; background: rgba(255,255,255,0.018);
}
.proof-source-title { display: flex; justify-content: space-between; gap: 0.35rem; align-items: baseline; }
.proof-source-title strong { color: var(--text); font-size: 0.68rem; font-weight: 500; }
.proof-source-title span { color: var(--gold-dim); font-size: 0.54rem; white-space: nowrap; }
.proof-filename {
  display: block; margin-top: 0.28rem; color: var(--text-muted); font-size: 0.5rem;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.proof-source-link {
  display: inline-flex; align-items: center; min-height: 32px; margin-top: 0.25rem;
  color: var(--gold-warm); font-size: 0.57rem; text-underline-offset: 0.18em;
}
.proof-rows summary, .proof-audit summary {
  display: flex; align-items: center; min-height: 36px; cursor: pointer;
  color: var(--text-muted); font-size: 0.56rem;
}
.proof-mini-table { max-width: 100%; overflow-x: auto; border-radius: 6px; }
.proof-mini-table table { width: 100%; border-collapse: collapse; font-size: 0.57rem; }
.proof-mini-table th {
  text-align: left; padding: 0.28rem 0.34rem; color: var(--gold-warm);
  font-size: 0.48rem; font-weight: 500; letter-spacing: 0.08em;
  background: rgba(212,175,55,0.05); white-space: nowrap;
}
.proof-mini-table td {
  padding: 0.28rem 0.34rem; color: var(--text-muted); border-top: 1px solid rgba(212,175,55,0.08);
  font-variant-numeric: tabular-nums; white-space: nowrap;
}
.proof-lesson-table { margin-top: 0.5rem; }
.proof-withheld {
  display: grid; grid-template-columns: auto 1fr; gap: 0.5rem; align-items: start;
  margin-top: 0.5rem; padding: 0.48rem 0.55rem; border-left: 2px solid #ba6d55;
  background: rgba(186,109,85,0.07); border-radius: 0 7px 7px 0;
}
.proof-withheld strong { color: #e2b6a9; font-size: 0.58rem; font-weight: 500; }
.proof-withheld ul { display: flex; flex-wrap: wrap; gap: 0.26rem 0.65rem; margin: 0; padding: 0; list-style: none; }
.proof-withheld li { color: var(--text-muted); font-size: 0.55rem; }
.proof-withheld li::before { content: '×'; margin-right: 0.22rem; color: #c78068; }
.proof-validation {
  display: grid; grid-template-columns: 115px 1fr; gap: 0.55rem; margin-top: 0.45rem;
  padding: 0.48rem 0.55rem; border: 1px solid rgba(113,174,132,0.22);
  border-radius: 7px; background: rgba(113,174,132,0.035);
}
.proof-validation strong { color: #c9decf; font-size: 0.59rem; font-weight: 500; }
.proof-validation p { margin: 0; color: var(--text-muted); font-size: 0.55rem; line-height: 1.45; }
.proof-timeline { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.35rem; }
.proof-observation {
  min-width: 0; padding: 0.48rem; border: 1px solid rgba(212,175,55,0.14);
  border-radius: 8px; background: rgba(255,255,255,0.018);
}
.proof-observation.is-held { border-color: rgba(186,109,85,0.38); }
.proof-observation.is-grew { border-color: rgba(230,197,107,0.38); }
.proof-observation.is-verified { border-color: rgba(113,174,132,0.38); }
.proof-step { display: block; color: var(--gold-dim); font-size: 0.48rem; line-height: 1.35; }
.proof-observation strong { display: block; margin-top: 0.25rem; color: var(--text); font-size: 0.67rem; line-height: 1.35; }
.proof-observation small { display: block; margin-top: 0.25rem; color: var(--text-muted); font-size: 0.5rem; line-height: 1.35; }
.proof-verification {
  margin-top: 0.5rem; padding: 0.5rem 0.6rem; border-left: 2px solid var(--gold-warm);
  border-radius: 0 7px 7px 0; background: rgba(212,175,55,0.055);
}
.proof-verification strong { color: var(--text); font-size: 0.62rem; font-weight: 500; }
.proof-verification ol {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.35rem;
  margin: 0.35rem 0 0; padding: 0; list-style-position: inside; counter-reset: proof-check;
}
.proof-verification li { color: var(--text-muted); font-size: 0.52rem; line-height: 1.4; }
.proof-stored {
  margin-top: 0.5rem; padding: 0.58rem 0.62rem; border: 1px solid rgba(230,197,107,0.28);
  border-radius: 8px; background: rgba(212,175,55,0.055);
}
.proof-stored > span { display: block; color: var(--gold-dim); font-size: 0.48rem; letter-spacing: 0.08em; text-transform: uppercase; }
.proof-stored > strong { display: block; margin-top: 0.25rem; color: var(--text); font-size: 0.72rem; font-weight: 500; }
.proof-stored > p { margin: 0.25rem 0 0; color: var(--text-muted); font-size: 0.55rem; line-height: 1.45; }
.proof-stored > code { display: block; margin-top: 0.28rem; color: var(--gold-dim); font-size: 0.46rem; overflow-wrap: anywhere; }
.proof-runner {
  margin-top: 0.55rem; padding: 0.55rem; border: 1px solid rgba(212,175,55,0.2);
  border-radius: 9px; background: rgba(0,0,0,0.2);
}
.proof-runner-head { display: flex; justify-content: space-between; align-items: center; gap: 0.5rem; }
.proof-runner-status { color: #c9decf; font-size: 0.56rem; line-height: 1.35; }
.proof-runner-replay {
  min-height: 32px; padding: 0.28rem 0.55rem; border: 1px solid rgba(212,175,55,0.32);
  border-radius: 6px; background: rgba(212,175,55,0.06); color: var(--gold-warm);
  font: inherit; font-size: 0.5rem; cursor: pointer;
}
.proof-runner-replay:hover, .proof-runner-replay:focus-visible { background: rgba(212,175,55,0.13); }
.proof-run-list { display: grid; gap: 0.3rem; margin: 0.5rem 0 0; padding: 0; list-style: none; }
.proof-run-step {
  display: grid; grid-template-columns: 26px minmax(0, 1fr) auto; gap: 0.45rem; align-items: center;
  min-width: 0; padding: 0.42rem 0.46rem; border: 1px solid rgba(212,175,55,0.1);
  border-radius: 7px; opacity: 0.38; transform: translateY(3px);
  transition: opacity 220ms var(--ease), transform 220ms var(--ease), border-color 220ms var(--ease), background 220ms var(--ease);
}
.proof-run-step.is-observed {
  opacity: 1; transform: none; border-color: rgba(113,174,132,0.3);
  background: rgba(113,174,132,0.035);
}
.proof-run-marker { color: var(--gold-warm); font-size: 0.48rem; letter-spacing: 0.08em; }
.proof-run-copy { min-width: 0; }
.proof-run-copy strong { display: block; color: var(--text); font-size: 0.58rem; font-weight: 500; line-height: 1.35; }
.proof-run-copy p { margin: 0.18rem 0 0; color: var(--text-muted); font-size: 0.52rem; line-height: 1.4; }
.proof-run-witness { display: grid; justify-items: end; gap: 0.16rem; min-width: 88px; }
.proof-run-witness span { color: #c9decf; font-size: 0.47rem; letter-spacing: 0.08em; }
.proof-run-witness code { color: var(--gold-dim); font-size: 0.42rem; white-space: nowrap; }
.proof-control-details { margin-top: 0.45rem; }
.proof-control-details > summary {
  display: flex; align-items: center; min-height: 36px; color: var(--text-muted);
  font-size: 0.56rem; cursor: pointer;
}
.proof-control-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.4rem; margin-top: 0.5rem; }
.proof-control {
  min-width: 0; padding: 0.55rem; border: 1px solid rgba(113,174,132,0.24);
  border-radius: 8px; background: rgba(113,174,132,0.035);
}
.proof-control strong { display: block; color: var(--text); font-size: 0.64rem; line-height: 1.35; }
.proof-control p { margin: 0.3rem 0; color: #c9decf; font-size: 0.57rem; line-height: 1.45; }
.proof-control small { color: var(--text-muted); font-size: 0.51rem; line-height: 1.4; }
.proof-facts { display: grid; gap: 0.35rem; }
.proof-fact { display: grid; grid-template-columns: 130px 1fr; gap: 0.55rem; padding: 0.48rem 0.55rem; border-radius: 7px; background: rgba(212,175,55,0.04); }
.proof-fact strong { color: var(--gold-warm); font-size: 0.6rem; font-weight: 500; }
.proof-fact p { margin: 0; color: var(--text-muted); font-size: 0.58rem; line-height: 1.45; }
.proof-audit { margin-top: 0.4rem; }
.proof-audit dl { margin: 0; }
.proof-audit dl > div { display: grid; grid-template-columns: 145px 1fr; gap: 0.4rem; padding: 0.28rem 0; border-top: 1px solid rgba(212,175,55,0.08); }
.proof-audit dt { color: var(--gold-dim); font-size: 0.48rem; text-transform: capitalize; }
.proof-audit dd { margin: 0; color: var(--text-muted); font-family: monospace; font-size: 0.46rem; overflow-wrap: anywhere; }
.proof-scope {
  margin: 0.45rem 0 0; padding: 0.48rem 0.55rem; border-radius: 7px;
  background: rgba(255,255,255,0.025); color: var(--text-muted);
  font-size: 0.56rem; line-height: 1.45;
}
.proof-intake {
  display: flex; align-items: center; justify-content: center; min-height: 44px;
  width: 100%; margin-top: 0.55rem; border: 1px solid var(--gold-warm); border-radius: 8px;
  background: rgba(212,175,55,0.08); color: var(--text); font: inherit;
  font-size: 0.59rem; letter-spacing: 0.12em; text-transform: uppercase; cursor: pointer;
}
.proof-intake:hover, .proof-intake:focus-visible { background: rgba(212,175,55,0.15); }

/* the machine yields the right half while a readout is open */
.state-demo #stage { transform: translateX(-14%); transition: transform 700ms var(--ease); }
#stage { transition: transform 700ms var(--ease); }

@media (max-width: 1100px) {
  .readout { width: min(400px, 46vw); }
  .readout[data-case="apprenticeship"] { width: min(590px, 52vw); }
}
@media (max-width: 900px) {
  .state-demo #stage { transform: none; }
  .readout {
    position: fixed; right: 0.6rem; left: 0.6rem; width: auto;
    top: auto; bottom: 0.6rem; translate: none;
    max-height: 62vh;
  }
  .readout-table { max-height: 22vh; }
  .readout[data-case="apprenticeship"] { width: auto; max-height: 72vh; }
  .proof-at-a-glance { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .proof-control-grid { grid-template-columns: 1fr; }
  .proof-verification ol { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .proof-timeline { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .proof-withheld, .proof-validation, .proof-fact { grid-template-columns: 1fr; gap: 0.25rem; }
  .proof-run-step { grid-template-columns: 24px minmax(0, 1fr); }
  .proof-run-witness { grid-column: 2; justify-items: start; }
  .state-demo .hud-stack { opacity: 0; pointer-events: none; }
}
@media (max-height: 520px) and (min-aspect-ratio: 5/4) {
  .readout { left: 0.8rem; right: auto; width: min(430px, 52vw); top: 2.8rem; bottom: 0.7rem;
    translate: none; max-height: none; }
  .readout-table { max-height: 30vh; }
  .readout[data-case="apprenticeship"] { width: min(520px, 58vw); max-height: none; }
  .proof-at-a-glance, .proof-source-grid, .proof-control-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .proof-verification ol { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .proof-timeline { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* the readout owns the right side, so the stack yields to the left */
@media (min-width: 901px) {
  .state-demo .hud-stack {
    left: var(--edge); translate: none;
    width: min(560px, calc(100vw - 40vw - var(--edge) * 2));
  }
  .state-demo .demos-rail { grid-template-columns: 1fr; gap: 0.4rem; }
  .state-demo .demo { padding: 0.5rem 0.8rem; }
}

/* Close/Replay must never live inside a container that state-demo fades —
   a phone user could open a demo and have no way out. */
.demo-actions {
  position: fixed; z-index: 16;
  left: 50%; translate: -50% 0; bottom: clamp(0.8rem, 2.5vh, 1.6rem);
  display: flex; justify-content: center; gap: 1.6rem; margin: 0;
}
.demo-actions[hidden] { display: none; }
@media (max-width: 900px) {
  .demo-actions { bottom: auto; top: calc(3.1rem + 1.6rem); }
  .state-demo .tagline { display: none; }
}
@media (max-height: 520px) and (min-aspect-ratio: 5/4) {
  .demo-actions { left: auto; right: 1rem; translate: none; bottom: 0.6rem; gap: 1rem; }
}

/* ================= ONE LAYOUT MODEL: a fixed app shell =================
   The shell never scrolls. Regions that overflow scroll inside themselves.
   Previously this was a fixed app on desktop and a flow document on phones,
   and crossing 860px moved the primary block 426 -> 305 -> 575px. One model
   removes the discontinuity without giving up the app feel. */

html.has-3d, html.has-3d body {
  overflow: hidden;
  height: 100%;
  overscroll-behavior: none;
}

.hud-stack {
  position: fixed;
  left: 50%; translate: -50% 0;
  bottom: clamp(0.8rem, 2.5vh, 2.2rem);
  width: min(1080px, calc(100vw - 1.4rem));
  max-height: 58vh;
  overflow-y: auto; overscroll-behavior: contain;
  scrollbar-width: thin; scrollbar-color: var(--gold-dim) transparent;
}

/* phones: same model, tighter metrics — sizes change, structure does not */
@media (max-width: 900px) {
  .hud-stack { max-height: 62vh; gap: 0.5rem; }
  .demos-rail { grid-template-columns: 1fr; gap: 0.4rem; }
  .demo { padding: 0.6rem 0.8rem; grid-template-columns: 1fr auto; align-items: center; }
  .demo-name { grid-column: 1; font-size: 0.85rem; }
  .demo-industry { grid-column: 1; }
  .demo-go { grid-column: 2; grid-row: 1 / span 2; margin: 0; }
  .pillars { flex-direction: column; gap: 0.35rem; }
  .pillar { grid-template-columns: 1fr auto; align-items: center; gap: 0.5rem;
    padding: 0.12rem 0.5rem; border: 1px solid rgba(212,175,55,0.16);
    border-radius: 9px; background: rgba(10,8,6,0.42); }
  .pillar-name { font-size: 0.76rem; letter-spacing: 0.12em; text-align: left; }
  .pillar-lede { display: none; }
  .pillar-cta { font-size: 0.46rem; padding: 0.26rem 0.55rem; min-height: 40px; }
  main { padding-top: 0; }
}

.readout-source {
  margin-top: 0.35rem; font-size: 0.55rem; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--gold-dim);
  opacity: 0; transition: opacity 700ms var(--ease) 300ms;
}
.readout.stage-verdict .readout-source { opacity: 0.8; }

/* ================= consumer case files =================
   Every demonstration now begins with the delegated job and original records,
   then shows the work product and consequence. Technical receipts stay one
   deliberate layer deeper. */

.readout,
.readout[data-case="apprenticeship"] {
  width: min(760px, 58vw);
  max-height: 84vh;
  padding: 1.05rem 1.15rem 1.2rem;
  background:
    linear-gradient(180deg, rgba(230,197,107,0.055), transparent 32%),
    rgba(8,6,5,0.94);
}
.readout-verdict[hidden], .readout-check[hidden] { display: none; }
.case-hero { padding: 0.25rem 0 0.8rem; }
.case-eyebrow, .case-step {
  display: block; color: var(--gold-warm); font-size: 0.52rem;
  letter-spacing: 0.2em; text-transform: uppercase;
}
.case-title {
  margin: 0.28rem 0 0; color: var(--text);
  font-family: 'Velox Chronos Display', Georgia, serif;
  font-size: clamp(1.35rem, 2vw, 1.9rem); font-weight: 400; line-height: 1.08;
}
.case-job {
  margin: 0.42rem 0 0; max-width: 62ch; color: #e7dcc1;
  font-size: 0.78rem; line-height: 1.55;
}
.case-live-run {
  margin: 0 0 0.8rem; padding: 0.72rem 0.78rem;
  border: 1px solid rgba(113,174,132,0.3); border-radius: 9px;
  background: rgba(113,174,132,0.045);
}
.case-live-kicker {
  display: block; color: #9cc4a8; font-size: 0.5rem;
  letter-spacing: 0.18em; text-transform: uppercase;
}
.case-live-run h3 {
  margin: 0.2rem 0 0; color: var(--text);
  font-family: 'Velox Chronos Display', Georgia, serif;
  font-size: 1rem; font-weight: 400;
}
.case-live-run > p {
  margin: 0.3rem 0 0; color: #d5dfd7; font-size: 0.63rem; line-height: 1.5;
}
.case-live-facts {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.35rem; margin: 0.5rem 0 0;
}
.case-live-facts > div {
  min-width: 0; padding: 0.38rem 0.42rem;
  border: 1px solid rgba(113,174,132,0.18); border-radius: 6px;
}
.case-live-facts dt {
  color: #86ad92; font-size: 0.44rem; letter-spacing: 0.08em;
  text-transform: uppercase; line-height: 1.3;
}
.case-live-facts dd {
  margin: 0.14rem 0 0; color: var(--text); font-size: 0.61rem; line-height: 1.35;
}
.case-section {
  padding: 0.9rem 0; border-top: 1px solid rgba(212,175,55,0.18);
}
.case-section > h3, .case-consequence h3 {
  margin: 0.28rem 0 0; color: var(--text);
  font-family: 'Velox Chronos Display', Georgia, serif;
  font-size: 1.08rem; font-weight: 400;
}
.case-copy {
  margin: 0.35rem 0 0; color: var(--text-muted); font-size: 0.67rem; line-height: 1.52;
}
.case-source-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 0.55rem; margin-top: 0.62rem;
}
.case-source-card {
  min-width: 0; padding: 0.64rem; border: 1px solid rgba(212,175,55,0.2);
  border-radius: 9px; background: rgba(255,255,255,0.022);
}
.case-source-heading { display: grid; gap: 0.34rem; }
.case-source-heading strong {
  display: block; color: var(--text); font-size: 0.68rem; font-weight: 500; line-height: 1.4;
}
.case-source-heading span {
  display: block; margin-top: 0.12rem; color: var(--gold-dim); font-size: 0.54rem;
}
.case-source-heading code {
  color: var(--text-muted); font-size: 0.49rem; overflow-wrap: anywhere;
}
.case-source-table, .case-work-table {
  max-width: 100%; margin-top: 0.5rem; overflow-x: auto;
  border: 1px solid rgba(212,175,55,0.1); border-radius: 7px;
}
.case-source-table table, .case-work-table table {
  width: 100%; border-collapse: collapse; font-size: 0.58rem;
}
.case-source-table table { table-layout: fixed; }
.case-source-table th, .case-work-table th {
  padding: 0.36rem 0.4rem; text-align: left; color: var(--gold-warm);
  background: rgba(212,175,55,0.07); font-size: 0.48rem; font-weight: 500;
  letter-spacing: 0.08em; white-space: nowrap;
}
.case-source-table td, .case-work-table td {
  padding: 0.34rem 0.4rem; color: #d5cbb7;
  border-top: 1px solid rgba(212,175,55,0.08);
  font-variant-numeric: tabular-nums; white-space: nowrap;
}
.case-source-table th, .case-source-table td {
  white-space: normal; overflow-wrap: anywhere; vertical-align: top;
}
.case-source-table th:nth-child(2) { width: 40%; }
.case-row-note {
  margin: 0.35rem 0 0; color: var(--text-muted); font-size: 0.5rem;
}
.case-source-links { display: flex; flex-wrap: wrap; gap: 0.35rem 0.9rem; margin-top: 0.35rem; }
.case-source-links a {
  display: inline-flex; align-items: center; min-height: 38px;
  color: var(--gold-warm); font-size: 0.57rem; text-underline-offset: 0.2em;
}
.case-official { color: var(--text-muted) !important; }
.case-download-status {
  margin: 0.2rem 0 0; color: #a9cfb5; font-size: 0.52rem; line-height: 1.45;
}
.case-download-status[hidden] { display: none; }
.case-headline {
  margin: 0.5rem 0 0; padding: 0.64rem 0.72rem;
  border-left: 2px solid var(--gold-warm); border-radius: 0 8px 8px 0;
  background: rgba(212,175,55,0.07); color: var(--text);
  font-size: 0.82rem; line-height: 1.5;
}
.case-metrics {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.36rem; margin: 0.55rem 0 0;
}
.case-metrics > div, .case-check {
  min-width: 0; padding: 0.48rem 0.52rem; border: 1px solid rgba(212,175,55,0.15);
  border-radius: 7px; background: rgba(212,175,55,0.026);
}
.case-metrics dt, .case-check span {
  color: var(--gold-dim); font-size: 0.48rem; letter-spacing: 0.08em;
  text-transform: uppercase; line-height: 1.35;
}
.case-metrics dd, .case-check strong {
  display: block; margin: 0.17rem 0 0; color: var(--text);
  font-family: 'Velox Chronos Display', Georgia, serif;
  font-size: 0.88rem; font-weight: 400; overflow-wrap: anywhere;
}
.case-work-note {
  margin: 0.5rem 0 0; color: #d7ccb6; font-size: 0.64rem; line-height: 1.5;
}
.case-boundary {
  margin: 0.35rem 0 0; padding: 0.45rem 0.52rem;
  border-radius: 7px; background: rgba(255,255,255,0.025);
  color: var(--text-muted); font-size: 0.54rem; line-height: 1.48;
}
.case-specialization {
  margin: 0.15rem 0 0; padding: 0.9rem 0.82rem;
  border: 1px solid rgba(113,174,132,0.3); border-radius: 9px;
  background:
    linear-gradient(135deg, rgba(113,174,132,0.07), transparent 58%),
    rgba(113,174,132,0.025);
}
.case-specialization .case-step { color: #9cc4a8; }
.case-specialization .case-headline {
  border-left-color: #84b895; background: rgba(113,174,132,0.075);
}
.case-specialization .case-metrics > div {
  border-color: rgba(113,174,132,0.2); background: rgba(113,174,132,0.035);
}
.case-rival-test {
  margin-top: 0.62rem; padding: 0.62rem 0.68rem;
  border: 1px solid rgba(230,197,107,0.3); border-radius: 8px;
  background: rgba(212,175,55,0.055);
}
.case-rival-test > span {
  color: var(--gold-dim); font-size: 0.46rem; letter-spacing: 0.1em;
  text-transform: uppercase;
}
.case-rival-test h4 {
  margin: 0.25rem 0 0; color: var(--text); font-size: 0.7rem; font-weight: 500;
}
.case-rival-test p {
  margin: 0.28rem 0 0; color: #d7ccb6; font-size: 0.59rem; line-height: 1.48;
}
.case-rival-test small {
  display: block; margin-top: 0.28rem; color: #b8cabd; font-size: 0.53rem; line-height: 1.48;
}
.case-table-title {
  margin: 0.72rem 0 0; color: #c9decf; font-size: 0.61rem;
  font-weight: 500; letter-spacing: 0.02em;
}
.case-protocol-note {
  margin: 0.55rem 0 0; padding-left: 0.58rem;
  border-left: 2px solid rgba(156,196,168,0.55);
  color: #b8cabd; font-size: 0.55rem; line-height: 1.5;
}
.case-consequence {
  margin-top: 0.05rem; padding: 0.78rem 0.82rem;
  border: 1px solid rgba(113,174,132,0.3); border-radius: 9px;
  background: rgba(113,174,132,0.055);
}
.case-consequence .case-step { color: #9cc4a8; }
.case-consequence p {
  margin: 0.38rem 0 0; color: #d8e5db; font-size: 0.7rem; line-height: 1.55;
}
.case-verification {
  margin-top: 0.7rem; border-top: 1px solid rgba(212,175,55,0.18);
}
.case-verification > summary, .case-identities > summary {
  display: flex; align-items: center; min-height: 46px; cursor: pointer;
  color: var(--gold-warm); font-size: 0.63rem; letter-spacing: 0.04em;
}
.case-check-grid {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.36rem;
}
.case-verification-copy {
  margin: 0.55rem 0 0; color: var(--text-muted); font-size: 0.6rem; line-height: 1.5;
}
.case-challenges { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.4rem; margin-top: 0.5rem; }
.case-challenges article {
  padding: 0.56rem; border: 1px solid rgba(113,174,132,0.22);
  border-radius: 8px; background: rgba(113,174,132,0.035);
}
.case-challenges strong { display: block; color: var(--text); font-size: 0.62rem; line-height: 1.4; }
.case-challenges p { margin: 0.28rem 0; color: #c9decf; font-size: 0.56rem; line-height: 1.45; }
.case-challenges small { color: var(--text-muted); font-size: 0.5rem; line-height: 1.42; }
.case-identities { margin-top: 0.4rem; }
.case-identities dl { margin: 0; }
.case-identities dl > div {
  display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 0.5rem;
  padding: 0.3rem 0; border-top: 1px solid rgba(212,175,55,0.08);
}
.case-identities dt { color: var(--gold-dim); font-size: 0.48rem; }
.case-identities dd {
  margin: 0; color: var(--text-muted); font-family: monospace;
  font-size: 0.46rem; overflow-wrap: anywhere;
}
.case-intake {
  display: flex; align-items: center; justify-content: center; width: 100%;
  min-height: 46px; margin-top: 0.65rem; border: 1px solid var(--gold-warm);
  border-radius: 8px; background: rgba(212,175,55,0.08); color: var(--text);
  font: inherit; font-size: 0.61rem; letter-spacing: 0.12em;
  text-transform: uppercase; cursor: pointer;
}
.case-intake:hover, .case-intake:focus-visible { background: rgba(212,175,55,0.16); }

/* The machine becomes a quiet live-system backdrop while its work owns focus. */
.state-demo #stage { transform: translateX(-22%) scale(0.78); opacity: 0.38; }
.state-demo #labels { opacity: 0.18; transition: opacity 500ms var(--ease); }

@media (max-width: 1100px) {
  .readout, .readout[data-case="apprenticeship"] { width: min(650px, 62vw); }
  .case-source-grid { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .readout, .readout[data-case="apprenticeship"] {
    right: 0.5rem; left: 0.5rem; width: auto; max-height: 74vh;
    padding: 0.9rem 0.85rem 1rem;
  }
  .state-demo #stage { transform: scale(0.84); opacity: 0.18; }
  .case-metrics, .case-check-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .case-live-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .case-challenges { grid-template-columns: 1fr; }
}
@media (max-width: 420px) {
  .case-source-grid { grid-template-columns: minmax(0, 1fr); }
  .case-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .case-check-grid { grid-template-columns: 1fr; }
  .case-live-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .case-identities dl > div { grid-template-columns: 1fr; gap: 0.12rem; }
  .case-title { font-size: 1.28rem; }
  .case-specialization .case-work-table table { table-layout: fixed; }
  .case-specialization .case-work-table th,
  .case-specialization .case-work-table td {
    padding: 0.3rem 0.22rem; white-space: normal; overflow-wrap: anywhere;
    vertical-align: top; font-size: 0.43rem; line-height: 1.38;
  }
  .case-reviewed-table th:first-child { width: 40%; }
  .case-unseen-table th:nth-child(1) { width: 16%; }
  .case-unseen-table th:nth-child(2) { width: 30%; }
}
@media (max-height: 520px) and (min-aspect-ratio: 5/4) {
  .readout, .readout[data-case="apprenticeship"] {
    left: 0.55rem; right: auto; top: 2.8rem; bottom: 0.55rem;
    width: min(640px, 68vw); max-height: none;
  }
  .case-source-grid { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
}

/* ================= live compute chamber =================
   Axial, sparse, and outcome-coupled. The only moving signal on this surface
   means that the HTTP request is still open; completion is never simulated. */

html.demo-loading body::after {
  content: '';
  position: fixed; inset: 0; z-index: 3; pointer-events: none;
  background:
    linear-gradient(180deg, rgba(0,0,0,0.74), transparent 17%, transparent 83%, rgba(0,0,0,0.78)),
    linear-gradient(90deg, rgba(0,0,0,0.34), transparent 24%, transparent 76%, rgba(0,0,0,0.34));
}
.demo-loading .hud-stack { opacity: 0.1; pointer-events: none; }
.state-demo .pillars { display: none; }
.demo-loading #stage {
  transform: scale(0.9); opacity: 0.56;
  transition: transform 700ms var(--ease), opacity 500ms var(--ease);
}
.demo-loading #labels { opacity: 0.34; }
.demo-loading .readout,
.demo-loading .readout[data-case="apprenticeship"] {
  left: auto; right: 50%; top: 50%; bottom: auto;
  translate: 50% -50%;
  width: min(920px, calc(100vw - (var(--edge) * 2)));
  max-height: min(78vh, 690px);
  padding: clamp(1rem, 2.5vw, 2rem) clamp(1rem, 4vw, 3.6rem) clamp(1.2rem, 3vw, 2.5rem);
  border-radius: 2px;
  border-color: rgba(230,197,107,0.42);
  background:
    linear-gradient(180deg, rgba(230,197,107,0.055), transparent 22%),
    rgba(5,5,5,0.88);
  box-shadow:
    inset 0 1px 0 rgba(255,240,200,0.12),
    inset 0 -1px 0 rgba(182,74,54,0.22),
    0 38px 120px rgba(0,0,0,0.78);
}
.demo-loading .readout-head {
  justify-content: center; margin-bottom: clamp(1.1rem, 3vh, 2.1rem);
}
.demo-loading .readout-tag {
  color: var(--gold-warm); background: transparent; border: 1px solid var(--hair);
  border-radius: 0; padding: 0.22rem 0.58rem;
}
.demo-loading .readout-note {
  width: 100%; text-align: center; color: #bdb39e;
  font-size: 0.55rem; letter-spacing: 0.19em; text-transform: uppercase;
}
.readout-loading { display: grid; justify-items: center; text-align: center; }
.readout-loading[hidden] { display: none; }
.live-axis {
  position: relative; width: min(560px, 88%); height: 26px;
  display: grid; grid-template-columns: 8px 1fr 8px; align-items: center; gap: 10px;
}
.live-axis::before {
  content: ''; position: absolute; left: 18px; right: 18px; top: 50%; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(230,197,107,0.58) 18%, rgba(230,197,107,0.58) 82%, transparent);
}
.live-axis i {
  width: 8px; height: 8px; z-index: 1;
  border: 1px solid var(--gold-dim); transform: rotate(45deg);
}
.live-axis span {
  position: absolute; top: 9px; left: 18px; width: 8px; height: 8px;
  border-radius: 50%; background: var(--signal);
  box-shadow: 0 0 18px rgba(182,74,54,0.86);
  animation: live-request-open 2.4s cubic-bezier(.45,0,.55,1) infinite alternate;
}
@keyframes live-request-open {
  from { translate: 0 0; }
  to { translate: calc(min(560px, 88vw) - 54px) 0; }
}
.live-kicker {
  margin-top: 0.85rem; color: var(--gold-dim); font-size: 0.54rem;
  letter-spacing: 0.38em; text-transform: uppercase;
}
.live-title {
  max-width: 24ch; margin-top: 0.52rem;
  font-family: 'Velox Chronos Display', Georgia, serif;
  color: #f0e7d2; font-size: clamp(1.45rem, 3.6vw, 2.65rem);
  font-weight: 400; line-height: 1.08; letter-spacing: 0.015em;
}
.live-purpose {
  max-width: 70ch; margin-top: 0.7rem; color: #b9b09f;
  font-size: clamp(0.62rem, 1.2vw, 0.76rem); line-height: 1.62;
}
.live-clock {
  display: grid; justify-items: center; margin-top: clamp(1rem, 2.8vh, 1.7rem);
  font-variant-numeric: tabular-nums;
}
.live-clock time {
  color: #f3ead5; font-family: 'Velox Chronos Display', Georgia, serif;
  font-size: clamp(2.3rem, 6vw, 4.4rem); line-height: 0.92;
}
.live-clock span {
  margin-top: 0.38rem; color: var(--signal); font-size: 0.48rem;
  letter-spacing: 0.28em; text-transform: uppercase;
}
.live-contract {
  width: 100%; margin-top: clamp(1rem, 3vh, 1.8rem); padding: 0;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  list-style: none; border-top: 1px solid rgba(230,197,107,0.22);
  border-bottom: 1px solid rgba(230,197,107,0.22);
}
.live-contract li {
  min-width: 0; padding: 0.72rem 0.62rem; color: #c9c0ac;
  font-size: 0.55rem; line-height: 1.45; text-align: left;
  border-left: 1px solid rgba(230,197,107,0.14);
}
.live-contract li:first-child { border-left: 0; }
.live-contract span {
  display: block; margin-bottom: 0.2rem; color: var(--gold-dim);
  font-size: 0.45rem; letter-spacing: 0.2em;
}
.live-signal {
  max-width: 78ch; margin-top: 0.75rem; color: #80796d;
  font-size: 0.5rem; line-height: 1.55;
}

/* One shared geometry equation owns both the case cards and result document.
   The prior independent widths intersected by 9.6px at 1440px. */
@media (min-width: 901px) {
  .state-demo:not(.demo-loading) .readout,
  .state-demo:not(.demo-loading) .readout[data-case="apprenticeship"] {
    left: auto; right: var(--edge); top: 50%; bottom: auto;
    translate: 0 -50%; width: var(--demo-panel-width);
    border-radius: 4px;
  }
  .state-demo:not(.demo-loading) .hud-stack {
    left: var(--edge); right: auto; translate: none;
    width: min(560px, calc(100vw - var(--demo-panel-width) - (var(--edge) * 2) - var(--demo-gap)));
  }
  .state-demo:not(.demo-loading) #stage {
    transform: translateX(-27%) scale(0.84); opacity: 0.52;
  }
  .state-demo:not(.demo-loading) #labels { opacity: 0.28; }
}

@media (max-width: 900px) {
  .demo-loading .readout,
  .demo-loading .readout[data-case="apprenticeship"] {
    left: 0.65rem; right: 0.65rem; top: 50%; bottom: auto;
    width: auto; translate: 0 -50%; max-height: calc(100vh - 6.2rem);
    padding: 0.9rem 0.8rem 1rem;
  }
  .demo-loading .readout-head { margin-bottom: 0.7rem; }
  .live-kicker { margin-top: 0.42rem; letter-spacing: 0.24em; }
  .live-purpose { line-height: 1.48; }
  .live-clock { margin-top: 0.82rem; }
  .live-contract { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 0.8rem; }
  .live-contract li:nth-child(3) { border-left: 0; border-top: 1px solid rgba(230,197,107,0.14); }
  .live-contract li:nth-child(4) { border-top: 1px solid rgba(230,197,107,0.14); }
  .live-signal { margin-top: 0.55rem; }
}

@media (max-height: 600px) {
  .live-purpose, .live-signal { display: none; }
  .live-clock { margin-top: 0.6rem; }
  .live-contract { margin-top: 0.65rem; }
  .live-contract li { padding: 0.45rem; }
}

/* The document page stays readable when a phone is rotated. The home app has
   its own fixed short-landscape geometry above; these rules touch only the
   Minerva document. */
@media (max-height: 520px) and (min-aspect-ratio: 5/4) {
  .minerva-page { padding-top: 3.8rem; }
  .minerva-hero {
    min-height: 0;
    align-items: start;
    gap: clamp(1.2rem, 4vw, 2.5rem);
    padding-top: 0;
  }
  .minerva-hero .back-link { margin-bottom: 0.15rem; }
  .minerva-hero h1 {
    max-width: 10ch;
    margin: 0.35rem 0 0.55rem;
    font-size: clamp(2.55rem, 5.4vw, 3rem);
    line-height: 0.96;
  }
  .minerva-lede { font-size: 0.78rem; line-height: 1.48; }
  .minerva-actions { margin-top: 0.7rem; }
  .minerva-portrait { min-height: 290px; }
}
