/* OWEN illustrated science. Original palette; medical/status encodings remain semantic. */
:root, body {
  color-scheme: light;
  --owen-navy: #111936;
  --owen-indigo: #29265e;
  --owen-violet: #7864e8;
  --owen-cyan: #42c9e8;
  --owen-teal: #35c6ae;
  --owen-coral: #ff7c87;
  --owen-yellow: #ffd166;
  --owen-ink: #172044;
  --owen-bg: #f5f7fc;
  --owen-surface: #ffffff;
  --owen-surface-soft: #eef0fb;
  --owen-text: #172044;
  --owen-muted: #56617c;
  --owen-border: #d6dced;
  --owen-accent: #5542b8;
  --owen-accent-hover: #44339e;
  --owen-on-accent: #ffffff;
  --owen-tint: #eeeafb;
  --owen-focus: #6850ce;
  --owen-success: #08785e;
  --owen-warning: #8a5700;
  --owen-danger: #b42b4c;
  --font-brand: 'Cinzel', 'Iowan Old Style', serif;
  --font-body: 'Poppins', 'Avenir Next', 'Segoe UI', sans-serif;
  --font-heading: var(--font-display);
  --font-display: 'Poppins', 'Avenir Next', 'Segoe UI', sans-serif;
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 26px;
  --shadow-sm: 0 2px 0 #17204407, 0 4px 14px #17204407;
  --shadow-md: 0 10px 30px #17204412;
  --shadow-lg: 0 24px 64px #1119362b;
}
:root[data-theme='dark'], body.theme-dark, :root[data-theme='dark'] body {
  color-scheme: dark;
  --owen-bg: #111936;
  --owen-surface: #1b2549;
  --owen-surface-soft: #232e55;
  --owen-text: #f5f7fc;
  --owen-muted: #bac5e0;
  --owen-border: #435078;
  --owen-accent: #b9acff;
  --owen-accent-hover: #d0c7ff;
  --owen-on-accent: #171336;
  --owen-tint: #332e60;
  --owen-focus: #ffd166;
  --owen-success: #5edab9;
  --owen-warning: #ffd166;
  --owen-danger: #ff91a2;
  --shadow-sm: 0 3px 12px #050a1829;
  --shadow-md: 0 12px 32px #050a183d;
  --shadow-lg: 0 24px 64px #050a187a;
}
/* Rebind at the theme scope: inherited aliases otherwise resolve to old values. */
:root, body, :root[data-theme='dark'], body.theme-dark, :root[data-theme='dark'] body {
  --color-bg: var(--owen-bg);
  --color-surface: var(--owen-surface);
  --color-surface-2: var(--owen-surface-soft);
  --color-text: var(--owen-text);
  --color-muted: var(--owen-muted);
  --color-border: var(--owen-border);
  --color-border-strong: color-mix(in srgb, var(--owen-muted) 60%, var(--owen-border));
  --color-accent: var(--owen-accent);
  --color-accent-strong: var(--owen-accent-hover);
  --color-accent-weak: var(--owen-tint);
  --color-success: var(--owen-success);
  --color-warning: var(--owen-warning);
  --color-danger: var(--owen-danger);
  --text-heading: var(--owen-text);
  --text-supporting: var(--owen-muted);
  --surface-pearl: var(--owen-surface);
  --surface-mint: var(--owen-surface-soft);
  --surface-mint-hover: var(--owen-tint);
  --surface-welcome: var(--owen-bg);
  --border-mint: var(--owen-border);
  --border-mint-hover: var(--owen-accent);
  --shadow-inset: none;
  --shadow-mint: var(--shadow-sm);
  --action-primary: var(--owen-accent);
  --action-walkthrough: var(--owen-indigo);
  --action-text: #ffffff;
  --walkthrough-border: #7864e8;
  --focus-ring: var(--owen-focus);
  --overlay-bg: #11193699;
  --app-bg: var(--owen-bg);
  --bg: var(--owen-bg);
  --bg-page: var(--owen-bg);
  --bg-app: var(--owen-bg);
  --bg-app-2: var(--owen-surface-soft);
  --bg-surface: var(--owen-surface);
  --bg-surface-alt: var(--owen-surface-soft);
  --bg-surface-hover: var(--owen-tint);
  --bg-soft: var(--owen-surface-soft);
  --bg-muted: var(--owen-surface-soft);
  --surface-input: var(--owen-surface);
  --surface-canvas: var(--owen-surface);
  --card: var(--owen-surface);
  --card-strong: var(--owen-surface-soft);
  --text: var(--owen-text);
  --text-primary: var(--owen-text);
  --text-secondary: var(--owen-muted);
  --text-soft: var(--owen-muted);
  --text-muted: var(--owen-muted);
  --text-placeholder: var(--owen-muted);
  --border: var(--owen-border);
  --border-strong: var(--color-border-strong);
  --primary: var(--owen-accent);
  --primary-dark: var(--owen-accent-hover);
  --primary-soft: var(--owen-tint);
  --shadow-soft: var(--shadow-sm);
  --shadow-card: var(--shadow-md);
  --shadow-focus: 0 0 0 3px color-mix(in srgb, var(--owen-focus) 25%, transparent);
  --panel-shadow: var(--shadow-md);
  --owen-warm-white: var(--owen-surface);
  --owen-warm-white-soft: var(--owen-surface-soft);
  --scrollbar-thumb: color-mix(in srgb, var(--owen-muted) 45%, transparent);
  --scrollbar-thumb-hover: var(--owen-muted);
  --scrollbar-thumb-active: var(--owen-accent);
}
