/* Baelo Claudia guide — limestone, Pompeian red, Strait-of-Gibraltar teal. */

:root {
  --bg: #f3eee4;
  --bg-2: #ebe4d6;
  --panel: #fbf8f2;
  --ink: #2b2520;
  --ink-2: #5d5348;
  --ink-3: #8a7e70;
  --line: #d9cfbd;
  --red: #9a3324;
  --red-soft: #f1ddd5;
  --sea: #2c6e73;
  --sea-soft: #d6e6e4;
  --ochre: #a9772a;
  --ochre-soft: #f0e3c7;
  --olive: #5f6b3a;
  --olive-soft: #e2e6d0;
  --violet: #6a4a7a;
  --shadow: 0 1px 2px rgba(60, 40, 20, .06), 0 6px 20px rgba(60, 40, 20, .06);
  --serif: 'Iowan Old Style', 'Palatino Linotype', Palatino, 'Book Antiqua', Georgia, serif;
  --sans: ui-sans-serif, -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
  --mono: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  --top: 56px;
  --side: 264px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #171411;
    --bg-2: #1f1b17;
    --panel: #221e19;
    --ink: #ece4d6;
    --ink-2: #b9ad9b;
    --ink-3: #8b8071;
    --line: #3a332b;
    --red: #e0806c;
    --red-soft: #3a211b;
    --sea: #7fc0c0;
    --sea-soft: #1b3233;
    --ochre: #d9a95a;
    --ochre-soft: #3a2e18;
    --olive: #a9b77a;
    --olive-soft: #2a2f1c;
    --violet: #b79acb;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 6px 20px rgba(0, 0, 0, .25);
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--top) + 16px); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--red); text-decoration-thickness: 1px; text-underline-offset: 3px; }
code { font: .86em var(--mono); background: var(--bg-2); padding: .1em .35em; border-radius: 4px; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.15; margin: 0; text-wrap: balance; }
p { margin: 0 0 .8em; }
:focus-visible { outline: 2px solid var(--sea); outline-offset: 2px; border-radius: 4px; }

/* ---------- top bar ---------- */
.top {
  position: fixed; inset: 0 0 auto 0; height: var(--top); z-index: 20;
  display: flex; align-items: center; gap: 12px;
  padding: 0 max(16px, env(safe-area-inset-right)) 0 max(16px, env(safe-area-inset-left));
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; min-width: 0; }
.brand-mark {
  width: 32px; height: 32px; flex: none; display: grid; place-items: center;
  font: 600 13px var(--serif); letter-spacing: .06em; color: var(--panel);
  background: var(--red); border-radius: 3px;
  box-shadow: inset 0 0 0 2px var(--red), inset 0 0 0 3px color-mix(in srgb, var(--panel) 60%, transparent);
}
.brand-text { display: flex; flex-direction: column; line-height: 1.1; min-width: 0; }
.brand-text b { font: 600 17px var(--serif); letter-spacing: .01em; }
.brand-text b, .brand-text i { white-space: nowrap; }
.brand-text i { font-style: normal; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); }
.save { margin-left: auto; font-size: 12px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.save::before { content: ''; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--olive); margin-right: 6px; }
.save[data-state='saving']::before { background: var(--ochre); }
.save[data-state='error']::before { background: var(--red); }
.save[data-state='readonly']::before { background: var(--ink-3); }
.menu { display: none; width: 40px; height: 40px; margin-left: -8px; border: 0; background: none; cursor: pointer; padding: 11px 9px; flex-direction: column; justify-content: space-between; }
.menu span { display: block; height: 2px; background: var(--ink); border-radius: 2px; }

