/* Colour profiles are fixed server-owned styles; the browser only selects a name. */
:root{color-scheme:light}
:root[data-theme=grey] .specs span{color:#5f636b}
:root[data-theme=racing]{color-scheme:dark;--paper:#111214;--ink:#f5f5f5;--muted:#b9b9be;--line:#4a4b50;--white:#202125;--accent:#ff5662;--olive:#a5a8ad;--t-surface:#202125;--t-soft:#292a30;--t-input:#191a1e;--t-button:#bb0713;--t-button-hover:#d6101e;--t-hero:#100c0d;--t-glow:#57141c;--t-error-bg:#3f1c23;--t-error:#ffabb4;--t-success:#83d9a6}
:root[data-theme=day]{color-scheme:light;--paper:#fff;--ink:#22252a;--muted:#585e68;--line:#ccd0d6;--white:#f7f8fa;--accent:#b8000d;--olive:#777e89;--t-surface:#f7f8fa;--t-soft:#eef0f3;--t-input:#fff;--t-button:#b8000d;--t-button-hover:#94000a;--t-hero:#f7f8fa;--t-glow:#fff;--t-error-bg:#fff0f1;--t-error:#a42826;--t-success:#23643a}
:root[data-theme=night]{color-scheme:dark;--paper:#181c22;--ink:#e3e6ec;--muted:#afb8c6;--line:#4a5565;--white:#232a34;--accent:#ffa0a7;--olive:#9ba7b8;--t-surface:#232a34;--t-soft:#2d3541;--t-input:#1c222b;--t-button:#a51f2d;--t-button-hover:#bc2939;--t-hero:#11151b;--t-glow:#303b4a;--t-error-bg:#3c252e;--t-error:#ffaab8;--t-success:#83d9a6}
.preview-tools{display:flex;align-items:center;gap:22px;min-width:0}.theme-picker{display:flex;align-items:center;gap:7px;margin:0;color:#d6d8dc;font-size:11px;font-weight:400;letter-spacing:0;color-scheme:dark}.theme-picker[hidden]{display:none}.theme-picker select{width:126px;min-width:0;min-height:30px;padding:4px 8px;border:1px solid #777d88;border-radius:3px;font-size:11px;background:#292b2f;color:#f5f5f6;line-height:1.4}.theme-picker select:focus-visible{outline:2px solid #fff;outline-offset:3px}
:root:not([data-theme=grey]) :is(.panel,.account-panel,.timeline-card,.profile-card,.create-card){background:var(--t-surface);border-color:var(--line)}
:root:not([data-theme=grey]) :is(input,textarea,select){background:var(--t-input);color:var(--ink);border-color:var(--line)}
:root:not([data-theme=grey]) .theme-picker select{background:#292b2f;color:#f5f5f6;border-color:#777d88}
:root:not([data-theme=grey]) .button{background:var(--t-button);border-color:var(--t-button);color:#fff}
:root:not([data-theme=grey]) .button:hover{background:var(--t-button-hover);border-color:var(--t-button-hover);color:#fff}
:root:not([data-theme=grey]) .button.secondary{background:transparent;border-color:var(--line);color:var(--ink)}
:root:not([data-theme=grey]) .button.secondary:hover{background:var(--t-soft)}
:root:not([data-theme=grey]) .button.pale{background:var(--t-soft);border-color:var(--line);color:var(--ink)}
:root:not([data-theme=grey]) :is(.notice,.specs,.footer,.spec-topics span,.badge,.badge.live){background:var(--t-soft);color:var(--ink)}
:root:not([data-theme=grey]) .notice{border-left-color:var(--line)}
:root:not([data-theme=grey]) .notice.error{background:var(--t-error-bg);color:var(--t-error);border-left-color:var(--t-error)}
:root:not([data-theme=grey]) :is(.danger,[data-valid=false]){color:var(--t-error)}
:root:not([data-theme=grey]) [data-valid=true]{color:var(--t-success)}
:root:not([data-theme=grey]) .specs span{color:var(--muted)}
:root:not([data-theme=grey]) .specs b{color:var(--ink)}
:root:not([data-theme=grey]) :is(.story-image,.timeline-image,.article-cover){background:var(--t-soft)}
:root:not([data-theme=grey]) .image-tag{background:var(--t-surface);color:var(--ink)}
:root:not([data-theme=grey]) .image-placeholder{background:linear-gradient(135deg,var(--t-soft),var(--t-surface));color:var(--muted)}
:root:not([data-theme=grey]) :is(.hero,.history-band){background:var(--t-hero);color:#f5f5f6}
:root:not([data-theme=grey]) .hero-visual{background:radial-gradient(ellipse at 55% 42%,var(--t-glow),var(--t-hero) 70%)}
:root:not([data-theme=grey]) :is(.hero p,.history-band p){color:#d0d2d7}
:root:not([data-theme=grey]) .hero-coordinate{color:#b7bdc7}
:root:not([data-theme=grey]) .hero h1 em{color:#ffb0b7}
:root:not([data-theme=grey]) .history-band .button.secondary{color:#f5f5f6;border-color:#9299a5}
:root:not([data-theme=grey]) .history-band .button.secondary:hover{background:#363a42}
/* Day profile keeps the home hero and history band light as well. */
:root[data-theme=day] :is(.hero,.history-band){color:var(--ink)}
:root[data-theme=day] :is(.hero p,.hero-coordinate,.history-band p){color:var(--muted)}
:root[data-theme=day] :is(.hero h1 em,.hero .eyebrow,.history-band .eyebrow){color:var(--accent)}
:root[data-theme=day] .hero-stamp{color:var(--ink)}
:root[data-theme=day] .history-band .button.secondary{color:var(--ink);border-color:var(--line)}
:root[data-theme=day] .history-band .button.secondary:hover{background:var(--t-soft)}
:root:not([data-theme=grey]) .timeline-copy p{color:var(--muted)}
:root:not([data-theme=grey]) .timeline-date>span:last-child{color:var(--ink)}
:root:not([data-theme=grey]) .timeline::before{background:var(--line)}
:root:not([data-theme=grey]) .timeline-milestone::before{box-shadow:0 0 0 1px var(--line)}
:root:not([data-theme=grey]) :is(.timeline-nav a,.about-jumps a){background:var(--t-surface);border-color:var(--line)}
:root:not([data-theme=grey]) .year-nav a[aria-current]{background:var(--t-button);color:#fff}
:root:not([data-theme=grey]) :is(.password-advice,.password-match){color:var(--muted)}
:root:not([data-theme=grey]) .password-match[data-valid=false]{color:var(--t-error)}
:root:not([data-theme=grey]) .password-match[data-valid=true]{color:var(--t-success)}
:root:not([data-theme=grey]) .password-meter{background:var(--t-soft)}
@media(min-width:1100px){:root:not([data-theme=grey])[data-navigation=left] .main-nav{background:var(--t-soft);border-color:var(--line);border-top-color:var(--accent)}:root:not([data-theme=grey])[data-navigation=left] .main-nav a[aria-current]{background:var(--t-surface);color:var(--accent)}}
@media(max-width:650px){.preview-tools{gap:8px}.theme-picker>span{display:none}.theme-picker select{width:116px;font-size:10px}.preview-bar .container{gap:8px}}
