/* ============================================================
   SCENE 1 — THE FRAGMENTS
============================================================ */
.scene-fragments .scene__stage {
  perspective: 1400px;
}

.fragments-board {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.fragments-cursor {
  position: absolute;
  width: 14px;
  height: 20px;
  pointer-events: none;
  z-index: 30;
  filter: drop-shadow(0 2px 4px rgba(11, 18, 32, 0.25));
  transition: transform 180ms var(--ease-out);
}

.fragments-tab {
  position: absolute;
  width: 240px;
  background: white;
  border: 1px solid var(--rule);
  border-radius: 10px 10px 6px 6px;
  box-shadow: var(--shadow-2);
  overflow: hidden;
  cursor: grab;
  user-select: none;
  transition: box-shadow var(--dur-fast) var(--ease-out), transform 120ms var(--ease-out);
  will-change: transform;
}

@media (max-width: 600px) {
  .fragments-tab { width: 180px; }
  .fragments-tab__body { height: 76px; padding: 8px 10px; }
  .fragments-tab__title { font-size: 12px; }
  .fragments-tab__meta { font-size: 9px; }
}

.fragments-tab:hover {
  box-shadow: var(--shadow-3);
  z-index: 20 !important;
}

.fragments-tab.is-dragging {
  cursor: grabbing;
  box-shadow: var(--shadow-3);
  z-index: 25 !important;
}

.fragments-tab__bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 10px;
  background: var(--canvas-soft);
  border-bottom: 1px solid var(--rule-soft);
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--navy-deep);
}

.fragments-tab__dots {
  display: flex;
  gap: 4px;
}

.fragments-tab__dots span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--rule);
}

.fragments-tab__url {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  opacity: 0.55;
}

.fragments-tab__body {
  height: 92px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  position: relative;
}

.fragments-tab__title {
  font-size: 13px;
  font-weight: 600;
  color: var(--navy-brand);
  letter-spacing: -0.005em;
}

.fragments-tab__meta {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--navy-deep);
  opacity: 0.55;
}

.fragments-tab__alert {
  position: absolute;
  right: 10px;
  bottom: 10px;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--warn);
  display: flex;
  align-items: center;
  gap: 4px;
}

.fragments-tab__alert::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--warn);
}

.fragments-tab.is-desaturated {
  filter: grayscale(0.9) opacity(0.4);
  transition: filter 900ms var(--ease-in-out);
}

/* ============================================================
   SCENE 2 — THE REFRAME
============================================================ */
.scene-reframe .scene__stage {
  display: flex;
  align-items: center;
  justify-content: center;
}

.reframe-hero {
  text-align: center;
  max-width: 900px;
}

.reframe-kicker {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--navy-deep);
  opacity: 0.5;
  margin-bottom: 28px;
}

.reframe-line {
  font-family: var(--font-display);
  font-size: clamp(28px, 5.4vw, 76px);
  line-height: 1.08;
  letter-spacing: -0.025em;
  color: var(--navy-brand);
}

.reframe-line .strike {
  position: relative;
  display: inline-block;
  color: var(--navy-deep);
  opacity: 0.42;
}

.reframe-line .strike::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 54%;
  height: 2px;
  background: var(--navy-deep);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 700ms var(--ease-out);
}

.reframe-line.is-struck .strike::after { transform: scaleX(1); }

.reframe-line .keep {
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  opacity: 0;
  transform: translateY(20px);
  display: inline-block;
  transition: opacity 700ms var(--ease-out) 300ms, transform 700ms var(--ease-out) 300ms;
}

.reframe-line.is-struck .keep {
  opacity: 1;
  transform: translateY(0);
}

.reframe-sub {
  margin-top: 32px;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 700ms var(--ease-out) 900ms, transform 700ms var(--ease-out) 900ms;
}

.reframe-line.is-struck ~ .reframe-sub {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================================
   SCENE 3 — THE THESIS (Control Plane)
============================================================ */
.scene-thesis .scene__stage {
  display: flex;
  align-items: center;
  justify-content: center;
}

.controlplane {
  width: min(1040px, 100%);
  background: white;
  border: 1px solid var(--rule);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-3);
  overflow: hidden;
}

.controlplane__chrome {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  border-bottom: 1px solid var(--rule-soft);
  background: var(--canvas-soft);
}

.controlplane__chromeL {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--navy-deep);
  opacity: 0.7;
}

