/* Veridict design tokens (05 §1; Veridict Design System). Names are kept verbatim so the design
   system is the reference. Light is the default; the dark theme is `prefers-color-scheme: dark`
   unless the page forces `data-theme="light"`, or `data-theme="dark"` forces it on.
   Partner and tenant branding may override only the white-label-allowed tokens (product name,
   logos, primary, primary-hover, on-primary, accent, footer); status, AI-proposal,
   evidence-highlight, typography and layout tokens are locked (05 §3 rule 14). So are the
   `--rail-*` tokens (the navigation rail look, 11 row "Rail look"): a branding override cannot
   touch them, which keeps the rail's contrast ratios (computed below) true.
   Fonts are self-hosted WOFF2 (air-gapped installs); see static/vendor/README.md.
   Logical properties only: no physical left/right (05 §3 rule 9). */

@font-face {
  font-family: "Roboto";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/roboto-latin-400-normal.4279528ce0e7.woff2") format("woff2");
}
@font-face {
  font-family: "Roboto";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/roboto-latin-500-normal.55cfeb5304f0.woff2") format("woff2");
}
@font-face {
  font-family: "Roboto";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/roboto-latin-700-normal.10a07810f28f.woff2") format("woff2");
}
@font-face {
  font-family: "Roboto Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/roboto-mono-latin-400-normal.a06583dfa488.woff2") format("woff2");
}

:root {
  color-scheme: light dark;
  /* Brand */
  --tessa-deep-blue: #2b3990;
  --tessa-light-blue: #27aae1;
  --tessa-orange: #f15a29;
  --tessa-grey: #b3b3b3;
  --tessa-black: #333333;
  /* Surfaces */
  --surface: #ffffff;
  --surface-subtle: #f5f6fa;
  --surface-raised: #ffffff;
  --surface-selected: #e7eaf6;
  --border-subtle: #dde1ea;
  --border-control: #8a93a6;
  /* Text */
  --ink: #333333;
  --ink-muted: #5c6370;
  --ink-inverse: #ffffff;
  /* Actions */
  --primary: var(--tessa-deep-blue);
  --primary-hover: #222e78;
  --on-primary: #ffffff;
  --link: #2b3990;
  --focus-ring: #1a7baa;
  --accent: var(--tessa-orange);
  /* Status */
  --status-compliant-fg: #166534;
  --status-compliant-bg: #dcfce7;
  --status-partial-fg: #92400e;
  --status-partial-bg: #fef3c7;
  --status-noncompliant-fg: #9f1239;
  --status-noncompliant-bg: #ffe4e6;
  --status-readiness-fg: #2b3990;
  --status-readiness-bg: #e7eaf6;
  --status-neutral-fg: #4b5563;
  --status-neutral-bg: #eef0f3;
  /* AI proposals (always with a 1 px dashed border in ai-proposal-fg) and evidence */
  --ai-proposal-fg: #135e80;
  --ai-proposal-bg: #e3f4fb;
  --evidence-highlight: #fff3bf;
  /* Charts (series order; never good/bad by colour) */
  --chart-1: #2b3990;
  --chart-2: #27aae1;
  --chart-3: #8a93a6;
  --chart-4: #f15a29;
  --chart-track: #e9edf3;
  /* Elevation */
  --shadow-1: 0 1px 2px rgba(20, 23, 31, 0.08), 0 4px 12px rgba(20, 23, 31, 0.06);

  /* Spacing, radius (05 §1) */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --radius-sm: 4px;
  --radius-md: 6px;
  --radius-lg: 8px;
  --radius-pill: 999px;
  /* Typography: size / line / weight per role (05 §1) */
  --font-sans: "Roboto", "Noto Sans Arabic", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  --font-mono: "Roboto Mono", ui-monospace, Consolas, monospace;
  --text-display-size: 40px;
  --text-display-line: 44px;
  --text-display-weight: 700;
  --text-h1-size: 28px;
  --text-h1-line: 34px;
  --text-h1-weight: 700;
  --text-h2-size: 20px;
  --text-h2-line: 28px;
  --text-h2-weight: 700;
  --text-h3-size: 16px;
  --text-h3-line: 24px;
  --text-h3-weight: 500;
  --text-body-size: 14px;
  --text-body-line: 22px;
  --text-body-lg-size: 16px;
  --text-body-lg-line: 26px;
  --text-body-sm-size: 13px;
  --text-body-sm-line: 20px;
  --text-label-size: 12px;
  --text-label-line: 16px;
  --text-label-weight: 500;
  --text-caption-size: 12px;
  --text-caption-line: 16px;
  --text-code-size: 13px;
  --text-code-line: 20px;
  --text-metric-size: 30px;
  --text-metric-line: 36px;
  --text-metric-weight: 500;
  /* Layout */
  /* Rail and top bar (VE6-S1; locked, not white-label; D2300, revised by Darko 2026-11-17): the
     rail is a deep TESSA blue with a solid red selected fill (#c8401a, a deeper shade of Tessa red
     #ed572c so white text reaches AA) and no side accent bar; the top bar is TESSA grey #b2b2b2 with
     dark text, and its current language is bold with a dark outline (no fill, no red).
     Contrast (WCAG 2.x), on the ground / on hover / on the selected fill:
     rail light  ground #1e286e, hover #2b388f: ink #ffffff 13.26 / 10.17 / 5.00; muted #dfe3f7
                 10.40 / 7.97; focus ring #ffffff as ink; mark #8fd8f5 8.40 / 6.44.
     rail dark   ground #121847, hover #242c68: ink 16.84 / 12.84 / 5.00; muted 13.20 / 10.07.
     top light   ground #b2b2b2, hover #c4c4c4: ink #1a1a1a 8.21 / 9.98; muted #333333 5.96 / 7.24;
                 control border #4d4d4d 3.99 / 4.85; focus ring #1a1a1a as ink, 3.48 on #c8401a.
     top dark    ground #3a3a3a, hover #4a4a4a: ink #ffffff 11.37 / 8.86; muted #d0d0d0 7.37 /
                 5.75; control border #9a9a9a 4.04 / 3.15.
     --topbar-selected / --topbar-on-selected (#c8401a / #ffffff, 5.00) mark the current option in
     top-bar menus (View as, D2301). Dividers are decorative. */
  --rail-bg: #1e286e;
  --rail-ink: #ffffff;
  --rail-ink-muted: #dfe3f7;
  --rail-hover: #2b388f;
  --rail-selected: #c8401a;
  --rail-mark: #8fd8f5;
  --rail-divider: #3a4585;
  --rail-focus-ring: #ffffff;
  --topbar-bg: #b2b2b2;
  --topbar-ink: #1a1a1a;
  --topbar-ink-muted: #333333;
  --topbar-hover: #c4c4c4;
  --topbar-selected: #c8401a;
  --topbar-on-selected: #ffffff;
  --topbar-border: #4d4d4d;
  --topbar-focus-ring: #1a1a1a;
  --rail-width: 220px;
  --rail-width-compact: 64px;
  --page-max-width: 1440px;
  --page-padding: 32px;
  --control-height: 36px;
  --control-height-large: 44px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --surface: #14171f;
    --surface-subtle: #1b1f2a;
    --surface-raised: #222736;
    --surface-selected: #26305a;
    --border-subtle: #343a4c;
    --border-control: #6e768a;
    --ink: #eceef3;
    --ink-muted: #a9b0bf;
    --ink-inverse: #14171f;
    --primary: var(--tessa-light-blue);
    --primary-hover: #5bc0ea;
    --on-primary: #0e1a2b;
    --link: #6cc7ee;
    --focus-ring: #5bc0ea;
    --status-compliant-fg: #86efac;
    --status-compliant-bg: #163322;
    --status-partial-fg: #fcd34d;
    --status-partial-bg: #3a2a0a;
    --status-noncompliant-fg: #fda4af;
    --status-noncompliant-bg: #3f1420;
    --status-readiness-fg: #afb8f0;
    --status-readiness-bg: #232a52;
    --status-neutral-fg: #c8cdd6;
    --status-neutral-bg: #2a2f3b;
    --ai-proposal-fg: #8ed6f3;
    --ai-proposal-bg: #123445;
    --evidence-highlight: #4a3f12;
    --chart-1: #7d8ce0;
    --chart-track: #2b3140;
    --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.4), 0 4px 12px rgba(0, 0, 0, 0.3);
    --rail-bg: #121847;
    --rail-ink: #ffffff;
    --rail-ink-muted: #dfe3f7;
    --rail-hover: #242c68;
    --rail-selected: #c8401a;
    --rail-mark: #8fd8f5;
    --rail-divider: #3a4380;
    --rail-focus-ring: #ffffff;
    --topbar-bg: #3a3a3a;
    --topbar-ink: #ffffff;
    --topbar-ink-muted: #d0d0d0;
    --topbar-hover: #4a4a4a;
    --topbar-selected: #c8401a;
    --topbar-on-selected: #ffffff;
    --topbar-border: #9a9a9a;
    --topbar-focus-ring: #ffffff;
  }
}

