/* DatumAR's one set of design tokens (direction B "Workshop", owner 2026-10-29): colours, type, spacing, corners, motion
   and target sizes, shared by the web app (style.css), the companion (companion.css) and the printed check record, which
   embeds this file (reports.py). The issue report PDF reads its colours from here too (design_tokens.py).
   It lives beside the companion's files so the companion's build versions it with them (http.py companion_build).

   Colours are named by role, never by hue. Each is the sRGB hex of the OKLCH value beside it, so lightness steps are even
   and contrast can be reasoned from L. Light is the default; data-theme="dark" and data-theme="contrast" (High contrast)
   on <html> switch every role at once. The companion is dark only. test_design_tokens.py checks the WCAG contrast of the
   pairs the pages use (text 7:1, muted and status text 4.5:1, control edges 3:1) in all three themes.

   The fonts are served by the DatumAR server itself (static/vendor, pinned in vendor.json and checked by
   scripts/vendor_js.py verify), so pages look the same with no internet. Latin subset; a weight downloads only when a
   page uses it. */

@font-face {
  font-family: "Archivo"; font-style: normal; font-weight: 700; font-display: swap;
  src: url(/static/vendor/archivo-5.3.0/archivo-latin-700-normal.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Archivo"; font-style: normal; font-weight: 800; font-display: swap;
  src: url(/static/vendor/archivo-5.3.0/archivo-latin-800-normal.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "IBM Plex Sans"; font-style: normal; font-weight: 400; font-display: swap;
  src: url(/static/vendor/ibm-plex-sans-5.3.0/ibm-plex-sans-latin-400-normal.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "IBM Plex Sans"; font-style: normal; font-weight: 500; font-display: swap;
  src: url(/static/vendor/ibm-plex-sans-5.3.0/ibm-plex-sans-latin-500-normal.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "IBM Plex Sans"; font-style: normal; font-weight: 600; font-display: swap;
  src: url(/static/vendor/ibm-plex-sans-5.3.0/ibm-plex-sans-latin-600-normal.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "IBM Plex Mono"; font-style: normal; font-weight: 500; font-display: swap;
  src: url(/static/vendor/ibm-plex-mono-5.3.0/ibm-plex-mono-latin-500-normal.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "IBM Plex Mono"; font-style: normal; font-weight: 700; font-display: swap;
  src: url(/static/vendor/ibm-plex-mono-5.3.0/ibm-plex-mono-latin-700-normal.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  color-scheme: light;
  --canvas: #f6f3ee; /* oklch(96.5% 0.008 78) */
  --surface: #fffdfc; /* oklch(99.6% 0.003 78) */
  --surface-sunken: #efeae4; /* oklch(94% 0.01 78) */
  --surface-raised: #fffdfc; /* oklch(99.6% 0.003 78) */
  --border: #ded8cf; /* oklch(88.5% 0.014 78) */
  --border-control: #717c87; /* oklch(58% 0.022 250) */
  --text: #1b2530; /* oklch(26% 0.025 250) */
  --text-muted: #525c67; /* oklch(47% 0.022 250) */
  --accent-fill: #b2440a; /* oklch(53% 0.155 42) */
  --accent-fill-hover: #9e3e0e; /* oklch(49% 0.14 42) */
  --on-accent: #ffffff; /* oklch(100% 0 0) */
  --accent-text: #a94008; /* oklch(51% 0.15 42) */
  --accent-tint: #fce2d4; /* oklch(93% 0.035 50) */
  --control: #efeae4; /* oklch(94% 0.01 78) */
  --control-hover: #e4dfd7; /* oklch(90.5% 0.012 78) */
  --hover: #f2eee8; /* oklch(95% 0.009 78) */
  --success: #116f42; /* oklch(48% 0.11 156) */
  --warning: #875804; /* oklch(50% 0.105 73) */
  --danger: #b3203a; /* oklch(50% 0.18 18) */
  --danger-fill: #b3203a; /* oklch(50% 0.18 18) */
  --danger-fill-hover: #9e122f; /* oklch(45% 0.17 18) */
  --on-danger: #ffffff; /* oklch(100% 0 0) */
  --info: #246099; /* oklch(48% 0.11 250) */
  /* The field behind typed text. */
  --field: var(--surface);
  /* The brand lockup keeps the brand's exact Signal Orange (brand/README.md). */
  --lockup-ink: var(--text);
  --lockup-accent: #b94b16;
  /* Raised surfaces lift with tone and one soft shadow in light; in dark, tone alone. */
  --shadow-raised: 0 1px 2px rgb(27 37 48 / 0.06), 0 2px 8px rgb(27 37 48 / 0.05);
  --shadow-overlay: 0 24px 64px rgb(27 37 48 / 0.18);
  --backdrop: rgb(27 37 48 / 0.45);
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --canvas: #121920; /* oklch(21% 0.018 249) */
  --surface: #1b242d; /* oklch(25.5% 0.022 249) */
  --surface-sunken: #0b1117; /* oklch(17.5% 0.016 249) */
  --surface-raised: #232e38; /* oklch(29.5% 0.024 249) */
  --border: #313c47; /* oklch(35% 0.025 249) */
  --border-control: #738292; /* oklch(60% 0.03 249) */
  --text: #f8f4ef; /* oklch(97% 0.008 75) */
  --text-muted: #b3bcc5; /* oklch(79% 0.016 248) */
  --accent-fill: #b2440a; /* oklch(53% 0.155 42) */
  --accent-fill-hover: #9e3e0e; /* oklch(49% 0.14 42) */
  --on-accent: #fefbf7; /* oklch(99% 0.006 75) */
  --accent-text: #fe9856; /* oklch(77.4% 0.146 52) */
  --accent-tint: #512d1c; /* oklch(34% 0.06 45) */
  --control: #29343f; /* oklch(32% 0.025 249) */
  --control-hover: #35414e; /* oklch(37% 0.027 249) */
  --hover: #252f3a; /* oklch(30% 0.024 249) */
  --success: #46ce83; /* oklch(76% 0.16 155) */
  --warning: #f2c94e; /* oklch(85% 0.145 90) */
  --danger: #fb8278; /* oklch(74% 0.15 26) */
  --danger-fill: #b02a2a; /* oklch(50% 0.17 26) */
  --danger-fill-hover: #9b1e20; /* oklch(45% 0.16 26) */
  --on-danger: #ffffff; /* oklch(100% 0 0) */
  --info: #7fb6ee; /* oklch(76% 0.1 250) */
  --field: var(--surface-sunken);
  --lockup-accent: #fe9857;
  --shadow-raised: none;
  --shadow-overlay: 0 24px 64px rgb(0 0 0 / 0.5);
  --backdrop: rgb(6 9 13 / 0.72);
}
/* High contrast: every text role at 7:1 or more and control edges at 7:1, for a bright shop or weaker eyesight. */
:root[data-theme="contrast"] {
  color-scheme: light;
  --canvas: #fbfcfd; /* oklch(99% 0.002 250) */
  --surface: #ffffff; /* oklch(100% 0 0) */
  --surface-sunken: #f0f2f4; /* oklch(96% 0.004 250) */
  --surface-raised: #ffffff; /* oklch(100% 0 0) */
  --border: #999fa6; /* oklch(70% 0.012 250) */
  --border-control: #4d5660; /* oklch(45% 0.02 250) */
  --text: #050a0f; /* oklch(14% 0.015 250) */
  --text-muted: #3b434d; /* oklch(38% 0.02 250) */
  --accent-fill: #993d10; /* oklch(48% 0.135 42) */
  --accent-fill-hover: #89340b; /* oklch(44% 0.125 42) */
  --on-accent: #ffffff; /* oklch(100% 0 0) */
  --accent-text: #8f3a14; /* oklch(46% 0.125 42) */
  --accent-tint: #fde6da; /* oklch(94% 0.03 50) */
  --control: #f0f2f4; /* oklch(96% 0.004 250) */
  --control-hover: #dee2e5; /* oklch(91% 0.006 250) */
  --hover: #eceff1; /* oklch(95% 0.004 250) */
  --success: #095c34; /* oklch(42% 0.1 155) */
  --warning: #704908; /* oklch(44% 0.09 73) */
  --danger: #9e1326; /* oklch(45% 0.17 22) */
  --danger-fill: #9e1326; /* oklch(45% 0.17 22) */
  --danger-fill-hover: #8a021c; /* oklch(40% 0.16 22) */
  --on-danger: #ffffff; /* oklch(100% 0 0) */
  --info: #0e4f86; /* oklch(42% 0.11 250) */
  --lockup-accent: #993d10;
  --shadow-raised: none;
}
:root {
  /* Status as a tinted background and an outline, with the status colour as text on top. */
  --success-tint: color-mix(in srgb, var(--success) 12%, var(--surface));
  --warning-tint: color-mix(in srgb, var(--warning) 12%, var(--surface));
  --danger-tint: color-mix(in srgb, var(--danger) 10%, var(--surface));
  --info-tint: color-mix(in srgb, var(--info) 12%, var(--surface));
  --success-line: color-mix(in srgb, var(--success) 45%, transparent);
  --warning-line: color-mix(in srgb, var(--warning) 45%, transparent);
  --danger-line: color-mix(in srgb, var(--danger) 45%, transparent);
  /* The printed page is always light. */
  --paper: #fcf8f3;

  --font-display: "Archivo", "Helvetica Neue", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-body: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, "Cascadia Code", Consolas, monospace;

  /* Eight text sizes (size / line height), for a 16 px tablet base. */
  --type-caption: 500 12px/16px var(--font-body);
  --type-label: 600 13px/18px var(--font-body);
  --type-body-sm: 400 14px/20px var(--font-body);
  --type-body: 400 16px/24px var(--font-body);
  --type-title-sm: 600 18px/24px var(--font-body);
  --type-title: 700 22px/28px var(--font-display);
  --type-page: 700 28px/36px var(--font-display);
  --type-display: 800 40px/48px var(--font-display);
  --type-mono: 500 14px/20px var(--font-mono);

  /* Spacing on a 4 px base. */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 64px;

  /* Corners: controls, cards, sheets, and pills (status badges and chips). */
  --radius-control: 6px;
  --radius-card: 10px;
  --radius-sheet: 14px;
  --radius-pill: 999px;

  /* Targets: every control in the web app takes at least 44 px (WCAG 2.5.5); the companion's main actions take 56 px,
     about 11 mm on an iPad, inside a gloved finger. Compact controls are for dense tables only, never under 24 px. */
  --target-min: 44px;
  --target-field: 56px;
  --target-compact: 36px;

  /* Motion: short, only on opacity, transform and colour, and none when the person asks for less. */
  --dur-fast: 120ms;
  --dur: 180ms;
  --dur-slow: 280ms;
  --ease: cubic-bezier(0.2, 0, 0, 1);
}
@media (prefers-reduced-motion: reduce) {
  :root { --dur-fast: 0ms; --dur: 0ms; --dur-slow: 0ms; }
}
