/* Shared design tokens + light/dark themes.
   Light values are the defaults. Dark applies from the device setting (no data-theme yet)
   or when static/theme.js sets data-theme="dark"; data-theme="light" always wins. */
:root{
  --ink:#183c34;--page-bg:#f7f6f1;--surface:#fff;--tint:#eef3ee;--green:#123f36;--brand:#123f36;
  --line:#d8e2da;--line-strong:#a9b9ad;--muted:#586c63;--gold:#ac7b2a;
  --warn-bg:#fdf1dc;--warn-ink:#7a4e08;--err:#9b2c2c;
  --skeleton-a:#e6ede6;--skeleton-b:#f4f7f3;--chrome:#123f36;
  --dk-bg:#101916;--dk-surface:#17231f;--dk-surface-2:#1d2d28;--dk-tint:#24372f;--dk-line:#38504a;
  --dk-text:#e8f1ec;--dk-muted:#aebdb6;--dk-teal:#7fd6d8;--dk-green:#8fdcb3;--dk-red:#ff9aa6;--dk-amber:#f0c36a;--dk-btn:#256b59;
}
@media (prefers-color-scheme:dark){
  :root:not([data-theme]){
    color-scheme:dark;
    --ink:#e8f1ec;--page-bg:#101916;--surface:#17231f;--tint:#24372f;--green:#8fdcb3;--brand:#256b59;
    --line:#38504a;--line-strong:#5a7169;--muted:#aebdb6;--gold:#f0c36a;
    --warn-bg:#3a2e12;--warn-ink:#f0c36a;--err:#ff9aa6;
    --skeleton-a:#24372f;--skeleton-b:#2e453c;--chrome:#101916;
  }
}
:root[data-theme=dark]{
  color-scheme:dark;
  --ink:#e8f1ec;--page-bg:#101916;--surface:#17231f;--tint:#24372f;--green:#8fdcb3;--brand:#256b59;
  --line:#38504a;--line-strong:#5a7169;--muted:#aebdb6;--gold:#f0c36a;
  --warn-bg:#3a2e12;--warn-ink:#f0c36a;--err:#ff9aa6;
  --skeleton-a:#24372f;--skeleton-b:#2e453c;--chrome:#101916;
}
:root[data-theme=light]{color-scheme:light}

.theme-toggle{display:inline-flex;align-items:center;gap:6px;min-height:44px;min-width:44px;padding:6px 14px;border:1px solid var(--line);border-radius:12px;background:var(--surface);color:var(--ink);font:inherit;font-size:.85rem;font-weight:600;cursor:pointer;touch-action:manipulation}
.theme-toggle svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.theme-toggle:focus-visible{outline:3px solid var(--gold);outline-offset:3px}
@media (max-width:420px){.theme-toggle .theme-toggle-label{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}}
