/* ScholarVault · Claude Design — shared theme toggle + dark tokens */
.sv-theme-btn{position:relative;width:40px;height:40px;flex:none;border-radius:999px;display:inline-grid;place-items:center;cursor:pointer;
  color:inherit;background:transparent;border:1px solid color-mix(in srgb,currentColor 22%,transparent);transition:background .2s,border-color .2s,transform .2s}
.sv-theme-btn:hover{border-color:color-mix(in srgb,currentColor 50%,transparent);transform:rotate(-12deg)}
.sv-theme-btn:focus-visible{outline:2px solid #b8892b;outline-offset:3px}
.sv-theme-btn svg{position:absolute;width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round;transition:transform .5s cubic-bezier(.7,0,.2,1),opacity .3s}
.sv-theme-btn .moon{transform:rotate(90deg) scale(.4);opacity:0}
html[data-theme="dark"] .sv-theme-btn .sun{transform:rotate(-90deg) scale(.4);opacity:0}
html[data-theme="dark"] .sv-theme-btn .moon{transform:none;opacity:1}
.sv-theme-btn.float{position:fixed;left:16px;bottom:16px;z-index:200;background:#fff;color:#0b0b0c;box-shadow:0 10px 30px -12px rgba(0,0,0,.4)}
html[data-theme="dark"] .sv-theme-btn.float{background:#151517;color:#f1efe9}

/* circular reveal (View Transitions API) */
::view-transition-old(root),::view-transition-new(root){animation:none;mix-blend-mode:normal}

/* Dark design tokens — every variation reads the names it uses */
html[data-theme="dark"]{color-scheme:dark;
  --paper:#0d0d0e;--paper-2:#141416;--wall:#111113;
  --ink:#f1efe9;--ink-2:#c9c7c1;--ink-3:#8f8d87;--ink-4:#6b6a66;
  --rule:#26262a;--rule-2:#36363c;
  --gold:#c99a3a;--gold-2:#e0bd6b;--gold-d:#e0bd6b;--gold-deep:#e0bd6b;
  --gold-wash:#1e1810;--gold-w:#1e1810;--gold-line:#4a3a1a;--gold-l:#4a3a1a;
  --t1:#141416;--t2:#1b1710;--t3:#16161a;--t4:#18160f;
  --ok:#5fd39b;--ok-w:#12271c;--warn:#f0b665;--warn-w:#2b1e0c;--bad:#ff8a80;--bad-w:#2d1412;
  --sv-surface:#151517;--sv-deep:#18181b}
html[data-theme="dark"] body{background:#0d0d0e;color:#f1efe9}
html[data-theme="dark"] ::selection{background:#c99a3a;color:#0b0b0c}

/* shared components across variations */
html[data-theme="dark"] .btn-ink{background:#f1efe9;color:#0b0b0c}
html[data-theme="dark"] .btn-line{background:transparent;border-color:#3a3a40;color:#f1efe9}
html[data-theme="dark"] .nav{background:rgba(13,13,14,.82);border-color:#26262a}
html[data-theme="dark"] .tg.n,html[data-theme="dark"] .tag.n{background:#222226;color:#c9c7c1}
/* monochrome logos (institutions, open data, badges) need lifting on dark */
html[data-theme="dark"] :is(.logos,.marq-t,.f-badges,.srcg .sg) img{filter:grayscale(1) invert(1) brightness(1.6);opacity:.75}
