/* Light mode is a reading palette, including the hero and image captions.
   Artwork itself is never inverted or filtered. Keep dark-mode rules in main.css. */
html[data-theme="light"] {
    color-scheme: light;
    --void: #FAF8F2;
    --void-light: #F1ECDF;
    --void-surface: #FFFFFF;
    --void-rgb: 250, 248, 242;
    --bone: #252A30;
    --bone-dim: #51565C;
    --gold: #715010;
    --gold-dim: #715010;
    --gold-bright: #563A08;
    --gold-rgb: 113, 80, 16;
    --gold-glow: transparent;
    --void-border: #867D6A;
    --surface-tint: rgba(37, 42, 48, .035);
}
/* Remove the old hard-coded dark palette from these components. */
html[data-theme="light"] :is(.card-era, .mosaic-overlay, .category-card-content,
    .artwork-overlay, .lightbox, .influential-card-meta, .vox-hero) {
    --gold: inherit;
    --gold-dim: inherit;
    --gold-bright: inherit;
    --gold-glow: inherit;
    --bone: inherit;
    --bone-dim: inherit;
    --void: inherit;
    --void-surface: inherit;
    --void-border: inherit;
    color: var(--bone);
}
html[data-theme="light"] body { background: var(--void); }
html[data-theme="light"] #dust-particles { display: none; }
html[data-theme="light"] :is(.hero-title, .chronicle-hero-title, .gallery-hero-title,
    .vox-hero-title, .vox-hero-subtitle, .category-card-title) { text-shadow: none; }
html[data-theme="light"] .vox-hero { background: var(--void-light); }
html[data-theme="light"] :is(.vox-hero-scrim, .vox-hero-vignette) { display: none; }
html[data-theme="light"] .chronicle-hero-overlay {
    background: rgba(var(--void-rgb), .94);
}
html[data-theme="light"] :is(.category-card-content, .artwork-overlay,
    .mosaic-overlay, .influential-card-meta) {
    background: var(--void-surface);
    color: var(--bone);
    text-shadow: none;
    border-top: 1px solid var(--void-border);
}
html[data-theme="light"] .category-card-content { top: auto; padding: 1rem; }
html[data-theme="light"] .category-card-sigil { display: none; }
html[data-theme="light"] .category-card-overlay { background: transparent; }
html[data-theme="light"] .card-era { background: var(--void-surface); }
html[data-theme="light"] :is(.lightbox-backdrop, .lightbox-info) { background: var(--void); }
html[data-theme="light"] :is(.lightbox-nav, .lightbox-close) {
    background: var(--void-surface);
    color: var(--bone);
    border: 1px solid var(--void-border);
}
html[data-theme="light"] :is(.chronicle-card, .category-card, .artwork-card,
    .influential-card, .vox-episode) { box-shadow: none; }
html[data-theme="light"] :is(input, select, textarea) {
    background-color: var(--void-surface);
    color: var(--bone);
    border-color: var(--void-border);
}
html[data-theme="light"] ::placeholder { color: var(--bone-dim); opacity: 1; }
html[data-theme="light"] :is(.chronicle-body, .archive-detail) a {
    text-decoration: underline;
    text-underline-offset: .18em;
}
/* Timeline content includes inline dark colours; override its actual components. */
html[data-theme="light"] #ages { background: var(--void); }
html[data-theme="light"] :is(.ag-bgs, .ag-veil, .ag-ghost) { display: none; }
html[data-theme="light"] .ag-card {
    background: var(--void-surface);
    border-color: var(--void-border);
    box-shadow: none;
    backdrop-filter: none;
    opacity: 1;
    transform: none;
}
html[data-theme="light"] :is(.ag-h1, .ag-t) {
    color: var(--bone);
    background: none;
    -webkit-text-fill-color: var(--bone);
    text-shadow: none;
}
html[data-theme="light"] :is(.ag-lede, .ag-q, .ag-x, .ag-credit, .ag-chapter, .ag-coda p) {
    color: var(--bone-dim);
}
html[data-theme="light"] :is(.ag-date, .ag-link, .ag-chip, .ag-btn, .ag-cue, .ag-eyebrow) {
    color: var(--gold);
    text-shadow: none;
}
html[data-theme="light"] :is(.ag-chip, .ag-btn) {
    background: var(--void-surface);
    border-color: var(--void-border);
}
html[data-theme="light"] .ag-coda { background: var(--void-light); }
/* Visible focus and a usable touch target in both colour modes. */
.theme-toggle { min-width: 44px; min-height: 44px; }
:is(a, button, input, select, textarea, audio):focus-visible {
    outline: 3px solid var(--gold-bright);
    outline-offset: 4px;
}
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto !important; }
    *, *::before, *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }
    #dust-particles { display: none; }
    .scroll-reveal, .reveal-text, .ag-card { opacity: 1; transform: none; }
}

html[data-theme="light"] :is(.hero-overlay, .gallery-hero-overlay) { background: none; }
html[data-theme="light"] .ag-dot { border-color: var(--gold); }
html[data-theme="light"] .ag-dot.act { background: var(--gold); box-shadow: none; }
html[data-theme="light"] .ag-dot:after { color: var(--bone); background: var(--void-surface); border-color: var(--void-border); }
html[data-theme="light"] .ag-dot:focus-visible:after { opacity: 1; }
.ag-dot { min-width: 24px; min-height: 24px; }
.ag-rail { gap: .35rem; }
html[data-theme="light"] :is(.category-card-count, .section-label, .ag-chapter, .ag-chip) { font-weight: 600; }
