/* Mentra Theme Standard v1.2.1 — Air-Gapped Core + 12 CSS Layers */
@layer thm.reset, thm.tokens, thm.aliases, thm.base, thm.shell, thm.surface, thm.type, thm.components, thm.motion, thm.app, thm.domain, thm.overrides;

/* Mentra Theme Hub (thm) v1.0.0 — Generated by theme_token_compiler.py */
@layer thm.reset {
  *, *::before, *::after { box-sizing: border-box; }
}

@layer thm.tokens {
  :root {
    --thm-font-sans: "Inter", "SF Pro Text", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --thm-font-mono: "SF Mono", "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    --thm-line-height-body: 1.5;
    --thm-numeric-variant: tabular-nums;
    --thm-motion-spring-snappy: linear(0, 0.009, 0.035 2.1%, 0.141, 0.281 6.7%, 0.723 12.9%, 0.938 16.7%, 1.017, 1.077, 1.102 22.8%, 1.106 24.4%, 1.093, 1.055 30.8%, 1.015 36.2%, 0.994 42.3%, 0.992 48.2%, 1);
    --thm-motion-spring-gentle: linear(0, 0.006, 0.025 2.8%, 0.101 6.1%, 0.539 18.9%, 0.721 25.3%, 0.849 31.5%, 0.937 38.1%, 0.968 41.8%, 0.991 45.7%, 1.006 50.1%, 1.015 55%, 1.017 63.9%, 1.001 85.6%, 1);
    --thm-motion-duration-fast: 140ms;
    --thm-motion-duration-normal: 220ms;
    --thm-motion-duration-slow: 340ms;
    --thm-glass-blur: 12px;
    --thm-scrollbar-track: transparent;
  }
  :root {
    color-scheme: light;
    --thm-surface-canvas: #F5F5F7;
    --thm-surface-primary: #FFFFFF;
    --thm-surface-elevated: #FFFFFF;
    --thm-surface-input: #F9F9FB;
    --thm-surface-subtle: #EBEBF0;
    --thm-text-primary: #1D1D1F;
    --thm-text-secondary: #4B5563;
    --thm-text-muted: #5E636E;
    --thm-brand-accent: #0066CC;
    --thm-brand-accent-hover: #0051A8;
    --thm-brand-accent-secondary: #4338CA;
    --thm-brand-on-accent: #FFFFFF;
    --thm-border-subtle: #E5E5EA;
    --thm-border-default: #D2D2D7;
    --thm-border-strong: #76767E;
    --thm-focus-ring: #0066CC;
    --thm-status-success: #047857;
    --thm-status-success-bg: #ECFDF5;
    --thm-status-warning: #8A4B08;
    --thm-status-warning-bg: #FEF3C7;
    --thm-status-danger: #B91C1C;
    --thm-status-danger-bg: #FEE2E2;
    --thm-status-info: #0369A1;
    --thm-status-info-bg: #E0F2FE;
    --thm-glass-surface: rgba(255, 255, 255, 0.78);
    --thm-glass-border: rgba(210, 210, 215, 0.72);
    --thm-elevation-card: 0 1px 2px -1px rgba(0, 0, 0, 0.06), 0 2px 4px -1px rgba(0, 0, 0, 0.04), 0 6px 16px -2px rgba(0, 0, 0, 0.06), 0 0 0 1px rgba(0, 0, 0, 0.03);
    --thm-elevation-popover: 0 2px 4px -1px rgba(0, 0, 0, 0.06), 0 8px 16px -4px rgba(0, 0, 0, 0.08), 0 20px 40px -6px rgba(0, 0, 0, 0.12);
    --thm-glass-specular: inset 0 1px 0 rgba(255, 255, 255, 0.36);
    --thm-scrollbar-thumb: #76767E;
  }
  :root[data-thm-theme="apple-daylight"] {
    color-scheme: light;
    --thm-surface-canvas: #F5F5F7;
    --thm-surface-primary: #FFFFFF;
    --thm-surface-elevated: #FFFFFF;
    --thm-surface-input: #F9F9FB;
    --thm-surface-subtle: #EBEBF0;
    --thm-text-primary: #1D1D1F;
    --thm-text-secondary: #4B5563;
    --thm-text-muted: #5E636E;
    --thm-brand-accent: #0066CC;
    --thm-brand-accent-hover: #0051A8;
    --thm-brand-accent-secondary: #4338CA;
    --thm-brand-on-accent: #FFFFFF;
    --thm-border-subtle: #E5E5EA;
    --thm-border-default: #D2D2D7;
    --thm-border-strong: #76767E;
    --thm-focus-ring: #0066CC;
    --thm-status-success: #047857;
    --thm-status-success-bg: #ECFDF5;
    --thm-status-warning: #8A4B08;
    --thm-status-warning-bg: #FEF3C7;
    --thm-status-danger: #B91C1C;
    --thm-status-danger-bg: #FEE2E2;
    --thm-status-info: #0369A1;
    --thm-status-info-bg: #E0F2FE;
    --thm-glass-surface: rgba(255, 255, 255, 0.78);
    --thm-glass-border: rgba(210, 210, 215, 0.72);
    --thm-elevation-card: 0 1px 2px -1px rgba(0, 0, 0, 0.06), 0 2px 4px -1px rgba(0, 0, 0, 0.04), 0 6px 16px -2px rgba(0, 0, 0, 0.06), 0 0 0 1px rgba(0, 0, 0, 0.03);
    --thm-elevation-popover: 0 2px 4px -1px rgba(0, 0, 0, 0.06), 0 8px 16px -4px rgba(0, 0, 0, 0.08), 0 20px 40px -6px rgba(0, 0, 0, 0.12);
    --thm-glass-specular: inset 0 1px 0 rgba(255, 255, 255, 0.36);
    --thm-scrollbar-thumb: #76767E;
  }
  :root[data-thm-theme="apple-daylight"][data-thm-mode="light"] {
    color-scheme: light;
    --thm-surface-canvas: #F5F5F7;
    --thm-surface-primary: #FFFFFF;
    --thm-surface-elevated: #FFFFFF;
    --thm-surface-input: #F9F9FB;
    --thm-surface-subtle: #EBEBF0;
    --thm-text-primary: #1D1D1F;
    --thm-text-secondary: #4B5563;
    --thm-text-muted: #5E636E;
    --thm-brand-accent: #0066CC;
    --thm-brand-accent-hover: #0051A8;
    --thm-brand-accent-secondary: #4338CA;
    --thm-brand-on-accent: #FFFFFF;
    --thm-border-subtle: #E5E5EA;
    --thm-border-default: #D2D2D7;
    --thm-border-strong: #76767E;
    --thm-focus-ring: #0066CC;
    --thm-status-success: #047857;
    --thm-status-success-bg: #ECFDF5;
    --thm-status-warning: #8A4B08;
    --thm-status-warning-bg: #FEF3C7;
    --thm-status-danger: #B91C1C;
    --thm-status-danger-bg: #FEE2E2;
    --thm-status-info: #0369A1;
    --thm-status-info-bg: #E0F2FE;
    --thm-glass-surface: rgba(255, 255, 255, 0.78);
    --thm-glass-border: rgba(210, 210, 215, 0.72);
    --thm-elevation-card: 0 1px 2px -1px rgba(0, 0, 0, 0.06), 0 2px 4px -1px rgba(0, 0, 0, 0.04), 0 6px 16px -2px rgba(0, 0, 0, 0.06), 0 0 0 1px rgba(0, 0, 0, 0.03);
    --thm-elevation-popover: 0 2px 4px -1px rgba(0, 0, 0, 0.06), 0 8px 16px -4px rgba(0, 0, 0, 0.08), 0 20px 40px -6px rgba(0, 0, 0, 0.12);
    --thm-glass-specular: inset 0 1px 0 rgba(255, 255, 255, 0.36);
    --thm-scrollbar-thumb: #76767E;
  }
  :root[data-thm-theme="apple-daylight"][data-thm-mode="dark"] {
    color-scheme: dark;
    --thm-surface-canvas: #111317;
    --thm-surface-primary: #1C1F26;
    --thm-surface-elevated: #262A34;
    --thm-surface-input: #151820;
    --thm-surface-subtle: #222630;
    --thm-text-primary: #F5F5F7;
    --thm-text-secondary: #B8C1D1;
    --thm-text-muted: #9CA3AF;
    --thm-brand-accent: #60A5FA;
    --thm-brand-accent-hover: #93C5FD;
    --thm-brand-accent-secondary: #818CF8;
    --thm-brand-on-accent: #0B0F17;
    --thm-border-subtle: #2B303C;
    --thm-border-default: #3A4050;
    --thm-border-strong: #788091;
    --thm-focus-ring: #60A5FA;
    --thm-status-success: #34D399;
    --thm-status-success-bg: #064E3B;
    --thm-status-warning: #FBBF24;
    --thm-status-warning-bg: #451A03;
    --thm-status-danger: #F87171;
    --thm-status-danger-bg: #450A0A;
    --thm-status-info: #38BDF8;
    --thm-status-info-bg: #082F49;
    --thm-glass-surface: rgba(38, 42, 52, 0.76);
    --thm-glass-border: rgba(58, 64, 80, 0.72);
    --thm-elevation-card: 0 1px 2px 0 rgba(0, 0, 0, 0.40), 0 4px 10px -2px rgba(0, 0, 0, 0.36), 0 12px 28px -4px rgba(0, 0, 0, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.05);
    --thm-elevation-popover: 0 4px 8px -2px rgba(0, 0, 0, 0.48), 0 12px 24px -4px rgba(0, 0, 0, 0.52), 0 28px 56px -8px rgba(0, 0, 0, 0.58), inset 0 1px 0 rgba(255, 255, 255, 0.07);
    --thm-glass-specular: inset 0 1px 0 rgba(255, 255, 255, 0.12);
    --thm-scrollbar-thumb: #788091;
  }
  :root[data-thm-theme="apple-obsidian"] {
    color-scheme: dark;
    --thm-surface-canvas: #0B0F17;
    --thm-surface-primary: #161B26;
    --thm-surface-elevated: #1E2533;
    --thm-surface-input: #121722;
    --thm-surface-subtle: #1A202E;
    --thm-text-primary: #F5F5F7;
    --thm-text-secondary: #B8C1D1;
    --thm-text-muted: #94A3B8;
    --thm-brand-accent: #60A5FA;
    --thm-brand-accent-hover: #93C5FD;
    --thm-brand-accent-secondary: #818CF8;
    --thm-brand-on-accent: #0B0F17;
    --thm-border-subtle: #232B3B;
    --thm-border-default: #323D54;
    --thm-border-strong: #788091;
    --thm-focus-ring: #60A5FA;
    --thm-status-success: #34D399;
    --thm-status-success-bg: #064E3B;
    --thm-status-warning: #FBBF24;
    --thm-status-warning-bg: #451A03;
    --thm-status-danger: #F87171;
    --thm-status-danger-bg: #450A0A;
    --thm-status-info: #38BDF8;
    --thm-status-info-bg: #082F49;
    --thm-glass-surface: rgba(30, 37, 51, 0.76);
    --thm-glass-border: rgba(50, 61, 84, 0.72);
    --thm-elevation-card: 0 1px 2px 0 rgba(0, 0, 0, 0.40), 0 4px 10px -2px rgba(0, 0, 0, 0.36), 0 12px 28px -4px rgba(0, 0, 0, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.05);
    --thm-elevation-popover: 0 4px 8px -2px rgba(0, 0, 0, 0.48), 0 12px 24px -4px rgba(0, 0, 0, 0.52), 0 28px 56px -8px rgba(0, 0, 0, 0.58), inset 0 1px 0 rgba(255, 255, 255, 0.07);
    --thm-glass-specular: inset 0 1px 0 rgba(255, 255, 255, 0.12);
    --thm-scrollbar-thumb: #788091;
  }
  :root[data-thm-theme="apple-obsidian"][data-thm-mode="light"] {
    color-scheme: light;
    --thm-surface-canvas: #F2F4F8;
    --thm-surface-primary: #FFFFFF;
    --thm-surface-elevated: #FFFFFF;
    --thm-surface-input: #EDF0F5;
    --thm-surface-subtle: #E4E8F0;
    --thm-text-primary: #0B0F17;
    --thm-text-secondary: #475569;
    --thm-text-muted: #526075;
    --thm-brand-accent: #1D4ED8;
    --thm-brand-accent-hover: #1E40AF;
    --thm-brand-accent-secondary: #4338CA;
    --thm-brand-on-accent: #FFFFFF;
    --thm-border-subtle: #E2E8F0;
    --thm-border-default: #CBD5E1;
    --thm-border-strong: #64748B;
    --thm-focus-ring: #1D4ED8;
    --thm-status-success: #047857;
    --thm-status-success-bg: #ECFDF5;
    --thm-status-warning: #8A4B08;
    --thm-status-warning-bg: #FEF3C7;
    --thm-status-danger: #B91C1C;
    --thm-status-danger-bg: #FEE2E2;
    --thm-status-info: #0369A1;
    --thm-status-info-bg: #E0F2FE;
    --thm-glass-surface: rgba(255, 255, 255, 0.78);
    --thm-glass-border: rgba(203, 213, 225, 0.72);
    --thm-elevation-card: 0 1px 2px -1px rgba(0, 0, 0, 0.06), 0 2px 4px -1px rgba(0, 0, 0, 0.04), 0 6px 16px -2px rgba(0, 0, 0, 0.06), 0 0 0 1px rgba(0, 0, 0, 0.03);
    --thm-elevation-popover: 0 2px 4px -1px rgba(0, 0, 0, 0.06), 0 8px 16px -4px rgba(0, 0, 0, 0.08), 0 20px 40px -6px rgba(0, 0, 0, 0.12);
    --thm-glass-specular: inset 0 1px 0 rgba(255, 255, 255, 0.36);
    --thm-scrollbar-thumb: #64748B;
  }
  :root[data-thm-theme="apple-obsidian"][data-thm-mode="dark"] {
    color-scheme: dark;
    --thm-surface-canvas: #0B0F17;
    --thm-surface-primary: #161B26;
    --thm-surface-elevated: #1E2533;
    --thm-surface-input: #121722;
    --thm-surface-subtle: #1A202E;
    --thm-text-primary: #F5F5F7;
    --thm-text-secondary: #B8C1D1;
    --thm-text-muted: #94A3B8;
    --thm-brand-accent: #60A5FA;
    --thm-brand-accent-hover: #93C5FD;
    --thm-brand-accent-secondary: #818CF8;
    --thm-brand-on-accent: #0B0F17;
    --thm-border-subtle: #232B3B;
    --thm-border-default: #323D54;
    --thm-border-strong: #788091;
    --thm-focus-ring: #60A5FA;
    --thm-status-success: #34D399;
    --thm-status-success-bg: #064E3B;
    --thm-status-warning: #FBBF24;
    --thm-status-warning-bg: #451A03;
    --thm-status-danger: #F87171;
    --thm-status-danger-bg: #450A0A;
    --thm-status-info: #38BDF8;
    --thm-status-info-bg: #082F49;
    --thm-glass-surface: rgba(30, 37, 51, 0.76);
    --thm-glass-border: rgba(50, 61, 84, 0.72);
    --thm-elevation-card: 0 1px 2px 0 rgba(0, 0, 0, 0.40), 0 4px 10px -2px rgba(0, 0, 0, 0.36), 0 12px 28px -4px rgba(0, 0, 0, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.05);
    --thm-elevation-popover: 0 4px 8px -2px rgba(0, 0, 0, 0.48), 0 12px 24px -4px rgba(0, 0, 0, 0.52), 0 28px 56px -8px rgba(0, 0, 0, 0.58), inset 0 1px 0 rgba(255, 255, 255, 0.07);
    --thm-glass-specular: inset 0 1px 0 rgba(255, 255, 255, 0.12);
    --thm-scrollbar-thumb: #788091;
  }
  :root[data-thm-theme="kdan-industrial"] {
    color-scheme: dark;
    --thm-surface-canvas: #0B0F17;
    --thm-surface-primary: #111827;
    --thm-surface-elevated: #1E293B;
    --thm-surface-input: #0F1623;
    --thm-surface-subtle: #172033;
    --thm-text-primary: #F8FAFC;
    --thm-text-secondary: #CBD5E1;
    --thm-text-muted: #94A3B8;
    --thm-brand-accent: #FBBF24;
    --thm-brand-accent-hover: #FCD34D;
    --thm-brand-accent-secondary: #818CF8;
    --thm-brand-on-accent: #0B0F17;
    --thm-border-subtle: #1E293B;
    --thm-border-default: #334155;
    --thm-border-strong: #788091;
    --thm-focus-ring: #FBBF24;
    --thm-status-success: #34D399;
    --thm-status-success-bg: #064E3B;
    --thm-status-warning: #FBBF24;
    --thm-status-warning-bg: #451A03;
    --thm-status-danger: #F87171;
    --thm-status-danger-bg: #450A0A;
    --thm-status-info: #38BDF8;
    --thm-status-info-bg: #082F49;
    --thm-glass-surface: rgba(30, 41, 59, 0.76);
    --thm-glass-border: rgba(51, 65, 85, 0.72);
    --thm-elevation-card: 0 1px 2px 0 rgba(0, 0, 0, 0.40), 0 4px 10px -2px rgba(0, 0, 0, 0.36), 0 12px 28px -4px rgba(0, 0, 0, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.05);
    --thm-elevation-popover: 0 4px 8px -2px rgba(0, 0, 0, 0.48), 0 12px 24px -4px rgba(0, 0, 0, 0.52), 0 28px 56px -8px rgba(0, 0, 0, 0.58), inset 0 1px 0 rgba(255, 255, 255, 0.07);
    --thm-glass-specular: inset 0 1px 0 rgba(255, 255, 255, 0.12);
    --thm-scrollbar-thumb: #788091;
  }
  :root[data-thm-theme="kdan-industrial"][data-thm-mode="light"] {
    color-scheme: light;
    --thm-surface-canvas: #F8FAFC;
    --thm-surface-primary: #FFFFFF;
    --thm-surface-elevated: #FFFFFF;
    --thm-surface-input: #F1F5F9;
    --thm-surface-subtle: #E2E8F0;
    --thm-text-primary: #0F172A;
    --thm-text-secondary: #475569;
    --thm-text-muted: #526075;
    --thm-brand-accent: #92400E;
    --thm-brand-accent-hover: #78350F;
    --thm-brand-accent-secondary: #4338CA;
    --thm-brand-on-accent: #FFFFFF;
    --thm-border-subtle: #E2E8F0;
    --thm-border-default: #CBD5E1;
    --thm-border-strong: #64748B;
    --thm-focus-ring: #4338CA;
    --thm-status-success: #047857;
    --thm-status-success-bg: #ECFDF5;
    --thm-status-warning: #8A4B08;
    --thm-status-warning-bg: #FEF3C7;
    --thm-status-danger: #B91C1C;
    --thm-status-danger-bg: #FEE2E2;
    --thm-status-info: #0369A1;
    --thm-status-info-bg: #E0F2FE;
    --thm-glass-surface: rgba(255, 255, 255, 0.78);
    --thm-glass-border: rgba(203, 213, 225, 0.72);
    --thm-elevation-card: 0 1px 2px -1px rgba(0, 0, 0, 0.06), 0 2px 4px -1px rgba(0, 0, 0, 0.04), 0 6px 16px -2px rgba(0, 0, 0, 0.06), 0 0 0 1px rgba(0, 0, 0, 0.03);
    --thm-elevation-popover: 0 2px 4px -1px rgba(0, 0, 0, 0.06), 0 8px 16px -4px rgba(0, 0, 0, 0.08), 0 20px 40px -6px rgba(0, 0, 0, 0.12);
    --thm-glass-specular: inset 0 1px 0 rgba(255, 255, 255, 0.36);
    --thm-scrollbar-thumb: #64748B;
  }
  :root[data-thm-theme="kdan-industrial"][data-thm-mode="dark"] {
    color-scheme: dark;
    --thm-surface-canvas: #0B0F17;
    --thm-surface-primary: #111827;
    --thm-surface-elevated: #1E293B;
    --thm-surface-input: #0F1623;
    --thm-surface-subtle: #172033;
    --thm-text-primary: #F8FAFC;
    --thm-text-secondary: #CBD5E1;
    --thm-text-muted: #94A3B8;
    --thm-brand-accent: #FBBF24;
    --thm-brand-accent-hover: #FCD34D;
    --thm-brand-accent-secondary: #818CF8;
    --thm-brand-on-accent: #0B0F17;
    --thm-border-subtle: #1E293B;
    --thm-border-default: #334155;
    --thm-border-strong: #788091;
    --thm-focus-ring: #FBBF24;
    --thm-status-success: #34D399;
    --thm-status-success-bg: #064E3B;
    --thm-status-warning: #FBBF24;
    --thm-status-warning-bg: #451A03;
    --thm-status-danger: #F87171;
    --thm-status-danger-bg: #450A0A;
    --thm-status-info: #38BDF8;
    --thm-status-info-bg: #082F49;
    --thm-glass-surface: rgba(30, 41, 59, 0.76);
    --thm-glass-border: rgba(51, 65, 85, 0.72);
    --thm-elevation-card: 0 1px 2px 0 rgba(0, 0, 0, 0.40), 0 4px 10px -2px rgba(0, 0, 0, 0.36), 0 12px 28px -4px rgba(0, 0, 0, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.05);
    --thm-elevation-popover: 0 4px 8px -2px rgba(0, 0, 0, 0.48), 0 12px 24px -4px rgba(0, 0, 0, 0.52), 0 28px 56px -8px rgba(0, 0, 0, 0.58), inset 0 1px 0 rgba(255, 255, 255, 0.07);
    --thm-glass-specular: inset 0 1px 0 rgba(255, 255, 255, 0.12);
    --thm-scrollbar-thumb: #788091;
  }
  :root[data-thm-theme="spa-serenity"] {
    color-scheme: light;
    --thm-surface-canvas: #FDF2F8;
    --thm-surface-primary: #FFFFFF;
    --thm-surface-elevated: #FFF8FB;
    --thm-surface-input: #FCE7F3;
    --thm-surface-subtle: #F9E2EE;
    --thm-text-primary: #1F1625;
    --thm-text-secondary: #5B445E;
    --thm-text-muted: #664E6B;
    --thm-brand-accent: #BE185D;
    --thm-brand-accent-hover: #9D174D;
    --thm-brand-accent-secondary: #7C3AED;
    --thm-brand-on-accent: #FFFFFF;
    --thm-border-subtle: #F3D5E6;
    --thm-border-default: #E5BBD2;
    --thm-border-strong: #8A6D84;
    --thm-focus-ring: #BE185D;
    --thm-status-success: #047857;
    --thm-status-success-bg: #ECFDF5;
    --thm-status-warning: #8A4B08;
    --thm-status-warning-bg: #FEF3C7;
    --thm-status-danger: #B91C1C;
    --thm-status-danger-bg: #FEE2E2;
    --thm-status-info: #0369A1;
    --thm-status-info-bg: #E0F2FE;
    --thm-glass-surface: rgba(255, 248, 251, 0.78);
    --thm-glass-border: rgba(229, 187, 210, 0.72);
    --thm-elevation-card: 0 1px 2px -1px rgba(0, 0, 0, 0.06), 0 2px 4px -1px rgba(0, 0, 0, 0.04), 0 6px 16px -2px rgba(0, 0, 0, 0.06), 0 0 0 1px rgba(0, 0, 0, 0.03);
    --thm-elevation-popover: 0 2px 4px -1px rgba(0, 0, 0, 0.06), 0 8px 16px -4px rgba(0, 0, 0, 0.08), 0 20px 40px -6px rgba(0, 0, 0, 0.12);
    --thm-glass-specular: inset 0 1px 0 rgba(255, 255, 255, 0.36);
    --thm-scrollbar-thumb: #8A6D84;
  }
  :root[data-thm-theme="spa-serenity"][data-thm-mode="light"] {
    color-scheme: light;
    --thm-surface-canvas: #FDF2F8;
    --thm-surface-primary: #FFFFFF;
    --thm-surface-elevated: #FFF8FB;
    --thm-surface-input: #FCE7F3;
    --thm-surface-subtle: #F9E2EE;
    --thm-text-primary: #1F1625;
    --thm-text-secondary: #5B445E;
    --thm-text-muted: #664E6B;
    --thm-brand-accent: #BE185D;
    --thm-brand-accent-hover: #9D174D;
    --thm-brand-accent-secondary: #7C3AED;
    --thm-brand-on-accent: #FFFFFF;
    --thm-border-subtle: #F3D5E6;
    --thm-border-default: #E5BBD2;
    --thm-border-strong: #8A6D84;
    --thm-focus-ring: #BE185D;
    --thm-status-success: #047857;
    --thm-status-success-bg: #ECFDF5;
    --thm-status-warning: #8A4B08;
    --thm-status-warning-bg: #FEF3C7;
    --thm-status-danger: #B91C1C;
    --thm-status-danger-bg: #FEE2E2;
    --thm-status-info: #0369A1;
    --thm-status-info-bg: #E0F2FE;
    --thm-glass-surface: rgba(255, 248, 251, 0.78);
    --thm-glass-border: rgba(229, 187, 210, 0.72);
    --thm-elevation-card: 0 1px 2px -1px rgba(0, 0, 0, 0.06), 0 2px 4px -1px rgba(0, 0, 0, 0.04), 0 6px 16px -2px rgba(0, 0, 0, 0.06), 0 0 0 1px rgba(0, 0, 0, 0.03);
    --thm-elevation-popover: 0 2px 4px -1px rgba(0, 0, 0, 0.06), 0 8px 16px -4px rgba(0, 0, 0, 0.08), 0 20px 40px -6px rgba(0, 0, 0, 0.12);
    --thm-glass-specular: inset 0 1px 0 rgba(255, 255, 255, 0.36);
    --thm-scrollbar-thumb: #8A6D84;
  }
  :root[data-thm-theme="spa-serenity"][data-thm-mode="dark"] {
    color-scheme: dark;
    --thm-surface-canvas: #1A1019;
    --thm-surface-primary: #261824;
    --thm-surface-elevated: #332031;
    --thm-surface-input: #1F131E;
    --thm-surface-subtle: #2D1C2B;
    --thm-text-primary: #FCE7F3;
    --thm-text-secondary: #E2BDD3;
    --thm-text-muted: #C79FB7;
    --thm-brand-accent: #F472B6;
    --thm-brand-accent-hover: #F9A8D4;
    --thm-brand-accent-secondary: #D4AF37;
    --thm-brand-on-accent: #1A1019;
    --thm-border-subtle: #3D263A;
    --thm-border-default: #52334E;
    --thm-border-strong: #966E88;
    --thm-focus-ring: #F472B6;
    --thm-status-success: #34D399;
    --thm-status-success-bg: #064E3B;
    --thm-status-warning: #FBBF24;
    --thm-status-warning-bg: #451A03;
    --thm-status-danger: #F87171;
    --thm-status-danger-bg: #450A0A;
    --thm-status-info: #38BDF8;
    --thm-status-info-bg: #082F49;
    --thm-glass-surface: rgba(51, 32, 49, 0.76);
    --thm-glass-border: rgba(82, 51, 78, 0.72);
    --thm-elevation-card: 0 1px 2px 0 rgba(0, 0, 0, 0.40), 0 4px 10px -2px rgba(0, 0, 0, 0.36), 0 12px 28px -4px rgba(0, 0, 0, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.05);
    --thm-elevation-popover: 0 4px 8px -2px rgba(0, 0, 0, 0.48), 0 12px 24px -4px rgba(0, 0, 0, 0.52), 0 28px 56px -8px rgba(0, 0, 0, 0.58), inset 0 1px 0 rgba(255, 255, 255, 0.07);
    --thm-glass-specular: inset 0 1px 0 rgba(255, 255, 255, 0.12);
    --thm-scrollbar-thumb: #966E88;
  }
  :root[data-thm-theme="finance-trust"] {
    color-scheme: light;
    --thm-surface-canvas: #F4F7F9;
    --thm-surface-primary: #FFFFFF;
    --thm-surface-elevated: #FFFFFF;
    --thm-surface-input: #EEF3F6;
    --thm-surface-subtle: #E3EBEF;
    --thm-text-primary: #0B1324;
    --thm-text-secondary: #475569;
    --thm-text-muted: #526075;
    --thm-brand-accent: #047857;
    --thm-brand-accent-hover: #065F46;
    --thm-brand-accent-secondary: #1E40AF;
    --thm-brand-on-accent: #FFFFFF;
    --thm-border-subtle: #D9E2EA;
    --thm-border-default: #C2CFD9;
    --thm-border-strong: #64748B;
    --thm-focus-ring: #047857;
    --thm-status-success: #047857;
    --thm-status-success-bg: #ECFDF5;
    --thm-status-warning: #8A4B08;
    --thm-status-warning-bg: #FEF3C7;
    --thm-status-danger: #B91C1C;
    --thm-status-danger-bg: #FEE2E2;
    --thm-status-info: #0369A1;
    --thm-status-info-bg: #E0F2FE;
    --thm-glass-surface: rgba(255, 255, 255, 0.78);
    --thm-glass-border: rgba(194, 207, 217, 0.72);
    --thm-elevation-card: 0 1px 2px -1px rgba(0, 0, 0, 0.06), 0 2px 4px -1px rgba(0, 0, 0, 0.04), 0 6px 16px -2px rgba(0, 0, 0, 0.06), 0 0 0 1px rgba(0, 0, 0, 0.03);
    --thm-elevation-popover: 0 2px 4px -1px rgba(0, 0, 0, 0.06), 0 8px 16px -4px rgba(0, 0, 0, 0.08), 0 20px 40px -6px rgba(0, 0, 0, 0.12);
    --thm-glass-specular: inset 0 1px 0 rgba(255, 255, 255, 0.36);
    --thm-scrollbar-thumb: #64748B;
  }
  :root[data-thm-theme="finance-trust"][data-thm-mode="light"] {
    color-scheme: light;
    --thm-surface-canvas: #F4F7F9;
    --thm-surface-primary: #FFFFFF;
    --thm-surface-elevated: #FFFFFF;
    --thm-surface-input: #EEF3F6;
    --thm-surface-subtle: #E3EBEF;
    --thm-text-primary: #0B1324;
    --thm-text-secondary: #475569;
    --thm-text-muted: #526075;
    --thm-brand-accent: #047857;
    --thm-brand-accent-hover: #065F46;
    --thm-brand-accent-secondary: #1E40AF;
    --thm-brand-on-accent: #FFFFFF;
    --thm-border-subtle: #D9E2EA;
    --thm-border-default: #C2CFD9;
    --thm-border-strong: #64748B;
    --thm-focus-ring: #047857;
    --thm-status-success: #047857;
    --thm-status-success-bg: #ECFDF5;
    --thm-status-warning: #8A4B08;
    --thm-status-warning-bg: #FEF3C7;
    --thm-status-danger: #B91C1C;
    --thm-status-danger-bg: #FEE2E2;
    --thm-status-info: #0369A1;
    --thm-status-info-bg: #E0F2FE;
    --thm-glass-surface: rgba(255, 255, 255, 0.78);
    --thm-glass-border: rgba(194, 207, 217, 0.72);
    --thm-elevation-card: 0 1px 2px -1px rgba(0, 0, 0, 0.06), 0 2px 4px -1px rgba(0, 0, 0, 0.04), 0 6px 16px -2px rgba(0, 0, 0, 0.06), 0 0 0 1px rgba(0, 0, 0, 0.03);
    --thm-elevation-popover: 0 2px 4px -1px rgba(0, 0, 0, 0.06), 0 8px 16px -4px rgba(0, 0, 0, 0.08), 0 20px 40px -6px rgba(0, 0, 0, 0.12);
    --thm-glass-specular: inset 0 1px 0 rgba(255, 255, 255, 0.36);
    --thm-scrollbar-thumb: #64748B;
  }
  :root[data-thm-theme="finance-trust"][data-thm-mode="dark"] {
    color-scheme: dark;
    --thm-surface-canvas: #070D19;
    --thm-surface-primary: #0F1B33;
    --thm-surface-elevated: #162442;
    --thm-surface-input: #0C1528;
    --thm-surface-subtle: #13203B;
    --thm-text-primary: #F8FAFC;
    --thm-text-secondary: #CBD5E1;
    --thm-text-muted: #93C5FD;
    --thm-brand-accent: #34D399;
    --thm-brand-accent-hover: #6EE7B7;
    --thm-brand-accent-secondary: #818CF8;
    --thm-brand-on-accent: #070D19;
    --thm-border-subtle: #1C2D4F;
    --thm-border-default: #283E6B;
    --thm-border-strong: #788091;
    --thm-focus-ring: #34D399;
    --thm-status-success: #34D399;
    --thm-status-success-bg: #064E3B;
    --thm-status-warning: #FBBF24;
    --thm-status-warning-bg: #451A03;
    --thm-status-danger: #F87171;
    --thm-status-danger-bg: #450A0A;
    --thm-status-info: #38BDF8;
    --thm-status-info-bg: #082F49;
    --thm-glass-surface: rgba(22, 36, 66, 0.76);
    --thm-glass-border: rgba(40, 62, 107, 0.72);
    --thm-elevation-card: 0 1px 2px 0 rgba(0, 0, 0, 0.40), 0 4px 10px -2px rgba(0, 0, 0, 0.36), 0 12px 28px -4px rgba(0, 0, 0, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.05);
    --thm-elevation-popover: 0 4px 8px -2px rgba(0, 0, 0, 0.48), 0 12px 24px -4px rgba(0, 0, 0, 0.52), 0 28px 56px -8px rgba(0, 0, 0, 0.58), inset 0 1px 0 rgba(255, 255, 255, 0.07);
    --thm-glass-specular: inset 0 1px 0 rgba(255, 255, 255, 0.12);
    --thm-scrollbar-thumb: #788091;
  }
  :root[data-thm-theme="catppuccin-studio"] {
    color-scheme: dark;
    --thm-surface-canvas: #11111B;
    --thm-surface-primary: #1E1E2E;
    --thm-surface-elevated: #28283D;
    --thm-surface-input: #181825;
    --thm-surface-subtle: #2A2B3D;
    --thm-text-primary: #CDD6F4;
    --thm-text-secondary: #BAC2DE;
    --thm-text-muted: #A6ADC8;
    --thm-brand-accent: #89B4FA;
    --thm-brand-accent-hover: #B4BEFE;
    --thm-brand-accent-secondary: #CBA6F7;
    --thm-brand-on-accent: #11111B;
    --thm-border-subtle: #313244;
    --thm-border-default: #45475A;
    --thm-border-strong: #7F849C;
    --thm-focus-ring: #89B4FA;
    --thm-status-success: #34D399;
    --thm-status-success-bg: #064E3B;
    --thm-status-warning: #FBBF24;
    --thm-status-warning-bg: #451A03;
    --thm-status-danger: #F87171;
    --thm-status-danger-bg: #450A0A;
    --thm-status-info: #38BDF8;
    --thm-status-info-bg: #082F49;
    --thm-glass-surface: rgba(40, 40, 61, 0.76);
    --thm-glass-border: rgba(69, 71, 90, 0.72);
    --thm-elevation-card: 0 1px 2px 0 rgba(0, 0, 0, 0.40), 0 4px 10px -2px rgba(0, 0, 0, 0.36), 0 12px 28px -4px rgba(0, 0, 0, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.05);
    --thm-elevation-popover: 0 4px 8px -2px rgba(0, 0, 0, 0.48), 0 12px 24px -4px rgba(0, 0, 0, 0.52), 0 28px 56px -8px rgba(0, 0, 0, 0.58), inset 0 1px 0 rgba(255, 255, 255, 0.07);
    --thm-glass-specular: inset 0 1px 0 rgba(255, 255, 255, 0.12);
    --thm-scrollbar-thumb: #7F849C;
  }
  :root[data-thm-theme="catppuccin-studio"][data-thm-mode="light"] {
    color-scheme: light;
    --thm-surface-canvas: #EFF1F5;
    --thm-surface-primary: #FFFFFF;
    --thm-surface-elevated: #FFFFFF;
    --thm-surface-input: #F5F6FA;
    --thm-surface-subtle: #E6E9EF;
    --thm-text-primary: #3B3E54;
    --thm-text-secondary: #4C4F69;
    --thm-text-muted: #585B70;
    --thm-brand-accent: #1A5CE0;
    --thm-brand-accent-hover: #154BB8;
    --thm-brand-accent-secondary: #7529D9;
    --thm-brand-on-accent: #FFFFFF;
    --thm-border-subtle: #DCE0E8;
    --thm-border-default: #BCC0CC;
    --thm-border-strong: #6E7185;
    --thm-focus-ring: #1A5CE0;
    --thm-status-success: #047857;
    --thm-status-success-bg: #ECFDF5;
    --thm-status-warning: #8A4B08;
    --thm-status-warning-bg: #FEF3C7;
    --thm-status-danger: #B91C1C;
    --thm-status-danger-bg: #FEE2E2;
    --thm-status-info: #0369A1;
    --thm-status-info-bg: #E0F2FE;
    --thm-glass-surface: rgba(255, 255, 255, 0.78);
    --thm-glass-border: rgba(188, 192, 204, 0.72);
    --thm-elevation-card: 0 1px 2px -1px rgba(0, 0, 0, 0.06), 0 2px 4px -1px rgba(0, 0, 0, 0.04), 0 6px 16px -2px rgba(0, 0, 0, 0.06), 0 0 0 1px rgba(0, 0, 0, 0.03);
    --thm-elevation-popover: 0 2px 4px -1px rgba(0, 0, 0, 0.06), 0 8px 16px -4px rgba(0, 0, 0, 0.08), 0 20px 40px -6px rgba(0, 0, 0, 0.12);
    --thm-glass-specular: inset 0 1px 0 rgba(255, 255, 255, 0.36);
    --thm-scrollbar-thumb: #6E7185;
  }
  :root[data-thm-theme="catppuccin-studio"][data-thm-mode="dark"] {
    color-scheme: dark;
    --thm-surface-canvas: #11111B;
    --thm-surface-primary: #1E1E2E;
    --thm-surface-elevated: #28283D;
    --thm-surface-input: #181825;
    --thm-surface-subtle: #2A2B3D;
    --thm-text-primary: #CDD6F4;
    --thm-text-secondary: #BAC2DE;
    --thm-text-muted: #A6ADC8;
    --thm-brand-accent: #89B4FA;
    --thm-brand-accent-hover: #B4BEFE;
    --thm-brand-accent-secondary: #CBA6F7;
    --thm-brand-on-accent: #11111B;
    --thm-border-subtle: #313244;
    --thm-border-default: #45475A;
    --thm-border-strong: #7F849C;
    --thm-focus-ring: #89B4FA;
    --thm-status-success: #34D399;
    --thm-status-success-bg: #064E3B;
    --thm-status-warning: #FBBF24;
    --thm-status-warning-bg: #451A03;
    --thm-status-danger: #F87171;
    --thm-status-danger-bg: #450A0A;
    --thm-status-info: #38BDF8;
    --thm-status-info-bg: #082F49;
    --thm-glass-surface: rgba(40, 40, 61, 0.76);
    --thm-glass-border: rgba(69, 71, 90, 0.72);
    --thm-elevation-card: 0 1px 2px 0 rgba(0, 0, 0, 0.40), 0 4px 10px -2px rgba(0, 0, 0, 0.36), 0 12px 28px -4px rgba(0, 0, 0, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.05);
    --thm-elevation-popover: 0 4px 8px -2px rgba(0, 0, 0, 0.48), 0 12px 24px -4px rgba(0, 0, 0, 0.52), 0 28px 56px -8px rgba(0, 0, 0, 0.58), inset 0 1px 0 rgba(255, 255, 255, 0.07);
    --thm-glass-specular: inset 0 1px 0 rgba(255, 255, 255, 0.12);
    --thm-scrollbar-thumb: #7F849C;
  }
  :root[data-thm-theme="flexoki-paper"] {
    color-scheme: light;
    --thm-surface-canvas: #F2F0E5;
    --thm-surface-primary: #FFFCF0;
    --thm-surface-elevated: #FFFFFF;
    --thm-surface-input: #F7F5EC;
    --thm-surface-subtle: #E6E4D9;
    --thm-text-primary: #100F0F;
    --thm-text-secondary: #4A4945;
    --thm-text-muted: #575653;
    --thm-brand-accent: #205EA6;
    --thm-brand-accent-hover: #184A85;
    --thm-brand-accent-secondary: #A03F0B;
    --thm-brand-on-accent: #FFFCF0;
    --thm-border-subtle: #E6E4D9;
    --thm-border-default: #CECDC3;
    --thm-border-strong: #73716B;
    --thm-focus-ring: #205EA6;
    --thm-status-success: #047857;
    --thm-status-success-bg: #ECFDF5;
    --thm-status-warning: #8A4B08;
    --thm-status-warning-bg: #FEF3C7;
    --thm-status-danger: #B91C1C;
    --thm-status-danger-bg: #FEE2E2;
    --thm-status-info: #0369A1;
    --thm-status-info-bg: #E0F2FE;
    --thm-glass-surface: rgba(255, 255, 255, 0.78);
    --thm-glass-border: rgba(206, 205, 195, 0.72);
    --thm-elevation-card: 0 1px 2px -1px rgba(0, 0, 0, 0.06), 0 2px 4px -1px rgba(0, 0, 0, 0.04), 0 6px 16px -2px rgba(0, 0, 0, 0.06), 0 0 0 1px rgba(0, 0, 0, 0.03);
    --thm-elevation-popover: 0 2px 4px -1px rgba(0, 0, 0, 0.06), 0 8px 16px -4px rgba(0, 0, 0, 0.08), 0 20px 40px -6px rgba(0, 0, 0, 0.12);
    --thm-glass-specular: inset 0 1px 0 rgba(255, 255, 255, 0.36);
    --thm-scrollbar-thumb: #73716B;
  }
  :root[data-thm-theme="flexoki-paper"][data-thm-mode="light"] {
    color-scheme: light;
    --thm-surface-canvas: #F2F0E5;
    --thm-surface-primary: #FFFCF0;
    --thm-surface-elevated: #FFFFFF;
    --thm-surface-input: #F7F5EC;
    --thm-surface-subtle: #E6E4D9;
    --thm-text-primary: #100F0F;
    --thm-text-secondary: #4A4945;
    --thm-text-muted: #575653;
    --thm-brand-accent: #205EA6;
    --thm-brand-accent-hover: #184A85;
    --thm-brand-accent-secondary: #A03F0B;
    --thm-brand-on-accent: #FFFCF0;
    --thm-border-subtle: #E6E4D9;
    --thm-border-default: #CECDC3;
    --thm-border-strong: #73716B;
    --thm-focus-ring: #205EA6;
    --thm-status-success: #047857;
    --thm-status-success-bg: #ECFDF5;
    --thm-status-warning: #8A4B08;
    --thm-status-warning-bg: #FEF3C7;
    --thm-status-danger: #B91C1C;
    --thm-status-danger-bg: #FEE2E2;
    --thm-status-info: #0369A1;
    --thm-status-info-bg: #E0F2FE;
    --thm-glass-surface: rgba(255, 255, 255, 0.78);
    --thm-glass-border: rgba(206, 205, 195, 0.72);
    --thm-elevation-card: 0 1px 2px -1px rgba(0, 0, 0, 0.06), 0 2px 4px -1px rgba(0, 0, 0, 0.04), 0 6px 16px -2px rgba(0, 0, 0, 0.06), 0 0 0 1px rgba(0, 0, 0, 0.03);
    --thm-elevation-popover: 0 2px 4px -1px rgba(0, 0, 0, 0.06), 0 8px 16px -4px rgba(0, 0, 0, 0.08), 0 20px 40px -6px rgba(0, 0, 0, 0.12);
    --thm-glass-specular: inset 0 1px 0 rgba(255, 255, 255, 0.36);
    --thm-scrollbar-thumb: #73716B;
  }
  :root[data-thm-theme="flexoki-paper"][data-thm-mode="dark"] {
    color-scheme: dark;
    --thm-surface-canvas: #100F0F;
    --thm-surface-primary: #1C1B1A;
    --thm-surface-elevated: #282726;
    --thm-surface-input: #161514;
    --thm-surface-subtle: #242322;
    --thm-text-primary: #E6E4D9;
    --thm-text-secondary: #CECDC3;
    --thm-text-muted: #A3A198;
    --thm-brand-accent: #5493CA;
    --thm-brand-accent-hover: #7AB0DF;
    --thm-brand-accent-secondary: #E68646;
    --thm-brand-on-accent: #100F0F;
    --thm-border-subtle: #282726;
    --thm-border-default: #403E3C;
    --thm-border-strong: #878580;
    --thm-focus-ring: #5493CA;
    --thm-status-success: #34D399;
    --thm-status-success-bg: #064E3B;
    --thm-status-warning: #FBBF24;
    --thm-status-warning-bg: #451A03;
    --thm-status-danger: #F87171;
    --thm-status-danger-bg: #450A0A;
    --thm-status-info: #38BDF8;
    --thm-status-info-bg: #082F49;
    --thm-glass-surface: rgba(40, 39, 38, 0.76);
    --thm-glass-border: rgba(64, 62, 60, 0.72);
    --thm-elevation-card: 0 1px 2px 0 rgba(0, 0, 0, 0.40), 0 4px 10px -2px rgba(0, 0, 0, 0.36), 0 12px 28px -4px rgba(0, 0, 0, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.05);
    --thm-elevation-popover: 0 4px 8px -2px rgba(0, 0, 0, 0.48), 0 12px 24px -4px rgba(0, 0, 0, 0.52), 0 28px 56px -8px rgba(0, 0, 0, 0.58), inset 0 1px 0 rgba(255, 255, 255, 0.07);
    --thm-glass-specular: inset 0 1px 0 rgba(255, 255, 255, 0.12);
    --thm-scrollbar-thumb: #878580;
  }
  :root[data-thm-theme="nord-arctic"] {
    color-scheme: dark;
    --thm-surface-canvas: #242933;
    --thm-surface-primary: #2E3440;
    --thm-surface-elevated: #3B4252;
    --thm-surface-input: #292E39;
    --thm-surface-subtle: #353C4A;
    --thm-text-primary: #ECEFF4;
    --thm-text-secondary: #D8DEE9;
    --thm-text-muted: #A5B1C2;
    --thm-brand-accent: #88C0D0;
    --thm-brand-accent-hover: #9FD0DE;
    --thm-brand-accent-secondary: #9AB7D4;
    --thm-brand-on-accent: #1B2028;
    --thm-border-subtle: #353C4A;
    --thm-border-default: #4C566A;
    --thm-border-strong: #8691A8;
    --thm-focus-ring: #88C0D0;
    --thm-status-success: #34D399;
    --thm-status-success-bg: #064E3B;
    --thm-status-warning: #FBBF24;
    --thm-status-warning-bg: #451A03;
    --thm-status-danger: #F87171;
    --thm-status-danger-bg: #450A0A;
    --thm-status-info: #38BDF8;
    --thm-status-info-bg: #082F49;
    --thm-glass-surface: rgba(59, 66, 82, 0.76);
    --thm-glass-border: rgba(76, 86, 106, 0.72);
    --thm-elevation-card: 0 1px 2px 0 rgba(0, 0, 0, 0.40), 0 4px 10px -2px rgba(0, 0, 0, 0.36), 0 12px 28px -4px rgba(0, 0, 0, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.05);
    --thm-elevation-popover: 0 4px 8px -2px rgba(0, 0, 0, 0.48), 0 12px 24px -4px rgba(0, 0, 0, 0.52), 0 28px 56px -8px rgba(0, 0, 0, 0.58), inset 0 1px 0 rgba(255, 255, 255, 0.07);
    --thm-glass-specular: inset 0 1px 0 rgba(255, 255, 255, 0.12);
    --thm-scrollbar-thumb: #8691A8;
  }
  :root[data-thm-theme="nord-arctic"][data-thm-mode="light"] {
    color-scheme: light;
    --thm-surface-canvas: #ECEFF4;
    --thm-surface-primary: #FFFFFF;
    --thm-surface-elevated: #FFFFFF;
    --thm-surface-input: #F4F6F9;
    --thm-surface-subtle: #E5E9F0;
    --thm-text-primary: #2E3440;
    --thm-text-secondary: #3B4252;
    --thm-text-muted: #4C566A;
    --thm-brand-accent: #3B608F;
    --thm-brand-accent-hover: #2E4D75;
    --thm-brand-accent-secondary: #1E6C7A;
    --thm-brand-on-accent: #FFFFFF;
    --thm-border-subtle: #E5E9F0;
    --thm-border-default: #D8DEE9;
    --thm-border-strong: #6D778B;
    --thm-focus-ring: #3B608F;
    --thm-status-success: #047857;
    --thm-status-success-bg: #ECFDF5;
    --thm-status-warning: #8A4B08;
    --thm-status-warning-bg: #FEF3C7;
    --thm-status-danger: #B91C1C;
    --thm-status-danger-bg: #FEE2E2;
    --thm-status-info: #0369A1;
    --thm-status-info-bg: #E0F2FE;
    --thm-glass-surface: rgba(255, 255, 255, 0.78);
    --thm-glass-border: rgba(216, 222, 233, 0.72);
    --thm-elevation-card: 0 1px 2px -1px rgba(0, 0, 0, 0.06), 0 2px 4px -1px rgba(0, 0, 0, 0.04), 0 6px 16px -2px rgba(0, 0, 0, 0.06), 0 0 0 1px rgba(0, 0, 0, 0.03);
    --thm-elevation-popover: 0 2px 4px -1px rgba(0, 0, 0, 0.06), 0 8px 16px -4px rgba(0, 0, 0, 0.08), 0 20px 40px -6px rgba(0, 0, 0, 0.12);
    --thm-glass-specular: inset 0 1px 0 rgba(255, 255, 255, 0.36);
    --thm-scrollbar-thumb: #6D778B;
  }
  :root[data-thm-theme="nord-arctic"][data-thm-mode="dark"] {
    color-scheme: dark;
    --thm-surface-canvas: #242933;
    --thm-surface-primary: #2E3440;
    --thm-surface-elevated: #3B4252;
    --thm-surface-input: #292E39;
    --thm-surface-subtle: #353C4A;
    --thm-text-primary: #ECEFF4;
    --thm-text-secondary: #D8DEE9;
    --thm-text-muted: #A5B1C2;
    --thm-brand-accent: #88C0D0;
    --thm-brand-accent-hover: #9FD0DE;
    --thm-brand-accent-secondary: #9AB7D4;
    --thm-brand-on-accent: #1B2028;
    --thm-border-subtle: #353C4A;
    --thm-border-default: #4C566A;
    --thm-border-strong: #8691A8;
    --thm-focus-ring: #88C0D0;
    --thm-status-success: #34D399;
    --thm-status-success-bg: #064E3B;
    --thm-status-warning: #FBBF24;
    --thm-status-warning-bg: #451A03;
    --thm-status-danger: #F87171;
    --thm-status-danger-bg: #450A0A;
    --thm-status-info: #38BDF8;
    --thm-status-info-bg: #082F49;
    --thm-glass-surface: rgba(59, 66, 82, 0.76);
    --thm-glass-border: rgba(76, 86, 106, 0.72);
    --thm-elevation-card: 0 1px 2px 0 rgba(0, 0, 0, 0.40), 0 4px 10px -2px rgba(0, 0, 0, 0.36), 0 12px 28px -4px rgba(0, 0, 0, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.05);
    --thm-elevation-popover: 0 4px 8px -2px rgba(0, 0, 0, 0.48), 0 12px 24px -4px rgba(0, 0, 0, 0.52), 0 28px 56px -8px rgba(0, 0, 0, 0.58), inset 0 1px 0 rgba(255, 255, 255, 0.07);
    --thm-glass-specular: inset 0 1px 0 rgba(255, 255, 255, 0.12);
    --thm-scrollbar-thumb: #8691A8;
  }
  :root[data-thm-theme="monochrome-pro"] {
    color-scheme: light;
    --thm-surface-canvas: #FAFAFA;
    --thm-surface-primary: #FFFFFF;
    --thm-surface-elevated: #FFFFFF;
    --thm-surface-input: #F4F4F5;
    --thm-surface-subtle: #E4E4E7;
    --thm-text-primary: #09090B;
    --thm-text-secondary: #3F3F46;
    --thm-text-muted: #52525B;
    --thm-brand-accent: #18181B;
    --thm-brand-accent-hover: #27272A;
    --thm-brand-accent-secondary: #3F3F46;
    --thm-brand-on-accent: #FFFFFF;
    --thm-border-subtle: #E4E4E7;
    --thm-border-default: #D4D4D8;
    --thm-border-strong: #71717A;
    --thm-focus-ring: #18181B;
    --thm-status-success: #047857;
    --thm-status-success-bg: #ECFDF5;
    --thm-status-warning: #8A4B08;
    --thm-status-warning-bg: #FEF3C7;
    --thm-status-danger: #B91C1C;
    --thm-status-danger-bg: #FEE2E2;
    --thm-status-info: #0369A1;
    --thm-status-info-bg: #E0F2FE;
    --thm-glass-surface: rgba(255, 255, 255, 0.78);
    --thm-glass-border: rgba(212, 212, 216, 0.72);
    --thm-elevation-card: 0 1px 2px -1px rgba(0, 0, 0, 0.06), 0 2px 4px -1px rgba(0, 0, 0, 0.04), 0 6px 16px -2px rgba(0, 0, 0, 0.06), 0 0 0 1px rgba(0, 0, 0, 0.03);
    --thm-elevation-popover: 0 2px 4px -1px rgba(0, 0, 0, 0.06), 0 8px 16px -4px rgba(0, 0, 0, 0.08), 0 20px 40px -6px rgba(0, 0, 0, 0.12);
    --thm-glass-specular: inset 0 1px 0 rgba(255, 255, 255, 0.36);
    --thm-scrollbar-thumb: #71717A;
  }
  :root[data-thm-theme="monochrome-pro"][data-thm-mode="light"] {
    color-scheme: light;
    --thm-surface-canvas: #FAFAFA;
    --thm-surface-primary: #FFFFFF;
    --thm-surface-elevated: #FFFFFF;
    --thm-surface-input: #F4F4F5;
    --thm-surface-subtle: #E4E4E7;
    --thm-text-primary: #09090B;
    --thm-text-secondary: #3F3F46;
    --thm-text-muted: #52525B;
    --thm-brand-accent: #18181B;
    --thm-brand-accent-hover: #27272A;
    --thm-brand-accent-secondary: #3F3F46;
    --thm-brand-on-accent: #FFFFFF;
    --thm-border-subtle: #E4E4E7;
    --thm-border-default: #D4D4D8;
    --thm-border-strong: #71717A;
    --thm-focus-ring: #18181B;
    --thm-status-success: #047857;
    --thm-status-success-bg: #ECFDF5;
    --thm-status-warning: #8A4B08;
    --thm-status-warning-bg: #FEF3C7;
    --thm-status-danger: #B91C1C;
    --thm-status-danger-bg: #FEE2E2;
    --thm-status-info: #0369A1;
    --thm-status-info-bg: #E0F2FE;
    --thm-glass-surface: rgba(255, 255, 255, 0.78);
    --thm-glass-border: rgba(212, 212, 216, 0.72);
    --thm-elevation-card: 0 1px 2px -1px rgba(0, 0, 0, 0.06), 0 2px 4px -1px rgba(0, 0, 0, 0.04), 0 6px 16px -2px rgba(0, 0, 0, 0.06), 0 0 0 1px rgba(0, 0, 0, 0.03);
    --thm-elevation-popover: 0 2px 4px -1px rgba(0, 0, 0, 0.06), 0 8px 16px -4px rgba(0, 0, 0, 0.08), 0 20px 40px -6px rgba(0, 0, 0, 0.12);
    --thm-glass-specular: inset 0 1px 0 rgba(255, 255, 255, 0.36);
    --thm-scrollbar-thumb: #71717A;
  }
  :root[data-thm-theme="monochrome-pro"][data-thm-mode="dark"] {
    color-scheme: dark;
    --thm-surface-canvas: #09090B;
    --thm-surface-primary: #121215;
    --thm-surface-elevated: #1C1C21;
    --thm-surface-input: #101013;
    --thm-surface-subtle: #222228;
    --thm-text-primary: #FAFAFA;
    --thm-text-secondary: #D4D4D8;
    --thm-text-muted: #A1A1AA;
    --thm-brand-accent: #F4F4F5;
    --thm-brand-accent-hover: #FFFFFF;
    --thm-brand-accent-secondary: #D4D4D8;
    --thm-brand-on-accent: #09090B;
    --thm-border-subtle: #27272A;
    --thm-border-default: #3F3F46;
    --thm-border-strong: #71717A;
    --thm-focus-ring: #F4F4F5;
    --thm-status-success: #34D399;
    --thm-status-success-bg: #064E3B;
    --thm-status-warning: #FBBF24;
    --thm-status-warning-bg: #451A03;
    --thm-status-danger: #F87171;
    --thm-status-danger-bg: #450A0A;
    --thm-status-info: #38BDF8;
    --thm-status-info-bg: #082F49;
    --thm-glass-surface: rgba(28, 28, 33, 0.76);
    --thm-glass-border: rgba(63, 63, 70, 0.72);
    --thm-elevation-card: 0 1px 2px 0 rgba(0, 0, 0, 0.40), 0 4px 10px -2px rgba(0, 0, 0, 0.36), 0 12px 28px -4px rgba(0, 0, 0, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.05);
    --thm-elevation-popover: 0 4px 8px -2px rgba(0, 0, 0, 0.48), 0 12px 24px -4px rgba(0, 0, 0, 0.52), 0 28px 56px -8px rgba(0, 0, 0, 0.58), inset 0 1px 0 rgba(255, 255, 255, 0.07);
    --thm-glass-specular: inset 0 1px 0 rgba(255, 255, 255, 0.12);
    --thm-scrollbar-thumb: #71717A;
  }

  @supports (color: oklch(0.5 0.1 250)) {
    :root {
      --thm-surface-canvas: oklch(0.9707 0.0027 286.4);
      --thm-surface-primary: oklch(1.0000 0.0000 0.0);
      --thm-surface-elevated: oklch(1.0000 0.0000 0.0);
      --thm-surface-input: oklch(0.9827 0.0026 286.4);
      --thm-surface-subtle: oklch(0.9415 0.0067 286.3);
      --thm-text-primary: oklch(0.2316 0.0038 286.1);
      --thm-text-secondary: oklch(0.4461 0.0263 256.8);
      --thm-text-muted: oklch(0.4992 0.0186 266.1);
      --thm-brand-accent: oklch(0.5220 0.1771 255.8);
      --thm-brand-accent-hover: oklch(0.4476 0.1556 256.5);
      --thm-brand-accent-secondary: oklch(0.4568 0.2146 277.0);
      --thm-brand-on-accent: oklch(1.0000 0.0000 0.0);
      --thm-border-subtle: oklch(0.9233 0.0067 286.3);
      --thm-border-default: oklch(0.8652 0.0068 286.3);
      --thm-border-strong: oklch(0.5685 0.0122 286.0);
      --thm-focus-ring: oklch(0.5220 0.1771 255.8);
      --thm-status-success: oklch(0.5081 0.1049 165.6);
      --thm-status-success-bg: oklch(0.9793 0.0207 166.1);
      --thm-status-warning: oklch(0.4793 0.1104 58.6);
      --thm-status-warning-bg: oklch(0.9619 0.0580 95.6);
      --thm-status-danger: oklch(0.5054 0.1905 27.5);
      --thm-status-danger-bg: oklch(0.9356 0.0309 17.7);
      --thm-status-info: oklch(0.5000 0.1193 242.7);
      --thm-status-info-bg: oklch(0.9514 0.0250 236.8);
      --thm-glass-surface: oklch(1.0000 0.0000 0.0 / 0.78);
      --thm-glass-border: oklch(0.8652 0.0068 286.3 / 0.72);
    }
    :root[data-thm-theme="apple-daylight"] {
      --thm-surface-canvas: oklch(0.9707 0.0027 286.4);
      --thm-surface-primary: oklch(1.0000 0.0000 0.0);
      --thm-surface-elevated: oklch(1.0000 0.0000 0.0);
      --thm-surface-input: oklch(0.9827 0.0026 286.4);
      --thm-surface-subtle: oklch(0.9415 0.0067 286.3);
      --thm-text-primary: oklch(0.2316 0.0038 286.1);
      --thm-text-secondary: oklch(0.4461 0.0263 256.8);
      --thm-text-muted: oklch(0.4992 0.0186 266.1);
      --thm-brand-accent: oklch(0.5220 0.1771 255.8);
      --thm-brand-accent-hover: oklch(0.4476 0.1556 256.5);
      --thm-brand-accent-secondary: oklch(0.4568 0.2146 277.0);
      --thm-brand-on-accent: oklch(1.0000 0.0000 0.0);
      --thm-border-subtle: oklch(0.9233 0.0067 286.3);
      --thm-border-default: oklch(0.8652 0.0068 286.3);
      --thm-border-strong: oklch(0.5685 0.0122 286.0);
      --thm-focus-ring: oklch(0.5220 0.1771 255.8);
      --thm-status-success: oklch(0.5081 0.1049 165.6);
      --thm-status-success-bg: oklch(0.9793 0.0207 166.1);
      --thm-status-warning: oklch(0.4793 0.1104 58.6);
      --thm-status-warning-bg: oklch(0.9619 0.0580 95.6);
      --thm-status-danger: oklch(0.5054 0.1905 27.5);
      --thm-status-danger-bg: oklch(0.9356 0.0309 17.7);
      --thm-status-info: oklch(0.5000 0.1193 242.7);
      --thm-status-info-bg: oklch(0.9514 0.0250 236.8);
      --thm-glass-surface: oklch(1.0000 0.0000 0.0 / 0.78);
      --thm-glass-border: oklch(0.8652 0.0068 286.3 / 0.72);
    }
    :root[data-thm-theme="apple-daylight"][data-thm-mode="light"] {
      --thm-surface-canvas: oklch(0.9707 0.0027 286.4);
      --thm-surface-primary: oklch(1.0000 0.0000 0.0);
      --thm-surface-elevated: oklch(1.0000 0.0000 0.0);
      --thm-surface-input: oklch(0.9827 0.0026 286.4);
      --thm-surface-subtle: oklch(0.9415 0.0067 286.3);
      --thm-text-primary: oklch(0.2316 0.0038 286.1);
      --thm-text-secondary: oklch(0.4461 0.0263 256.8);
      --thm-text-muted: oklch(0.4992 0.0186 266.1);
      --thm-brand-accent: oklch(0.5220 0.1771 255.8);
      --thm-brand-accent-hover: oklch(0.4476 0.1556 256.5);
      --thm-brand-accent-secondary: oklch(0.4568 0.2146 277.0);
      --thm-brand-on-accent: oklch(1.0000 0.0000 0.0);
      --thm-border-subtle: oklch(0.9233 0.0067 286.3);
      --thm-border-default: oklch(0.8652 0.0068 286.3);
      --thm-border-strong: oklch(0.5685 0.0122 286.0);
      --thm-focus-ring: oklch(0.5220 0.1771 255.8);
      --thm-status-success: oklch(0.5081 0.1049 165.6);
      --thm-status-success-bg: oklch(0.9793 0.0207 166.1);
      --thm-status-warning: oklch(0.4793 0.1104 58.6);
      --thm-status-warning-bg: oklch(0.9619 0.0580 95.6);
      --thm-status-danger: oklch(0.5054 0.1905 27.5);
      --thm-status-danger-bg: oklch(0.9356 0.0309 17.7);
      --thm-status-info: oklch(0.5000 0.1193 242.7);
      --thm-status-info-bg: oklch(0.9514 0.0250 236.8);
      --thm-glass-surface: oklch(1.0000 0.0000 0.0 / 0.78);
      --thm-glass-border: oklch(0.8652 0.0068 286.3 / 0.72);
    }
    :root[data-thm-theme="apple-daylight"][data-thm-mode="dark"] {
      --thm-surface-canvas: oklch(0.1864 0.0088 264.3);
      --thm-surface-primary: oklch(0.2393 0.0142 267.0);
      --thm-surface-elevated: oklch(0.2854 0.0192 268.0);
      --thm-surface-input: oklch(0.2096 0.0166 268.9);
      --thm-surface-subtle: oklch(0.2690 0.0195 267.9);
      --thm-text-primary: oklch(0.9707 0.0027 286.4);
      --thm-text-secondary: oklch(0.8089 0.0246 262.1);
      --thm-text-muted: oklch(0.7137 0.0192 261.3);
      --thm-brand-accent: oklch(0.7137 0.1434 254.6);
      --thm-brand-accent-hover: oklch(0.8091 0.0956 251.8);
      --thm-brand-accent-secondary: oklch(0.6801 0.1583 276.9);
      --thm-brand-on-accent: oklch(0.1683 0.0181 263.9);
      --thm-border-subtle: oklch(0.3095 0.0227 267.3);
      --thm-border-default: oklch(0.3725 0.0287 268.9);
      --thm-border-strong: oklch(0.5991 0.0276 265.5);
      --thm-focus-ring: oklch(0.7137 0.1434 254.6);
      --thm-status-success: oklch(0.7729 0.1535 163.2);
      --thm-status-success-bg: oklch(0.3780 0.0730 168.9);
      --thm-status-warning: oklch(0.8369 0.1644 84.4);
      --thm-status-warning-bg: oklch(0.2791 0.0742 45.6);
      --thm-status-danger: oklch(0.7106 0.1661 22.2);
      --thm-status-danger-bg: oklch(0.2575 0.0886 26.0);
      --thm-status-info: oklch(0.7535 0.1390 232.7);
      --thm-status-info-bg: oklch(0.2935 0.0632 243.2);
      --thm-glass-surface: oklch(0.2854 0.0192 268.0 / 0.76);
      --thm-glass-border: oklch(0.3725 0.0287 268.9 / 0.72);
    }
    :root[data-thm-theme="apple-obsidian"] {
      --thm-surface-canvas: oklch(0.1683 0.0181 263.9);
      --thm-surface-primary: oklch(0.2224 0.0229 265.6);
      --thm-surface-elevated: oklch(0.2643 0.0282 263.9);
      --thm-surface-input: oklch(0.2050 0.0234 265.5);
      --thm-surface-subtle: oklch(0.2444 0.0283 266.4);
      --thm-text-primary: oklch(0.9707 0.0027 286.4);
      --thm-text-secondary: oklch(0.8089 0.0246 262.1);
      --thm-text-muted: oklch(0.7107 0.0351 256.8);
      --thm-brand-accent: oklch(0.7137 0.1434 254.6);
      --thm-brand-accent-hover: oklch(0.8091 0.0956 251.8);
      --thm-brand-accent-secondary: oklch(0.6801 0.1583 276.9);
      --thm-brand-on-accent: oklch(0.1683 0.0181 263.9);
      --thm-border-subtle: oklch(0.2889 0.0316 263.9);
      --thm-border-default: oklch(0.3604 0.0427 264.6);
      --thm-border-strong: oklch(0.5991 0.0276 265.5);
      --thm-focus-ring: oklch(0.7137 0.1434 254.6);
      --thm-status-success: oklch(0.7729 0.1535 163.2);
      --thm-status-success-bg: oklch(0.3780 0.0730 168.9);
      --thm-status-warning: oklch(0.8369 0.1644 84.4);
      --thm-status-warning-bg: oklch(0.2791 0.0742 45.6);
      --thm-status-danger: oklch(0.7106 0.1661 22.2);
      --thm-status-danger-bg: oklch(0.2575 0.0886 26.0);
      --thm-status-info: oklch(0.7535 0.1390 232.7);
      --thm-status-info-bg: oklch(0.2935 0.0632 243.2);
      --thm-glass-surface: oklch(0.2643 0.0282 263.9 / 0.76);
      --thm-glass-border: oklch(0.3604 0.0427 264.6 / 0.72);
    }
    :root[data-thm-theme="apple-obsidian"][data-thm-mode="light"] {
      --thm-surface-canvas: oklch(0.9668 0.0058 264.5);
      --thm-surface-primary: oklch(1.0000 0.0000 0.0);
      --thm-surface-elevated: oklch(1.0000 0.0000 0.0);
      --thm-surface-input: oklch(0.9543 0.0074 260.7);
      --thm-surface-subtle: oklch(0.9303 0.0116 264.5);
      --thm-text-primary: oklch(0.1683 0.0181 263.9);
      --thm-text-secondary: oklch(0.4455 0.0374 257.3);
      --thm-text-muted: oklch(0.4854 0.0381 258.4);
      --thm-brand-accent: oklch(0.4882 0.2172 264.4);
      --thm-brand-accent-hover: oklch(0.4244 0.1809 265.6);
      --thm-brand-accent-secondary: oklch(0.4568 0.2146 277.0);
      --thm-brand-on-accent: oklch(1.0000 0.0000 0.0);
      --thm-border-subtle: oklch(0.9288 0.0126 255.5);
      --thm-border-default: oklch(0.8690 0.0198 252.9);
      --thm-border-strong: oklch(0.5544 0.0407 257.4);
      --thm-focus-ring: oklch(0.4882 0.2172 264.4);
      --thm-status-success: oklch(0.5081 0.1049 165.6);
      --thm-status-success-bg: oklch(0.9793 0.0207 166.1);
      --thm-status-warning: oklch(0.4793 0.1104 58.6);
      --thm-status-warning-bg: oklch(0.9619 0.0580 95.6);
      --thm-status-danger: oklch(0.5054 0.1905 27.5);
      --thm-status-danger-bg: oklch(0.9356 0.0309 17.7);
      --thm-status-info: oklch(0.5000 0.1193 242.7);
      --thm-status-info-bg: oklch(0.9514 0.0250 236.8);
      --thm-glass-surface: oklch(1.0000 0.0000 0.0 / 0.78);
      --thm-glass-border: oklch(0.8690 0.0198 252.9 / 0.72);
    }
    :root[data-thm-theme="apple-obsidian"][data-thm-mode="dark"] {
      --thm-surface-canvas: oklch(0.1683 0.0181 263.9);
      --thm-surface-primary: oklch(0.2224 0.0229 265.6);
      --thm-surface-elevated: oklch(0.2643 0.0282 263.9);
      --thm-surface-input: oklch(0.2050 0.0234 265.5);
      --thm-surface-subtle: oklch(0.2444 0.0283 266.4);
      --thm-text-primary: oklch(0.9707 0.0027 286.4);
      --thm-text-secondary: oklch(0.8089 0.0246 262.1);
      --thm-text-muted: oklch(0.7107 0.0351 256.8);
      --thm-brand-accent: oklch(0.7137 0.1434 254.6);
      --thm-brand-accent-hover: oklch(0.8091 0.0956 251.8);
      --thm-brand-accent-secondary: oklch(0.6801 0.1583 276.9);
      --thm-brand-on-accent: oklch(0.1683 0.0181 263.9);
      --thm-border-subtle: oklch(0.2889 0.0316 263.9);
      --thm-border-default: oklch(0.3604 0.0427 264.6);
      --thm-border-strong: oklch(0.5991 0.0276 265.5);
      --thm-focus-ring: oklch(0.7137 0.1434 254.6);
      --thm-status-success: oklch(0.7729 0.1535 163.2);
      --thm-status-success-bg: oklch(0.3780 0.0730 168.9);
      --thm-status-warning: oklch(0.8369 0.1644 84.4);
      --thm-status-warning-bg: oklch(0.2791 0.0742 45.6);
      --thm-status-danger: oklch(0.7106 0.1661 22.2);
      --thm-status-danger-bg: oklch(0.2575 0.0886 26.0);
      --thm-status-info: oklch(0.7535 0.1390 232.7);
      --thm-status-info-bg: oklch(0.2935 0.0632 243.2);
      --thm-glass-surface: oklch(0.2643 0.0282 263.9 / 0.76);
      --thm-glass-border: oklch(0.3604 0.0427 264.6 / 0.72);
    }
    :root[data-thm-theme="kdan-industrial"] {
      --thm-surface-canvas: oklch(0.1683 0.0181 263.9);
      --thm-surface-primary: oklch(0.2101 0.0318 264.7);
      --thm-surface-elevated: oklch(0.2795 0.0368 260.0);
      --thm-surface-input: oklch(0.2001 0.0284 262.3);
      --thm-surface-subtle: oklch(0.2449 0.0388 264.4);
      --thm-text-primary: oklch(0.9842 0.0034 247.9);
      --thm-text-secondary: oklch(0.8690 0.0198 252.9);
      --thm-text-muted: oklch(0.7107 0.0351 256.8);
      --thm-brand-accent: oklch(0.8369 0.1644 84.4);
      --thm-brand-accent-hover: oklch(0.8790 0.1534 91.6);
      --thm-brand-accent-secondary: oklch(0.6801 0.1583 276.9);
      --thm-brand-on-accent: oklch(0.1683 0.0181 263.9);
      --thm-border-subtle: oklch(0.2795 0.0368 260.0);
      --thm-border-default: oklch(0.3717 0.0392 257.3);
      --thm-border-strong: oklch(0.5991 0.0276 265.5);
      --thm-focus-ring: oklch(0.8369 0.1644 84.4);
      --thm-status-success: oklch(0.7729 0.1535 163.2);
      --thm-status-success-bg: oklch(0.3780 0.0730 168.9);
      --thm-status-warning: oklch(0.8369 0.1644 84.4);
      --thm-status-warning-bg: oklch(0.2791 0.0742 45.6);
      --thm-status-danger: oklch(0.7106 0.1661 22.2);
      --thm-status-danger-bg: oklch(0.2575 0.0886 26.0);
      --thm-status-info: oklch(0.7535 0.1390 232.7);
      --thm-status-info-bg: oklch(0.2935 0.0632 243.2);
      --thm-glass-surface: oklch(0.2795 0.0368 260.0 / 0.76);
      --thm-glass-border: oklch(0.3717 0.0392 257.3 / 0.72);
    }
    :root[data-thm-theme="kdan-industrial"][data-thm-mode="light"] {
      --thm-surface-canvas: oklch(0.9842 0.0034 247.9);
      --thm-surface-primary: oklch(1.0000 0.0000 0.0);
      --thm-surface-elevated: oklch(1.0000 0.0000 0.0);
      --thm-surface-input: oklch(0.9683 0.0069 247.9);
      --thm-surface-subtle: oklch(0.9288 0.0126 255.5);
      --thm-text-primary: oklch(0.2077 0.0398 265.8);
      --thm-text-secondary: oklch(0.4455 0.0374 257.3);
      --thm-text-muted: oklch(0.4854 0.0381 258.4);
      --thm-brand-accent: oklch(0.4732 0.1247 46.2);
      --thm-brand-accent-hover: oklch(0.4137 0.1054 45.9);
      --thm-brand-accent-secondary: oklch(0.4568 0.2146 277.0);
      --thm-brand-on-accent: oklch(1.0000 0.0000 0.0);
      --thm-border-subtle: oklch(0.9288 0.0126 255.5);
      --thm-border-default: oklch(0.8690 0.0198 252.9);
      --thm-border-strong: oklch(0.5544 0.0407 257.4);
      --thm-focus-ring: oklch(0.4568 0.2146 277.0);
      --thm-status-success: oklch(0.5081 0.1049 165.6);
      --thm-status-success-bg: oklch(0.9793 0.0207 166.1);
      --thm-status-warning: oklch(0.4793 0.1104 58.6);
      --thm-status-warning-bg: oklch(0.9619 0.0580 95.6);
      --thm-status-danger: oklch(0.5054 0.1905 27.5);
      --thm-status-danger-bg: oklch(0.9356 0.0309 17.7);
      --thm-status-info: oklch(0.5000 0.1193 242.7);
      --thm-status-info-bg: oklch(0.9514 0.0250 236.8);
      --thm-glass-surface: oklch(1.0000 0.0000 0.0 / 0.78);
      --thm-glass-border: oklch(0.8690 0.0198 252.9 / 0.72);
    }
    :root[data-thm-theme="kdan-industrial"][data-thm-mode="dark"] {
      --thm-surface-canvas: oklch(0.1683 0.0181 263.9);
      --thm-surface-primary: oklch(0.2101 0.0318 264.7);
      --thm-surface-elevated: oklch(0.2795 0.0368 260.0);
      --thm-surface-input: oklch(0.2001 0.0284 262.3);
      --thm-surface-subtle: oklch(0.2449 0.0388 264.4);
      --thm-text-primary: oklch(0.9842 0.0034 247.9);
      --thm-text-secondary: oklch(0.8690 0.0198 252.9);
      --thm-text-muted: oklch(0.7107 0.0351 256.8);
      --thm-brand-accent: oklch(0.8369 0.1644 84.4);
      --thm-brand-accent-hover: oklch(0.8790 0.1534 91.6);
      --thm-brand-accent-secondary: oklch(0.6801 0.1583 276.9);
      --thm-brand-on-accent: oklch(0.1683 0.0181 263.9);
      --thm-border-subtle: oklch(0.2795 0.0368 260.0);
      --thm-border-default: oklch(0.3717 0.0392 257.3);
      --thm-border-strong: oklch(0.5991 0.0276 265.5);
      --thm-focus-ring: oklch(0.8369 0.1644 84.4);
      --thm-status-success: oklch(0.7729 0.1535 163.2);
      --thm-status-success-bg: oklch(0.3780 0.0730 168.9);
      --thm-status-warning: oklch(0.8369 0.1644 84.4);
      --thm-status-warning-bg: oklch(0.2791 0.0742 45.6);
      --thm-status-danger: oklch(0.7106 0.1661 22.2);
      --thm-status-danger-bg: oklch(0.2575 0.0886 26.0);
      --thm-status-info: oklch(0.7535 0.1390 232.7);
      --thm-status-info-bg: oklch(0.2935 0.0632 243.2);
      --thm-glass-surface: oklch(0.2795 0.0368 260.0 / 0.76);
      --thm-glass-border: oklch(0.3717 0.0392 257.3 / 0.72);
    }
    :root[data-thm-theme="spa-serenity"] {
      --thm-surface-canvas: oklch(0.9714 0.0141 343.2);
      --thm-surface-primary: oklch(1.0000 0.0000 0.0);
      --thm-surface-elevated: oklch(0.9854 0.0084 349.2);
      --thm-surface-input: oklch(0.9482 0.0276 342.3);
      --thm-surface-subtle: oklch(0.9348 0.0296 344.8);
      --thm-text-primary: oklch(0.2186 0.0315 311.3);
      --thm-text-secondary: oklch(0.4213 0.0513 322.5);
      --thm-text-muted: oklch(0.4598 0.0548 320.5);
      --thm-brand-accent: oklch(0.5246 0.1990 4.0);
      --thm-brand-accent-hover: oklch(0.4587 0.1697 3.8);
      --thm-brand-accent-secondary: oklch(0.5413 0.2466 293.0);
      --thm-brand-on-accent: oklch(1.0000 0.0000 0.0);
      --thm-border-subtle: oklch(0.9028 0.0400 342.8);
      --thm-border-default: oklch(0.8356 0.0566 344.3);
      --thm-border-strong: oklch(0.5707 0.0494 333.5);
      --thm-focus-ring: oklch(0.5246 0.1990 4.0);
      --thm-status-success: oklch(0.5081 0.1049 165.6);
      --thm-status-success-bg: oklch(0.9793 0.0207 166.1);
      --thm-status-warning: oklch(0.4793 0.1104 58.6);
      --thm-status-warning-bg: oklch(0.9619 0.0580 95.6);
      --thm-status-danger: oklch(0.5054 0.1905 27.5);
      --thm-status-danger-bg: oklch(0.9356 0.0309 17.7);
      --thm-status-info: oklch(0.5000 0.1193 242.7);
      --thm-status-info-bg: oklch(0.9514 0.0250 236.8);
      --thm-glass-surface: oklch(0.9854 0.0084 349.2 / 0.78);
      --thm-glass-border: oklch(0.8356 0.0566 344.3 / 0.72);
    }
    :root[data-thm-theme="spa-serenity"][data-thm-mode="light"] {
      --thm-surface-canvas: oklch(0.9714 0.0141 343.2);
      --thm-surface-primary: oklch(1.0000 0.0000 0.0);
      --thm-surface-elevated: oklch(0.9854 0.0084 349.2);
      --thm-surface-input: oklch(0.9482 0.0276 342.3);
      --thm-surface-subtle: oklch(0.9348 0.0296 344.8);
      --thm-text-primary: oklch(0.2186 0.0315 311.3);
      --thm-text-secondary: oklch(0.4213 0.0513 322.5);
      --thm-text-muted: oklch(0.4598 0.0548 320.5);
      --thm-brand-accent: oklch(0.5246 0.1990 4.0);
      --thm-brand-accent-hover: oklch(0.4587 0.1697 3.8);
      --thm-brand-accent-secondary: oklch(0.5413 0.2466 293.0);
      --thm-brand-on-accent: oklch(1.0000 0.0000 0.0);
      --thm-border-subtle: oklch(0.9028 0.0400 342.8);
      --thm-border-default: oklch(0.8356 0.0566 344.3);
      --thm-border-strong: oklch(0.5707 0.0494 333.5);
      --thm-focus-ring: oklch(0.5246 0.1990 4.0);
      --thm-status-success: oklch(0.5081 0.1049 165.6);
      --thm-status-success-bg: oklch(0.9793 0.0207 166.1);
      --thm-status-warning: oklch(0.4793 0.1104 58.6);
      --thm-status-warning-bg: oklch(0.9619 0.0580 95.6);
      --thm-status-danger: oklch(0.5054 0.1905 27.5);
      --thm-status-danger-bg: oklch(0.9356 0.0309 17.7);
      --thm-status-info: oklch(0.5000 0.1193 242.7);
      --thm-status-info-bg: oklch(0.9514 0.0250 236.8);
      --thm-glass-surface: oklch(0.9854 0.0084 349.2 / 0.78);
      --thm-glass-border: oklch(0.8356 0.0566 344.3 / 0.72);
    }
    :root[data-thm-theme="spa-serenity"][data-thm-mode="dark"] {
      --thm-surface-canvas: oklch(0.1905 0.0238 329.9);
      --thm-surface-primary: oklch(0.2323 0.0308 331.6);
      --thm-surface-elevated: oklch(0.2746 0.0409 330.3);
      --thm-surface-input: oklch(0.2076 0.0281 329.4);
      --thm-surface-subtle: oklch(0.2546 0.0371 330.8);
      --thm-text-primary: oklch(0.9482 0.0276 342.3);
      --thm-text-secondary: oklch(0.8369 0.0511 341.8);
      --thm-text-muted: oklch(0.7462 0.0571 341.9);
      --thm-brand-accent: oklch(0.7253 0.1752 349.8);
      --thm-brand-accent-hover: oklch(0.8228 0.1095 346.0);
      --thm-brand-accent-secondary: oklch(0.7665 0.1387 91.1);
      --thm-brand-on-accent: oklch(0.1905 0.0238 329.9);
      --thm-border-subtle: oklch(0.3052 0.0475 331.4);
      --thm-border-default: oklch(0.3687 0.0610 331.4);
      --thm-border-strong: oklch(0.5869 0.0623 340.1);
      --thm-focus-ring: oklch(0.7253 0.1752 349.8);
      --thm-status-success: oklch(0.7729 0.1535 163.2);
      --thm-status-success-bg: oklch(0.3780 0.0730 168.9);
      --thm-status-warning: oklch(0.8369 0.1644 84.4);
      --thm-status-warning-bg: oklch(0.2791 0.0742 45.6);
      --thm-status-danger: oklch(0.7106 0.1661 22.2);
      --thm-status-danger-bg: oklch(0.2575 0.0886 26.0);
      --thm-status-info: oklch(0.7535 0.1390 232.7);
      --thm-status-info-bg: oklch(0.2935 0.0632 243.2);
      --thm-glass-surface: oklch(0.2746 0.0409 330.3 / 0.76);
      --thm-glass-border: oklch(0.3687 0.0610 331.4 / 0.72);
    }
    :root[data-thm-theme="finance-trust"] {
      --thm-surface-canvas: oklch(0.9744 0.0042 236.5);
      --thm-surface-primary: oklch(1.0000 0.0000 0.0);
      --thm-surface-elevated: oklch(1.0000 0.0000 0.0);
      --thm-surface-input: oklch(0.9612 0.0067 233.6);
      --thm-surface-subtle: oklch(0.9352 0.0102 228.9);
      --thm-text-primary: oklch(0.1889 0.0369 264.1);
      --thm-text-secondary: oklch(0.4455 0.0374 257.3);
      --thm-text-muted: oklch(0.4854 0.0381 258.4);
      --thm-brand-accent: oklch(0.5081 0.1049 165.6);
      --thm-brand-accent-hover: oklch(0.4318 0.0865 166.9);
      --thm-brand-accent-secondary: oklch(0.4244 0.1809 265.6);
      --thm-brand-on-accent: oklch(1.0000 0.0000 0.0);
      --thm-border-subtle: oklch(0.9083 0.0146 244.7);
      --thm-border-default: oklch(0.8476 0.0199 240.8);
      --thm-border-strong: oklch(0.5544 0.0407 257.4);
      --thm-focus-ring: oklch(0.5081 0.1049 165.6);
      --thm-status-success: oklch(0.5081 0.1049 165.6);
      --thm-status-success-bg: oklch(0.9793 0.0207 166.1);
      --thm-status-warning: oklch(0.4793 0.1104 58.6);
      --thm-status-warning-bg: oklch(0.9619 0.0580 95.6);
      --thm-status-danger: oklch(0.5054 0.1905 27.5);
      --thm-status-danger-bg: oklch(0.9356 0.0309 17.7);
      --thm-status-info: oklch(0.5000 0.1193 242.7);
      --thm-status-info-bg: oklch(0.9514 0.0250 236.8);
      --thm-glass-surface: oklch(1.0000 0.0000 0.0 / 0.78);
      --thm-glass-border: oklch(0.8476 0.0199 240.8 / 0.72);
    }
    :root[data-thm-theme="finance-trust"][data-thm-mode="light"] {
      --thm-surface-canvas: oklch(0.9744 0.0042 236.5);
      --thm-surface-primary: oklch(1.0000 0.0000 0.0);
      --thm-surface-elevated: oklch(1.0000 0.0000 0.0);
      --thm-surface-input: oklch(0.9612 0.0067 233.6);
      --thm-surface-subtle: oklch(0.9352 0.0102 228.9);
      --thm-text-primary: oklch(0.1889 0.0369 264.1);
      --thm-text-secondary: oklch(0.4455 0.0374 257.3);
      --thm-text-muted: oklch(0.4854 0.0381 258.4);
      --thm-brand-accent: oklch(0.5081 0.1049 165.6);
      --thm-brand-accent-hover: oklch(0.4318 0.0865 166.9);
      --thm-brand-accent-secondary: oklch(0.4244 0.1809 265.6);
      --thm-brand-on-accent: oklch(1.0000 0.0000 0.0);
      --thm-border-subtle: oklch(0.9083 0.0146 244.7);
      --thm-border-default: oklch(0.8476 0.0199 240.8);
      --thm-border-strong: oklch(0.5544 0.0407 257.4);
      --thm-focus-ring: oklch(0.5081 0.1049 165.6);
      --thm-status-success: oklch(0.5081 0.1049 165.6);
      --thm-status-success-bg: oklch(0.9793 0.0207 166.1);
      --thm-status-warning: oklch(0.4793 0.1104 58.6);
      --thm-status-warning-bg: oklch(0.9619 0.0580 95.6);
      --thm-status-danger: oklch(0.5054 0.1905 27.5);
      --thm-status-danger-bg: oklch(0.9356 0.0309 17.7);
      --thm-status-info: oklch(0.5000 0.1193 242.7);
      --thm-status-info-bg: oklch(0.9514 0.0250 236.8);
      --thm-glass-surface: oklch(1.0000 0.0000 0.0 / 0.78);
      --thm-glass-border: oklch(0.8476 0.0199 240.8 / 0.72);
    }
    :root[data-thm-theme="finance-trust"][data-thm-mode="dark"] {
      --thm-surface-canvas: oklch(0.1597 0.0276 262.5);
      --thm-surface-primary: oklch(0.2253 0.0500 262.9);
      --thm-surface-elevated: oklch(0.2650 0.0595 263.9);
      --thm-surface-input: oklch(0.1983 0.0407 263.9);
      --thm-surface-subtle: oklch(0.2474 0.0547 263.5);
      --thm-text-primary: oklch(0.9842 0.0034 247.9);
      --thm-text-secondary: oklch(0.8690 0.0198 252.9);
      --thm-text-muted: oklch(0.8091 0.0956 251.8);
      --thm-brand-accent: oklch(0.7729 0.1535 163.2);
      --thm-brand-accent-hover: oklch(0.8452 0.1299 165.0);
      --thm-brand-accent-secondary: oklch(0.6801 0.1583 276.9);
      --thm-brand-on-accent: oklch(0.1597 0.0276 262.5);
      --thm-border-subtle: oklch(0.3012 0.0659 263.0);
      --thm-border-default: oklch(0.3696 0.0826 263.3);
      --thm-border-strong: oklch(0.5991 0.0276 265.5);
      --thm-focus-ring: oklch(0.7729 0.1535 163.2);
      --thm-status-success: oklch(0.7729 0.1535 163.2);
      --thm-status-success-bg: oklch(0.3780 0.0730 168.9);
      --thm-status-warning: oklch(0.8369 0.1644 84.4);
      --thm-status-warning-bg: oklch(0.2791 0.0742 45.6);
      --thm-status-danger: oklch(0.7106 0.1661 22.2);
      --thm-status-danger-bg: oklch(0.2575 0.0886 26.0);
      --thm-status-info: oklch(0.7535 0.1390 232.7);
      --thm-status-info-bg: oklch(0.2935 0.0632 243.2);
      --thm-glass-surface: oklch(0.2650 0.0595 263.9 / 0.76);
      --thm-glass-border: oklch(0.3696 0.0826 263.3 / 0.72);
    }
    :root[data-thm-theme="catppuccin-studio"] {
      --thm-surface-canvas: oklch(0.1828 0.0204 284.2);
      --thm-surface-primary: oklch(0.2429 0.0304 283.9);
      --thm-surface-elevated: oklch(0.2868 0.0382 283.7);
      --thm-surface-input: oklch(0.2155 0.0254 284.1);
      --thm-surface-subtle: oklch(0.2963 0.0326 281.7);
      --thm-text-primary: oklch(0.8787 0.0426 272.3);
      --thm-text-secondary: oklch(0.8168 0.0403 272.9);
      --thm-text-muted: oklch(0.7510 0.0396 273.9);
      --thm-brand-accent: oklch(0.7664 0.1113 259.9);
      --thm-brand-accent-hover: oklch(0.8166 0.0910 277.3);
      --thm-brand-accent-secondary: oklch(0.7871 0.1187 304.8);
      --thm-brand-on-accent: oklch(0.1828 0.0204 284.2);
      --thm-border-subtle: oklch(0.3240 0.0319 282.0);
      --thm-border-default: oklch(0.4037 0.0320 280.2);
      --thm-border-strong: oklch(0.6176 0.0367 276.0);
      --thm-focus-ring: oklch(0.7664 0.1113 259.9);
      --thm-status-success: oklch(0.7729 0.1535 163.2);
      --thm-status-success-bg: oklch(0.3780 0.0730 168.9);
      --thm-status-warning: oklch(0.8369 0.1644 84.4);
      --thm-status-warning-bg: oklch(0.2791 0.0742 45.6);
      --thm-status-danger: oklch(0.7106 0.1661 22.2);
      --thm-status-danger-bg: oklch(0.2575 0.0886 26.0);
      --thm-status-info: oklch(0.7535 0.1390 232.7);
      --thm-status-info-bg: oklch(0.2935 0.0632 243.2);
      --thm-glass-surface: oklch(0.2868 0.0382 283.7 / 0.76);
      --thm-glass-border: oklch(0.4037 0.0320 280.2 / 0.72);
    }
    :root[data-thm-theme="catppuccin-studio"][data-thm-mode="light"] {
      --thm-surface-canvas: oklch(0.9578 0.0058 264.5);
      --thm-surface-primary: oklch(1.0000 0.0000 0.0);
      --thm-surface-elevated: oklch(1.0000 0.0000 0.0);
      --thm-surface-input: oklch(0.9735 0.0054 275.0);
      --thm-surface-subtle: oklch(0.9335 0.0087 264.5);
      --thm-text-primary: oklch(0.3704 0.0380 278.3);
      --thm-text-secondary: oklch(0.4355 0.0430 279.3);
      --thm-text-muted: oklch(0.4765 0.0340 278.6);
      --thm-brand-accent: oklch(0.5208 0.2115 262.1);
      --thm-brand-accent-hover: oklch(0.4516 0.1813 262.2);
      --thm-brand-accent-secondary: oklch(0.5002 0.2409 295.6);
      --thm-brand-on-accent: oklch(1.0000 0.0000 0.0);
      --thm-border-subtle: oklch(0.9060 0.0117 264.5);
      --thm-border-default: oklch(0.8083 0.0174 271.2);
      --thm-border-strong: oklch(0.5532 0.0312 278.6);
      --thm-focus-ring: oklch(0.5208 0.2115 262.1);
      --thm-status-success: oklch(0.5081 0.1049 165.6);
      --thm-status-success-bg: oklch(0.9793 0.0207 166.1);
      --thm-status-warning: oklch(0.4793 0.1104 58.6);
      --thm-status-warning-bg: oklch(0.9619 0.0580 95.6);
      --thm-status-danger: oklch(0.5054 0.1905 27.5);
      --thm-status-danger-bg: oklch(0.9356 0.0309 17.7);
      --thm-status-info: oklch(0.5000 0.1193 242.7);
      --thm-status-info-bg: oklch(0.9514 0.0250 236.8);
      --thm-glass-surface: oklch(1.0000 0.0000 0.0 / 0.78);
      --thm-glass-border: oklch(0.8083 0.0174 271.2 / 0.72);
    }
    :root[data-thm-theme="catppuccin-studio"][data-thm-mode="dark"] {
      --thm-surface-canvas: oklch(0.1828 0.0204 284.2);
      --thm-surface-primary: oklch(0.2429 0.0304 283.9);
      --thm-surface-elevated: oklch(0.2868 0.0382 283.7);
      --thm-surface-input: oklch(0.2155 0.0254 284.1);
      --thm-surface-subtle: oklch(0.2963 0.0326 281.7);
      --thm-text-primary: oklch(0.8787 0.0426 272.3);
      --thm-text-secondary: oklch(0.8168 0.0403 272.9);
      --thm-text-muted: oklch(0.7510 0.0396 273.9);
      --thm-brand-accent: oklch(0.7664 0.1113 259.9);
      --thm-brand-accent-hover: oklch(0.8166 0.0910 277.3);
      --thm-brand-accent-secondary: oklch(0.7871 0.1187 304.8);
      --thm-brand-on-accent: oklch(0.1828 0.0204 284.2);
      --thm-border-subtle: oklch(0.3240 0.0319 282.0);
      --thm-border-default: oklch(0.4037 0.0320 280.2);
      --thm-border-strong: oklch(0.6176 0.0367 276.0);
      --thm-focus-ring: oklch(0.7664 0.1113 259.9);
      --thm-status-success: oklch(0.7729 0.1535 163.2);
      --thm-status-success-bg: oklch(0.3780 0.0730 168.9);
      --thm-status-warning: oklch(0.8369 0.1644 84.4);
      --thm-status-warning-bg: oklch(0.2791 0.0742 45.6);
      --thm-status-danger: oklch(0.7106 0.1661 22.2);
      --thm-status-danger-bg: oklch(0.2575 0.0886 26.0);
      --thm-status-info: oklch(0.7535 0.1390 232.7);
      --thm-status-info-bg: oklch(0.2935 0.0632 243.2);
      --thm-glass-surface: oklch(0.2868 0.0382 283.7 / 0.76);
      --thm-glass-border: oklch(0.4037 0.0320 280.2 / 0.72);
    }
    :root[data-thm-theme="flexoki-paper"] {
      --thm-surface-canvas: oklch(0.9537 0.0147 98.3);
      --thm-surface-primary: oklch(0.9901 0.0161 95.2);
      --thm-surface-elevated: oklch(1.0000 0.0000 0.0);
      --thm-surface-input: oklch(0.9692 0.0121 96.4);
      --thm-surface-subtle: oklch(0.9174 0.0149 98.3);
      --thm-text-primary: oklch(0.1696 0.0017 17.3);
      --thm-text-secondary: oklch(0.4050 0.0067 95.2);
      --thm-text-muted: oklch(0.4531 0.0050 91.5);
      --thm-brand-accent: oklch(0.4818 0.1315 254.8);
      --thm-brand-accent-hover: oklch(0.4094 0.1119 255.0);
      --thm-brand-accent-secondary: oklch(0.4942 0.1409 42.9);
      --thm-brand-on-accent: oklch(0.9901 0.0161 95.2);
      --thm-border-subtle: oklch(0.9174 0.0149 98.3);
      --thm-border-default: oklch(0.8463 0.0137 102.1);
      --thm-border-strong: oklch(0.5485 0.0095 91.6);
      --thm-focus-ring: oklch(0.4818 0.1315 254.8);
      --thm-status-success: oklch(0.5081 0.1049 165.6);
      --thm-status-success-bg: oklch(0.9793 0.0207 166.1);
      --thm-status-warning: oklch(0.4793 0.1104 58.6);
      --thm-status-warning-bg: oklch(0.9619 0.0580 95.6);
      --thm-status-danger: oklch(0.5054 0.1905 27.5);
      --thm-status-danger-bg: oklch(0.9356 0.0309 17.7);
      --thm-status-info: oklch(0.5000 0.1193 242.7);
      --thm-status-info-bg: oklch(0.9514 0.0250 236.8);
      --thm-glass-surface: oklch(1.0000 0.0000 0.0 / 0.78);
      --thm-glass-border: oklch(0.8463 0.0137 102.1 / 0.72);
    }
    :root[data-thm-theme="flexoki-paper"][data-thm-mode="light"] {
      --thm-surface-canvas: oklch(0.9537 0.0147 98.3);
      --thm-surface-primary: oklch(0.9901 0.0161 95.2);
      --thm-surface-elevated: oklch(1.0000 0.0000 0.0);
      --thm-surface-input: oklch(0.9692 0.0121 96.4);
      --thm-surface-subtle: oklch(0.9174 0.0149 98.3);
      --thm-text-primary: oklch(0.1696 0.0017 17.3);
      --thm-text-secondary: oklch(0.4050 0.0067 95.2);
      --thm-text-muted: oklch(0.4531 0.0050 91.5);
      --thm-brand-accent: oklch(0.4818 0.1315 254.8);
      --thm-brand-accent-hover: oklch(0.4094 0.1119 255.0);
      --thm-brand-accent-secondary: oklch(0.4942 0.1409 42.9);
      --thm-brand-on-accent: oklch(0.9901 0.0161 95.2);
      --thm-border-subtle: oklch(0.9174 0.0149 98.3);
      --thm-border-default: oklch(0.8463 0.0137 102.1);
      --thm-border-strong: oklch(0.5485 0.0095 91.6);
      --thm-focus-ring: oklch(0.4818 0.1315 254.8);
      --thm-status-success: oklch(0.5081 0.1049 165.6);
      --thm-status-success-bg: oklch(0.9793 0.0207 166.1);
      --thm-status-warning: oklch(0.4793 0.1104 58.6);
      --thm-status-warning-bg: oklch(0.9619 0.0580 95.6);
      --thm-status-danger: oklch(0.5054 0.1905 27.5);
      --thm-status-danger-bg: oklch(0.9356 0.0309 17.7);
      --thm-status-info: oklch(0.5000 0.1193 242.7);
      --thm-status-info-bg: oklch(0.9514 0.0250 236.8);
      --thm-glass-surface: oklch(1.0000 0.0000 0.0 / 0.78);
      --thm-glass-border: oklch(0.8463 0.0137 102.1 / 0.72);
    }
    :root[data-thm-theme="flexoki-paper"][data-thm-mode="dark"] {
      --thm-surface-canvas: oklch(0.1696 0.0017 17.3);
      --thm-surface-primary: oklch(0.2228 0.0025 67.7);
      --thm-surface-elevated: oklch(0.2734 0.0023 67.7);
      --thm-surface-input: oklch(0.1965 0.0026 67.7);
      --thm-surface-subtle: oklch(0.2568 0.0024 67.7);
      --thm-text-primary: oklch(0.9174 0.0149 98.3);
      --thm-text-secondary: oklch(0.8463 0.0137 102.1);
      --thm-text-muted: oklch(0.7080 0.0130 96.5);
      --thm-brand-accent: oklch(0.6443 0.1055 246.7);
      --thm-brand-accent-hover: oklch(0.7375 0.0890 245.7);
      --thm-brand-accent-secondary: oklch(0.7119 0.1414 52.1);
      --thm-brand-on-accent: oklch(0.1696 0.0017 17.3);
      --thm-border-subtle: oklch(0.2734 0.0023 67.7);
      --thm-border-default: oklch(0.3651 0.0044 67.7);
      --thm-border-strong: oklch(0.6169 0.0078 88.7);
      --thm-focus-ring: oklch(0.6443 0.1055 246.7);
      --thm-status-success: oklch(0.7729 0.1535 163.2);
      --thm-status-success-bg: oklch(0.3780 0.0730 168.9);
      --thm-status-warning: oklch(0.8369 0.1644 84.4);
      --thm-status-warning-bg: oklch(0.2791 0.0742 45.6);
      --thm-status-danger: oklch(0.7106 0.1661 22.2);
      --thm-status-danger-bg: oklch(0.2575 0.0886 26.0);
      --thm-status-info: oklch(0.7535 0.1390 232.7);
      --thm-status-info-bg: oklch(0.2935 0.0632 243.2);
      --thm-glass-surface: oklch(0.2734 0.0023 67.7 / 0.76);
      --thm-glass-border: oklch(0.3651 0.0044 67.7 / 0.72);
    }
    :root[data-thm-theme="nord-arctic"] {
      --thm-surface-canvas: oklch(0.2804 0.0198 264.2);
      --thm-surface-primary: oklch(0.3244 0.0229 264.2);
      --thm-surface-elevated: oklch(0.3792 0.0290 266.5);
      --thm-surface-input: oklch(0.3010 0.0212 265.9);
      --thm-surface-subtle: oklch(0.3555 0.0262 264.2);
      --thm-text-primary: oklch(0.9513 0.0074 260.7);
      --thm-text-secondary: oklch(0.8993 0.0164 262.7);
      --thm-text-muted: oklch(0.7564 0.0279 257.0);
      --thm-brand-accent: oklch(0.7746 0.0622 217.5);
      --thm-brand-accent-hover: oklch(0.8279 0.0546 217.2);
      --thm-brand-accent-secondary: oklch(0.7676 0.0524 248.5);
      --thm-brand-on-accent: oklch(0.2421 0.0170 259.8);
      --thm-border-subtle: oklch(0.3555 0.0262 264.2);
      --thm-border-default: oklch(0.4523 0.0352 264.1);
      --thm-border-strong: oklch(0.6557 0.0366 265.1);
      --thm-focus-ring: oklch(0.7746 0.0622 217.5);
      --thm-status-success: oklch(0.7729 0.1535 163.2);
      --thm-status-success-bg: oklch(0.3780 0.0730 168.9);
      --thm-status-warning: oklch(0.8369 0.1644 84.4);
      --thm-status-warning-bg: oklch(0.2791 0.0742 45.6);
      --thm-status-danger: oklch(0.7106 0.1661 22.2);
      --thm-status-danger-bg: oklch(0.2575 0.0886 26.0);
      --thm-status-info: oklch(0.7535 0.1390 232.7);
      --thm-status-info-bg: oklch(0.2935 0.0632 243.2);
      --thm-glass-surface: oklch(0.3792 0.0290 266.5 / 0.76);
      --thm-glass-border: oklch(0.4523 0.0352 264.1 / 0.72);
    }
    :root[data-thm-theme="nord-arctic"][data-thm-mode="light"] {
      --thm-surface-canvas: oklch(0.9513 0.0074 260.7);
      --thm-surface-primary: oklch(1.0000 0.0000 0.0);
      --thm-surface-elevated: oklch(1.0000 0.0000 0.0);
      --thm-surface-input: oklch(0.9725 0.0045 258.3);
      --thm-surface-subtle: oklch(0.9330 0.0104 261.8);
      --thm-text-primary: oklch(0.3244 0.0229 264.2);
      --thm-text-secondary: oklch(0.3792 0.0290 266.5);
      --thm-text-muted: oklch(0.4523 0.0352 264.1);
      --thm-brand-accent: oklch(0.4833 0.0873 255.1);
      --thm-brand-accent-hover: oklch(0.4157 0.0769 255.4);
      --thm-brand-accent-secondary: oklch(0.4916 0.0757 212.3);
      --thm-brand-on-accent: oklch(1.0000 0.0000 0.0);
      --thm-border-subtle: oklch(0.9330 0.0104 261.8);
      --thm-border-default: oklch(0.8993 0.0164 262.7);
      --thm-border-strong: oklch(0.5681 0.0332 264.3);
      --thm-focus-ring: oklch(0.4833 0.0873 255.1);
      --thm-status-success: oklch(0.5081 0.1049 165.6);
      --thm-status-success-bg: oklch(0.9793 0.0207 166.1);
      --thm-status-warning: oklch(0.4793 0.1104 58.6);
      --thm-status-warning-bg: oklch(0.9619 0.0580 95.6);
      --thm-status-danger: oklch(0.5054 0.1905 27.5);
      --thm-status-danger-bg: oklch(0.9356 0.0309 17.7);
      --thm-status-info: oklch(0.5000 0.1193 242.7);
      --thm-status-info-bg: oklch(0.9514 0.0250 236.8);
      --thm-glass-surface: oklch(1.0000 0.0000 0.0 / 0.78);
      --thm-glass-border: oklch(0.8993 0.0164 262.7 / 0.72);
    }
    :root[data-thm-theme="nord-arctic"][data-thm-mode="dark"] {
      --thm-surface-canvas: oklch(0.2804 0.0198 264.2);
      --thm-surface-primary: oklch(0.3244 0.0229 264.2);
      --thm-surface-elevated: oklch(0.3792 0.0290 266.5);
      --thm-surface-input: oklch(0.3010 0.0212 265.9);
      --thm-surface-subtle: oklch(0.3555 0.0262 264.2);
      --thm-text-primary: oklch(0.9513 0.0074 260.7);
      --thm-text-secondary: oklch(0.8993 0.0164 262.7);
      --thm-text-muted: oklch(0.7564 0.0279 257.0);
      --thm-brand-accent: oklch(0.7746 0.0622 217.5);
      --thm-brand-accent-hover: oklch(0.8279 0.0546 217.2);
      --thm-brand-accent-secondary: oklch(0.7676 0.0524 248.5);
      --thm-brand-on-accent: oklch(0.2421 0.0170 259.8);
      --thm-border-subtle: oklch(0.3555 0.0262 264.2);
      --thm-border-default: oklch(0.4523 0.0352 264.1);
      --thm-border-strong: oklch(0.6557 0.0366 265.1);
      --thm-focus-ring: oklch(0.7746 0.0622 217.5);
      --thm-status-success: oklch(0.7729 0.1535 163.2);
      --thm-status-success-bg: oklch(0.3780 0.0730 168.9);
      --thm-status-warning: oklch(0.8369 0.1644 84.4);
      --thm-status-warning-bg: oklch(0.2791 0.0742 45.6);
      --thm-status-danger: oklch(0.7106 0.1661 22.2);
      --thm-status-danger-bg: oklch(0.2575 0.0886 26.0);
      --thm-status-info: oklch(0.7535 0.1390 232.7);
      --thm-status-info-bg: oklch(0.2935 0.0632 243.2);
      --thm-glass-surface: oklch(0.3792 0.0290 266.5 / 0.76);
      --thm-glass-border: oklch(0.4523 0.0352 264.1 / 0.72);
    }
    :root[data-thm-theme="monochrome-pro"] {
      --thm-surface-canvas: oklch(0.9851 0.0000 0.0);
      --thm-surface-primary: oklch(1.0000 0.0000 0.0);
      --thm-surface-elevated: oklch(1.0000 0.0000 0.0);
      --thm-surface-input: oklch(0.9674 0.0013 286.4);
      --thm-surface-subtle: oklch(0.9197 0.0040 286.3);
      --thm-text-primary: oklch(0.1408 0.0044 285.8);
      --thm-text-secondary: oklch(0.3703 0.0119 285.8);
      --thm-text-muted: oklch(0.4419 0.0146 285.8);
      --thm-brand-accent: oklch(0.2103 0.0059 285.9);
      --thm-brand-accent-hover: oklch(0.2739 0.0055 286.0);
      --thm-brand-accent-secondary: oklch(0.3703 0.0119 285.8);
      --thm-brand-on-accent: oklch(1.0000 0.0000 0.0);
      --thm-border-subtle: oklch(0.9197 0.0040 286.3);
      --thm-border-default: oklch(0.8711 0.0055 286.3);
      --thm-border-strong: oklch(0.5517 0.0138 285.9);
      --thm-focus-ring: oklch(0.2103 0.0059 285.9);
      --thm-status-success: oklch(0.5081 0.1049 165.6);
      --thm-status-success-bg: oklch(0.9793 0.0207 166.1);
      --thm-status-warning: oklch(0.4793 0.1104 58.6);
      --thm-status-warning-bg: oklch(0.9619 0.0580 95.6);
      --thm-status-danger: oklch(0.5054 0.1905 27.5);
      --thm-status-danger-bg: oklch(0.9356 0.0309 17.7);
      --thm-status-info: oklch(0.5000 0.1193 242.7);
      --thm-status-info-bg: oklch(0.9514 0.0250 236.8);
      --thm-glass-surface: oklch(1.0000 0.0000 0.0 / 0.78);
      --thm-glass-border: oklch(0.8711 0.0055 286.3 / 0.72);
    }
    :root[data-thm-theme="monochrome-pro"][data-thm-mode="light"] {
      --thm-surface-canvas: oklch(0.9851 0.0000 0.0);
      --thm-surface-primary: oklch(1.0000 0.0000 0.0);
      --thm-surface-elevated: oklch(1.0000 0.0000 0.0);
      --thm-surface-input: oklch(0.9674 0.0013 286.4);
      --thm-surface-subtle: oklch(0.9197 0.0040 286.3);
      --thm-text-primary: oklch(0.1408 0.0044 285.8);
      --thm-text-secondary: oklch(0.3703 0.0119 285.8);
      --thm-text-muted: oklch(0.4419 0.0146 285.8);
      --thm-brand-accent: oklch(0.2103 0.0059 285.9);
      --thm-brand-accent-hover: oklch(0.2739 0.0055 286.0);
      --thm-brand-accent-secondary: oklch(0.3703 0.0119 285.8);
      --thm-brand-on-accent: oklch(1.0000 0.0000 0.0);
      --thm-border-subtle: oklch(0.9197 0.0040 286.3);
      --thm-border-default: oklch(0.8711 0.0055 286.3);
      --thm-border-strong: oklch(0.5517 0.0138 285.9);
      --thm-focus-ring: oklch(0.2103 0.0059 285.9);
      --thm-status-success: oklch(0.5081 0.1049 165.6);
      --thm-status-success-bg: oklch(0.9793 0.0207 166.1);
      --thm-status-warning: oklch(0.4793 0.1104 58.6);
      --thm-status-warning-bg: oklch(0.9619 0.0580 95.6);
      --thm-status-danger: oklch(0.5054 0.1905 27.5);
      --thm-status-danger-bg: oklch(0.9356 0.0309 17.7);
      --thm-status-info: oklch(0.5000 0.1193 242.7);
      --thm-status-info-bg: oklch(0.9514 0.0250 236.8);
      --thm-glass-surface: oklch(1.0000 0.0000 0.0 / 0.78);
      --thm-glass-border: oklch(0.8711 0.0055 286.3 / 0.72);
    }
    :root[data-thm-theme="monochrome-pro"][data-thm-mode="dark"] {
      --thm-surface-canvas: oklch(0.1408 0.0044 285.8);
      --thm-surface-primary: oklch(0.1836 0.0061 285.8);
      --thm-surface-elevated: oklch(0.2286 0.0096 285.6);
      --thm-surface-input: oklch(0.1744 0.0061 285.7);
      --thm-surface-subtle: oklch(0.2545 0.0112 285.6);
      --thm-text-primary: oklch(0.9851 0.0000 0.0);
      --thm-text-secondary: oklch(0.8711 0.0055 286.3);
      --thm-text-muted: oklch(0.7118 0.0129 286.1);
      --thm-brand-accent: oklch(0.9674 0.0013 286.4);
      --thm-brand-accent-hover: oklch(1.0000 0.0000 0.0);
      --thm-brand-accent-secondary: oklch(0.8711 0.0055 286.3);
      --thm-brand-on-accent: oklch(0.1408 0.0044 285.8);
      --thm-border-subtle: oklch(0.2739 0.0055 286.0);
      --thm-border-default: oklch(0.3703 0.0119 285.8);
      --thm-border-strong: oklch(0.5517 0.0138 285.9);
      --thm-focus-ring: oklch(0.9674 0.0013 286.4);
      --thm-status-success: oklch(0.7729 0.1535 163.2);
      --thm-status-success-bg: oklch(0.3780 0.0730 168.9);
      --thm-status-warning: oklch(0.8369 0.1644 84.4);
      --thm-status-warning-bg: oklch(0.2791 0.0742 45.6);
      --thm-status-danger: oklch(0.7106 0.1661 22.2);
      --thm-status-danger-bg: oklch(0.2575 0.0886 26.0);
      --thm-status-info: oklch(0.7535 0.1390 232.7);
      --thm-status-info-bg: oklch(0.2935 0.0632 243.2);
      --thm-glass-surface: oklch(0.2286 0.0096 285.6 / 0.76);
      --thm-glass-border: oklch(0.3703 0.0119 285.8 / 0.72);
    }
  }

  :root, :root[data-thm-density="standard"] {
    --thm-control-height: 36px;
    --thm-hitbox-min: 36px;
    --thm-font-body: 15px;
    --thm-control-gap: 12px;
    --thm-radius-md: 12px;
    --thm-radius-sm: 8px;
    --thm-radius-lg: 16px;
  }
  :root[data-thm-density="compact"] {
    --thm-control-height: 30px;
    --thm-hitbox-min: 30px;
    --thm-font-body: 14px;
    --thm-control-gap: 8px;
    --thm-radius-md: 10px;
    --thm-radius-sm: 6px;
    --thm-radius-lg: 14px;
  }
  :root[data-thm-density="dense"] {
    --thm-control-height: 26px;
    --thm-hitbox-min: 24px;
    --thm-font-body: 13px;
    --thm-control-gap: 6px;
    --thm-radius-md: 8px;
    --thm-radius-sm: 5px;
    --thm-radius-lg: 10px;
  }

  @media (prefers-reduced-motion: reduce) {
    :root {
      --thm-motion-duration-fast: 0.01ms;
      --thm-motion-duration-normal: 0.01ms;
      --thm-motion-duration-slow: 0.01ms;
    }
  }
}

