/* Surface and text are changed as a pair. Brand navy and gold remain fixed. */
:root {--accent-text:#d6ad62;--accent-text-strong:#ecd09a;--home-accent-text:#d6ad62;}
:root[data-theme=navy] {color-scheme:dark;}
:root[data-theme=light] {color-scheme:light;--text:#000;--muted:#252525;--line:#c4baa7;--line-soft:#ddd6c9;--home-text:#000;--home-muted:#252525;--home-line:#c4baa7;--home-line-soft:#ddd6c9;--accent-text:#000;--accent-text-strong:#000;--home-accent-text:#000;}
:root[data-theme=light],:root[data-theme=light] body {background:#fff;color:#000;}
:root[data-theme=light] :is(.main-shell,.home-main,.login-panel,.panel,.record-card,.milestone,.stat,.proof-stat,.demo-panel,.demo-gate,.dialog-shell,.contact-form-panel,.cookie-settings,.funding-control,.funding-capability,.decision-card,.use-case-card,.audience-card,.admin-card,.admin-spec,.empty-state,.inline-callout,.budget-results,.document-reader,.document-body,.document-source-text) {background:#fff;color:#000;}
:root[data-theme=light] :is(.record-card,.milestone,.stat,.proof-stat,.decision-card,.use-case-card,.audience-card) {border-color:#c4baa7;}
:root[data-theme=light] :is(.field-list>div,.detail-evidence,.catalog-row,.catalog-row.sub-row,.inbox-message) {background:#f7f5f0;color:#000;}
:root[data-theme=light] :is(.document-reader,.document-body,.document-source-text,.dialog-content,.funding-control,.funding-capability,.demo-panel,.demo-gate,.decision-card,.use-case-card,.audience-card,.login-panel) {--text:#000;--muted:#252525;--home-text:#000;--home-muted:#252525;--accent-text:#000;--accent-text-strong:#000;--home-accent-text:#000;}
:root[data-theme=light] .bar-track {background:#ece8e0;}
:root[data-theme=light] :is(.search-box input,.form-field input,.form-field select,.form-field textarea,.contact-form-panel input:not([type=checkbox]),.contact-form-panel select,.contact-form-panel textarea) {background:#fff;color:#000;border-color:#74684f;color-scheme:light;}
:root[data-theme=light] :is(input,textarea)::placeholder {color:#555;opacity:1;}
:root[data-theme=light] .input-prefix {color:#000;}
:root[data-theme=light] :is(.funding-capability h3,.funding-card-action,.milestone-period,.milestone-number,.record-number,.record-field dt,.bar-label,.bar-value,.proof-stat strong,.stat strong,.demo-panel h3,.demo-output>span,.demo-gate strong,.demo-gate span,.funding-detail-price,.policy-date,.decision-label,.decision-number,.use-case-tag,.evidence-value) {color:#000;}
/* These surfaces stay navy in both themes; their children inherit light ink. */
:root :is(.sidebar,.topbar,.hero,.content-card,.document-card,.site-header,.home-hero,.site-footer,.login-visual,.example-box,.access-band,.welcome-toolbar,.welcome-dialog) {--text:#f3efe6;--muted:#bbc7d1;--line:#355067;--line-soft:#253f54;--home-text:#f1ede4;--home-muted:#b7c3cc;--home-line:rgba(214,173,98,.3);--home-line-soft:rgba(214,173,98,.18);--accent-text:#d6ad62;--accent-text-strong:#ecd09a;--home-accent-text:#d6ad62;color:#f3efe6;color-scheme:dark;}
:root :is(.topbar,.site-header,.site-footer,.welcome-toolbar,.content-card,.document-card,.access-band) {background-color:#061725;}
:root :is(.content-card,.document-card) h3 {color:#d6ad62;}
:root :is(.content-card,.document-card) p {color:#bbc7d1;}
:root .home-hero h1,:root .login-visual :is(h1,h2,p),:root .hero h1 {color:#f3efe6;}
:root .site-header .main-nav a,:root .site-header #publicNav a {color:#f1ede4;}
:root .site-footer a {color:#d6ad62;}
/* Every control retains one of the two requested button treatments. */
:root :is(.button,.locale-button,.action-button,.secondary-button,.text-button,.chart-tab,.milestone-toggle,.document-download,.demo-step,.icon-button,.dialog-close,.lang-button,.role-select,.menu-toggle,.cookie-actions button) {--text:#f3efe6;--muted:#bbc7d1;--home-text:#f1ede4;--home-muted:#b7c3cc;--accent-text:#d6ad62;--accent-text-strong:#ecd09a;--home-accent-text:#d6ad62;color-scheme:dark;}
:root :is(.secondary-button,.text-button,.chart-tab,.milestone-toggle,.document-download,.demo-step,.icon-button,.dialog-close,.button-secondary,.locale-button,.menu-toggle) {background:#061725;color:#d6ad62;}
:root :is(.action-button,.button-primary,.chart-tab.active,.demo-step.active,.cookie-actions .button[aria-pressed=true]) {background:#d6ad62;color:#000;}
:root :is(.action-button,.button-primary,.chart-tab.active,.demo-step.active) :is(span,strong) {color:#000;}
:root[data-theme=light] :is(.search-box,.access-status,.auth-feedback) {background:#f7f5f0;color:#000;}
:root :is(.badge,.catalog-badge) {--accent-text:#d6ad62;--accent-text-strong:#ecd09a;color:#d6ad62;background:#061725;}
.theme-toggle {display:inline-flex;align-items:center;justify-content:center;flex:0 0 44px;width:44px!important;min-width:44px!important;height:44px;min-height:44px;padding:8px!important;border:1px solid rgba(214,173,98,.42);border-radius:50%;background:#061725;cursor:pointer;}
.theme-swatch {display:block;width:24px;height:24px;border:1px solid #d6ad62;border-radius:50%;background:linear-gradient(135deg,#fff 0%,#fff 35%,#9aa4ad 49%,#061725 65%,#061725 100%);transition:transform .2s ease;}
.theme-toggle[aria-pressed=true] .theme-swatch {transform:rotate(180deg);}
.theme-toggle:focus-visible {outline:2px solid #d6ad62;outline-offset:3px;}
@media(prefers-reduced-motion:reduce){.theme-swatch{transition:none;}}
@media(max-width:640px){.public-site .header-actions{gap:6px;}.public-site .theme-toggle{flex-basis:44px;width:44px!important;min-width:44px!important;}.public-site .site-brand{gap:8px;}}
.public-site .theme-toggle {flex-basis:40px;width:40px!important;min-width:40px!important;height:40px;min-height:40px;padding:7px!important;}
