/* =================================================================
   ZATOR — Live treatment
   layered on top of styles.css to make the system perform itself.
   ================================================================= */

:root {
  --motion-fast: 220ms cubic-bezier(0.2, 0.8, 0.2, 1);
  --motion:      380ms cubic-bezier(0.2, 0.8, 0.2, 1);
  --motion-slow: 720ms cubic-bezier(0.2, 0.8, 0.2, 1);
  --motion-cine: 1200ms cubic-bezier(0.16, 0.84, 0.32, 1);
}

/* JS-hook classes (no visual styles — used only for JS targeting) */
.ingest-ticker__clock-value, .scrubber__stage-name { /* no-op */ }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0ms !important;
  }
}

/* =================================================================
   1. INGEST TICKER (always-on stream above the header)
   ================================================================= */
.ingest-ticker {
  position: sticky; top: 0; z-index: 60;
  display: flex; align-items: center;
  height: 32px;
  background: rgba(7,9,13,0.95);
  border-bottom: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--fg-2);
  overflow: hidden;
  backdrop-filter: blur(10px);
}
.ingest-ticker__label {
  flex: 0 0 auto;
  padding: 0 14px 0 24px;
  display: inline-flex; align-items: center; gap: 8px;
  border-right: 1px solid var(--line-1);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  height: 100%;
}
.ingest-ticker__label::before {
  content: ""; width: 7px; height: 7px;
  background: var(--cyan); border-radius: 50%;
  box-shadow: 0 0 8px var(--cyan);
  animation: ti-pulse 1.4s ease-in-out infinite;
}
@keyframes ti-pulse { 0%,100% { opacity:1; } 50% { opacity:0.45; } }

.ingest-ticker__rail {
  flex: 1 1 auto;
  position: relative;
  overflow: hidden;
  height: 100%;
}
.ingest-ticker__row {
  position: absolute; left: 0; top: 0; bottom: 0;
  display: flex; align-items: center; gap: 28px;
  white-space: nowrap;
  padding-left: 18px;
  animation: ti-scroll 80s linear infinite;
}
@keyframes ti-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
.ingest-ticker__row .it-event {
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--fg-1);
}
.ingest-ticker__row .it-event .src { color: var(--fg-3); letter-spacing: 0.12em; text-transform: uppercase; font-size: 10px; }
.ingest-ticker__row .it-event .verb { color: var(--gold); font-size: 10.5px; letter-spacing: 0.1em; text-transform: uppercase; }
.ingest-ticker__row .it-event .obj { color: var(--fg-0); }
.ingest-ticker__row .it-event .ms { color: var(--cyan); font-size: 10.5px; }
.ingest-ticker__row .it-event .dot { width: 5px; height: 5px; background: currentColor; border-radius: 50%; opacity: 0.5; }

.ingest-ticker__clock {
  flex: 0 0 auto;
  padding: 0 18px 0 14px;
  border-left: 1px solid var(--line-1);
  font-size: 10.5px; letter-spacing: 0.1em;
  color: var(--fg-3);
  height: 100%; display: inline-flex; align-items: center; gap: 8px;
}
@media (max-width: 720px) {
  .ingest-ticker {
    display: none;
  }
}

/* =================================================================
   2. SCROLL PROGRESS RAIL (vertical, left edge)
   ================================================================= */
.scroll-rail {
  position: fixed; left: 18px; top: 50%;
  transform: translateY(-50%);
  z-index: 30;
  display: flex; flex-direction: column; gap: 14px;
  pointer-events: none;
}
.scroll-rail__dot {
  width: 7px; height: 7px;
  background: var(--line-2);
  border-radius: 50%;
  transition: all var(--motion);
  pointer-events: auto;
  cursor: pointer;
  position: relative;
}
.scroll-rail__dot::after {
  content: attr(data-label);
  position: absolute;
  left: 18px; top: 50%;
  transform: translateY(-50%);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-3);
  white-space: nowrap;
  opacity: 0;
  transition: opacity var(--motion);
  pointer-events: none;
}
.scroll-rail__dot:hover::after,
.scroll-rail__dot.active::after { opacity: 1; }
.scroll-rail__dot.active {
  background: var(--gold);
  box-shadow: 0 0 0 3px rgba(212,172,107,0.20);
  width: 9px; height: 9px;
}
.scroll-rail__dot.passed { background: var(--gold-1); }
@media (max-width: 1180px) { .scroll-rail { display: none; } }

/* =================================================================
   3. SECTION REVEALS (IntersectionObserver target)
   ================================================================= */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity var(--motion-slow), transform var(--motion-slow);
}
.reveal.in-view {
  opacity: 1;
  transform: translateY(0);
}
.reveal-stagger > * {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 480ms cubic-bezier(0.2,0.8,0.2,1), transform 480ms cubic-bezier(0.2,0.8,0.2,1);
}
.reveal-stagger.in-view > * { opacity: 1; transform: translateY(0); }
.reveal-stagger.in-view > *:nth-child(1) { transition-delay:  0ms; }
.reveal-stagger.in-view > *:nth-child(2) { transition-delay: 60ms; }
.reveal-stagger.in-view > *:nth-child(3) { transition-delay: 120ms; }
.reveal-stagger.in-view > *:nth-child(4) { transition-delay: 180ms; }
.reveal-stagger.in-view > *:nth-child(5) { transition-delay: 240ms; }
.reveal-stagger.in-view > *:nth-child(6) { transition-delay: 300ms; }
.reveal-stagger.in-view > *:nth-child(7) { transition-delay: 360ms; }
.reveal-stagger.in-view > *:nth-child(8) { transition-delay: 420ms; }

/* =================================================================
   4. HERO BOOT SEQUENCE
   ================================================================= */
.boot { position: relative; }
.hero.boot .hero__row {
  align-items: center;
}

/* cursor spotlight on hero copy column */
.boot::before {
  content: "";
  position: absolute; inset: 0;
  pointer-events: none;
  background: radial-gradient(360px 240px at var(--cx, 50%) var(--cy, 50%), rgba(212,172,107,0.10), transparent 70%);
  opacity: 0;
  transition: opacity 600ms ease;
  z-index: 0;
}
.boot:hover::before { opacity: 1; }
.interactive-hero {
  position: relative;
  overflow: hidden;
}
.interactive-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(420px 260px at var(--cx, 45%) var(--cy, 38%), rgba(94,204,199,0.075), transparent 72%);
  opacity: 0;
  transition: opacity var(--motion);
  z-index: 0;
}
.interactive-hero:hover::before { opacity: 1; }
.interactive-hero > * {
  position: relative;
  z-index: 1;
}

/* Boot reveal: clip-path approach — text lays out naturally + wraps,
   the reveal is a left-to-right wipe. Robust at any viewport width. */
.boot__line {
  display: inline-block;
  max-width: 100%;
  white-space: normal;
  vertical-align: bottom;
  -webkit-clip-path: none;
          clip-path: none;
  animation: none;
}
.boot__line--2 {
  animation: none;
}
@keyframes boot-wipe {
  to { -webkit-clip-path: inset(0 0 0 0); clip-path: inset(0 0 0 0); }
}

@media (max-width: 720px) {
  .boot__line {
    display: inline;
    -webkit-clip-path: none;
            clip-path: none;
    animation: none;
  }
}
.boot__caret {
  display: inline-block;
  width: 0.55ch;
  background: var(--gold);
  height: 0.9em;
  margin-left: 0.12em;
  vertical-align: -0.1em;
  animation: boot-caret 0.9s steps(2) infinite;
  opacity: 0.85;
}
@keyframes boot-caret { 0%,49% { opacity: 1; } 50%,100% { opacity: 0; } }

