:root {
  /* Cohom design tokens v1.0. Generated from brand/build/v1/tv1.py. Light is the default theme. LOCKED v1.0, approved 17 Oct 2026. D5: dark is built but switched off in Drishya v1. */
  --teal-50: #EFF7F5;
  --teal-100: #D7EDE8;
  --teal-200: #AFDAD1;
  --teal-300: #80C1B4;
  --teal-400: #4FA595;
  --teal-500: #2D8A7B;
  --teal-600: #1C6E64;
  --teal-700: #155A52;
  --teal-800: #0F4D48;
  --teal-900: #0C4441;
  --teal-950: #072C2A;
  --sage-50: #F6FAF4;
  --sage-100: #EEF5EA;
  --sage-200: #DCEBD5;
  --sage-300: #C0DAB4;
  --sage-400: #96C182;
  --sage-500: #6FA35F;
  --sage-600: #558A47;
  --sage-700: #456F3A;
  --sage-800: #375730;
  --sage-900: #2A4225;
  --sage-950: #1A2A17;
  --neutral-50: #F6F8F7;
  --neutral-100: #EDF1EF;
  --neutral-200: #DCE3E0;
  --neutral-300: #C3CDC9;
  --neutral-400: #9AA8A3;
  --neutral-500: #74847E;
  --neutral-600: #5A6964;
  --neutral-700: #46524E;
  --neutral-800: #2C3633;
  --neutral-900: #1B2321;
  --neutral-950: #0F1614;
  --ink: #16302C;
  --night: #0F1614;
  --paper: #F6F3EC;
  --paper-sunken: #EFEBE2;
  --paper-rule: #D6CFC0;
  --paper-rule-strong: #B9B09C;
  --font-sans: "Manrope", ui-sans-serif, system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, monospace;
  --type-display: 800 48px/56px var(--font-sans);
  --type-display-tracking: -0.02em;
  --type-h1: 700 32px/40px var(--font-sans);
  --type-h1-tracking: -0.01em;
  --type-h2: 700 24px/32px var(--font-sans);
  --type-h2-tracking: 0em;
  --type-h3: 700 20px/28px var(--font-sans);
  --type-h3-tracking: 0em;
  --type-body-lg: 400 16px/24px var(--font-sans);
  --type-body-lg-tracking: 0em;
  --type-body: 400 14px/20px var(--font-sans);
  --type-body-tracking: 0em;
  --type-label: 600 13px/18px var(--font-sans);
  --type-label-tracking: 0em;
  --type-caption: 500 12px/16px var(--font-sans);
  --type-caption-tracking: 0em;
  --type-overline: 800 11px/16px var(--font-sans);
  --type-overline-tracking: 0.055em;
  --type-mono: 400 13px/20px var(--font-mono);
  --type-mono-tracking: 0em;
  --type-mono-sm: 400 12px/16px var(--font-mono);
  --type-mono-sm-tracking: 0em;
  --space-0: 0px;
  --space-2: 2px;
  --space-4: 4px;
  --space-8: 8px;
  --space-12: 12px;
  --space-16: 16px;
  --space-24: 24px;
  --space-32: 32px;
  --space-48: 48px;
  --space-64: 64px;
  --radius-none: 0px;
  --radius-xs: 2px;
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-pill: 999px;
  --duration-instant: 0ms;
  --duration-fast: 120ms;
  --duration-base: 200ms;
  --duration-slow: 320ms;
  --duration-exit: 160ms;
  --duration-reveal: 600ms;
  --ease-standard: cubic-bezier(0.2, 0.8, 0.2, 1);
  --ease-exit: cubic-bezier(0.4, 0, 1, 1);
  --ease-reveal: cubic-bezier(0.65, 0, 0.35, 1);
  --sequential-1: #EFF7F5;
  --sequential-2: #D7EDE8;
  --sequential-3: #AFDAD1;
  --sequential-4: #80C1B4;
  --sequential-5: #4FA595;
  --sequential-6: #2D8A7B;
  --sequential-7: #1C6E64;
  --sequential-8: #155A52;
  --sequential-9: #0F4D48;
  --sequential-10: #0C4441;
  --diverging-n3: #7A4A0B;
  --diverging-n2: #B57B2E;
  --diverging-n1: #E3C48F;
  --diverging-0: #F2EEE6;
  --diverging-p1: #A9D6CC;
  --diverging-p2: #4FA595;
  --diverging-p3: #0F4D48;
  --bg-canvas: #FFFFFF;
  --bg-subtle: #F6F8F7;
  --surface-card: #FFFFFF;
  --surface-sunken: #EDF1EF;
  --surface-raised: #FFFFFF;
  --border-default: #DCE3E0;
  --border-strong: #C3CDC9;
  --border-input: #74847E;
  --text-primary: #16302C;
  --text-secondary: #46524E;
  --text-muted: #5A6964;
  --text-disabled: #74847E;
  --text-on-brand: #FFFFFF;
  --brand-solid: #0C4441;
  --brand-hover: #0F4D48;
  --brand-pressed: #072C2A;
  --brand-text: #155A52;
  --brand-tint: #EFF7F5;
  --accent-decor: #96C182;
  --focus-ring: #2D8A7B;
  --graph-canvas: #F6F8F7;
  --graph-node: #FFFFFF;
  --graph-node-border: #9AA8A3;
  --graph-edge: #74847E;
  --graph-edge-evidence: #5A6964;
  --cause-edge: #0F4D48;
  --cause-node-fill: #EFF7F5;
  --change-marker: #8A5A00;
  --outcome-border: #16302C;
  --overlay-scrim: rgba(15,22,20,0.48);
  --success: #1E7A46;
  --success-tint: #E8F5EC;
  --warning: #9A5B06;
  --warning-tint: #FDF3E1;
  --danger: #B42318;
  --danger-tint: #FDECEA;
  --info: #1F5FBF;
  --info-tint: #E8F0FC;
  --cat-1: #1C6E64;
  --cat-2: #2A3FB8;
  --cat-3: #B06AE8;
  --cat-4: #D8648B;
  --cat-5: #7E8C1E;
  --cat-6: #7A4A2A;
  --cat-7: #0B978C;
  --cat-8: #7E67A1;
  --ev-replay-confirmed-bg: #155A52;
  --ev-replay-confirmed-fg: #FFFFFF;
  --ev-replay-confirmed-border: #155A52;
  --ev-replay-confirmed-border-style: solid;
  --ev-natural-experiment-bg: #D7EDE8;
  --ev-natural-experiment-fg: #0F4D48;
  --ev-natural-experiment-border: #1C6E64;
  --ev-natural-experiment-border-style: dashed;
  --ev-observational-bg: #EDF1EF;
  --ev-observational-fg: #46524E;
  --ev-observational-border: #74847E;
  --ev-observational-border-style: dotted;
  --ev-assumed-bg: #FFFFFF;
  --ev-assumed-fg: #5A6964;
  --ev-assumed-border: #74847E;
  --ev-assumed-border-style: double;
  --ev-cant-tell-bg: #FFFFFF;
  --ev-cant-tell-fg: #46524E;
  --ev-cant-tell-border: #5A6964;
  --ev-cant-tell-border-style: solid;
  --ev-forecast-bg: #E8F0FC;
  --ev-forecast-fg: #1A4F9E;
  --ev-forecast-border: #1F5FBF;
  --ev-forecast-border-style: solid;
  --shadow-0: none;
  --shadow-1: 0 1px 2px rgba(15,22,20,0.06);
  --shadow-2: 0 4px 12px rgba(15,22,20,0.10);
  --shadow-3: 0 12px 32px rgba(15,22,20,0.16);
  color-scheme: light;
}