:root[data-theme="light"] {
  color-scheme: light;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --surface: #14171f;
  --surface-subtle: #1b1f2a;
  --surface-raised: #222736;
  --surface-selected: #26305a;
  --border-subtle: #343a4c;
  --border-control: #6e768a;
  --ink: #eceef3;
  --ink-muted: #a9b0bf;
  --ink-inverse: #14171f;
  --primary: var(--tessa-light-blue);
  --primary-hover: #5bc0ea;
  --on-primary: #0e1a2b;
  --link: #6cc7ee;
  --focus-ring: #5bc0ea;
  --status-compliant-fg: #86efac;
  --status-compliant-bg: #163322;
  --status-partial-fg: #fcd34d;
  --status-partial-bg: #3a2a0a;
  --status-noncompliant-fg: #fda4af;
  --status-noncompliant-bg: #3f1420;
  --status-readiness-fg: #afb8f0;
  --status-readiness-bg: #232a52;
  --status-neutral-fg: #c8cdd6;
  --status-neutral-bg: #2a2f3b;
  --ai-proposal-fg: #8ed6f3;
  --ai-proposal-bg: #123445;
  --evidence-highlight: #4a3f12;
  --chart-1: #7d8ce0;
  --chart-track: #2b3140;
  --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.4), 0 4px 12px rgba(0, 0, 0, 0.3);
  --rail-bg: #121847;
  --rail-ink: #ffffff;
  --rail-ink-muted: #dfe3f7;
  --rail-hover: #242c68;
  --rail-selected: #c8401a;
  --rail-mark: #8fd8f5;
  --rail-divider: #3a4380;
  --rail-focus-ring: #ffffff;
  --topbar-bg: #3a3a3a;
  --topbar-ink: #ffffff;
  --topbar-ink-muted: #d0d0d0;
  --topbar-hover: #4a4a4a;
  --topbar-selected: #c8401a;
  --topbar-on-selected: #ffffff;
  --topbar-border: #9a9a9a;
  --topbar-focus-ring: #ffffff;
}