/* hero artifact materialize: claim card rows pop in one by one */
.boot__card .claim-card__row {
  opacity: 0;
  transform: translateY(6px);
  animation: boot-rowin 380ms cubic-bezier(0.2,0.8,0.2,1) forwards;
}
.boot__card .claim-card__head {
  opacity: 0;
  animation: boot-fade-in 400ms ease 1800ms forwards;
}
.boot__card .claim-card__row:nth-child(1) { animation-delay: 2050ms; }
.boot__card .claim-card__row:nth-child(2) { animation-delay: 2150ms; }
.boot__card .claim-card__row:nth-child(3) { animation-delay: 2240ms; }
.boot__card .claim-card__row:nth-child(4) { animation-delay: 2320ms; }
.boot__card .claim-card__row:nth-child(5) { animation-delay: 2380ms; }
.boot__card .claim-card__row:nth-child(6) { animation-delay: 2440ms; }
.boot__card .claim-card__row:nth-child(7) { animation-delay: 2500ms; }

@keyframes boot-rowin {
  to { opacity: 1; transform: translateY(0); }
}
@keyframes boot-fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* stale alert peeks in after the claim card */
.boot__alert {
  opacity: 0;
  transform: translateY(10px);
  animation: boot-fade-in 700ms ease 3200ms forwards, boot-rowin 700ms cubic-bezier(0.2,0.8,0.2,1) 3200ms forwards;
}

/* killer pull line draws a gold rule, then the words appear */
.boot__pull {
  opacity: 0;
  animation: boot-fade-in 900ms ease 3800ms forwards;
}
.boot__pull-rule {
  display: block;
  height: 1px;
  background: var(--gold);
  width: 0;
  animation: boot-rule 900ms cubic-bezier(0.2,0.8,0.2,1) 3500ms forwards;
}
@keyframes boot-rule { to { width: 100%; } }

/* CTAs slide in last */
.boot__ctas {
  opacity: 0;
  animation: boot-fade-in 600ms ease 4200ms forwards;
}
@media (max-width: 720px) {
  .boot__ctas,
  .hero.boot .hero__lede,
  .boot__pull,
  .boot__pull-rule {
    opacity: 1 !important;
    animation: none !important;
  }
  .boot__pull-rule {
    width: 100%;
  }
}

/* =================================================================
   5. ANIMATED SSA — the diagram performs the loop
   ================================================================= */
.ssa-live {
  position: relative;
  overflow: hidden;
}
.ssa-live::after {
  /* subtle motion caption */
  content: "looping · sources flow into state · state projects to outputs";
  position: absolute; bottom: 8px; left: 50%;
  transform: translateX(-50%);
  font-family: var(--mono); font-size: 9.5px;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--fg-3);
  pointer-events: none;
}

/* particles flow across the ssa diagram */
.ssa-flow {
  position: absolute; inset: 0; pointer-events: none;
}

/* SSA hover-DAG overlay: shows edges between related items on hover */
.ssa-edges {
  position: absolute; inset: 0; pointer-events: none;
  z-index: 3;
  transition: opacity var(--motion);
  opacity: 0;
}
.ssa-live.hovering .ssa-edges { opacity: 1; }
.ssa-live.hovering .ssa-flow { opacity: 0.25; transition: opacity var(--motion); }
.ssa-edges path {
  fill: none;
  stroke: var(--gold);
  stroke-width: 1.4;
  stroke-linecap: round;
  filter: drop-shadow(0 0 6px rgba(212,172,107,0.5));
}

/* Make ssa items hoverable + show relationship */
.ssa__col li {
  position: relative;
  transition: all var(--motion-fast);
  cursor: default;
}
.ssa-live .ssa__col li[data-rel] { cursor: help; }
.ssa-live.hovering .ssa__col li:not(.related):not(.hovered) {
  opacity: 0.30;
  filter: blur(0.4px);
}
.ssa-live .ssa__col li.hovered {
  border-left-width: 3px;
  background: rgba(212,172,107,0.10);
  color: var(--fg-0);
  transform: translateX(2px);
  z-index: 4;
}
.ssa-live .ssa__col li.related {
  border-left-color: var(--gold);
  background: rgba(212,172,107,0.06);
  color: var(--fg-0);
}
.ssa-flow .particle {
  position: absolute;
  width: 6px; height: 6px;
  background: var(--gold);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--gold);
  animation: ssa-travel 4.5s linear infinite;
  opacity: 0.85;
}
.ssa-flow .particle.cyn { background: var(--cyan); box-shadow: 0 0 8px var(--cyan); }
.ssa-flow .particle.amb { background: var(--amber); box-shadow: 0 0 8px var(--amber); }
.ssa-flow .particle.moss { background: var(--moss); box-shadow: 0 0 6px var(--moss); }

@keyframes ssa-travel {
  0%   { transform: translateX(0)    scale(0.6); opacity: 0; }
  10%  { opacity: 0.95; }
  40%  { transform: translateX(40vw) scale(1); }
  60%  { transform: translateX(60vw) scale(1); }
  90%  { opacity: 0.95; }
  100% { transform: translateX(100vw) scale(0.6); opacity: 0; }
}

/* =================================================================
   6. INTERACTIVE CLAIM CARD (click rows to reveal evidence)
   ================================================================= */
.claim-card__row.expandable {
  cursor: pointer;
  transition: background var(--motion-fast);
}
.claim-card__row.expandable:hover { background: rgba(212,172,107,0.05); }
.claim-card__drawer {
  grid-column: 1 / -1;
  border-top: 1px solid var(--line);
  margin-top: 4px;
  padding-top: 10px;
  display: grid;
  grid-template-columns: 14ch 1fr;
  gap: 14px;
  font-size: 10.5px;
  color: var(--fg-2);
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height var(--motion), opacity var(--motion);
}
.claim-card__row.expandable.open .claim-card__drawer {
  max-height: 200px;
  opacity: 1;
}
.claim-card__drawer .src-pre {
  background: var(--bg-0);
  border: 1px solid var(--line);
  padding: 10px 12px;
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--fg-1);
  line-height: 1.55;
  white-space: pre-wrap;
}
.claim-card__drawer mark {
  background: rgba(212,172,107,0.20);
  color: var(--fg-0);
  padding: 1px 0;
  border-bottom: 1px solid var(--gold);
}
@media (max-width: 720px) {
  .claim-card__drawer {
    grid-template-columns: 1fr;
  }
  .claim-card__drawer .src-pre {
    max-width: 100%;
    overflow-x: auto;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
  }
}

/* =================================================================
   7. STALE PROPAGATION CINEMA
   ================================================================= */
.stale-cine {
  position: relative;
  border: 1px solid var(--line-1);
  background: linear-gradient(180deg, var(--bg-2), var(--bg-1));
  padding: 0;
  min-height: 480px;
}
.stale-cine__bar {
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 22px;
  border-bottom: 1px solid var(--line);
  font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--fg-3);
}
.stale-cine__bar .play-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 14px;
  border: 1px solid var(--gold);
  background: rgba(212,172,107,0.06);
  color: var(--gold);
  font-family: var(--mono);
  font-size: 10.5px; letter-spacing: 0.16em; text-transform: uppercase;
  cursor: pointer;
  transition: all var(--motion-fast);
}
.stale-cine__bar .play-btn:hover { background: var(--gold); color: var(--bg-0); }
.stale-cine__bar .play-btn:disabled { opacity: 0.4; cursor: default; }
.stale-cine__bar .play-btn .triangle { width: 0; height: 0; border-left: 6px solid currentColor; border-top: 4px solid transparent; border-bottom: 4px solid transparent; }

.stale-cine__stage {
  position: relative;
  min-height: 380px;
  background:
    radial-gradient(420px 280px at 50% 50%, rgba(212,172,107,0.05), transparent 70%);
  overflow: hidden;
}
.stale-cine svg.cine-graph {
  width: 100%; height: 380px; display: block;
}
.stale-cine svg.cine-graph .node {
  transition: all var(--motion);
}
.stale-cine svg.cine-graph .node text {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 1.4;
  fill: var(--fg-2);
}
.stale-cine svg.cine-graph .node text.label {
  font-family: "Source Serif 4", Georgia, serif;
  font-style: italic;
  font-size: 12px;
  fill: var(--fg-0);
}
.stale-cine svg.cine-graph .edge {
  stroke: rgba(212,172,107,0.3);
  stroke-width: 1;
  fill: none;
  transition: all var(--motion);
}