/* ---------- shell ---------- */
.shell { display: grid; grid-template-columns: var(--side) minmax(0, 1fr); padding-top: var(--top); }
.side {
  position: sticky; top: var(--top); align-self: start; height: calc(100dvh - var(--top)); overflow: auto;
  padding: 24px 16px 40px 20px; border-right: 1px solid var(--line);
}
.navgroup { margin-bottom: 22px; }
.navgroup > p { font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-3); margin: 0 0 6px 10px; }
.navgroup > a { display: block; padding: 6px 10px; border-radius: 6px; color: var(--ink); text-decoration: none; font-size: 15px; }
.navgroup > a:hover { background: var(--bg-2); }
.navgroup > a[aria-current] { background: var(--red-soft); color: var(--red); font-weight: 600; }
.subnav { margin: 4px 0 8px 10px; padding-left: 10px; border-left: 1px solid var(--line); }
.subnav a { display: block; padding: 3px 8px; font-size: 13px; color: var(--ink-2); text-decoration: none; border-radius: 4px; }
.subnav a:hover { color: var(--red); }

main { min-width: 0; padding: 40px clamp(16px, 4vw, 56px) 80px; outline: none; }
.page { max-width: 1020px; margin: 0 auto; }

/* ---------- page header ---------- */
.kicker { font-size: 12px; letter-spacing: .2em; text-transform: uppercase; color: var(--red); margin-bottom: 10px; }
.ph h1 { font-size: clamp(34px, 5.2vw, 56px); letter-spacing: -.01em; }
.lede { font: 400 clamp(18px, 2vw, 21px)/1.5 var(--serif); color: var(--ink-2); max-width: 46em; margin-top: 16px; }
.ph { padding-bottom: 28px; border-bottom: 1px solid var(--line); position: relative; }
.ph::after { content: ''; position: absolute; left: 0; bottom: -1px; width: 72px; height: 3px; background: var(--red); }

.sec { padding-top: 44px; }
.sec > h2 { font-size: clamp(24px, 3vw, 31px); margin-bottom: 12px; }
.sec > h2 a { color: inherit; text-decoration: none; }
.intro { color: var(--ink-2); max-width: 48em; font-size: 17px; }
.prose { max-width: 48em; }
.prose ul, .body ul, .body ol { padding-left: 1.2em; margin: 0 0 .8em; }
.prose li, .body li { margin-bottom: .3em; }
.prose blockquote, .body blockquote {
  margin: 1em 0; padding: .2em 0 .2em 1em; border-left: 3px solid var(--ochre);
  font: italic 17px/1.5 var(--serif); color: var(--ink-2);
}
.prose blockquote cite, .body blockquote cite { display: block; font: normal 13px var(--sans); color: var(--ink-3); margin-top: .4em; }

/* ---------- cards ---------- */
.cards { display: grid; gap: 16px; margin: 18px 0; }
.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cols-1 { grid-template-columns: minmax(0, 1fr); }
.card {
  background: var(--panel); border: 1px solid var(--line); border-radius: 10px;
  padding: 18px 18px 14px; box-shadow: var(--shadow);
  display: flex; flex-direction: column; min-width: 0;
  border-top: 3px solid var(--line);
}
.card.wide { grid-column: 1 / -1; }
.card h3 { font-size: 20px; }
.card .tag { font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 4px; }
.card .latin { font: italic 14px var(--serif); color: var(--ink-3); margin: 2px 0 0; }
.card .body { font-size: 15px; color: var(--ink-2); margin-top: 8px; }
.card .body b, .card .body strong { color: var(--ink); }
.card .rv { margin-top: auto; }
[data-host][data-status='approve'] { border-top-color: var(--olive); }
[data-host][data-status='revise'] { border-top-color: var(--ochre); }
[data-host][data-status='reject'] { border-top-color: var(--red); opacity: .72; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 0; }
.chips:empty { display: none; }
.chip {
  display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; line-height: 1;
  padding: 4px 8px; border-radius: 12px; background: var(--bg-2); color: var(--ink-2); max-width: 100%; line-height: 1.25;
}
.chip.grade b { font-family: var(--serif); font-size: 12px; }
.chip.gA { background: var(--olive-soft); color: var(--olive); }
.chip.gB { background: var(--sea-soft); color: var(--sea); }
.chip.gC { background: var(--ochre-soft); color: var(--ochre); }
.chip.gD { background: var(--red-soft); color: var(--red); }

