/* Shared values for the public theme and native content editors.
   Layout spacing keeps its existing px dimensions; text sizes remain relative. */
:root, .editor-styles-wrapper {
    --brand-bg: #14181c;
    --bg: var(--brand-bg);
    --panel: #1c2226;
    --text: #f3eee2;
    --muted: #b4b5ae;
    --gold: #e4bc70;
    --line: #3b4143;
    --control-border: #8c938e;
    --intro-ink: #d0d0c7;
    --prose-ink: #d2d2c9;
    --ticker-ink: #cecabe;
    --accent-ink: #e2c48e;
    --footer-bg: #101316;
    --button-hover: #efd09a;
    --notice-ink: #f0a99d;
    --notice-line: #9a6461;
    --notice-bg: #301e1f;
    --notice-text: #f7ddd8;
    --media-bg: #0c1012;
    --recommendation-image-bg: #101517;
    --editor-text: #23272b;
    --editor-link: #775519;
    --editor-line: #c3c4c7;
    --editor-bg: #fff;
    --editor-panel: #f2f2f2;
    --editor-muted: #50575e;

    /* Native editors keep these system defaults. Public families are scoped below. */
    --sans: system-ui,-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;
    --display: var(--sans);
    --weight-body: 400;
    --weight-semibold: 600;
    --weight-display: 700;
    --text-2xs: .6875rem;
    --text-xs: .75rem;
    --text-caption: .8125rem;
    --text-sm: .875rem;
    --text-control: 1rem;
    --text-compact: 1rem;
    --text-base: 1rem;
    --text-prose: 1.125rem;
    --text-lead: 1.125rem;
    --heading-xs: 1.25rem;
    --heading-sm: 1.5rem;
    --heading-md: 2rem;
    --heading-lg: 2.25rem;
    --leading-tight: 1.4;
    --leading-control: 1.5;
    --leading-body: 1.6;
    --leading-compact: 1.75;
    --leading-relaxed: 1.8;
    --leading-prose: 1.7;
    --leading-spacious: 1.9;

    --space-1: 4px;
    --space-2: 8px;
    --space-3: 12px;
    --space-4: 16px;
    --space-5: 20px;
    --space-6: 24px;
    --space-7: 28px;
    --space-8: 32px;
    --space-9: 36px;
    --space-10: 40px;
    --space-12: 48px;
    --space-14: 56px;
    --space-16: 64px;
    --space-20: 80px;
    --radius-xs: 4px;
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 10px;
    --radius-xl: 12px;
    --control-height: 44px;
    --measure-prose: 68ch;
    --measure-compact: 52rem;
    --focus-width: 3px;
    --focus-offset: 6px;
    --shadow-header: 0 8px 24px #0002;
    --shadow-menu: 0 12px 24px #0004;
    --shadow-dialog: 0 18px 70px #0008;
    --duration-fast: .2s;
}

/* The admin toolbar and native WordPress screens keep their own font stacks. */
body:not(.wp-admin):not(.wp-login):not(#tinymce):not(.editor-styles-wrapper) {
    --sans: 'Source Sans 3','Source Sans Fallback',system-ui,-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;
    --display: 'Barlow Semi Condensed','Barlow Fallback',var(--sans);
    font-synthesis: none;
}

/* Palettes override the same semantic colours; component styles stay shared. */
:root[data-bn-palette="light"] {
    --bg: #fff; --panel: #f2f2f2; --text: #111; --muted: #333; --gold: #111;
    --line: #767676; --control-border: #333; --intro-ink: #111; --prose-ink: #111;
    --ticker-ink: #333; --accent-ink: #111; --footer-bg: #fff; --button-hover: #333;
    --notice-ink: #111; --notice-line: #111; --notice-bg: #fff; --notice-text: #111;
    color-scheme: light;
}
:root[data-bn-palette="dark"] {
    --bg: #000; --panel: #111; --text: #fff; --muted: #eee; --gold: #fff;
    --line: #aaa; --control-border: #fff; --intro-ink: #fff; --prose-ink: #fff;
    --ticker-ink: #eee; --accent-ink: #fff; --footer-bg: #000; --button-hover: #ddd;
    --notice-ink: #fff; --notice-line: #fff; --notice-bg: #111; --notice-text: #fff;
    color-scheme: dark;
}
