/* Theme tokens. Every page (including the embedded library tools) reads these variables.
   "auto" follows the device; the Windows themes recolour the same layout rather than redesign it. */
:root,:root[data-theme=light],:root[data-theme=auto]{
  color-scheme:light;
  --font:system-ui,-apple-system,"Segoe UI",Roboto,sans-serif;--font-head:"Iowan Old Style","Palatino Linotype",Georgia,serif;
  --radius:8px;--radius-lg:12px;
  --page:#f5f4ef;--surface:#fffefb;--sunken:#eeede5;--line:#dfdfd3;--line-strong:#c9cabb;
  --text:#1f2d28;--muted:#5f6b65;--accent:#24614a;--on-accent:#fff;--accent-soft:#e1eee7;
  --ok:#1e6b3a;--ok-soft:#dff0e3;--warn:#7a5200;--warn-soft:#f7edd3;--bad:#a12d2d;--bad-soft:#f9e1e1;
  --header-bg:#fffefb;--header-text:#1f2d28;
  --cover-0:#dcebe2;--cover-0-text:#1f5a42;--cover-1:#d9ebe9;--cover-1-text:#1d5753;--cover-2:#f6e3da;--cover-2-text:#7a3218;
  --cover-3:#e7ead6;--cover-3-text:#4d5a1c;--cover-4:#f3e8cf;--cover-4-text:#6b4a08;--cover-5:#e3e7e4;--cover-5-text:#3c4a43;
}
@media (prefers-color-scheme:dark){
  :root[data-theme=auto]{
    color-scheme:dark;
    --page:#121815;--surface:#1a221e;--sunken:#232c27;--line:#2f3b35;--line-strong:#43524a;
    --text:#e6ede9;--muted:#a0b0a7;--accent:#86d3ae;--on-accent:#0e2a1e;--accent-soft:#1f3a2e;
    --ok:#8fd8a4;--ok-soft:#1c3526;--warn:#f0c674;--warn-soft:#3a301a;--bad:#f39b9b;--bad-soft:#3e2225;
    --header-bg:#161d19;--header-text:#e6ede9;
    --cover-0:#1f3a2e;--cover-0-text:#a6e0c3;--cover-1:#173a37;--cover-1-text:#a3dcd6;--cover-2:#47271b;--cover-2-text:#f2c0a8;
    --cover-3:#303a19;--cover-3-text:#d3df9f;--cover-4:#3d3117;--cover-4-text:#ecd29a;--cover-5:#29322d;--cover-5-text:#c3cfc8;
  }
}
:root[data-theme=dark]{
  color-scheme:dark;
  --page:#121815;--surface:#1a221e;--sunken:#232c27;--line:#2f3b35;--line-strong:#43524a;
  --text:#e6ede9;--muted:#a0b0a7;--accent:#86d3ae;--on-accent:#0e2a1e;--accent-soft:#1f3a2e;
  --ok:#8fd8a4;--ok-soft:#1c3526;--warn:#f0c674;--warn-soft:#3a301a;--bad:#f39b9b;--bad-soft:#3e2225;
  --header-bg:#161d19;--header-text:#e6ede9;
  --cover-0:#1f3a2e;--cover-0-text:#a6e0c3;--cover-1:#173a37;--cover-1-text:#a3dcd6;--cover-2:#47271b;--cover-2-text:#f2c0a8;
  --cover-3:#303a19;--cover-3-text:#d3df9f;--cover-4:#3d3117;--cover-4-text:#ecd29a;--cover-5:#29322d;--cover-5-text:#c3cfc8;
}

