/* Classic intentionally has no theme overrides. Existing styles remain authoritative. */
.theme-picker{display:flex;align-items:center;gap:4px;flex-wrap:wrap;max-width:150px;flex:0 0 auto}
.topbar-heading{flex-wrap:wrap;gap:10px 14px}
.theme-choice{display:grid;place-items:center;width:32px;height:32px;min-width:32px;min-height:32px;padding:5px;border:1px solid #94a79f;border-radius:8px;background:#fffdf8;cursor:pointer;color:#16483d}
.theme-choice[aria-pressed=true]{box-shadow:inset 0 0 0 2px #16483d}
.theme-choice:focus-visible{outline:3px solid #825916;outline-offset:3px}
.theme-swatch{display:block;width:14px;height:14px;border:1px solid #667c71;border-radius:50%;pointer-events:none}
.theme-swatch-classic{background:linear-gradient(90deg,#16483d 50%,#fffdf8 50%)}
.theme-swatch-noir{background:linear-gradient(90deg,#111514 50%,#c1a464 50%);border-radius:3px;transform:rotate(45deg);width:12px;height:12px}
.theme-swatch-platinum{background:linear-gradient(90deg,#24575d 50%,#e5ebee 50%);border-radius:4px}
.theme-save-status{font-size:11px;line-height:1.35;flex-basis:100%;max-width:210px;color:var(--muted);overflow-wrap:anywhere}
.theme-save-status:empty{display:none}
.stable-country{display:inline-flex;align-items:center;gap:6px;font:500 12px/1.4 Inter,ui-sans-serif,system-ui,sans-serif;margin-inline-start:10px;vertical-align:middle;white-space:normal;color:var(--muted)}
.stable-country img{width:48px;height:32px;object-fit:contain;border:0;border-radius:0;box-shadow:none;background:transparent;flex:none}
.country-filter{display:grid;gap:5px;font-size:12px;color:var(--muted)}
.country-filter select{min-height:44px;max-width:220px;padding:8px 12px;border:1px solid #82988d;border-radius:10px;color:var(--ink);background:var(--paper)}
.country-filter select:focus-visible{outline:3px solid #825916;outline-offset:2px}
.platform-stable-card[hidden]{display:none!important}
:root[data-theme="noir"]{
 color-scheme:dark;
 --theme-bg:#111514;--theme-surface:#1b211f;--theme-soft:#232c28;--theme-input:#151b18;
 --theme-text:#f2f1ec;--theme-muted:#b6c1ba;--theme-link:#e0c488;
 --theme-brand:#28483d;--theme-sidebar:#111c17;--theme-on-brand:#f8f6ee;--theme-on-brand-muted:#d2ddd5;
 --theme-accent:#c1a464;--theme-accent-ink:#e0c488;--theme-border:#63766a;--theme-focus:#e5c37a;
 --theme-danger:#ffb4ac;--theme-danger-bg:#402420;--theme-success:#a9e6be;--theme-success-bg:#203c2c;
 --theme-warning:#f4ce87;--theme-warning-bg:#3f301c;--theme-info:#b8daff;--theme-info-bg:#213449;
 --theme-shadow:0 6px 22px #0000001a;--theme-shadow-color:#00000020;--theme-overlay:#08100cbd;
 --forest:var(--theme-brand);--forest2:var(--theme-sidebar);--forest-deep:var(--theme-sidebar);--forest-soft:var(--theme-brand);--green:var(--theme-brand);
 --mint:var(--theme-soft);--gold:var(--theme-accent);--gold-soft:var(--theme-soft);--cream:var(--theme-bg);--paper:var(--theme-surface);--ink:var(--theme-text);--muted:var(--theme-muted);--line:var(--theme-border);--red:var(--theme-danger);--shadow:var(--theme-shadow);--shadow-soft:var(--theme-shadow);--shadow-deep:var(--theme-shadow);
}
:root[data-theme="platinum"]{
 color-scheme:light;
 --theme-bg:#f1f3f4;--theme-surface:#ffffff;--theme-soft:#eaf0f2;--theme-input:#ffffff;
 --theme-text:#26343b;--theme-muted:#50636b;--theme-link:#24575d;
 --theme-brand:#24575d;--theme-sidebar:#202d35;--theme-on-brand:#ffffff;--theme-on-brand-muted:#d4e2e6;
 --theme-accent:#c6d3d9;--theme-accent-ink:#3c5c67;--theme-border:#7d919a;--theme-focus:#24575d;
 --theme-danger:#9c3029;--theme-danger-bg:#fff0ed;--theme-success:#1c603f;--theme-success-bg:#e9f6ed;
 --theme-warning:#805310;--theme-warning-bg:#fff3d9;--theme-info:#235584;--theme-info-bg:#eaf3ff;
 --theme-shadow:0 5px 18px #253b4510;--theme-shadow-color:#253b4510;--theme-overlay:#13252eb8;
 --forest:var(--theme-brand);--forest2:var(--theme-sidebar);--forest-deep:var(--theme-sidebar);--forest-soft:var(--theme-brand);--green:var(--theme-brand);
 --mint:var(--theme-soft);--gold:var(--theme-accent);--gold-soft:var(--theme-soft);--cream:var(--theme-bg);--paper:var(--theme-surface);--ink:var(--theme-text);--muted:var(--theme-muted);--line:var(--theme-border);--red:var(--theme-danger);--shadow:var(--theme-shadow);--shadow-soft:var(--theme-shadow);--shadow-deep:var(--theme-shadow);
}
/* Precise shared finishing rules run after the generated color adapter. */
:root:is([data-theme="noir"],[data-theme="platinum"]) body{background:var(--theme-bg);color:var(--theme-text)}
:root:is([data-theme="noir"],[data-theme="platinum"]) :is(.panel,.horse-card,.facility-card,.stat,.platform-stable-card,.dialog,.assistant-dialog){background:var(--theme-surface);color:var(--theme-text);border-color:var(--theme-border);box-shadow:var(--theme-shadow)}
:root:is([data-theme="noir"],[data-theme="platinum"]) :is(.sidebar,.login-story){background:var(--theme-sidebar);color:var(--theme-on-brand)}
:root:is([data-theme="noir"],[data-theme="platinum"]) .sidebar :is(button,small,span,strong,.nav-group-toggle){color:var(--theme-on-brand-muted)}
:root:is([data-theme="noir"],[data-theme="platinum"]) .sidebar .nav button.active{color:var(--theme-on-brand);background:var(--theme-brand);box-shadow:inset 3px 0 var(--theme-accent)}
:root:is([data-theme="noir"],[data-theme="platinum"]) :is(.hero,.assistant-dialog header){background:var(--theme-brand);color:var(--theme-on-brand)}
:root:is([data-theme="noir"],[data-theme="platinum"]) :is(.hero,.assistant-dialog header) :is(h1,h2,p){color:var(--theme-on-brand)}
:root:is([data-theme="noir"],[data-theme="platinum"]) :is(.topbar,.theme-choice){background:var(--theme-surface);color:var(--theme-text);border-color:var(--theme-border)}
:root:is([data-theme="noir"],[data-theme="platinum"]) .theme-choice[aria-pressed=true]{box-shadow:inset 0 0 0 2px var(--theme-link)}
:root:is([data-theme="noir"],[data-theme="platinum"]) :is(.button.primary,.assistant-launcher){background:var(--theme-brand);color:var(--theme-on-brand);border:1px solid var(--theme-border)}
:root:is([data-theme="noir"],[data-theme="platinum"]) .button.secondary{background:var(--theme-surface);color:var(--theme-link);border-color:var(--theme-border)}
:root:is([data-theme="noir"],[data-theme="platinum"]) .button.danger{background:var(--theme-danger-bg);color:var(--theme-danger);border-color:var(--theme-danger)}
:root:is([data-theme="noir"],[data-theme="platinum"]) :is(input,textarea,select):not([type=checkbox]):not([type=radio]):not([type=range]):not([type=color]){color:var(--theme-text);background:var(--theme-input);border-color:var(--theme-border)}
:root:is([data-theme="noir"],[data-theme="platinum"]) :is(input,textarea)::placeholder{color:var(--theme-muted);opacity:1}
:root:is([data-theme="noir"],[data-theme="platinum"]) :is(input[type=checkbox],input[type=radio]){accent-color:var(--theme-brand)}
:root:is([data-theme="noir"],[data-theme="platinum"]) :is(input,textarea,select):disabled{color:var(--theme-muted);background:var(--theme-soft);opacity:1}
:root:is([data-theme="noir"],[data-theme="platinum"]) :is(option,optgroup){background:var(--theme-input);color:var(--theme-text)}
:root:is([data-theme="noir"],[data-theme="platinum"]) :focus-visible{outline:3px solid var(--theme-focus);outline-offset:3px}
:root:is([data-theme="noir"],[data-theme="platinum"]) .sidebar :focus-visible{outline-color:var(--theme-on-brand)}
:root:is([data-theme="noir"],[data-theme="platinum"]) :is(.notice.error,.form-error){color:var(--theme-danger)}
:root:is([data-theme="noir"],[data-theme="platinum"]) .notice.error{background:var(--theme-danger-bg)}
:root:is([data-theme="noir"],[data-theme="platinum"]) .notice.success{background:var(--theme-success-bg);color:var(--theme-success)}
:root:is([data-theme="noir"],[data-theme="platinum"]) .notice.warning{background:var(--theme-warning-bg);color:var(--theme-warning)}
:root:is([data-theme="noir"],[data-theme="platinum"]) :is(th,td){border-color:var(--theme-border)}
:root:is([data-theme="noir"],[data-theme="platinum"]) th{color:var(--theme-muted);background:var(--theme-soft)}
:root:is([data-theme="noir"],[data-theme="platinum"]) tbody tr:hover{background:var(--theme-soft)}
:root:is([data-theme="noir"],[data-theme="platinum"]) .assistant-message{background:var(--theme-soft);color:var(--theme-text)}
:root:is([data-theme="noir"],[data-theme="platinum"]) .assistant-user{background:var(--theme-brand);color:var(--theme-on-brand)}
:root:is([data-theme="noir"],[data-theme="platinum"]) :is(.assistant-privacy,.assistant-top label){color:var(--theme-muted)}
:root:is([data-theme="noir"],[data-theme="platinum"]) .dialog-backdrop{background:var(--theme-overlay)}
:root:is([data-theme="noir"],[data-theme="platinum"]) .assistant-dialog::backdrop{background:var(--theme-overlay)}
/* Keep the logo in layout flow: reserved space instead of overlapping controls. */
@media(min-width:901px){
 .topbar{flex-wrap:wrap;gap:12px 20px}
 .topbar-heading{order:0;flex:1 1 230px}
 .topbar .product-lockup{order:1;position:static;left:auto;top:auto;transform:none;flex:0 0 auto;margin:0}
 .topbar-user{order:2;flex:1 1 350px;justify-content:flex-end;flex-wrap:wrap}
}
@media(pointer:coarse){.theme-choice{width:44px;height:44px;min-width:44px;min-height:44px}}
@media(max-width:760px){.theme-save-status{max-width:150px}.stable-country{display:flex;margin:5px 0 0}.country-filter select{max-width:100%}}
@media(max-width:600px){
 .theme-picker{gap:5px;max-width:116px}
 .theme-choice{width:34px;height:34px;min-width:34px;min-height:34px;padding:4px;border-radius:7px}
 .theme-swatch{width:12px;height:12px}
 .theme-swatch-noir{width:10px;height:10px}
 .theme-save-status{max-width:116px}
}
@media(prefers-reduced-motion:reduce){.theme-choice{transition:none}}
/* Original brand colors need a light backing in Noir; keep existing dimensions. */
:root[data-theme="noir"] .product-lockup{background:#fffdf8;border-radius:10px}
:root[data-theme="noir"] .product-lockup span{color:#16483d}
/* Explicit contrast for controls whose legacy colors are derived from --forest-deep. */
:root[data-theme="noir"] .flag-picker-button,
:root[data-theme="noir"] .flag-picker-current,
:root[data-theme="noir"] .flag-picker-chevron{color:var(--theme-link)}
:root[data-theme="platinum"] .sidebar-profile .sidebar-logout{color:#fff;background:#24575d;border-color:#6f9197}
:root[data-theme="platinum"] .sidebar-profile .sidebar-logout :is(span,strong){color:#fff}
:root[data-theme="platinum"] .sidebar-profile .sidebar-logout:hover{color:#fff;background:#1d484d;border-color:#8eabb0}
:root:is([data-theme="noir"],[data-theme="platinum"]) .activity-details{color:var(--theme-text);background:var(--theme-surface);border-color:var(--theme-border);box-shadow:0 16px 38px var(--theme-shadow-color)}
:root:is([data-theme="noir"],[data-theme="platinum"]) .activity-details b{color:var(--theme-link)}
:root:is([data-theme="noir"],[data-theme="platinum"]) .activity-details small{color:var(--theme-muted);border-color:var(--theme-border)}
:root:is([data-theme="noir"],[data-theme="platinum"]) .activity-green .activity-summary strong{color:var(--theme-success)}
:root:is([data-theme="noir"],[data-theme="platinum"]) .activity-orange .activity-summary strong{color:var(--theme-warning)}
:root:is([data-theme="noir"],[data-theme="platinum"]) .activity-red .activity-summary strong{color:var(--theme-danger)}
:root:is([data-theme="noir"],[data-theme="platinum"]) .platform-activity-filter select{color:var(--theme-text);background:var(--theme-input);border-color:var(--theme-border)}
