/* Dark mode for the Institute look. Same layout, fonts, icons and logo shape; only the colours change.
   Active when <html data-theme="dark"> (set by the switch in the top bar, see Base.astro), never together with the legacy look.
   Rule: new components take their colours from the variables (var(--ink), var(--card) ...), never from fixed colour codes,
   so they work in all looks automatically. */
html[data-theme="dark"]:not([data-look="legacy"]){
  --color-scheme:dark;
  --bg:#0e1614;--card:#15201d;--card-hover:#1a2723;--fig-bg:#15201d;--thumb-bg:#1c2925;--topline-bg:#0a110f;--band-bg:#121c19;
  --ink:#e2ebe8;--muted:#9fb2ac;--rule:#283733;--rule-strong:#3a4d47;--axis:#e2ebe8;
  --accent:#3dbcab;--accent-hover:#6ad2c4;--on-accent:#052420;
  --link:#5cccbd;--link-hover:#ffffff;--warm:#e3a64a;--env:#e3a64a;--comb:#3dbcab;
  --nav-ink:#e2ebe8;--btn-ink:#5cccbd;--btn-border:#3dbcab;
  --c1:#3dbcab;--c2:#e3a64a;--c3:#6aa5e6;--c4:#e27c66;--c5:#a78be0;--sim-1:#3dbcab;--sim-2:#e3a64a;
  --mark-a:#e27c66;--mark-b:#3dbcab;--mark-disc:#2a5e57;
  --foot-bg:#080e0c;--foot-ink:#93a8a1;--foot-head:#ffffff;--foot-rule:#1d2a26;
  --join-bg:#0f4a43;--join-ink:#ffffff;--join-muted:#c3e3de;--join-btn:#ffffff;--join-btn-ink:#0b443d;
  --s0:#3dbcab;--s1:#3dbcab;--s2:#3dbcab;--s3:#3dbcab;--s4:#3dbcab;--s5:#3dbcab;--s6:#3dbcab;--s7:#3dbcab;
}
html[data-theme="dark"]:not([data-look="legacy"]) .join .btn.fill:hover{color:#0b443d}
/* Photos and figures: a touch less glare on a dark page */
html[data-theme="dark"]:not([data-look="legacy"]) .thumb img,html[data-theme="dark"]:not([data-look="legacy"]) .post-fig img,html[data-theme="dark"]:not([data-look="legacy"]) .prose img{filter:brightness(.92)}
/* White-background figures from papers keep a light frame so they stay readable */
html[data-theme="dark"]:not([data-look="legacy"]) .post-fig img{background:#fff}
html[data-theme="dark"]:not([data-look="legacy"]) .simshot,html[data-theme="dark"]:not([data-look="legacy"]) .simthumb{box-shadow:none;border-color:var(--rule-strong)}
html[data-theme="dark"]:not([data-look="legacy"]) .locmap .pin{border-color:#0e1614}
