:root {
  color-scheme: light;
  --ink: #252523;
  --secondary: #64645f;
  --surface: #f2f2ee;
  --page: #fcfcfa;
  --caption: #53534e;
  --muted: #70706a;
  --control: #eeeee9;
  --control-hover: #e5e5de;
  --selected: #353530;
  --on-selected: #fcfcfa;
  --border: #ddddd5;
  --underline: #aaa99f;
  --scroll-thumb: #bdbdb3;
  --accent-surface: #eee9ce;
  --accent-ink: #494229;
  --focus: #817044;
  --page-width: 1120px;
  --page-gutter: 48px;
  --reading-width: 720px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --ink: #e5e3dc;
  --secondary: #bcbab3;
  --surface: #363633;
  --page: #30302e;
  --caption: #c5c3bb;
  --muted: #aaa89f;
  --control: #3e3e38;
  --control-hover: #48483f;
  --selected: #d3c88c;
  --on-selected: #272720;
  --border: #54544b;
  --underline: #939085;
  --scroll-thumb: #7e7b6f;
  --accent-surface: #413d2c;
  --accent-ink: #e3d6a0;
  --focus: #c7b97f;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 92px; }
body { margin: 0; color: var(--ink); background: var(--page); -webkit-font-smoothing: antialiased; }
a { color: inherit; text-underline-offset: 4px; }
button { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a:focus-visible, button:focus-visible, video:focus-visible { outline: 3px solid var(--focus); outline-offset: 5px; }
::selection { color: var(--accent-ink); background: var(--accent-surface); }
[hidden] { display: none !important; }

.site-header { position: sticky; top: 0; z-index: 10; background: rgb(255 255 255 / 88%); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); }
.media-shell, .header-inner, .footer-inner, .story-body { width: min(var(--page-width), calc(100% - 2 * var(--page-gutter))); margin-inline: auto; }
.header-inner, .footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 28px; }
.header-inner { min-height: 68px; }
.wordmark { font-size: 17px; font-weight: 500; letter-spacing: -.4px; text-decoration: none; white-space: nowrap; }
.appearance { position: absolute; inset: 24px 0 auto; display: flex; justify-content: flex-end; }
#theme-toggle { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 8px 12px; border: 0; border-radius: 24px; background: transparent; color: var(--secondary); cursor: pointer; font-size: 12px; }
#theme-toggle:hover { color: var(--ink); background: var(--control); }
#theme-toggle svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
#theme-toggle .theme-sun, [data-theme="dark"] #theme-toggle .theme-moon { display: none; }
[data-theme="dark"] #theme-toggle .theme-sun { display: block; }