.controlplane__chromeL img {
  width: 20px;
  height: 20px;
}

.controlplane__chromeR {
  display: flex;
  align-items: center;
  gap: 10px;
}

.controlplane__header {
  padding: 22px 28px;
  border-bottom: 1px solid var(--rule-soft);
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.controlplane__chrome {
  flex-wrap: wrap;
  gap: 10px;
}

.controlplane__chromeL {
  min-width: 0;
  flex-shrink: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.controlplane__header h3 {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 400;
  letter-spacing: -0.01em;
}

.controlplane__header-meta {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--navy-deep);
  opacity: 0.55;
  letter-spacing: 0.08em;
}

.controlplane__grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1px;
  background: var(--rule-soft);
  padding: 1px;
}

@media (max-width: 900px) {
  .controlplane__grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 600px) {
  .controlplane__grid { grid-template-columns: repeat(2, 1fr); }
  .controlplane__header { padding: 18px 18px; }
  .controlplane__header h3 { font-size: 20px; }
  .controlplane__tile { min-height: 88px; padding: 12px 12px; }
  .controlplane__tile-value { font-size: 20px; }
}

.controlplane__tile {
  position: relative;
  background: white;
  padding: 16px 18px;
  min-height: 108px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  cursor: pointer;
  transition: background var(--dur-fast) var(--ease-out);
}

.controlplane__tile:hover { background: var(--canvas-soft); }

.controlplane__tile.is-highlight {
  outline: 2px solid var(--sky-interactive);
  outline-offset: -2px;
  z-index: 2;
}

.controlplane__tile-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--navy-deep);
  opacity: 0.55;
}

.controlplane__tile-value {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 400;
  color: var(--navy-brand);
  letter-spacing: -0.01em;
}

.controlplane__tile-delta {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--success);
  display: flex;
  align-items: center;
  gap: 4px;
}

.controlplane__tile-delta.is-warn { color: var(--warn); }

.controlplane__tile-origin {
  position: absolute;
  inset: auto 10px 8px auto;
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--sky-interactive);
  opacity: 0;
  transition: opacity var(--dur-fast) var(--ease-out);
  letter-spacing: 0.06em;
}

.controlplane__tile:hover .controlplane__tile-origin { opacity: 1; }

/* ============================================================
   SCENE 4 — INGEST vs INTEGRATE
============================================================ */
.scene-ingest .scene__stage {
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 28px;
  align-items: center;
}

.ingest-toggle {
  display: flex;
  justify-content: center;
}

.ingest-toggle__track {
  display: inline-flex;
  padding: 4px;
  background: var(--canvas-soft);
  border: 1px solid var(--rule);
  border-radius: 999px;
  position: relative;
}

.ingest-toggle__thumb {
  position: absolute;
  top: 4px;
  bottom: 4px;
  width: calc(50% - 4px);
  background: white;
  border: 1px solid var(--rule);
  border-radius: 999px;
  box-shadow: var(--shadow-1);
  transition: left var(--dur-med) var(--ease-spring);
  left: 4px;
}

.ingest-toggle__track.is-right .ingest-toggle__thumb { left: calc(50% + 0px); }

.ingest-toggle__btn {
  position: relative;
  z-index: 2;
  padding: 10px 28px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--navy-deep);
  opacity: 0.55;
  transition: color var(--dur-med) var(--ease-out), opacity var(--dur-med) var(--ease-out);
}

.ingest-toggle__btn.is-active {
  color: var(--navy-brand);
  opacity: 1;
}

.ingest-stage {
  position: relative;
  height: 100%;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 40px;
  align-items: center;
  min-height: 320px;
}

@media (max-width: 820px) {
  .ingest-stage {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
    min-height: 0;
  }
  .ingest-source, .ingest-dest {
    height: auto;
    min-height: 180px;
    min-width: 0;
    width: 100%;
  }
  .ingest-flow {
    height: 60px;
    min-width: 0;
    width: 100%;
  }
  .ingest-flow svg { height: 60px; width: 100%; }
}

.ingest-source {
  height: 280px;
  background: white;
  border: 1px solid var(--rule);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-2);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.ingest-source__bar {
  padding: 10px 14px;
  background: var(--canvas-soft);
  border-bottom: 1px solid var(--rule-soft);
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--navy-deep);
  opacity: 0.7;
}

