/* Shared appearance. Photographs, flags, logos, maps and charts retain their colours. */
.theme-picker{display:flex;align-items:center;gap:7px;margin-left:14px;flex-shrink:0;color:var(--ink);font:700 12px/1.4 Arial,sans-serif}
.theme-picker>span:first-child{font-size:22px;line-height:1}
.theme-picker-label{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
header .theme-picker select{width:auto;min-width:0;max-width:185px;height:36px;padding:6px 24px 6px 9px;font:700 12px/1.4 Arial,sans-serif;border-radius:4px;border:1px solid var(--line);background:var(--panel);color:var(--ink);cursor:pointer}
header:has(.theme-picker){height:auto;min-height:90px;flex-wrap:wrap;row-gap:10px;padding-top:12px;padding-bottom:12px}
html[data-theme=dark],html[data-theme=dark] body{color-scheme:dark;--bg:#111318!important;--panel:#1b1e26!important;--ink:#f0f2f6!important;--muted:#b4bdcb!important;--line:#3a414d!important;--lime:#ff6871!important;--amber:#f1c476!important;--red:#ff7781!important;background:var(--bg)!important;color:var(--ink)!important}
html[data-theme=dark] body header{background:#191c23!important;border-bottom-color:var(--line)!important}
html[data-theme=dark] body :is(.card,.event-switch,.gt-category-picker,.gt-season-panel,.f1-story-grid article,.f1-history-program>div,.dakar-stage-metrics,.dakar-route-stats,.dakar-stage-detail,.baja-map-info,.dubai-results-empty,.south-africa-results-state,.gt-season-empty,.wec-empty){background:var(--panel)!important;color:var(--ink)!important;border-color:var(--line)!important}
html[data-theme=dark] body :is(h2,h3,h4,.driver-button,.gt-season-shortcuts strong,.gt-season-competitor strong,.f1-story-open,.f1-performance-panel strong){color:var(--ink)!important}
html[data-theme=dark] body :is(.muted,.small,.domain,.edition,.table-foot,.number,.sources,.source-links,.trend-row span,.driver-button small,.gt-season-meta,.gt-season-note,.gt-season-source,.gt-season-competitor span,.wec-class-note,.f1-analysis-source,.f1-driver-info small,.f1-performance-table td small,.f1-session-story-group>p,.venue-weather-note,.venue-weather-model,.venue-weather-updated){color:var(--muted)!important}
html[data-theme=dark] body :is(a,.text-button,.plain-link,.source-links a){color:#ff8890}
html[data-theme=dark] body :is(.main-nav,.dakar-nav-dropdown>div){background:#16191f!important;color:var(--ink)!important}
html[data-theme=dark] body .main-nav :is(a,summary){color:#d2d7df!important}
html[data-theme=dark] body .main-nav a[aria-current]{color:#fff!important}
html[data-theme=dark] body :is(input,select,textarea){background:#242833!important;color:var(--ink)!important;border-color:#505968!important}
html[data-theme=dark] body :is(button,.outline,.formula-series-nav a,.dakar-year-nav a,.dakar-category-nav a,.dakar-map-stages a,.language-picker){background-color:#242833!important;color:var(--ink)!important;border-color:#505968!important}
html[data-theme=dark] body :is(button[aria-pressed=true],button[aria-selected=true],button.active,.outline.active,.event-switch .active,.formula-series-nav a[aria-current],.dakar-year-nav a[aria-current],.dakar-category-nav a[aria-current],.dakar-map-stages a[aria-current]){background:#bf1832!important;color:#fff!important;border-color:#ee5266!important}
html[data-theme=dark] body :is(button:hover,.outline:hover,.formula-series-nav a:hover){background-color:#343b49!important}
html[data-theme=dark] body :is(button:focus-visible,a:focus-visible,select:focus-visible,input:focus-visible,summary:focus-visible){outline:3px solid #ff9aa2!important;outline-offset:3px}
html[data-theme=dark] body :is(.section-head,.trend-row,footer,.category-list>a,.category-list>div,.event-cards a,.detail-stats>div,.f1-performance-panel){border-color:var(--line)!important}
html[data-theme=dark] body th{background:#282d38!important;color:#d8dfe9!important;border-color:#505968!important}
html[data-theme=dark] body tbody tr{background:#1b1e26!important}
html[data-theme=dark] body tbody tr:nth-child(even){background:#222630!important}
html[data-theme=dark] body tbody tr:hover{background:#303746!important}
html[data-theme=dark] body td{color:#f0f2f6!important;border-color:#3a414d!important}
html[data-theme=dark] body td small{color:#b4bdcb!important}
html[data-theme=dark] body tr.selected{background:#353342!important}
html[data-theme=dark] body .f1-name-line.f1-team-colored strong{color:color-mix(in srgb,var(--team-color) 65%,white)!important}
html[data-theme=dark] body :is(.notice,.note,.wec-notice,.gt-season-note){background:#302b21!important;color:#f1d7a4!important;border-color:#9c773a!important}
html[data-theme=dark] body :is(.badge,.f1-q-tyre,.f1-execution-gap){background:#2b303b!important;color:#d8dfe9!important;border-color:#505968!important}
html[data-theme=dark] body :is(.positive,.chance-down,.position-down){color:#ff8e98!important}
html[data-theme=dark] body :is(.negative,.chance-up,.position-up){color:#6be3b1!important}
html[data-theme=dark] body :is(.f1-story-dialog,.venue-weather-dialog,.wec-map-dialog,dialog){background:#1b1e26!important;color:var(--ink)!important;border-color:var(--line)!important}
html[data-theme=dark] body :is(.venue-weather,.venue-weather h2,.venue-weather-metric strong){color:var(--ink)!important}
html[data-theme=dark] body :is(.venue-weather-metric,.venue-weather-dialog-top,.current-event-grid>article>.venue-weather){background:#222630!important;color:var(--ink)!important;border-color:#414a58!important}
html[data-theme=dark] body .venue-weather-frame{border-color:#414a58!important}
html[data-theme=dark] body :is(.f1-story-open:hover,.category-list>a:hover,.sport-card:hover){background:#2b313e!important}
html[data-theme=dark] body :is(.track-map,.wec-map-button){background:#fff!important}
html[data-theme=dark] body :is(.f1-weekend-head,.wec-weekend-head,.race-event-heading,.current-event-panel,.qatar-detail-heading,.dakar-detail-heading) :is(h1,h2,h3,p){color:#f0f2f6!important}
html[data-theme=dark] body .table-scroll{scrollbar-color:#657083 #20242d}
html[data-theme=dark] body :is(.f1-prediction-section>p,.section-head>span){color:#b4bdcb!important}
html[data-theme=dark] body :is(.wec-stats dt,.wec-stats small,.wec-source,.wec-next-time small,.wec-class-filters legend,.wec-team>span,.wec-grade,.gt-category-picker>p){color:#b4bdcb!important}
html[data-theme=dark] body .wec-next .eyebrow{color:#ff8890!important}
html[data-theme=dark] body :is(.map-name,.leaflet-control-attribution,.leaflet-control-scale-line){color:#20242d!important}
@media(max-width:1100px){header .header-right{flex:1;justify-content:flex-end}header .header-right .edition{display:none}.theme-picker{margin-left:8px}}
@media(max-width:650px){header:has(.theme-picker){gap:10px;padding-bottom:12px}header .theme-picker{margin-left:0}.theme-picker>span:first-child{font-size:20px}header .theme-picker select{max-width:165px;font-size:11px}header .header-right{flex-basis:100%;order:5;justify-content:flex-start}header .language-picker{margin-left:auto}}