@layer thm.base {
  html, body.thm-root {
    background-color: var(--thm-surface-canvas);
    color: var(--thm-text-primary);
    font-family: var(--thm-font-sans);
    font-size: var(--thm-font-body, 15px);
    line-height: var(--thm-line-height-body, 1.5);
    -webkit-font-smoothing: antialiased;
  }
  :focus-visible {
    outline: 2px solid var(--thm-focus-ring);
    outline-offset: 2px;
  }
  .thm-tabular {
    font-variant-numeric: tabular-nums;
  }
}

@layer thm.components {
  /* WCAG 2.5.8 Target Size Minimum >= 24x24px floor across all density presets */
  .thm-btn, button, [role="button"], input, select {
    min-height: var(--thm-hitbox-min, 24px);
    min-width: 24px;
  }
  .thm-hitbox-expand {
    position: relative;
  }
  .thm-hitbox-expand::after {
    content: "";
    position: absolute;
    inset: -2px;
    min-width: 24px;
    min-height: 24px;
  }

  /* OC-66 Overlay thin scrollbars + WCAG 2.4.11 sticky-header focus scroll padding */
  .thm-scroll-region {
    overflow: auto;
    scrollbar-width: thin;
    scrollbar-color: transparent transparent;
    scrollbar-gutter: stable;
    scroll-padding-block: 56px;
    scroll-padding-inline: 24px;
  }
  .thm-scroll-region::-webkit-scrollbar {
    width: 6px;
    height: 6px;
  }
  .thm-scroll-region::-webkit-scrollbar-track {
    background: transparent;
  }
  .thm-scroll-region::-webkit-scrollbar-thumb {
    background: transparent;
    border-radius: 9999px;
  }
  .thm-scroll-region:hover,
  .thm-scroll-region:focus-within,
  .thm-scroll-region.is-scrolling {
    scrollbar-color: var(--thm-scrollbar-thumb) transparent;
  }
  .thm-scroll-region:hover::-webkit-scrollbar-thumb,
  .thm-scroll-region:focus-within::-webkit-scrollbar-thumb,
  .thm-scroll-region.is-scrolling::-webkit-scrollbar-thumb {
    background: var(--thm-scrollbar-thumb);
  }

  /* Scoped OC-93 nowrap safety (never applied globally to layout containers) */
  .thm-nowrap-safe {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
  }
  .thm-readable-content {
    white-space: normal;
    overflow-wrap: anywhere;
    line-height: var(--thm-line-height-body, 1.5);
  }
  .thm-data-number {
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
  }

  /* Navigation-only Liquid Glass chrome */
  .thm-glass-chrome {
    background: var(--thm-glass-surface);
    backdrop-filter: blur(var(--thm-glass-blur, 12px));
    -webkit-backdrop-filter: blur(var(--thm-glass-blur, 12px));
    border: 1px solid var(--thm-glass-border);
    box-shadow: var(--thm-glass-specular, inset 0 1px 0 rgba(255, 255, 255, 0.24)), var(--thm-elevation-card);
  }
  @media (prefers-reduced-transparency: reduce) {
    .thm-glass-chrome {
      background: var(--thm-surface-elevated);
      backdrop-filter: none;
      -webkit-backdrop-filter: none;
      box-shadow: var(--thm-elevation-card);
    }
  }
  [data-thm-transparency="reduced"] .thm-glass-chrome {
    background: var(--thm-surface-elevated);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    box-shadow: var(--thm-elevation-card);
  }

  /* Protected Domain Artwork & Stage Boundary (Vector Studio / Video Studio / Maket) */
  [data-thm-isolate="domain"],
  [data-thm-isolate="domain"] canvas,
  [data-thm-isolate="domain"] svg[data-vector-art],
  [data-thm-isolate="domain"] .video-stage {
    color-scheme: normal;
    filter: none;
    forced-color-adjust: none;
    isolation: isolate;
  }

  /* Apple-inspired UI kit primitives */
  .thm-card {
    background: var(--thm-surface-primary);
    border: 1px solid var(--thm-border-default);
    border-radius: var(--thm-radius-md);
    box-shadow: var(--thm-elevation-card);
    padding: calc(var(--thm-control-gap, 12px) * 1.25);
  }
  .thm-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--thm-control-gap, 12px);
    height: var(--thm-control-height, 36px);
    padding: 0 var(--thm-control-gap, 12px);
    border-radius: var(--thm-radius-sm);
    border: 1px solid var(--thm-border-strong);
    background: var(--thm-surface-primary);
    color: var(--thm-text-primary);
    font-family: var(--thm-font-sans);
    font-size: var(--thm-font-body, 15px);
    font-weight: 500;
    cursor: pointer;
    transition: background-color var(--thm-motion-duration-fast) var(--thm-motion-spring-snappy),
                border-color var(--thm-motion-duration-fast) var(--thm-motion-spring-snappy),
                transform var(--thm-motion-duration-fast) var(--thm-motion-spring-snappy);
  }
  .thm-btn-primary {
    background: var(--thm-brand-accent);
    border-color: var(--thm-brand-accent);
    color: var(--thm-brand-on-accent);
  }
  .thm-btn-primary:hover:not(:disabled) {
    background: var(--thm-brand-accent-hover);
    border-color: var(--thm-brand-accent-hover);
  }
  .thm-input {
    height: var(--thm-control-height, 36px);
    padding: 0 var(--thm-control-gap, 12px);
    border-radius: var(--thm-radius-sm);
    border: 1px solid var(--thm-border-strong);
    background: var(--thm-surface-input);
    color: var(--thm-text-primary);
    font-family: var(--thm-font-sans);
    font-size: var(--thm-font-body, 15px);
  }
  .thm-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 2px 8px;
    border-radius: 9999px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
  }
  .thm-badge-success { color: var(--thm-status-success); background: var(--thm-status-success-bg); }
  .thm-badge-warning { color: var(--thm-status-warning); background: var(--thm-status-warning-bg); }
  .thm-badge-danger { color: var(--thm-status-danger); background: var(--thm-status-danger-bg); }
  .thm-badge-info { color: var(--thm-status-info); background: var(--thm-status-info-bg); }
}