/* Explicit dark theme */
[data-theme="dark"] {
  --bg-canvas: #0F1614;
  --bg-subtle: #131B19;
  --surface-card: #1B2321;
  --surface-sunken: #0B100F;
  --surface-raised: #212C29;
  --border-default: #2C3633;
  --border-strong: #46524E;
  --border-input: #74847E;
  --text-primary: #EEF3F1;
  --text-secondary: #C3CDC9;
  --text-muted: #9AA8A3;
  --text-disabled: #5A6964;
  --text-on-brand: #072C2A;
  --brand-solid: #C0DAB4;
  --brand-hover: #DCEBD5;
  --brand-pressed: #96C182;
  --brand-text: #C0DAB4;
  --brand-tint: #16302C;
  --accent-decor: #96C182;
  --focus-ring: #80C1B4;
  --graph-canvas: #131B19;
  --graph-node: #1B2321;
  --graph-node-border: #5A6964;
  --graph-edge: #74847E;
  --graph-edge-evidence: #9AA8A3;
  --cause-edge: #AFDAD1;
  --cause-node-fill: #16302C;
  --change-marker: #E0A848;
  --outcome-border: #EEF3F1;
  --overlay-scrim: rgba(0,0,0,0.6);
  --success: #5CC98A;
  --success-tint: #12291C;
  --warning: #F2B654;
  --warning-tint: #2E2210;
  --danger: #F4806F;
  --danger-tint: #341614;
  --info: #7FA8F0;
  --info-tint: #14203A;
  --cat-1: #4FBFAE;
  --cat-2: #858EFB;
  --cat-3: #A493C5;
  --cat-4: #FF9FBC;
  --cat-5: #A8D58F;
  --cat-6: #C29A2E;
  --cat-7: #7FE3EE;
  --cat-8: #ACB4FF;
  --ev-replay-confirmed-bg: #C0DAB4;
  --ev-replay-confirmed-fg: #072C2A;
  --ev-replay-confirmed-border: #C0DAB4;
  --ev-replay-confirmed-border-style: solid;
  --ev-natural-experiment-bg: #16302C;
  --ev-natural-experiment-fg: #AFDAD1;
  --ev-natural-experiment-border: #4FA595;
  --ev-natural-experiment-border-style: dashed;
  --ev-observational-bg: #2C3633;
  --ev-observational-fg: #DCE3E0;
  --ev-observational-border: #9AA8A3;
  --ev-observational-border-style: dotted;
  --ev-assumed-bg: #1B2321;
  --ev-assumed-fg: #C3CDC9;
  --ev-assumed-border: #9AA8A3;
  --ev-assumed-border-style: double;
  --ev-cant-tell-bg: #1B2321;
  --ev-cant-tell-fg: #DCE3E0;
  --ev-cant-tell-border: #C3CDC9;
  --ev-cant-tell-border-style: solid;
  --ev-forecast-bg: #14203A;
  --ev-forecast-fg: #7FA8F0;
  --ev-forecast-border: #7FA8F0;
  --ev-forecast-border-style: solid;
  --shadow-0: none;
  --shadow-1: none;
  --shadow-2: none;
  --shadow-3: 0 12px 32px rgba(0,0,0,0.5);
  color-scheme: dark;
}

