/* Evidence-rich scene layouts. Loaded after the motion system. */
.technical-scene {
  grid-template-rows: auto minmax(0, 1fr) 66px;
  gap: 18px;
}

.technical-scene h2 { font-size: 56px; line-height: 1.12; }

.technical-split {
  min-height: 0;
  display: grid;
  grid-template-columns: 1.08fr .92fr;
  gap: 26px;
  overflow: hidden;
}

.tech-contract,
.window-contract,
.dilation-contract {
  min-width: 0;
  min-height: 0;
  display: grid;
  gap: 14px;
}

.tech-contract { grid-template-rows: auto minmax(132px, 1fr) 80px; }
.window-contract { grid-template-rows: minmax(260px, 1fr) auto auto; }
.dilation-contract { grid-template-rows: minmax(0, 1fr) auto auto; }

.parameter-grid {
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 2px solid currentColor;
  border-bottom: 1px solid var(--line);
}

.parameter-grid > span {
  min-width: 0;
  min-height: 54px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 16px;
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
  color: var(--muted);
  font: 18px/1.28 "Bahnschrift", "Microsoft YaHei UI", sans-serif;
}

.parameter-grid > span:nth-child(-n + 2) { border-top: 0; }
.parameter-grid > span:nth-child(odd) { border-left: 0; }
.parameter-grid b { color: var(--ink); font-size: 19px; white-space: nowrap; }

.feature-proof-grid { grid-template-columns: 1.15fr .85fr; }
.feature-params > span { min-height: 50px; }
.compact-band { min-height: 142px; padding: 16px 0; gap: 5px; }
.compact-groups { min-height: 80px; }
.compact-groups span { padding: 0 9px; font-size: 17px; line-height: 1.28; }

.code-card {
  min-width: 0;
  min-height: 0;
  margin: 0;
  display: grid;
  grid-template-rows: 64px minmax(0, 1fr);
  overflow: hidden;
  border-top: 2px solid var(--ink);
  border-bottom: 1px solid var(--line);
  background: oklch(.955 .01 242);
}

.code-card figcaption {
  min-width: 0;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 18px;
  padding: 0 18px;
  border-bottom: 1px solid var(--line);
  background: var(--blue-dark);
  color: white;
  font-size: 18px;
}

.code-card figcaption span { color: var(--cyan); font-weight: 760; }
.code-card figcaption b { max-width: 430px; overflow: hidden; color: oklch(.82 .01 242); font: 16px/1.18 "Bahnschrift", sans-serif; text-align: right; text-overflow: ellipsis; white-space: nowrap; }
.code-card pre { min-height: 0; margin: 0; padding: 18px 20px; overflow: hidden; }
.code-card code { color: var(--ink); font: 16.5px/1.43 Consolas, "Microsoft YaHei UI", monospace; white-space: pre-wrap; overflow-wrap: anywhere; }

.stacked-code { grid-template-rows: 54px minmax(0, 1fr) 54px minmax(0, 1fr); }
.stacked-code figcaption { min-height: 54px; }
.stacked-code figcaption.secondary { border-top: 1px solid var(--line); background: oklch(.37 .08 242); }
.stacked-code pre { padding-block: 12px; }
.stacked-code code { font-size: 15.5px; line-height: 1.34; }

.evidence-footer,
.source-boundary-note,
.metric-boundary-note,
.holdout-boundary-note {
  min-width: 0;
  min-height: 66px;
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 0 18px;
  border-top: 1px solid var(--line);
  background: oklch(.97 .008 242);
  color: var(--muted);
  font-size: 20px;
  line-height: 1.25;
}

.evidence-footer strong,
.source-boundary-note strong,
.metric-boundary-note strong,
.holdout-boundary-note strong { color: var(--blue); white-space: nowrap; }
.evidence-footer i,
.metric-boundary-note i,
.holdout-boundary-note i { color: var(--red); font-style: normal; white-space: nowrap; }
.dark-footer { border-color: oklch(1 0 0 / .18); background: oklch(.22 .05 242); color: oklch(.82 .01 242); }
.dark-footer strong { color: var(--cyan); }

.source-boundary-note { display: grid; grid-template-columns: 130px 1fr 1fr; }
.source-boundary-note .recall-only { color: var(--red); }

