/* Shared light/dark tokens + pill theme toggle (Palette 09/10). No deck styles. */
:root, html[data-theme="dark"]{
  color-scheme: dark;
  --bg:#000000;
  --bg-elev:#111113;
  --text:#f5f5f7;
  --text-2:#a1a1a6;
  --text-3:#6e6e73;
  --hairline:rgba(255,255,255,.14);
  --hairline-2:rgba(255,255,255,.08);
  --glass:rgba(20,20,22,.72);
  --glass-soft:rgba(255,255,255,.05);
  --shadow:0 18px 40px rgba(0,0,0,.5);
  --focus:#f0f0f0;
  --pill-bg:rgba(255,255,255,.08);
  --pill-active:#2c2c2e;
}
html[data-theme="light"]{
  color-scheme: light;
  --bg:#f5f5f7;
  --bg-elev:#ffffff;
  --text:#1d1d1f;
  --text-2:#6e6e73;
  --text-3:#86868b;
  --hairline:rgba(0,0,0,.12);
  --hairline-2:rgba(0,0,0,.06);
  --glass:rgba(255,255,255,.78);
  --glass-soft:rgba(255,255,255,.65);
  --shadow:0 14px 36px rgba(0,0,0,.08);
  --focus:#1d1d1f;
  --pill-bg:rgba(0,0,0,.05);
  --pill-active:#ffffff;
}
html,body{background:var(--bg)!important;color:var(--text)}

/* Sun/moon pill like mocks 09/10 */
.theme-toggle{
  --tw:74px; --th:32px;
  width:var(--tw); height:var(--th); border-radius:999px;
  border:1px solid var(--hairline);
  background:var(--pill-bg); color:var(--text-2);
  cursor:pointer; padding:0; position:relative;
  display:inline-grid; grid-template-columns:1fr 1fr; align-items:center;
  -webkit-backdrop-filter:blur(12px); backdrop-filter:blur(12px);
}
.theme-toggle:focus-visible{outline:2px solid var(--focus); outline-offset:2px}
.theme-toggle .ico-sun,.theme-toggle .ico-moon{
  width:16px; height:16px; margin:0 auto; display:block;
  fill:none; stroke:currentColor; stroke-width:1.6; stroke-linecap:round; stroke-linejoin:round;
  position:relative; z-index:1; opacity:.55;
}
.theme-toggle::before{
  content:""; position:absolute; top:2px; left:2px; width:calc(50% - 2px); height:calc(100% - 4px);
  border-radius:999px; background:var(--pill-active); box-shadow:0 1px 3px rgba(0,0,0,.18);
  transition:transform .2s ease;
}
html[data-theme="dark"] .theme-toggle::before{transform:translateX(100%)}
html[data-theme="light"] .theme-toggle .ico-sun,
html[data-theme="dark"] .theme-toggle .ico-moon{opacity:1; color:var(--text)}
@media(prefers-reduced-motion:reduce){.theme-toggle::before{transition:none}}
