/* The original v59 ivory pages supply the light palette. */
:root { color-scheme:light; }
.mast .theme-switch {
  min-height:44px; padding:.45rem .78rem; font:600 .83rem/1.3 var(--sans);
  border:1px solid #9aa28d; border-radius:999px; color:#344236; background:#fffdf7; white-space:nowrap;
}
.mast-tag { margin-left:auto; }
@media(max-width:400px) {
  .mast { gap:.45rem; flex-wrap:wrap; padding-block:.4rem; }
  .mast-tag { font-size:.73rem; }
}
@media screen {
  :root[data-theme="dark"] {
    color-scheme:dark; --ivory:#f4f0e6; --ink:#f4f0e6; --muted:#bec1b4; --line:#54584e;
    --dark-page:#101011; --dark-panel:#222522; --dark-tint:#2c332b;
  }
  :root[data-theme="dark"] body,
  :root[data-theme="dark"] .masthead {background:var(--dark-page);color:var(--ink)}
  :root[data-theme="dark"] .mast .wordmark,
  :root[data-theme="dark"] .hero h1 em,
  :root[data-theme="dark"] .footer-brand {color:var(--gold)}
  :root[data-theme="dark"] .hero {
    background:radial-gradient(ellipse at 82% 42%,#252d23 0%,transparent 51%),linear-gradient(150deg,#161817 12%,#1d201c 100%);
    color:var(--ink);
  }
  :root[data-theme="dark"] :is(.first,.findings details[open],.scope-builder .summary-panel) {
    background:var(--dark-panel);color:var(--ink);box-shadow:none;
  }
  :root[data-theme="dark"] :is(.scope,.title-demo,.find-body .example,.local a,.next,.decision,.steps button) {
    background:var(--dark-tint);color:var(--ink);
  }
  :root[data-theme="dark"] :is(.intro,.first p:not(.eyebrow),.mast-tag,.fine,.rider-journey li span,.find-body dd) {
    color:var(--muted);
  }
  :root[data-theme="dark"] :is(.eyebrow,.label,.stamp,.pair small,.title-demo small,.find-body dt,.scope-builder legend,.rider-journey li::marker) {color:var(--sage);}
  :root[data-theme="dark"] :is(.hero-link,.link-light) {color:var(--gold)}
  :root[data-theme="dark"] :is(.theme-switch,.text-button) {background:var(--dark-panel);color:var(--ink);border-color:#8e9689;}
  :root[data-theme="dark"] .text-button:hover {background:var(--dark-tint)}
  :root[data-theme="dark"] .button {background:var(--gold);color:#211c13}
  :root[data-theme="dark"] .button:hover {background:#efd5a3}
  :root[data-theme="dark"] :focus-visible {outline-color:var(--gold)}
}