@font-face {
  font-family: Outfit;
  src: url("assets/outfit-regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* A paired-view screening room. The eight index drawings correspond to the actual trials. */
#observations.section {
  --paper: #172132;
  --panel: #202d3e;
  background: radial-gradient(ellipse at 92% 12%, #1b293a 0, transparent 42%), var(--paper);
}
#observations .control-deck {
  border: 1px solid #51596c;
  border-radius: 1.6rem .3rem 1.6rem .3rem;
  background: var(--panel);
  box-shadow: 0 1.4rem 3rem #0205104a;
}
#observations .control-deck__nav {
  border-color: #41495b;
  background: linear-gradient(110deg,#293447,#273746 68%,#29424b);
}
#observations .control-deck__nav p {
  color: #dbece9;
  font: 400 .79rem/1.3 Outfit, var(--body);
  letter-spacing: .13em;
  text-transform: uppercase;
}
#observations .control-deck__nav button {
  width: 2.8rem;
  height: 2.8rem;
  border: 1px solid #8594a8;
  border-radius: 50%;
  color: #ebf8f6;
}
#observations .control-deck__nav button:is(:hover,:focus-visible) {
  border-color: var(--read-accent);
  background: #103d40;
  color: var(--read-accent);
}
#observations .control-deck__slides { padding: clamp(1rem,2.8vw,3rem); }
#observations .trajectory-pair {
  position: relative;
  min-width: 0;
  padding: clamp(.7rem,1.4vw,1.4rem);
  border: 1px solid #48586b;
  border-radius: .15rem 1.2rem .15rem 1.2rem;
  background: radial-gradient(ellipse at 30% 0,#192a39,transparent 70%),#0b0e19;
}
#observations .trajectory-labels {
  font: 500 clamp(.68rem,1vw,.85rem)/1.35 var(--body);
  letter-spacing: .055em;
}
#observations .trajectory-labels span + span { border-left: 1px solid #576579; }
#observations .trajectory-pair .trajectory-labels { color: #deebef; }
#observations .control-deck video { border-radius: .15rem; }
#observations .matched h3 { color: var(--ink); font-size: clamp(1.7rem,2.9vw,3.25rem); }
#observations .matched figcaption > p { color: var(--body-copy); }
#observations .shape-scores { border-color: #4b5163; }
#observations .shape-scores dl > div:nth-child(2) dd { color: #c6b6ff; }
#observations .shape-scores dl > div:last-child dd { color: var(--read-accent); }
#observations .trial-index {
  display: grid;
  grid-template-columns: repeat(8, minmax(0,1fr));
  border-block: 1px solid #41495b;
  background: #1d2939;
}
#observations .trial-index[hidden] { display: none; }
#observations .trial-index button {
  display: grid;
  justify-items: center;
  align-content: center;
  gap: .4rem;
  min-width: 0;
  min-height: 4.6rem;
  padding: .45rem .25rem;
  border: 0;
  border-inline-end: 1px solid #30384a;
  border-block-end: 3px solid transparent;
  border-radius: 0;
  background: transparent;
  color: #c3cbd9;
  font: 550 clamp(.72rem,.96vw,.9rem)/1.18 var(--body);
}
#observations .trial-index button:last-child { border-inline-end: 0; }
#observations .trial-index svg {
  display: block;
  width: clamp(2.15rem,3.6vw,3.4rem);
  height: 1.45rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}
#observations .trial-index .key-frame { fill: currentColor; stroke: none; }
#observations .trial-index button:is(:hover,:focus-visible,[aria-pressed="true"]) { color: var(--read-accent); }
#observations .trial-index button[aria-pressed="true"] {
  border-block-end-color: var(--read-accent);
  background: linear-gradient(0deg,#14383e,#17212a);
}
#observations .trial-index button:focus-visible { outline-offset: -4px; }

/* The transfer curves share the chapter's slate surface and the matrix's family colors. */
#observations .transfer-results {
  --ink: #e3ebf0;
  --quiet: #b6c3cf;
  --rule: #495b6d;
  --control-edge: #718598;
  --read-accent: #8addd2;
  --family-image: #e8a470;
  --family-video: #6bc9ba;
  --family-generative: #e78da0;
  --family-world: #b59bdf;
  --family-language: #dbbd70;
  --family-geometry: #8caee5;
  position: relative;
  padding: clamp(1.15rem,3vw,3.2rem);
  border: 1px solid var(--rule);
  border-radius: .3rem 1.8rem .3rem 1.8rem;
  background: var(--panel);
  color: var(--ink);
  box-shadow: 0 .8rem 2rem #080d171c;
}
#observations .transfer-results figcaption {
  align-items: start;
  padding-bottom: clamp(.9rem,1.7vw,1.7rem);
  border-bottom: 1px solid var(--rule);
}
#observations .transfer-results h3 { color: var(--ink); font-size: clamp(1.6rem,2.75vw,3rem); }
#observations .transfer-results :is(.transfer-stages,.transfer-scores,.transfer-scores th,.transfer-scores td) { color: var(--ink); }
#observations .transfer-results :is(figcaption p,.transfer-ticks,.transfer-unit,.transfer-scores thead th) { color: var(--quiet); }
#observations .transfer-results .transfer-switch { gap: .35rem; margin-block: 1rem .25rem; }
#observations .transfer-switch button {
  min-height: 2.75rem;
  border: 1px solid var(--control-edge);
  border-radius: 2rem;
  background: transparent;
  color: var(--ink);
}
#observations .transfer-switch button[aria-pressed="true"] { border-color: var(--read-accent); background: #284a50; color: #d5fff6; }
#observations .transfer-switch button:is(:hover,:focus-visible) { border-color: var(--read-accent); color: var(--read-accent); }
#observations .transfer-display { margin-bottom: 0; }
#observations .transfer-points circle { stroke: var(--panel); }
#observations .transfer-scores tbody button { color: var(--ink); }
#observations .transfer-field { height: clamp(12rem,19vw,15.5rem); }

