:root {
    color-scheme: light;

    /* Shared surfaces */
    --bg: #fafaf7;
    --bg-warm: #f5f2e6;
    --surface: #ffffff;
    --surface-alt: #f7f6f0;
    --surface-soft: #f4f2e9;
    --surface-hero: #fffdf5;
    --surface-accent: #fff8d6;
    --surface-accent-strong: #f9ed9b;
    --surface-glass: rgba(255, 255, 255, 0.94);
    --surface-glass-strong: rgba(255, 255, 255, 0.95);
    --surface-glass-96: rgba(255, 255, 255, 0.96);
    --surface-glass-98: rgba(255, 255, 255, 0.98);
    --surface-glass-soft: rgba(255, 255, 255, 0.72);
    --surface-glass-90: rgba(255, 255, 255, 0.9);
    --surface-glass-92: rgba(255, 255, 255, 0.92);
    --surface-glass-70: rgba(255, 255, 255, 0.7);
    --surface-glass-faint: rgba(255, 255, 255, 0.025);

    /* Shared text */
    --ink: #252620;
    --ink-strong: #171811;
    --ink-soft: #46483f;
    --muted: #686a61;
    --muted-app: #6e7067;
    --muted-soft: #9a9c92;

    /* Shared borders */
    --line: #e3e2d8;
    --line-strong: #d2d0c3;
    --line-soft: #ecebe4;
    --line-accent: #e3cf55;
    --line-accent-strong: #cbb52f;
    --line-primary-soft: #f1df76;
    --line-primary: #e4ce42;
    --line-primary-hover: #cbb52f;
    --line-primary-pressed: #ae991e;

    /* Brand interaction palette */
    --primary: #f2d200;
    --primary-soft: #fff8cc;
    --primary-hover: #e2c400;
    --primary-pressed: #cdb200;
    --accent: #fadc00;
    --accent-bg: #fff8cc;
    --accent-bg-strong: #f8e885;
    --accent-ink: #675800;
    --accent-ink-app: #5d5105;
    --accent-heading: #574f16;
    --docs-heading: var(--accent-heading);
    --focus: rgba(250, 220, 0, 0.28);
    --accent-border: rgba(171, 147, 0, 0.28);
    --accent-wash: rgba(250, 220, 0, 0.14);
    --accent-wash-soft: rgba(250, 220, 0, 0.1);
    --accent-wash-faint: rgba(250, 220, 0, 0.075);
    --accent-wash-auth: rgba(250, 220, 0, 0.11);
    --accent-border-soft: rgba(171, 147, 0, 0.16);
    --accent-border-hover: rgba(171, 147, 0, 0.38);
    --accent-border-strong: rgba(171, 147, 0, 0.34);
    --accent-shadow-color: rgba(103, 88, 0, 0.09);
    --accent-wash-card: rgba(255, 248, 204, 0.88);
    --accent-wash-card-strong: rgba(255, 245, 176, 0.92);

    /* Semantic states */
    --danger-bg: #fce8e6;
    --danger-line: #f6aea9;
    --danger-ink: #c5221f;
    --info-bg: #fff9dc;
    --info-line: #ead76d;
    --info-ink: var(--accent-ink);
    --success-bg: #edf8f1;
    --success-line: #bdddc7;
    --success-ink: #24613b;
    --warning-bg: #fff8e7;
    --warning-line: #d39d38;
    --warning-ink: #75500c;
    --neutral-bg: #f3f4f6;
    --neutral-ink: #525866;
    --status-success: #10b981;
    --status-danger: #f43f5e;
    --chart-fill-start: #fadc00;
    --chart-fill-end: #c9ae00;
    --chart-axis: rgba(206, 201, 174, 0.82);
    --chart-grid: rgba(206, 201, 174, 0.55);
    --chart-label: #777568;

    /* API code panels */
    --code-bg: #191a16;
    --code-border: #35382e;
    --code-border-strong: #3e4235;
    --code-border-overlay: rgba(77, 82, 63, 0.72);
    --code-border-soft: rgba(232, 231, 218, 0.11);
    --code-border-subtle: rgba(232, 231, 218, 0.12);
    --code-text: #d9dccf;
    --code-text-soft: #e7e9df;
    --code-muted: #9da294;
    --code-control: #707664;
    --code-method: #fadc00;
    --code-key: #f0dc6a;
    --code-string: #bfd99b;
    --code-value: #d8bd91;
    --code-success: #83daa4;
    --code-punctuation: #959b8c;

    /* Documentation request example */
    --docs-example-border: #34382c;
    --docs-example-bg: #151712;
    --docs-example-head-border: rgba(148, 163, 184, 0.12);
    --docs-example-head-bg: linear-gradient(180deg, rgba(36, 39, 30, 0.98) 0%, rgba(24, 26, 20, 0.98) 100%);
    --docs-example-title-color: #f0f1e9;
    --docs-example-title-dot: #fadc00;
    --docs-example-title-dot-outline: rgba(250, 220, 0, 0.2);
    --docs-example-meta-border: rgba(250, 220, 0, 0.18);
    --docs-example-meta-bg: rgba(42, 43, 25, 0.52);
    --docs-example-meta-color: #f4e477;
    --docs-example-code-overlay: rgba(250, 220, 0, 0.035);
    --docs-example-code-grid: rgba(148, 163, 184, 0.045);
    --docs-example-code-bg: #11130f;
    --docs-switcher-border: rgba(148, 163, 184, 0.14);
    --docs-switcher-bg: rgba(31, 34, 26, 0.55);
    --docs-switcher-color: #e8eadf;
    --docs-switcher-hover-border: rgba(250, 220, 0, 0.3);
    --docs-switcher-hover-bg: rgba(55, 58, 42, 0.78);
    --docs-switcher-hover-color: #fffef7;
    --docs-switcher-icon: #a6aa9c;
    --docs-switcher-menu-border: #414535;
    --docs-switcher-menu-bg: #1b1d17;
    --docs-switcher-option-color: #e8eadf;
    --docs-switcher-option-active-bg: rgba(250, 220, 0, 0.13);
    --docs-switcher-option-active-color: #fffef7;
    --docs-switcher-check: #fadc00;

    /* Documentation response example */
    --docs-response-border: #3b4131;
    --docs-response-bg: #171a14;
    --docs-response-head-border: rgba(177, 196, 140, 0.17);
    --docs-response-head-bg: linear-gradient(180deg, rgba(34, 39, 29, 0.98) 0%, rgba(24, 28, 21, 0.98) 100%);
    --docs-response-title-color: #eef1e8;
    --docs-response-title-dot: #34d399;
    --docs-response-title-dot-outline: rgba(52, 211, 153, 0.22);
    --docs-response-meta-border: rgba(52, 211, 153, 0.28);
    --docs-response-meta-bg: rgba(8, 29, 22, 0.34);
    --docs-response-meta-color: #a7f3d0;
    --docs-response-code-overlay: rgba(190, 211, 151, 0.045);
    --docs-response-code-grid: rgba(190, 211, 151, 0.05);
    --docs-response-code-bg: #12150f;
    --docs-response-switcher-border: rgba(190, 211, 151, 0.2);
    --docs-response-switcher-bg: rgba(27, 31, 24, 0.58);
    --docs-response-switcher-color: #e9ede2;
    --docs-response-switcher-hover-border: rgba(190, 211, 151, 0.38);
    --docs-response-switcher-hover-bg: rgba(46, 53, 38, 0.84);
    --docs-response-switcher-hover-color: #ffffff;
    --docs-response-switcher-icon: #b6bea7;
    --docs-response-switcher-menu-border: #444d39;
    --docs-response-switcher-menu-bg: #181c15;
    --docs-response-switcher-option-color: #e9ede2;
    --docs-response-switcher-option-active-bg: rgba(190, 211, 151, 0.18);
    --docs-response-switcher-option-active-color: #ffffff;
    --docs-response-switcher-check: #b8dc82;

    /* Shared elevation and shape */
    --shadow-card: 0 1px 2px rgba(17, 24, 39, 0.04);
    --shadow-code: 0 24px 56px rgba(35, 36, 28, 0.17);
    --shadow-code-large: 0 28px 64px rgba(35, 36, 28, 0.2);
    --shadow-card-rest: 0 12px 28px rgba(31, 41, 55, 0.035);
    --shadow-card-hover: 0 16px 32px rgba(31, 41, 55, 0.06);
    --shadow-card-soft: 0 18px 42px rgba(31, 41, 55, 0.05);
    --shadow-pricing-rest: 0 12px 30px rgba(31, 41, 55, 0.045);
    --shadow-pricing-hover: 0 16px 34px rgba(31, 41, 55, 0.075);
    --shadow-pricing-featured: 0 18px 38px rgba(103, 88, 0, 0.13);
    --shadow-pricing-featured-hover: 0 22px 42px rgba(103, 88, 0, 0.17);
    --shadow-pricing-table: 0 10px 28px rgba(31, 41, 55, 0.04);
    --shadow-pricing-cta: 0 14px 34px rgba(103, 88, 0, 0.08);
    --shadow-pricing-button: 0 6px 14px rgba(103, 88, 0, 0.14);
    --shadow-accent-rings: 0 0 0 72px rgba(250, 220, 0, 0.045), 0 0 0 144px rgba(250, 220, 0, 0.026);
    --shadow-popover: 0 14px 32px rgba(17, 24, 39, 0.12);
    --shadow-floating: 0 18px 40px rgba(17, 24, 39, 0.08);
    --shadow-modal: 0 24px 60px rgba(17, 24, 39, 0.12);
    --shadow-docs-card: 0 10px 24px rgba(15, 23, 42, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.02);
    --shadow-docs-menu: 0 18px 36px rgba(15, 23, 42, 0.28);
    --shadow-accent-soft: 0 1px 2px rgba(103, 88, 0, 0.09);
    --shadow-subtle: 0 2px 12px rgba(17, 24, 39, 0.04);
    --shadow-panel: 0 16px 32px rgba(17, 24, 39, 0.08);
    --overlay-muted: rgba(17, 24, 39, 0.06);
    --overlay-backdrop: rgba(17, 24, 39, 0.28);
    --overlay-page: rgba(250, 250, 247, 0.56);
    --spinner-line: rgba(32, 33, 36, 0.18);
    --spinner-line-soft: rgba(32, 33, 36, 0.16);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 18px;

    /* App-shell compatibility aliases */
    --app-bg: var(--bg);
    --app-surface: var(--surface);
    --app-surface-alt: var(--surface-alt);
    --app-border: var(--line);
    --app-border-strong: var(--line-strong);
    --app-text: var(--ink-strong);
    --app-muted: var(--muted-app);
    --app-muted-soft: var(--muted-soft);
    --app-accent: var(--accent);
    --app-accent-soft: var(--accent-bg);
    --app-accent-ink: var(--accent-ink-app);
    --app-shadow: var(--shadow-card);

    /* Public-page compatibility aliases */
    --home-bg: var(--bg);
    --home-surface: var(--surface);
    --home-surface-alt: var(--surface-alt);
    --home-line: var(--line);
    --home-line-strong: var(--line-strong);
    --home-ink: var(--ink);
    --home-muted: var(--muted);
    --home-blue: var(--accent-heading);
    --home-primary: var(--primary);
    --home-primary-hover: var(--primary-hover);
    --home-terminal: var(--code-bg);

    --landing-bg: var(--bg);
    --landing-surface: var(--surface);
    --landing-surface-alt: var(--surface-alt);
    --landing-line: var(--line);
    --landing-line-strong: var(--line-strong);
    --landing-ink: var(--ink);
    --landing-muted: var(--muted);
    --landing-blue: var(--accent-heading);
    --landing-primary: var(--primary);
    --landing-primary-hover: var(--primary-hover);
    --landing-code: var(--code-bg);

    --pricing-bg: var(--bg);
    --pricing-surface: var(--surface);
    --pricing-surface-alt: var(--surface-alt);
    --pricing-line: var(--line);
    --pricing-line-strong: var(--line-strong);
    --pricing-ink: var(--ink);
    --pricing-muted: var(--muted);
    --pricing-primary: var(--primary);
    --pricing-primary-soft: var(--primary-soft);
    --pricing-primary-hover: var(--primary-hover);
    --pricing-primary-pressed: var(--primary-pressed);
    --pricing-accent-ink: var(--accent-ink);
    --pricing-heading: var(--accent-heading);
    --pricing-success: var(--success-ink);
}