.ingest-source__body {
  flex: 1;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow: hidden;
  position: relative;
}

.ingest-doc {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid var(--rule-soft);
  border-radius: 6px;
  background: var(--canvas-white);
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--navy-deep);
  opacity: 0.82;
}

.ingest-doc__icon {
  width: 16px;
  height: 16px;
  border-radius: 3px;
  background: var(--sky-interactive);
  opacity: 0.5;
  flex-shrink: 0;
}

.ingest-flow {
  position: relative;
  height: 280px;
  width: 100%;
}

.ingest-flow svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}

.ingest-dest {
  height: 280px;
  padding: 20px;
  background: linear-gradient(180deg, var(--canvas-white) 0%, var(--canvas-soft) 100%);
  border: 1px solid var(--rule);
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: var(--shadow-2);
}

.ingest-dest__label {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--navy-deep);
  opacity: 0.55;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.ingest-dest__value {
  font-family: var(--font-display);
  font-size: 42px;
  color: var(--navy-brand);
  letter-spacing: -0.02em;
  line-height: 1;
}

.ingest-dest__unit {
  font-size: 13px;
  font-family: var(--font-sans);
  color: var(--navy-deep);
  opacity: 0.65;
  margin-top: 4px;
}

.ingest-caption {
  text-align: center;
  font-size: 14px;
  color: var(--navy-deep);
  opacity: 0.7;
  max-width: 640px;
  margin: 0 auto;
  min-height: 48px;
}

/* ============================================================
   SCENE 5 — THE DATA ROOM
============================================================ */
.scene-dataroom .scene__stage {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 32px;
}

@media (max-width: 960px) {
  .scene-dataroom .scene__stage {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 600px) {
  .vault { min-height: 340px; }
  .vault__counter { font-size: 52px; }
  .vault-stats {
    grid-template-columns: 1fr 1fr;
    gap: 10px 20px;
    left: 24px;
    right: 24px;
    bottom: 18px;
  }
  .vault-stat__n { font-size: 18px; }
}

.vault {
  position: relative;
  background: var(--gradient-brand);
  border-radius: var(--radius-lg);
  overflow: hidden;
  min-height: 440px;
  box-shadow: var(--shadow-3);
}

.vault::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 30% 30%, rgba(255, 255, 255, 0.12), transparent 55%);
  pointer-events: none;
}

.vault__label {
  position: absolute;
  top: 20px;
  left: 24px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.8);
  z-index: 3;
}

.vault__counter {
  position: absolute;
  top: 52px;
  left: 24px;
  font-family: var(--font-display);
  font-size: 72px;
  color: white;
  letter-spacing: -0.03em;
  line-height: 1;
  z-index: 3;
}

.vault__counter-unit {
  font-family: var(--font-sans);
  font-size: 13px;
  color: rgba(255, 255, 255, 0.75);
  margin-top: 6px;
  letter-spacing: 0.05em;
}

.vault__stream {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
}

.vault__doc {
  position: absolute;
  width: 34px;
  height: 44px;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 3px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
  font-family: var(--font-mono);
  font-size: 7px;
  color: var(--navy-brand);
  padding: 4px 3px;
  overflow: hidden;
  line-height: 1.2;
}

.vault__doc::before,
.vault__doc::after {
  content: "";
  display: block;
  height: 1px;
  background: var(--rule);
  margin: 2px 0;
}

.vault-stats {
  position: absolute;
  bottom: 20px;
  right: 24px;
  display: grid;
  grid-template-columns: repeat(2, auto);
  gap: 14px 28px;
  z-index: 3;
}

.vault-stat {
  display: flex;
  flex-direction: column;
  color: rgba(255, 255, 255, 0.88);
  font-family: var(--font-mono);
}

.vault-stat__n {
  font-family: var(--font-display);
  font-size: 22px;
  color: white;
  letter-spacing: -0.01em;
}

.vault-stat__l {
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0.7;
}

.vault-classes {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.vault-classes__title {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--navy-deep);
  opacity: 0.6;
  margin-bottom: 4px;
}

.vault-class {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  background: white;
  border: 1px solid var(--rule);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: border-color var(--dur-fast) var(--ease-out), transform var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out);
}

.vault-class:hover {
  border-color: var(--sky-interactive);
  transform: translateX(2px);
  box-shadow: var(--shadow-hover);
}

