/* Vet Talk design tokens (audit §2.1). RGB triplets for rgb(var(--x) / a).
   Old names kept as aliases so untouched screens still render. */

:root {
  color-scheme: light;

  /* brand (HVOC palette; an admin theme colour overrides the first six via brand.js) */
  --c-primary: 40 95 134;       /* #285F86 brand ink: primary button, selected segment (6.8:1 white text) */
  --c-primary-hover: 32 82 116;
  --c-primary-deep: 31 74 104;  /* #1F4A68 Pause */
  --c-on-primary: 255 255 255;  /* text/icons on primary; derived by brand.js */
  --c-focus: 56 120 165;        /* #3878A5 brand blue focus ring; derived by brand.js */
  --c-accent: 52 169 197;       /* #34A9C5 cyan, fills/borders only */
  --c-accent-text: 23 120 143;  /* #17788F text on white (5.1:1) */

  /* surfaces */
  --c-bg: 243 246 248;          /* workspace  #F3F6F8 */
  --c-surface: 255 255 255;
  --c-surface-2: 247 249 250;   /* table header, section strip */
  --c-line: 221 228 234;        /* borders  #DDE4EA */
  --c-ink: 37 49 58;            /* #25313A */
  --c-mute: 91 106 116;         /* #5B6A74 (4.8:1 on the bubble tints) */

  /* status (fill / text-safe) */
  --c-ok: 22 150 84;
  --c-ok-text: 21 128 61;
  --c-warn: 217 119 6;
  --c-warn-text: 180 83 9;
  --c-danger: 192 57 43;
  --c-danger-text: 176 42 30;
  --c-info: 37 99 235;
  --c-info-text: 29 78 216;
  --c-ink-3: 95 110 127;
  --c-line-input: 125 139 155;
  --c-owner: 23 120 143;        /* #17788F cyan ink */
  --c-owner-tint: 227 244 248;  /* #E3F4F8 */
  --c-owner-dot: 42 151 177;
  --c-vet: 40 95 134;           /* #285F86 brand ink */
  --c-vet-tint: 230 238 245;    /* #E6EEF5 */
  --c-vet-dot: 56 120 165;
  --c-warn-ink: 138 75 8;
  --c-warn-tint: 253 243 223;
  --c-warn-line: 176 120 0;
  --c-danger-ink: 192 27 27;    /* #C01B1B held dose, failed translation, End */
  --c-danger-tint: 251 234 234;
  --c-ok-ink: 23 102 58;
  --c-ok-tint: 228 244 236;
  --c-info-ink: 29 79 184;
  --c-info-tint: 230 238 245;
  --c-mark: 255 231 163;
  --c-mark-line: 229 185 74;

  /* spacing 4px scale */
  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-5: 24px;
  --sp-6: 32px;

  /* type */
  --fs-xs: 12px;
  --fs-sm: 13px;
  --fs-md: 14px;
  --fs-lg: 16px;
  --fs-xl: 20px;
  --fs-2xl: 24px;
  --fs-18: 18px;
  --fs-live: 23px;
  --fs-live-orig: 15px;
  --font: -apple-system, BlinkMacSystemFont, "PingFang HK", "Noto Sans HK", "Microsoft JhengHei", "Segoe UI", system-ui, sans-serif;
  --font-hans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Noto Sans SC", "Microsoft YaHei", "Segoe UI", system-ui, sans-serif;

  /* density */
  --hit: 32px;
  --row-h: 36px;
  --radius: 12px;
  --radius-sm: 8px;
  --radius-pill: 999px;
  --radius-sheet: 20px;
  --radius-card: 20px;
  --radius-bubble: 22px;
  --shadow-1: 0 1px 3px rgb(31 59 82 / .08), 0 8px 24px rgb(31 59 82 / .06);
  --shadow-2: 0 6px 24px rgb(31 59 82 / .16);
  --shadow-3: 0 24px 48px -16px rgb(31 59 82 / .32);
  --ease: cubic-bezier(.2, .8, .2, 1);
  --t-fast: 160ms;
  --header-h: 56px;
  --nav-w: 232px;
  --dock-h: 72px;
  --banner-h: 56px;

  /* aliases (pre-F0 names; raw RGB so rgb(var(--x)/a) keeps working) */
  --c-primary-soft: 28 84 123;
  --c-accent-soft: 204 240 236;
  --c-success: 22 150 84;
  --radius-control: 6px;
  --radius-segment: 6px;
  --shadow-soft: 0 1px 2px rgb(var(--c-ink) / 0.06);
  --shadow-pop: 0 8px 24px rgb(var(--c-ink) / 0.14);
  --shadow-glass: 0 0 0 0.5px rgb(var(--c-ink) / 0.08), 0 8px 32px rgb(var(--c-primary) / 0.10);
}

@media (pointer: coarse) {
  :root {
    --hit: 44px;
    --row-h: 48px;
  }
}
@media (orientation: landscape) and (min-width: 1024px) { :root { --fs-live: 24px; } }
@media (max-width: 599px) { :root { --fs-live: 20px; } }
@media (prefers-reduced-motion: reduce) { :root { --t-fast: 0ms; } }