/* state classes the JS toggles */
.stale-cine.cine-1 .node--source rect { stroke: var(--rose); fill: rgba(224,113,107,0.08); }
.stale-cine.cine-1 .node--source text { fill: var(--rose); }
.stale-cine.cine-1 .edge--source-claim { stroke: var(--rose); stroke-width: 1.6; }

.stale-cine.cine-2 .node--claim rect { stroke: var(--rose); fill: rgba(224,113,107,0.08); }
.stale-cine.cine-2 .node--claim text { fill: var(--rose); }
.stale-cine.cine-2 .node--claim .status-dot { fill: var(--rose); }
.stale-cine.cine-2 .edge--claim-dcf,
.stale-cine.cine-2 .edge--claim-memo,
.stale-cine.cine-2 .edge--claim-watch { stroke: var(--rose); stroke-width: 1.6; }

.stale-cine.cine-3 .node--dcf rect,
.stale-cine.cine-3 .node--memo rect,
.stale-cine.cine-3 .node--watch rect { stroke: var(--rose); fill: rgba(224,113,107,0.08); }
.stale-cine.cine-3 .node--dcf text,
.stale-cine.cine-3 .node--memo text,
.stale-cine.cine-3 .node--watch text { fill: var(--rose); }

.stale-cine.cine-4 .node--reviewer rect { stroke: var(--cyan); fill: rgba(94,204,199,0.08); }
.stale-cine.cine-4 .node--reviewer text { fill: var(--cyan); }
.stale-cine.cine-4 .edge--alert-reviewer { stroke: var(--cyan); stroke-width: 1.6; stroke-dasharray: 0; }

.stale-cine__caption {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 22px;
  border-top: 1px solid var(--line);
  font-family: var(--mono); font-size: 10.5px;
  color: var(--fg-3);
}
.stale-cine__caption .caption-text { color: var(--fg-1); }
.stale-cine__caption .step-counter { color: var(--gold); letter-spacing: 0.18em; text-transform: uppercase; font-size: 9.5px; }

/* the moving pulse ring on each affected node */
.stale-cine .pulse-ring {
  fill: none;
  stroke: var(--rose);
  stroke-width: 1.5;
  opacity: 0;
  transform-origin: center;
  transform-box: fill-box;
}
.stale-cine.cine-1 .node--source .pulse-ring { animation: cine-pulse 700ms ease-out 1; }
.stale-cine.cine-2 .node--claim  .pulse-ring { animation: cine-pulse 700ms ease-out 1; }
.stale-cine.cine-3 .node--dcf    .pulse-ring { animation: cine-pulse 700ms ease-out 80ms 1; }
.stale-cine.cine-3 .node--memo   .pulse-ring { animation: cine-pulse 700ms ease-out 160ms 1; }
.stale-cine.cine-3 .node--watch  .pulse-ring { animation: cine-pulse 700ms ease-out 240ms 1; }
.stale-cine.cine-4 .node--reviewer .pulse-ring { stroke: var(--cyan); animation: cine-pulse 700ms ease-out 1; }

@keyframes cine-pulse {
  0%   { opacity: 0.8; transform: scale(1); }
  100% { opacity: 0;   transform: scale(2.0); }
}

/* =================================================================
   8. VOCABULARY FALL — tokens streaming in two directions
   ================================================================= */
.vocab-fall {
  position: relative;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, transparent, rgba(212,172,107,0.02), transparent);
  padding: 32px 0;
  overflow: hidden;
  user-select: none;
}
.vocab-fall::before, .vocab-fall::after {
  /* edge fade */
  content: ""; position: absolute; top: 0; bottom: 0; width: 220px; z-index: 2;
  pointer-events: none;
}
.vocab-fall::before {
  left: 0;
  background: linear-gradient(90deg, var(--bg-0), transparent);
}
.vocab-fall::after {
  right: 0;
  background: linear-gradient(-90deg, var(--bg-0), transparent);
}
.vocab-fall__row {
  display: flex; align-items: center; gap: 18px;
  white-space: nowrap;
  padding-block: 8px;
  width: max-content;
}
.vocab-fall__row--a { animation: vf-scroll 65s linear infinite; }
.vocab-fall__row--b { animation: vf-scroll-rev 80s linear infinite; }
.vocab-fall__row--c { animation: vf-scroll 95s linear infinite; opacity: 0.55; }

@keyframes vf-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
@keyframes vf-scroll-rev {
  from { transform: translateX(-50%); }
  to   { transform: translateX(0); }
}

.vf-tok {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 9px 14px;
  border: 1px solid var(--line-1);
  background: rgba(255,255,255,0.015);
  font-family: var(--mono);
  font-size: 12px;
  color: var(--fg-1);
  letter-spacing: 0.02em;
  position: relative;
  transition: all var(--motion-fast);
}
.vf-tok::before {
  content: "§";
  color: var(--gold);
  font-size: 10px;
  letter-spacing: 0.16em;
}
.vf-tok:hover {
  border-color: var(--gold);
  color: var(--fg-0);
  background: rgba(212,172,107,0.08);
  transform: translateY(-1px);
  z-index: 3;
}
.vf-tok__op {
  font-size: 9.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--cyan);
  padding-left: 10px;
  border-left: 1px solid var(--line-1);
}
.vf-tok[data-pop]::after {
  content: attr(data-pop);
  position: absolute; bottom: 100%; left: 50%;
  transform: translate(-50%, -8px);
  background: rgba(7,9,13,0.96);
  border: 1px solid var(--gold);
  padding: 8px 12px;
  font-size: 10.5px;
  letter-spacing: 0.04em;
  color: var(--fg-0);
  text-transform: none;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--motion-fast);
  z-index: 4;
  font-family: "Source Serif 4", Georgia, serif;
  font-style: italic;
}
.vf-tok:hover[data-pop]::after { opacity: 1; }
@media (max-width: 720px) {
  .vocab-fall {
    padding-block: 24px;
  }
  .vocab-fall::before,
  .vocab-fall::after {
    width: 32px;
  }
  .vocab-fall__row {
    width: 100%;
    max-width: 100%;
    flex-wrap: wrap;
    white-space: normal;
    padding-inline: var(--gutter);
    animation: none !important;
    transform: none !important;
  }
  .vocab-fall__row--b,
  .vocab-fall__row--c,
  .vocab-fall__row--a .vf-tok:nth-child(n+9) {
    display: none;
  }
  .vf-tok {
    max-width: 100%;
    flex-wrap: wrap;
    overflow-wrap: anywhere;
  }
  .vf-tok__op {
    overflow-wrap: anywhere;
  }
  .vf-tok[data-pop]::after {
    display: none;
  }
}

/* =================================================================
   9. COMPILER TRAJECTORY SCRUBBER
   ================================================================= */
.scrubber {
  border: 1px solid var(--line-1);
  background: linear-gradient(180deg, var(--bg-2), var(--bg-1));
  padding: 0;
  position: relative;
}
.scrubber__bar {
  padding: 14px 22px;
  border-bottom: 1px solid var(--line);
  display: flex; justify-content: space-between; align-items: center;
  font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--fg-3);
}
.scrubber__stage-num { color: var(--gold); }

.scrubber__viewport {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--line);
  min-height: 360px;
}
.scrubber__viz, .scrubber__notes {
  background: var(--bg-1);
  padding: 28px;
  position: relative;
  overflow: hidden;
}
.scrubber__viz { display: flex; align-items: center; justify-content: center; }
.scrubber__notes h3 {
  font-family: var(--serif);
  font-size: 1.55rem;
  line-height: 1.05;
  letter-spacing: -0.014em;
  color: var(--fg-0);
  margin-bottom: 14px;
}
.scrubber__notes h3 em { color: var(--gold); font-style: italic; }
.scrubber__notes p { color: var(--fg-1); font-size: 0.95rem; line-height: 1.55; max-width: 50ch; }
.scrubber__notes .ops {
  margin-top: 18px;
  display: grid; grid-template-columns: 1fr 1fr; gap: 6px;
  font-family: var(--mono);
  font-size: 10.5px;
}
.scrubber__notes .ops > span { color: var(--fg-2); padding: 4px 0; border-bottom: 1px dashed var(--line); }
.scrubber__notes .ops > span::before { content: "› "; color: var(--gold); }