.label-rule-strip {
  min-height: 82px;
  display: grid;
  grid-template-columns: .92fr 1.05fr 1.65fr 1.55fr;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.label-rule-strip span {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 16px;
  border-left: 1px solid var(--line);
  color: var(--muted);
  font-size: 18px;
  line-height: 1.26;
}
.label-rule-strip span:first-child { border-left: 0; }
.label-rule-strip b { color: var(--blue); font: 21px/1 "Bahnschrift", sans-serif; }
.label-rule-strip .boundary { color: var(--red); }

.window-proof-grid { grid-template-columns: 1.13fr .87fr; }
.compact-window-stage { min-height: 282px; }
.window-params > span { min-height: 58px; }
.label-decision {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  min-height: 68px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.label-decision span { display: grid; align-content: center; gap: 4px; padding: 0 16px; border-left: 1px solid var(--line); color: var(--muted); font-size: 17px; }
.label-decision span:first-child { border-left: 0; }
.label-decision b { color: var(--blue-dark); font-size: 19px; }
.window-code code { font-size: 14.7px; line-height: 1.28; }

.tcn-proof-grid { grid-template-columns: 1.06fr .94fr; }
.compact-dilation { min-height: 0; }
.compact-dilation .dilation-row { grid-template-columns: 180px 1fr 150px; min-height: 112px; }
.compact-dilation .dilation-row div { min-height: 70px; }
.tech-token-row { display: grid; grid-template-columns: repeat(5, 1fr); min-height: 60px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.tech-token-row span { display: grid; place-items: center; border-left: 1px solid var(--line); color: var(--blue-dark); font: 18px/1 "Bahnschrift", sans-serif; }
.tech-token-row span:first-child { border-left: 0; }
.plain-explanation { display: grid; grid-template-columns: 260px 1fr; align-items: center; gap: 22px; min-height: 68px; padding: 0 18px; background: var(--surface); font-size: 19px; }
.plain-explanation strong { color: var(--blue); }
.plain-explanation span { color: var(--muted); }
.tcn-code code { font-size: 15px; line-height: 1.33; }

.model-proof-grid { grid-template-columns: 1.16fr .84fr; }
.compact-head-model { height: 100%; min-height: 0; }
.compact-head-model .model-input { left: 1.5%; width: 19%; }
.compact-head-model .shared-core { left: 25%; width: 31%; }
.compact-head-model .pooling { left: 60.5%; width: 16%; }
.compact-head-model .model-head { right: 1.5%; width: 18%; }
.compact-head-model .model-head b { margin-top: 8px; color: oklch(.8 .01 242); font-size: 19px; }
.compact-head-model .energy-main { offset-path: path("M 170 260 L 650 260"); }
.compact-head-model .energy-risk { offset-path: path("M 650 260 L 790 260 L 930 120"); }
.compact-head-model .energy-behavior { offset-path: path("M 650 260 L 790 260 L 930 410"); }
.model-code code { font-size: 14.8px; line-height: 1.32; }
.cobalt-scene .code-card { border-color: oklch(1 0 0 / .38); background: oklch(.19 .045 242); }
.cobalt-scene .code-card figcaption { border-color: oklch(1 0 0 / .16); background: oklch(.14 .025 242); }
.cobalt-scene .code-card code { color: oklch(.9 .01 242); }

.training-proof-scene { grid-template-rows: auto 74px minmax(0, 1fr) 76px; gap: 14px; }
.training-route {
  display: grid;
  grid-template-columns: 1fr 62px 1fr 62px 1fr;
  align-items: stretch;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.training-route span { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 14px; padding: 0 18px; color: var(--muted); font-size: 18px; }
.training-route b { color: var(--blue-dark); font: 20px/1 "Bahnschrift", sans-serif; white-space: nowrap; }
.training-route > i { display: grid; place-items: center; color: var(--cyan); font-size: 30px; font-style: normal; }
.training-proof-grid { grid-template-columns: 1.02fr .98fr; }
.training-params { grid-template-columns: repeat(2, minmax(0, 1fr)); align-content: stretch; }
.training-params > span { min-height: 0; }
.training-code code { font-size: 14.4px; line-height: 1.28; }
.training-summary { display: grid; grid-template-columns: 1fr 1.55fr auto; align-items: center; gap: 18px; min-height: 76px; padding: 0 18px; border-top: 1px solid var(--line); background: var(--surface); }
.training-summary span { color: var(--muted); font-size: 18px; }
.training-summary b { color: var(--blue-dark); }
.training-summary strong { padding: 14px 18px; background: var(--blue-dark); color: white; font-size: 19px; white-space: nowrap; }

.audit-boundary-strip {
  min-height: 110px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.audit-boundary-strip section { display: grid; grid-template-columns: auto 1fr; align-content: center; gap: 8px 22px; padding: 16px 28px; }
.audit-boundary-strip section + section { border-left: 1px solid var(--line); }
.audit-boundary-strip h3 { grid-column: 1 / -1; margin: 0; color: var(--blue); font-size: 23px; }
.audit-boundary-strip strong { color: var(--ink); font-size: 20px; }
.audit-boundary-strip span { color: var(--muted); font-size: 18px; }
.audit-boundary-strip .not-claimed h3,
.audit-boundary-strip .not-claimed span { color: var(--red); }

.integrated-metrics { grid-template-rows: 58px repeat(5, 1fr); }
.metric-boundary-note { display: grid; grid-template-columns: auto 1fr auto 1.2fr; }
.integrated-holdout { grid-template-rows: auto minmax(0, 1fr) 68px; gap: 18px; }
.integrated-holdout h2 { font-size: 58px; }
.integrated-holdout-table { position: relative; isolation: isolate; overflow: hidden; grid-template-rows: 56px repeat(7, 1fr); }
.integrated-holdout-table .holdout-header,
.integrated-holdout-table .holdout-row { position: relative; z-index: 2; grid-template-columns: 310px 400px 135px 135px 1fr; padding-inline: 18px; }
.integrated-holdout-table .holdout-row strong { font-size: 19px; }
.integrated-holdout-table .holdout-row span { font-size: 18px; }
.integrated-holdout-table .holdout-row b { font-size: 21px; }
.integrated-holdout-table .holdout-row i { font-size: 18px; }
.holdout-boundary-note { display: grid; grid-template-columns: auto 1fr auto; }

.scene-10.active .parameter-grid span,
.scene-12.active .parameter-grid span,
.scene-13.active .tech-token-row span { animation: content-cell-in .46s var(--ease) both; }
.scene-10.active .parameter-grid span:nth-child(2),
.scene-12.active .parameter-grid span:nth-child(2) { animation-delay: .08s; }
.scene-10.active .parameter-grid span:nth-child(3),
.scene-12.active .parameter-grid span:nth-child(3) { animation-delay: .16s; }
.scene-10.active .parameter-grid span:nth-child(4),
.scene-12.active .parameter-grid span:nth-child(4) { animation-delay: .24s; }
.scene-10.active .parameter-grid span:nth-child(5) { animation-delay: .32s; }
.scene-10.active .parameter-grid span:nth-child(6) { animation-delay: .4s; }
.scene-10.active .code-card,
.scene-12.active .code-card,
.scene-13.active .code-card,
.scene-14.active .code-card { animation: code-proof-in .7s .42s var(--ease) both; }
.scene-10.active .evidence-footer,
.scene-12.active .evidence-footer,
.scene-13.active .evidence-footer,
.scene-14.active .evidence-footer { animation: evidence-up .48s 1.5s var(--ease) both; }

.scene-15.active .training-route span { animation: route-stage-in .5s var(--ease) both; }
.scene-15.active .training-route span:nth-of-type(1) { animation-delay: .14s; }
.scene-15.active .training-route span:nth-of-type(2) { animation-delay: .34s; }
.scene-15.active .training-route span:nth-of-type(3) { animation-delay: .54s; }
.scene-15.active .training-route > i { animation: connector-grow .36s var(--ease) both; }
.scene-15.active .training-route > i:nth-of-type(1) { animation-delay: .3s; }
.scene-15.active .training-route > i:nth-of-type(2) { animation-delay: .5s; }
.scene-15.active .training-params span { animation: content-cell-in .42s var(--ease) both; animation-delay: calc(.7s + var(--n, 0) * 30ms); }
.scene-15.active .training-code { animation: code-proof-in .66s .78s var(--ease) both; }
.scene-15.active .training-summary { animation: training-summary-lock .58s 1.42s var(--ease) both; }

.scene-21.active .holdout-row { animation: boundary-pass .56s var(--ease) both; }
.scene-21.active .holdout-row:nth-of-type(2) { animation-delay: .12s; }
.scene-21.active .holdout-row:nth-of-type(3) { animation-delay: .24s; }
.scene-21.active .holdout-row:nth-of-type(4) { animation-delay: .36s; }
.scene-21.active .holdout-row:nth-of-type(5) { animation-delay: .48s; }
.scene-21.active .holdout-row:nth-of-type(6) { animation-delay: .6s; }
.scene-21.active .holdout-row:nth-of-type(7) { animation-delay: .72s; }
.scene-21.active .holdout-row:nth-of-type(8) { animation-delay: .84s; }
.scene-21.active .holdout-row.warn,
.scene-21.active .holdout-row.weak { animation-name: boundary-break; }
.scene-21.active .holdout-boundary-note { animation: evidence-up .48s 1.18s var(--ease) both; }

@keyframes content-cell-in { from { opacity: .16; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }
@keyframes code-proof-in { from { opacity: .15; transform: translateX(28px); clip-path: inset(0 0 0 100%); } to { opacity: 1; transform: translateX(0); clip-path: inset(0); } }
@keyframes route-stage-in { from { opacity: .15; transform: translateX(-26px); } to { opacity: 1; transform: translateX(0); } }
@keyframes training-summary-lock { from { opacity: .2; clip-path: inset(0 100% 0 0); } to { opacity: 1; clip-path: inset(0); } }

@media (prefers-reduced-motion: reduce) {
  .technical-scene *,
  .integrated-holdout * { animation-delay: 0ms !important; }
}