.vault-class__name {
  font-size: 13px;
  font-weight: 500;
  color: var(--navy-brand);
}

.vault-class__count {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--navy-deep);
  opacity: 0.6;
}

/* ============================================================
   SCENE 6 — CONTEXTUALISATION
============================================================ */
.scene-context .scene__stage {
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  gap: 32px;
  align-items: stretch;
  min-height: 440px;
}

@media (max-width: 900px) {
  .scene-context .scene__stage {
    grid-template-columns: minmax(0, 1fr);
    min-height: 0;
  }
  .context-graph { min-height: 320px; }
}

.context-doc {
  background: white;
  border: 1px solid var(--rule);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-2);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.context-doc__header {
  padding: 14px 16px;
  border-bottom: 1px solid var(--rule-soft);
  background: var(--canvas-soft);
}

.context-doc__form {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--blue-primary);
}

.context-doc__name {
  font-size: 14px;
  font-weight: 600;
  color: var(--navy-brand);
  margin-top: 4px;
}

.context-doc__body {
  flex: 1;
  padding: 18px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--navy-deep);
  line-height: 1.6;
}

.context-line {
  padding: 4px 6px;
  border-radius: 3px;
  cursor: pointer;
  transition: background var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out);
}

.context-line.is-link {
  background: rgba(77, 168, 232, 0.10);
  color: var(--navy-brand);
  border-left: 2px solid var(--sky-interactive);
  padding-left: 8px;
}

.context-line.is-link:hover,
.context-line.is-link.is-active {
  background: rgba(77, 168, 232, 0.25);
  color: var(--navy-brand);
}

.context-graph {
  position: relative;
  background: white;
  border: 1px solid var(--rule);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-1);
  overflow: hidden;
}

.context-graph svg {
  width: 100%;
  height: 100%;
  display: block;
}

.context-node {
  cursor: pointer;
  transition: transform 220ms var(--ease-spring);
}

.context-node:hover { transform: scale(1.06); }

.context-node circle {
  fill: white;
  stroke: var(--rule);
  stroke-width: 2;
  transition: stroke var(--dur-fast) var(--ease-out), fill var(--dur-fast) var(--ease-out);
}

.context-node.is-center circle {
  fill: var(--navy-brand);
  stroke: var(--navy-brand);
}

.context-node.is-active circle {
  fill: var(--sky-interactive);
  stroke: var(--blue-primary);
}

.context-node text {
  font-family: var(--font-mono);
  font-size: 10px;
  fill: var(--navy-deep);
  dominant-baseline: middle;
  text-anchor: middle;
}

.context-node.is-center text { fill: white; font-weight: 500; }

.context-edge {
  stroke: var(--rule);
  stroke-width: 1.5;
  fill: none;
  transition: stroke var(--dur-med) var(--ease-out), stroke-width var(--dur-med) var(--ease-out);
}

.context-edge.is-active {
  stroke: var(--sky-interactive);
  stroke-width: 2;
}

.context-tip {
  position: absolute;
  left: 20px;
  bottom: 20px;
  padding: 10px 14px;
  background: var(--navy-brand);
  color: white;
  border-radius: var(--radius-sm);
  font-size: 12px;
  line-height: 1.4;
  max-width: 340px;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity var(--dur-fast) var(--ease-out), transform var(--dur-fast) var(--ease-out);
  pointer-events: none;
}

.context-tip.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.context-tip strong {
  display: block;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--sky-interactive);
  margin-bottom: 4px;
  font-weight: 500;
}

/* ============================================================
   SCENE 7 — FOUR LIVE AGENTS
============================================================ */
.scene-agents .scene__stage {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.agents-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
}

@media (max-width: 1000px) {
  .agents-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 560px) {
  .agents-grid { grid-template-columns: minmax(0, 1fr); }
}

.agents-ready {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 20px 24px;
  border: 1px dashed var(--rule);
  border-radius: var(--radius-md);
  background: var(--canvas-soft);
}

.agents-ready__label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--navy-deep);
  opacity: 0.6;
}

.agents-ready__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.agents-ready__chip {
  padding: 6px 12px;
  background: white;
  border: 1px solid var(--rule);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--navy-brand);
  letter-spacing: 0.02em;
}

.agent-card {
  background: white;
  border: 1px solid var(--rule);
  border-radius: var(--radius-md);
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  transition: border-color var(--dur-med) var(--ease-out), box-shadow var(--dur-med) var(--ease-out), transform var(--dur-med) var(--ease-out);
  box-shadow: var(--shadow-1);
}

