/* Magna Urbis documentation: a surveyor's atlas.
   Cartographic convention carried into the page: water in blue italic serif, places in sans,
   relief in brown, built land in brick. Colours are tokens; dark mode redefines them. */
:root {
  --paper: #f1f3ee;
  --paper-2: #e6eae2;
  --paper-3: #dbe1d6;
  --ink: #16232b;
  --ink-2: #485961;
  --ink-3: #75858b;
  --rule: #c5cec4;
  --water: #276786;
  --water-soft: #cfe1e8;
  --moss: #4b6c3a;
  --moss-soft: #d9e4cf;
  --ochre: #9c6a17;
  --ochre-soft: #f0e2c4;
  --brick: #96462f;
  --brick-soft: #efd9d0;
  --relief: #7b5b3a;
  --land: #e4ddc3;
  --sea: #d3e4ea;
  --shadow: 0 1px 0 rgba(22, 35, 43, .06), 0 8px 24px -16px rgba(22, 35, 43, .35);
  --serif: Charter, "Bitstream Charter", "Sitka Text", Cambria, "Iowan Old Style", Georgia, serif;
  --sans: "Gill Sans Nova", "Gill Sans", "Seravek", "Segoe UI Variable Text", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --mono: "Cascadia Mono", "SF Mono", Consolas, "Liberation Mono", monospace;
  --measure: 44rem;
  --wide: 70rem;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #0e1518; --paper-2: #151f23; --paper-3: #1d2a2f; --ink: #e1e8e4; --ink-2: #a3b3b5; --ink-3: #75878a;
    --rule: #2a393e; --water: #74b6d1; --water-soft: #16323d; --moss: #98b983; --moss-soft: #1d2c1c;
    --ochre: #dba852; --ochre-soft: #33280f; --brick: #da8a70; --brick-soft: #3a211a; --relief: #c9a27a;
    --land: #2a2a20; --sea: #12303b; --shadow: 0 1px 0 rgba(0, 0, 0, .3), 0 10px 28px -18px rgba(0, 0, 0, .8);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #0e1518; --paper-2: #151f23; --paper-3: #1d2a2f; --ink: #e1e8e4; --ink-2: #a3b3b5; --ink-3: #75878a;
  --rule: #2a393e; --water: #74b6d1; --water-soft: #16323d; --moss: #98b983; --moss-soft: #1d2c1c;
  --ochre: #dba852; --ochre-soft: #33280f; --brick: #da8a70; --brick-soft: #3a211a; --relief: #c9a27a;
  --land: #2a2a20; --sea: #12303b; --shadow: 0 1px 0 rgba(0, 0, 0, .3), 0 10px 28px -18px rgba(0, 0, 0, .8);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-padding-top: 1.5rem; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 1.075rem/1.68 var(--serif); font-kerning: normal; font-variant-numeric: oldstyle-nums proportional-nums;
  text-rendering: optimizeLegibility;
}
a { color: var(--water); text-decoration-thickness: .06em; text-underline-offset: .18em; }
a:hover { text-decoration-thickness: .12em; }
:focus-visible { outline: 2px solid var(--ochre); outline-offset: 2px; border-radius: 2px; }
img, svg { max-width: 100%; height: auto; }
code, kbd { font-family: var(--mono); font-size: .84em; background: var(--paper-2); border: 1px solid var(--rule); border-radius: 3px; padding: .05em .3em; font-variant-numeric: lining-nums; }
pre { font: .86rem/1.55 var(--mono); background: var(--paper-2); border: 1px solid var(--rule); border-radius: 6px; padding: .9rem 1.1rem; overflow-x: auto; }
pre code { background: none; border: 0; padding: 0; }
.skip { position: absolute; left: -999px; top: 0; background: var(--ink); color: var(--paper); padding: .5rem 1rem; z-index: 9; }
.skip:focus { left: 1rem; }

