/* =====================================================================
   TOMORROWLAND — acts.css
   Application shell (HUD rail + stage), act layout primitives, and the
   Threshold act. Act builders get layout classes here; component
   styling lives in components.css.
   ===================================================================== */

/* ---- Shell ----------------------------------------------------------- */

#app {
  display: grid;
  grid-template-columns: var(--rail-w) minmax(0, 1fr);
  height: 100vh;
  height: 100dvh;
  padding-top: var(--app-topbar-h);
}

/* Threshold is cinematic: the rail withdraws. */
#app.is-threshold { grid-template-columns: 0 minmax(0, 1fr); }
#app.is-threshold .hud-rail { opacity: 0; pointer-events: none; }

#app { transition: grid-template-columns var(--t-slow) var(--ease-in-out); }

.app-breadcrumbs {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: calc(var(--z-toast) - 1);
  height: var(--app-topbar-h);
  display: flex;
  align-items: center;
  gap: var(--s-2);
  padding: 0 13rem 0 var(--s-4);
  border-bottom: 1px solid var(--brand-line);
  background:
    linear-gradient(90deg, rgba(239,70,58,0.16), transparent 26%, rgba(39,196,223,0.11)),
    rgba(7, 11, 18, 0.88);
  backdrop-filter: blur(14px);
  color: var(--text-3);
  white-space: nowrap;
}

.app-breadcrumbs .crumb {
  color: var(--text-2);
  font-size: var(--fs-small);
}

.app-breadcrumbs .crumb:hover { color: var(--text); }

.app-breadcrumbs .crumb-current {
  color: var(--text);
  font-weight: 600;
}

.app-breadcrumbs .crumb-sep {
  color: var(--text-3);
  font-size: var(--fs-small);
}

.crumb-status {
  margin-left: var(--s-2);
  padding: 2px var(--s-2);
  border: 1px solid rgba(244,234,219,0.16);
  border-radius: var(--r-1);
  color: var(--brand-paper);
  background: rgba(239,70,58,0.13);
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

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

.hud-rail {
  grid-column: 1;
  position: relative;
  z-index: var(--z-rail);
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--hairline);
  background:
    linear-gradient(180deg, rgba(37,15,18,0.28), transparent 36%),
    linear-gradient(180deg, var(--panel-sunken), var(--canvas));
  overflow: hidden;
  transition: opacity var(--t-slow) var(--ease-in-out);
}

.hud-rail::before {
  content: "";
  position: absolute;
  inset: auto -42px 0 22px;
  height: 210px;
  pointer-events: none;
  background: url("../img/brand/mask-signal.jpg") center bottom / cover no-repeat;
  opacity: 0.105;
  filter: saturate(1.1) contrast(1.08);
  mix-blend-mode: screen;
}

.hud-brand {
  position: relative;
  padding: var(--s-4);
  border-bottom: 1px solid var(--hairline);
}

.hud-brand::after {
  content: "";
  position: absolute;
  left: var(--s-4);
  right: var(--s-4);
  bottom: -1px;
  height: 1px;
  background: linear-gradient(90deg, var(--brand-coral), var(--brand-gold), var(--brand-cyan));
  opacity: 0.55;
}

.hud-brand .brand-mark {
  font-family: var(--font-display);
  font-size: var(--fs-body);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--brand-paper);
}

.hud-brand .brand-run {
  margin-top: var(--s-1);
  display: flex;
  align-items: center;
  gap: var(--s-2);
  font-size: var(--fs-micro);
  color: var(--text-2);
  min-height: 1.2em;
}

/* Act progression track */

.hud-track {
  flex: 1;
  overflow-y: auto;
  padding: var(--s-3) 0;
  position: relative;
  z-index: 1;
}

.hud-act {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  width: 100%;
  padding: var(--s-2) var(--s-4);
  text-align: left;
  color: var(--text-3);
  font-size: var(--fs-small);
  position: relative;
  transition: color var(--t-fast) var(--ease-out), background var(--t-fast) var(--ease-out);
}

.hud-act .act-node {
  width: 9px; height: 9px;
  flex-shrink: 0;
  border-radius: 50%;
  border: 1px solid var(--text-3);
  background: transparent;
  transition: all var(--t-med) var(--ease-out);
  position: relative;
}

