/* Light theme: the same design in ink on paper. Dark stays the default; theme-init.js sets data-theme="light" on <html>
   before the first paint when a visitor has chosen it, and theme.js draws the toggle and recolours the maps and canvases.
   Almost everything follows the tokens below (their dark values are in theme.css); the rules after them are the few
   places where the dark design draws with black or white directly. Loaded last on every page. */
:root[data-theme="light"]{color-scheme:light;
 --bg:#f6f4ef;--bg-2:#eeebe4;--surface:#ffffff;--panel:#efece5;--raised:#e5e0d6;--night:#f6f4ef;--ridge:#e5e0d6;
 --ink:#1b1812;--ink-2:#3d3830;--muted:#5f594e;--faint:#6c665a;--border:#2a200f33;--border-strong:#2a200f4d;
 --brass:#875f15;--brass-2:#74500f;--brass-line:#875f1559;--brass-glow:#875f151f;--gold:#d4a145;
 --crimson:#b82e4b;--crimson-glow:#b82e4b26;--teal:#116f74;--green:#27723d;
 --hi:42 32 14;--shade:.16;--head-a:#1b1812;--head-b:#6f695d;--surface-rgb:255 255 255;--panel-rgb:239 236 229;--ink-rgb:27 24 18;
 --brass-rgb:135 95 21;--brass-2-rgb:116 80 15;--brass-deep:#c99a4c;--crimson-rgb:184 46 75;--crimson-deep-rgb:142 42 92;
 --teal-rgb:17 111 116;--green-rgb:39 114 61;--blue-rgb:69 88 196;--peri:#4558c4;--peri-rgb:69 88 196;
 --sky:#3a4cae;--sky-2:#4558c4;--sky-2-rgb:69 88 196;--lilac:#6548c4;--lilac-rgb:101 72 196;
 --rose:#b0284a;--rose-2:#98203f;--rose-3:#c2324f;--rose-hatch:#c93a5c;--mint:#236b38;--mint-2:#236b38;--plum:#93396a;--plum-2:#9c4373;
 --trans-hatch:#6f6a82;--peace-deep:#dfe3f8;--trans-deep:#ebe9f0}

/* Gold fills keep a bright gold under dark ink; --brass itself darkens for text and lines. */
:root[data-theme="light"] :is(.start-button,.start-button:hover:not(:disabled),.lang-switch button.on,.source-count,.chip.found,.pl-page.on,.play-button[aria-pressed="true"] #play-icon){background:var(--gold);border-color:var(--gold)}
:root[data-theme="light"] :is(.nav-item[aria-current="page"],.nav-item[aria-current="page"]:hover,.skip-link){background:var(--gold);color:#1a1408}
:root[data-theme="light"] .start-button{box-shadow:0 0 0 1px #ffffff40 inset,0 14px 30px -16px rgb(154 107 28 / .55)}

/* Header frosts in paper, not black, once the page scrolls. */
:root[data-theme="light"].scrolled .header{background:rgb(246 244 239 / .86)}

/* Home hero: the photo turns into a pale archival print behind dark text; the ridges fade into the page. */
:root[data-theme="light"] .monument-photo img{filter:grayscale(.55) sepia(.3) saturate(.8) brightness(1.06) contrast(.9)}
:root[data-theme="light"] .monument:before{background:rgb(246 244 239 / .8)}
:root[data-theme="light"] .ridges .r1{fill:#e6e0d4;opacity:.55}
:root[data-theme="light"] .ridges .r2{fill:#ede9e1;opacity:.85}
:root[data-theme="light"] :is(.monument h1,.monument-inner>p,.page-atlas .map-heading,.page-atlas .map-coordinates){text-shadow:none}
:root[data-theme="light"] .scroll-cue{border-color:var(--border-strong)}
:root[data-theme="light"] .monument-photo figcaption{color:var(--muted)}

/* Surfaces that were black: the atlas frame, the Bu gün legend, the dialog backdrop. Photo viewers stay dark. */
@media(min-width:961px){:root[data-theme="light"] .page-atlas .atlas-shell{background:var(--bg)}}
:root[data-theme="light"] .today-legend span{background:rgb(255 255 255 / .9)}
:root[data-theme="light"] dialog::backdrop{background:rgb(27 24 18 / .42)}
:root[data-theme="light"] .lg-place{box-shadow:0 0 0 2px var(--surface),0 0 0 3px rgb(var(--brass-rgb) / .376)}
:root[data-theme="light"] .lg-area{background:linear-gradient(90deg,rgb(var(--brass-rgb) / .2) 50%,transparent 50%),repeating-linear-gradient(135deg,var(--rose-hatch) 0 1px,#f3d9df 1px 4px)!important}
:root[data-theme="light"] :is(.seg-occupied,.mr-occupied i){background:repeating-linear-gradient(135deg,var(--rose-hatch) 0 1.5px,#f3d9df 1.5px 5px)}

/* Photo viewers and the badges drawn on photos (year and hero marks on portraits, gallery counter and zoom, the
   lightbox) stay dark in both themes, so they take back the dark palette for everything inside them. */
:root[data-theme="light"] :is(.m-ev,.m-hero,.gal-zoom,.gal-count,.lightbox){
 --ink:#ededed;--ink-2:#c4c4c4;--muted:#9b9b9b;--faint:#8a8a8a;--border:#ffffff28;--border-strong:#ffffff42;
 --brass:#e2b45f;--brass-2:#f3d39a;--brass-line:#e2b45f40;--brass-glow:#e2b45f26;--hi:255 255 255;--shade:1;--surface:#181818}

/* MapLibre's own controls and popups follow the page. */
:root[data-theme="light"] .maplibregl-popup-content{color:var(--ink)}