/* ---------- frame ---------- */
.frame { display: grid; grid-template-columns: 17.5rem minmax(0, 1fr); min-height: 100vh; }
.rail {
  position: sticky; top: 0; height: 100vh; overflow-y: auto; padding: 1.6rem 1.2rem 2rem 1.6rem;
  border-right: 1px solid var(--rule); background: var(--paper-2); font-family: var(--sans);
}
.brand { display: flex; gap: .7rem; align-items: center; text-decoration: none; color: var(--ink); }
.brand img { width: 2.3rem; height: 2.3rem; border-radius: 50%; }
.brand span { font-size: 1.02rem; font-weight: 600; letter-spacing: .01em; line-height: 1.2; }
.brand small { display: block; font-weight: 400; color: var(--ink-2); font-size: .82rem; }
.switches { display: flex; flex-wrap: wrap; gap: .4rem; margin: 1.1rem 0 1.3rem; font-size: .85rem; }
.switches a, .switches button {
  font: inherit; color: var(--ink-2); background: transparent; border: 1px solid var(--rule); border-radius: 999px;
  padding: .18rem .7rem; text-decoration: none; cursor: pointer;
}
.switches a[aria-current] { color: var(--paper); background: var(--ink); border-color: var(--ink); }
.switches a:hover, .switches button:hover { border-color: var(--ink-2); color: var(--ink); }

/* The route: chapters are stations along one line, because the pipeline is a sequence. */
.route { list-style: none; margin: 0; padding: 0; position: relative; font-size: .9rem; }
.route::before { content: ""; position: absolute; left: .42rem; top: .7rem; bottom: .7rem; width: 2px; background: linear-gradient(var(--relief), var(--water) 32%, var(--moss) 52%, var(--brick) 75%, var(--ochre)); border-radius: 2px; opacity: .55; }
.route li { position: relative; padding-left: 1.6rem; }
.route a { display: block; padding: .26rem 0; color: var(--ink-2); text-decoration: none; line-height: 1.3; }
.route a::before { content: ""; position: absolute; left: .14rem; top: .62rem; width: .62rem; height: .62rem; border-radius: 50%; background: var(--paper-2); border: 2px solid var(--ink-3); }
.route a:hover { color: var(--ink); }
.route a[aria-current="true"] { color: var(--ink); font-weight: 600; }
.route a[aria-current="true"]::before { background: var(--ochre); border-color: var(--ochre); }
.route .part { padding: .9rem 0 .2rem 1.6rem; color: var(--ink-3); font-size: .78rem; letter-spacing: .02em; }
.rail .filter { margin-top: 1.3rem; }
.rail .filter label { display: block; font-size: .8rem; color: var(--ink-2); margin-bottom: .3rem; }
.rail input[type="search"] { width: 100%; font: inherit; font-size: .9rem; padding: .45rem .6rem; border: 1px solid var(--rule); border-radius: 6px; background: var(--paper); color: var(--ink); }
.rail .note { margin-top: 1.4rem; font-size: .78rem; color: var(--ink-3); line-height: 1.45; }
.menu-toggle { display: none; }

main { padding: 0 clamp(1rem, 4vw, 4rem) 6rem; min-width: 0; }

/* ---------- hero ---------- */
.hero { max-width: var(--wide); margin: 0 auto; padding: 3.2rem 0 1rem; }
.hero h1 {
  font: 600 clamp(2.3rem, 4.6vw, 3.9rem)/1.04 var(--sans); letter-spacing: -.02em; margin: 0 0 1rem; max-width: 18ch;
}
.hero .lead { font-size: 1.22rem; line-height: 1.55; color: var(--ink-2); max-width: 38rem; margin: 0 0 .8rem; }
.hero .credit { font: .9rem/1.45 var(--sans); color: var(--ink-3); max-width: 38rem; margin: 0 0 1.8rem; }
.hero .section-figure { margin: 0; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(10.5rem, 1fr)); gap: 1px; background: var(--rule); border: 1px solid var(--rule); border-radius: 8px; overflow: hidden; margin: 2rem 0 0; font-family: var(--sans); }
.facts div { background: var(--paper); padding: .9rem 1rem; }
.facts b { display: block; font-size: 1.55rem; font-weight: 600; letter-spacing: -.01em; font-variant-numeric: lining-nums; }
.facts span { font-size: .85rem; color: var(--ink-2); }