/* connecting line between nodes */
.hud-act:not(:last-child) .act-node::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 11px;
  width: 1px;
  height: 22px;
  background: var(--hairline);
  transform: translateX(-50%);
}

.hud-act .act-name { flex: 1; line-height: 1.2; }
.hud-act .act-num {
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  color: var(--text-3);
}

.hud-act.is-complete { color: var(--text-2); }
.hud-act.is-complete .act-node { background: var(--phosphor); border-color: var(--phosphor); }

.hud-act.is-active { color: var(--text); }
.hud-act.is-active .act-node {
  border-color: var(--brand-paper);
  box-shadow: 0 0 12px rgba(39,196,223,0.34);
  background: var(--brand-cyan-dim);
}
.hud-act.is-active::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 2px;
  background: linear-gradient(180deg, var(--brand-coral), var(--brand-cyan));
}

.hud-act.is-available:hover { color: var(--text); background: var(--panel); cursor: pointer; }
.hud-act.is-complete:hover  { color: var(--text); background: var(--panel); cursor: pointer; }

.hud-act.is-locked { cursor: not-allowed; }
.hud-act.is-locked .act-lock {
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  color: var(--text-3);
}

/* Time-in-act, subtle */
.hud-clock {
  position: relative;
  z-index: 1;
  padding: var(--s-2) var(--s-4);
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  color: var(--text-3);
  border-top: 1px solid var(--hairline);
  display: flex;
  justify-content: space-between;
}

/* Credos block */
.hud-credos {
  position: relative;
  z-index: 1;
  padding: var(--s-3) var(--s-3);
  border-top: 1px solid var(--hairline);
}
.hud-credos .microcaps { padding: 0 var(--s-1) var(--s-2); display: block; }

/* Readiness block */
.hud-readiness {
  position: relative;
  z-index: 1;
  padding: var(--s-3) var(--s-4) var(--s-4);
  border-top: 1px solid var(--hairline);
}

/* ---- Stage ------------------------------------------------------------- */

.stage {
  grid-column: 2;
  position: relative;
  overflow: hidden;
  min-width: 0;
  background: var(--canvas);
}

.stage::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(900px 620px at 22% -12%, var(--brand-coral-veil), transparent 62%),
    radial-gradient(860px 560px at 100% 12%, var(--brand-cyan-veil), transparent 58%),
    linear-gradient(90deg, rgba(239,70,58,0.035), transparent 28%, rgba(39,196,223,0.032));
  opacity: 1;
  mix-blend-mode: screen;
}

.stage::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, transparent 0 49.85%, rgba(244,234,219,0.03) 49.9% 50.1%, transparent 50.15%),
    linear-gradient(0deg, transparent 0 49.85%, rgba(244,234,219,0.025) 49.9% 50.1%, transparent 50.15%);
  background-size: 96px 96px;
  mask-image: radial-gradient(circle at 52% 20%, black, transparent 68%);
  opacity: 0.34;
}

/* World theming: acts add .world-themed to the stage and set --w-*
   custom properties (via ctx.theme.apply). The room changes colour. */
.stage.world-themed {
  background:
    radial-gradient(120% 90% at 70% -10%, var(--w-glow), transparent 55%),
    var(--canvas);
  transition: background var(--t-slow) var(--ease-in-out);
}

/* Act layout primitives ---------------------------------------------------
   .act            — fills the stage, scrolls internally
   .act-center     — centred column (threshold, interstitial moments)
   .act-split      — content centre + inspector right (briefing, gauntlet)
*/

.act {
  position: absolute;
  inset: 0;
  z-index: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  animation: act-enter var(--t-slow) var(--ease-out);
}

/* Each act arrives with a confident rise, not a hard cut. */
@keyframes act-enter {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .act { animation: none; }
}

.act-head {
  position: relative;
  padding: var(--s-5) var(--s-6) var(--s-4);
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--s-4);
  flex-wrap: wrap;
  isolation: isolate;
}

.act-head::after {
  content: "";
  position: absolute;
  left: var(--s-6);
  right: var(--s-6);
  bottom: 0;
  height: 1px;
  background: linear-gradient(90deg, var(--brand-coral), rgba(244,234,219,0.16), transparent 72%);
  opacity: 0.7;
}

.act-head .act-kicker { display: block; margin-bottom: var(--s-2); }