.facts { margin: 10px 0 4px; font-size: 13.5px; border-top: 1px solid var(--line); }
.facts div { display: grid; grid-template-columns: 9.5em minmax(0, 1fr); gap: 10px; padding: 5px 0; border-bottom: 1px solid var(--line); }
.facts dt { color: var(--ink-3); }
.facts dd { margin: 0; }

.refs { display: flex; flex-wrap: wrap; gap: 4px 10px; margin: 8px 0 0; font-size: 12px; }
.ref { color: var(--ink-3); text-decoration: none; border-bottom: 1px dotted var(--ink-3); }
.ref:hover { color: var(--red); border-color: var(--red); }
.ref.missing { color: var(--red); }

/* ---------- review bar ---------- */
.rv { padding-top: 12px; }
.rv-row { display: flex; flex-wrap: wrap; gap: 6px; padding-top: 10px; border-top: 1px dashed var(--line); }
.rv-b {
  font: 500 12px var(--sans); padding: 6px 10px; min-height: 30px; border-radius: 6px; cursor: pointer;
  border: 1px solid var(--line); background: transparent; color: var(--ink-2);
}
.rv-b:hover { border-color: var(--ink-3); color: var(--ink); }
.rv-b[data-status='approve'][aria-pressed='true'] { background: var(--olive-soft); border-color: var(--olive); color: var(--olive); }
.rv-b[data-status='revise'][aria-pressed='true'] { background: var(--ochre-soft); border-color: var(--ochre); color: var(--ochre); }
.rv-b[data-status='reject'][aria-pressed='true'] { background: var(--red-soft); border-color: var(--red); color: var(--red); }
.rv-note { margin-left: auto; }
.rv-note.has { border-color: var(--sea); color: var(--sea); }
.rv-note.has::after { content: ' •'; }
/* Read-only (published) guide: show the decision taken; no controls, no notes. */
[data-readonly] .rv-b { pointer-events: none; }
[data-readonly] .rv-b[data-status]:not([aria-pressed='true']), [data-readonly] .rv-note, [data-readonly] .rv textarea { display: none; }
.rv textarea {
  width: 100%; margin-top: 8px; padding: 8px 10px; border-radius: 6px; resize: vertical;
  border: 1px solid var(--line); background: var(--bg); color: var(--ink); font: 16px/1.45 var(--sans);
}

/* ---------- timeline ---------- */
.timeline { list-style: none; padding: 0; margin: 20px 0; }
.timeline li {
  display: grid; grid-template-columns: 9.5em minmax(0, 1fr); gap: 20px;
  padding: 0 0 26px; position: relative; border-top: 0;
}
.timeline .when { font: 600 15px var(--serif); color: var(--red); text-align: right; padding-top: 2px; margin: 0; }
.timeline .what { border-left: 2px solid var(--line); padding: 0 0 0 22px; position: relative; }
.timeline .what::before {
  content: ''; position: absolute; left: -7px; top: 6px; width: 12px; height: 12px; border-radius: 50%;
  background: var(--bg); border: 2px solid var(--red);
}
.timeline li[data-status='approve'] .what::before { background: var(--olive); border-color: var(--olive); }
.timeline li[data-status='revise'] .what::before { background: var(--ochre); border-color: var(--ochre); }
.timeline h3 { font-size: 20px; }
.timeline .body { color: var(--ink-2); font-size: 15px; margin-top: 8px; }

/* ---------- tables, code, stats ---------- */
.tablewrap { overflow-x: auto; margin: 18px 0; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); }
table { border-collapse: collapse; width: 100%; font-size: 14px; }
caption { text-align: left; padding: 12px 14px 0; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); }
th, td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); font-weight: 600; white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
td:first-child { font-weight: 600; }