/* Both AUROC tasks share one horizontal scale, including the mode previews. */
#events.section { background: radial-gradient(ellipse at 5% 36%,#25243c 0,transparent 46%),#0a0d19; }
#events :is(.event-figure,.future-figure) {
  --chart-ink: #111624;
  min-width: 0;
  padding: clamp(1rem,2.1vw,2.35rem);
  border: 1px solid #48556a;
  border-radius: .25rem 1.75rem .25rem 1.75rem;
  background: linear-gradient(150deg,#273247,#202b3d 48%);
  box-shadow: 0 1.25rem 3rem #03061165;
}
#events .event-figure figcaption { gap: .45rem 1.15rem; border: 0; padding-bottom: .85rem; }
#events :is(#event-chart-title,#future-title) {
  margin: 0;
  color: var(--ink);
  font: 500 clamp(1.5rem,2.25vw,2.45rem)/1.14 var(--serif,Georgia,serif);
  letter-spacing: -.032em;
}
#events .event-figure .chart-unit { color: #c5cddd; }
#events .future-figure {
  margin: clamp(1.8rem,4vw,4rem) 0 0;
  background: #1d2839;
}
#events .future-figure figcaption { padding-bottom: 1rem; border-bottom: 1px solid var(--rule); }
#events .future-protocol { max-width: 80ch; margin: .55rem 0 0; color: var(--body-copy); line-height: 1.5; }
#events .event-switch {
  display: grid;
  grid-template-columns: repeat(3,minmax(0,1fr));
  align-items: stretch;
  gap: .4rem;
  margin: .15rem 0 1.45rem;
}
#events .event-switch[hidden] { display: none; }
#events .event-switch button {
  display: grid;
  justify-items: start;
  gap: .25rem;
  min-height: 3.9rem;
  min-width: 0;
  padding: .55rem clamp(.5rem,1vw,1rem);
  border: 1px solid #495467;
  border-radius: .25rem;
  background: #121827;
  color: #dce1ea;
  font-size: clamp(.75rem,.96vw,.92rem);
  text-align: left;
}
#events .event-switch button:is(:hover,:focus-visible) { border-color: var(--read-accent); }
#events .event-switch button[aria-pressed="true"] {
  border-color: #60a9ac;
  background: #17343d;
  color: #fff;
  box-shadow: inset 0 -2px 0 var(--read-accent);
}
#events .event-switch svg { width: min(7rem,100%); height: 1.45rem; overflow: visible; }
#events .metric-baseline { stroke: #8795aa; stroke-width: .7; fill: none; }
#events .preview-collision { fill: #50e5da; }
#events .preview-non-penetration { fill: #111624; stroke: #e2dcff; stroke-width: 1; }
#events .event-figure[data-event-view="compare"] .range-line i { background: linear-gradient(90deg,#a59ebf,#4eaea9); }
#events .range-line::before { border-color: #e1dcfa; background: #141a29; }
#events .range-table .plot-cell { background-color: #131c2b; }
@media (max-width: 48.75rem) {
  #observations .trial-index { grid-template-columns: repeat(4,minmax(0,1fr)); }
  #observations .trial-index button:nth-child(-n+4) { border-block-start: 1px solid #30384a; }
  #observations .trial-index button:nth-child(4n) { border-inline-end: 0; }
  #observations .trial-index button { min-height: 3.5rem; gap: .2rem; }
  #observations .transfer-results { padding: clamp(1rem,3.5vw,1.7rem); }
  #observations .transfer-results figcaption { gap: .55rem; }
  #observations .transfer-results figcaption p { max-width: 55ch; }
}
@media (max-width: 38.75rem) {
  #observations .control-deck, #observations .transfer-results, #events :is(.event-figure,.future-figure) { border-radius: .2rem 1.1rem .2rem 1.1rem; }
  #observations .control-deck__slides { padding: .85rem; }
  #observations .trajectory-pair { padding: .45rem; }
  #observations .trajectory-pair .trajectory-labels { margin-bottom: .45rem; }
  #observations .shape-scores { margin-top: .85rem; }
  #observations .transfer-display { gap: 1.2rem; }
  #observations .transfer-field { height: 10.5rem; }
  #observations .transfer-switch button { padding-inline: .65rem; font-size: .78rem; }
  #events :is(.event-figure,.future-figure) { padding: .85rem; }
  #events .event-switch { grid-template-columns: 1fr 1fr 1.3fr; gap: .25rem; margin-bottom: 1rem; }
  #events .event-switch button {
    align-content: start;
    padding: .5rem .3rem;
    min-height: 3.1rem;
    font-size: .8125rem;
    line-height: 1.25;
    overflow-wrap: break-word;
  }
  #events .event-switch svg { height: 1.1rem; }
}
@media (prefers-reduced-motion: no-preference) {
  #observations .trial-index button { transition: color .16s ease,border-color .16s ease; }
  #observations .control-deck.is-ready .matched.is-active { animation: exa-show-trial .34s ease-out; }
  @keyframes exa-show-trial { from { opacity: .25; translate: 0 .45rem; } to { opacity: 1; translate: 0 0; } }
  #events .event-switch button { transition: border-color .18s,background-color .18s; }
}
@media print {
  #observations .trial-index, #events .event-switch { display: none; }
  #events .future-figure { break-inside: avoid; background: white; box-shadow: none; }
  #events .future-figure, #events .future-figure * { color: black !important; }
}
