/* Authoritative global palette. Legacy component colors are intentionally
   overridden here; dimensions, data, images and map tiles stay untouched. */
:root[data-theme=light]{
 color-scheme:light;--ui-bg:#f8f9fe;--ui-surface:#ffffff;--ui-raised:#f8f9fe;--ui-soft:#eaf2ff;
 --ui-fg:#1f2024;--ui-muted:#71727a;--ui-line:#e8e9f1;--ui-accent:#006ffd;--ui-accent-text:#0056c8;--ui-on-accent:#ffffff;
 --ui-positive-bg:#e7f4e8;--ui-positive:#298267;--ui-warning-bg:#fff4e4;--ui-warning:#e86339;
 --ui-control-border:#c5c6cc;
 --ui-space-1:4px;--ui-space-2:8px;--ui-space-3:12px;--ui-space-4:16px;--ui-space-5:20px;--ui-space-6:24px;--ui-space-8:32px;
 --ui-text-small:12px;--ui-text-body:14px;--ui-text-section:18px;--ui-line-height:1.7;
 --ui-radius-control:12px;--ui-radius-card:16px;--ui-radius-pill:999px;--ui-shadow-card:none;
 --ui-container:1320px;--ui-touch-min:44px;--ui-field-min:48px;--ui-motion-fast:.15s;
 --ui-layer-bottom-nav:40;--ui-layer-header:50;--ui-layer-menu:60;--ui-layer-search:80;
 --product-radius:var(--ui-radius-card);--product-gap:var(--ui-space-6);--product-shadow:var(--ui-shadow-card);
 --ui-negative-bg:#ffe2e5;--ui-negative:#ed3241;--ui-hero:linear-gradient(270deg,#eaf2fffa 0%,#eaf2ffed 52%,#eaf2ff22 100%);
 --ui-highlight-dark:#006ffd;--ui-highlight-medium:#2897ff;--ui-highlight-light:#6fbaff;--ui-highlight-lighter:#b4dbff;
 --ui-neutral-dark:#2f3036;--ui-neutral-medium:#494a50;--ui-neutral-light:#c5c6cc;
 --kit-highlight-darkest:#006ffd;--kit-highlight-dark:#2897ff;--kit-highlight-medium:#6fbaff;--kit-highlight-light:#b4dbff;--kit-highlight-lightest:#eaf2ff;--kit-neutral-light-darkest:#c5c6cc;--kit-neutral-light-dark:#d4d6dd;--kit-neutral-light-medium:#e8e9f1;--kit-neutral-light-light:#f8f9fe;--kit-neutral-light-lightest:#ffffff;--kit-neutral-dark-darkest:#1f2024;--kit-neutral-dark-dark:#2f3036;--kit-neutral-dark-medium:#494a50;--kit-neutral-dark-light:#71727a;--kit-neutral-dark-lightest:#8f9098;--kit-success-dark:#298267;--kit-success-medium:#3ac0a0;--kit-success-light:#e7f4e8;--kit-warning-dark:#e86339;--kit-warning-medium:#ffb37c;--kit-warning-light:#fff4e4;--kit-error-dark:#ed3241;--kit-error-medium:#ff616d;--kit-error-light:#ffe2e5;--ui-support-error:#ed3241;--ui-support-warning:#e86339;
 --ink:var(--ui-fg);--muted:var(--ui-muted);--line:var(--ui-line);--teal:var(--ui-accent);--teal-dark:var(--ui-accent);--navy:var(--ui-fg);--surface:var(--ui-surface);--shadow:var(--ui-shadow-card);--radius:var(--ui-radius-card);
 --work-bg:var(--ui-bg);--work-card:var(--ui-surface);--work-raised:var(--ui-raised);--work-line:var(--ui-line);--work-ink:var(--ui-fg);--work-muted:var(--ui-muted);--work-mint:var(--ui-accent);--work-green:var(--ui-accent);--card-radius:var(--ui-radius-card);
 --ui-border:var(--ui-line);--ui-danger:var(--ui-negative);--ui-radius-md:var(--ui-radius-control);

}
:root[data-theme] body{background:var(--ui-bg)!important;color:var(--ui-fg)!important;color-scheme:inherit}
:root[data-theme] body>header,:root[data-theme] .ref-footer{background:var(--ui-surface)!important;color:var(--ui-fg)!important;border-color:var(--ui-line)!important;box-shadow:none!important}
:root[data-theme] .ref-footer{border-top:1px solid var(--ui-line)}
:root[data-theme] body :is(.brand-name,.ref-footer .brand-name){color:var(--ui-fg)!important}
:root[data-theme] body .brand-name>span{color:var(--ui-accent)!important}
:root[data-theme=light] body .brand-symbol{filter:none!important;background:transparent!important}
:root[data-theme] body header nav{background:var(--ui-surface)!important;border-color:var(--ui-line)!important}
:root[data-theme] body :is(header nav a,.ref-footer a:not(.brand),.ref-footer p){color:var(--ui-muted)!important}
:root[data-theme] body :is(header nav a[aria-current=page],header nav a:hover,.ref-footer a:hover){color:var(--ui-accent)!important}
:root[data-theme] body :is(.ref-footer b,.ref-footer strong){color:var(--ui-fg)!important}
:root[data-theme] body #app :is(h1,h2,h3,h4,strong,b,legend,dd,label.field,label.consent,.order-gps-consent){color:var(--ui-fg)!important}
:root[data-theme] body #app :is(p,small,time,dt,.optional,.eyebrow,.surface-note,.loading-state,.case-empty,.case-list-count,.report-meta,.place-navigation-label,.places-map-legend,.service-breadcrumb,.invoice-kind,.catalog-selection,.case-header .optional){color:var(--ui-muted)!important}
:root[data-theme] body #app :is(a.link,.auth-links a,.service-breadcrumb a,.directory-card>span,.place-district,.places-hero>span,.eyebrow){color:var(--ui-accent)!important}
/* Shared surfaces, including public pages and embedded component panels. */
:root[data-theme] body #app :is(.card,.order,.stat,.bike-card,.skill-card,.document-card,.review-card,.service,.directory-card,.place-card,.role-shortcuts>a,.login,.faq-section details,.places-filters,.street-map-shell,.gateway-form,.gateway-merchant,.finance-payment-item){background:var(--ui-surface)!important;color:var(--ui-fg)!important;border-color:var(--ui-line)!important;box-shadow:var(--ui-shadow-card)}
:root[data-theme] body #app :is(.role-welcome,.ref-why,.ref-flow,.ref-future,.ref-join,.places-hero,.service-detail-hero,.request-promo,.skill-intro,.empty,.finance-support,.coverage-summary){background:var(--ui-soft)!important;color:var(--ui-fg)!important;border-color:var(--ui-line)!important}
:root[data-theme] body #app .promo-moto{opacity:.08!important}
:root[data-theme] body #app :is(.service .badge,.place-category,.symptom-chips>span,.catalog-selection){background:var(--ui-soft)!important;color:var(--ui-accent)!important;border-color:var(--ui-line)!important}
:root[data-theme] body #app :is(.case-person,.case-money article,.finance-stats article,.finance-receipt-meta,.invoice-summary,.invoice-totals,.document-preview,.skill-card form,.document-card form,.review-summary,.order-position,.order-location-point,.report-fieldset,.report-text,.report-checks>div,.order-state-timeline li>div,.offer-row,.skill-event,.case-entry,.history-entry,.gateway-fields span,.gateway-timer b,.gateway-shop,.gateway-fake-card,.places-position-empty,.places-map-caption,.place-snapshot){background:var(--ui-raised)!important;color:var(--ui-fg)!important;border-color:var(--ui-line)!important}
:root[data-theme] body #app :is(.panel-heading,.order-actions,.case-section-index,.case-entry,.case-facts,.case-header>p,.case-jumps,.bike-facts,.bike-card>a.link,.finance-breakdown,.finance-breakdown>div,.invoice-line,.invoice-lines,.gateway-card-head,.gateway-fields>div,.order-state-timeline li>div){border-color:var(--ui-line)!important}
:root[data-theme] body #app .case-header>p{background:var(--ui-raised)!important}
:root[data-theme] body #app :is(.finance-breakdown,.finance-breakdown>div){background:var(--ui-surface)!important;color:var(--ui-fg)!important}
:root[data-theme] body #app .finance-breakdown>div:last-child{background:var(--ui-soft)!important}
:root[data-theme] body #app :is(.metric-icon,.card-heading-icon,.bike-card>img,.order-state-timeline .timeline-number){background:var(--ui-soft)!important;border-color:var(--ui-line)!important;color:var(--ui-accent)!important}
/* Hero is themed as well, with the original photo below a matching overlay. */
:root[data-theme] body #app .reference-hero .hero-shade{background:var(--ui-hero)!important}
:root[data-theme] body #app .hero-content :is(h1,p){color:var(--ui-fg)!important}
:root[data-theme] body #app .hero-search{background:var(--ui-surface)!important;border-color:var(--ui-line)!important}
:root[data-theme] body #app .hero-search>span{color:var(--ui-muted)!important;border-color:var(--ui-line)!important}
:root[data-theme] body #app .ref-steps b,:root[data-theme] body #app .service-four-steps b{background:var(--ui-accent)!important;color:var(--ui-on-accent)!important}
:root[data-theme] body #app .service::after{color:var(--ui-accent)!important}
/* Forms, native menus, filters and actionable controls. */
:root[data-theme] body :is(button,input,select,textarea){background-color:var(--ui-surface)!important;color:var(--ui-fg)!important;border-color:var(--ui-line)!important;color-scheme:inherit}
:root[data-theme] body :is(input,select,textarea){border-color:var(--ui-control-border)!important}
:root[data-theme] body :is(input,textarea)::placeholder{color:var(--ui-muted)!important;opacity:1}
:root[data-theme] body select option{background:var(--ui-surface);color:var(--ui-fg)}
:root[data-theme] body input:is([type=checkbox],[type=radio]){accent-color:var(--ui-accent)}
:root[data-theme] body :is(.button,.button.dark,.button.white,.hero-search button,.gateway-buttons>.button){background:var(--ui-accent)!important;color:var(--ui-on-accent)!important;border-color:var(--ui-accent)!important}
:root[data-theme] body :is(.button.outline,.secondary,.header-mobile-toggle,.account-logout,.panel-nav-toggle){background:var(--ui-raised)!important;color:var(--ui-fg)!important;border:1px solid var(--ui-line)!important}
:root[data-theme] body #app :is(.live-filters,.filter-tabs,.street-map-toolbar){background:var(--ui-raised)!important;border-color:var(--ui-line)!important}
:root[data-theme] body #app :is(.live-filters button,.filter-tabs button){background:transparent!important;color:var(--ui-muted)!important;border-color:transparent!important}
:root[data-theme] body #app :is(.live-filters button.selected,.filter-tabs button[aria-selected=true],.order-position-tabs [aria-pressed=true],.catalog-option:has(input:checked),.account-role:has(input:checked),.skill-services label:has(input:checked)){background:var(--ui-soft)!important;color:var(--ui-accent)!important;border-color:var(--ui-accent)!important}
:root[data-theme] body #app :is(.account-role,.catalog-option,.skill-services label,.review-rating span){background:var(--ui-surface)!important;color:var(--ui-fg)!important;border-color:var(--ui-line)!important}
:root[data-theme] body #app :is(.account-role small,.role-hint,.auth-links,.catalog-option small,.bike-facts,.bike-facts b,.bike-facts span,.street-map-status,.street-map-hint){color:var(--ui-muted)!important}
:root[data-theme] body :is(a,button,input,select,textarea,summary):focus-visible{outline-color:var(--ui-accent)!important}
:root[data-theme] body #app :is(summary,.case-section-index>summary){color:var(--ui-fg)!important}
:root[data-theme] body #app :is(th,td,.table-wrap){border-color:var(--ui-line)!important}
:root[data-theme] body #app th{background:var(--ui-raised)!important;color:var(--ui-muted)!important}
:root[data-theme] body #app td{background:var(--ui-surface)!important;color:var(--ui-fg)!important}
/* Navigation surfaces follow the chosen appearance, including the light sidebar. */
:root[data-theme] body #app .sidebar{background:var(--ui-surface)!important;color:var(--ui-fg)!important;border:1px solid var(--ui-line)!important;box-shadow:none!important}
:root[data-theme] body #app .sidebar :is(h3,a){color:var(--ui-muted)!important}
:root[data-theme] body #app .sidebar a:is(.active,[aria-current=page]){background:var(--ui-soft)!important;color:var(--ui-accent)!important;border-color:var(--ui-line)!important;box-shadow:inset -3px 0 var(--ui-accent)!important}
:root[data-theme] body .panel-quick-nav{background:var(--ui-surface)!important;border-color:var(--ui-line)!important;box-shadow:0 -4px 20px #1f202408!important}
:root[data-theme] body .panel-quick-nav a{color:var(--ui-muted)!important}
:root[data-theme] body .panel-quick-nav a[aria-current=page]{background:var(--ui-soft)!important;color:var(--ui-accent)!important}
:root[data-theme=light] body :is(.nav-icon,.panel-quick-nav img,.card-heading-icon img,.metric-icon img){filter:none!important;opacity:1}
/* Map imagery, document photos and external navigation logos are never filtered. */
:root[data-theme] body #app :is(.leaflet-popup-content-wrapper,.leaflet-popup-tip,.leaflet-control-zoom a,.leaflet-control-attribution,.navigation-logo){background:var(--ui-surface)!important;color:var(--ui-fg)!important;border-color:var(--ui-line)!important}
:root[data-theme] body #app :is(.leaflet-popup-content p,.leaflet-popup-content b){color:var(--ui-fg)!important}
:root[data-theme] body #app .leaflet-control-attribution a{color:var(--ui-accent)!important}
:root[data-theme] body #app .navigation-logo{color:var(--ui-fg)!important}
/* Status is explicit and consistent across every surface. */
:root[data-theme] body #app :is(.badge,.finance-status,.gateway-simulation,.panel-toolbar .role-tag){background:var(--ui-raised)!important;color:var(--ui-muted)!important;border:1px solid var(--ui-line)!important}
:root[data-theme] body #app :is(.badge,.finance-status)[data-tone=positive]{background:var(--ui-positive-bg)!important;color:var(--ui-positive)!important}
:root[data-theme] body #app :is(.badge,.finance-status)[data-tone=warning]{background:var(--ui-warning-bg)!important;color:var(--ui-warning)!important}
:root[data-theme] body #app :is(.badge,.finance-status)[data-tone=negative]{background:var(--ui-negative-bg)!important;color:var(--ui-negative)!important}
:root[data-theme] body #app :is(.form-error-summary,.api-error:not(:empty)){background:var(--ui-negative-bg)!important;color:var(--ui-negative)!important;border-color:var(--ui-negative)!important}
:root[data-theme] body #app :is(.form-error-summary h3,.form-error-summary a,.inline-validation,.field-error,.danger-text){color:var(--ui-negative)!important}
:root[data-theme] body #app .danger-text{background:var(--ui-negative-bg)!important;border-color:var(--ui-negative)!important}
:root[data-theme] body #app [aria-invalid=true]{border-color:var(--ui-negative)!important}
:root[data-theme] body #app :is(.document-access-note,.check-result.attention){background:var(--ui-warning-bg)!important;color:var(--ui-warning)!important;border-color:var(--ui-warning)!important}
:root[data-theme] body #app :is(.receipt-symbol,.receipt-success,.check-result:not(.attention)){background:var(--ui-positive-bg)!important;color:var(--ui-positive)!important}
:root[data-theme] body #app :is(.gateway-lock,.gateway-timer,.gateway-security,.gateway-fields b,.gateway-bottom,.gateway-merchant dt,.gateway-wordmark small){color:var(--ui-muted)!important}
:root[data-theme] body #app :is(.gateway-wordmark,.gateway-merchant dd,.gateway-fake-card b,.gateway-fake-card small){color:var(--ui-fg)!important}
:root[data-theme] body #app :is(.gateway-wordmark>span,.gateway-merchant dd.gateway-amount,.gateway-bottom a){color:var(--ui-accent)!important}
:root[data-theme] #toast{background:var(--ui-raised)!important;color:var(--ui-fg)!important;border:1px solid var(--ui-line)!important}
:root[data-theme] body #app .order-stage i{background:var(--ui-line)!important}
:root[data-theme] body #app .order-stage i.reached{background:var(--ui-accent)!important}
:root[data-theme] body #app .progress span{color:var(--ui-muted)!important;border-color:var(--ui-line)!important}
:root[data-theme] body #app .progress span.active{color:var(--ui-accent)!important;border-color:var(--ui-accent)!important}
/* Shared header foundation; responsive geometry is owned by product-design.css. */
:root[data-theme] body:not(.gateway-view)>header{display:flex!important;flex-wrap:wrap!important;gap:16px}
:root[data-theme] body .panel-title-row,:root[data-theme] body .appearance-title{padding-inline-end:0!important}
@media(max-width:800px){
 :root[data-theme] body:not(.gateway-view)>header{display:grid!important;grid-template-columns:minmax(0,1fr) auto;gap:10px;padding:12px 16px}
 :root[data-theme] body>header .brand{grid-column:1;grid-row:1;min-width:0}
 :root[data-theme] body>header .header-account-actions{grid-column:2;grid-row:1;width:auto;flex-basis:auto;margin:0;gap:6px}
 :root[data-theme] body>header .header-mobile-toggle{grid-column:2;grid-row:2;justify-self:end}
 :root[data-theme] body>header nav{position:absolute;inset-inline:0;top:100%;z-index:60}
}
:root[data-theme] .map-promo .map-label{background:var(--ui-surface)!important;border-color:var(--ui-line)!important}
:root[data-theme] .service-check-list li{color:var(--ui-muted)!important}
@media print{
 :root[data-theme]{color-scheme:light;--ui-bg:#ffffff;--ui-surface:#ffffff;--ui-raised:#ffffff;--ui-soft:#ffffff;--ui-fg:#006ffd;--ui-muted:#494a50;--ui-line:#d4d6dd;--ui-accent:#006ffd;--ui-on-accent:#ffffff;--ui-positive-bg:#ffffff;--ui-positive:#006ffd;--ui-warning-bg:#ffffff;--ui-warning:#e86339;--ui-negative-bg:#ffffff;--ui-negative:#ed3241}
}
