/* TraceMend shared tokens (2026-11-19 night, D1). Every page reads this file first.
   Colours are the first page's (candidate A5) three :root sets: light, dark from the system setting, dark chosen on the page.
   Added for the app: --danger (small error text only), --line-strong (secondary bars and hover borders, 3:1 on the page),
   --vid-shade (the dark base of plates and halos drawn on the video, the same in both themes).
   On the video the box colours do not change with the theme (--vid-*). No yellow, no fluorescent colour; red only as --danger.
   Sizes: the app scale (plan 2.4, 2.5, 2.6); the first page keeps its own larger sizes in /static/landing/style.css. */

:root {
  --bg: #ffffff;
  --face: #f6f5f2;
  --text: #1b1a18;
  --muted: #5e5b55;
  --line: #e4e1db;
  --line-strong: #8f8a82;    /* secondary bars, hover borders: 3.4:1 on --bg, 3.1:1 on --face */
  --accent: #5b43b8;         /* the target, flagged-item ticks, model points, chosen tab, links: 7.1:1 */
  --cand: #c04a8e;           /* rank-1 photo border, comparison points in graphs: 4.6:1 */
  --danger: #b3261e;         /* small error text only: 6.5:1 */
  --tag-ink: #ffffff;        /* text on an accent tag: 7.1:1 */
  --paper: #ffffff;          /* white plate of figures and app pieces, kept in dark */
  --tb-base: #ece9f2;        /* time bar base line */
  --tb-target: #8472ca;      /* time bar target track: 4.0:1 */
  --tb-cand: #c9659f;        /* time bar candidate track: 3.6:1 */
  --vid-accent: #5b43b8;     /* on the video: target box and tag (both themes) */
  --vid-cand: #c04a8e;       /* on the video: candidate box and tag (both themes) */
  --vid-ring: #ffffff;       /* on the video: outer ring of boxes, reviewer-drawn zones and lines */
  --vid-ink: #ffffff;        /* on the video: tag text */
  --vid-shade: #0d0e10;      /* on the video: base of dark plates and text halos (used with alpha) */
  --vid-face: #f6f5f2;
  --vid-text: #1b1a18;
  --vid-muted: #4f4c47;
  --vid-bub: rgb(250 249 255 / 0.8);
  --vid-bub-line: rgb(91 67 184 / 0.24);
  --vid-bub-shadow: rgb(27 22 56 / 0.12);

  --font: "Wanted Sans", system-ui, -apple-system, "Segoe UI", "Malgun Gothic", sans-serif;
  --fs-page: 28px;           /* page title */
  --fs-section: 20px;        /* section title */
  --fs-panel: 16px;          /* panel title, item name */
  --fs-body: 14px;           /* body text, table cells */
  --fs-aux: 13px;            /* notes, table heads, captions */
  --fs-min: 12px;            /* axis ticks, bar tags, key hints */
  --sp-1: 4px; --sp-2: 8px; --sp-3: 12px; --sp-4: 16px; --sp-5: 24px; --sp-6: 32px; --sp-7: 48px;
  --r-btn: 8px;              /* buttons and inputs */
  --r-panel: 12px;           /* video frame and panels */
  --r-photo: 6px;            /* photos and tags */
  --top-h: 56px;             /* the header of every app page */
  --btn-h: 36px; --btn-h-sm: 32px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #151413; --face: #1f1e1c; --text: #f2f0ec; --muted: #a9a59e; --line: #36332f; --line-strong: #77726b;
    --accent: #9282e6; --cand: #c4508f; --danger: #f08a80; --tag-ink: #0a0908;
    --tb-base: #2b2932; --tb-target: #776cae; --tb-cand: #cd7896;
    --vid-face: #1f1e1c; --vid-text: #f2f0ec; --vid-muted: #cfc9c0;
    --vid-bub: rgb(21 20 19 / 0.8); --vid-bub-line: rgb(255 255 255 / 0.14); --vid-bub-shadow: rgb(0 0 0 / 0.32);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #151413; --face: #1f1e1c; --text: #f2f0ec; --muted: #a9a59e; --line: #36332f; --line-strong: #77726b;
  --accent: #9282e6; --cand: #c4508f; --danger: #f08a80; --tag-ink: #0a0908;
  --tb-base: #2b2932; --tb-target: #776cae; --tb-cand: #cd7896;
  --vid-face: #1f1e1c; --vid-text: #f2f0ec; --vid-muted: #cfc9c0;
  --vid-bub: rgb(21 20 19 / 0.8); --vid-bub-line: rgb(255 255 255 / 0.14); --vid-bub-shadow: rgb(0 0 0 / 0.32);
  color-scheme: dark;
}