/* viz states */
.scrubber__doc {
  width: 220px; height: 280px;
  background: var(--bg-0);
  border: 1px solid var(--line-1);
  position: relative;
  font-family: var(--mono);
  font-size: 9.5px;
  color: var(--fg-3);
  line-height: 1.6;
  padding: 14px 16px;
  overflow: hidden;
  transition: all var(--motion);
}
.scrubber__doc::before {
  content: "10-K · ABC Corp · FY2025";
  display: block;
  font-size: 8.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 10px;
  border-bottom: 1px dashed var(--line);
  padding-bottom: 6px;
}
/* fake doc text */
.scrubber__doc-lines span {
  display: block;
  height: 6px; margin-bottom: 5px;
  background: var(--line-1);
  border-radius: 2px;
  transition: all var(--motion);
}
.scrubber__doc-lines span:nth-child(2) { width: 80%; }
.scrubber__doc-lines span:nth-child(3) { width: 60%; }
.scrubber__doc-lines span:nth-child(4) { width: 90%; }
.scrubber__doc-lines span:nth-child(5) { width: 70%; }
.scrubber__doc-lines span:nth-child(6) { width: 50%; }
.scrubber__doc-lines span:nth-child(7) { width: 85%; }
.scrubber__doc-lines span:nth-child(8) { width: 65%; }
.scrubber__doc-lines span:nth-child(9) { width: 75%; }
.scrubber__doc-lines span:nth-child(10) { width: 55%; }

/* stage 02 — AST: lines color into typed sections */
.scrubber[data-stage="2"] .scrubber__doc-lines span:nth-child(odd) { background: rgba(94,204,199,0.5); }
.scrubber[data-stage="2"] .scrubber__doc-lines span:nth-child(even) { background: rgba(212,172,107,0.5); }

/* stage 03 — Canonical: lines fade and a single typed object box overlays */
.scrubber[data-stage="3"] .scrubber__doc-lines span { opacity: 0.18; }
.scrubber[data-stage="3"] .scrubber__doc::after {
  content: "{ entity: ABC, period: FY2025, concept: Revenue, value: 10.4B, unit: USD }";
  position: absolute; left: 16px; right: 16px; top: 50%;
  transform: translateY(-50%);
  padding: 14px;
  background: rgba(7,9,13,0.95);
  border: 1px solid var(--gold);
  color: var(--fg-0);
  font-family: var(--mono);
  font-size: 10px;
  line-height: 1.55;
}

/* stage 04 — Constrain: gold check marks */
.scrubber[data-stage="4"] .scrubber__doc-lines span { opacity: 0.18; }
.scrubber[data-stage="4"] .scrubber__doc::after {
  content: "✓ A = L + E\A ✓ GP = Rev − COGS\A ✓ segments roll to total\A ✓ period × unit aligned";
  white-space: pre;
  position: absolute; left: 16px; right: 16px; top: 50%;
  transform: translateY(-50%);
  padding: 14px;
  background: rgba(7,9,13,0.95);
  border: 1px solid var(--moss);
  color: var(--moss);
  font-family: var(--mono);
  font-size: 10.5px;
  line-height: 1.7;
}

/* stage 05 — Infer: amber candidate boxes */
.scrubber[data-stage="5"] .scrubber__doc-lines span { opacity: 0.18; }
.scrubber[data-stage="5"] .scrubber__doc::after {
  content: "candidate · sponsor relationship\Acandidate · acquisition target\Acandidate · stance shift\Acandidate · new covenant";
  white-space: pre;
  position: absolute; left: 16px; right: 16px; top: 50%;
  transform: translateY(-50%);
  padding: 14px;
  background: rgba(7,9,13,0.95);
  border: 1px solid var(--amber);
  color: var(--amber);
  font-family: var(--mono);
  font-size: 10.5px;
  line-height: 1.7;
}

/* stage 06 — Believe: full claim card snaps in */
.scrubber[data-stage="6"] .scrubber__doc-lines { display: none; }

/* stage 07 — Emit: emit fan */
.scrubber[data-stage="7"] .scrubber__doc-lines span { opacity: 0.18; }
.scrubber[data-stage="7"] .scrubber__doc::after {
  content: "→ API · /facts\A→ MCP · belief.search\A→ Cockpit panel\A→ Alert · stale\A→ Memo regen";
  white-space: pre;
  position: absolute; left: 16px; right: 16px; top: 50%;
  transform: translateY(-50%);
  padding: 14px;
  background: rgba(7,9,13,0.95);
  border: 1px solid var(--cyan);
  color: var(--cyan);
  font-family: var(--mono);
  font-size: 10.5px;
  line-height: 1.7;
}

/* stage 08 — Act */
.scrubber[data-stage="8"] .scrubber__doc-lines span { opacity: 0.18; }
.scrubber[data-stage="8"] .scrubber__doc::after {
  content: "agent.workflow.run()\A→ agent task #2031\A→ analyst review queued\A→ projection updated";
  white-space: pre;
  position: absolute; left: 16px; right: 16px; top: 50%;
  transform: translateY(-50%);
  padding: 14px;
  background: rgba(7,9,13,0.95);
  border: 1px solid var(--gold);
  color: var(--gold);
  font-family: var(--mono);
  font-size: 10.5px;
  line-height: 1.7;
}

/* the slider itself */
.scrubber__slider {
  display: flex; align-items: center; gap: 18px;
  padding: 18px 22px;
  border-top: 1px solid var(--line);
  background: var(--bg-1);
}
.scrubber__slider input[type="range"] {
  flex: 1;
  -webkit-appearance: none;
  appearance: none;
  height: 2px;
  background: linear-gradient(90deg, var(--gold) var(--scrub, 12.5%), var(--line-2) var(--scrub, 12.5%));
  outline: none;
  cursor: pointer;
}
.scrubber__slider input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 14px; height: 14px;
  background: var(--gold);
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 0 0 4px rgba(212,172,107,0.20);
}
.scrubber__slider input[type="range"]::-moz-range-thumb {
  width: 14px; height: 14px;
  background: var(--gold);
  border: 0;
  border-radius: 50%;
  cursor: pointer;
}
.scrubber__steps {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 1px;
  background: var(--line-1);
  border-top: 1px solid var(--line-1);
}
.scrubber__step {
  background: var(--bg-1);
  padding: 10px 8px;
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg-3);
  cursor: pointer;
  text-align: center;
  transition: all var(--motion-fast);
}
.scrubber__step:hover { background: var(--bg-2); color: var(--fg-1); }
.scrubber__step.active {
  background: rgba(212,172,107,0.10);
  color: var(--gold);
}
@media (max-width: 720px) {
  .scrubber,
  .scrubber * {
    min-width: 0;
    max-width: 100%;
  }
  .scrubber__bar,
  .scrubber__viewport {
    grid-template-columns: 1fr;
  }
  .scrubber__bar {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }
  .scrubber__viz,
  .scrubber__notes {
    padding: 22px 18px;
  }
  .scrubber__steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .scrubber__step {
    overflow-wrap: anywhere;
  }
}

/* =================================================================
   10. LIVE WORKFLOW CONSOLE — counters tick, exceptions route
   ================================================================= */
.console--live .inspector-row .v.live::after {
  content: "";
  display: inline-block;
  width: 5px; height: 5px;
  background: var(--cyan);
  border-radius: 50%;
  margin-left: 8px;
  animation: live-blink 1.2s ease-in-out infinite;
}
@keyframes live-blink { 0%,100% { opacity: 1; } 50% { opacity: 0.3; } }