.agent-card:hover {
  border-color: var(--sky-interactive);
  box-shadow: var(--shadow-hover);
  transform: translateY(-3px);
}

.agent-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(43, 168, 184, 0.05) 0%, transparent 60%);
  opacity: 0;
  transition: opacity var(--dur-med) var(--ease-out);
  pointer-events: none;
}

.agent-card:hover::before { opacity: 1; }

.agent-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.agent-card__name {
  font-family: var(--font-display);
  font-size: 22px;
  color: var(--navy-brand);
  letter-spacing: -0.01em;
}

.agent-card__body {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.agent-card__metric {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding-bottom: 8px;
  border-bottom: 1px dashed var(--rule-soft);
}

.agent-card__metric:last-child { border-bottom: none; }

.agent-card__metric-k {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--navy-deep);
  opacity: 0.55;
}

.agent-card__metric-v {
  font-family: var(--font-display);
  font-size: 20px;
  color: var(--navy-brand);
  letter-spacing: -0.005em;
}

.agent-card__metric-v.is-warn { color: var(--warn); }

.agent-card__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 4px;
}

.agent-card__ts {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--navy-deep);
  opacity: 0.45;
}

/* ============================================================
   SCENE 8 — MCA MIRROR (Hero)
============================================================ */
.scene-mirror .scene__stage {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.mirror-search {
  display: flex;
  justify-content: center;
}

.mirror-search__box {
  position: relative;
  width: min(560px, 100%);
}

.mirror-search__input {
  width: 100%;
  padding: 16px 52px 16px 22px;
  background: white;
  border: 2px solid var(--rule);
  border-radius: 999px;
  font-family: var(--font-sans);
  font-size: 15px;
  color: var(--navy-brand);
  transition: border-color var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out);
  box-shadow: var(--shadow-1);
  outline: none;
}

.mirror-search__input:focus {
  border-color: var(--sky-interactive);
  box-shadow: var(--shadow-hover);
}

.mirror-search__input::placeholder {
  color: var(--navy-deep);
  opacity: 0.4;
}

.mirror-search__icon {
  position: absolute;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: var(--navy-deep);
  opacity: 0.5;
  pointer-events: none;
}

.mirror-suggest {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  background: white;
  border: 1px solid var(--rule);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-3);
  overflow: hidden;
  z-index: 20;
  opacity: 0;
  transform: translateY(-6px);
  pointer-events: none;
  transition: opacity var(--dur-fast) var(--ease-out), transform var(--dur-fast) var(--ease-out);
}

.mirror-suggest.is-open {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.mirror-suggest__item {
  padding: 10px 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  border-bottom: 1px solid var(--rule-soft);
  transition: background var(--dur-fast) var(--ease-out);
}

.mirror-suggest__item:last-child { border-bottom: none; }
.mirror-suggest__item:hover { background: var(--canvas-soft); }

.mirror-suggest__name {
  font-size: 13px;
  color: var(--navy-brand);
  font-weight: 500;
}

.mirror-suggest__cin {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--navy-deep);
  opacity: 0.55;
}

.mirror-dashboard {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 16px;
  flex: 1;
  min-height: 0;
  min-width: 0;
  opacity: 0;
  transition: opacity 500ms var(--ease-out);
}

.mirror-dashboard.is-visible { opacity: 1; }

.mirror-card {
  background: white;
  border: 1px solid var(--rule);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: var(--shadow-1);
  opacity: 0;
  transform: translateY(18px);
}

.mirror-card.is-in {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 520ms var(--ease-out), transform 520ms var(--ease-spring);
}

.mirror-card--entity { grid-column: span 12; background: var(--gradient-brand); color: white; border: none; }
.mirror-card--spread { grid-column: span 6; }
.mirror-card--directors { grid-column: span 6; }
.mirror-card--charges { grid-column: span 6; }
.mirror-card--signals { grid-column: span 6; }

@media (max-width: 900px) {
  .mirror-card--spread, .mirror-card--directors,
  .mirror-card--charges, .mirror-card--signals { grid-column: span 12; }
}

.mirror-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.mirror-card__title {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--navy-deep);
  opacity: 0.6;
}

.mirror-card--entity .mirror-card__title { color: rgba(255, 255, 255, 0.7); opacity: 1; }

