/* Design tokens, reset and typography.
   <html data-theme="light|dark" data-accent="blue|violet|orange" data-density="compact"> are set by js/ui/settings.js
   (and before first paint by the inline script in index.html). No attribute = default. */

:root{
  --bg:#f4f6f4; --surface:#ffffff; --ink:#141815; --muted:#5f6a63; --line:#dde3de;
  --accent:#1f8a4c; --accent-soft:#e3f3e9; --warn:#b54708; --warn-soft:#fdf0e3; --bad:#c0362c; --bad-soft:#fbe9e7;
  --f-body:"IBM Plex Sans",system-ui,-apple-system,"Segoe UI",sans-serif;
  --f-num:"IBM Plex Mono",ui-monospace,"SFMono-Regular",Menlo,monospace;
  --radius:20px;
  color-scheme:light;
}
@media (prefers-color-scheme:dark){:root:not([data-theme="light"]){
  --bg:#0b0d0c; --surface:#131715; --ink:#eef2ef; --muted:#9aa59e; --line:#262c28;
  --accent:#4cc27c; --accent-soft:#14301f; --warn:#f0a35e; --warn-soft:#33220f; --bad:#f2786d; --bad-soft:#371714;
  color-scheme:dark;}}
:root[data-theme="dark"]{
  --bg:#0b0d0c; --surface:#131715; --ink:#eef2ef; --muted:#9aa59e; --line:#262c28;
  --accent:#4cc27c; --accent-soft:#14301f; --warn:#f0a35e; --warn-soft:#33220f; --bad:#f2786d; --bad-soft:#371714;
  color-scheme:dark;}

/* Accent colours (Settings → Appearance). Light first, then dark versions (higher specificity). */
:root[data-accent="blue"]{--accent:#1f6fd1;--accent-soft:#e4eefb}
:root[data-accent="violet"]{--accent:#7a3fd1;--accent-soft:#efe7fb}
:root[data-accent="orange"]{--accent:#c25a0f;--accent-soft:#fcece0}
@media (prefers-color-scheme:dark){
  :root[data-accent="blue"]:not([data-theme="light"]){--accent:#5ea3f2;--accent-soft:#12263f}
  :root[data-accent="violet"]:not([data-theme="light"]){--accent:#b08cf5;--accent-soft:#2a1d40}
  :root[data-accent="orange"]:not([data-theme="light"]){--accent:#f2a15c;--accent-soft:#3a2412}}
:root[data-theme="dark"][data-accent="blue"]{--accent:#5ea3f2;--accent-soft:#12263f}
:root[data-theme="dark"][data-accent="violet"]{--accent:#b08cf5;--accent-soft:#2a1d40}
:root[data-theme="dark"][data-accent="orange"]{--accent:#f2a15c;--accent-soft:#3a2412}

*{box-sizing:border-box}
html,body{margin:0}
body{background:var(--bg);color:var(--ink);font:15px/1.5 var(--f-body);-webkit-font-smoothing:antialiased}
[hidden]{display:none!important}

h1{font-size:22px;font-weight:600;margin:0;text-wrap:balance}
h2{font-size:17px;font-weight:600;margin:0 0 4px}
h3{font-size:15px;font-weight:600;margin:0 0 10px}

/* small utilities */
.num{font-family:var(--f-num);font-variant-numeric:tabular-nums}
.sub{color:var(--muted);font-size:14px;margin:4px 0 0}
.hint{font-size:12px;color:var(--muted);min-height:16px;margin:6px 0 0}
.empty{color:var(--muted);font-size:14px;margin:12px 0 0}
.row{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}
.head{display:flex;align-items:center;justify-content:space-between;gap:12px}
hr{border:0;border-top:1px solid var(--line);margin:18px 0 0}

@media (prefers-reduced-motion:reduce){*{transition:none!important;animation:none!important}}