.code { margin: 10px 0 0; padding: 14px 16px; overflow-x: auto; background: var(--bg-2); border-radius: 8px; font: 12.5px/1.55 var(--mono); color: var(--ink); }
.code code { background: none; padding: 0; font: inherit; }
.codefig { margin: 18px 0; }
.codefig figcaption { font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; margin: 20px 0; }
.stats div { background: var(--panel); padding: 16px; }
.stats b { display: block; font: 600 28px/1.1 var(--serif); color: var(--red); }
.stats span { font-size: 13px; color: var(--ink-2); }

.gradekey { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 16px 0; }
.gradekey p { font-size: 13.5px; color: var(--ink-2); margin: 8px 0 0; }

/* ---------- site index ---------- */
.siteindex { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; margin: 18px 0; }
.siteindex h3 { font: 600 11px var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 8px; }
.siteindex a { display: block; padding: 12px 0; border-top: 1px solid var(--line); text-decoration: none; color: inherit; }
.siteindex a b { font: 600 18px var(--serif); color: var(--red); display: block; }
.siteindex a span { font-size: 14px; color: var(--ink-2); display: block; }
.siteindex a i { font-style: normal; font-size: 12px; color: var(--ink-3); display: block; margin-top: 4px; }
.siteindex a:hover b { text-decoration: underline; }

/* ---------- sources ---------- */
.srcgroup { font-size: 19px; margin: 28px 0 8px; }
.srclist { list-style: none; padding: 0; margin: 0; }
.srclist li { padding: 12px 0; border-top: 1px solid var(--line); }
.srclist p { margin: 0 0 2px; font-size: 15px; }
.srclist .srcnote { color: var(--ink-2); font-size: 13.5px; }
.srclist a { font-size: 12.5px; word-break: break-all; }
.flash { animation: flash 1.6s ease-out; }
@keyframes flash { from { background: var(--ochre-soft); } to { background: transparent; } }
.card.flash { animation: cardflash 1.6s ease-out; }
@keyframes cardflash { from { box-shadow: 0 0 0 3px var(--ochre); } to { box-shadow: var(--shadow); } }

/* ---------- review summary ---------- */
.rvactions { display: flex; flex-wrap: wrap; gap: 8px 10px; align-items: center; }
.btn { font: 500 14px var(--sans); padding: 9px 14px; border-radius: 8px; border: 1px solid var(--ink-3); background: var(--panel); color: var(--ink); cursor: pointer; }
.btn:hover { border-color: var(--red); color: var(--red); }
.hint { font-size: 13px; color: var(--ink-3); flex: 1 1 260px; }
.rvlist { list-style: none; padding: 0; margin: 18px 0; }
.rvlist li { padding: 12px 0 12px 14px; border-top: 1px solid var(--line); border-left: 3px solid var(--line); margin-bottom: 0; }
.rvlist li[data-status='approve'] { border-left-color: var(--olive); }
.rvlist li[data-status='revise'] { border-left-color: var(--ochre); }
.rvlist li[data-status='reject'] { border-left-color: var(--red); }
.rvlist a { font: 600 16px var(--serif); margin-right: 8px; }
.rvlist p { margin: 6px 0 0; font-size: 14.5px; color: var(--ink-2); white-space: pre-wrap; }
.empty { color: var(--ink-3); padding: 18px; border: 1px dashed var(--line); border-radius: 10px; }

/* ---------- page footer ---------- */
.pf { display: flex; justify-content: space-between; gap: 16px; margin-top: 56px; padding-top: 20px; border-top: 1px solid var(--line); }
.pf a { text-decoration: none; font: 600 18px var(--serif); }
.pf a span { display: block; font: 11px var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--ink-3); }
.pf .next { text-align: right; margin-left: auto; }

