/* Semantic colours are shared by every page and every state. */
:root {
  color-scheme: light;
  --paper: #fafaf7; --ink: #20211f; --soft: #62645d; --line: #dadbd4;
  --surface: #efefeb; --hover: #f0f0eb; --active: #e6e7e1; --accent: #3f4b3d;
  --hero-gray: var(--paper); --nav-bg: var(--paper); --nav-ink: var(--ink); --nav-muted: var(--soft);
  --research-paper: var(--paper); --research-ink: var(--ink); --research-muted: var(--soft);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    color-scheme: dark;
    --paper: #111214; --ink: #f2f1ec; --soft: #b3b4ad; --line: #36383a;
    --surface: #232527; --hover: #202225; --active: #2d3033; --accent: #bdcbb5;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --paper: #111214; --ink: #f2f1ec; --soft: #b3b4ad; --line: #36383a;
  --surface: #232527; --hover: #202225; --active: #2d3033; --accent: #bdcbb5;
}
.header-actions { display: flex; align-items: center; gap: 18px; margin-left: auto; }
.site-preferences { display: flex; align-items: center; gap: 12px; }
.language-switch { display: inline-flex; align-items: center; gap: 2px; }
.language-switch a { display: inline-flex; align-items: center; justify-content: center; min-width: 32px; min-height: 44px; font-size: 12px; font-weight: 500; letter-spacing: .04em; opacity: .65; }
.language-switch a[aria-current] { opacity: 1; text-decoration: underline; text-underline-offset: 6px; text-decoration-thickness: 1px; }
.language-switch a:hover { opacity: 1; }
.theme-toggle { display: grid; place-items: center; width: 44px; height: 44px; padding: 10px; border: 1px solid currentColor; border-radius: 50%; background: transparent; }
.theme-toggle svg { width: 18px; height: 18px; }
.theme-toggle:active { opacity: .65; }
.navigation-panel { background: var(--nav-bg); color: var(--nav-ink); }
.navigation-panel > p:first-of-type, .navigation-note { color: var(--nav-muted); }
.navigation-panel :focus-visible { outline-color: var(--nav-ink); }
.media-frame, .image-unavailable, .selected-material .media-frame { background: var(--surface); }
.archive-card > a:hover, .archive-card > a:focus-visible, .recovery-projects a:hover { background: var(--hover); }
.archive-card > a:active, .material-viewer button:hover:enabled, .material-viewer-actions a:hover { background: var(--active); }
.material-viewer-stage { background: var(--active); scrollbar-color: var(--soft) var(--active); }
[data-theme="dark"] .editorial-section-heading h2 span, [data-theme="dark"] .archive-header h1 span, [data-theme="dark"] .case-editorial-header h1 span { color: var(--soft); }


@media (min-width: 900px) and (max-width: 1100px) { .header-inner { gap: 16px; } .desktop-nav { gap: 16px; } .header-actions { gap: 12px; } .site-preferences { gap: 4px; } }
@media (max-width: 899px) { .header-actions { width: 100%; flex-wrap: wrap; justify-content: space-between; gap: 12px; } .navigation-ready .header-actions { width: auto; flex-wrap: nowrap; } .site-preferences { gap: 6px; } .menu-toggle { min-width: 44px; } }
@media (max-width: 380px) { .header-inner { column-gap: 4px; } .wordmark { font-size: 14px; gap: 5px; } .header-actions { gap: 6px; } .site-preferences { gap: 2px; } .language-switch a { min-width: 27px; } .theme-toggle { width: 40px; height: 40px; } }

.theme-picker { position: relative; flex-shrink: 0; }
.theme-picker > summary { list-style: none; cursor: pointer; }
.theme-picker > summary::-webkit-details-marker { display: none; }
.theme-picker[open] > summary { background: var(--ink); color: var(--paper); }
.theme-options { position: absolute; z-index: 25; right: 0; top: calc(100% + 12px); width: 168px; margin: 0; padding: 8px; border: 1px solid var(--line); background: var(--paper); color: var(--ink); box-shadow: 0 10px 30px #0002; }
.theme-options label { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 8px 12px; cursor: pointer; font-size: 15px; }
.theme-options label:hover { background: var(--hover); }
.theme-options label:has(:focus-visible) { outline: 2px solid var(--ink); outline-offset: -2px; }
.theme-options input { width: 16px; height: 16px; margin: 0; accent-color: var(--ink); }
.navigation-panel > p:first-of-type { border-color: var(--line); }
.navigation-panel a:hover { color: var(--ink); }