.console--live .source-list li {
  position: relative;
  overflow: hidden;
}
.console--live .source-list li::before {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0;
  height: 1px; background: var(--cyan);
  transform: translateX(-100%);
  animation: live-pulse-line 4.2s linear infinite;
}
.console--live .source-list li:nth-child(2)::before { animation-delay: 0.6s; }
.console--live .source-list li:nth-child(3)::before { animation-delay: 1.2s; }
.console--live .source-list li:nth-child(4)::before { animation-delay: 1.8s; }
.console--live .source-list li:nth-child(5)::before { animation-delay: 2.4s; }
.console--live .source-list li:nth-child(6)::before { animation-delay: 3.0s; }
@keyframes live-pulse-line {
  0%   { transform: translateX(-100%); opacity: 0; }
  10%  { opacity: 1; }
  60%  { transform: translateX(0); opacity: 0.6; }
  100% { transform: translateX(120%); opacity: 0; }
}

/* sticky CTA bar */
.sticky-cta {
  position: fixed; right: 18px; bottom: 18px;
  z-index: 70;
  display: inline-flex; align-items: center; gap: 10px;
  padding: 12px 18px;
  background: var(--gold);
  color: var(--bg-0);
  font-family: var(--sans);
  font-weight: 580;
  font-size: 0.92rem;
  text-decoration: none;
  box-shadow: 0 18px 48px rgba(0,0,0,0.55);
  transform: translateY(140%);
  transition: transform var(--motion);
}
.sticky-cta.visible { transform: translateY(0); }
.sticky-cta:hover { background: #ecc079; }
.sticky-cta .arrow { transition: transform var(--motion-fast); }
.sticky-cta:hover .arrow { transform: translateX(3px); }
@media (max-width: 760px) {
  .sticky-cta {
    display: none;
  }
}

/* the live-mode chip in header */
.live-chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 4px 10px;
  border: 1px solid var(--cyan);
  background: rgba(94,204,199,0.06);
  color: var(--cyan);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.live-chip::before {
  content: ""; width: 6px; height: 6px;
  background: var(--cyan); border-radius: 50%;
  box-shadow: 0 0 6px var(--cyan);
  animation: ti-pulse 1.4s ease-in-out infinite;
}

/* =================================================================
   10b. TERMINAL WINDOW chrome (claim card + stale alert)
   The hero claim card becomes a draggable, closable window.
   ================================================================= */

.hero-state {
  transition: opacity var(--motion), transform var(--motion);
}

.term-bar {
  display: flex; align-items: center; gap: 12px;
  padding: 8px 14px;
  border: 1px solid var(--line-2);
  border-bottom: 0;
  background: linear-gradient(180deg, var(--bg-3), var(--bg-2));
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
  cursor: grab;
  touch-action: none;
  user-select: none;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-3);
}
.term-bar:active, .term-bar.dragging { cursor: grabbing; }
.term-bar__dots { display: inline-flex; gap: 6px; flex: 0 0 auto; }
.term-bar__dot {
  width: 11px; height: 11px; border-radius: 50%;
  background: var(--line-2); border: 0; padding: 0; cursor: pointer;
  transition: filter var(--motion-fast), transform var(--motion-fast);
}
.term-bar__dot--close { background: #e0716b; }
.term-bar__dot--mini  { background: #d8a05a; }
.term-bar__dot--max   { background: #8aa86b; }
.term-bar__dot:hover { filter: brightness(1.2); transform: scale(1.06); }
.term-bar__dot:focus-visible { outline: 2px solid var(--fg-0); outline-offset: 2px; }
.term-bar__title { flex: 1 1 auto; text-align: center; color: var(--fg-1); font-weight: 500; pointer-events: none; }
.term-bar__title em { color: var(--gold); font-style: normal; }
.term-bar__handle {
  flex: 0 0 auto;
  width: 28px;
  height: 18px;
  opacity: 0.55;
  pointer-events: none;
  color: transparent;
  background-image: radial-gradient(var(--fg-3) 1px, transparent 1.5px);
  background-size: 6px 6px;
}

.window-movable {
  position: relative;
  transform: translate3d(var(--tx, 0px), var(--ty, 0px), 0);
  transition: box-shadow var(--motion-fast);
  contain: layout paint;
}
.window-movable.dragging {
  box-shadow: 0 36px 100px rgba(0,0,0,0.75), var(--inset);
  transition: none;
  z-index: 10;
  will-change: transform;
}
.window-movable.thrown { transition: transform 320ms cubic-bezier(0.2,0.8,0.2,1); }
.hero-window.window-movable.is-closed { display: none; }
.auto-window.is-closed {
  height: auto !important;
  min-height: 0 !important;
}
.auto-window.is-closed > :not(.term-bar) {
  display: none !important;
}
.auto-window.receipt {
  overflow: hidden;
}
.auto-window.receipt .term-bar {
  border-left: 0;
  border-right: 0;
  border-top: 0;
}
.auto-window.receipt.receipt-lit {
  border-color: rgba(94,204,199,0.48);
  box-shadow: 0 24px 64px rgba(0,0,0,0.34), 0 0 0 1px rgba(94,204,199,0.12), var(--inset);
}
.auto-window.receipt.receipt-lit pre,
.auto-window.receipt.receipt-lit code {
  color: var(--fg-0);
}

.hero-state--workspace .window-movable {
  position: absolute;
  z-index: 2;
}
.hero-window {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line-2);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.035), rgba(255,255,255,0)),
    var(--bg-1);
  box-shadow: 0 24px 80px rgba(0,0,0,0.44), var(--inset);
  overflow: hidden;
}
.hero-window::before,
.auto-window::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, transparent, rgba(94,204,199,0.035), transparent),
    repeating-linear-gradient(180deg, rgba(255,255,255,0.018) 0 1px, transparent 1px 4px);
  opacity: 0.55;
  mix-blend-mode: screen;
}
.hero-window > *,
.auto-window > * {
  position: relative;
  z-index: 1;
}
.hero-window--claim {
  left: 0;
  top: 0;
  width: var(--win-w, min(100%, 560px));
}
.hero-window--alert {
  left: 38px;
  top: 296px;
  width: var(--win-w, min(calc(100% - 38px), 540px));
}
.hero-window--alert .stale-alert {
  margin-top: 0;
}
.hero-window > .claim-card,
.hero-window > .stale-alert {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  border: 0;
  box-shadow: none;
}
.hero-window > .claim-card {
  background: linear-gradient(180deg, rgba(17,22,30,0.96), rgba(11,15,21,0.98));
}

.term-resize {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 24px;
  height: 24px;
  border: 0;
  background: transparent;
  cursor: nwse-resize;
  touch-action: none;
}
.term-resize::before {
  content: "";
  position: absolute;
  right: 6px;
  bottom: 6px;
  width: 10px;
  height: 10px;
  border-right: 1px solid rgba(212,172,107,0.78);
  border-bottom: 1px solid rgba(212,172,107,0.78);
}
.term-resize:focus-visible {
  outline: 2px solid var(--fg-0);
  outline-offset: -2px;
}

.hero-state .term-restore { display: none; }
.hero-state.closed > .term-bar,
.hero-state.closed > .claim-card { display: none; }
.hero-state.closed .term-restore { display: inline-flex; }

