/* Palette surfaces shared by pages that predate Color Studio. Layout stays page-owned. */
html[data-palette-mode]{background:var(--paper);color:var(--ink);--palette-soft:color-mix(in srgb,var(--accent) 8%,var(--surface));--palette-danger:var(--status-danger);--palette-danger-bg:var(--status-danger-bg);--palette-success:var(--status-success);--palette-success-bg:var(--status-success-bg)}
html[data-palette-mode] body{background:var(--paper);color:var(--ink)}
html[data-palette-mode] body :is(.primary-link,.button.primary,.btn.primary,.ws-button.primary,.ent-button.primary){background:var(--accent);border-color:var(--accent);color:var(--on-accent)}
html[data-palette-mode] body :is(.button.primary,.ws-button.primary,.ent-button.primary):hover{background:var(--accent);color:var(--on-accent);filter:none}
html[data-palette-mode] body :is(.billing-header,.setup-header,.workspace-nav,.ent-topbar,.auth-topbar,.notification-nav,.android-install-header){background:var(--surface);color:var(--ink);border-color:var(--line)}
html[data-palette-mode] body :is(.ent-card,.ws-enterprise,.profession-card,.kpi,.editor-bar,.search-entry,.scope,.stop-card,.composer,.command-dialog,.android-install-page .panel){background:var(--surface);color:var(--ink);border-color:var(--line)}
html[data-palette-mode] body :is(.inner-cta,.setup-note,.reassurance,.setup-steps li,.ws-company-icon,.profession-symbol,.ent-company,.ent-chain span,.ent-intro,.workspace-assignment,.editor-guidance,.guide-preview-card){background:var(--palette-soft);color:var(--ink);border-color:var(--line)}
html[data-palette-mode] body :is(.inner-footer,.android-install-footer,.ws-footer,.setup-layout small,.ws-meta,.ws-header-label,.billing-page small){color:var(--muted);border-color:var(--line)}
html[data-palette-mode] body :is(.ws-eyebrow,.ent-eyebrow,.ent-badge,.setup-layout aside nav b){color:var(--accent)}
html[data-palette-mode] body :is(.ws-button,.ent-button,.android-install-page .button){background:var(--surface);color:var(--ink);border-color:var(--line)}
html[data-palette-mode] body :is(.ws-button,.ent-button):hover{background:var(--palette-soft);color:var(--ink)}
html[data-palette-mode] body :is(.profession-card.selected,.theme-options input:checked+.theme-swatch,.avatar-options input:checked+img){border-color:var(--accent)}
html[data-palette-mode] body :is(.setup-layout aside nav a.selected,.search-entry[aria-current=true]){background:var(--palette-soft);color:var(--accent);border-color:var(--accent)}
/* Authentication uses the same content palette, including feedback and validation. */
html[data-palette-mode] .auth-card :is(.form-error,.field-error,.caps-warning){color:var(--palette-danger)}
html[data-palette-mode] .auth-card .form-error{background:var(--palette-danger-bg);border-color:color-mix(in srgb,var(--palette-danger) 35%,var(--surface))}
html[data-palette-mode] .auth-card [aria-invalid=true]{border-color:var(--palette-danger)}
html[data-palette-mode] .auth-notice{background:var(--palette-success-bg);color:var(--palette-success);border-color:color-mix(in srgb,var(--palette-success) 35%,var(--surface))}
html[data-palette-mode] body :is(.auth-progress .active,.delivery-help,.auth-card .setup-note){background:var(--palette-soft);color:var(--ink);border-color:var(--line)}
/* Guided planning and saved searches have deliberately separate editing surfaces. */
html[data-palette-mode] body:is(.xr-page-planner,.xr-page-searches) :is(header,.rail,.search-area-controls,.route-workflow-nav,#plan-panel,.search-editor){background:var(--surface);color:var(--ink);border-color:var(--line)}
html[data-palette-mode] body:is(.xr-page-planner,.xr-page-searches) :is(button,.button,.upload,.route-workflow-nav a,.route-next-links a,.exports a){background:var(--surface);color:var(--ink);border-color:var(--line)}
html[data-palette-mode] body:is(.xr-page-planner,.xr-page-searches) :is(button,.button,.upload):hover{background:var(--palette-soft);color:var(--ink)}
html[data-palette-mode] body:is(.xr-page-planner,.xr-page-searches) :is(.primary,#send,.proposal button){background:var(--accent);color:var(--on-accent);border-color:var(--accent)}
html[data-palette-mode] body:is(.xr-page-planner,.xr-page-searches) :is(.message.user,.proposal,.saved-profile,.merge-box,.bulk-box,.source-options,.route-readiness,#home-search-context,.message-body pre,.message-body code,.results-table th,.review-note,#draft-count){background:var(--palette-soft);color:var(--ink);border-color:var(--line)}
html[data-palette-mode] body:is(.xr-page-planner,.xr-page-searches) :is(p,small,.fine,.field,.subtle,.research,.empty,.rail-caption,.message .speaker,.stop-card label,.stop-card details,.saved p,.results-table th,.message-body blockquote){color:var(--muted)}
html[data-palette-mode] body:is(.xr-page-planner,.xr-page-searches) :is(.eyebrow,.spark,.follow,.source,.result-number,.saved-stop a,header strong span,.detail-row summary){color:var(--accent)}
html[data-palette-mode] body:is(.xr-page-planner,.xr-page-searches) :is(input,select,textarea,.field input,.field select,.home-fields input:read-only,.home-fields textarea:read-only,.results-table input:read-only,.results-table textarea:read-only){background:var(--surface);color:var(--ink);border-color:var(--line)}
html[data-palette-mode] .xr-page-planner #route-action-footer{background:var(--surface);border-color:var(--line)}
html[data-palette-mode] .xr-page-planner :is(.search-completion,#route-action-status){background:var(--palette-success-bg);color:var(--palette-success);border-color:var(--line)}
html[data-palette-mode] .xr-page-planner .search-completion :is(small,.completion-step){color:var(--palette-success)}
html[data-palette-mode] body:is(.xr-page-planner,.xr-page-searches) :is(.error,#notice.error,#sources-error,#location-error){color:var(--palette-danger)}
/* Admin and company pages preserve their permissions and semantic status colors. */
html[data-palette-mode] .enterprise-app{--ent-border:var(--line);--ent-muted:var(--muted);--ent-accent:var(--accent)!important;background:var(--paper)!important;color:var(--ink)}
html[data-palette-mode] .enterprise-app :is(.ent-panel,.ent-stat,.ent-toolbar input){background:var(--surface);color:var(--ink);border-color:var(--line)}
html[data-palette-mode] .enterprise-app :is(.ent-workspace,.ent-activity,.ent-permissions td){border-color:var(--line)}
html[data-palette-mode] .enterprise-app :is(#enterprise-dialog,.ent-field input,.ent-field select){background:var(--surface);color:var(--ink);border-color:var(--line)}
html[data-palette-mode] .enterprise-app .ent-table th{background:var(--palette-soft);color:var(--muted)}
html[data-palette-mode] .studio-site :is(.panel,.button,.kpi,.editor-bar,.chart-empty strong,.chart-empty p,.studio-account-footer){background:var(--surface);color:var(--ink);border-color:var(--line)}
html[data-palette-mode] .studio-site .button.primary,html[data-palette-mode] .studio-site .button.primary:hover{background:var(--accent);color:var(--on-accent);border-color:var(--accent)}
html[data-palette-mode] .studio-site :is(.studio-brand,.studio-breadcrumb strong,.report-toolbar strong,.command-trigger,.studio-logout){color:var(--ink)}
html[data-palette-mode] .studio-site :is(.studio-context,.command-trigger,.studio-badge,.task-icon,.role-badge,.studio-logout,.repeat-tools button){background:var(--palette-soft);color:var(--ink);border-color:var(--line)}
html[data-palette-mode] .studio-site :is(.studio-breadcrumb,.studio-footer,.studio-footer a,.report-toolbar>div,.kpi span,.kpi small,.kpi>b,.chart-axis,.chart-legend,.chart-data,.task-list small,.task-list b,td small,.table-empty,.table-footer,.directory-count,.page-editor-grid form small,.search-url,.editor-guidance span,.command-dialog>small){color:var(--muted)}
html[data-palette-mode] .studio-site :is(.eyebrow,.kpi svg,.text-link){color:var(--accent)}
html[data-palette-mode] .studio-site :is(th,tbody tr:hover){background:var(--palette-soft);color:var(--muted)}
html[data-palette-mode] .studio-site td{border-color:var(--line)}
html[data-palette-mode] .studio-site :is(input,textarea,select,input[readonly]){background:var(--surface);color:var(--ink);border-color:var(--line)}
/* Download/install pages share the page palette without recoloring release status indicators. */
html[data-palette-mode] body:is(.android-install-page,.studio-site) :is(.android-steps strong,.android-install-page a){color:var(--ink)}
html[data-palette-mode] body :is(.android-console p,.android-install-page p,.android-facts dt,.android-technical dt,.android-details summary>span,.usb-controls>span,.usb-progress li,.usb-timeline){color:var(--muted)}
html[data-palette-mode] body :is(.android-tag,.android-steps li>b,.usb-release-choice,.usb-code,.usb-live,.usb-progress b,.usb-copy-status){background:var(--palette-soft);color:var(--ink);border-color:var(--line)}
html[data-palette-mode] .android-install-page .button.primary{background:var(--accent);color:var(--on-accent);border-color:var(--accent)}
html[data-palette-mode] .android-help{background:var(--surface)!important}
/* Mixed palettes apply dark navigation locally; forms always retain the content palette. */
html[data-palette-mode=combined] body :is(.ent-topbar,.setup-header,.billing-header,.workspace-nav,.notification-nav){--surface:var(--palette-nav-surface);--card:var(--palette-nav-surface);--palette-soft:var(--palette-nav-soft);--control-line:var(--palette-nav-control-line);--paper:var(--palette-nav-surface);--ink:var(--palette-nav-ink);--muted:var(--palette-nav-muted);--accent:var(--palette-nav-accent);--green:var(--palette-nav-accent);--on-accent:var(--palette-nav-on-accent);--line:var(--palette-nav-line);background:var(--surface);color:var(--ink);color-scheme:dark}

/* Legacy panels use the effective palette rather than fixed white or faded text. */
html[data-palette-mode] body :is(.tag.amber){background:var(--status-attention-bg);color:var(--status-attention)}
html[data-palette-mode] body :is(.tag.outline){background:var(--surface);color:var(--muted)}
html[data-palette-mode] body :is(.drive,.route-toolbar small){background:var(--surface);color:var(--muted)}
html[data-palette-mode] body .stop-number{background:var(--palette-soft);color:var(--accent)}
html[data-palette-mode] body.xr-page-planner :is(#home-search-context small,#chat-status,#welcome p){color:var(--muted)}
html[data-palette-mode] body.xr-page-planner .xr-secondary-navigation>:is(a,button){background:var(--surface);color:var(--ink);border-color:var(--control-line)}
html[data-palette-mode] body.xr-page-planner .xr-secondary-navigation>#new-chat{background:var(--palette-soft);color:var(--accent);border-color:var(--control-line)}
html[data-palette-mode] body.xr-page-searches #detail>.empty{background:var(--surface);color:var(--ink);border-color:var(--line)}
html[data-palette-mode] body .billing-shell :is(.plan,.steps b,.setup-steps li>span){background:var(--surface);color:var(--ink);border-color:var(--line)}
html[data-palette-mode] body .billing-shell .plan .included{background:var(--status-success-bg);color:var(--status-success)}
html[data-palette-mode] body .billing-shell .setup-steps .complete>span{background:var(--accent);color:var(--on-accent)}
html[data-palette-mode] body.workspace-choice p{color:var(--muted)}
html[data-palette-mode] body .ent-topbar small{color:var(--muted)}
html[data-palette-mode] body .skip-link{background:var(--surface);color:var(--ink)}
html[data-palette-mode] body.studio-site kbd{background:var(--palette-soft);color:var(--muted);opacity:1}
html[data-palette-mode] body :is(.pill.accent,.welcome-panel,.empty-icon){background:var(--palette-soft);color:var(--ink)}
html[data-palette-mode] body .welcome-panel :is(.eyebrow,h2,p){color:var(--ink)}
html[data-palette-mode] body .map-message{background:var(--surface);color:var(--muted)}
html[data-palette-mode] body .map-message strong{color:var(--ink)}
html[data-palette-mode] body :is(.day-intro-label,.day-art-note,.profession-caption,#day-description,.day-phase-tabs button,.day-slide-strip button>span,.day-slide-strip small){opacity:1}
html[data-palette-mode] body :is(.day-intro-label,.day-art-note,.profession-caption,#day-description){color:var(--muted)}
html[data-palette-mode] body .day-slide-strip button[aria-pressed=true]{background:var(--palette-soft)}
html[data-palette-mode] body .final-invitation .primary-link{background:var(--highlight);color:var(--on-highlight);border-color:var(--highlight)}

html[data-palette-mode] body .phone-art>a{background:var(--accent);color:var(--on-accent)}
html[data-palette-mode] body .phone-route i{background:var(--palette-soft);color:var(--accent)}
html[data-palette-mode] body .together-section{background:var(--palette-soft)}
html[data-palette-mode] body .final-invitation{background:var(--ink);color:var(--paper)}
html[data-palette-mode] body .final-invitation :is(.overline,em){color:var(--paper)}

html[data-palette-mode] body .client-danger{color:var(--status-danger)}
html[data-palette-mode] body .notice{background:var(--status-attention-bg);color:var(--status-attention)}
html[data-palette-mode] body[data-palette] :is(.chat-person,.chat-bubble.outgoing){background:var(--palette-soft);color:var(--ink)}
html[data-palette-mode] body .chat-person small{color:var(--muted)}
html[data-palette-mode] body .setup-layout .text-link{color:var(--accent)}
html[data-palette-mode] body .setup-wizard-actions>span{color:var(--muted)}
html[data-palette-mode] body .setup-layout .studio-badge{background:var(--palette-soft);color:var(--ink)}

html[data-palette-mode] body .android-skip{background:var(--surface);color:var(--ink)}
html[data-palette-mode] body.android-install-page .eyebrow{color:var(--accent)}
html[data-palette-mode] body .filter-group button[aria-pressed=true]{background:var(--palette-soft);color:var(--accent)}
html[data-palette-mode] body .profession-card p{color:var(--muted);opacity:1}
html[data-palette-mode] body .profession-availability{background:var(--status-success-bg);color:var(--status-success)}

html[data-palette-mode] body .measurement-note{color:var(--muted)}
html[data-palette-mode] body #billing-setup-count{background:var(--palette-soft);color:var(--ink)}

html[data-palette-mode=dark] body.public-site[data-palette-dark=true] .final-invitation :is(.overline,em){color:var(--accent)}

/* Analytics keeps its chart semantics while sharing readable form and card colors. */
html[data-palette-mode] body .website-analytics{--wa-muted:var(--muted);--wa-ink:var(--ink);--wa-accent:var(--accent);--wa-line:var(--line)}
html[data-palette-mode] body .website-analytics :is(.wa-kpi,.wa-no-data,.wa-pagination button,.wa-metric-switch button[aria-pressed=true]){background:var(--surface);color:var(--ink)}
html[data-palette-mode] body .website-analytics :is(.wa-presets a:hover,.wa-presets a.is-active,.wa-change,.wa-metric-switch,.wa-insights,.wa-event-badge){background:var(--palette-soft);color:var(--muted)}
html[data-palette-mode] body .website-analytics :is(.wa-insights strong,.wa-metric-switch button){color:var(--ink)}
html[data-palette-mode] body .website-analytics :is(.wa-change.is-up,.wa-event-badge.is-goal){background:var(--status-success-bg);color:var(--status-success)}
/* These two legacy analytics backgrounds were declared important in their page stylesheet. */
html[data-palette-mode] body .website-analytics .wa-privacy-card{background:var(--surface)!important}
html[data-palette-mode] body .website-analytics .wa-filters :is(input,select){background:var(--surface)!important;color:var(--ink)}
html[data-palette-mode] body .website-analytics .wa-retention-warning{background:var(--status-attention-bg);color:var(--status-attention)!important}
html[data-palette-mode] body .status-pill{background:var(--palette-soft);color:var(--muted)}

/* Older admin notes forced a dim literal color with important. */
html[data-palette-mode] body.studio-site .measurement-note{color:var(--muted)!important}

/* The landing illustration uses the same verified surfaces beneath its road pattern. */
html[data-palette-mode] body .journey-art{background-color:var(--palette-soft);background-image:linear-gradient(22deg,transparent 49%,var(--surface) 50%,transparent 51%),repeating-linear-gradient(105deg,transparent 0 60px,var(--surface) 62px 68px,transparent 70px 130px),repeating-linear-gradient(12deg,transparent 0 55px,var(--surface) 57px 63px,transparent 65px 130px)}
html[data-palette-mode] body :is(.district,.art-foot){color:var(--muted)}
html[data-palette-mode] body .art-pin{background:var(--accent);color:var(--on-accent);border-color:var(--surface)}

html[data-palette-mode] body.xr-page-planner .schedule-warning{background:var(--status-attention-bg);color:var(--status-attention);border-color:var(--status-attention)}
html[data-palette-mode] body.xr-page-planner .schedule-warning p{color:var(--muted)}
/* Availability labels stay readable; disabled actions keep their existing guards. */
html[data-palette-mode] body.public-site :is(.profession-card.is-unavailable,.profession-detail-unavailable,.day-pair-tabs [data-unavailable=true],.day-slide-strip [data-unavailable=true],.profession-links [aria-disabled=true]){background:var(--palette-soft);color:var(--ink);filter:none}
html[data-palette-mode] body.public-site .profession-card.is-unavailable :is(.profession-symbol,.profession-availability){background:var(--palette-soft);color:var(--ink)}
html[data-palette-mode] body.public-site .primary-link:is(:disabled,[aria-disabled=true]){background:var(--palette-soft);color:var(--muted);filter:none}