/* ---------- town map ---------- */
.mapui { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 16px; margin-top: 16px; align-items: start; }
.mapstage { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; box-shadow: var(--shadow); }
.mapstage svg { display: block; width: 100%; height: auto; touch-action: manipulation; }
.mapbar { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.phase { flex: 1 1 280px; min-width: 0; }
.phase label { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; color: var(--ink-2); }
.phase label b { font: 600 15px var(--serif); color: var(--red); }
.phase input { width: 100%; accent-color: var(--red); margin: 6px 0 0; }
.phase p { font-size: 13px; color: var(--ink-2); margin: 6px 0 0; min-height: 2.9em; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.seg button { font: 500 13px var(--sans); padding: 7px 12px; min-height: 34px; border: 0; background: transparent; color: var(--ink-2); cursor: pointer; }
.seg button[aria-pressed='true'] { background: var(--red); color: var(--panel); }
.legend { display: flex; flex-wrap: wrap; gap: 6px; padding: 10px 14px; border-top: 1px solid var(--line); }
.legend button { font: 12px var(--sans); display: inline-flex; align-items: center; gap: 6px; padding: 5px 9px; min-height: 28px; border-radius: 99px; border: 1px solid var(--line); background: transparent; color: var(--ink-2); cursor: pointer; }
.legend button[aria-pressed='false'] { opacity: .45; text-decoration: line-through; }
.legend i { width: 10px; height: 10px; border-radius: 2px; display: inline-block; }
.mapnote { font-size: 12.5px; color: var(--ink-3); padding: 0 14px 12px; margin: 0; }
.mapinfo { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 18px; box-shadow: var(--shadow); position: sticky; top: calc(var(--top) + 16px); border-top: 3px solid var(--line); max-height: calc(100dvh - var(--top) - 32px); overflow: auto; }
.mapinfo h3 { font-size: 22px; }
.mapinfo .latin { font: italic 14px var(--serif); color: var(--ink-3); margin: 2px 0 0; }
.mapinfo .body { font-size: 14.5px; color: var(--ink-2); margin-top: 10px; }
.mapinfo .placeholder { color: var(--ink-3); font-size: 14.5px; }
.flist { list-style: none; margin: 12px 0 0; padding: 0; columns: 1; font-size: 13.5px; }
.flist button { all: unset; cursor: pointer; display: flex; gap: 8px; align-items: center; padding: 4px 0; color: var(--ink-2); width: 100%; }
.flist button:hover { color: var(--red); }
.flist i { width: 9px; height: 9px; border-radius: 2px; flex: none; }

.m-sea { fill: #a9cbd0; } .m-shallow { fill: #c4dcdc; } .m-beach { fill: #ead9b0; } .m-land { fill: #e6dcc3; }
.m-coast-shallow { fill: none; stroke: #c4dcdc; stroke-width: 300; stroke-linejoin: round; }
.m-coast-beach { fill: none; stroke: #ead9b0; stroke-width: 30; stroke-linejoin: round; stroke-linecap: round; }
.m-txt.bay { font: italic 150px var(--serif); fill: #86775c; }
.m-txt.bay.sm { font-size: 105px; }
.m-txt.bay.sea { fill: #5f8a91; letter-spacing: .12em; }
[data-view='town'] .baylayer { display: none; }
[data-view='centre'] .baylayer { display: none; }
[data-view='bay'] .town-only, [data-view='bay'] .centre-only, [data-view='town'] .centre-only, [data-view='centre'] .town-only { display: none; }
[data-view='centre'] .m-lab { font-size: 4.2px; stroke-width: 1.4px; }
[data-view='centre'] .m-txt:not(.bay) { display: none; }
[data-view='centre'] .feat { stroke-width: .4; }
[data-view='centre'] .feat.line { stroke-width: 1.4; }
[data-view='bay'] #labels, [data-view='bay'] .m-txt:not(.bay) { display: none; }
[data-view='bay'] .feat.line.far { stroke-width: 18; stroke-dasharray: none; }
[data-view='bay'] .m-stream { stroke-width: 16; }
[data-view='bay'] .m-road { stroke-width: 12; stroke-dasharray: 50 40; }
[data-view='bay'] .m-hill { display: none; }
.m-hill { fill: none; stroke: #b9a985; stroke-width: 1; opacity: .7; }
.m-hillfill { fill: #d8cba9; opacity: .55; }
.m-stream { fill: none; stroke: #7fb0b8; stroke-width: 2.2; stroke-linecap: round; }
.m-road { fill: none; stroke: #b59f7a; stroke-width: 3; stroke-dasharray: 7 5; }
.m-street { fill: none; stroke: #cdbf9f; stroke-linecap: square; }
.m-insula { fill: #dccfb0; opacity: .7; }
.m-txt { font: 9px var(--sans); fill: #5a5044; pointer-events: none; }
.m-txt.big { font: italic 13px var(--serif); fill: #6f8f95; letter-spacing: .2em; }
.m-txt.geo { font: italic 10px var(--serif); fill: #86775c; }
.m-lab { font: 600 7.5px var(--sans); fill: #2b2520; pointer-events: none; paint-order: stroke; stroke: #f3eee4; stroke-width: 2.4px; stroke-linejoin: round; }
.feat { cursor: pointer; stroke: #2b2520; stroke-width: .8; transition: opacity .25s, filter .15s; }
.feat.line { fill: none; stroke-width: 2.4; }
.feat:hover, .feat:focus { filter: brightness(1.12); stroke-width: 1.8; outline: none; }
.feat.line:hover, .feat.line:focus { stroke-width: 4; }
.feat.sel { stroke: #fff; stroke-width: 2.2; filter: drop-shadow(0 0 3px rgba(0, 0, 0, .7)); }
.feat.line.sel { stroke-width: 4.5; filter: drop-shadow(0 0 2px rgba(0, 0, 0, .8)); }
.gone { opacity: 0; pointer-events: none; }
@media (prefers-color-scheme: dark) {
  .m-coast-shallow { stroke: #25484d; } .m-coast-beach { stroke: #6d6045; }
  .m-txt.bay { fill: #9c8d70; } .m-txt.bay.sea { fill: #5f9299; }
  .m-sea { fill: #1d3a40; } .m-shallow { fill: #25484d; } .m-beach { fill: #6d6045; } .m-land { fill: #37312a; }
  .m-hill { stroke: #5c5140; } .m-hillfill { fill: #453d31; } .m-street { stroke: #5a5040; } .m-insula { fill: #453e33; }
  .m-road { stroke: #6f6249; } .m-stream { stroke: #3f7c85; }
  .m-txt { fill: #b9ad9b; } .m-txt.big { fill: #5f9299; } .m-txt.geo { fill: #9c8d70; }
  .m-lab { fill: #f3eee4; stroke: #171411; }
  .feat { stroke: #0e0c0a; }
}

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .mapui { grid-template-columns: minmax(0, 1fr); }
  .mapinfo { position: static; max-height: none; }
  .cols-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  .menu { display: flex; }
  .shell { grid-template-columns: minmax(0, 1fr); }
  .side {
    position: fixed; top: var(--top); left: 0; bottom: 0; width: min(86vw, 320px); z-index: 15; height: auto;
    background: var(--bg); transform: translateX(-102%); transition: transform .22s ease; box-shadow: var(--shadow);
  }
  .navopen .side { transform: none; }
  .navgroup > a { padding: 10px; font-size: 16px; }
  .subnav a { padding: 7px 8px; font-size: 14px; }
  main { padding-top: 28px; }
  .cols-2, .cols-3, .siteindex { grid-template-columns: minmax(0, 1fr); }
  .gradekey { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .timeline li { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .timeline .when { text-align: left; padding-left: 24px; }
  .save { font-size: 11px; max-width: 30vw; }
  .rv-b { min-height: 38px; padding: 8px 12px; }
  .facts div { grid-template-columns: 7.5em minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* long identifiers must never widen the page on a phone */
.facts dd, .card .body, .timeline .body, .prose { overflow-wrap: anywhere; }
