/* Theme control uses the same visual language as the locale selector. */
.theme-toggle{display:inline-grid;place-items:center;color:var(--brand);border:0;background:none;border-radius:8px;inline-size:44px;block-size:44px;padding:0;flex:none;cursor:pointer}
.theme-toggle[hidden],.theme-sun,[data-theme="dark"] .theme-moon{display:none}
[data-theme="dark"] .theme-sun{display:block}
.theme-toggle:hover{background:var(--wash)}
.mast-inner .tools{gap:clamp(2px,1.1vw,15px)}
@media(max-width:360px){.mast-inner{column-gap:5px}.mast-inner .tools{gap:1px}.mast-inner .langs{gap:1px}.mast-inner .langs a,.mast-inner .language-unavailable{padding-inline:4px}}

:root[data-theme="dark"]{
 color-scheme:dark;
 --paper:#121a15;
 --wash:#1b2820;
 --quiet-surface:#18231c;
 --ink:#eef3eb;
 --ink-soft:#c0d0c2;
 --muted:#b5c7b8;
 --brand:#a9d8ab;
 --brand-strong:#bce6b9;
 --site-chrome:#123524;
 --line:#465d4d;
 --deep:#101c15;
}
[data-theme="dark"] .mast{background:var(--paper)}
[data-theme="dark"] .identity img{filter:brightness(0) invert(1);opacity:.94}
[data-theme="dark"] .skip,[data-theme="dark"] .classic-rule span{background:var(--paper)}
[data-theme="dark"] .about-band{background:var(--paper)}
[data-theme="dark"] .home-contacts .classic-rule span{background:var(--wash)}
[data-theme="dark"] .button:not(.classic-archive-link .button,.about-action .button){background:var(--brand);color:#15291b;border-color:var(--brand)}
[data-theme="dark"] .button:not(.classic-archive-link .button,.about-action .button):hover{background:var(--brand-strong);border-color:var(--brand-strong)}
[data-theme="dark"] .about-action .button:active{background:#2d4534}
[data-theme="dark"] .search-field{background:var(--quiet-surface);border-color:#879b8b}
[data-theme="dark"] .participant-risk{background:#33251d;color:#f7e5d9;border-inline-start-color:#f2b494}
[data-theme="dark"] .participant-risk-icon{color:#f2b494}
[data-theme="dark"] .classic-home .home-panorama{background:#263129}
[data-theme="dark"] .classic-home .home-panorama::after{background:linear-gradient(90deg,#15221bfa 0%,#15221bde 34%,#15221b80 57%,#15221b16 83%)}
[data-theme="dark"] .classic-home .hero-copy h1{color:#f3f8ef}
[data-theme="dark"] .classic-home .hero-intro{color:#e1eee0}
@media(max-width:800px){[data-theme="dark"] .classic-home .home-panorama::after{background:linear-gradient(90deg,#132019ff 0%,#132019f4 40%,#132019d6 57%,#13201923 92%)}}
@media(max-width:680px){[data-theme="dark"] .classic-home .home-panorama::after{background:linear-gradient(180deg,#132019ff 0%,#132019fa 28%,#132019e7 54%,#13201980 75%,#13201916 100%)}}

/* Phone navigation: a native disclosure with an anchored, single-column panel. */
@media(max-width:680px){
 .mobile-nav{position:relative;z-index:5}
 .mobile-nav summary{min-block-size:48px;padding-inline:2px}
 .mobile-nav-label{display:inline-flex;align-items:center;gap:10px}
 .mobile-nav-label svg{flex:none;opacity:.9}
 .mobile-nav:not([open])>nav{display:none}
 .mobile-nav[open]>nav{
  position:absolute;inset-block-start:calc(100% + 6px);inset-inline:var(--gutter);
  display:grid;grid-template-columns:minmax(0,1fr);gap:0;
  margin:0;padding:5px 10px;color:var(--ink);background:var(--paper);
  border:1px solid var(--line);border-radius:10px;
  box-shadow:0 10px 24px rgba(10,28,17,.20);
 }
 .mobile-nav>nav a{color:var(--ink);padding:10px 10px;font-weight:650;border:0}
 .mobile-nav>nav a+a{border-block-start:1px solid var(--line)}
 .mobile-nav>nav a[aria-current],.mobile-nav>nav a:hover{color:var(--brand);background:var(--wash);text-decoration:none}
 .mobile-nav>nav a:focus-visible{outline-color:var(--brand);outline-offset:-3px}
 [data-theme="dark"] .mobile-nav[open]>nav{background:var(--quiet-surface);box-shadow:0 10px 24px rgba(0,0,0,.35)}
}

/* Calmer dark palette: retain readable contrast without bright white surfaces. */
:root[data-theme="dark"]{
 --paper:#202523;--wash:#29312c;--quiet-surface:#252b27;
 --ink:#d7ddd6;--ink-soft:#bcc6bd;--muted:#aeb9af;
 --brand:#a6c6ab;--brand-strong:#bad1bc;
 --site-chrome:#283831;--line:#49574e;--deep:#1a211d;
}
[data-theme="dark"] .nav-bar,
[data-theme="dark"] .nav-main a,
[data-theme="dark"] .footer{color:var(--ink)}
[data-theme="dark"] .identity img{opacity:.81}
[data-theme="dark"] .classic-archive-link .button{background:var(--quiet-surface);color:var(--brand);border-color:#667f6a}
[data-theme="dark"] .classic-archive-link .button:hover{background:var(--wash);color:var(--brand-strong)}
[data-theme="dark"] .participant-risk{background:#342c27;color:#e6cfc0;border-inline-start-color:#d4a68d}
[data-theme="dark"] .participant-risk-icon{color:#d4a68d}
[data-theme="dark"] .classic-home .home-panorama img{filter:brightness(.86) saturate(.83)}
[data-theme="dark"] .classic-home .hero-copy h1{color:#dce3d9}
[data-theme="dark"] .classic-home .hero-intro{color:#c8d2c8}
[data-theme="dark"] .classic-home .home-panorama::after{background:linear-gradient(90deg,#202523fa 0%,#202523e8 38%,#202523a3 60%,#20252320 92%)}
@media(max-width:800px){[data-theme="dark"] .classic-home .home-panorama::after{background:linear-gradient(90deg,#202523ff 0%,#202523f5 40%,#202523e0 58%,#20252335 96%)}}
@media(max-width:680px){[data-theme="dark"] .classic-home .home-panorama::after{background:linear-gradient(180deg,#202523ff 0%,#202523fa 28%,#202523e7 54%,#20252386 78%,#20252322 100%)}}
[data-theme="dark"] .feature{filter:brightness(.84) saturate(.94)}