/*
 * Preserved pre-September 2026 blue palette.
 * Add data-theme="blue" to the root <html> element to restore it without
 * rewriting page-level styles.
 */
:root[data-theme="blue"] {
    --bg: #f6f9fc;
    --bg-warm: #eef4fb;
    --surface: #ffffff;
    --surface-alt: #f4f7fb;
    --surface-soft: #f2f6fb;
    --surface-hero: #f8fbff;
    --surface-accent: #edf4fc;
    --surface-accent-strong: #dceafd;

    --ink: #1f2937;
    --ink-strong: #111827;
    --ink-soft: #435064;
    --muted: #66768d;
    --muted-app: #6b7b91;
    --muted-soft: #98a6ba;

    --line: #dbe5ef;
    --line-strong: #c7d6e8;
    --line-soft: #e7edf4;
    --line-accent: #b4cbea;
    --line-accent-strong: #9fbfe8;
    --line-primary-soft: #d3e2f6;
    --line-primary: #cbdcf1;
    --line-primary-hover: #aec7e8;
    --line-primary-pressed: #9fbae0;

    --primary: #d9e8fb;
    --primary-soft: #edf4ff;
    --primary-hover: #c8dcfb;
    --primary-pressed: #b7cff2;
    --accent: #7da7e3;
    --accent-bg: #edf4ff;
    --accent-bg-strong: #dbeafe;
    --accent-ink: #496a96;
    --accent-ink-app: #476692;
    --accent-heading: #2f6f88;
    --focus: rgba(93, 137, 199, 0.16);
    --accent-border: rgba(93, 137, 199, 0.22);
    --accent-wash: rgba(125, 167, 227, 0.12);
    --accent-wash-soft: rgba(125, 167, 227, 0.09);
    --accent-wash-faint: rgba(125, 167, 227, 0.08);
    --accent-wash-auth: rgba(125, 167, 227, 0.1);
    --accent-border-soft: rgba(125, 167, 227, 0.14);
    --accent-border-hover: rgba(125, 167, 227, 0.34);
    --accent-border-strong: rgba(93, 137, 199, 0.3);
    --accent-shadow-color: rgba(71, 102, 146, 0.08);
    --accent-wash-card: rgba(217, 232, 251, 0.85);
    --accent-wash-card-strong: rgba(217, 232, 251, 0.9);

    --info-bg: #eef5ff;
    --info-line: #c7daf7;
    --chart-fill-start: #9ec0ea;
    --chart-fill-end: #6c99d1;
    --chart-axis: rgba(205, 215, 229, 0.8);
    --chart-grid: rgba(205, 215, 229, 0.55);
    --chart-label: #7b8da8;

    --code-bg: #172334;
    --code-border: #2a3a4f;
    --code-border-strong: #25364b;
    --code-border-overlay: rgba(32, 58, 83, 0.7);
    --code-border-soft: rgba(219, 229, 239, 0.11);
    --code-border-subtle: rgba(219, 229, 239, 0.12);
    --code-text: #cbd7e5;
    --code-text-soft: #d6e0ec;
    --code-muted: #91a2b5;
    --code-control: #4b6078;
    --code-method: #8eb7ed;
    --code-key: #a7c9f2;
    --code-string: #c5dda9;
    --code-value: #d5b8ee;
    --code-punctuation: #8496aa;

    --docs-example-border: #22314a;
    --docs-example-bg: #0b1220;
    --docs-example-head-bg: linear-gradient(180deg, rgba(18, 29, 46, 0.98) 0%, rgba(13, 21, 34, 0.98) 100%);
    --docs-example-title-color: #dbe7f5;
    --docs-example-title-dot: #60a5fa;
    --docs-example-title-dot-outline: rgba(125, 167, 227, 0.18);
    --docs-example-meta-border: rgba(96, 165, 250, 0.16);
    --docs-example-meta-bg: rgba(15, 23, 42, 0.45);
    --docs-example-meta-color: #bfdbfe;
    --docs-example-code-overlay: rgba(147, 197, 253, 0.04);
    --docs-example-code-bg: #09111c;
    --docs-switcher-bg: rgba(15, 23, 42, 0.42);
    --docs-switcher-color: #dbe7f5;
    --docs-switcher-hover-border: rgba(125, 167, 227, 0.28);
    --docs-switcher-hover-bg: rgba(27, 40, 63, 0.72);
    --docs-switcher-hover-color: #f8fbff;
    --docs-switcher-icon: #93a4bb;
    --docs-switcher-menu-border: #24344f;
    --docs-switcher-menu-bg: #0f1827;
    --docs-switcher-option-color: #dbe7f5;
    --docs-switcher-option-active-bg: rgba(125, 167, 227, 0.12);
    --docs-switcher-option-active-color: #f8fbff;
    --docs-switcher-check: #93c5fd;

    --docs-response-border: #37305a;
    --docs-response-bg: #161326;
    --docs-response-head-border: rgba(167, 139, 250, 0.16);
    --docs-response-head-bg: linear-gradient(180deg, rgba(34, 29, 54, 0.98) 0%, rgba(24, 21, 41, 0.98) 100%);
    --docs-response-title-color: #ece8ff;
    --docs-response-code-overlay: rgba(167, 139, 250, 0.06);
    --docs-response-code-grid: rgba(167, 139, 250, 0.055);
    --docs-response-code-bg: #120f1e;
    --docs-response-switcher-border: rgba(167, 139, 250, 0.2);
    --docs-response-switcher-bg: rgba(24, 21, 41, 0.55);
    --docs-response-switcher-color: #ede9fe;
    --docs-response-switcher-hover-border: rgba(167, 139, 250, 0.38);
    --docs-response-switcher-hover-bg: rgba(38, 33, 60, 0.82);
    --docs-response-switcher-icon: #b8a8f9;
    --docs-response-switcher-menu-border: #463b70;
    --docs-response-switcher-menu-bg: #171328;
    --docs-response-switcher-option-color: #ede9fe;
    --docs-response-switcher-option-active-bg: rgba(167, 139, 250, 0.2);
    --docs-response-switcher-check: #c4b5fd;

    --shadow-code: 0 24px 56px rgba(31, 55, 82, 0.16);
    --shadow-code-large: 0 28px 64px rgba(31, 55, 82, 0.19);
    --shadow-pricing-featured: 0 18px 38px rgba(93, 137, 199, 0.15);
    --shadow-pricing-featured-hover: 0 22px 42px rgba(93, 137, 199, 0.18);
    --shadow-pricing-cta: 0 14px 34px rgba(93, 137, 199, 0.08);
    --shadow-pricing-button: 0 6px 14px rgba(93, 137, 199, 0.14);
    --shadow-accent-rings: 0 0 0 72px rgba(125, 167, 227, 0.035), 0 0 0 144px rgba(125, 167, 227, 0.025);
    --shadow-accent-soft: 0 1px 2px rgba(71, 102, 146, 0.08);
    --overlay-page: rgba(246, 249, 252, 0.56);
}