.act-head-visual {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 118px auto;
  align-items: center;
  justify-content: stretch;
  background:
    linear-gradient(90deg, transparent, rgba(244,234,219,0.025) 58%, transparent),
    linear-gradient(180deg, transparent, rgba(7,11,18,0.34));
}

.act-head-visual > :first-child { min-width: 0; }

.act-head-visual .act-portrait {
  grid-column: 2;
  justify-self: end;
}

.act-head-visual > :last-child:not(.act-portrait) {
  grid-column: 3;
  justify-self: end;
}

.act-portrait {
  width: 96px;
  height: 120px;
  position: relative;
  overflow: hidden;
  border-radius: var(--r-1);
  border: 1px solid var(--brand-line-hot);
  background:
    linear-gradient(180deg, rgba(244,234,219,0.96), rgba(244,234,219,0.86));
  box-shadow: var(--shadow-panel), 0 18px 52px -30px var(--portrait-glow, var(--brand-cyan));
  transform: rotate(0.6deg);
}

.act-portrait::before {
  content: "";
  position: absolute;
  inset: 6px;
  z-index: 1;
  border: 1px solid rgba(37,15,18,0.14);
  pointer-events: none;
}

.act-portrait::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.12), transparent 35%, rgba(37,15,18,0.14)),
    radial-gradient(circle at 50% 14%, var(--portrait-glow, var(--phosphor-dim)), transparent 55%);
  mix-blend-mode: screen;
  opacity: 0.55;
}

.act-portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.act-portrait-coral { --portrait-glow: rgba(230, 99, 94, 0.22); }
.act-portrait-cyan { --portrait-glow: rgba(127, 180, 230, 0.22); }
.act-portrait-flame { --portrait-glow: rgba(230, 195, 94, 0.22); }
.act-portrait-green { --portrait-glow: rgba(94, 230, 160, 0.18); }
.act-portrait-guard { --portrait-glow: rgba(94, 230, 160, 0.20); }
.act-portrait-gold { --portrait-glow: rgba(230, 195, 94, 0.24); }

.act-body {
  flex: 1;
  min-height: 0;
  padding: 0 var(--s-6) var(--s-6);
  width: 100%;
  max-width: var(--stage-max);
  margin: 0 auto;
}

.act-center {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--s-6);
  padding: var(--s-6);
  text-align: center;
}

.act-split {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: 1fr var(--inspector-w);
  gap: var(--s-4);
  padding: 0 var(--s-5) var(--s-5);
}

.act-split .split-main { min-width: 0; min-height: 0; display: flex; flex-direction: column; }
.act-split .split-inspector { min-height: 0; overflow-y: auto; }

/* Locked / pending / offline states — designed, never broken */

.act-notice {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--s-3);
  text-align: center;
  padding: var(--s-6);
}

.act-notice .notice-glyph {
  font-family: var(--font-mono);
  font-size: var(--fs-display);
  color: var(--text-3);
}

.act-notice h2 { font-size: var(--fs-display); }
.act-notice p { color: var(--text-2); max-width: 46ch; }
.act-notice .notice-missing {
  font-family: var(--font-mono);
  font-size: var(--fs-small);
  color: var(--amber);
}

/* ---- Threshold (Act 0) ---------------------------------------------------- */

.threshold {
  position: absolute;
  inset: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.threshold-field {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.threshold-content {
  position: relative;
  z-index: 1;
  min-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: var(--s-5);
  padding: var(--s-6) var(--s-6) var(--s-8);
}

.threshold-arrival {
  display: grid;
  grid-template-columns: minmax(320px, 0.92fr) minmax(420px, 0.78fr);
  align-items: center;
  gap: clamp(2rem, 5vw, 5rem);
  width: min(1180px, 100%);
  margin-top: clamp(0rem, 2vh, 2rem);
}

.threshold-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--s-4);
}

.threshold-oracle {
  position: relative;
  width: min(520px, 100%);
  aspect-ratio: 1.08;
  justify-self: center;
  isolation: isolate;
}

.threshold-oracle::before {
  content: "";
  position: absolute;
  inset: 9% 4% 4% 11%;
  z-index: -2;
  background:
    radial-gradient(circle at 54% 22%, var(--brand-gold-dim), transparent 30%),
    linear-gradient(135deg, rgba(244,234,219,0.12), transparent 42%, rgba(39,196,223,0.10));
  border: 1px solid var(--brand-line);
  clip-path: polygon(8% 0, 100% 0, 92% 100%, 0 88%);
  opacity: 0.72;
}