/* ---------- chapters ---------- */
.chapter { max-width: var(--wide); margin: 0 auto; padding: 3.4rem 0 1rem; border-top: 1px solid var(--rule); }
.chapter-head { display: grid; grid-template-columns: 4.5rem minmax(0, var(--measure)); gap: 0 1.2rem; align-items: start; }
.chapter-no { font: 300 3.4rem/1 var(--sans); color: var(--ink-3); font-variant-numeric: lining-nums tabular-nums; padding-top: .2rem; }
.chapter h2 { font: 600 clamp(1.7rem, 2.6vw, 2.25rem)/1.12 var(--sans); letter-spacing: -.012em; margin: 0 0 .25rem; }
.chapter .kicker { font: 1rem/1.45 var(--sans); color: var(--ink-2); margin: 0 0 1.3rem; }
.prose { margin-left: 5.7rem; }
.prose > * { max-width: var(--measure); }
.prose > .wide { max-width: none; margin-left: -5.7rem; }
.prose > p, .prose > ul, .prose > ol { margin: 0 0 1rem; }
.prose h3 { font: 600 1.2rem/1.3 var(--sans); margin: 2.2rem 0 .6rem; letter-spacing: -.005em; }
.prose li { margin: .25rem 0; }
.prose li::marker { color: var(--ink-3); }
.prose strong { font-weight: 600; }
.water-name { font-style: italic; color: var(--water); }
.callout { border-left: 3px solid var(--ochre); background: var(--ochre-soft); padding: .8rem 1rem; border-radius: 0 6px 6px 0; margin: 1.4rem 0; font-size: 1rem; }
.callout.limit { border-color: var(--brick); background: var(--brick-soft); }
.callout b:first-child { font-family: var(--sans); font-weight: 600; }
.formula { font: 1rem/1.7 var(--mono); background: var(--paper-2); border: 1px solid var(--rule); border-radius: 6px; padding: .8rem 1.1rem; overflow-x: auto; white-space: pre; }
table { border-collapse: collapse; width: 100%; font: .93rem/1.45 var(--sans); margin: 1rem 0 1.4rem; font-variant-numeric: lining-nums tabular-nums; }
th { text-align: left; font-weight: 600; color: var(--ink-2); border-bottom: 1.5px solid var(--ink-3); padding: .45rem .6rem .45rem 0; }
td { border-bottom: 1px solid var(--rule); padding: .45rem .6rem .45rem 0; vertical-align: top; }
td.num, th.num { text-align: right; }
.table-wrap { overflow-x: auto; }

/* ---------- figures ---------- */
.section-figure { margin: 2rem 0 2.2rem; }
.hero .section-figure.wide { margin-left: 0; }
.section-figure svg, .section-figure img { display: block; width: 100%; height: auto; }
.section-figure .plate { background: var(--paper-2); border: 1px solid var(--rule); border-radius: 10px; padding: clamp(.6rem, 1.6vw, 1.4rem); box-shadow: var(--shadow); }
figcaption { font: .86rem/1.45 var(--sans); color: var(--ink-2); margin-top: .7rem; max-width: var(--measure); }
figcaption b { color: var(--ink); font-weight: 600; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr)); gap: .9rem; }
.gallery figure { margin: 0; }
.gallery img { border-radius: 6px; border: 1px solid var(--rule); aspect-ratio: 4 / 3; object-fit: cover; background: var(--paper-3); }
.gallery figcaption { margin-top: .35rem; font-size: .82rem; }

