/* Shared tokens; scoped component sheets consume them without external fonts/CDNs. */
:root{--surface-alt:#fafafe;--topic-line:#d6e5ff;--hover:#f8f7fc}
html[data-theme=light]{color-scheme:light}
html[data-theme=dark]{color-scheme:dark;--bg:#111116;--paper:#1c1b23;--text:#eeeaf5;--muted:#aea7bb;--border:#393342;--accent:#b9a4ff;--soft:#302641;--green:#87d6ba;--surface-alt:#24212d;--topic-line:#465c80;--hover:#282332}
.header-tools{display:flex;align-items:center;justify-content:flex-end;gap:12px;flex-wrap:wrap}
#appearance-control{display:flex;flex-shrink:0}
#theme-toggle{height:36px;width:38px;padding:0;font-size:22px;border-radius:10px;background:var(--paper);color:var(--text)}
button:focus-visible,a:focus-visible,summary:focus-visible{outline:3px solid var(--accent);outline-offset:3px}
[data-theme=dark] :is(.sidebar,header,.panel,.card,.metric,.table-wrap,.topic-summary button,.settings-tabs,.news-date-filters,.pill,.badge,button,input,select,textarea,dialog){background:var(--paper);color:var(--text);border-color:var(--border)}
[data-theme=dark] :is(th,.workspace,pre,.empty,.media-figure){background:var(--surface-alt);color:var(--muted)}
[data-theme=dark] :is(td,th,.row){border-color:var(--border)}
[data-theme=dark] :is(label,.metric-top,nav button){color:var(--muted)}
[data-theme=dark] :is(.primary,nav button.active,.settings-tabs [aria-selected=true],.topic-summary button.selected){background:var(--soft);color:var(--accent);border-color:var(--accent)}
[data-theme=dark] .primary:hover{background:#41325e}
[data-theme=dark] .banner{background:var(--soft);color:var(--text);border-color:var(--border)}
[data-theme=dark] .badge.ok{background:#203c34;color:#9ee3c8;border-color:#315749}
[data-theme=dark] .badge.warn{background:#3c3120;color:#f0cd8f;border-color:#64502c}
[data-theme=dark] .badge.bad{background:#42262e;color:#f6a4b1;border-color:#68404a}
[data-theme=dark] :is(.danger,#auth-error,.collection-control small){color:#ffa5ad}
[data-theme=dark] #notice{background:#3a2c25;color:#f1c7a3}
[data-theme=dark] .auth-art{background:#282137}
[data-theme=dark] .auth-art>span,[data-theme=dark] .auth-art p{color:#c3b6e2}
[data-theme=dark] .orb{background:linear-gradient(145deg,#41334f,#6b508c);box-shadow:40px 50px 100px #20182e;color:#e4d3ff}
@media(max-width:700px){.header-tools{width:100%;justify-content:space-between}header{overflow-wrap:anywhere}footer{overflow-wrap:anywhere}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{scroll-behavior:auto!important;animation-duration:.01ms!important;transition-duration:.01ms!important}}