.term-restore {
  align-self: flex-start;
  display: inline-flex; align-items: center; gap: 10px;
  padding: 9px 14px;
  border: 1px solid var(--line-2);
  background: rgba(255,255,255,0.02);
  font-family: var(--mono);
  font-size: 10.5px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--fg-2);
  cursor: pointer;
  margin-bottom: 12px;
  transition: all var(--motion-fast);
}
.term-restore:hover { border-color: var(--gold); color: var(--gold); }
.term-restore.is-visible { display: inline-flex; }
.term-restore .reopen-dot { width: 9px; height: 9px; background: #e0716b; border-radius: 50%; }

.term-bar::after {
  content: "drag";
  font-size: 9px; letter-spacing: 0.18em;
  color: var(--fg-3); opacity: 0;
  transition: opacity var(--motion-fast);
  margin-left: 8px; flex: 0 0 auto;
}
.term-bar:hover::after { opacity: 0.6; }

.auto-window {
  overflow: hidden;
  box-shadow: 0 16px 54px rgba(0,0,0,0.30), var(--inset);
  border-color: var(--line-2);
}
.auto-window:hover {
  border-color: rgba(212,172,107,0.52);
}
.auto-window .term-bar {
  margin: -1px -1px 0;
}
.claim-card.auto-window,
.stale-alert.auto-window,
.console.auto-window {
  background:
    linear-gradient(180deg, rgba(255,255,255,0.028), rgba(255,255,255,0)),
    var(--bg-1);
}
.console.auto-window {
  display: grid;
}
.claim-card.auto-window .claim-card__head,
.stale-alert.auto-window .stale-alert__head {
  border-top: 1px solid var(--line);
}

.claim-card__status {
  position: relative;
  overflow: hidden;
  background: rgba(138,168,107,0.055);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.025), 0 0 0 rgba(138,168,107,0);
  transition: box-shadow var(--motion-fast), background var(--motion-fast), transform var(--motion-fast);
}
.claim-card__status::after {
  content: "";
  position: absolute;
  inset: -2px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.16), transparent);
  transform: translateX(-120%);
  transition: transform 520ms cubic-bezier(0.2,0.8,0.2,1);
}
.claim-card__status:hover,
.claim-card__status.status-pulse {
  background: rgba(138,168,107,0.11);
  box-shadow: 0 0 24px rgba(138,168,107,0.22), inset 0 0 0 1px rgba(138,168,107,0.26);
  transform: translate3d(1px, 0, 0);
}
.claim-card__status:hover::after,
.claim-card__status.status-pulse::after {
  transform: translateX(120%);
}

.capability-strip > div {
  position: relative;
  cursor: pointer;
  overflow: hidden;
}
.capability-secret {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  margin-top: 0;
  border-top: 0 solid transparent;
  color: var(--cyan);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  line-height: 1.45;
  transition: max-height var(--motion), opacity var(--motion), margin-top var(--motion), border-color var(--motion);
}
.capability-strip > div.active .capability-secret {
  max-height: 52px;
  opacity: 1;
  margin-top: 12px;
  border-top: 1px solid rgba(94,204,199,0.22);
  padding-top: 9px;
}

.console--live .workflow-step,
.console--live .source-list li,
.console--live .inspector-row,
.console--live .mono-tag {
  cursor: pointer;
}
.console--live .workflow-step {
  touch-action: none;
}
.console--live .workflow-step::after {
  content: "drag";
  position: absolute;
  right: 8px;
  top: 6px;
  color: var(--fg-3);
  font-size: 8px;
  letter-spacing: 0.16em;
  opacity: 0;
  transition: opacity var(--motion-fast);
}
.console--live .workflow-step:hover::after,
.console--live .workflow-step.dragging-node::after {
  opacity: 0.65;
}
.console--live .workflow-step.dragging-node {
  z-index: 6;
  cursor: grabbing;
  box-shadow: 0 24px 54px rgba(0,0,0,0.52), 0 0 0 1px rgba(212,172,107,0.38);
}
.console--live.inspecting .workflow-step:not(.active),
.console--live.inspecting .source-list li:not(.active),
.console--live.inspecting .inspector-row:not(.active) {
  opacity: 0.42;
}
.console--live .workflow-step.active,
.console--live .source-list li.active,
.console--live .inspector-row.active {
  border-color: rgba(212,172,107,0.62);
  background: rgba(212,172,107,0.08);
  color: var(--fg-0);
  box-shadow: 0 0 28px rgba(212,172,107,0.08);
}
.console--live .workflow-paths path {
  transition: stroke-width var(--motion-fast), opacity var(--motion-fast), stroke var(--motion-fast);
}
.console--live.inspecting .workflow-paths path { opacity: 0.16; }
.console--live.inspecting .workflow-paths path.active-path {
  opacity: 1;
  stroke: var(--gold);
  stroke-width: 2;
  filter: drop-shadow(0 0 6px rgba(212,172,107,0.28));
}
.console-easter {
  position: absolute;
  right: 18px;
  bottom: 14px;
  z-index: 4;
  opacity: 0;
  transform: translateY(8px);
  border: 1px solid rgba(212,172,107,0.38);
  background: rgba(7,9,13,0.88);
  color: var(--gold);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  padding: 8px 10px;
  pointer-events: none;
  transition: opacity var(--motion), transform var(--motion);
}
.console-easter.visible {
  opacity: 1;
  transform: translateY(0);
}

.fieldset li {
  position: relative;
  cursor: pointer;
  padding-inline: 10px;
  transition: background-color var(--motion-fast), border-color var(--motion-fast), color var(--motion-fast), transform var(--motion-fast);
}
.fieldset li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: var(--line-2);
  transition: background-color var(--motion-fast), box-shadow var(--motion-fast);
}
.fieldset li:hover,
.fieldset li.active {
  background: rgba(212,172,107,0.04);
  border-bottom-color: rgba(212,172,107,0.30);
  transform: translate3d(2px, 0, 0);
}
.fieldset li:hover::before,
.fieldset li.active::before {
  background: var(--gold);
  box-shadow: 0 0 14px rgba(212,172,107,0.24);
}
.fieldset .label {
  transition: color var(--motion-fast);
}
.fieldset li:hover .label,
.fieldset li.active .label {
  color: var(--gold);
}

/* =================================================================
   10c. GLOBAL COMPONENT LAYER — all card grids get inspection state
   ================================================================= */
.matrix--interactive {
  position: relative;
  isolation: isolate;
}
.matrix--interactive .inspectable-card {
  position: relative;
  overflow: hidden;
  cursor: pointer;
  transition:
    opacity var(--motion-fast),
    transform var(--motion-fast),
    border-color var(--motion-fast),
    background-color var(--motion-fast),
    box-shadow var(--motion-fast);
}
.matrix--interactive .inspectable-card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(360px 160px at var(--mx, 35%) var(--my, 16%), rgba(212,172,107,0.075), transparent 64%),
    linear-gradient(90deg, rgba(94,204,199,0.12), transparent 2px);
  opacity: 0;
  transition: opacity var(--motion-fast);
}
.matrix--interactive .inspectable-card::after {
  content: "";
  position: absolute;
  right: 18px;
  top: 18px;
  width: 16px;
  height: 16px;
  border-top: 1px solid rgba(94,204,199,0.62);
  border-right: 1px solid rgba(94,204,199,0.62);
  opacity: 0;
  transform: translate(-4px, 4px);
  transition: opacity var(--motion-fast), transform var(--motion-fast);
}
.matrix--interactive .inspectable-card:hover,
.matrix--interactive .inspectable-card:focus-visible,
.matrix--interactive .inspectable-card.active {
  transform: translate3d(0, -3px, 0);
  border-color: rgba(212,172,107,0.46);
  background-color: rgba(255,255,255,0.025);
  box-shadow: 0 18px 42px rgba(0,0,0,0.25), inset 0 0 0 1px rgba(212,172,107,0.08);
  outline: none;
}
.matrix--interactive .inspectable-card:hover::before,
.matrix--interactive .inspectable-card:focus-visible::before,
.matrix--interactive .inspectable-card.active::before,
.matrix--interactive .inspectable-card.route-pulse::before {
  opacity: 1;
}
.matrix--interactive .inspectable-card:hover::after,
.matrix--interactive .inspectable-card.active::after,
.matrix--interactive .inspectable-card.route-pulse::after {
  opacity: 1;
  transform: translate(0, 0);
}
.matrix--interactive:has(.inspectable-card:hover) .inspectable-card:not(:hover):not(.active) {
  opacity: 0.55;
}
.matrix--interactive .inspectable-card.route-pulse {
  animation: card-route-pulse 700ms ease;
}
@keyframes card-route-pulse {
  0% { box-shadow: 0 0 0 rgba(94,204,199,0); }
  35% { box-shadow: 0 0 0 1px rgba(94,204,199,0.5), 0 0 34px rgba(94,204,199,0.16); }
  100% { box-shadow: 0 0 0 rgba(94,204,199,0); }
}

