/* 02 / Cool mist. 04 / Graphite. Both share the illustrations' blue-grey hue. */
:root {
  color-scheme:light;
  --theme-bg:#edf2f5; --theme-surface:#e2eaf0; --theme-ink:#182e3b;
  --theme-secondary:#526d7d; --theme-muted:#617b8b;
  --theme-line:#c0d0db; --theme-line-strong:#8a9eac;
  --theme-accent:#356b83; --theme-accent-soft:#688ea3;
}
:root[data-theme=dark] {
  color-scheme:dark;
  --theme-bg:#171f28; --theme-surface:#242f3b; --theme-ink:#e8edf2;
  --theme-secondary:#afbcc8; --theme-muted:#9cabb9;
  --theme-line:#3b4b5a; --theme-line-strong:#738493;
  --theme-accent:#b2c7d4; --theme-accent-soft:#8caabd;
  --art-feather-x:8%; --art-feather-y:9%;
  --art-blend:lighten;
}
/* Each theme has its own art direction, with no first-paint source swap. */
:root:not([data-theme=dark]) img.theme-art-dark,
[data-theme=dark] img.theme-art-light { display:none; }
:root :is(.home-media>a,.home-media-picture) {
  background:var(--theme-bg);
  border-radius:0;
  isolation:isolate;
}
[data-theme=dark] :is(.home-media img,.report-cover-image,.report-body .concept-image) {
  border-radius:0;
  background:transparent;
  mix-blend-mode:var(--art-blend);
  -webkit-mask-image:linear-gradient(to right,transparent,#000 var(--art-feather-x),#000 calc(100% - var(--art-feather-x)),transparent),linear-gradient(to bottom,transparent,#000 var(--art-feather-y),#000 calc(100% - var(--art-feather-y)),transparent);
  mask-image:linear-gradient(to right,transparent,#000 var(--art-feather-x),#000 calc(100% - var(--art-feather-x)),transparent),linear-gradient(to bottom,transparent,#000 var(--art-feather-y),#000 calc(100% - var(--art-feather-y)),transparent);
  -webkit-mask-composite:source-in;
  mask-composite:intersect;
}
:root .report-cover { isolation:isolate; background:var(--theme-bg); }
:root:not([data-theme=dark]) :is(.home-media>a,.home-media-picture,.report-cover-image,.report-body .concept-image) {
  border-radius:0;
  border:0;
  background:transparent;
}
:root:not([data-theme=dark]) :is(.home-media img,.report-cover-image,.report-body .concept-image) {
  -webkit-mask-image:none;
  mask-image:none;
  filter:none;
  opacity:1;
  mix-blend-mode:normal;
}
:root:not([data-theme=dark]) img.theme-art-light { object-fit:contain; }
:root:not([data-theme=dark]) .home-image-stages { color:var(--theme-secondary); }
:root:not([data-theme=dark]) .home-image-stages li { border-color:var(--theme-line); }
[data-theme=dark] .report-cover>.report-cover-image { --art-feather-y:15%; }
@media(max-width:760px) {
  :root[data-theme=dark] { --art-feather-x:6%; --art-feather-y:7%; }
  [data-theme=dark] .report-cover>.report-cover-image { --art-feather-y:9%; }
}
.theme-switch { display:inline-flex; align-items:center; justify-content:center; flex:0 0 44px; width:44px; height:44px; padding:10px; border:1px solid var(--theme-line); border-radius:50%; background:transparent; color:var(--theme-ink); cursor:pointer; }
.theme-switch svg { display:block; width:20px; height:20px; }
.theme-switch .theme-moon { display:none; }
[data-theme=dark] .theme-switch .theme-sun { display:none; }
[data-theme=dark] .theme-switch .theme-moon { display:block; }
.theme-switch:hover { background:var(--theme-surface); border-color:var(--theme-accent); }
.theme-switch:focus-visible { outline:2px solid var(--theme-accent); outline-offset:4px; }
/* Keep navigation compact on small phones without shrinking tap targets. */
@media(max-width:440px) {
  .archive-header .brand { gap:6px; }
  .archive-header .brand>span.brand-name { display:block; width:3em; white-space:nowrap; font-size:12px; line-height:1.35; }
  html:lang(en) .archive-header .brand>span.brand-name { display:block; width:5.8em; white-space:normal; font-size:10px; }
  .archive-header .home-return { display:none; }
  .archive-header .header-actions { gap:6px; }
}
/* The atlas keeps its scientific viewing stage dark; its reading chrome follows the site. */
html[data-atlas] { --bg:var(--theme-bg); --panel:var(--theme-surface); --ink:var(--theme-ink); --muted:var(--theme-secondary); --line:var(--theme-line); --accent:var(--theme-accent); --blue:var(--theme-accent); }
html[data-atlas] :is(.research-network,.brand small,.site-header nav,.edition,.intro-actions>a) { color:var(--theme-secondary); }
html[data-atlas] .research-network { align-items:center; }
html[data-atlas] .research-network>span { margin-left:auto; }
html[data-atlas] .begin-journey { background:var(--theme-surface); color:var(--theme-ink); border-color:var(--theme-line-strong); }
html[data-atlas] .begin-journey:hover { border-color:var(--theme-accent); }
html[data-atlas] .explorer { --bg:#171f28; --panel:#242f3b; --ink:#e8edf2; --muted:#afbcc8; --line:#3b4b5a; --accent:#b2c7d4; --blue:#b2c7d4; color:var(--ink); color-scheme:dark; }
html[data-atlas] :is(.page-fold,.connections,.methods,.tabs,.question,footer) { border-color:var(--theme-line); }
html[data-atlas] :is(.page-fold>summary,.page-fold>summary small,.page-fold>summary::before,.section-heading p,.eyebrow,.redshift,.tabs button,.note,.sources,.question span,.chain small,.chain>span,.methods,.references p,.references a,footer) { color:var(--theme-secondary); }
html[data-atlas] :is(#panel,.tabs button[aria-selected=true],.question strong,.chain button,.footer-brand) { color:var(--theme-ink); }
html[data-atlas] .chain button { border-color:var(--theme-line); }
html[data-atlas] .chain button:hover { background:var(--theme-surface); }
@media(max-width:600px) { html[data-atlas] .research-network>span { display:none; } }