/* Mentra Theme Hub SDK — Core Layer Cascade, Hitboxes, Components, Domain Isolation & Motion */

@layer thm.reset {
  *, *::before, *::after {
    box-sizing: border-box;
  }

  :root {
    --thm-hitbox-min: 36px;
    --thm-dur-base: 220ms;
    --thm-dur-sheet: 280ms;
    --thm-dur-scale: 1;
    --thm-backdrop-blur: 12px;
    --thm-safe-top: env(safe-area-inset-top, 0px);
    --thm-safe-right: env(safe-area-inset-right, 0px);
    --thm-safe-bottom: env(safe-area-inset-bottom, 0px);
    --thm-safe-left: env(safe-area-inset-left, 0px);
  }

  :root[data-thm-density="compact"],
  [data-thm-density="compact"] {
    --thm-hitbox-min: 28px;
  }

  :root[data-thm-density="comfortable"],
  [data-thm-density="comfortable"] {
    --thm-hitbox-min: 44px;
  }

  :root[data-thm-density="dense"],
  [data-thm-density="dense"] {
    --thm-hitbox-min: 24px;
  }

  @media (max-width: 640px) {
    :root {
      --thm-hitbox-min: 44px;
    }
  }

  html {
    scrollbar-gutter: stable;
    scroll-padding-block: 64px;
  }

  :focus-visible {
    outline: 2px solid var(--thm-focus-ring);
    outline-offset: 2px;
  }

  button,
  [role="button"],
  [role="radio"],
  [role="option"],
  .thm-btn,
  input,
  select {
    min-height: max(24px, var(--thm-hitbox-target, var(--thm-hitbox-min)));
  }

  .thm-scroll-region {
    overflow: auto;
    overflow-anchor: none;
    scrollbar-width: thin;
    scrollbar-color: transparent transparent;
    scrollbar-gutter: stable;
    scroll-padding-block: 64px;
    scroll-padding-inline: 16px;
  }

  .thm-scroll-region::-webkit-scrollbar {
    width: 6px;
    height: 6px;
  }

  .thm-scroll-region::-webkit-scrollbar-track {
    background: transparent;
  }

  .thm-scroll-region::-webkit-scrollbar-thumb {
    background: transparent;
    border-radius: 9999px;
  }

  .thm-scroll-region:hover,
  .thm-scroll-region:focus-within,
  .thm-scroll-region.is-scrolling {
    scrollbar-color: var(--thm-scrollbar-thumb, var(--thm-border-strong)) transparent;
  }

  .thm-scroll-region:hover::-webkit-scrollbar-thumb,
  .thm-scroll-region:focus-within::-webkit-scrollbar-thumb,
  .thm-scroll-region.is-scrolling::-webkit-scrollbar-thumb {
    background: var(--thm-scrollbar-thumb, var(--thm-border-strong));
  }

  /* OC-93 scoped atomic nowrap */
  .thm-nowrap-safe {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
  }
}