.reactive-panel {
  position: relative;
  transition:
    opacity var(--motion-fast),
    transform var(--motion-fast),
    border-color var(--motion-fast),
    box-shadow var(--motion-fast),
    max-height 240ms ease;
}
.reactive-panel::after {
  content: "inspect";
  position: absolute;
  right: 12px;
  top: 10px;
  z-index: 2;
  font-family: var(--mono);
  font-size: 8.5px;
  line-height: 1;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--fg-3);
  opacity: 0;
  transform: translateY(-3px);
  transition: opacity var(--motion-fast), transform var(--motion-fast), color var(--motion-fast);
  pointer-events: none;
}
.reactive-panel:hover,
.reactive-panel:focus-visible,
.reactive-panel.is-focused {
  border-color: rgba(94,204,199,0.42);
  box-shadow: 0 20px 54px rgba(0,0,0,0.28), 0 0 0 1px rgba(94,204,199,0.08);
  outline: none;
}
.reactive-panel:hover::after,
.reactive-panel:focus-visible::after,
.reactive-panel.is-focused::after {
  opacity: 1;
  transform: translateY(0);
}
.reactive-panel.is-focused::after {
  content: "selected";
  color: var(--cyan);
}
.reactive-panel.is-collapsed {
  max-height: 74px;
  overflow: hidden;
}
.reactive-panel.is-collapsed::after {
  content: "collapsed";
  opacity: 1;
  color: var(--gold);
}

.matrix-trace {
  display: grid;
  grid-template-columns: minmax(240px, 0.72fr) minmax(280px, 1fr);
  gap: 24px;
  align-items: center;
  contain: layout paint;
  border: 1px solid var(--line-1);
  border-top: 0;
  padding: 18px 22px;
  background:
    linear-gradient(180deg, rgba(212,172,107,0.04), rgba(94,204,199,0.025)),
    rgba(7,10,14,0.42);
  opacity: 0.94;
  transition: border-color var(--motion-fast), background-color var(--motion-fast), box-shadow var(--motion-fast);
}
.matrix-trace.pulse {
  border-color: rgba(94,204,199,0.50);
  box-shadow: 0 0 34px rgba(94,204,199,0.08);
}
.matrix-trace__rail {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.matrix-trace__rail span {
  position: relative;
  height: 1px;
  background: var(--line-2);
}
.matrix-trace__rail span::before {
  content: "";
  position: absolute;
  left: 0;
  top: -4px;
  width: 9px;
  height: 9px;
  border: 1px solid var(--line-2);
  background: var(--bg-0);
}
.matrix-trace__rail span.active {
  background: var(--cyan);
  box-shadow: 0 0 16px rgba(94,204,199,0.22);
}
.matrix-trace__rail span.active::before {
  border-color: var(--cyan);
  background: rgba(94,204,199,0.18);
}
.matrix-trace__copy {
  display: grid;
  gap: 7px;
}
.matrix-trace__k {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--fg-3);
}
.matrix-trace strong {
  color: var(--fg-0);
  font-size: 15px;
}
.matrix-trace p {
  color: var(--fg-2);
  line-height: 1.55;
}
.matrix-trace__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 3px;
}
.matrix-trace__chips span {
  border: 1px solid rgba(212,172,107,0.30);
  color: var(--gold);
  padding: 4px 7px;
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  background: rgba(212,172,107,0.035);
}

.proof:not(.capability-strip) > div {
  position: relative;
  cursor: pointer;
  overflow: hidden;
}
.proof:not(.capability-strip) > div::after {
  content: "";
  position: absolute;
  inset: auto 14px 13px 14px;
  height: 1px;
  background: var(--cyan);
  opacity: 0;
  transform: scaleX(0.2);
  transform-origin: left;
  transition: opacity var(--motion-fast), transform var(--motion-fast);
}
.proof:not(.capability-strip) > div:hover::after,
.proof:not(.capability-strip) > div.active::after {
  opacity: 0.85;
  transform: scaleX(1);
}
.proof:not(.capability-strip) > div.active {
  border-color: rgba(94,204,199,0.44);
  background: rgba(94,204,199,0.035);
}

.surface-object {
  position: relative;
  overflow: hidden;
  contain: layout paint;
  transition:
    opacity var(--motion-fast),
    transform var(--motion-fast),
    border-color var(--motion-fast),
    background-color var(--motion-fast),
    box-shadow var(--motion-fast);
}
.surface-object::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(360px 180px at var(--mx, 50%) var(--my, 12%), rgba(94,204,199,0.075), transparent 68%),
    linear-gradient(90deg, rgba(212,172,107,0.16), transparent 2px);
  opacity: 0;
  transition: opacity var(--motion-fast);
}
.surface-object > * {
  position: relative;
  z-index: 1;
}
.surface-object:hover,
.surface-object:focus-visible,
.surface-object.active {
  transform: translate3d(0, -3px, 0);
  border-color: rgba(94,204,199,0.38) !important;
  background-color: rgba(255,255,255,0.026) !important;
  box-shadow: 0 18px 48px rgba(0,0,0,0.24), inset 0 0 0 1px rgba(94,204,199,0.08);
  outline: none;
}
.surface-object:hover::before,
.surface-object:focus-visible::before,
.surface-object.active::before,
.surface-object.route-pulse::before {
  opacity: 1;
}
.artifact-card.is-filtered-out {
  opacity: 0.18;
  transform: scale(0.985);
  pointer-events: none;
}
.filters .badge {
  transition: color var(--motion-fast), border-color var(--motion-fast), background-color var(--motion-fast), transform var(--motion-fast);
}
.filters .badge:hover,
.filters .badge:focus-visible,
.filters .badge.on {
  color: var(--gold);
  border-color: var(--gold);
  background: rgba(212,172,107,0.06);
  transform: translateY(-1px);
  outline: none;
}
.uc {
  transition: border-color var(--motion-fast), box-shadow var(--motion-fast), transform var(--motion-fast);
}
.uc.active {
  border-color: rgba(94,204,199,0.40);
  box-shadow: 0 20px 56px rgba(0,0,0,0.24), inset 0 0 0 1px rgba(94,204,199,0.08);
}
.uc__cell {
  position: relative;
  transition: background-color var(--motion-fast), color var(--motion-fast);
}
.uc__cell::after {
  content: "";
  position: absolute;
  left: 24px;
  right: 24px;
  bottom: 14px;
  height: 1px;
  background: var(--cyan);
  opacity: 0;
  transform: scaleX(0.2);
  transform-origin: left;
  transition: opacity var(--motion-fast), transform var(--motion-fast);
}
.uc__cell.path-active {
  background: rgba(94,204,199,0.04);
}
.uc__cell.path-active::after {
  opacity: 0.85;
  transform: scaleX(1);
}
.uc__cell li {
  cursor: pointer;
  transition: color var(--motion-fast), transform var(--motion-fast);
}
.uc__cell li:hover,
.uc__cell li:focus-visible,
.uc__cell li.active {
  color: var(--fg-0);
  transform: translateX(3px);
  outline: none;
}
.uc__cell li.active::before {
  color: var(--cyan);
  text-shadow: 0 0 12px rgba(94,204,199,0.5);
}

/* =================================================================
   10d. COMMERCIAL SURFACES — click a surface, trace the substrate
   ================================================================= */
