/* Design tokens, the single source for server pages and the app shell. Rule 66: three-state theme,
   with dark defined twice (the system preference unless forced light, and an explicit data-theme="dark").
   No color literals outside this block. tools/contrast.php checks the pairs below in BOTH themes (rule 63). */
:root {
  --bg:#f7f7f5; --fg:#1d1d1b; --muted:#5c5c57; --card:#ffffff; --search:#ffffff; --entry:#ffffff; --line:#d4d4cd; --subtle:#efefeb;
  --accent:#1f5fa8; --accent-fg:#ffffff; --ok:#1b6e3a; --warn:#8a5a00; --bad:#a32020; --bad-bg:#fcecec; --focus:#1f5fa8; --mark:#fff1a8;
  --lane-notes:#6b4fa0; --lane-calls:#1f6e6e; --lane-meetings:#8a4b1a; --lane-tasks:#1f5fa8; --lane-emails:#1b6e3a; --lane-surveys:#a0346b; --lane-changes:#5c5c57; --lane-journeys:#7a5c00; --lane-stages:#4a4fa8; --swim-holiday:#f6e7cf;
  --depth-1:#1f5fa8; --depth-2:#1b6e3a; --depth-3:#8a4b1a; --depth-4:#6b4fa0;
  --tl-done:#3d6b4f; --tl-planned:#4f6688;
  --stage-done-bg:#e4f2e9; --stage-now-bg:#e3edf9; --stage-cut-bg:#efefeb; --stage-stall-bg:#fbefd8; --stage-ahead:#7d7d76; --stage-arrow:#5c5c57;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg:#161615; --fg:#ececea; --muted:#a6a6a0; --card:#20201e; --search:#20201e; --entry:#20201e; --line:#3d3d3a; --subtle:#2a2a27;
    --accent:#7fb2ee; --accent-fg:#0d1b2a; --ok:#5fcf8a; --warn:#e8b65a; --bad:#ff8a8a; --bad-bg:#3a1f1f; --focus:#7fb2ee; --mark:#3e350c;
    --lane-notes:#c4a8f0; --lane-calls:#6fd0d0; --lane-meetings:#f0ad73; --lane-tasks:#7fb2ee; --lane-emails:#5fcf8a; --lane-surveys:#f08cc0; --lane-changes:#b5b5ae; --lane-journeys:#e8c35a; --lane-stages:#a9adf5; --swim-holiday:#3a3020;
    --depth-1:#7fb2ee; --depth-2:#5fcf8a; --depth-3:#f0ad73; --depth-4:#c4a8f0;
    --tl-done:#7fbf95; --tl-planned:#93abd0;
    --stage-done-bg:#1e3326; --stage-now-bg:#1c2a3d; --stage-cut-bg:#2a2a27; --stage-stall-bg:#3a2e1a; --stage-ahead:#85857e; --stage-arrow:#a6a6a0;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg:#161615; --fg:#ececea; --muted:#a6a6a0; --card:#20201e; --search:#20201e; --entry:#20201e; --line:#3d3d3a; --subtle:#2a2a27;
  --accent:#7fb2ee; --accent-fg:#0d1b2a; --ok:#5fcf8a; --warn:#e8b65a; --bad:#ff8a8a; --bad-bg:#3a1f1f; --focus:#7fb2ee; --mark:#3e350c;
  --lane-notes:#c4a8f0; --lane-calls:#6fd0d0; --lane-meetings:#f0ad73; --lane-tasks:#7fb2ee; --lane-emails:#5fcf8a; --lane-surveys:#f08cc0; --lane-changes:#b5b5ae; --lane-journeys:#e8c35a; --lane-stages:#a9adf5; --swim-holiday:#3a3020;
  --depth-1:#7fb2ee; --depth-2:#5fcf8a; --depth-3:#f0ad73; --depth-4:#c4a8f0;
  --tl-done:#7fbf95; --tl-planned:#93abd0;
  --stage-done-bg:#1e3326; --stage-now-bg:#1c2a3d; --stage-cut-bg:#2a2a27; --stage-stall-bg:#3a2e1a; --stage-ahead:#85857e; --stage-arrow:#a6a6a0;
  color-scheme: dark;
}
body { margin:0; background:var(--bg); color:var(--fg); font:16px/1.5 system-ui, sans-serif; }
main { max-width:860px; margin:0 auto; padding:24px 16px; }
a { color:var(--accent); }
:focus-visible { outline:2px solid var(--focus); outline-offset:2px; }
.card { background:var(--card); border:1px solid var(--line); border-radius:8px; padding:16px; margin-bottom:16px; overflow-x:auto; }
table { border-collapse:collapse; width:100%; }
th, td { text-align:left; padding:6px 8px; border-bottom:1px solid var(--line); }
th { color:var(--muted); font-weight:600; font-size:14px; }
.ok { color:var(--ok); } .bad { color:var(--bad); } .warn { color:var(--warn); } small { color:var(--muted); }

/* hidden means hidden, whatever display a class gives (the Tasks part showed its filter row) */
[hidden] { display:none !important; }
