/* Atlas · shared appearance system.
 * Canonical source: atlas-mobile-loading/src/design-system.css.
 * The web asset is a byte-identical distribution, not a separate theme.
 * Dark UI only: existing layout, map style, typography and day palette are preserved.
 * --atlas-blue is readable foreground; --atlas-action is a filled control.
 */
:root:is([data-atlas-theme=night],[data-theme=night]) {
 color-scheme:dark;
 --atlas-canvas:#10151b;
 --atlas-surface:#181f28;
 --atlas-raised:#222b36;
 --atlas-field:#121922;
 --atlas-hover:#2a3542;
 --atlas-pressed:#313f50;
 --atlas-border:#344250;
 --atlas-control-border:#728093;
 --atlas-text:#edf2f7;
 --atlas-secondary:#b1bdcb;
 --atlas-tertiary:#a3b0c0;
 --atlas-accent:#8db7ff;
 --atlas-selection:#1d3456;
 --atlas-action:#2864d7;
 --atlas-action-hover:#326ede;
 --atlas-on-action:#fff;
 --atlas-danger:#ffafaf;
 --atlas-danger-surface:#3a232b;
 --atlas-warning:#edc182;
 --atlas-warning-surface:#332b20;
 --atlas-success:#8cd8b3;
 --atlas-success-surface:#1c322b;
 --atlas-focus:#aacaff;
 --atlas-scrim:#05090fb3;
 --atlas-shadow-low:0 2px 8px #00000038,inset 0 1px 0 #ffffff06;
 --atlas-shadow-high:0 16px 48px #00000066,0 2px 8px #00000040,inset 0 1px 0 #ffffff08;
 /* Compatibility aliases for the map, native shell and Transport pages. */
 --atlas-ink:var(--atlas-text);
 --atlas-paper:var(--atlas-surface);
 --atlas-milk:var(--atlas-raised);
 --atlas-line:var(--atlas-border);
 --atlas-muted:var(--atlas-secondary);
 --atlas-blue:var(--atlas-accent);
 --atlas-red:var(--atlas-action);
 --atlas-shadow:var(--atlas-shadow-high);
 --bg:var(--atlas-canvas);
 --panel:var(--atlas-surface);
 --card:var(--atlas-surface);
 --accent:var(--atlas-action);
 --ink:var(--atlas-text);
 --muted:var(--atlas-secondary);
 --line:var(--atlas-border);
 --blue:var(--atlas-accent);
 --soft:var(--atlas-selection);
 --amber:var(--atlas-warning);
 --amber-bg:var(--atlas-warning-surface);
 background:var(--atlas-canvas);
 color:var(--atlas-text);
 accent-color:var(--atlas-action);
 scrollbar-color:var(--atlas-control-border) transparent;
}
:root:is([data-atlas-theme=night],[data-theme=night]) body {background:var(--atlas-canvas);color:var(--atlas-text);}
/* Floating surfaces remain opaque: readability does not depend on the map below. */
html[data-atlas-theme=night] :is(.country-view .atlas-context-panel,#regionPreview,#atlasPersonalSpace.atlas-daily-map-sheet,.atlas-save-dialog,.atlas-road-dialog,.atlas-contribute-dialog,#atlasBetaDialog,#proPicker,.atlas-profile-picker,.atlas-navigation-options,.atlas-navigation-steps-panel,.atlas-weather-panel) {
 background:var(--atlas-surface);color:var(--atlas-text);border-color:var(--atlas-border);box-shadow:var(--atlas-shadow-high);
}
html[data-atlas-theme=night] :is(.country-view .national-sidebar.search-hub,.country-view .national-search>div,.national-search-results,.national-route-suggestions,.country-view .atlas-top-actions button,.public-map-controls button,.atlas-map-zoom,.atlas-weather,#atlasMapCredits,.atlas-daily-car,.atlas-resume-route) {
 background:var(--atlas-surface);color:var(--atlas-text);border-color:var(--atlas-border);box-shadow:var(--atlas-shadow-low);
}
/* Compact search uses a transparent wrapper; only the field is a surface. */
html[data-atlas-theme=night].atlas-consumer-shell .country-view .national-sidebar.search-hub {background:transparent!important;box-shadow:none!important;}
@media(max-width:779px) {
 html[data-atlas-theme=night] .country-view .national-sidebar.search-hub {background:transparent!important;box-shadow:none!important;}
}
html[data-atlas-theme=night] :is(#atlasPersonalSpace,#atlasConsumerNav) {background:var(--atlas-surface);color:var(--atlas-text);border-color:var(--atlas-border);}
html[data-atlas-theme=night] :is(#atlasPersonalSpace .daily-plan-footer,.atlas-navigation-steps-panel>header) {background:var(--atlas-surface);border-color:var(--atlas-border);}
html[data-atlas-theme=night] :is(.atlas-personal-card,.atlas-profile-icon,.atlas-theme-picker,.language-control,.atlas-route-endpoints,.daily-itinerary,.national-route-profiles) {background:var(--atlas-field);border-color:var(--atlas-border);}
html[data-theme=night] :is(.panel,.metric,.topbar) {background:var(--atlas-surface);border-color:var(--atlas-border);}
/* Field boundaries are stronger than decorative separators. */
:root:is([data-atlas-theme=night],[data-theme=night]) :is(input:not([type=checkbox]):not([type=radio]):not([type=range]),select,textarea) {color:var(--atlas-text);caret-color:var(--atlas-accent);}
html[data-theme=night] :is(input,select,textarea),
html[data-atlas-theme=night] :is(.atlas-save-dialog input,.atlas-road-dialog select,#atlasPersonalSpace input:not([type=checkbox]),#atlasPersonalSpace textarea,#atlasPersonalSpace select,#atlasTransitWhen,#atlasTransitDateTime) {
 background:var(--atlas-field);border-color:var(--atlas-control-border);
}
html[data-atlas-theme=night] .country-view .national-route-field {background:var(--atlas-field);border-color:var(--atlas-control-border);}
html[data-atlas-theme=night] .country-view .national-search>div {border-color:var(--atlas-control-border);}
:root:is([data-atlas-theme=night],[data-theme=night]) :is(input,textarea)::placeholder {color:var(--atlas-tertiary);opacity:1;}
:root:is([data-atlas-theme=night],[data-theme=night]) option {background:var(--atlas-surface);color:var(--atlas-text);}
/* Primary actions share one foreground/background pair; never the light link blue. */
:root:is([data-atlas-theme=night],[data-theme=night]) :is(
 .national-route-submit,.national-navigation-launchers button.national-navigation-start,.region-route-action,
 .atlas-save-primary,.atlas-profile-signin,.atlas-road-primary,.atlas-contribute-primary,.beta-primary,.daily-primary,
 #atlasModelDownload:not(:disabled),button.primary,a.button.primary,
 .atlas-field-actions button:first-child,.atlas-resume-route button:first-child
) {background:var(--atlas-action)!important;border-color:var(--atlas-action)!important;color:var(--atlas-on-action)!important;box-shadow:var(--atlas-shadow-low);}
html[data-atlas-theme=night] :is(.daily-step-number,.atlas-daily-stop-marker,.atlas-profile-period button[aria-pressed=true]) {background:var(--atlas-action);color:var(--atlas-on-action);}
/* Quiet selection surfaces preserve Atlas blue without turning every choice into a CTA. */
html[data-atlas-theme=night] :is(
 .national-route-profiles button.active,.national-route-alternatives button.active,
 .atlas-top-actions button.active,.atlas-theme-picker button[aria-pressed=true],
 .language-control button.active,.atlas-road-dialog button[aria-pressed=true],#atlasBetaDialog .beta-category[aria-pressed=true],
 .public-map-controls button[aria-pressed=true],.search-nearby-categories button.active
),html[data-theme=night] :is(.tabs [aria-current=page],.place-choice[aria-current=true]) {
 background:var(--atlas-selection);color:var(--atlas-accent);border-color:var(--atlas-accent);box-shadow:inset 0 0 0 1px var(--atlas-accent);
}
html[data-atlas-theme=night] #atlasConsumerNav button[aria-current=page] {background:transparent;color:var(--atlas-accent);border-top-color:var(--atlas-accent);box-shadow:none;}
html[data-atlas-theme=night] :is(.atlas-context-panel>header>button,.atlas-road-dialog header button,#nationalNavigationStop) {background:var(--atlas-raised);color:var(--atlas-secondary);box-shadow:none;}
html[data-atlas-theme=night] :is(.atlas-road-dialog button,.atlas-road-dialog select,.atlas-profile-add,.atlas-field-actions button,.atlas-resume-route button) {border-color:var(--atlas-control-border);}
/* Readable secondary text, including native components that used light-only hex values. */
html[data-atlas-theme=night] :is(
 #atlasPersonalSpace.daily-trip-sheet .daily-stop-place small,
 #atlasPersonalSpace .daily-plan-summary small,#atlasPersonalSpace[data-daily-page=stop-search] label,
 #atlasPersonalSpace.daily-trip-sheet .daily-stop-remove,#atlasPersonalSpace .daily-stop-handle,
 .atlas-field-tools,.atlas-field-tools h3,.daily-muted,.atlas-personal-footnote,
 #atlasPersonalSpace .daily-row small,.transit-step small
) {color:var(--atlas-secondary);opacity:1;}
html[data-theme=night] #transportMain .atlas-network-list small {color:var(--atlas-secondary);opacity:1;}
html[data-atlas-theme=night] :is(.region-preview-details a,#atlasTransitDisclosure summary,.transit-other-choices>summary,.transit-timeline summary) {color:var(--atlas-accent);}
html[data-atlas-theme=night] :is(.atlas-field-tools,.transit-step,.atlas-road-dialog article,.daily-stop,.atlas-menu-section) {border-color:var(--atlas-border);}
html[data-atlas-theme=night] :is(.atlas-sheet-handle::after,#atlasDailySheetHandle::after) {background:var(--atlas-tertiary);}
/* Semantics, rather than hard-coded light warning cards. */
html[data-atlas-theme=night] :is(.national-navigation-alert,.atlas-connection-status,#nationalNavigation .national-navigation-alert,#nationalNavigation .atlas-connection-status) {
 background:var(--atlas-warning-surface);color:var(--atlas-warning);border-color:var(--atlas-warning);box-shadow:var(--atlas-shadow-low);
}
html[data-atlas-theme=night] :is(.national-navigation-alert.error,#nationalNavigation .national-navigation-alert.error) {background:var(--atlas-danger-surface);color:var(--atlas-danger);border-color:var(--atlas-danger);}
html[data-atlas-theme=night] :is(.atlas-profile-error,#nationalNavigationVoice[aria-pressed=false]) {color:var(--atlas-danger)!important;}
html[data-theme=night] :is(.notice,.badge.review) {background:var(--atlas-warning-surface);color:var(--atlas-warning);}
html[data-theme=night] .badge:not(.review) {background:var(--atlas-selection);color:var(--atlas-accent);}
/* Guidance retains its familiar blue identity with a calmer dark hierarchy. */
html[data-atlas-theme=night] #nationalNavigation .atlas-guidance-card {background:var(--atlas-selection);border-color:var(--atlas-border);box-shadow:var(--atlas-shadow-high);color:var(--atlas-text);}
html[data-atlas-theme=night] .atlas-guidance-road {background:var(--atlas-surface);}
html[data-atlas-theme=night] #nationalNavigation :is(.national-navigation-context,#nationalNavigationStatus) {color:var(--atlas-secondary);}
html[data-atlas-theme=night] #nationalNavigation :is(.atlas-trip-bar,.national-navigation-speed,.atlas-navigation-tools button) {background:var(--atlas-surface);color:var(--atlas-text);border-color:var(--atlas-border);box-shadow:var(--atlas-shadow-low);}
html[data-atlas-theme=night] #nationalNavigation .atlas-navigation-tools button[aria-pressed=true] {background:var(--atlas-action);color:var(--atlas-on-action);border-color:var(--atlas-action);}
html[data-atlas-theme=night] #atlasRoadPick {background:var(--atlas-surface);color:var(--atlas-text);border:1px solid var(--atlas-border);box-shadow:var(--atlas-shadow-high);}
html[data-atlas-theme=night] #atlasRoadPick button {background:var(--atlas-action);color:var(--atlas-on-action);}
/* Attribution stays readable, with no white chip against the night map. */
html[data-atlas-theme=night] .maplibregl-ctrl-attrib {background:var(--atlas-surface);color:var(--atlas-secondary);}
html[data-atlas-theme=night] .maplibregl-ctrl-attrib a {color:var(--atlas-secondary);}
html[data-atlas-theme=night] .maplibregl-ctrl-attrib-button {filter:invert(1);}
html[data-atlas-theme=night] :is(.atlas-save-dialog,.atlas-road-dialog,.atlas-contribute-dialog,#atlasBetaDialog,#proPicker)::backdrop {background:var(--atlas-scrim);backdrop-filter:none;}
/* Keyboard/touch feedback: fast colors only, no transform or layout animation. */
:root:is([data-atlas-theme=night],[data-theme=night]) :is(.atlas-theme-picker button,.language-control button,.national-route-profiles button,.atlas-road-dialog button,button.primary,a.button.primary) {transition:background-color 120ms ease-out,border-color 120ms ease-out,color 120ms ease-out;}
:root:is([data-atlas-theme=night],[data-theme=night]) :is(button,a,input,select,textarea,summary):focus-visible {
 outline:2px solid var(--atlas-focus)!important;outline-offset:3px;
}
html[data-atlas-theme=night] .country-view :is(.national-search>div,.national-route-field):focus-within {border-color:var(--atlas-focus);box-shadow:0 0 0 2px var(--atlas-focus);}
html[data-atlas-theme=night] .country-view :is(.national-search input,.national-route-field input):focus-visible {outline:none!important;}
:root:is([data-atlas-theme=night],[data-theme=night]) :is(button,input,select,textarea):disabled {
 opacity:1!important;background:var(--atlas-field)!important;color:var(--atlas-tertiary)!important;border-color:var(--atlas-border)!important;box-shadow:none!important;cursor:not-allowed;
}
@media(hover:hover) and (pointer:fine) {
 :root:is([data-atlas-theme=night],[data-theme=night]) :is(button,a.button,summary):not(:disabled):hover {background-color:var(--atlas-hover);color:var(--atlas-text);}
 :root:is([data-atlas-theme=night],[data-theme=night]) :is(.national-route-submit,.national-navigation-start,.region-route-action,.atlas-save-primary,.atlas-profile-signin,.atlas-road-primary,.atlas-contribute-primary,.beta-primary,.daily-primary,#atlasModelDownload,button.primary,a.button.primary):not(:disabled):hover {background:var(--atlas-action-hover)!important;color:var(--atlas-on-action)!important;}
 :root:is([data-atlas-theme=night],[data-theme=night]) a:not(.button):hover {color:var(--atlas-focus);}
}
:root:is([data-atlas-theme=night],[data-theme=night]) :is(button,a.button):not(:disabled):active {background-color:var(--atlas-pressed);}
:root:is([data-atlas-theme=night],[data-theme=night]) ::selection {background:var(--atlas-selection);color:var(--atlas-text);}
@media(prefers-reduced-motion:reduce) {
 :root:is([data-atlas-theme=night],[data-theme=night]) :is(button,a,input,select,textarea,summary) {transition:none!important;}
}
@media(prefers-contrast:more) {
 :root:is([data-atlas-theme=night],[data-theme=night]) {--atlas-border:var(--atlas-control-border);--atlas-secondary:var(--atlas-text);--atlas-tertiary:var(--atlas-text);}
}
@media(forced-colors:active) {
 :root:is([data-atlas-theme=night],[data-theme=night]) :is(button,a,input,select,textarea,summary):focus-visible {outline-color:Highlight!important;}
}

/* Contribution forms use the same roles despite their historical --cc namespace. */
html[data-atlas-theme=night] .atlas-contribute-dialog {
 --cc-bg:var(--atlas-surface);--cc-ink:var(--atlas-text);--cc-muted:var(--atlas-secondary);--cc-line:var(--atlas-border);--cc-soft:var(--atlas-raised);
}
html[data-atlas-theme=night] :is(.atlas-contribute-dialog input:not([type=checkbox]),.atlas-contribute-dialog select,.atlas-contribute-dialog textarea,#atlasBetaDialog textarea,.pro-card input,.pro-card select,.pro-card textarea) {background:var(--atlas-field);border-color:var(--atlas-control-border);color:var(--atlas-text);}
html[data-atlas-theme=night] :is(.atlas-contribute-dialog header small,.pro-header strong span,.pro-intro .eyebrow,.pro-header a,.pro-card a,.pro-card .secondary) {color:var(--atlas-accent);}