.hero-copy { text-align: center; padding: 96px 0 40px; }
h1 { margin: 0; font-size: 48px; font-weight: 400; line-height: 1.15; letter-spacing: -1.4px; }
.hero-description { max-width: 620px; margin: 16px auto 0; color: var(--secondary); font-size: 16px; line-height: 1.65; text-wrap: pretty; }
h1 + .hero-description { margin-top: 40px; }
h2, h3 { margin: 0; font-size: 16px; font-weight: 400; letter-spacing: 0; line-height: 1.5; }
.film-figure { margin: 0; }
.video-frame { position: relative; overflow: hidden; border-radius: 22px; background: #b6b6b6; isolation: isolate; }
video { display: block; width: 100%; height: auto; aspect-ratio: 32 / 9; object-fit: contain; }
.film-play { position: absolute; right: 24px; bottom: 24px; display: inline-flex; gap: 11px; align-items: center; min-height: 48px; padding: 0 20px; border: 1px solid rgb(255 255 255 / 70%); border-radius: 30px; background: rgb(255 255 255 / 91%); color: #252527; backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); box-shadow: 0 2px 14px rgb(0 0 0 / 5%); cursor: pointer; font-size: 14px; font-weight: 500; transition: background 160ms ease, transform 160ms ease; }
.film-play:hover { background: #fff; transform: translateY(-1px); }
.film-play svg { width: 14px; height: 14px; fill: currentColor; }
.film-duration { color: #757579; font-size: 12px; padding-left: 6px; font-weight: 400; font-variant-numeric: tabular-nums; }
.film-figure figcaption { margin-top: 16px; text-align: left; font-size: 13px; color: var(--caption); line-height: 1.6; }
.film-figure figcaption span { display: inline-block; color: var(--muted); margin-left: 8px; }
.chapter-navigation { display: flex; justify-content: flex-start; margin-top: 18px; }
.chapters { display: inline-flex; max-width: 100%; gap: 4px; border-radius: 40px; background: var(--control); padding: 5px; }
.chapter { border: 0; min-height: 43px; padding: 0 23px; border-radius: 30px; color: var(--secondary); background: transparent; font-size: 13px; cursor: pointer; transition: color 160ms ease, background-color 160ms ease; white-space: nowrap; }
.chapter:hover:not(:disabled) { color: var(--ink); background: var(--control-hover); }
.chapter[aria-pressed="true"], .chapter[aria-pressed="true"]:hover:not(:disabled) { color: var(--on-selected); background: var(--selected); }
.chapter:disabled { cursor: default; }
.chapter:focus-visible { outline-offset: 2px; }
.film-context { margin: 16px 0 0; text-align: left; color: var(--muted); font-size: 12px; line-height: 1.65; }

#idea .story-body p { max-width: none; }
.task-challenge .story-body { display: flex; flex-direction: column; }
.challenge-board { order: 1; max-width: var(--reading-width); margin: 24px 0; }
.board-orbit-frame { position: relative; }
.challenge-board picture, .challenge-board img { display: block; width: 100%; }
.challenge-board img { height: auto; border-radius: 22px; }
.challenge-board figcaption { margin-top: 10px; color: var(--secondary); font-size: 12px; line-height: 1.6; }
#board-orbit-toggle { position: absolute; right: 12px; bottom: 12px; display: grid; place-items: center; width: 36px; height: 36px; padding: 0; border: 1px solid #fff; border-radius: 50%; background: rgb(255 255 255 / 90%); color: #454545; cursor: pointer; opacity: 0; pointer-events: none; }
#board-orbit-toggle svg { width: 14px; height: 14px; }
#board-orbit-toggle .board-play-icon, #board-orbit-toggle.is-paused .board-pause-icon { display: none; }
#board-orbit-toggle.is-paused .board-play-icon { display: block; }
.board-orbit-frame:hover #board-orbit-toggle, .board-orbit-frame:focus-within #board-orbit-toggle { opacity: 1; pointer-events: auto; }
@media (min-width: 900px) {
  .task-challenge .story-body { display: flow-root; }
  .task-challenge .story-body > p { max-width: none; }
  .challenge-board { float: left; width: 46%; max-width: 520px; margin: 4px 36px 20px 0; }
}
@media (hover: none) { #board-orbit-toggle { opacity: 1; pointer-events: auto; } }
@media (prefers-reduced-motion: reduce) { #board-orbit-toggle { display: none; } }

.task-challenge { padding: 64px 0 0; }
.task-challenge h2 { margin-bottom: 16px; }
.story { padding: 32px 0 64px; }
.story-body p { max-width: var(--reading-width); margin: 0; color: var(--secondary); font-size: 16px; line-height: 1.8; }
.story-body p + p { margin-top: 16px; }
.story-body a { text-decoration-color: var(--underline); }
.story-body a:hover { text-decoration-color: currentColor; }
.research-section { padding: 0 0 40px; }
.research-copy h2 { margin-bottom: 16px; }
.method-heading { margin-bottom: 28px; font-size: 28px; font-weight: 400; line-height: 1.25; letter-spacing: -.6px; }
#method .research-copy h3 { margin-bottom: 16px; }
.research-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.75fr); gap: 64px; align-items: start; }
.research-figure { min-width: 0; margin: 0; }
.research-figure img { display: block; width: 100%; height: auto; }
.research-figure figcaption { margin-top: 12px; color: var(--secondary); font-size: 12px; line-height: 1.6; }
.research-figure figcaption a { text-decoration-color: var(--underline); }
.research-copy p { max-width: var(--reading-width); margin: 0; color: var(--secondary); font-size: 16px; line-height: 1.8; }
.research-copy p + p { margin-top: 16px; }
.training-comparison { padding: 48px 0 0; }
.training-comparison .research-layout { grid-template-columns: minmax(0, 1fr); gap: 24px; }
.sampling-section .research-layout { grid-template-columns: minmax(0, 1fr); gap: 24px; }
.sampling-section .video-frame { background: var(--page); }
.research-plot { overflow-x: auto; background: var(--surface); border-radius: 8px; }
.research-plot img { min-width: 840px; }
.research-plot-hint { display: none; }
.experiments { padding: 48px 0; background: var(--surface); }
.experiments .section-intro { margin-bottom: 24px; }
.section-intro { padding: 0; text-align: left; margin: 0 auto 24px; }
.section-intro > p { max-width: var(--reading-width); margin: 12px 0 0; color: var(--secondary); font-size: 16px; line-height: 1.75; }
.discovery { padding: 64px 0 88px; }
.discovery .section-intro { margin-bottom: 32px; }
.behavior-navigation { display: flex; width: fit-content; flex-wrap: wrap; justify-content: center; gap: 6px; margin: 24px auto 0; padding: 0; background: transparent; }
.behavior-navigation .chapter { min-height: 40px; padding: 8px 16px; background: var(--control); white-space: normal; }
.behavior-navigation .chapter[aria-pressed="true"] { color: var(--on-selected); background: var(--selected); }
.behavior-track { position: relative; display: flex; gap: 24px; overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain; scrollbar-width: thin; scrollbar-color: var(--scroll-thumb) var(--control); padding-bottom: 12px; }
.behavior-track:focus-visible { outline: 3px solid var(--focus); outline-offset: 5px; }
.behavior-slide { flex: 0 0 100%; min-width: 0; scroll-snap-align: start; }
.behavior-slide figure { margin: 0; }
.behavior-slide figcaption { max-width: var(--reading-width); margin-top: 14px; color: var(--secondary); font-size: 14px; line-height: 1.65; }
.behavior-slide figure > a { display: block; border-radius: 22px; }
.behavior-slide img { display: block; width: 100%; height: auto; border-radius: 22px; }
.behavior-controls { display: flex; justify-content: center; align-items: center; gap: 20px; margin-top: 16px; }
.behavior-controls button { width: 42px; height: 42px; padding: 0; border: 0; border-radius: 50%; color: var(--ink); background: var(--control); cursor: pointer; font-size: 21px; }
.behavior-controls button:hover:not(:disabled) { background: var(--control-hover); }
.behavior-controls button:disabled { opacity: .35; cursor: default; }
.behavior-status { min-width: 48px; margin: 0; color: var(--secondary); font-size: 13px; font-variant-numeric: tabular-nums; text-align: center; }
#strategy-video, #starting-states-video { aspect-ratio: 16 / 9; }
.strategies { padding: 0; }
#strategy-caption { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 12px 0 0; text-align: left; font-size: 12px; }
.closeup-toggle { display: inline-flex; align-items: center; gap: 8px; flex-shrink: 0; min-height: 28px; padding: 0; border: 0; color: var(--secondary); background: transparent; cursor: pointer; font-size: 12px; }
.closeup-toggle .switch-track { display: inline-block; position: relative; width: 28px; height: 16px; margin: 0; border: 1px solid #b9b9bd; border-radius: 16px; background: #d6d6d9; }
.switch-track::after { content: ""; position: absolute; top: 2px; left: 2px; width: 10px; height: 10px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgb(0 0 0 / 16%); }
.closeup-toggle[aria-checked="true"] .switch-track { border-color: #72766a; background: #72766a; }
.closeup-toggle[aria-checked="true"] .switch-track::after { transform: translateX(12px); }
#strategy-detail { position: absolute; z-index: 1; left: 59.166667%; top: 15.925926%; width: 38.333333%; height: auto; aspect-ratio: 1; border: 1px solid rgb(255 255 255 / 68%); border-radius: 4%; box-shadow: 0 8px 18px rgb(0 0 0 / 16%); pointer-events: none; }
#strategy-caption .strategy-view-controls { display: inline-flex; align-items: center; gap: 14px; margin: 0; }
.strategy-fullscreen { display: inline-grid; place-items: center; min-width: 28px; min-height: 28px; padding: 0; border: 0; color: var(--secondary); background: transparent; cursor: pointer; }
.strategy-fullscreen svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.5; }
#strategy-player:fullscreen { display: flex; flex-direction: column; align-items: center; justify-content: center; width: 100vw; height: 100dvh; margin: 0; padding: 12px; background: #111; }
#strategy-player:fullscreen .video-frame, #strategy-player:fullscreen #strategy-caption { flex-shrink: 0; width: min(100%, calc((100dvh - 64px) * 16 / 9)); }
#strategy-player:fullscreen .video-frame { border-radius: 0; }
#strategy-player:fullscreen #strategy-caption { margin-top: 8px; color: #ddd; }
#strategy-player:fullscreen .closeup-toggle, #strategy-player:fullscreen .strategy-fullscreen { color: #ddd; }
.strategy-moments { margin: 12px 0 0; }
.moment-groups { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px; }
.moment-group { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; min-width: 0; max-width: 100%; }
.moment-label { margin: 0; color: var(--caption); font-size: 12px; line-height: 1.5; white-space: nowrap; }
.moment-times { display: flex; flex-wrap: wrap; gap: 4px; }
.moment-time { flex-shrink: 0; min-width: 40px; min-height: 30px; padding: 0 7px; border: 0; border-radius: 5px; color: var(--caption); background: var(--control); font-size: 12px; font-variant-numeric: tabular-nums; cursor: pointer; transition: background-color 160ms ease; }
.moment-time:hover, .moment-time:focus { color: var(--accent-ink); background: var(--accent-surface); }
.moment-time:focus-visible { outline-offset: 2px; }
#strategy-context { margin-top: 12px; text-align: left; }
.strategy-status:empty { display: none; }
.site-footer { background: var(--surface); }
.footer-inner { border-top: 1px solid var(--border); padding-block: 26px 32px; }
.site-footer .wordmark { font-size: 16px; }
.site-footer p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.6; }
.skip-link { position: fixed; top: 8px; left: 16px; z-index: 20; padding: 10px 18px; background: var(--page); border-radius: 8px; transform: translateY(-160%); }
.skip-link:focus { transform: translateY(0); }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }

@media (max-width: 900px) {
  :root { --page-gutter: 24px; }
  .research-layout { grid-template-columns: minmax(0, 1fr); gap: 24px; }
}
@media (max-width: 888px) {
  .research-plot-hint { display: block; margin-bottom: 6px; }
}
@media (max-width: 600px) {
  :root { --page-gutter: 20px; }
  html { scroll-padding-top: 80px; }
  .header-inner, .footer-inner { gap: 20px; }
  .header-inner { min-height: 64px; }
  .wordmark { font-size: 17px; }
  .hero-copy { padding: 64px 0 28px; }
  h1 { font-size: 38px; letter-spacing: -.9px; }
  .hero-description { margin-top: 14px; font-size: 15px; }
  h1 + .hero-description { margin-top: 28px; }
  .appearance { top: 12px; }
  .video-frame { border-radius: 14px; }
  .film-play { right: 10px; bottom: 10px; min-height: 40px; padding-inline: 13px; gap: 7px; font-size: 12px; }
  .film-play svg { width: 11px; height: 11px; }
  .film-duration { display: none; }
  .film-figure figcaption { font-size: 12px; margin: 14px 0 0; }
  .film-figure figcaption span { display: block; margin: 3px 0 0; }
  .chapter-navigation { margin-top: 18px; }
  .chapters { padding: 4px; gap: 0; }
  .chapter { padding-inline: 13px; min-height: 42px; font-size: 11px; }
  .film-context { margin: 14px 0 0; font-size: 11px; }
  .task-challenge { padding-top: 44px; }
  .story { padding: 28px 0 44px; }
  .story-body p { font-size: 15px; }
  .research-section { padding-bottom: 28px; }
  .research-copy p { font-size: 15px; }
  .method-heading { margin-bottom: 24px; font-size: 24px; }
  .training-comparison { padding: 32px 0 0; }
  .experiments { padding-block: 36px; }
  .section-intro > p { font-size: 15px; }
  .discovery { padding: 44px 0 55px; }
  .behavior-navigation { gap: 6px; margin: 22px 8px 0; }
  .behavior-navigation .chapter { padding: 8px 12px; font-size: 12px; }
  .behavior-slide img, .behavior-slide figure > a { border-radius: 14px; }
  .moment-groups { gap: 6px 16px; }
  .moment-time { min-height: 36px; padding-inline: 6px; }
  #strategy-context { margin-inline: 0; }
  .footer-inner { flex-wrap: wrap; gap: 18px; padding-block: 25px; }
  .site-footer p { order: 3; flex-basis: 100%; }
}
@media (max-width: 350px) {
  .chapter { padding-inline: 10px; }
  .header-inner { gap: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}