@layer thm.shell {
  @media (max-width: 780px) {
    .thm-shell__stage {
      order: 1;
    }

    .thm-shell__inspector {
      order: 2;
    }

    .thm-shell__nav {
      order: 3;
    }
  }

  @media (max-width: 430px) {
    .thm-shell {
      padding-inline: max(10px, var(--thm-safe-left)) max(10px, var(--thm-safe-right));
    }
  }

  @media (min-width: 1350px) {
    [data-app-shell="monitor2-1350"] .thm-shell {
      max-width: 1350px;
    }
  }

  @media (min-width: 781px) {
    .thm-shell {
      align-items: start;
    }

    .thm-shell > .thm-shell__nav,
    .thm-shell > .thm-shell__inspector {
      align-self: start;
    }
  }
}

@layer thm.components {
  @media (min-width: 781px) {
    body:has(thm-omni-beacon:not([data-inline])) > main,
    body:has(thm-omni-beacon:not([data-inline])) > .thm-shell {
      padding-inline-end: calc(64px + var(--thm-safe-right));
    }
  }
  thm-command-palette,
  thm-live-activity,
  thm-data-detector,
  thm-sheet,
  thm-mode-switcher,
  thm-pulse-grid,
  thm-domain-stage,
  thm-lucian-host,
  thm-omni-beacon,
  thm-copilot-shell,
  thm-split-workbench,
  thm-nav-shell,
  thm-data-table,
  thm-form-wizard,
  thm-toast-stack,
  thm-motion-perf-guard {
    display: block;
    min-width: 0;
  }

  thm-adaptive-runtime {
    display: block;
    min-width: 0;
    min-height: 28px;
  }

  thm-sheet:not([open]) {
    display: none;
  }

  thm-sheet[open] {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 80;
  }

  thm-copilot-shell {
    min-height: 180px;
  }

  thm-split-workbench {
    min-height: 160px;
  }

  thm-nav-shell {
    min-height: 48px;
  }

  thm-live-activity {
    min-height: 40px;
  }

  thm-mode-switcher {
    min-height: 44px;
  }

  thm-data-detector {
    min-height: 54px;
  }

  thm-pulse-grid {
    min-height: 112px;
  }

  thm-domain-stage {
    min-height: 180px;
  }

  thm-lucian-host {
    min-height: 220px;
  }

  @media (max-width: 640px) {
    thm-live-activity {
      min-height: 76px;
    }

    thm-data-detector {
      min-height: 92px;
    }

    thm-pulse-grid {
      min-height: 336px;
    }

    thm-lucian-host {
      min-height: 440px;
    }
  }

  [hidden],
  .thm-palette-backdrop[hidden],
  .thm-sheet-backdrop[hidden],
  .thm-entity-popover[hidden],
  .thm-activity-detail[hidden],
  .thm-nav-overflow[hidden],
  .thm-wb-banner--collision[hidden],
  .thm-beacon-offline-badge[hidden] {
    display: none;
  }

  .thm-lucide-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    display: inline-block;
    vertical-align: middle;
    color: currentColor;
  }

  /* Command Palette */
  .thm-palette-backdrop {
    position: fixed;
    inset: 0;
    z-index: 90;
    display: grid;
    place-items: start center;
    padding: 72px 16px 24px;
    background-color: color-mix(in oklch, var(--thm-text-primary) 42%, transparent);
    backdrop-filter: blur(var(--thm-backdrop-blur, 8px));
  }

  .thm-palette-dialog {
    width: min(560px, 100%);
    background-color: var(--thm-surface-elevated);
    color: var(--thm-text-primary);
    border: 1px solid var(--thm-border-default);
    border-radius: var(--thm-radius-lg, 14px);
    box-shadow: var(--thm-elevation-popover);
    overflow: hidden;
  }

  .thm-palette-head {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border-bottom: 1px solid var(--thm-border-subtle);
    background-color: var(--thm-surface-primary);
  }

  .thm-palette-input {
    flex: 1 1 auto;
    min-width: 0;
    padding: 6px 10px;
    border: 1px solid var(--thm-border-default);
    border-radius: var(--thm-radius-sm, 8px);
    background-color: var(--thm-surface-input);
    color: var(--thm-text-primary);
    font: inherit;
  }

  .thm-palette-close {
    padding: 6px 12px;
    border: 1px solid var(--thm-border-strong);
    border-radius: var(--thm-radius-sm, 8px);
    background-color: var(--thm-surface-primary);
    color: var(--thm-text-primary);
    font: inherit;
    font-weight: 600;
    cursor: pointer;
  }

  .thm-palette-list {
    list-style: none;
    margin: 0;
    padding: 8px;
    max-height: 320px;
    overflow: auto;
    display: grid;
    gap: 4px;
  }

  .thm-palette-item {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 12px;
    border: 1px solid transparent;
    border-radius: var(--thm-radius-sm, 8px);
    background-color: var(--thm-surface-elevated);
    color: var(--thm-text-primary);
    font: inherit;
    text-align: left;
    cursor: pointer;
  }

  .thm-palette-item[aria-selected="true"],
  .thm-palette-item:hover {
    background-color: var(--thm-surface-subtle);
    border-color: var(--thm-border-default);
  }

  .thm-palette-meta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    font-size: 12px;
    color: var(--thm-text-secondary);
  }

  .thm-palette-kbd {
    padding: 2px 6px;
    border: 1px solid var(--thm-border-default);
    border-radius: 4px;
    background-color: var(--thm-surface-primary);
    color: var(--thm-text-secondary);
    font-family: var(--thm-font-mono);
    font-size: 11px;
  }

  /* Live Activity Pill */
  .thm-activity-wrap {
    display: inline-grid;
    gap: 8px;
    max-width: 100%;
  }

  .thm-pill {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border-radius: 9999px;
    border: 1px solid var(--thm-border-default);
    background-color: var(--thm-surface-primary);
    color: var(--thm-text-primary);
    font-size: 13px;
    font-weight: 600;
    line-height: 1.35;
  }

  .thm-pill--success {
    background-color: var(--thm-status-success-bg);
    color: var(--thm-status-success);
    border-color: var(--thm-status-success);
  }

  .thm-pill--warning {
    background-color: var(--thm-status-warning-bg);
    color: var(--thm-status-warning);
    border-color: var(--thm-status-warning);
  }

  .thm-pill--danger {
    background-color: var(--thm-status-danger-bg);
    color: var(--thm-status-danger);
    border-color: var(--thm-status-danger);
  }

  .thm-pill--info {
    background-color: var(--thm-status-info-bg);
    color: var(--thm-status-info);
    border-color: var(--thm-status-info);
  }

  .thm-pill--neutral {
    background-color: var(--thm-surface-subtle);
    color: var(--thm-text-primary);
    border-color: var(--thm-border-strong);
  }

  .thm-pill-toggle {
    padding: 4px 10px;
    border-radius: 9999px;
    border: 1px solid var(--thm-border-strong);
    background-color: var(--thm-surface-primary);
    color: var(--thm-text-primary);
    font: inherit;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
  }

  .thm-activity-detail {
    padding: 10px 12px;
    border-radius: var(--thm-radius-sm, 8px);
    border: 1px solid var(--thm-border-default);
    background-color: var(--thm-surface-primary);
    color: var(--thm-text-primary);
    font-size: 12.5px;
    display: grid;
    gap: 4px;
  }

  /* Data Detector Entity Chips */
  .thm-detector-body {
    line-height: 1.6;
    color: var(--thm-text-primary);
    overflow-wrap: anywhere;
  }

  .thm-entity-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin: 2px;
    padding: 2px 10px;
    border-radius: 9999px;
    border: 1px solid var(--thm-border-strong);
    background-color: var(--thm-surface-subtle);
    color: var(--thm-text-primary);
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    vertical-align: baseline;
  }

  .thm-entity-chip:hover {
    border-color: var(--thm-brand-accent);
    background-color: var(--thm-surface-primary);
  }

  .thm-entity-popover {
    margin-top: 8px;
    padding: 10px 12px;
    border-radius: var(--thm-radius-md, 10px);
    border: 1px solid var(--thm-border-default);
    background-color: var(--thm-surface-elevated);
    color: var(--thm-text-primary);
    box-shadow: var(--thm-elevation-popover);
    display: grid;
    gap: 8px;
  }

  .thm-entity-popover-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
  }

  .thm-entity-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
  }

  .thm-entity-action {
    padding: 4px 10px;
    border-radius: var(--thm-radius-sm, 8px);
    border: 1px solid var(--thm-border-strong);
    background-color: var(--thm-surface-primary);
    color: var(--thm-text-primary);
    font: inherit;
    font-size: 12.5px;
    font-weight: 600;
    cursor: pointer;
  }

  /* Two-Detent Sheet */
  .thm-sheet-backdrop {
    position: fixed;
    inset: 0;
    z-index: 80;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 16px 12px 0;
    background-color: color-mix(in oklch, var(--thm-text-primary) 42%, transparent);
    backdrop-filter: blur(var(--thm-backdrop-blur, 10px));
  }

  .thm-sheet-panel {
    width: min(720px, 100%);
    height: 54vh;
    max-height: 92vh;
    display: flex;
    flex-direction: column;
    background-color: var(--thm-surface-elevated);
    color: var(--thm-text-primary);
    border: 1px solid var(--thm-border-default);
    border-bottom: 0;
    border-radius: var(--thm-radius-lg, 16px) var(--thm-radius-lg, 16px) 0 0;
    box-shadow: var(--thm-elevation-popover);
    transition-property: height, transform, opacity;
    transition-duration: var(--thm-dur-sheet, 280ms);
    transition-timing-function: cubic-bezier(0.16, 1, 0.3, 1);
  }

  .thm-sheet-panel[data-detent="full"] {
    height: 88vh;
  }

  @media (max-width: 375px) {
    .thm-sheet-panel {
      height: 75vh;
    }
  }

  .thm-sheet-handle {
    width: 44px;
    height: 5px;
    margin: 10px auto 2px;
    border-radius: 9999px;
    background-color: var(--thm-border-strong);
    flex-shrink: 0;
    cursor: grab;
    touch-action: none;
  }

  .thm-sheet-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 16px;
    border-bottom: 1px solid var(--thm-border-subtle);
  }

  .thm-sheet-title {
    margin: 0;
    font-size: 15px;
    font-weight: 700;
    color: var(--thm-text-primary);
  }

  .thm-sheet-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
  }

  .thm-sheet-body {
    flex: 1 1 auto;
    overflow: auto;
    padding: 16px;
  }

  /* Mode Switcher Segmented Control */
  .thm-mode-group {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
    padding: 4px;
    border-radius: 9999px;
    border: 1px solid var(--thm-border-default);
    background-color: var(--thm-surface-subtle);
  }

  .thm-mode-option {
    border: 1px solid transparent;
    border-radius: 9999px;
    padding: 4px 12px;
    background-color: var(--thm-surface-subtle);
    color: var(--thm-text-primary);
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition-property: background-color, color, border-color;
    transition-duration: var(--thm-dur-base, 180ms);
  }

  .thm-mode-option[aria-checked="true"] {
    background-color: var(--thm-brand-accent);
    color: var(--thm-brand-on-accent);
    border-color: var(--thm-brand-accent);
  }

  /* Pulse Grid */
  .thm-pulse-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
  }

  .thm-pulse-card {
    padding: 12px 14px;
    border-radius: var(--thm-radius-md, 10px);
    border: 1px solid var(--thm-border-default);
    background-color: var(--thm-surface-primary);
    color: var(--thm-text-primary);
    display: grid;
    gap: 6px;
    min-width: 0;
  }

  .thm-pulse-label {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--thm-text-secondary);
  }

  .thm-pulse-value {
    font-size: 22px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    color: var(--thm-text-primary);
  }

  .thm-pulse-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    font-size: 11.5px;
    color: var(--thm-text-secondary);
  }

  .thm-pulse-claim {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 9999px;
    font-size: 11px;
    font-weight: 600;
    background-color: var(--thm-surface-subtle);
    color: var(--thm-text-primary);
    border: 1px solid var(--thm-border-default);
  }

  .thm-pulse-claim--measured {
    background-color: var(--thm-status-success-bg);
    color: var(--thm-status-success);
    border-color: var(--thm-status-success);
  }

  .thm-pulse-claim--estimated {
    background-color: var(--thm-status-warning-bg);
    color: var(--thm-status-warning);
    border-color: var(--thm-status-warning);
  }

  /* Domain Stage & Lucian Scope */
  .thm-domain-stage-box {
    padding: 16px;
    border-radius: var(--thm-radius-md, 10px);
    border: 1px solid var(--thm-border-default);
    display: grid;
    gap: 12px;
    max-width: 100%;
    overflow-x: auto;
  }

  .thm-tt99-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
  }

  .thm-tt99-table th,
  .thm-tt99-table td {
    padding: 8px 6px;
    border-bottom: 1px solid var(--thm-border-subtle);
    text-align: left;
  }

  .thm-tt99-table td:not(.thm-tt99-num),
  .thm-tt99-table th:not(.thm-tt99-num) {
    overflow-wrap: anywhere;
  }

  .thm-input {
    width: 100%;
    min-width: 0;
    max-width: 100%;
  }

  .thm-lucian-scope {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 12px;
    max-width: 100%;
  }

  .thm-lucian-card {
    padding: 14px;
    border-radius: var(--thm-radius-md, 10px);
    border: 1px solid var(--thm-border-default);
    background-color: var(--thm-surface-primary);
    color: var(--thm-text-primary);
    display: grid;
    gap: 10px;
    min-width: 0;
  }

  .thm-lucian-stage {
    padding: 12px;
    border-radius: var(--thm-radius-sm, 8px);
    border: 1px solid var(--thm-border-subtle);
    background-color: var(--thm-surface-subtle);
    color: var(--thm-text-primary);
    display: grid;
    place-items: center;
    min-height: 112px;
    max-width: 100%;
    overflow: hidden;
  }

  .thm-lucian-stage .u001,
  .thm-lucian-stage .u013 {
    width: 100%;
    max-width: 280px;
    height: auto;
    min-height: 92px;
    display: grid;
    place-items: center;
    gap: 8px;
  }

  .thm-lucian-stage .u001-btn,
  .thm-lucian-stage .u013-sw {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 9999px;
    border: 1px solid var(--thm-border-strong);
    background-color: var(--thm-surface-primary);
    color: var(--thm-text-primary);
    font: inherit;
    font-weight: 600;
    cursor: pointer;
    position: relative;
  }

  .thm-lucian-stage .u013-sw[aria-checked="true"] {
    background-color: var(--thm-brand-accent);
    color: var(--thm-brand-on-accent);
    border-color: var(--thm-brand-accent);
  }

  .thm-lucian-stage svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.2;
    stroke-linecap: round;
    stroke-linejoin: round;
  }

  .thm-lucian-stage .u001-live,
  .thm-lucian-stage .u001[data-state="idle"] .u001-spin,
  .thm-lucian-stage .u001[data-state="idle"] .u001-done,
  .thm-lucian-stage .u001[data-state="ok"] .u001-txt,
  .thm-lucian-stage .u001[data-state="ok"] .u001-spin,
  .thm-lucian-stage .u013:not(.is-on) .u013-v,
  .thm-lucian-stage .u013.is-on .u013-x,
  .thm-lucian-stage .u013:not(.is-on) .u013-sub span:nth-child(2),
  .thm-lucian-stage .u013.is-on .u013-sub span:nth-child(1) {
    display: none;
  }

  /* Adaptive Runtime Bar */
  .thm-adaptive-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--thm-text-secondary);
  }

  /* Floating Omni-Beacon (48x48 -> 380x560) */
  .thm-beacon-pill {
    position: fixed;
    right: 10px;
    bottom: 16px;
    z-index: 85;
    width: 48px;
    height: 48px;
    padding: 0 12px;
    border-radius: 9999px;
    border: 2px solid var(--thm-status-success);
    background-color: var(--thm-surface-elevated);
    color: var(--thm-text-primary);
    box-shadow: var(--thm-elevation-popover);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    cursor: grab;
    touch-action: none;
  }

  .thm-beacon-pill[data-expanded-pill="true"] {
    width: 110px;
    height: 48px;
  }

  @media (max-width: 780px) {
    thm-omni-beacon .thm-beacon-pill {
      position: static;
      display: flex;
      margin: 8px 16px 16px auto;
    }
  }

  .thm-beacon-pill[data-pulse="NOMINAL"] {
    border-color: var(--thm-status-success);
    color: var(--thm-status-success);
  }

  .thm-beacon-pill[data-pulse="DEGRADED_HEALING"] {
    border-color: var(--thm-status-warning);
    color: var(--thm-status-warning);
  }

  .thm-beacon-pill[data-pulse="LOCKOUT_ALERT"] {
    border-color: var(--thm-status-danger);
    color: var(--thm-status-danger);
  }

  .thm-beacon-panel {
    position: fixed;
    right: 12px;
    bottom: 72px;
    z-index: 86;
    width: min(380px, calc(100vw - 16px));
    height: min(560px, calc(100vh - 88px));
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 12px;
    border-radius: var(--thm-radius-lg, 16px);
    border: 1px solid var(--thm-border-default);
    background-color: var(--thm-surface-elevated);
    color: var(--thm-text-primary);
    box-shadow: var(--thm-elevation-popover);
  }

  .thm-beacon-panel[hidden] {
    display: none;
  }

  .thm-beacon-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
  }

  .thm-beacon-title-wrap,
  .thm-beacon-head-actions {
    display: inline-flex;
    align-items: center;
    gap: 6px;
  }

  .thm-beacon-dot {
    width: 10px;
    height: 10px;
    border-radius: 9999px;
    background-color: var(--thm-status-success);
  }

  .thm-beacon-panel[data-pulse="DEGRADED_HEALING"] .thm-beacon-dot {
    background-color: var(--thm-status-warning);
  }

  .thm-beacon-panel[data-pulse="LOCKOUT_ALERT"] .thm-beacon-dot {
    background-color: var(--thm-status-danger);
  }

  .thm-beacon-offline-badge {
    padding: 2px 8px;
    border-radius: 9999px;
    border: 1px solid var(--thm-status-warning);
    background-color: var(--thm-status-warning-bg);
    color: var(--thm-status-warning);
    font-size: 11px;
    font-weight: 600;
  }

  .thm-beacon-health-strip {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
  }

  .thm-beacon-pillar-card {
    padding: 6px 8px;
    border-radius: var(--thm-radius-sm, 8px);
    border: 1px solid var(--thm-border-default);
    background-color: var(--thm-surface-primary);
    display: grid;
    gap: 2px;
    font-size: 11.5px;
    min-width: 0;
  }

  .thm-beacon-quick-row,
  .thm-beacon-tabs,
  .thm-beacon-input-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
  }

  .thm-beacon-input-row input {
    flex: 1 1 auto;
    min-width: 0;
    min-height: 44px;
  }

  .thm-beacon-input-row button {
    min-width: 44px;
    min-height: 44px;
  }

  .thm-beacon-feed {
    flex: 1 1 auto;
    min-height: 80px;
    display: grid;
    gap: 6px;
    align-content: start;
  }

  .thm-beacon-feed-item {
    padding: 8px 10px;
    border-radius: var(--thm-radius-sm, 8px);
    border: 1px solid var(--thm-border-subtle);
    background-color: var(--thm-surface-primary);
    display: grid;
    gap: 2px;
    font-size: 12.5px;
  }

  /* Embedded 5-Zone Copilot Shell */
  .thm-copilot {
    display: grid;
    gap: 10px;
    padding: 12px;
    border-radius: var(--thm-radius-md, 10px);
    border: 1px solid var(--thm-border-default);
    background-color: var(--thm-surface-primary);
    color: var(--thm-text-primary);
  }

  .thm-copilot-pins,
  .thm-copilot-tabs,
  .thm-copilot-roles {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
  }

  .thm-copilot-body {
    overflow-anchor: none;
    scrollbar-gutter: stable;
    display: grid;
    gap: 8px;
  }

  .thm-copilot-kaizen {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 8px;
  }

  .thm-copilot-panel-card {
    padding: 10px 12px;
    border-radius: var(--thm-radius-sm, 8px);
    border: 1px solid var(--thm-border-subtle);
    background-color: var(--thm-surface-subtle);
    display: grid;
    gap: 4px;
    font-size: 13px;
  }

  /* W5 PRO-UI-05: Flatten nested card border/padding inside host surfaces (<=2 borders) */
  :is(.thm-card, .thm-surface, .thm-shell__stage, .thm-shell__inspector) :is(.thm-copilot, .thm-workbench) {
    border: 0;
    padding: 0;
    background-color: transparent;
    box-shadow: none;
  }

  /* Split Workbench & Resizer */
  .thm-workbench {
    display: grid;
    gap: 10px;
  }

  .thm-wb-grid {
    display: grid;
    grid-template-columns: minmax(200px, var(--thm-wb-left, 36%)) 24px minmax(0, 1fr);
    gap: 8px;
    align-items: stretch;
  }

  .thm-wb-pane {
    padding: 10px;
    border-radius: var(--thm-radius-sm, 8px);
    border: 1px solid var(--thm-border-default);
    background-color: var(--thm-surface-primary);
    min-width: 0;
    overflow-anchor: none;
    scrollbar-gutter: stable;
    display: grid;
    gap: 6px;
    align-content: start;
  }

  .thm-wb-resizer {
    min-width: 24px;
    min-height: 24px;
    cursor: col-resize;
    display: grid;
    place-items: center;
    background-color: var(--thm-surface-subtle);
    border-radius: var(--thm-radius-xs, 4px);
    border: 1px solid var(--thm-border-subtle);
  }

  .thm-wb-item {
    width: 100%;
    text-align: left;
    padding: 8px 10px;
    border-radius: var(--thm-radius-sm, 8px);
    border: 1px solid var(--thm-border-subtle);
    background-color: var(--thm-surface-primary);
    color: var(--thm-text-primary);
    display: grid;
    gap: 2px;
    cursor: pointer;
  }

  .thm-wb-item[aria-pressed="true"] {
    border-color: var(--thm-brand-accent);
    background-color: var(--thm-surface-subtle);
  }

  .thm-wb-banner--collision {
    padding: 8px 12px;
    border-radius: var(--thm-radius-sm, 8px);
    border: 1px solid var(--thm-status-warning);
    background-color: var(--thm-status-warning-bg);
    color: var(--thm-status-warning);
    font-size: 13px;
    font-weight: 600;
  }

  @media (max-width: 780px) {
    .thm-wb-grid {
      grid-template-columns: minmax(0, 1fr);
    }

    .thm-wb-resizer {
      display: none;
    }
  }

  /* Nav Shell & Smart Action Dock */
  .thm-nav-bar {
    display: grid;
    gap: 8px;
    padding: 8px 12px;
    border-radius: var(--thm-radius-md, 10px);
    border: 1px solid var(--thm-border-default);
    background-color: var(--thm-surface-primary);
    color: var(--thm-text-primary);
  }

  .thm-nav-bar--bottom {
    padding-bottom: calc(8px + var(--thm-safe-bottom));
  }

  .thm-nav-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition-property: padding, opacity;
    transition-duration: var(--thm-dur-base, 220ms);
  }

  .thm-nav-title {
    font-size: 16px;
    font-weight: 700;
  }

  .thm-nav-header.is-condensed .thm-nav-title {
    font-size: 13.5px;
  }

  .thm-nav-tablist,
  .thm-action-dock,
  .thm-nav-overflow {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
  }

  .thm-nav-tab {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    min-height: max(24px, var(--thm-hitbox-target, var(--thm-hitbox-min)));
    border-radius: var(--thm-radius-sm, 8px);
    border: 1px solid var(--thm-border-default);
    background-color: var(--thm-surface-subtle);
    color: var(--thm-text-primary);
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
  }

  .thm-nav-tab[aria-selected="true"] {
    background-color: var(--thm-brand-accent);
    color: var(--thm-brand-on-accent);
    border-color: var(--thm-brand-accent);
  }

  @media (max-width: 640px) {
    .thm-nav-tab {
      min-height: 44px;
    }
  }

  /* Data Table Scrollport & Bug-06/11 Guard */
  .thm-table-scroll {
    max-width: 100%;
    overflow: auto;
    overflow-anchor: none;
    scrollbar-gutter: stable;
  }

  /* CL-044: Tabpanel & Space Panel Scroll-Anchor Stability */
  [role="tabpanel"],
  .thm-space-panel {
    overflow-anchor: none;
    scrollbar-gutter: stable;
  }

  /* CL-035: Toast Stack Bottom-Left & Expanded Omni-Beacon Clearance */
  thm-toast-stack[position="bottom-left"] {
    left: calc(16px + var(--thm-safe-left));
    right: auto;
    bottom: calc(16px + var(--thm-safe-bottom));
  }

  body:has(thm-omni-beacon[expanded]) thm-toast-stack:not([position="bottom-left"]):not([position="top-right"]) {
    right: min(404px, calc(100vw - 16px));
  }

  @media (max-width: 780px) {
    body:has(thm-omni-beacon[expanded]) thm-toast-stack:not([position="bottom-left"]):not([position="top-right"]) {
      right: 16px;
      bottom: auto;
      top: calc(72px + var(--thm-safe-top));
    }
  }
}

