/* atlas.css · the Atlas of the Keeping. Plates are ink on the site's near-black; 2456 is the pale salt plate; 1623 is
   warm sepia. No boxes with coloured edges, no glass, no gradient fades (house rule). */

.atlas { --ink: #c9a84c; --ink-dim: #8a7235; --ink-faint: rgba(201, 168, 76, .14); --water-ink: #4a9e9e;
  --paper: #0f0f1a; --sea: #0a0a12; --land: #15151f; --text: #e8e4dc; --muted: #8f877c;
  color: var(--text); font-family: 'Inter', system-ui, sans-serif; }

.atlas__head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 16px 32px; margin-bottom: 20px; }
.atlas__head > div:first-child { flex: 1 1 320px; min-width: 0; }
/* the kicker and the list heads in the house's section-label voice: Cormorant capitals, wide-set */
.atlas__crumb { margin: 0 0 6px; font: 600 .82rem/1.6 'Cormorant Garamond', Georgia, serif; letter-spacing: .2em; text-transform: uppercase; color: var(--ink-dim); }
.atlas__crumb a { color: inherit; text-decoration: none; }
.atlas__crumb a:hover, .atlas__crumb a:focus-visible { color: var(--ink); }
.atlas__title { margin: 0; font: 700 clamp(1.75rem, 4vw, 2.6rem)/1.1 'Playfair Display', Georgia, serif; }
.atlas__lead { margin: 10px 0 0; max-width: 56ch; color: #b0aa9e; line-height: 1.6; }

/* the time switch: three words on a rule, the chosen one in ink */
.era-switch { display: flex; gap: 0; border-bottom: 1px solid var(--ink-faint); max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.era-switch button { flex: 0 0 auto; }
@media (max-width: 600px) { .atlas .era-switch small { display: none; } .atlas .era-switch button { padding: 10px 12px 9px; } }
/* the narrowest phones: the three valley times still fit on one line */
@media (max-width: 400px) { .atlas .era-switch button { padding: 10px 8px 9px; font-size: .95rem; letter-spacing: .02em; } }
.era-switch button { appearance: none; background: none; border: 0; border-bottom: 2px solid transparent; margin-bottom: -1px;
  padding: 10px 14px 9px; color: var(--muted); font: 400 1.05rem/1 'Cormorant Garamond', Georgia, serif; letter-spacing: .04em;
  cursor: pointer; min-height: 44px; }
.era-switch button[aria-pressed="true"] { color: var(--text); border-bottom-color: var(--ink); }
.era-switch button:hover { color: var(--text); }
.era-switch button:focus-visible { outline: 2px solid rgba(201, 168, 76, .5); outline-offset: 2px; }
.era-switch small { display: block; margin-top: 4px; font: 400 .68rem/1 'Inter', sans-serif; letter-spacing: .08em; color: var(--muted); }

.atlas__stage { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 28px; align-items: start; }
@media (max-width: 900px) { .atlas__stage { grid-template-columns: minmax(0, 1fr); } }
.atlas__map { position: relative; min-width: 0; }
.atlas__map svg { display: block; width: 100%; height: auto; }
.atlas__era-note { margin: 10px 0 0; font: italic 400 1.02rem/1.5 'Cormorant Garamond', Georgia, serif; color: #b0aa9e; }

/* ── the plate's ink ─────────────────────────────────────────────────────────────────────────────────────────── */
.atlas-plate { --p-ground: var(--land); --p-sea: var(--sea); --p-line: rgba(201, 168, 76, .55); --p-water: #0b1416;
  --p-wl: rgba(74, 158, 158, .26); --p-name: #b0aa9e; --p-water-name: rgba(94, 196, 196, .62); --p-road: rgba(232, 228, 220, .2);
  --p-road-min: rgba(232, 228, 220, .085); --p-green: rgba(120, 140, 100, .09); --p-grain: rgba(232, 228, 220, .05); --p-mark: #c9a84c;
  transition: filter .5s; }
.atlas-plate .sea { fill: var(--p-sea); }
.atlas-plate .ground { fill: var(--p-ground); transition: fill .6s; }
.atlas-plate .grain { fill: var(--p-grain); }
.atlas-plate .ground-grain, .atlas-plate .land-grain { pointer-events: none; }
.atlas-plate .land { fill: var(--p-ground); stroke: var(--p-line); stroke-width: .8; stroke-linejoin: round; }
.atlas-plate .lake { fill: var(--p-sea); stroke: var(--p-line); stroke-width: .5; }
.atlas-plate .grat { fill: none; stroke: rgba(201, 168, 76, .08); stroke-width: .6; stroke-dasharray: 1 4; }
.atlas-plate .wl, .atlas-plate .wl-gap { fill: none; stroke-linejoin: round; }
.atlas-plate .wl { stroke: var(--p-wl); }
.atlas-plate .wl-gap { stroke: var(--p-sea); }
.atlas-plate .wl3 { stroke-width: 19; opacity: .45; } .atlas-plate .wl3g { stroke-width: 17.6; }
.atlas-plate .wl2 { stroke-width: 12; opacity: .7; } .atlas-plate .wl2g { stroke-width: 10.6; }
.atlas-plate .wl1 { stroke-width: 6; } .atlas-plate .wl1g { stroke-width: 4.6; }
.atlas-plate .river { fill: none; stroke: rgba(74, 158, 158, .5); stroke-width: .9; stroke-linecap: round; }
.atlas-plate .frame { fill: none; stroke: rgba(201, 168, 76, .3); }
.atlas-plate .city-dot { fill: var(--p-name); opacity: .6; }
.atlas-plate text { font-family: 'Cormorant Garamond', Georgia, serif; fill: var(--p-name); text-anchor: middle; paint-order: stroke;
  stroke: var(--p-sea); stroke-width: 3px; stroke-linejoin: round; }
.atlas-plate .g-sea, .atlas-plate .g-water { font-style: italic; font-size: 17px; letter-spacing: .12em; fill: var(--p-water-name); stroke: none; }
.atlas-plate .g-s { font-size: 14px; } .atlas-plate .g-xs { font-size: 12px; }
.atlas-plate .g-range { font-size: 12px; letter-spacing: .5em; fill: rgba(176, 170, 158, .5); stroke: none; }
.atlas-plate .g-city { font-size: 13px; opacity: .72; }
.atlas-plate .g-district { font-size: 15px; letter-spacing: .26em; text-transform: uppercase; fill: rgba(176, 170, 158, .55); stroke: none; }
.atlas-plate .g-district.g-s { font-size: 12px; }
.atlas-plate .scale path { fill: none; stroke: var(--p-name); stroke-width: 1; opacity: .7; }
.atlas-plate .scale text { font: 400 11px 'Inter', sans-serif; letter-spacing: .08em; stroke: none; }
.atlas-plate .credit { font: 400 9px 'Inter', sans-serif; text-anchor: end; fill: rgba(176, 170, 158, .45); stroke: none; }

/* the city plate, our time */
.city .water { fill: var(--p-water); stroke: var(--p-line); stroke-width: .7; stroke-linejoin: round; transition: fill .6s, stroke .6s; }
.city .wl { stroke: var(--p-wl); } .city .wl-gap { stroke: var(--p-ground); transition: stroke .6s; }
.city .wl2 { stroke-width: 10; opacity: .55; } .city .wl2g { stroke-width: 8.6; } .city .wl1 { stroke-width: 5; } .city .wl1g { stroke-width: 3.6; }
.city .island { fill: var(--p-ground); stroke: var(--p-line); stroke-width: .6; }
.city .green { fill: var(--p-green); transition: opacity .6s; }
.city .stream { fill: none; stroke: rgba(74, 158, 158, .35); stroke-width: 1.2; }
.city .rd { fill: none; stroke-linecap: round; stroke-linejoin: round; transition: opacity .6s, stroke .6s; }
.city .minor { stroke: var(--p-road-min); stroke-width: .8; }
.city .major { stroke: var(--p-road); stroke-width: 1.3; }
.city .rail { stroke: rgba(232, 228, 220, .12); stroke-width: .8; stroke-dasharray: 5 3; }
.city .mway-case { stroke: rgba(232, 228, 220, .22); stroke-width: 4.6; }
.city .mway { stroke: var(--p-ground); stroke-width: 2.6; transition: stroke .6s; }
.city text { stroke: var(--p-ground); }

/* the road: the pale salt plate, brown ink, three lanes */
.road { --p-ground: #d9d3c4; --p-name: #4c4232; --p-mark: #6b4f1d; --p-sea: #d9d3c4; }
.road .ground { fill: var(--p-ground); }
.road .r-salt { fill: rgba(70, 58, 40, .22); }
.road .r-road-case { fill: none; stroke: rgba(70, 58, 40, .35); stroke-width: 7; stroke-linecap: round; }
.road .r-road { fill: none; stroke: #ece7db; stroke-width: 4.4; stroke-linecap: round; }
.road .r-cairn { fill: rgba(70, 58, 40, .45); }
.road .r-title { font: 700 20px 'Playfair Display', Georgia, serif; fill: #2e2619; text-anchor: start; stroke: none; }
.road .r-sub { font: italic 15px 'Cormorant Garamond', Georgia, serif; fill: #5a4e3b; text-anchor: start; stroke: none; }
.road .r-end { font: italic 15px 'Cormorant Garamond', Georgia, serif; fill: #5a4e3b; text-anchor: end; stroke: none; }
.road .credit { fill: rgba(70, 58, 40, .55); }
.road .frame { stroke: rgba(70, 58, 40, .35); }
.road .mark .m-label { fill: #2e2619; stroke: #d9d3c4; }
.road .mark .m-sub { fill: #5a4e3b; }
.road .mark.is-locked .m-dot { stroke: #7a6c55; }

/* a coastal city: the sea is the plate's water, the land a shape on it */
.city .sea-c { fill: #0b1618; }
.city .sea-gap { stroke: #0b1618; }
.city .land-c { stroke: var(--p-line); stroke-width: .8; stroke-linejoin: round; }
.city .wl3 { stroke-width: 16; opacity: .35; } .city .wl3g { stroke-width: 14.6; }
.era-switch:empty, .era-switch.is-single { display: none; }

/* 2456: the pale salt plate. The ground goes white, the streets go, the six-lane roads stay as worn pale bands, the
   docks lie dry (their edges a ghost), the river runs grey; the sky is brown, so the ink is warm brown not black */
.city[data-era="2456"] { --p-ground: #d9d3c4; --p-line: rgba(70, 58, 40, .55); --p-water: #8e9189; --p-wl: rgba(70, 58, 40, .22);
  --p-name: #4c4232; --p-water-name: rgba(40, 52, 50, .7); --p-grain: rgba(70, 58, 40, .09); --p-sea: #d9d3c4; }
/* the low grey city of 2456 stands on the same ground (B3 ch12): the street grid stays, faint; the railways and the
   parks go */
.city[data-era="2456"] .rail, .city[data-era="2456"] .green { opacity: 0; }
.city[data-era="2456"] .minor { stroke: rgba(70, 58, 40, .13); }
.city[data-era="2456"] .major { stroke: rgba(70, 58, 40, .1); }
.city[data-era="2456"] .mway-case { stroke: rgba(70, 58, 40, .35); stroke-width: 7; }
.city[data-era="2456"] .mway { stroke: #e9e4d8; stroke-width: 5; }
.city[data-era="2456"] .dock { fill: #cfc8b6; stroke: rgba(70, 58, 40, .35); stroke-dasharray: 3 3; }
.city[data-era="2456"] .lake { fill: #cfc8b6; stroke: none; }
.city[data-era="2456"] .stream { stroke: rgba(70, 58, 40, .2); }
.city[data-era="2456"] .credit { fill: rgba(70, 58, 40, .5); }

/* small screens: the plate shrinks, so the names grow back (--k = plate units per screen pixel, set by atlas.js);
   the minor names go */
.atlas-plate .geo-names text { font-size: calc(var(--fs, 15px) * var(--kg, 1)); }
.atlas-plate .g-sea, .atlas-plate .g-water { --fs: 17px; } .atlas-plate .g-s { --fs: 14px; } .atlas-plate .g-xs { --fs: 12px; }
.atlas-plate .g-range { --fs: 12px; } .atlas-plate .g-city { --fs: 13px; } .atlas-plate .g-district { --fs: 15px; } .atlas-plate .g-district.g-s { --fs: 12px; }
@media (max-width: 600px) { .atlas-plate .g-district { --fs: 16px; } .atlas-plate .g-district.g-s { --fs: 14px; } }
@media (max-width: 600px) { .atlas-plate .g-city, .atlas-plate .city-dot, .atlas-plate .g-xs, .atlas-plate .g-range.g-s, .atlas-plate .scale, .mark .m-sub { display: none; } }

/* ── the Drowned Valley: one ground, three states ─────────────────────────────────────────────────────────────
   1623 warm sepia: the river on the valley floor, the meadow, the strip fields, the village on its track, the church
   and its yard, the charterhouse alive (filled) above. The long ruin: the lake, the house roofless (outline only), no
   road. The Aumbry years: the lake, the lowest mark, the salt-road and the Stair, the house raised again. */
.valley { --p-ground: #16141a; --ct: rgba(201, 168, 76, .13); --ct-idx: rgba(201, 168, 76, .28); --p-water: #0d1d20; }
.valley .ct { fill: none; stroke: var(--ct); stroke-width: .7; }
.valley .ct-idx { stroke: var(--ct-idx); stroke-width: 1; }
.valley .water { fill: var(--p-water); stroke: rgba(74, 158, 158, .55); stroke-width: 1; }
.valley .wl { stroke: rgba(74, 158, 158, .25); } .valley .wl-gap { stroke: var(--p-ground); }
.valley .wl2 { stroke-width: 12; opacity: .6; } .valley .wl2g { stroke-width: 10.4; } .valley .wl1 { stroke-width: 6; } .valley .wl1g { stroke-width: 4.4; }
.valley .v-low { fill: none; stroke: rgba(94, 196, 196, .35); stroke-width: .9; stroke-dasharray: 2 4; }
.valley .v-river { fill: none; stroke: #4a9e9e; stroke-width: 3.2; stroke-linecap: round; stroke-linejoin: round; opacity: .8; }
.valley .v-meadow { fill: rgba(130, 150, 95, .12); stroke: none; }
.valley .v-field { stroke: rgba(176, 150, 100, .3); stroke-width: 1; }
.valley .v-house { fill: #b59a6a; opacity: .75; }
.valley .v-yard { fill: none; stroke: rgba(201, 168, 76, .4); stroke-width: .8; stroke-dasharray: 1 3; }
.valley .v-church { fill: #c9a84c; opacity: .8; }
.valley .v-tower { fill: #c9a84c; stroke: none; }
.valley .v-road { fill: none; stroke: rgba(232, 228, 220, .3); stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.valley .v-salt { stroke: #d6d0c0; stroke-width: 2.4; opacity: .8; }
.valley .v-road-drowned { stroke-dasharray: 3 4; opacity: .5; }
.valley .v-stair { fill: none; stroke: #e8e4dc; stroke-width: 1.6; stroke-dasharray: 1.5 1.5; }
.valley .v-stair-under { opacity: .4; }
.valley .v-weir { stroke: #b0aa9e; stroke-width: 2; }
.valley .h-range { fill: #c9a84c; fill-opacity: .55; stroke: #c9a84c; stroke-width: .8; }
.valley .h-garth { fill: var(--p-ground); stroke: none; }
.valley .only-e1623, .valley .only-e2456, .valley .only-lake { transition: opacity .5s; }
.valley:not([data-era="1623"]) .only-e1623, .valley:not([data-era="2456"]) .only-e2456, .valley[data-era="1623"] .only-lake,
.valley:not([data-era="ruin"]) .only-ruin { opacity: 0; pointer-events: none; }
.valley .v-field { fill: none; stroke: rgba(176, 150, 100, .22); stroke-width: .8; }
.valley[data-era="1623"] { --p-ground: #19150f; --ct: rgba(176, 140, 80, .16); --ct-idx: rgba(176, 140, 80, .32); }
.valley[data-era="1623"] .ct-under { stroke: rgba(176, 140, 80, .16); }
.valley:not([data-era="1623"]) .ct-under { opacity: 0; }
.valley:not([data-era="1623"]) .v-tower { fill: #8a857b; }
.valley[data-era="ruin"] .h-range { fill-opacity: 0; stroke-dasharray: 3 2; opacity: .75; }
.valley[data-era="ruin"] .house circle { opacity: .5; }
.mark.is-num .m-ring { r: 0; }
.mark.is-num .m-dot { fill: var(--p-ground, #15151f); stroke: var(--p-mark); stroke-width: 1.2; }
.mark.is-num .m-label { font: 600 calc(11px * var(--k, 1)) 'Inter', sans-serif; fill: var(--p-mark); stroke: none; }
.place-list .num { display: inline-block; min-width: 1.6em; color: var(--ink); font: 600 .78rem/1.6 'Inter', sans-serif; }

/* ── marks (places), drawn by atlas.js ─────────────────────────────────────────────────────────────────────── */
.mark { cursor: pointer; outline: none; }
.mark .m-dot { fill: var(--p-mark); }
.mark .m-ring { fill: none; stroke: var(--p-mark); stroke-width: 1.2; opacity: .7; }
.mark .m-hit { fill: transparent; }
.mark .m-label { font: 600 calc(16px * var(--k, 1)) 'Cormorant Garamond', Georgia, serif; fill: var(--text, #e8e4dc); letter-spacing: .02em;
  stroke-width: calc(3.5px * var(--k, 1)); }
/* the italic line under a name keeps a halo too, so a road or a coast never runs through it */
.mark .m-sub { font: italic 400 calc(13.5px * var(--k, 1)) 'Cormorant Garamond', Georgia, serif; fill: #b0aa9e;
  stroke-width: calc(3px * var(--k, 1)); }
.valley text, .road text { stroke: var(--p-ground); }
.atlas-plate .geo-names text { transition: opacity .3s; }
.atlas-plate .geo-names text.is-under { opacity: 0; }
.mark.is-area .m-ring { stroke-dasharray: 2 3; }
.mark.is-area .m-dot { opacity: 0; }
.mark.is-locked { cursor: default; }
.mark.is-locked .m-dot { fill: none; stroke: var(--muted, #8f877c); stroke-width: calc(1.3px * var(--k, 1)); }
.mark.is-locked .m-ring { display: none; }
.mark.is-area.is-locked .m-dot { opacity: 1; }            /* a locked district is a hollow mark too, never nothing */
.mark.is-locked .m-label { fill: #8f877c; font-weight: 400; font-style: italic; font-size: calc(13.5px * var(--k, 1)); }
.mark.is-dim { opacity: .28; }
.mark.is-covered .m-label, .mark.is-covered .m-sub { visibility: hidden; }
.mark.is-unlabeled:not(.is-on):not(:focus-visible) .m-label, .mark.is-unlabeled:not(.is-on):not(:focus-visible) .m-sub { display: none; }
.mark:hover .m-ring, .mark:focus-visible .m-ring, .mark.is-on .m-ring { opacity: 1; stroke-width: 2; }
.mark:focus-visible .m-label { text-decoration: underline; }
.city[data-era="2456"] .mark .m-label { fill: #2e2619; stroke: #d9d3c4; }
.city[data-era="2456"] .mark .m-sub { fill: #5a4e3b; }
.city[data-era="2456"] { --p-mark: #6b4f1d; }
.atlas-plate .work .m-label { font: 700 calc(17px * var(--k, 1)) 'Playfair Display', Georgia, serif; letter-spacing: .01em; }
.city .lake { fill: var(--p-water); stroke: rgba(74, 158, 158, .3); stroke-width: .5; }
.city .river { fill: #10262a; }
.city[data-era="2456"] .river { fill: var(--p-water); }

/* ── the side column: the selected place, then every place in the plate as a plain list ───────────────────────── */
.atlas__side h2 { margin: 0 0 4px; font: 700 1.35rem/1.2 'Playfair Display', Georgia, serif; }
.atlas__side .kicker { margin: 0 0 12px; font: italic 400 1.05rem/1.4 'Cormorant Garamond', Georgia, serif; color: #b0aa9e; }
.atlas__side p { margin: 0 0 14px; line-height: 1.6; color: #cfc9be; }
.atlas__side .opens { font-style: italic; color: var(--muted); }
.atlas__side a.go { display: inline-block; padding: 10px 0; color: var(--ink); font-weight: 500; text-decoration: none; letter-spacing: .02em; min-height: 44px; }
.atlas__side a.go:hover, .atlas__side a.go:focus-visible { text-decoration: underline; }
.atlas__side button.go { appearance: none; background: var(--ink); color: #14110a; border: 0; border-radius: 4px; padding: 11px 18px;
  font: 600 .85rem/1 'Inter', sans-serif; letter-spacing: .1em; text-transform: uppercase; cursor: pointer; min-height: 44px; }
.atlas__side button.go:hover { background: #e8c55a; }
.atlas__card { padding-bottom: 18px; margin-bottom: 18px; border-bottom: 1px solid var(--ink-faint); }
.place-list { list-style: none; margin: 0; padding: 0; }
.place-list li { margin: 0; }
.place-list button { appearance: none; width: 100%; text-align: left; background: none; border: 0; padding: 9px 0; color: var(--text);
  font: 400 1.08rem/1.3 'Cormorant Garamond', Georgia, serif; cursor: pointer; display: flex; justify-content: space-between; gap: 12px; min-height: 40px; }
.place-list button small { color: var(--muted); font: 400 .72rem/1.6 'Inter', sans-serif; letter-spacing: .06em; white-space: nowrap; }
.place-list button:hover, .place-list button[aria-current="true"] { color: var(--ink); }
.place-list button:focus-visible { outline: 2px solid rgba(201, 168, 76, .5); outline-offset: 2px; }
.place-list .locked button { color: var(--muted); font-style: italic; cursor: default; }
.atlas__side .side-head { margin: 32px 0 6px; font: 600 .85rem/1.2 'Cormorant Garamond', Georgia, serif; letter-spacing: .2em; text-transform: uppercase; color: var(--ink); }
.atlas__side > .side-head:first-child, .atlas__card + .side-head { margin-top: 4px; }
.atlas__side .unpinned { margin: 4px 0 2px; font: italic .95rem/1.5 'Cormorant Garamond', Georgia, serif; color: var(--muted); }
.atlas__side .locked-group { margin: 6px 0 0; font: italic 1rem/1.5 'Cormorant Garamond', Georgia, serif; color: var(--muted); }
.place-list button > span { flex: 0 0 auto; max-width: 64%; }
.place-list button small { flex: 0 1 auto; min-width: 0; white-space: normal; text-align: right; padding-top: .15em; }
.place-list .is-dim button { color: var(--muted); }
.place-list .is-dim button:hover { color: var(--ink); }
@media (min-width: 601px) and (max-width: 900px) { .atlas__side { max-width: 560px; } }

/* the road on a phone: kept at a walkable size, scrolled sideways inside its own frame */
.atlas__scroll { position: relative; }
.atlas__hint { display: none; margin: 8px 0 0; font: 400 .75rem/1.4 'Inter', sans-serif; letter-spacing: .06em; color: var(--muted); }
@media (max-width: 700px) {
  .atlas__map[data-plate="road"] .atlas__scroll { overflow-x: auto; overscroll-behavior-x: contain; -webkit-overflow-scrolling: touch; }
  .atlas__map[data-plate="road"] svg { width: 820px; max-width: none; }
  .atlas__map[data-plate="road"] .atlas__hint { display: block; }
}