/* Opt-in: follow the OS only when data-theme="system" is set (Drishya v1 is light-only: decision D5, locked 17 Oct 2026. Dark is built but switched off; do not set data-theme="dark" or "system" in v1 product UI) */
@media (prefers-color-scheme: dark) {
  :root[data-theme="system"] {
    --bg-canvas: #0F1614;
    --bg-subtle: #131B19;
    --surface-card: #1B2321;
    --surface-sunken: #0B100F;
    --surface-raised: #212C29;
    --border-default: #2C3633;
    --border-strong: #46524E;
    --border-input: #74847E;
    --text-primary: #EEF3F1;
    --text-secondary: #C3CDC9;
    --text-muted: #9AA8A3;
    --text-disabled: #5A6964;
    --text-on-brand: #072C2A;
    --brand-solid: #C0DAB4;
    --brand-hover: #DCEBD5;
    --brand-pressed: #96C182;
    --brand-text: #C0DAB4;
    --brand-tint: #16302C;
    --accent-decor: #96C182;
    --focus-ring: #80C1B4;
    --graph-canvas: #131B19;
    --graph-node: #1B2321;
    --graph-node-border: #5A6964;
    --graph-edge: #74847E;
    --graph-edge-evidence: #9AA8A3;
    --cause-edge: #AFDAD1;
    --cause-node-fill: #16302C;
    --change-marker: #E0A848;
    --outcome-border: #EEF3F1;
    --overlay-scrim: rgba(0,0,0,0.6);
    --success: #5CC98A;
    --success-tint: #12291C;
    --warning: #F2B654;
    --warning-tint: #2E2210;
    --danger: #F4806F;
    --danger-tint: #341614;
    --info: #7FA8F0;
    --info-tint: #14203A;
    --cat-1: #4FBFAE;
    --cat-2: #858EFB;
    --cat-3: #A493C5;
    --cat-4: #FF9FBC;
    --cat-5: #A8D58F;
    --cat-6: #C29A2E;
    --cat-7: #7FE3EE;
    --cat-8: #ACB4FF;
    --ev-replay-confirmed-bg: #C0DAB4;
    --ev-replay-confirmed-fg: #072C2A;
    --ev-replay-confirmed-border: #C0DAB4;
    --ev-replay-confirmed-border-style: solid;
    --ev-natural-experiment-bg: #16302C;
    --ev-natural-experiment-fg: #AFDAD1;
    --ev-natural-experiment-border: #4FA595;
    --ev-natural-experiment-border-style: dashed;
    --ev-observational-bg: #2C3633;
    --ev-observational-fg: #DCE3E0;
    --ev-observational-border: #9AA8A3;
    --ev-observational-border-style: dotted;
    --ev-assumed-bg: #1B2321;
    --ev-assumed-fg: #C3CDC9;
    --ev-assumed-border: #9AA8A3;
    --ev-assumed-border-style: double;
    --ev-cant-tell-bg: #1B2321;
    --ev-cant-tell-fg: #DCE3E0;
    --ev-cant-tell-border: #C3CDC9;
    --ev-cant-tell-border-style: solid;
    --ev-forecast-bg: #14203A;
    --ev-forecast-fg: #7FA8F0;
    --ev-forecast-border: #7FA8F0;
    --ev-forecast-border-style: solid;
    --shadow-0: none;
    --shadow-1: none;
    --shadow-2: none;
    --shadow-3: 0 12px 32px rgba(0,0,0,0.5);
    color-scheme: dark;
  }
}

/* Exported reports (Ledger layout) */
[data-surface="paper"] {
  --bg-canvas: var(--paper);
  --bg-subtle: var(--paper-sunken);
  --border-default: var(--paper-rule);
  --border-strong: var(--paper-rule-strong);
  --surface-card: #FFFFFF;
}

@media (prefers-reduced-motion: reduce) {
  :root { --duration-fast: 0ms; --duration-base: 0ms; --duration-slow: 0ms; --duration-exit: 0ms; --duration-reveal: 0ms; }
}