@layer thm.domain {
  [data-thm-isolate="domain"] {
    color-scheme: normal;
    filter: none;
    forced-color-adjust: none;
    isolation: isolate;
    background-color: var(--thm-surface-primary);
    color: var(--thm-text-primary);
    --thm-domain-seal-red: #D92027;
  }

  [data-thm-isolate="domain"] [data-seal-ink="red"] {
    fill: var(--thm-domain-seal-red);
    stroke: var(--thm-domain-seal-red);
  }

  .thm-tt99-num {
    font-variant-numeric: tabular-nums slashed-zero;
    text-align: right;
    white-space: nowrap;
  }

  /* W5 PRO-UI-02/05/06: Segmented Control & Border-Restrained Mini-App Surface */
  .thm-btn-segmented {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 36px;
    padding: 6px 12px;
    border-radius: var(--thm-radius-sm, 8px);
    border: 1px solid var(--thm-border-default);
    background-color: var(--thm-surface-subtle);
    color: var(--thm-text-primary);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
  }

  .thm-btn-segmented[aria-pressed="true"],
  .thm-btn-segmented[aria-selected="true"],
  .thm-btn-segmented.is-active {
    border-color: var(--thm-brand-accent);
    background-color: var(--thm-surface-primary);
    color: var(--thm-text-primary);
    box-shadow: inset 0 0 0 1px var(--thm-brand-accent);
    font-weight: 600;
  }

  .thm-surface--flat {
    border: 0;
    box-shadow: none;
    background-color: var(--thm-surface-subtle);
  }

  .thm-preview-miniapp {
    display: grid;
    gap: 10px;
    min-width: 0;
  }

  .thm-preview-miniapp__kpi-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(112px, 1fr));
    gap: 8px;
  }

  .thm-preview-miniapp__kpi {
    padding: 8px 10px;
    border-radius: var(--thm-radius-sm, 8px);
    background-color: var(--thm-surface-subtle);
    display: grid;
    gap: 2px;
    font-variant-numeric: tabular-nums;
  }
}