.threshold-oracle::after {
  content: "";
  position: absolute;
  inset: 1% 8% auto auto;
  width: 38%;
  aspect-ratio: 1;
  border: 1px solid rgba(240,182,79,0.46);
  border-radius: 50%;
  box-shadow: 0 0 48px -20px var(--brand-gold);
  opacity: 0.54;
}

.oracle-sun {
  position: absolute;
  top: -1%;
  left: 29%;
  width: 34%;
  aspect-ratio: 1;
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(240,182,79,0.5), rgba(239,70,58,0.26) 42%, transparent 68%);
  filter: blur(0.3px);
  z-index: -1;
}

.oracle-rule {
  position: absolute;
  left: 3%;
  right: 8%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--brand-coral), var(--brand-gold), var(--brand-cyan), transparent);
  opacity: 0.74;
}
.oracle-rule-top { top: 15%; }
.oracle-rule-bottom { bottom: 14%; }

.threshold-keyart {
  position: absolute;
  overflow: hidden;
  border: 1px solid var(--brand-line-hot);
  background:
    linear-gradient(180deg, rgba(244,234,219,0.96), rgba(244,234,219,0.86));
  box-shadow: var(--shadow-panel);
}

.threshold-keyart-primary {
  left: 7%;
  top: 0;
  z-index: 3;
  aspect-ratio: 4 / 5;
  width: 100%;
  border-radius: var(--r-2);
  max-width: 315px;
  box-shadow: var(--shadow-panel), var(--brand-shadow-red);
  transform: rotate(-0.6deg);
}

.threshold-keyart-secondary {
  z-index: 2;
  top: 14%;
  width: 39%;
  aspect-ratio: 4 / 3.2;
  border-radius: var(--r-1);
  opacity: 0.88;
  filter: saturate(0.95) contrast(1.02);
}

.secondary-left {
  left: -4%;
  top: 24%;
  transform: rotate(1.2deg);
  box-shadow: var(--shadow-panel), var(--brand-shadow-cyan);
}

.secondary-right {
  right: -3%;
  transform: rotate(-0.8deg);
  box-shadow: var(--shadow-panel), 0 24px 80px -36px rgba(240,182,79,0.5);
}

.threshold-keyart::before,
.threshold-keyart::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.threshold-keyart::before {
  background:
    linear-gradient(180deg, rgba(255,255,255,0.04), transparent 42%, rgba(37,15,18,0.16)),
    repeating-linear-gradient(90deg, transparent 0 13px, rgba(37,15,18,0.035) 13px 14px);
  z-index: 1;
}

.threshold-keyart::after {
  border: 1px solid rgba(37,15,18,0.12);
  inset: 9px;
  z-index: 2;
}

.threshold-keyart img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.threshold-mark {
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--text-2);
}

.threshold-thesis {
  font-family: var(--font-display);
  font-size: var(--fs-hero);
  line-height: var(--lh-tight);
  letter-spacing: 0;
  text-align: left;
  max-width: 22ch;
  min-height: 2.2em;
}

.threshold-thesis .caret {
  display: inline-block;
  width: 2px;
  height: 0.9em;
  margin-left: 2px;
  background: var(--phosphor);
  vertical-align: -0.08em;
  animation: caret-blink 1.1s steps(1) infinite;
}

@keyframes caret-blink { 50% { opacity: 0; } }

.threshold-doors {
  display: flex;
  gap: var(--s-5);
  flex-wrap: wrap;
  justify-content: center;
  align-items: stretch;
  width: min(1060px, 100%);
  opacity: 0;
  transform: translateY(10px);
  transition: opacity var(--t-slow) var(--ease-out), transform var(--t-slow) var(--ease-out);
}

.threshold-resume {
  width: min(680px, 100%);
  opacity: 0;
  transform: translateY(10px);
  transition: opacity var(--t-slow) var(--ease-out) 150ms, transform var(--t-slow) var(--ease-out) 150ms;
}

.threshold-doors.is-revealed,
.threshold-resume.is-revealed {
  opacity: 1;
  transform: none;
}