.mirror-entity {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

@media (max-width: 600px) {
  .mirror-entity__name { font-size: 22px; }
  .mirror-entity__stats { gap: 16px; flex-wrap: wrap; }
  .mirror-entity__stat-v { font-size: 18px; }
  .mirror-spread { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
  .mirror-spread__val { font-size: 14px; }
  .mirror-card { padding: 14px; }
}

.mirror-entity__name {
  font-family: var(--font-display);
  font-size: 32px;
  letter-spacing: -0.01em;
}

.mirror-entity__cin {
  font-family: var(--font-mono);
  font-size: 11px;
  opacity: 0.7;
  letter-spacing: 0.08em;
  margin-top: 4px;
}

.mirror-entity__stats {
  display: flex;
  gap: 32px;
}

.mirror-entity__stat-v {
  font-family: var(--font-display);
  font-size: 24px;
}

.mirror-entity__stat-l {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.72;
  margin-top: 2px;
}

.mirror-spread {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr 1fr;
  gap: 12px;
}

.mirror-spread__col {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-top: 6px;
  border-top: 1px solid var(--rule-soft);
}

.mirror-spread__year {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--navy-deep);
  opacity: 0.55;
  letter-spacing: 0.08em;
}

.mirror-spread__val {
  font-family: var(--font-display);
  font-size: 18px;
  color: var(--navy-brand);
  letter-spacing: -0.005em;
}

.mirror-spread__bar {
  height: 4px;
  background: var(--canvas-soft);
  border-radius: 2px;
  overflow: hidden;
}

.mirror-spread__fill {
  height: 100%;
  background: var(--blue-primary);
  width: 0;
  transition: width 900ms var(--ease-out);
}

.mirror-directors {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.mirror-director {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid var(--rule-soft);
}

.mirror-director:last-child { border-bottom: none; }

.mirror-director__name {
  font-size: 13px;
  color: var(--navy-brand);
  font-weight: 500;
}

.mirror-director__meta {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--navy-deep);
  opacity: 0.6;
  margin-top: 2px;
}

.mirror-director__tag {
  font-family: var(--font-mono);
  font-size: 10px;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--canvas-soft);
  color: var(--navy-deep);
  letter-spacing: 0.08em;
}

.mirror-director__tag.is-warn {
  background: rgba(217, 122, 30, 0.1);
  color: var(--warn);
}

.mirror-charges {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mirror-charge {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid var(--rule-soft);
  border-radius: 6px;
  background: var(--canvas-white);
}

.mirror-charge__lender {
  font-size: 13px;
  color: var(--navy-brand);
}

.mirror-charge__amt {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--navy-brand);
  text-align: right;
}

.mirror-charge__meta {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--navy-deep);
  opacity: 0.55;
  margin-top: 2px;
}

.mirror-signals {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.mirror-signal {
  display: flex;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 6px;
  background: rgba(217, 122, 30, 0.06);
  border-left: 2px solid var(--warn);
}

.mirror-signal__icon {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  color: var(--warn);
  margin-top: 2px;
}

.mirror-signal__text {
  font-size: 12px;
  color: var(--navy-brand);
  line-height: 1.4;
}

/* ============================================================
   SCENE 9 — THE COMPOUNDING WEB
============================================================ */
.scene-compounding .scene__stage {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 32px;
  min-height: 420px;
}

@media (max-width: 960px) {
  .scene-compounding .scene__stage {
    grid-template-columns: minmax(0, 1fr);
    min-height: 0;
  }
}

.architecture {
  position: relative;
  background: white;
  border: 1px solid var(--rule);
  border-radius: var(--radius-md);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: var(--shadow-1);
}

.arch-layer {
  position: relative;
  padding: 14px 18px;
  background: var(--canvas-white);
  border: 1px solid var(--rule-soft);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: border-color var(--dur-med) var(--ease-out);
}

.arch-layer--agents {
  background: var(--canvas-soft);
  gap: 10px;
  flex-wrap: wrap;
}

.arch-agent {
  padding: 6px 12px;
  background: white;
  border: 1px solid var(--rule);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--navy-brand);
  letter-spacing: 0.02em;
  transition: all var(--dur-med) var(--ease-spring);
}

.arch-agent.is-new {
  animation: agentPop 600ms var(--ease-spring);
  border-color: var(--sky-interactive);
  background: rgba(77, 168, 232, 0.08);
  color: var(--blue-primary);
}

