/* Shared appearance controls and a deliberately tuned night palette. */
:root{color-scheme:light;--surface:#fff;--raised:#fff;--plot-m6:#7e03a8;--plot-m7:#b86316}
.theme-toggle{display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;width:42px;height:42px;background:transparent;border:1px solid var(--line);border-radius:50%;color:var(--ink);padding:10px}
.theme-toggle:hover{background:var(--wash);border-color:var(--muted)}
.theme-toggle svg{width:20px;height:20px;stroke:currentColor;fill:none;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}
.theme-toggle .sun{display:none}
.conference-mark{display:flex;justify-content:center;align-items:center;gap:12px;width:fit-content;margin:0 auto 20px;text-decoration:none}
.conference-mark img{width:142px;height:auto;display:block}.conference-mark span{font:500 22px var(--display);color:var(--ink)}
.home-hero .venue{margin-bottom:20px;letter-spacing:.7px;font-size:12px}
.film-nav{display:flex;gap:8px 18px;flex-wrap:wrap;margin:24px 0 0;padding:12px 0;border-top:1px solid var(--line);border-bottom:1px solid var(--line);font-size:16px}
.film-nav a{text-decoration:none;color:var(--deep)}.film-nav a:hover{text-decoration:underline}
.film-voice-note{font-size:14px;color:var(--muted);margin:12px 0 0}
.lab-curve.m6{stroke:var(--plot-m6)}.lab-curve.m7{stroke:var(--plot-m7)}.lab-inspected.m6{fill:var(--plot-m6)}.lab-inspected.m7{fill:var(--plot-m7)}
[data-theme=dark]{color-scheme:dark;--ink:#f1e8f7;--muted:#b8aac3;--purple:#d598f3;--deep:#deb4f5;--pink:#f18eb1;--orange:#ffb967;--line:#3b2d48;--wash:#21192b;--surface:#17121f;--raised:#281f33;--plot-m6:#d598f3;--plot-m7:#ffb967}
[data-theme=dark] body{background:var(--surface)}
[data-theme=dark] .theme-toggle .sun{display:block}[data-theme=dark] .theme-toggle .moon{display:none}
[data-theme=dark] .conference-mark img{filter:brightness(0) invert(1);opacity:.9}
[data-theme=dark] :is(.site-header nav a,.page-intro p,.table-note,.atlas-heading p,.mechanism-family,.mechanism-story,.lab-explanation,.protocol-notes dd,.species-note,.atlas-source,.equation-details,.resource-grid p,.resource-links p,.trace-card p,.rubric-content p,.benchmark-page .mechanism-story){color:var(--muted)}
[data-theme=dark] :is(.site-header nav a[aria-current=page],.reaction-species,.cycle-species-key b,.page-intro h1){color:var(--ink)}
[data-theme=dark] :is(.button,select,.condition-chips span,#mechanism-list button,.reaction-row,.prediction-options button,.lab-choices button,.example-controls button,.resource-grid a,.submission-code,.zoom,dialog){background:var(--surface);border-color:var(--line);color:var(--ink)}
[data-theme=dark] :is(.button.primary,.stepper [aria-selected=true],#mechanism-list button[aria-pressed=true],.rubric-tabs button[aria-selected=true],.rubric-tabs button.active,.lab-tabs button[aria-selected=true],.lab-tabs button.active){background:#68328c;border-color:#b979d9;color:#fff}
[data-theme=dark] :is(.family-filters button[aria-pressed=true],.example-controls button[aria-pressed=true],.lab-choices button[aria-pressed=true],.prediction-options button[aria-pressed=true]){background:#382244;border-color:var(--purple);color:var(--ink)}
[data-theme=dark] .loop-agent{background:linear-gradient(135deg,#2b1c38,#281c2c);border-color:#60406e}
[data-theme=dark] .loop-environment{background:linear-gradient(145deg,#291c34,#2a1b29);border-color:#62405d}
[data-theme=dark] .loop-node.active{border-color:var(--purple);box-shadow:0 0 0 2px #d598f31a}
[data-theme=dark] .loop-environment h3{color:#f18eb1}
[data-theme=dark] .loop-environment .hidden-mechanism{background:#3a2134;color:#f2a6c2}
[data-theme=dark] .environment-instrument{background:#1c1525;border-color:var(--line);box-shadow:none}
[data-theme=dark] :is(.instrument-key,.observation-control,.loop-environment .environment-caption,.environment-note){color:var(--muted);border-color:var(--line)}
[data-theme=dark] .loop-diagnostics{background:#2b211c;border-color:#674a36}
[data-theme=dark] .reasoning-group{background:#30241e;border-color:#674a36}
[data-theme=dark] .diagnostic-group h3{color:#ffc191}
[data-theme=dark] .reasoning-group h3{color:#ffcf8f}
[data-theme=dark] :is(.metric-button.selected,.metric-button:hover){background:#493023}
[data-theme=dark] .reasoning-group a span{background:#604324;color:#ffe1ad}
[data-theme=dark] .metric-detail{color:#ffbd87;border-color:#b9804e}
[data-theme=dark] :is(td,th.method-name){border-color:var(--line)}
[data-theme=dark] .baseline{background:#2c2038}
[data-theme=dark] :is(.rubric-content,.rubric-panel,.rubric-tabs button,.trace-card,.reasoning-card,.score-card,.diagnostic-example,.metric-lab,.prediction-panel,.submission-callout,.resource-card,.metric-cards article){background:var(--wash);border-color:var(--line)}
[data-theme=dark] :is(.resource-grid a:hover,.resource-card:hover){background:var(--raised)}
[data-theme=dark] :is(pre,code){background:var(--wash);color:var(--ink);border-color:var(--line)}
[data-theme=dark] :is(.lab-chart-wrap,.metric-visual,.trace-text){background:transparent}
[data-theme=dark] .lab-guide p{border-color:#76508d}
[data-theme=dark] .lab-hypotheses article:last-child h2:before{border-color:var(--plot-m7)}
[data-theme=dark] :is(.instrument-grid path,.lab-grid,.proposal-grid){stroke:var(--line)}
[data-theme=dark] :is(.instrument-axis,.lab-axis,.proposal-axis){stroke:#796588}
[data-theme=dark] :is(#environment-plot text,#environment-plot .instrument-axis-title,#lab-chart text,.proposal-field text){fill:var(--muted)}
[data-theme=dark] #lab-chart .lab-axis-title{fill:var(--ink)}
[data-theme=dark] :is(.sample,.lab-observation){fill:var(--surface)}
[data-theme=dark] .sample.product{stroke:var(--plot-m7)}
[data-theme=dark] .instrument-curve.product{stroke:var(--plot-m7)}
[data-theme=dark] .sample.inspected.product{fill:var(--plot-m7)}
[data-theme=dark] .cycle-orbit{fill:#201729;stroke:#342341}
[data-theme=dark] .cycle-node rect{fill:#21192b;stroke:#c292da}
[data-theme=dark] .cycle-node.additional rect{fill:#30261c;stroke:#cfa06a}
[data-theme=dark] .cycle-node.inactive rect{fill:#33202c;stroke:#d58ea8}
[data-theme=dark] .cycle-edge.exchange{color:#b2a2be}
[data-theme=dark] .cycle-edge.additional{color:#e9af70}
[data-theme=dark] .cycle-edge.inactive{color:#ec9fb9}
[data-theme=dark] .cycle-observable circle{fill:var(--surface);stroke:#a18bad}
[data-theme=dark] :is(.cycle-node text,.cycle-observable text,.cycle-reagent){fill:var(--ink)}
[data-theme=dark] .cycle-center{fill:#c4a6d5}
[data-theme=dark] .cycle-path-key .exchange:before{background:#b2a2be}
[data-theme=dark] .cycle-path-key .additional:before{background:#e9af70}
[data-theme=dark] .cycle-path-key .inactive:before{background:#ec9fb9}
/* Archived paper figures retain their original white canvas and colors. */
[data-theme=dark] :is(.zoom img,.figure-card img,.result-figures img,#dialog-image){background:white;border-radius:4px}
@media(max-width:1050px){.site-header{gap:18px}.site-header nav{gap:15px}.header-paper{display:none}}
@media(max-width:760px){.site-header{position:relative;padding:12px 20px 0;gap:6px}.site-header .brand{padding-right:32px;min-height:42px}.theme-toggle{position:absolute;right:14px;top:11px;width:40px;height:40px;padding:10px}.site-header nav{width:100%;gap:17px;justify-content:flex-start}.conference-mark{margin-bottom:18px}.conference-mark img{width:132px}.home-hero{padding-top:30px}.film-nav{font-size:15px;gap:8px 15px}.film-voice-note{line-height:1.6}}
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}}
[data-theme=dark] #rubric-panel{border-color:var(--line)}
[data-theme=dark] .score-row>span{background:#4b315d;color:#f1d5ff}
[data-theme=dark] .trace-controls button{background:var(--surface);border-color:var(--line)}
[data-theme=dark] .trace-controls .selected{background:#68328c;border-color:#b979d9;color:white}
[data-theme=dark] .benchmark-page .experiment-rail span{color:var(--pink)}
[data-theme=dark] .plot-label span{color:var(--orange)}
.lab-invitation-actions{display:flex;gap:22px;flex-wrap:wrap}.lab-invitation-actions a{font-size:16px}
@media(max-width:600px){.site-header nav{display:grid;grid-template-columns:repeat(3,1fr);gap:0 12px;overflow:visible;padding:0 0 4px}.site-header nav a{text-align:center;padding:6px 0}.site-header nav a[aria-current=page]:after{left:20%;right:20%;bottom:1px}.site-header .brand{padding-right:28px}.lab-invitation-actions{gap:14px 24px}}

.authors{font-size:15px}.affiliations{font-size:13px}
@media(max-width:760px){.authors{font-size:14px;line-height:1.8}.affiliations{font-size:12px}}

/* Reserve the instrument's final size so direct film links do not move on load. */
#lab-chart{height:340px}.lab-condition{min-height:24px}.lab-inspector p{min-height:26px}
@media(max-width:543px){#lab-chart{height:290px}.lab-condition{min-height:48px}}
