/* Live Archive v1.3.0 — palette + WCAG 2.2 AA contrast remediation.
   Loaded LAST on every page to cover previously hard-coded component colours.
   Body text, links, labels and controls target >=4.5:1; focus/visual boundaries >=3:1. */
:root{--ui-action-bg:#d8ff58;--ui-action-ink:#101510;--ui-danger:#ffb0b0}
html[data-theme="nightlife"]{--ui-action-bg:#d58aff;--ui-action-ink:#180b25;--ui-danger:#ffb2c5}
html[data-theme="signal"]{--acid:#a02f1c;--ui-action-bg:#a02f1c;--ui-action-ink:#fffefa;--ui-danger:#a02f1c}
html[data-theme="hifi"]{--ui-action-bg:#ffc76e;--ui-action-ink:#24170f;--ui-danger:#ffc6ad}
html[data-theme="retro"]{--muted:#67523d;--acid:#9d321f;--ui-action-bg:#9d321f;--ui-action-ink:#fff9ed;--ui-danger:#9d321f}
/* All site navigation, list headings, metadata, interactive controls. */
html[data-theme] :is(nav a,.top nav a,.brand,.eyebrow,.date,.count,.year-hero-dot,.year-detail-stats b,.year-summary b,.record-card .rating,.stat b,.artist-letter-section h2,.festival-tag,.festival-sort-toolbar label,.related-kicker,.related-heading>span,.related-timeline-copy time,.related-view-all){color:var(--acid)}
html[data-theme] nav a:not(.active){color:var(--muted)}
html[data-theme] nav a:hover,html[data-theme] nav a:focus-visible{color:var(--acid)}
html[data-theme] :is(.panel,.admin-panel,.record-card,.record-facts,.gig,.stat,.year-detail-stats>div,.festival-editor,.festival-backup,.festival-choice,.festival-bulk,.admin-import-row,.admin-media-item){color:var(--ink);border-color:var(--line)}
html[data-theme] :is(.muted,.intro,.results-label,.year-note,.record-card small,.gig p,.admin-help,.admin-media-item p,.related-empty,.related-record-copy small,.related-timeline-copy small,.stat small,.tag,.badge,.pill){color:var(--muted)}
html[data-theme] :is(input,textarea,select,.toolbar input,.toolbar select,.admin-field input,.admin-field select,.admin-field textarea,.festival-bulk textarea,.setlist-edit-row input,.festival-sort-toolbar select){background:var(--panel2);color:var(--ink);border:1px solid var(--line)}
html[data-theme] :is(input,textarea)::placeholder{color:var(--muted);opacity:1}
html[data-theme] :is(select option){background:var(--panel);color:var(--ink)}
html[data-theme] :is(.admin-tabs button:not(.active),.admin-media-item button,.theme-preview-btn,.theme-action-bar button:not(.btn),.setlist-icon,.festival-choice){background:var(--panel2);color:var(--ink);border-color:var(--line)}
html[data-theme] :is(.btn,.admin-tabs button.active,.theme-action-bar .btn,.related-feature-cta,.related-footer,.festival-save-toast:not([hidden])){background:var(--ui-action-bg);color:var(--ui-action-ink)!important;border-color:var(--ui-action-bg)}
html[data-theme] .btn:hover{background:var(--ui-action-bg);color:var(--ui-action-ink)!important;filter:brightness(1.05)}
html[data-theme] :is(.admin-status.error,.festival-save-feedback.error,.cancelled-tag,.cancelled-callout){color:var(--ui-danger)}
html[data-theme] :is(.setlist-display li::marker,.setlist-icon,.setlist-edit-row button,.media-badges,.media-tags,.artist-link:hover,.artist-link:focus-visible){color:var(--acid)}
html[data-theme] :is(.setlist-display small,.artist-record small){color:var(--muted)}
html[data-theme] .artist-record-cover{background:var(--panel2);border-color:var(--line)}
html[data-theme] .artist-alphabet{background:var(--panel);border-color:var(--line)}
html[data-theme] .artist-alphabet a{background:var(--panel2);color:var(--acid)}
html[data-theme] .artist-alphabet a:hover,html[data-theme] .artist-alphabet a:focus-visible{background:var(--ui-action-bg);color:var(--ui-action-ink)}
html[data-theme] .festival-choice.chosen{background:var(--panel2);border-color:var(--acid)}
html[data-theme] .festival-bulk{background:var(--panel);border-color:var(--line)}
html[data-theme] .david-tag{background:var(--panel2);border-color:var(--acid);color:var(--acid)}
html[data-theme] .david-callout{background:var(--panel2);border-color:var(--acid);color:var(--ink)}
html[data-theme] .festival-save-toast:not([hidden]){box-shadow:0 8px 35px #0008}
/* Year cards need the correct ink on dark and light theme-specific surfaces.
   Earlier hover rules forced dark text even on purple and walnut tiles. */
html[data-theme="nightlife"] :is(.year-tile,.year-tile:hover,.year-tile:focus-visible),
html[data-theme="hifi"] :is(.year-tile,.year-tile:hover,.year-tile:focus-visible){color:#fff8ef}
html[data-theme="signal"] :is(.year-tile,.year-tile:hover,.year-tile:focus-visible),
html[data-theme="retro"] :is(.year-tile,.year-tile:hover,.year-tile:focus-visible){color:#20150e}
html[data-theme]:not([data-theme="original"]) :is(.year-tile .year-tile-top,.year-tile .year-tile-bottom,.year-tile .year-number,.year-tile .year-metrics,.year-tile .year-metrics b,.year-tile .year-metrics small){color:inherit}
html[data-theme="nightlife"] .year-tile{background:linear-gradient(145deg,var(--tile),#100c21)}
html[data-theme="hifi"] .year-tile{background:linear-gradient(145deg,var(--tile),#241c16)}
html[data-theme="signal"] .year-tile{background:var(--tile)}
html[data-theme="retro"] .year-tile{background:var(--tile)}
html[data-theme]:not([data-theme="original"]) .year-tile :is(.year-metrics,.year-tile-bottom){border-color:currentColor}
/* Artist discovery rail: remove original-theme green from placeholder and cover captions. */
html[data-theme]:not([data-theme="original"]) .related-feature{background:var(--panel2)}
html[data-theme]:not([data-theme="original"]) .related-cover-placeholder{background:var(--panel2);color:var(--acid)}
html[data-theme]:not([data-theme="original"]) .related-cover-placeholder b{color:var(--acid)}
html[data-theme]:not([data-theme="original"]) .related-feature-cover>span{background:var(--panel);color:var(--ink)}
html[data-theme]:not([data-theme="original"]) .related-feature-overlay{background:linear-gradient(180deg,transparent 0%,var(--panel) 75%,var(--panel) 100%)}
html[data-theme]:not([data-theme="original"]) .related-feature-overlay h2{color:var(--ink)}
html[data-theme]:not([data-theme="original"]) .related-feature-overlay>span{color:var(--acid)}
html[data-theme="hifi"] .related-feature{background:linear-gradient(145deg,#453522,#241d18)}
html[data-theme="hifi"] .related-feature-overlay{background:linear-gradient(180deg,transparent,#241b16 72%,#241b16)}
html[data-theme="hifi"] .related-feature-overlay h2{color:#fff0d4}
html[data-theme="nightlife"] .related-feature-overlay{background:linear-gradient(180deg,transparent,#120b21 72%,#120b21)}
html[data-theme="nightlife"] .related-feature-overlay h2{color:#fff}
html[data-theme="signal"] .related-feature-overlay{background:linear-gradient(180deg,transparent,#fffefa 68%,#fffefa)}
html[data-theme="retro"] .related-feature-overlay{background:linear-gradient(180deg,transparent,#fff4d9 68%,#fff4d9)}
/* Cover edit affordance and modal must not become illegible on light themes. */
html[data-theme] :is(.cover-quick-action,.quick-edit-trigger){color:var(--ink);border-color:var(--line)}
/* Visible focus indicators for keyboard users; don't rely on hue alone. */
html[data-theme] :is(a,button,input,textarea,select,[role="button"],[tabindex]):focus-visible{outline:3px solid var(--acid)!important;outline-offset:3px!important}
html[data-theme="signal"] :is(a,button,input,textarea,select,[role="button"],[tabindex]):focus-visible,
html[data-theme="retro"] :is(a,button,input,textarea,select,[role="button"],[tabindex]):focus-visible{outline-color:var(--acid)!important}
@media(prefers-reduced-motion:reduce){html[data-theme] :is(.year-tile,.gig,.record-card,.btn,.related-feature-cta){transition:none!important;animation:none!important}}