@keyframes agentPop {
  0% { opacity: 0; transform: scale(0.5); }
  60% { opacity: 1; transform: scale(1.15); }
  100% { opacity: 1; transform: scale(1); }
}

.arch-layer__name {
  font-family: var(--font-display);
  font-size: 16px;
  color: var(--navy-brand);
}

.arch-layer__note {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--navy-deep);
  opacity: 0.55;
  letter-spacing: 0.08em;
}

.compounding-side {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.compounding-title {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--navy-deep);
  opacity: 0.6;
}

.cost-bar {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 12px;
}

.cost-bar__label {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--navy-brand);
  white-space: nowrap;
  min-width: 72px;
}

.cost-bar__track {
  position: relative;
  height: 8px;
  background: var(--canvas-soft);
  border-radius: 4px;
  overflow: hidden;
}

.cost-bar__fill {
  height: 100%;
  background: var(--blue-primary);
  border-radius: 4px;
  transition: width 700ms var(--ease-out);
}

.agent-shelf {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 8px;
}

.shelf-agent {
  padding: 8px 14px;
  background: white;
  border: 1px dashed var(--rule);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--navy-brand);
  cursor: pointer;
  transition: all var(--dur-fast) var(--ease-out);
  letter-spacing: 0.02em;
}

.shelf-agent:hover:not(:disabled) {
  border-style: solid;
  border-color: var(--sky-interactive);
  color: var(--blue-primary);
  background: rgba(77, 168, 232, 0.06);
}

.shelf-agent:disabled {
  opacity: 0.35;
  cursor: default;
}

/* ============================================================
   SCENE 10 — THE CLOSE
============================================================ */
.scene-close .scene__stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 36px;
  text-align: center;
}

.close-wordmark {
  width: min(420px, 70vw);
  height: auto;
  opacity: 0;
  transform: translateY(16px);
}

.scene-close.is-active .close-wordmark {
  animation: fadeUp 900ms var(--ease-out) 150ms forwards;
}

.close-line {
  font-family: var(--font-display);
  font-size: clamp(24px, 2.8vw, 34px);
  color: var(--navy-brand);
  max-width: 720px;
  letter-spacing: -0.01em;
  line-height: 1.3;
  opacity: 0;
  transform: translateY(16px);
}

.scene-close.is-active .close-line {
  animation: fadeUp 900ms var(--ease-out) 450ms forwards;
}

.close-pillars {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  width: 100%;
  max-width: 920px;
  opacity: 0;
}

.scene-close.is-active .close-pillars {
  animation: fadeUp 900ms var(--ease-out) 750ms forwards;
}

@media (max-width: 780px) {
  .close-pillars { grid-template-columns: repeat(2, 1fr); }
}

.pillar {
  padding: 18px 16px;
  background: white;
  border: 1px solid var(--rule);
  border-radius: var(--radius-md);
  text-align: left;
  transition: border-color var(--dur-med) var(--ease-out), transform var(--dur-med) var(--ease-out), box-shadow var(--dur-med) var(--ease-out);
  cursor: default;
  min-height: 140px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.pillar:hover {
  border-color: var(--sky-interactive);
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
}

.pillar__icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--canvas-soft);
  display: grid;
  place-items: center;
  color: var(--blue-primary);
}

.pillar__icon svg { width: 16px; height: 16px; }

.pillar__title {
  font-size: 13px;
  font-weight: 600;
  color: var(--navy-brand);
}

.pillar__desc {
  font-size: 12px;
  color: var(--navy-deep);
  opacity: 0.75;
  line-height: 1.5;
}

.close-cta {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 16px 34px;
  background: var(--navy-brand);
  color: white;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.01em;
  transition: transform var(--dur-med) var(--ease-spring), background var(--dur-med) var(--ease-out), box-shadow var(--dur-med) var(--ease-out);
  box-shadow: var(--shadow-2);
  opacity: 0;
  transform: translateY(16px);
}

.scene-close.is-active .close-cta {
  animation: fadeUp 900ms var(--ease-out) 1050ms forwards;
}

.close-cta:hover {
  background: var(--blue-primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}

.close-cta svg {
  width: 14px;
  height: 14px;
  transition: transform var(--dur-fast) var(--ease-out);
}

.close-cta:hover svg { transform: translateX(4px); }
