/* Stream shared design tokens v1.0 – Mira, 21 Nov 2026 (UTC+7)
   Canonical set for all internal Stream apps (approved one shared theme, 21 Nov 2026).
   Based on the SDD token set. Names, primitives, semantic, status, charts, spacing,
   radius, shadow, z-index and layout values are unchanged except typography and
   the additions marked below.
   official = Stream brand guide 2026 · 28th = anniversary art direction
   derived = for WCAG 2.2 AA, needs marketing sign-off.
   Default theme: light, Navy+Light / Executive White. No dark mode in v1.0.
   Stream Connect A/B/C option themes are not part of this set.
   Contrast ratios (WCAG 2.x) are against the background named in the comment. */
@font-face{font-family:"Inter";src:url("fonts/Inter-var-latin.woff2") format("woff2");font-weight:100 900;font-display:swap}
@font-face{font-family:"Noto Sans Thai";src:url("fonts/NotoSansThai-var.woff2") format("woff2");font-weight:100 900;font-display:swap}
@font-face{font-family:"Noto Sans Mono";src:url("fonts/NotoSansMono-var-latin.woff2") format("woff2");font-weight:100 900;font-display:swap}
:root{
  /* ── Primitives ── */
  --c-blue-100:#DCE7F8; /* official; on white 1.25:1, on navy 11.09:1 */
  --c-blue-400:#6386D9; /* official; on white 3.53:1, on navy 3.92:1 */
  --c-navy-900:#1B2C4E; /* official; on white 13.84:1, on navy 1.0:1 */
  --c-red-100:#FCE3E4; /* official; on white 1.22:1, on navy 11.37:1 */
  --c-red-400:#F36B72; /* official; on white 2.93:1, on navy 4.72:1 */
  --c-red-600:#ED1C24; /* official; accent only (chevron, eyebrow pipe, icons, large text); on white 4.38:1 — fails AA for small text */
  --c-gray-200:#D9DADB; /* official; on white 1.4:1, on navy 9.89:1 */
  --c-gray-400:#8B8D90; /* official; on white 3.33:1, on navy 4.16:1 */
  --c-gray-700:#515352; /* official; on white 7.75:1, on navy 1.79:1 */
  --c-lgray-100:#F2F3F5; /* official; on white 1.11:1, on navy 12.47:1 */
  --c-lgray-300:#C9CCD1; /* official; on white 1.61:1, on navy 8.6:1 */
  --c-lgray-500:#A6A6A6; /* official; on white 2.43:1, on navy 5.69:1 */
  --c-white:#FFFFFF; /* official; on white 1.0:1, on navy 13.84:1 */
  --c-white-200:#E8EAED; /* official; on white 1.21:1, on navy 11.49:1 */
  --c-deep-blue-800:#0B3F86; /* 28th art direction: glass digits; hero/KPI only; on white 10.15:1, on navy 1.36:1 */
  --c-blue-50:#F1F5FB; /* derived: tint of blue-100 for hover rows; on white 1.09:1, on navy 12.65:1 */
  --c-blue-200:#B9CBEA; /* derived: borders on blue-100; on white 1.64:1, on navy 8.43:1 */
  --c-blue-500:#4169CF; /* derived: links / small blue text; on white 5.06:1, on navy 2.73:1 */
  --c-blue-700:#25467D; /* derived: navy-blue mid step; on white 9.33:1, on navy 1.48:1 */
  --c-navy-800:#2A4170; /* derived: navy hover; on white 10.05:1, on navy 1.38:1 */
  --c-navy-950:#14213B; /* derived: navy pressed; on white 16.03:1, on navy 1.16:1 */
  --c-red-650:#EB131B; /* derived: red CTA fill so white 14–16px label passes 4.5; on white 4.52:1, on navy 3.06:1 */
  --c-red-700:#C8141B; /* derived: CTA hover / small brand-red text; on white 5.88:1, on navy 2.35:1 */
  --c-gray-500:#6D6F72; /* derived: small secondary text; on white 5.04:1, on navy 2.75:1 */
  --c-deep-blue-200:#C9D6F0; /* derived: secondary text on deep-blue hero; on white 1.46:1, on navy 9.47:1 */
  --c-page:#F6F8FC; /* addition: Executive White page wash; navy on this 13.02:1 */
  /* ── Semantic ── */
  --bg-canvas:var(--c-white);
  --bg-wash:var(--c-blue-100);
  --bg-app:var(--c-lgray-100);
  --bg-page:var(--c-page); /* addition vs SDD: Executive White page wash */
  --bg-surface:var(--c-white);
  --bg-subtle:var(--c-white-200);
  --bg-selected:var(--c-blue-100);
  --bg-hover:var(--c-blue-50);
  --bg-hero:var(--c-deep-blue-800);
  --border-hairline:var(--c-gray-200);
  --border-default:var(--c-lgray-300);
  --border-control:var(--c-gray-400);
  --border-selected:var(--c-navy-900);
  --text-heading:var(--c-navy-900);
  --text-primary:var(--c-navy-900);
  --text-body:var(--c-gray-700);
  --text-secondary:var(--c-gray-500);
  --text-link:var(--c-blue-500);
  --text-on-dark:var(--c-white);
  --text-on-dark-2:var(--c-deep-blue-200);
  --text-brand-red:var(--c-red-700);
  --brand-wordmark:var(--c-gray-700);
  --brand-accent:var(--c-red-600);
  --cta-bg:var(--c-red-650);
  --cta-bg-hover:var(--c-red-700);
  --primary-bg:var(--c-navy-900);
  --primary-bg-hover:var(--c-navy-800);
  --accent:var(--c-blue-400);
  --focus:var(--c-blue-500);
  /* ── Status (UI feedback; NEVER brand red). Always show a symbol plus colour, never colour alone ── */
  --info:#25467D; --info-soft:#E1E9F5; --info-line:#B9CBEA; /* derived status set; fg on white 9.33:1, on soft 7.63:1 */
  --success:#15803D; --success-soft:#EDF8F1; --success-line:#BFE3CB; /* derived; fg on white 5.02:1, on soft 4.61:1 */
  --warning:#B45309; --warning-soft:#FEF3E2; --warning-line:#F0C48A; /* derived; fg on white 5.02:1, on soft 4.58:1 */
  --danger:#B42318; --danger-soft:#FDECEA; --danger-line:#F3B8BA; /* derived; fg on white 6.57:1, on soft 5.75:1 — not brand red */
  --neutral:#515352; --neutral-soft:#F2F3F5; --neutral-line:#C9CCD1; /* fg on white 7.75:1, on soft 6.98:1 */
  /* ── Sensitivity tiers: brand blue ramp + pip glyph + letter. Never colour alone ── */
  --tier-restricted:#1B2C4E; --tier-restricted-text:#FFFFFF; /* label on fill 13.84:1; pips 4/4; abbr R */
  --tier-confidential:#25467D; --tier-confidential-text:#FFFFFF; /* label on fill 9.33:1; pips 3/4; abbr C */
  --tier-internal:#B9CBEA; --tier-internal-text:#1B2C4E; /* label on fill 8.43:1; pips 2/4; abbr I */
  --tier-public:#F2F3F5; --tier-public-text:#515352; /* label on fill 6.98:1; pips 1/4; abbr P */
  /* ── Risk levels: luminance-ordered (critical darkest), glyph + label always ── */
  --risk-critical:#7A1240; --risk-critical-soft:#FBE8EF; /* derived; wine (hue 334°) – clearly not brand red; glyph ◆◆; on white 10.56:1, on soft 9.0:1 */
  --risk-high:#C2410C; --risk-high-soft:#FDEEE5; /* derived; burnt orange; glyph ▲; on white 5.18:1, on soft 4.57:1 */
  --risk-medium:#A16207; --risk-medium-soft:#FEF7E0; /* derived; ochre; glyph ◆; on white 4.92:1, on soft 4.59:1 */
  --risk-low:#0F766E; --risk-low-soft:#E6F4F2; /* derived; teal; glyph ●; on white 5.47:1, on soft 4.84:1 */
  /* ── Charts: categorical (Okabe-Ito-derived, brand-anchored) – always direct-label; max 6 series + "Other" ── */
  --chart-cat-1:#1B2C4E; /* L=0.026 vs white 13.84:1 */
  --chart-cat-2:#6386D9; /* L=0.247 vs white 3.53:1 */
  --chart-cat-3:#E69F00; /* L=0.416 vs white 2.25:1 */
  --chart-cat-4:#0F766E; /* L=0.142 vs white 5.47:1 */
  --chart-cat-5:#CC79A7; /* L=0.293 vs white 3.06:1 */
  --chart-cat-6:#56B4E9; /* L=0.405 vs white 2.31:1 */
  --chart-cat-7:#8B8D90; /* L=0.266 vs white 3.33:1 */
  --chart-cat-8:#B9A100; /* L=0.358 vs white 2.57:1 */
  /* ── Charts: sequential (monotonic luminance, light→dark) ── */
  --chart-seq-1:#F1F5FB; /* L=0.910 */
  --chart-seq-2:#DCE7F8; /* L=0.791 */
  --chart-seq-3:#B9CBEA; /* L=0.590 */
  --chart-seq-4:#8EA8E3; /* L=0.393 */
  --chart-seq-5:#6386D9; /* L=0.247 */
  --chart-seq-6:#4169CF; /* L=0.157 */
  --chart-seq-7:#25467D; /* L=0.063 */
  --chart-seq-8:#1B2C4E; /* L=0.026 */
  --rot-redundant:#6386D9;
  --rot-obsolete:#E69F00;
  --rot-trivial:#CC79A7;
  --rot-clean:#DCE7F8;
  --chart-grid:#E8EAED; --chart-axis:#8B8D90; --chart-label:#515352;
  /* ── Typography (changed vs SDD: Inter + Noto Sans Thai only; no Aptos, no Noto Sans Latin) ── */
  --font-title:"Inter","Noto Sans Thai",system-ui,sans-serif;
  --font-body:"Inter","Noto Sans Thai",system-ui,sans-serif;
  --font-th:"Noto Sans Thai","Inter",system-ui,sans-serif;
  --font-mono:"Noto Sans Mono",ui-monospace,Consolas,monospace;
  --fs-display:32px; --lh-display:40px; --fw-display:700; --ff-display:var(--font-title);
  --fs-h1:24px; --lh-h1:32px; --fw-h1:700; --ff-h1:var(--font-title);
  --fs-h2:20px; --lh-h2:28px; --fw-h2:650; --ff-h2:var(--font-title);
  --fs-h3:16px; --lh-h3:24px; --fw-h3:650; --ff-h3:var(--font-title);
  --fs-kpi-xl:32px; --lh-kpi-xl:36px; --fw-kpi-xl:700; --ff-kpi-xl:var(--font-title);
  --fs-kpi:24px; --lh-kpi:28px; --fw-kpi:700; --ff-kpi:var(--font-title);
  --fs-body-lg:16px; --lh-body-lg:24px; --fw-body-lg:400; --ff-body-lg:var(--font-body);
  --fs-body-lg-th:16px; --lh-body-lg-th:26px; --fw-body-lg-th:400; /* Thai large body; 26/16 = 1.625 */
  --fs-body:14px; --lh-body:20px; --fw-body:400; --ff-body:var(--font-body);
  --fs-body-th:14px; --lh-body-th:23px; --fw-body-th:400; --ff-body-th:var(--font-body); /* 23/14 ≈ 1.64 */
  --fs-label:13px; --lh-label:18px; --fw-label:600; --ff-label:var(--font-body);
  --fs-caption:12px; --lh-caption:16px; --fw-caption:400; --ff-caption:var(--font-body);
  --fs-eyebrow:12px; --lh-eyebrow:16px; --fw-eyebrow:650; --ff-eyebrow:var(--font-title);
  --fs-mono:13px; --lh-mono:20px; --fw-mono:400; --ff-mono:var(--font-mono);
  --tracking-eyebrow:.16em; --lh-th-ratio:1.65; /* Thai text must use line-height ≥ 1.6 for stacked vowels/tone marks */
  /* ── Spacing (4px base) ── */
  --sp-0:0px; --sp-1:4px; --sp-2:8px; --sp-3:12px; --sp-4:16px; --sp-5:20px; --sp-6:24px; --sp-8:32px; --sp-10:40px; --sp-12:48px; --sp-16:64px; --sp-20:80px; --sp-0-5:2px;
  /* ── Radius / elevation / z-index / motion ── */
  --r-xs:4px; --r-sm:6px; --r-md:8px; --r-lg:12px; --r-xl:16px; --r-full:9999px;
  --shadow-1:0 1px 2px rgb(27 44 78 / .06), 0 1px 3px rgb(27 44 78 / .05);
  --shadow-2:0 1px 2px rgb(27 44 78 / .06), 0 8px 24px rgb(27 44 78 / .08);
  --shadow-3:0 4px 8px rgb(27 44 78 / .06), 0 24px 48px rgb(27 44 78 / .14);
  --shadow-glass:inset 0 1px 0 rgb(255 255 255 / .18), 0 12px 32px rgb(11 63 134 / .28);
  --z-base:0; --z-sticky:20; --z-rail:30; --z-topbar:40; --z-dropdown:50; --z-drawer:60; --z-modal:70; --z-toast:80; --z-tooltip:90;
  --dur-fast:120ms; --dur-base:180ms; --dur-slow:280ms; --ease-standard:cubic-bezier(.2,0,0,1); --ease-exit:cubic-bezier(.3,0,1,1);
  --glass-hero:linear-gradient(135deg,#0B3F86 0%,#123a73 55%,#1B2C4E 100%);
  --rail-w:240px; --rail-w-collapsed:64px; --topbar-h:56px; --content-max:1600px; --grid-gutter:16px;
  /* ── Mobile / PWA (optional additions from Stream Connect; not option themes) ── */
  --tap-min:44px;
  --composer-min:56px;
  --safe-top:env(safe-area-inset-top,0px);
  --safe-right:env(safe-area-inset-right,0px);
  --safe-bottom:env(safe-area-inset-bottom,0px);
  --safe-left:env(safe-area-inset-left,0px);
  --ease-out:cubic-bezier(.2,.7,.2,1);
  --ease-io:cubic-bezier(.45,0,.55,1);
}
@media (prefers-reduced-motion:reduce){
  :root{--dur-fast:0ms;--dur-base:0ms;--dur-slow:0ms}
}
