/* =====================================================================
   Candour · design tokens
   A clinic that shows its working. Light is "Case notes" (warm note
   paper, a pink margin rule); dark is "After hours". --claret is the one
   accent (buttons, links, the lit phrase); --pen is the blue of a
   clinician's annotations (times, initials, ticks in the record);
   --marker is the highlighter behind a phrase (text stays ink).
   No green anywhere: on regulated-health sites it reads as "plant".
   ===================================================================== */
:root {
  color-scheme: light;
  --paper: #f6f4ef;
  --card: #fffdf9;
  --well: #ece8df;
  --line: #ddd6c9;
  --rule: #e9e3d7;                    /* ruled lines in the record */
  --margin: #e7a3b3;                  /* the record's margin rule */
  --ink: #1f1c24;
  --ink-2: #3e3946;
  --muted: #625c6a;
  --claret: #8c2343;
  --claret-2: #6f1a34;
  --on-claret: #ffffff;
  --claret-soft: #f4e2e7;
  --pen: #2b4fa0;
  --pen-soft: #e3e9f7;
  --marker: #ffe48a;
  --stamp: #b3263e;
  --alert: #b42318;
  --focus: #2b4fa0;
  --shadow-card: 0 1px 0 rgba(31, 28, 36, 0.05), 0 12px 26px -18px rgba(31, 28, 36, 0.4);
  --shadow-paper: 0 1px 1px rgba(31, 28, 36, 0.06), 0 2px 0 -1px #fffdf9, 0 3px 0 -1px rgba(31, 28, 36, 0.08), 0 26px 50px -30px rgba(31, 28, 36, 0.45);

  --display: "Red Hat Display", "Segoe UI", system-ui, sans-serif;
  --body: "Red Hat Text", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Red Hat Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  --fs-h1: clamp(42px, 5.8vw, 82px);
  --fs-h2: clamp(32px, 3.8vw, 52px);
  --fs-h3: 21px;
  --fs-lead: clamp(18px, 1.35vw, 21px);
  --fs-body: 17.5px;
  --fs-small: 15px;
  --fs-label: 12.5px;

  --wrap: 1180px;
  --gutter: max(20px, 4vw);
  --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px; --s-5: 24px; --s-6: 40px; --s-7: 64px; --s-8: 104px;

  --r-s: 6px;
  --r-m: 10px;
  --r-l: 16px;
  --r-pill: 999px;

  --ease: cubic-bezier(0.25, 0.75, 0.3, 1);
  --write: cubic-bezier(0.55, 0, 0.35, 1);
  --d-fast: 150ms;
  --d: 300ms;
  --d-slow: 700ms;
}

/* ---------- After hours ---------- */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --paper: #16141b;
    --card: #1f1c26;
    --well: #1a1820;
    --line: #34303d;
    --rule: #2a2733;
    --margin: #6b3445;
    --ink: #f1eef4;
    --ink-2: #cdc8d4;
    --muted: #9d97a6;
    --claret: #f08aa6;
    --claret-2: #f6aabd;
    --on-claret: #2a0612;
    --claret-soft: #3a1a26;
    --pen: #9db7ff;
    --pen-soft: #1d2440;
    --marker: rgba(255, 214, 90, 0.3);
    --stamp: #ff7d93;
    --alert: #ff8a7a;
    --focus: #9db7ff;
    --shadow-card: 0 1px 0 rgba(255, 255, 255, 0.03) inset, 0 12px 26px -16px rgba(0, 0, 0, 0.8);
    --shadow-paper: 0 1px 0 rgba(255, 255, 255, 0.04) inset, 0 28px 50px -26px rgba(0, 0, 0, 0.9);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --paper: #16141b;
  --card: #1f1c26;
  --well: #1a1820;
  --line: #34303d;
  --rule: #2a2733;
  --margin: #6b3445;
  --ink: #f1eef4;
  --ink-2: #cdc8d4;
  --muted: #9d97a6;
  --claret: #f08aa6;
  --claret-2: #f6aabd;
  --on-claret: #2a0612;
  --claret-soft: #3a1a26;
  --pen: #9db7ff;
  --pen-soft: #1d2440;
  --marker: rgba(255, 214, 90, 0.3);
  --stamp: #ff7d93;
  --alert: #ff8a7a;
  --focus: #9db7ff;
  --shadow-card: 0 1px 0 rgba(255, 255, 255, 0.03) inset, 0 12px 26px -16px rgba(0, 0, 0, 0.8);
  --shadow-paper: 0 1px 0 rgba(255, 255, 255, 0.04) inset, 0 28px 50px -26px rgba(0, 0, 0, 0.9);
}
