/* Research presentation: one continuous surface, with the media carrying the page.
   Loaded after the shared layout and playback styles. */
:root {
  color-scheme: dark;
  --bg: #1a2320;
  --surface: #273530;
  --ink: #f4f7f6;
  --muted: #d1dcd7;
  --subtle: #c4d1cb;
  --accent: #c8dad7;
  --line: #ffffff1a;
  --paper: transparent;
  --paper-ink: var(--ink);
  --paper-muted: var(--muted);
  --paper-line: var(--line);
  --width: 1600px;
  --gutter: clamp(24px, 5vw, 80px);
}

body {
  background: var(--bg);
  background-attachment: fixed;
}

html { scroll-padding-top: 90px; }
button:focus-visible, a:focus-visible, input:focus-visible,
select:focus-visible, summary:focus-visible {
  outline-color: #c8e8db;
}
h2 {
  font-size: clamp(28px, 2.5vw, 36px);
  font-weight: 500;
  letter-spacing: -.03em;
}

/* A quiet navigation line and a continuous transition out of the opening. */
.nav-shell {
  background: color-mix(in srgb, var(--bg) 94%, transparent);
  border: 0;
  backdrop-filter: blur(16px);
}
.nav { height: 64px; }
@media (min-width: 761px) {
  .nav {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  }
  .nav > .brand { justify-self: start; }
  .nav-links { margin-left: 0; justify-self: center; }
  .nav-cta { justify-self: end; }
}
.brand-icon { width: 44px; height: 44px; flex: none; object-fit: contain; }
.brand { gap: 9px; }
.nav-links a, .nav-cta { font-size: var(--font-min); }
.hero-opening { height: calc(100svh - 64px); background: var(--bg); }
.hero-shade {
  background:
    radial-gradient(ellipse at 50% 48%, #05140fd9 0%, #05140fb8 25%, #05140f40 65%, #05140f20 100%),
    linear-gradient(180deg, #09251f66 0%, transparent 22%, transparent 65%, var(--bg) 100%);
}
.hero-opening h1 { font-weight: 560; letter-spacing: -.05em; }
.hero-opening .button { border-radius: 999px; }
.hero-opening .button-outline { background: #09251f66; border-color: #ffffff33; }
.film-motion { background: #09251f80; border: 0; border-radius: 999px; }
.hero { padding-bottom: 0; }
.paper-section { background: transparent; border: 0; }
.showreel-section, .films, .idea, .results { padding-block: 80px; }
.section-heading { margin-bottom: 32px; }
.section-heading > .eyebrow, .section-heading > div > .eyebrow { margin-bottom: 10px; }
.heading-split { gap: 40px; }
.heading-split .section-lede { font-size: var(--font-min); max-width: 420px; line-height: 1.75; }
.section-lede { font-size: 16px; }

/* Video surfaces have no enclosing card, border, inset padding, or shadow. */
.showreel-shell, .cinema-stage {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.showreel-section h2 { font-size: clamp(28px, 2.5vw, 36px); }
.showreel-frame {
  max-height: none;
  aspect-ratio: 960 / 564;
  border-radius: 12px;
}
.showreel-shell .showreel-transport { padding: 16px 0 0; }
.showreel-start svg {
  width: 64px;
  height: 64px;
  padding: 21px;
  color: #10241d;
  background: #f4f7f6;
  border: 0;
}
.showreel-start:hover svg { background: #dceee6; }
.showreel-chapters { margin-top: 24px; gap: 24px; }
.showreel-chapter { border-top-width: 1px; font-size: var(--font-min); }
.showreel-chapter[aria-current="true"] { border-color: var(--accent); }
.showreel-chapter small, .showreel-caption { font-size: var(--font-min); }
.showreel-caption { margin-top: 10px; }

/* The scene index reads as a gallery, with selection on the caption only. */
.filter-bar { border: 0; gap: 12px 28px; margin-top: 28px; padding-bottom: 0; }
.filter-button {
  position: relative;
  min-height: 44px;
  padding: 8px 0;
  border-radius: 0;
  gap: 8px;
  font-size: var(--font-min);
}
.filter-button[aria-pressed="true"],
.filter-button:hover:not([aria-pressed="true"]) {
  color: var(--ink);
  background: transparent;
}
.filter-button::after {
  content: '';
  position: absolute;
  inset: auto 0 0;
  height: 1px;
  background: transparent;
}
.filter-button[aria-pressed="true"]::after { background: var(--ink); }
.filter-button small { font-size: var(--font-min); opacity: .8; }
.film-index { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px 18px; margin-top: 30px; }
.film-option { border: 0; box-shadow: none; }
.film-thumb { border-radius: 10px; aspect-ratio: 16 / 9; background: transparent; }
.film-thumb img { opacity: 1; transition: opacity .2s; }
.film-option:hover .film-thumb img { opacity: .88; transform: none; }
.film-option[aria-pressed="true"] .film-thumb { outline: 0; }
.film-option .film-names {
  align-items: baseline;
  gap: 12px;
  margin-top: 12px;
  font-size: var(--font-min);
  line-height: 1.5;
}
.film-option[aria-pressed="true"] .film-names > span:first-child {
  text-decoration: underline;
  text-underline-offset: 5px;
  text-decoration-color: #c8e8db80;
}
.film-option .selected-mark { color: var(--subtle); font-size: var(--font-min); white-space: nowrap; }
.film-option[aria-pressed="true"] .selected-mark { color: var(--ink); }
.case { margin-top: 68px; scroll-margin-top: 24px; }
/* Case selection focuses this reading target; interactive controls keep their rings. */
.case:focus { outline: none; }
.case-header { padding-bottom: 22px; }
.case-header h3 { font-size: 28px; font-weight: 500; letter-spacing: -.025em; }
.case-claim { font-size: var(--font-min); max-width: 80ch; }
.cinema-toolbar { font-size: var(--font-min); padding-bottom: 14px; }
.comparison-selector .pair-select {
  font-size: var(--font-min);
  min-height: 44px;
  border: 0;
  border-bottom: 1px solid #ffffff38;
  border-radius: 0;
  background: transparent;
  padding-inline: 8px;
}
.pair-select option { background: var(--surface); color: var(--ink); }
.cinema-stage .viewer, .cinema-stage .viewer.is-paired { gap: 20px; }
.cinema-stage .video-frame, .video-frame { border-radius: 10px; }
.cinema-stage.is-solo .video-frame { height: auto; aspect-ratio: var(--stage-ratio); max-height: 720px; }
.cinema-stage.is-solo .viewer { max-width: 1080px; margin-inline: auto; }
.cinema-stage.is-solo .viewer:has(.portrait) { max-width: 480px; }
.cinema-stage .method-title h4, .cinema-stage .pair-slot .method-title h4 { font-size: var(--font-min); }
.cinema-stage .listen-button, .cinema-stage .pair-slot .listen-button { min-height: 44px; font-size: var(--font-min); }
.cinema-stage .listen-button[aria-pressed="true"] { color: var(--ink); }
.cinema-stage .transport { margin-top: 0; padding-top: 16px; }
.play-button { min-width: 44px; height: 44px; }
.time, .sound-button { font-size: var(--font-min); }
.sound-button { min-height: 44px; }
.playback-status { margin-top: 4px; }
.fullscreen-button, .method-cell .fullscreen-button {
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: #06161099;
}
.fullscreen-button:hover { background: #061610dc; }
.media-message { color: #f4f7f6; background: #061610e6; }
.screenplay-cue {
  margin-top: 24px;
  padding: 24px 0 12px;
  min-height: 0;
  border-top: 1px solid var(--line);
  grid-template-columns: 155px minmax(0, 1fr);
}
.cue-meta, .cue-meta b { font-size: var(--font-min); }
.cue-text p { font-size: 22px; font-weight: 400; letter-spacing: -.015em; }
.cue-text span { font-size: var(--font-min); }
.cue-footer { margin-top: 12px; }
.cue-footer > p { font-size: var(--font-min); }
.cue-footer .event-step { min-height: 44px; border-top-width: 1px; font-size: var(--font-min); }
.all-methods-toggle { border: 0; font-size: var(--font-min); margin-top: 18px; }
.additional-methods .compare-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px 20px; }
.additional-heading { font-size: var(--font-min); }
.additional-methods .method-title h4 { font-size: var(--font-min); }
.additional-methods .listen-button, .method-compare { font-size: var(--font-min); min-height: 44px; }
.method-footer .method-state { font-size: var(--font-min); }
.sample-only { margin-top: 24px; padding: 0; border: 0; font-size: var(--font-min); }
.script-details { margin-top: 22px; border-bottom: 0; }
.script-details summary { min-height: 64px; }
.script-content { grid-template-columns: minmax(220px, .65fr) minmax(0, 1.35fr); gap: 48px; }
.script-content .scene-text, .script-cast, .script-event p, .audio-caption { font-size: var(--font-min); }
.script-content .input-frame figcaption, .script-cast b, .audio-caption b { font-size: var(--font-min); }
.script-content .input-frame img { max-height: none; }

/* Method and quantitative evidence share the same open presentation. */
.idea-grid { gap: 56px; align-items: start; }
.input-frame img { border-radius: 10px; }
.input-frame figcaption, .input-frame figcaption span:last-child { font-size: var(--font-min); }
.script-line { border: 0; padding: 12px 0; }
.script-line .sample-speaker { color: var(--muted); font-size: var(--font-min); }
.script-line .line-words { font-size: 20px; }
.principles { border: 0; padding: 0; margin-top: 48px; }
.principles p { font-size: var(--font-min); }
.method-summary { border: 0; margin-top: 56px; padding-top: 0; }
.method-summary-head h3 { font-weight: 500; }
.method-summary-head p { font-size: 16px; }
.method-summary .method-flow { border: 0; font-size: var(--font-min); padding-block: 24px; }
.architecture-details { border: 0; border-radius: 0; overflow: visible; margin-top: 24px; }
.architecture-details summary { padding: 12px 0; background: transparent; }
.architecture-details summary:hover { background: transparent; color: #fff; }
.architecture-action { padding: 8px 0; border: 0; background: transparent; font-size: var(--font-min); color: var(--muted); }
.architecture-details .pipeline { border: 0; padding: 8px 0 0; }
.pipeline img { padding: 12px; border-radius: 10px; max-height: none; }
.pipeline figcaption { margin-block: 16px 0; }

/* Fixed celadon diagram palette on a quiet dark page. */
.diagram-card { color-scheme: dark; background: transparent; color: var(--ink); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; box-shadow: none; }
.diagram-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; padding: 16px 22px; background: transparent; border-bottom: 1px solid var(--line); }
.diagram-heading { font-size: 16px; font-weight: 600; }
.diagram-heading > span { display: block; margin-top: 3px; color: var(--muted); font-size: 12px; font-weight: 400; letter-spacing: .04em; }
.diagram-actions, .diagram-controls { display: flex; align-items: center; gap: 8px; }
.diagram-controls[hidden] { display: none; }
.diagram-controls { padding-right: 14px; margin-right: 6px; border-right: 1px solid var(--line); }
.diagram-actions button, .diagram-actions a { color: var(--ink); font: inherit; font-size: 13px; min-height: 40px; display: inline-flex; align-items: center; justify-content: center; border-radius: 7px; }
.diagram-actions button { cursor: pointer; min-width: 40px; padding: 6px 10px; background: #ffffff0d; border: 1px solid #ffffff24; }
.diagram-actions button:hover:not(:disabled), .diagram-actions a:hover { background: #ffffff1a; color: #fff; }
.diagram-actions button:disabled { opacity: .35; cursor: default; }
.diagram-actions a { padding: 6px 10px; text-decoration: none; }
.diagram-actions output { color: var(--muted); min-width: 42px; text-align: center; font-size: 12px; font-variant-numeric: tabular-nums; }
.diagram-viewport { max-height: 75vh; overflow: auto; overscroll-behavior: contain; background: #edf2f0; scrollbar-color: #4a6d63 transparent; }
.pipeline .diagram-viewport img { display: block; width: 100%; max-width: none; max-height: none; height: auto; padding: 24px; border-radius: 0; background: transparent; box-sizing: border-box; }
.diagram-card :focus-visible { outline: 3px solid #c8e8db; outline-offset: -3px; }
.diagram-help { margin: 0; padding: 12px 22px; color: var(--muted); background: transparent; border-top: 1px solid var(--line); font-size: 12px; line-height: 1.6; }
@media (max-width: 640px) {
  .diagram-toolbar { padding: 14px; gap: 12px; }
  .diagram-actions { width: 100%; flex-wrap: wrap; }
  .diagram-controls { padding-right: 8px; margin-right: 0; gap: 4px; }
  .pipeline .diagram-viewport img { padding: 12px; }
  .diagram-help { padding: 12px 14px; }
}
.kpis { margin-block: 40px 48px; }
.kpi-value { font-size: 42px; font-weight: 450; }
tbody tr.ours { background: #ffffff06; }
td.best, .table-best-key {
  color: #f4cf87;
  font-weight: 700;
}
td.best { background-color: rgb(244 207 135 / 9%); }
.credits { padding-block: 72px; }
.credits h2 { font-weight: 500; }
.footer { border-color: var(--line); }

@media (min-width: 1500px) {
  .film-index { gap: 32px 24px; }
}
@media (max-width: 1100px) {
  .film-index { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .film-option .film-names { flex-wrap: wrap; gap: 3px 10px; }
  .heading-split .section-lede { max-width: 650px; }
  .idea-grid { gap: 32px; }
}
@media (max-width: 760px) {
  .showreel-section, .films, .idea, .results { padding-block: 48px; }
  .nav-links a, .nav-cta { font-size: var(--font-min); }
  .hero-opening { min-height: 600px; }
  .section-heading { margin-bottom: 24px; }
  .heading-split .section-lede { font-size: var(--font-min); }
  .filter-bar { gap: 6px 20px; margin-top: 24px; }
  .filter-button { font-size: var(--font-min); padding-inline: 0; }
  .film-index { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px 14px; margin-top: 24px; }
  .film-option .film-names { font-size: var(--font-min); }
  .film-thumb { border-radius: 8px; }
  .case { margin-top: 48px; }
  .case-header h3 { font-size: 25px; }
  .case-claim { font-size: var(--font-min); }
  .cinema-toolbar { flex-wrap: wrap; gap: 8px 20px; }
  .cinema-toolbar > p { max-width: none; }
  .comparison-selector { flex-direction: row; align-items: center; }
  .cinema-stage .viewer, .cinema-stage .viewer.is-paired { gap: 20px; grid-template-columns: minmax(0, 1fr); }
  .cinema-stage.is-solo .video-frame { max-height: none; }
  .cinema-stage .transport, .transport { gap: 12px; }
  .screenplay-cue { grid-template-columns: 1fr; gap: 12px; }
  .cue-meta { display: flex; gap: 16px; align-items: baseline; flex-wrap: wrap; }
  .cue-meta b { margin-top: 0; }
  .cue-text p { font-size: 20px; }
  .cue-footer { align-items: flex-start; flex-wrap: wrap; gap: 8px 24px; }
  .cue-footer .event-navigation { width: 200px; }
  .additional-methods .compare-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 14px; }
  .script-content { grid-template-columns: 1fr; gap: 28px; }
  .method-summary { margin-top: 40px; }
  .method-summary .method-flow { gap: 16px; }
  .architecture-details .pipeline { padding-top: 8px; }
  .pipeline img { padding: 8px; }
  .showreel-chapters { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 20px; }
  .showreel-caption .text-button { font-size: var(--font-min); }
  .credits { padding-block: 48px; }
}
@media (max-width: 480px) {
  :root { --gutter: 20px; }
  .film-index { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .film-option .film-names { flex-wrap: nowrap; }
  .additional-methods .compare-grid { grid-template-columns: minmax(0, 1fr); }
  .time, .sound-button { font-size: var(--font-min); }
  .cinema-stage .transport .time { min-width: 72px; }
  .transport .scrub { min-width: 65px; }
  .sound-button { margin-left: auto; }
  .principles { gap: 24px 20px; }
  .method-summary .method-flow { font-size: var(--font-min); }
  .architecture-details summary { gap: 12px; }
  .architecture-label { font-size: var(--font-min); }
  .architecture-action { font-size: var(--font-min); }
  .kpi-value { font-size: 34px; }
}

/* Ice cave grounded screenplay example. */
.idea-scene, .idea-event { margin-top: 10px; color: var(--muted); font-size: var(--font-min); }
.idea-structured { grid-column: 1 / -1; min-width: 0; border-block: 1px solid var(--line); }
.idea-structured summary { padding: 16px 0; cursor: pointer; font-size: var(--font-min); }
.idea-structured pre { margin: 0 0 20px; padding: 20px; max-height: 580px; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; background: var(--surface); border-radius: 10px; color: var(--muted); font: 13px/1.8 ui-monospace, monospace; }