/* Windows 95: grey bevels on teal, navy highlights, no rounding. */
:root[data-theme=win95]{
  color-scheme:light;
  --font:Tahoma,"Microsoft Sans Serif",Arial,sans-serif;--font-head:Tahoma,"Microsoft Sans Serif",Arial,sans-serif;
  --radius:0;--radius-lg:0;
  --page:#008080;--surface:#c0c0c0;--sunken:#dfdfdf;--line:#808080;--line-strong:#404040;
  --text:#000;--muted:#303030;--accent:#000080;--on-accent:#fff;--accent-soft:#c6c6e6;
  --ok:#006000;--ok-soft:#d2ead2;--warn:#6a4800;--warn-soft:#f1e6c2;--bad:#a00000;--bad-soft:#f0d0d0;
  --header-bg:#000080;--header-text:#fff;
  --cover-0:#fff;--cover-0-text:#000080;--cover-1:#fff;--cover-1-text:#800080;--cover-2:#fff;--cover-2-text:#800000;
  --cover-3:#fff;--cover-3-text:#008080;--cover-4:#fff;--cover-4-text:#808000;--cover-5:#fff;--cover-5-text:#000;
}
:root[data-theme=win95] body{font-size:14px}
:root[data-theme=win95] :is(.rows,.metric,.lane,.book,.login,.empty,fieldset,.checks li,.segments,.side,.quiet-empty,.manager iframe){border:2px solid;border-color:#fff #808080 #808080 #fff;background:var(--surface)}
:root[data-theme=win95] :is(button,.button){border:2px solid;border-color:#fff #404040 #404040 #fff;box-shadow:inset -1px -1px #808080,inset 1px 1px #dfdfdf;background:#c0c0c0;color:#000}
:root[data-theme=win95] :is(button,.button):active{border-color:#404040 #fff #fff #404040;box-shadow:none}
:root[data-theme=win95] :is(.primary,.segments button[aria-pressed=true],.side a[aria-current=page]){background:#000080;color:#fff}
:root[data-theme=win95] :is(input,select){border:2px solid;border-color:#808080 #fff #fff #808080;background:#fff}
:root[data-theme=win95] .side{padding:8px}
:root[data-theme=win95] .side a{color:#000}
:root[data-theme=win95] .topbar{border-bottom:2px solid #000}
:root[data-theme=win95] .mark{background:#c0c0c0;color:#000080;border:2px outset #fff}
:root[data-theme=win95] .cover{border:2px inset #fff}
:root[data-theme=win95] .journey li{border-radius:0}
:root[data-theme=win95] .journey li[data-state=current]{background:repeating-linear-gradient(90deg,#000080 0 6px,#c0c0c0 6px 8px)}
:root[data-theme=win95] :is(.pill,.badge,.live,.avatar,.count){border-radius:0;border:1px solid #808080}
:root[data-theme=win95] .tabbar{border-top:2px solid #fff;background:#c0c0c0}
:root[data-theme=win95] :focus-visible{outline:1px dotted #000;outline-offset:2px}
:root[data-theme=win95] .footer{color:#fff}

/* Windows XP: Luna blue title bar, cream panels, glossy buttons. */
:root[data-theme=winxp]{
  color-scheme:light;
  --font:"Trebuchet MS",Tahoma,sans-serif;--font-head:"Trebuchet MS",Tahoma,sans-serif;
  --radius:4px;--radius-lg:6px;
  --page:#ece9d8;--surface:#fff;--sunken:#f2f0e4;--line:#b8c8de;--line-strong:#7f9db9;
  --text:#172948;--muted:#4a5d7a;--accent:#0b56d0;--on-accent:#fff;--accent-soft:#dde9fb;
  --ok:#1f7a2a;--ok-soft:#ddf1dc;--warn:#7a5000;--warn-soft:#fbf0cf;--bad:#b0221f;--bad-soft:#fbe0de;
  --header-bg:linear-gradient(#4599ff 0%,#0965e7 12%,#0053d8 85%,#003c9e 100%);--header-text:#fff;
  --cover-0:#dde9fb;--cover-0-text:#0b3f99;--cover-1:#e7f2d6;--cover-1-text:#2f6a12;--cover-2:#fbe7cf;--cover-2-text:#8a4300;
  --cover-3:#e3e0f6;--cover-3-text:#3b2f8f;--cover-4:#fdf3c8;--cover-4-text:#6d5400;--cover-5:#f7dfe3;--cover-5-text:#8a2035;
}
:root[data-theme=winxp] .topbar{border-bottom:0}
:root[data-theme=winxp] :is(button,.button){background:linear-gradient(#fff,#ecebe4);border-color:#003c74}
:root[data-theme=winxp] .topbar .quiet{background:transparent;border-color:transparent;color:#fff}
:root[data-theme=winxp] .topbar .quiet:hover{background:rgb(255 255 255/.2)}
:root[data-theme=winxp] .primary{background:linear-gradient(#3f8cf3,#0b56d0);border-color:#003c74;color:#fff}
:root[data-theme=winxp] .side{padding:10px;background:linear-gradient(#7aa1e6,#6375d6);border-radius:var(--radius-lg)}
:root[data-theme=winxp] .side a,:root[data-theme=winxp] .side .group{color:#fff}
:root[data-theme=winxp] .side a[aria-current=page],:root[data-theme=winxp] .side a:hover{background:rgb(255 255 255/.25);color:#fff}
:root[data-theme=winxp] .side .count{background:#fff}