/* Quiet facilitator-mode entry — drops to its own row below the doors. */
.threshold-aux {
  flex-basis: 100%;
  width: 100%;
  background: none;
  border: 0;
  cursor: pointer;
  color: var(--text-3);
  font-size: var(--fs-small);
  padding: var(--s-2);
  transition: color var(--t-fast);
}
.threshold-aux b { color: var(--text-2); font-weight: 600; }
.threshold-aux:hover { color: var(--text-2); }
.threshold-aux:hover b { color: var(--phosphor); }

.threshold-resume .microcaps { display: block; margin-bottom: var(--s-2); text-align: left; }

/* The "draw them in" section — public landing copy below the doors/resume. */
.threshold-learn {
  width: min(760px, 100%);
  margin: var(--s-6) auto 0;
  text-align: left;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity var(--t-slow) var(--ease-out) 250ms, transform var(--t-slow) var(--ease-out) 250ms;
}
.threshold-learn.is-revealed { opacity: 1; transform: none; }
.learn-tagline {
  text-align: center;
  font-family: var(--font-display);
  font-size: 1.3rem;
  color: var(--text);
  margin-bottom: var(--s-6);
}
.learn-block { margin-bottom: var(--s-6); }
.learn-h {
  font-family: var(--font-display);
  font-size: 1.4rem;
  color: var(--phosphor);
  margin-bottom: var(--s-3);
}
.learn-body { color: var(--text-2); line-height: var(--lh-body); max-width: 68ch; }
.learn-steps { list-style: none; counter-reset: step; padding: 0; display: flex; flex-direction: column; gap: var(--s-3); }
.learn-steps li { counter-increment: step; display: grid; grid-template-columns: auto 1fr; gap: var(--s-3); align-items: baseline; }
.learn-steps li::before {
  content: counter(step);
  grid-row: span 2;
  font-family: var(--font-mono);
  color: var(--phosphor);
  border: 1px solid var(--hairline);
  border-radius: 50%;
  width: 1.9em; height: 1.9em;
  display: grid; place-items: center;
  font-size: var(--fs-small);
}
.learn-steps li b { grid-column: 2; color: var(--text); }
.learn-steps li span { grid-column: 2; color: var(--text-3); font-size: var(--fs-small); }
.learn-quotes { display: flex; flex-direction: column; gap: var(--s-3); border-top: 1px solid var(--hairline); padding-top: var(--s-5); }
.learn-quote {
  font-family: var(--font-display);
  font-size: 1.25rem;
  line-height: var(--lh-snug);
  color: var(--text);
  margin: 0;
  padding-left: var(--s-4);
  border-left: 2px solid var(--phosphor);
}
.learn-quote cite { display: block; margin-top: var(--s-2); font-family: var(--font-mono); font-size: var(--fs-micro); color: var(--text-3); font-style: normal; letter-spacing: .08em; }
.learn-creds .learn-body { color: var(--text-2); }
.learn-cta { text-align: center; color: var(--text-3); margin-top: var(--s-5); font-size: var(--fs-small); }

.threshold-resume-list { display: flex; flex-direction: column; }

.resume-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: var(--s-4);
  align-items: center;
  width: 100%;
  padding: var(--s-3) var(--s-4);
  border-top: 1px solid var(--hairline);
  color: var(--text-2);
  font-size: var(--fs-small);
  text-align: left;
  transition: background var(--t-fast) var(--ease-out), color var(--t-fast) var(--ease-out);
}

.resume-row:hover { background: var(--panel); color: var(--text); }
.resume-row .resume-brand { color: var(--text); font-weight: 600; }

.threshold-foot {
  position: fixed;
  bottom: var(--s-3);
  left: 0; right: 0;
  z-index: 1;
  text-align: center;
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  color: var(--text-3);
}

/* ---- Branding polish ------------------------------------------------------
   The "designed" layer: a live signal-dot in the wordmark, glow on the
   thesis and doors, depth on the rail. Restraint is the aesthetic. */