@layer thm.motion {
  @keyframes thm-beacon-breathe {
    0%, 100% {
      transform: scale(1);
      opacity: 1;
    }
    50% {
      transform: scale(1.04);
      opacity: 0.92;
    }
  }

  .thm-beacon-pill[data-pulse="DEGRADED_HEALING"],
  .thm-beacon-pill[data-pulse="LOCKOUT_ALERT"] {
    animation-name: thm-beacon-breathe;
    animation-duration: 2400ms;
    animation-iteration-count: infinite;
    animation-timing-function: ease-in-out;
  }

  .thm-tactile-press,
  .thm-action-dock button {
    transition-property: transform, background-color, border-color;
    transition-duration: 180ms;
    transition-timing-function: cubic-bezier(0.16, 1, 0.3, 1);
  }

  .thm-tactile-press:active,
  .thm-action-dock button:active,
  .thm-beacon-pill:active {
    transform: scale(0.97);
    transition-property: transform;
    transition-duration: 100ms;
  }

  @media (prefers-reduced-motion: reduce) {
    :root {
      --thm-dur-base: 60ms;
      --thm-dur-sheet: 60ms;
      --thm-dur-scale: 0;
      --thm-motion-duration-fast: 60ms;
      --thm-motion-duration-normal: 90ms;
      --thm-motion-duration-slow: 90ms;
    }

    *, *::before, *::after {
      transition-duration: 90ms;
      animation-duration: 90ms;
      scroll-behavior: auto;
    }

    .thm-beacon-pill[data-pulse="DEGRADED_HEALING"],
    .thm-beacon-pill[data-pulse="LOCKOUT_ALERT"] {
      animation-name: none;
    }
  }

  @media (prefers-reduced-transparency: reduce) {
    :root {
      --thm-backdrop-blur: 0px;
      --thm-glass-blur: 0px;
    }

    .thm-glass-chrome,
    .thm-palette-backdrop,
    .thm-sheet-backdrop {
      backdrop-filter: none;
      -webkit-backdrop-filter: none;
    }
  }
}