/* SVG diagram vocabulary (inline, so it follows the theme). */
.dg { font-family: var(--sans); }
.dg text { fill: var(--ink); font-size: 13px; }
.dg .t-small { font-size: 11.5px; fill: var(--ink-2); }
.dg .t-body { font-size: 13px; fill: var(--ink); }
.dg .t-note { font-size: 11.5px; fill: var(--ink-2); }
.dg .t-head { font-size: 14px; font-weight: 600; }
.dg .t-big { font-size: 17px; font-weight: 600; }
.dg .t-water { font-family: var(--serif); font-style: italic; fill: var(--water); }
.dg .t-relief { fill: var(--relief); }
.dg .t-town { fill: var(--brick); font-weight: 600; }
.dg .t-mono { font-family: var(--mono); font-size: 11px; fill: var(--ink-2); }
.dg .bx { fill: var(--paper); stroke: var(--ink-3); stroke-width: 1.2; }
.dg .bx.relief { fill: var(--land); stroke: var(--relief); }
.dg .bx.water { fill: var(--water-soft); stroke: var(--water); }
.dg .bx.moss { fill: var(--moss-soft); stroke: var(--moss); }
.dg .bx.town { fill: var(--brick-soft); stroke: var(--brick); }
.dg .bx.ochre { fill: var(--ochre-soft); stroke: var(--ochre); }
.dg .bx.ghost { fill: none; stroke-dasharray: 4 4; }
.dg .band { fill: var(--paper-3); stroke: none; }
.dg .ln { fill: none; stroke: var(--ink-2); stroke-width: 1.4; }
.dg .ln.dash { stroke-dasharray: 5 4; }
.dg .ln.water { stroke: var(--water); }
.dg .ln.relief { stroke: var(--relief); }
.dg .ln.town { stroke: var(--brick); }
.dg .ln.ochre { stroke: var(--ochre); }
.dg .ln.moss { stroke: var(--moss); }
.dg .ln.thin { stroke-width: .8; }
.dg .ln.thick { stroke-width: 2.6; }
.dg .head { fill: var(--ink-2); }
.dg .head.water { fill: var(--water); }
.dg .head.ochre { fill: var(--ochre); }
.dg .head.town { fill: var(--brick); }
.dg .f-land { fill: var(--land); }
.dg .f-sea { fill: var(--sea); }
.dg .f-water { fill: var(--water); }
.dg .f-moss { fill: var(--moss); }
.dg .f-moss-soft { fill: var(--moss-soft); }
.dg .f-relief { fill: var(--relief); }
.dg .f-town { fill: var(--brick); }
.dg .f-town-soft { fill: var(--brick-soft); }
.dg .f-ochre { fill: var(--ochre); }
.dg .f-ochre-soft { fill: var(--ochre-soft); }
.dg .f-paper { fill: var(--paper); }
.dg .f-paper2 { fill: var(--paper-2); }
.dg .f-paper3 { fill: var(--paper-3); }
.dg .f-ink { fill: var(--ink); }
.dg .f-ink2 { fill: var(--ink-2); }
.dg .s-ink { stroke: var(--ink); }
.dg .s-paper { stroke: var(--paper); }
.dg .nofill { fill: none; }

/* ---------- stage cards ---------- */
.stages { margin: 2rem 0 0 5.7rem; max-width: 52rem; }
.stages > h3 { font: 600 .95rem/1.3 var(--sans); color: var(--ink-2); margin: 0 0 .6rem; }
details.stage { border: 1px solid var(--rule); border-left: 3px solid var(--ochre); border-radius: 0 8px 8px 0; background: var(--paper); margin: 0 0 .55rem; }
details.stage[open] { background: var(--paper-2); box-shadow: var(--shadow); }
details.stage > summary { list-style: none; cursor: pointer; padding: .65rem 1rem .65rem 1rem; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .1rem 1rem; align-items: baseline; font-family: var(--sans); }
details.stage > summary::-webkit-details-marker { display: none; }
details.stage > summary .name { font-weight: 600; font-size: 1rem; }
details.stage > summary .name::before { content: "+"; display: inline-block; width: 1.1rem; color: var(--ochre); font-weight: 400; }
details.stage[open] > summary .name::before { content: "–"; }
details.stage > summary code { justify-self: end; font-size: .76rem; color: var(--ink-2); }
details.stage > summary .gist { grid-column: 1 / -1; font: .9rem/1.45 var(--serif); color: var(--ink-2); padding-left: 1.1rem; }
details.stage[open] > summary .gist { display: none; }
.stage-body { padding: 0 1.2rem 1rem 2.1rem; }
.stage-body dl { display: grid; grid-template-columns: 7.2rem minmax(0, 1fr); gap: .5rem 1rem; margin: .2rem 0 .6rem; }
.stage-body dt { font: 600 .82rem/1.6 var(--sans); color: var(--ink-2); }
.stage-body dd { margin: 0; font-size: .98rem; line-height: 1.58; }
.chips { display: flex; flex-wrap: wrap; gap: .35rem; margin: .1rem 0 .7rem; font: .78rem/1 var(--sans); }
.chip { border: 1px solid var(--rule); border-radius: 999px; padding: .28rem .6rem; color: var(--ink-2); background: var(--paper); }
.chip.req { border-color: var(--ochre); color: var(--ochre); }
.code-links { font: .82rem/1.5 var(--sans); color: var(--ink-3); }
.code-links a { font-family: var(--mono); font-size: .78rem; }
details.stage:target, details.stage.is-target { outline: 2px solid var(--ochre); outline-offset: 3px; }