/* Wordmark signal-dot — a slow phosphor pulse, the product's heartbeat. */
.hud-brand .brand-mark,
.threshold-mark { display: inline-flex; align-items: center; }
.hud-brand .brand-mark::before,
.threshold-mark::before {
  content: "";
  width: 6px; height: 6px;
  margin-right: 0.7em;
  border-radius: 50%;
  background: var(--phosphor);
  box-shadow: 0 0 8px var(--phosphor);
  animation: mark-pulse 3.2s var(--ease-in-out) infinite;
}
@keyframes mark-pulse { 0%,100% { opacity: 0.45; } 50% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .hud-brand .brand-mark::before, .threshold-mark::before { animation: none; opacity: 0.9; }
}

/* The thesis carries a faint aura — light in the dark, not a neon sign. */
.threshold-thesis { text-shadow: 0 0 40px rgba(94, 230, 160, 0.10); }

.threshold-doors .door {
  flex: 1 1 260px;
  width: auto;
  max-width: 340px;
}

/* Doors lift and warm on hover; the live door glows, the demo door too. */
.door { transition: transform var(--t-med) var(--ease-out), border-color var(--t-med) var(--ease-out), box-shadow var(--t-med) var(--ease-out); }
.door:not(:disabled):hover {
  transform: translateY(-4px);
  border-color: var(--hairline-strong);
  box-shadow: var(--shadow-lift), 0 0 0 1px var(--phosphor-dim) inset;
}
.door:not(:disabled):hover .door-title { color: var(--phosphor); }

/* Rail depth + a live glow under the active readiness dial. */
.hud-rail { box-shadow: 1px 0 0 rgba(0,0,0,0.4); }
.hud-readiness { position: relative; }

/* HUD readiness dial number reads as live data. */
.hud-readiness .dial-number { text-shadow: 0 0 16px var(--phosphor-glow); }

/* ---- Responsive ------------------------------------------------------------ */

@media (max-width: 900px) {
  #app,
  #app.is-threshold {
    grid-template-columns: minmax(0, 1fr);
  }
  .hud-rail { display: none; }
  .stage { grid-column: 1; }
  .act-split { grid-template-columns: 1fr; }
  .act-split .split-inspector { max-height: 40vh; }
  .threshold-arrival {
    grid-template-columns: minmax(0, 1fr);
    width: min(620px, 100%);
  }
  .threshold-oracle {
    width: min(460px, 88vw);
  }
}

@media (max-width: 700px) {
  .app-breadcrumbs {
    gap: var(--s-2);
    padding: 0 7.5rem 0 var(--s-3);
    overflow: hidden;
  }

  .app-breadcrumbs .crumb-home,
  .app-breadcrumbs .crumb-home + .crumb-sep,
  .crumb-status {
    display: none;
  }

  .threshold-content {
    align-items: stretch;
    gap: var(--s-4);
    padding: var(--s-5) var(--s-4) var(--s-8);
  }

  .threshold-arrival {
    gap: var(--s-5);
    margin-top: var(--s-2);
  }

  .threshold-oracle {
    width: min(340px, 92vw);
    justify-self: center;
  }

  .threshold-keyart-primary {
    max-width: 220px;
    left: 3%;
  }

  .threshold-keyart-secondary {
    width: 41%;
  }

  .secondary-right { right: -2%; }

  .act-head-visual {
    grid-template-columns: minmax(0, 1fr) 72px;
    align-items: start;
  }

  .act-head-visual .act-portrait {
    grid-column: 2;
    grid-row: 1;
  }

  .act-head-visual > :last-child:not(.act-portrait) {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-self: start;
    margin-top: var(--s-3);
  }

  .act-portrait {
    width: 64px;
    height: 80px;
  }

  .threshold-arrival {
    grid-template-columns: 1fr;
    gap: var(--s-4);
  }

  .threshold-copy {
    align-items: center;
    text-align: center;
  }

  .threshold-keyart {
    width: min(230px, 72vw);
    justify-self: center;
  }

  .threshold-mark,
  .threshold-thesis {
    align-self: center;
    text-align: center;
  }

  .threshold-thesis {
    min-height: 0;
    max-width: 12ch;
  }

  .threshold-doors {
    gap: var(--s-3);
  }

  .threshold-doors .door {
    flex-basis: 100%;
    width: 100%;
    max-width: none;
    min-height: 150px;
  }

  .threshold-resume,
  .threshold-learn {
    width: 100%;
  }

  .resume-row {
    grid-template-columns: 1fr;
    gap: var(--s-1);
  }

  .threshold-foot {
    display: none;
  }
}