.surface-matrix {
  position: relative;
  isolation: isolate;
}
.surface-matrix .surface-card {
  position: relative;
  min-height: 204px;
  cursor: pointer;
  overflow: hidden;
  transition:
    background-color var(--motion-fast),
    border-color var(--motion-fast),
    transform var(--motion-fast),
    box-shadow var(--motion-fast),
    opacity var(--motion-fast);
}
.surface-matrix .surface-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 22px;
  bottom: 22px;
  width: 2px;
  background: var(--line-2);
  opacity: 0;
  transition: opacity var(--motion-fast), background-color var(--motion-fast), box-shadow var(--motion-fast);
}
.surface-matrix .surface-card::after {
  content: "inspect";
  position: absolute;
  right: 24px;
  top: 24px;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--cyan);
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity var(--motion-fast), transform var(--motion-fast);
}
.surface-matrix .surface-card:hover,
.surface-matrix .surface-card:focus-visible,
.surface-matrix .surface-card.active {
  background:
    radial-gradient(420px 170px at var(--mx, 50%) var(--my, 0%), rgba(94,204,199,0.08), transparent 62%),
    rgba(255,255,255,0.025);
  border-color: rgba(94,204,199,0.38);
  transform: translate3d(0, -3px, 0);
  box-shadow: 0 20px 48px rgba(0,0,0,0.28), inset 0 0 0 1px rgba(94,204,199,0.08);
  outline: none;
}
.surface-matrix .surface-card:hover::before,
.surface-matrix .surface-card:focus-visible::before,
.surface-matrix .surface-card.active::before {
  opacity: 1;
  background: var(--cyan);
  box-shadow: 0 0 20px rgba(94,204,199,0.36);
}
.surface-matrix .surface-card:hover::after,
.surface-matrix .surface-card.active::after {
  opacity: 0.72;
  transform: translateY(0);
}
.surface-matrix:has(.surface-card:hover) .surface-card:not(:hover):not(.active) {
  opacity: 0.56;
}
.surface-matrix .surface-card.active .card__num,
.surface-matrix .surface-card:hover .card__num {
  color: var(--cyan);
}

.surface-console {
  contain: layout paint;
  border: 1px solid rgba(94,204,199,0.30);
  border-top: 0;
  background:
    linear-gradient(180deg, rgba(94,204,199,0.045), rgba(212,172,107,0.025)),
    rgba(7,10,14,0.64);
  box-shadow: var(--inset);
  overflow: hidden;
}
.surface-console__bar {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 11px 22px;
  border-bottom: 1px solid var(--line-1);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--fg-1);
}
.surface-console__bar span:last-child {
  color: var(--cyan);
}
.surface-console__body {
  display: grid;
  grid-template-columns: minmax(360px, 1.05fr) minmax(260px, 0.95fr);
  gap: 28px;
  padding: 24px 22px 26px;
}
.surface-console__graph {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  align-items: center;
  gap: 14px;
}
.surface-console__graph span {
  position: relative;
  display: grid;
  min-height: 58px;
  place-items: center;
  border: 1px solid var(--line-1);
  background: rgba(255,255,255,0.018);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg-2);
  transition: color var(--motion-fast), border-color var(--motion-fast), background-color var(--motion-fast), opacity var(--motion-fast), transform var(--motion-fast);
}
.surface-console__graph span:not(:last-child)::after {
  content: "";
  position: absolute;
  left: calc(100% + 1px);
  top: 50%;
  width: 14px;
  height: 1px;
  background: var(--line-2);
}
.surface-console__graph span.active {
  color: var(--fg-0);
  border-color: rgba(94,204,199,0.64);
  background: rgba(94,204,199,0.08);
  box-shadow: 0 0 22px rgba(94,204,199,0.10);
  transform: translateY(-2px);
}
.surface-console__graph span.active::after {
  background: var(--cyan);
  box-shadow: 0 0 14px rgba(94,204,199,0.30);
}
.surface-console__graph span.muted {
  opacity: 0.32;
}
.surface-console__copy {
  display: grid;
  align-content: center;
  gap: 16px;
}
.surface-console__copy p {
  color: var(--fg-1);
  line-height: 1.65;
}
.surface-console__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.surface-console__chips span {
  border: 1px solid var(--line-1);
  padding: 6px 9px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  background: rgba(212,172,107,0.045);
}

@media (max-width: 760px) {
  .hero-state--workspace {
    min-height: 0;
    gap: 12px;
  }
  .hero-state--workspace::before { display: none; }
  .hero-state--workspace .window-movable {
    position: relative;
    left: auto;
    top: auto;
    width: 100%;
    transform: none !important;
  }
  .term-resize { display: none; }
  .surface-console__body {
    grid-template-columns: 1fr;
  }
  .surface-console__graph {
    grid-template-columns: 1fr;
  }
  .surface-console__graph span:not(:last-child)::after {
    left: 50%;
    top: 100%;
    width: 1px;
    height: 14px;
  }
  .matrix-trace {
    grid-template-columns: 1fr;
  }
  .matrix-trace__rail {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* =================================================================
   10c. PIPELINE EXPLORER — hover/click any stage for detail panel
   ================================================================= */
.pipeline-explorer { display: flex; flex-direction: column; gap: 0; }

.pipeline--interactive .pipeline__step {
  cursor: pointer;
  transition: all var(--motion-fast);
}
.pipeline--interactive .pipeline__step:hover,
.pipeline--interactive .pipeline__step.active {
  background: rgba(212,172,107,0.08);
  transform: translateY(-2px);
  box-shadow: 0 12px 24px rgba(0,0,0,0.3);
  z-index: 2;
}
.pipeline--interactive .pipeline__step.active .n,
.pipeline--interactive .pipeline__step:hover .n { color: var(--gold); }

.pipeline--interactive.dimmed .pipeline__step:not(.active):not(:hover) {
  opacity: 0.45;
}

.pipeline-detail {
  border: 1px solid var(--gold);
  border-top: 0;
  background: linear-gradient(180deg, rgba(212,172,107,0.06), transparent);
  position: relative;
}
.pipeline-detail__bar {
  display: flex; justify-content: space-between; align-items: center;
  padding: 11px 22px;
  border-bottom: 1px solid var(--line);
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--gold);
}
.pipeline-detail__hint { color: var(--fg-3); font-size: 10px; letter-spacing: 0.12em; }
.pipeline-detail__grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr 1fr 1.4fr;
  gap: 1px;
  background: var(--line);
}
.pipeline-detail__col {
  background: var(--bg-1);
  padding: 18px 20px;
  display: flex; flex-direction: column; gap: 8px;
  min-height: 168px;
}
.pipeline-detail__col .pd-label {
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--fg-3);
}
.pipeline-detail__col--ops .pd-label { color: var(--gold); }
.pipeline-detail__col ul {
  list-style: none; display: flex; flex-direction: column; gap: 4px;
  font-family: var(--mono); font-size: 11.5px; color: var(--fg-1); line-height: 1.55;
}
.pipeline-detail__col li::before { content: "· "; color: var(--gold); }
.pipeline-detail__col--ops li::before { content: "✓ "; color: var(--gold); }
.pipeline-detail__col--note p {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.02rem;
  line-height: 1.45;
  color: var(--fg-1);
  letter-spacing: -0.005em;
}
.pipeline-detail__col--note .pd-label.kernel { color: var(--gold); }
.pipeline-detail__col--note .pd-label.outer  { color: var(--cyan); }

@media (max-width: 1100px) {
  .pipeline-detail__grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 700px) {
  .pipeline-detail__grid { grid-template-columns: 1fr; }
}

/* =================================================================
   11. KILLER pull animation (gold rule draws + words rise)
   ================================================================= */
.killer-pull {
  position: relative;
  overflow: hidden;
  padding: 56px 0 36px;
  border-top: 1px solid var(--gold);
}
.killer-pull::before {
  content: "";
  position: absolute; left: 0; top: -1px; height: 1px; background: var(--gold);
  width: 0;
  animation: killer-rule 1100ms cubic-bezier(0.2,0.8,0.2,1) forwards;
  animation-play-state: paused;
}
.killer-pull.in-view::before { animation-play-state: running; }
@keyframes killer-rule { to { width: 100%; } }

.killer-pull h2 {
  font-family: var(--serif);
  font-size: clamp(2rem, 4vw, 3.4rem);
  line-height: 1.04;
  letter-spacing: -0.018em;
  color: var(--fg-0);
  max-width: 28ch;
  opacity: 0; transform: translateY(20px);
  transition: opacity 800ms ease 400ms, transform 800ms cubic-bezier(0.2,0.8,0.2,1) 400ms;
}
.killer-pull.in-view h2 { opacity: 1; transform: translateY(0); }
.killer-pull h2 em { color: var(--gold); font-style: italic; }