/* ---------- glossary & references ---------- */
.glossary { display: grid; grid-template-columns: 11rem minmax(0, 1fr); gap: .5rem 1.2rem; }
.glossary dt { font: 600 .95rem/1.5 var(--sans); }
.glossary dd { margin: 0; }
.refs { padding-left: 1.2rem; }
.refs li { margin: .45rem 0; font-size: .98rem; }
.refs .why { color: var(--ink-2); }

footer.site { max-width: var(--wide); margin: 4rem auto 0; padding-top: 1.4rem; border-top: 1px solid var(--rule); font: .85rem/1.5 var(--sans); color: var(--ink-3); }

.is-filtered-out { display: none !important; }

/* ---------- small screens ---------- */
@media (max-width: 960px) {
  .frame { grid-template-columns: 1fr; }
  .rail { position: sticky; top: 0; height: auto; max-height: 100vh; z-index: 5; padding: .7rem 1rem; border-right: 0; border-bottom: 1px solid var(--rule); }
  .rail .brand img { width: 1.8rem; height: 1.8rem; }
  .menu-toggle { display: inline-block; position: absolute; right: 1rem; top: .85rem; font: .85rem var(--sans); background: var(--paper); color: var(--ink); border: 1px solid var(--rule); border-radius: 999px; padding: .2rem .8rem; }
  .rail:not(.open) .switches, .rail:not(.open) nav, .rail:not(.open) .filter, .rail:not(.open) .note { display: none; }
  .chapter-head { grid-template-columns: 1fr; }
  .chapter-no { font-size: 1.1rem; font-weight: 600; color: var(--ochre); }
  .prose, .stages { margin-left: 0; }
  .prose > .wide { margin-left: 0; }
  .stage-body { padding-left: 1rem; }
  .stage-body dl { grid-template-columns: 1fr; gap: .1rem; }
  .stage-body dd { margin-bottom: .5rem; }
  .glossary { grid-template-columns: 1fr; gap: .1rem; }
  .glossary dd { margin-bottom: .6rem; }
}

@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; } }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

@media print {
  .frame { display: block; }
  .rail, .menu-toggle { display: none; }
  body { background: #fff; color: #000; font-size: 10.5pt; }
  .chapter { break-before: page; border: 0; }
  details.stage { break-inside: avoid; }
  .section-figure .plate { box-shadow: none; }
}

.is-hidden-era { display: none !important; }
.filter-status { font: .8rem var(--sans); color: var(--ink-3); margin: .3rem 0 0; min-height: 1em; }

/* ---------- catalogue (architectural styles) ---------- */

.cat-how .prose, .cat-close .prose { margin-left: 0; }
.cat-how .section-figure { margin-left: 0; }
.culture-group { padding-top: 2.6rem; }
.group-head { display: flex; align-items: baseline; gap: .8rem; margin-bottom: 1.2rem; }
.group-head h2 { font: 600 clamp(1.5rem, 2.3vw, 1.95rem)/1.15 var(--sans); letter-spacing: -.012em; margin: 0; }
.group-count { font: .95rem var(--sans); color: var(--ink-3); font-variant-numeric: lining-nums; }
.culture-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 20rem), 1fr)); gap: 1.2rem; align-items: start; }
.culture { display: flex; flex-direction: column; min-width: 0; border: 1px solid var(--rule); border-radius: 10px; background: var(--paper); overflow: hidden; box-shadow: var(--shadow); }
.culture:target { outline: 2px solid var(--ochre); outline-offset: 2px; }
.culture-media { position: relative; aspect-ratio: 720 / 514; background: var(--paper-3); border-bottom: 1px solid var(--rule); }
.culture-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.culture-media .img-3d { display: none; }
.culture[data-show="3d"] .img-3d { display: block; }
.culture[data-show="3d"] .img-2d { display: none; }
.view-toggle { position: absolute; left: .6rem; bottom: .6rem; display: flex; border: 1px solid var(--rule); border-radius: 999px; overflow: hidden; background: var(--paper); font: .78rem/1 var(--sans); }
.view-toggle button { font: inherit; border: 0; background: transparent; color: var(--ink-2); padding: .38rem .7rem; cursor: pointer; }
.view-toggle button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.culture-body { padding: .9rem 1rem 1rem; display: flex; flex-direction: column; gap: .6rem; min-width: 0; }
.culture-body h3 { font: 600 1.1rem/1.25 var(--sans); margin: 0; letter-spacing: -.005em; overflow-wrap: anywhere; }
.culture-meta { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; margin: 0; }
.culture-meta code { font-size: .76rem; }
.culture-desc { margin: 0; font-size: .93rem; line-height: 1.5; color: var(--ink-2); }
.culture-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .35rem 1rem; margin: 0; font-family: var(--sans); }
.culture-facts dt { font-size: .72rem; color: var(--ink-3); }
.culture-facts dd { margin: 0; font-size: .9rem; }
.culture-plate { width: 100%; height: auto; border: 1px solid var(--rule); border-radius: 6px; background: var(--paper-2); color: var(--ink); }
button.chip { font: inherit; font-size: .78rem; line-height: 1; cursor: pointer; }
button.chip:hover { border-color: var(--ink-2); color: var(--ink); }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.chip.era-historical { border-color: var(--ochre); color: var(--ochre); }
.chip.era-fantasy { border-color: var(--moss); color: var(--moss); }
.chip.era-camp { border-color: var(--relief); color: var(--relief); }
.chip.era-modern { border-color: var(--water); color: var(--water); }
.chip.era-futuristic { border-color: var(--brick); color: var(--brick); }
.chip.era-alien { border-color: var(--ink-2); color: var(--ink); }
.era-chips { margin-top: .9rem; }
.culture-more { border-top: 1px solid var(--rule); padding-top: .5rem; font-family: var(--sans); }
.culture-more summary { cursor: pointer; font-size: .88rem; color: var(--ink-2); }
.culture-more table { font-size: .82rem; margin: .6rem 0; }
.culture-more th, .culture-more td { padding: .3rem .4rem .3rem 0; }
.culture-more h4 { font: 600 .82rem var(--sans); color: var(--ink-2); margin: .8rem 0 .3rem; }
.plan-bars { list-style: none; margin: 0; padding: 0; display: grid; gap: .25rem; }
.plan-bars li { display: grid; grid-template-columns: 5.2rem minmax(0, 1fr); gap: .6rem; align-items: center; font-size: .8rem; }
.plan-bars i { display: block; height: .5rem; width: var(--w); background: var(--ochre); border-radius: 2px; }
.culture-extra { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .4rem 1rem; margin: .8rem 0 0; }
.culture-extra dt { font-size: .72rem; color: var(--ink-3); }
.culture-extra dd { margin: 0; font-size: .85rem; overflow-wrap: anywhere; }
.culture-extra code { font-size: .74rem; }
@media (max-width: 960px) { .hero { padding-top: 2rem; } .hero .lead { font-size: 1.08rem; } }
.facts-six { grid-template-columns: repeat(6, minmax(0, 1fr)); }
@media (max-width: 760px) { .facts-six { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.cat-how h2, .cat-close h2 { font: 600 clamp(1.5rem, 2.3vw, 1.95rem)/1.15 var(--sans); letter-spacing: -.012em; margin: 0 0 1rem; }
.culture-meta .chip { font: .74rem/1 var(--sans); padding: .26rem .6rem; background: transparent; }
.culture-more th { font-size: .74rem; vertical-align: bottom; }
@media (max-width: 760px) { .cat-how .plate { overflow-x: auto; } .cat-how .plate svg { min-width: 640px; } }

/* Wide diagrams scroll sideways on phones rather than shrinking below legibility. */
@media (max-width: 700px) {
  .prose .section-figure .plate { overflow-x: auto; }
  .prose .section-figure .plate > svg { min-width: 680px; }
}
