/* Potop.org — one stylesheet. EB Garamond throughout; palette tokens below.
   Status vocabulary: colour = family of evidence (ink attested, brass contested
   or traditional, slate invented), line style = shade within the family,
   dashed outline = unknown. The same mapping drives badges and callouts.
   Layer vocabulary: history = solid ink rule, novel = double oxblood rule,
   film = dotted slate rule (perforation). Used on home, entity and compare. */

@font-face { font-family: "EB Garamond"; font-style: normal; font-weight: 400 600; font-display: swap;
  src: url(/assets/fonts/ebgaramond-400-600-normal-latin-ext.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "EB Garamond"; font-style: normal; font-weight: 400 600; font-display: swap;
  src: url(/assets/fonts/ebgaramond-400-600-normal-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "EB Garamond"; font-style: italic; font-weight: 400; font-display: swap;
  src: url(/assets/fonts/ebgaramond-400-italic-latin-ext.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "EB Garamond"; font-style: italic; font-weight: 400; font-display: swap;
  src: url(/assets/fonts/ebgaramond-400-italic-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  --paper: #f4efe6;
  --ink: #1d1a17;
  --ink-soft: #4b443d;
  --rule: #d9cfbf;
  --oxblood: #6e1f1f;
  --brass: #8a6d2f;
  /* Derived tokens: text-safe shades of the accents, re-tuned for the dark scheme. */
  --accent: var(--oxblood);
  --brass-ink: #6f5620;
  --slate: #3a4a5c;
  --tint: rgb(29 26 23 / 0.045);
  --serif: "EB Garamond", Garamond, "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --measure: 68ch;
  --gutter: 2rem;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #17150f;
    --ink: #ece5d8;
    --ink-soft: #b8ad9c;
    --rule: #3a342a;
    --accent: #d99a8a;
    --brass-ink: #cdab62;
    --slate: #9db0c6;
    --tint: rgb(236 229 216 / 0.05);
  }
}

/* Base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: clamp(1.125rem, 1.02rem + 0.4vw, 1.3125rem);
  line-height: 1.55;
  font-kerning: normal;
  font-variant-numeric: oldstyle-nums proportional-nums;
  font-variant-ligatures: common-ligatures;
  text-rendering: optimizeLegibility;
  overflow-wrap: break-word;
}
[hidden] { display: none !important; }
img, svg { max-width: 100%; height: auto; }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 0.16em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
h1, h2, h3 { font-weight: 500; line-height: 1.15; text-wrap: balance; margin: 2em 0 0.5em; }
h1 { font-size: clamp(2.3rem, 1.4rem + 3.4vw, 3.75rem); letter-spacing: -0.022em; line-height: 1.04; margin: 0.2em 0 0.35em; }
h2 { font-size: 1.6em; letter-spacing: -0.01em; }
h3 { font-size: 1.22em; font-weight: 600; }
p, ul, ol, dl { margin: 0 0 1em; }
small { font-size: 0.85em; color: var(--ink-soft); }
cite { font-style: italic; }
.muted { color: var(--ink-soft); }
input, button { font: inherit; color: inherit; }
button {
  cursor: pointer; background: var(--ink); color: var(--paper);
  border: 1px solid var(--ink); border-radius: 2px; padding: 0.2em 0.8em 0.3em;
}
button:hover { background: var(--accent); border-color: var(--accent); }
input[type=search] {
  background: var(--paper); border: 1px solid var(--rule); border-radius: 2px;
  padding: 0.2em 0.55em 0.3em; min-width: 0;
}
input[type=search]:focus-visible { border-color: var(--ink-soft); outline-offset: 0; }
input[type=checkbox] { accent-color: var(--oxblood); width: 1em; height: 1em; margin: 0 0.35em 0 0; vertical-align: -0.1em; }

/* Small caps are the one label voice: layers, statuses, captions, apparatus headings. */
.badge, .status-label, .layer > h2, .compare-col > .kicker, .artifact figcaption,
.relations > h2, .sources-for-page > h2, .footnotes > h2, .filters legend, .lang-tag,
.source-fields dt, .nav-toggle {
  font-variant-caps: all-small-caps; letter-spacing: 0.06em; font-variant-numeric: lining-nums;
}
.artifact figcaption { font-variant-caps: small-caps; letter-spacing: 0.03em; }

.skip { position: absolute; left: 1rem; top: -4rem; background: var(--ink); color: var(--paper); padding: 0.4rem 0.8rem; z-index: 1000; }
.skip:focus { top: 1rem; }

/* Masthead */
.masthead {
  max-width: 72rem; margin: 0 auto; padding: 1.6rem var(--gutter) 0; position: relative;
  display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 0.75rem 1.5rem;
}
.brand {
  color: var(--ink); text-decoration: none; font-size: 1.9rem; font-weight: 600;
  letter-spacing: -0.02em; line-height: 1; display: flex; flex-direction: column; gap: 0.3rem;
}
.brand small { font-size: 1rem; font-weight: 400; font-style: italic; letter-spacing: 0; color: var(--ink-soft); }
.brand:hover { color: var(--accent); }
.nav-toggle { display: none; }
.nav {
  flex-basis: 100%; display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.35rem 1.15rem;
  border-top: 1px solid var(--ink); border-bottom: 1px solid var(--rule);
  padding: 0.55rem 0 0.6rem; font-size: 1.02rem;
}
.nav > a { color: var(--ink); text-decoration: none; padding-bottom: 0.1rem; border-bottom: 1px solid transparent; }
.nav > a:hover { color: var(--accent); border-bottom-color: currentColor; }
.nav > a[aria-current="page"] { color: var(--accent); border-bottom: 2px solid var(--accent); }
.search { margin-left: auto; display: flex; gap: 0.35rem; font-size: 0.95rem; }
.search input { width: 11rem; }
.nav > a.lang { position: absolute; top: 1.6rem; right: var(--gutter); font-style: italic; color: var(--ink-soft); }

/* Main column */
.main { max-width: 72rem; margin: 0 auto; padding: 2.75rem var(--gutter) 1rem; }
.main > h1 { max-width: 20em; }
.main > p { max-width: var(--measure); }
.main > section > h2 { margin-top: 2.2em; }
.main > section > h2 > a { color: var(--ink); text-decoration: none; }
.main > section > h2 > a:hover { color: var(--accent); text-decoration: underline; text-decoration-thickness: 1px; }

.notice {
  max-width: var(--measure); background: var(--tint); border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule);
  padding: 0.6rem 1rem; font-style: italic; color: var(--ink-soft); margin-bottom: 2rem;
}

/* Entity page */
.entity > * { max-width: var(--measure); }
.entity-head { margin-bottom: 2.25rem; }
.kicker { font-style: italic; color: var(--ink-soft); margin: 0; }
.dates { font-size: 1.15em; color: var(--ink-soft); margin: 0 0 0.6rem; }
.entity-head .badge { margin-bottom: 1rem; }
.summary { font-size: 1.22em; line-height: 1.45; margin: 0.2rem 0 1.1rem; }
.names { display: flex; flex-wrap: wrap; gap: 0.15rem 1.4rem; font-size: 0.95em; margin: 0; padding-top: 0.7rem; border-top: 1px solid var(--rule); }
.names dt { flex-basis: 100%; font-style: italic; color: var(--ink-soft); }
.names dd { margin: 0; }
.lang-tag { color: var(--ink-soft); margin-right: 0.15em; }

/* Artifacts: the image sits on a mat of paper inside a hairline frame. */
.artifact { margin: 0 0 2.25rem; max-width: 22rem; }
.artifact img { display: block; background: var(--paper); border: 1px solid var(--rule); outline: 1px solid var(--rule); outline-offset: 4px; padding: 0.6rem; margin: 5px; width: calc(100% - 10px); }
.artifact figcaption { font-size: 0.88rem; line-height: 1.4; color: var(--ink-soft); margin-top: 0.8rem; padding-top: 0.45rem; border-top: 1px solid var(--rule); }
.minimap { height: 16rem; max-width: 22rem; margin: 0 0 2.25rem; border: 1px solid var(--rule); background: var(--tint); }
@media (min-width: 70rem) {
  .entity > .artifact, .entity > .minimap { float: right; clear: right; width: 18rem; margin-left: 2.5rem; }
  .entity > .layers { clear: both; }
}

/* Prose */
.prose { hyphens: auto; }
.prose > p:first-child { margin-top: 0; }
.prose h2 { font-size: 1.5em; }
.prose blockquote { margin: 1.5em 0; padding-left: 1.25rem; border-left: 1px solid var(--rule); font-style: italic; }
.prose ul, .prose ol { padding-left: 1.3em; }
a.ent { text-decoration-style: dotted; text-decoration-thickness: 1px; }
a.ent:hover { text-decoration-style: solid; }
.cite { font-size: 0.68em; line-height: 0; vertical-align: 0.6em; font-variant-numeric: lining-nums; margin-left: 0.04em; }
.cite a { text-decoration: none; }
.cite a:hover { text-decoration: underline; }

/* Status: callouts and badges share one vocabulary. */
.status, .badge { --st: var(--ink); --st-text: var(--ink); --st-line: solid; --st-w: 3px; }
.status-fact, .status-documented, .badge-documented, .badge-historical { --st: var(--ink); --st-text: var(--ink); }
.status-estimated { --st: var(--ink-soft); --st-text: var(--ink-soft); }
.status-disputed, .badge-disputed, .status-legend, .badge-legend,
.status-traditional, .badge-traditional { --st: var(--brass); --st-text: var(--brass-ink); }
.status-legend, .badge-legend { --st-line: double; --st-w: 5px; }
.status-traditional, .badge-traditional { --st-line: dotted; --st-w: 4px; }
.status-fiction, .badge-fictional, .status-film,
.badge-fictionalized, .badge-composite, .badge-inspired { --st: var(--slate); --st-text: var(--slate); }
.status-film { --st-line: dotted; --st-w: 4px; }
.badge-fictionalized, .badge-composite, .badge-inspired { --st-line: double; --st-w: 5px; }
@media (prefers-color-scheme: dark) {
  .status-disputed, .badge-disputed, .status-legend, .badge-legend,
  .status-traditional, .badge-traditional { --st: var(--brass-ink); }
}

.badge {
  display: inline-block; font-size: 1rem; line-height: 1.25; color: var(--st-text);
  border-left: var(--st-w) var(--st-line) var(--st); background: var(--tint);
  padding: 0.05rem 0.55rem 0.15rem 0.5rem; max-width: 100%; white-space: normal; vertical-align: 0.08em;
}
.status {
  display: block; margin: 1.6em 0; padding: 0.75rem 1.1rem 0.1rem;
  border-left: var(--st-w) var(--st-line) var(--st); background: var(--tint);
}
.status-label { display: block; color: var(--st-text); font-size: 1.05rem; font-weight: 600; margin-bottom: 0.25rem; }
.status > p { margin-bottom: 0.7rem; }
.status-unknown, .badge-unknown { --st: var(--ink-soft); --st-text: var(--ink-soft); border: 1px dashed var(--ink-soft); background: transparent; }
.status-unknown { padding-left: calc(1.1rem + 2px); }

/* Apparatus: footnotes, relations, sources — set like the back matter of a book. */
.footnotes { margin-top: 2.5rem; font-size: 0.9em; line-height: 1.45; hyphens: manual; }
.footnotes > h2, .relations > h2, .sources-for-page > h2 {
  font-size: 1.05rem; font-weight: 600; color: var(--ink-soft); margin: 0 0 0.75rem; padding-top: 0.6rem;
  border-top: 1px solid var(--ink-soft); width: max-content; max-width: 100%; padding-right: 3rem;
}
.footnotes ol { padding-left: 1.6em; }
.footnotes li { padding-left: 0.2em; margin-bottom: 0.35em; }
.footnotes li::marker { font-variant-numeric: lining-nums; color: var(--ink-soft); }
.footnotes li:target { background: color-mix(in srgb, var(--brass) 16%, transparent); outline: 4px solid color-mix(in srgb, var(--brass) 16%, transparent); }
.relations, .sources-for-page { margin-top: 3rem; }
.relations h3 { font-size: 1em; font-weight: 400; font-style: italic; color: var(--ink-soft); margin: 1.1em 0 0.3em; }
.relations ul, .sources-for-page ul, .entity-source ul { padding-left: 1.1em; }
.relations li, .sources-for-page li { margin-bottom: 0.35em; }
.relations li::marker, .sources-for-page li::marker, .entity-source li::marker, .map-list li::marker { color: var(--brass); }
.relations .badge { margin-left: 0.3em; }
.sources-for-page { font-size: 0.95em; }
.level { color: var(--ink-soft); font-style: italic; }

.tags { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 2rem 0 0; }
.tag { font-size: 0.88rem; color: var(--ink-soft); border: 1px solid var(--rule); padding: 0.05rem 0.5rem 0.12rem; }

/* The three layers — the recurring element. */
.layer-history, .compare-history, .three-layers > li:nth-child(1) { --layer: var(--ink); --layer-rule: 3px solid var(--ink); }
.layer-novel, .compare-novel, .three-layers > li:nth-child(2) { --layer: var(--accent); --layer-rule: 5px double var(--accent); }
.layer-film, .compare-film, .three-layers > li:nth-child(3) { --layer: var(--slate); --layer-rule: 4px dotted var(--slate); }

.entity > .layers { max-width: none; }
.layers { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.25rem; margin: 3.25rem 0 0; }
.layers > h2 { font-size: 1.35rem; margin: 0; }
.layer { border-top: 1px solid var(--rule); padding-top: 1rem; display: grid; grid-template-columns: 7rem minmax(0, 1fr); gap: 1rem; }
.layer > h3 { font: 600 .78rem/1.4 var(--sans, Arial, sans-serif); letter-spacing: .12em; text-transform: uppercase; color: var(--layer); margin: .55rem 0 0; }
.layer ul { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .25rem 1.5rem; }
.layer li { margin: 0; min-width: 0; line-height: 1.4; }
.layer a { display: block; padding: .45rem 0; overflow-wrap: anywhere; text-underline-offset: .2em; }
@media (max-width: 600px) {
  .layer { grid-template-columns: minmax(0, 1fr); gap: .65rem; }
  .layer > h3 { margin: 0; }
  .layer ul { grid-template-columns: minmax(0, 1fr); }
}

.compare { display: grid; gap: 2rem; margin: 1rem 0 2.5rem; }
.compare-col { border-top: var(--layer-rule); padding-top: 0.7rem; hyphens: auto; }
.compare-col > .kicker { font-style: normal; font-weight: 600; font-size: 1.05rem; color: var(--layer); margin-bottom: 0.6rem; }
.compare-col h2 { font-size: 1.3em; margin-top: 0; }
.entity > .compare { max-width: none; }
@media (min-width: 900px) { .compare { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 2rem; } }

/* Home */
.hero { padding: 1.5rem 0 1rem; }
.hero h1 { font-size: clamp(3rem, 1.5rem + 7vw, 7rem); letter-spacing: -0.035em; line-height: 0.95; margin: 0 0 1.6rem; }
.lead { font-size: clamp(1.25rem, 1.1rem + 0.6vw, 1.6rem); line-height: 1.4; max-width: 34em; color: var(--ink-soft); margin-bottom: 2.75rem; }
.three-layers { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 clamp(0.75rem, 3vw, 2.5rem); }
.three-layers > li { border-top: var(--layer-rule); }
.three-layers a {
  display: block; padding: 0.6rem 0 0.4rem; color: var(--ink); text-decoration: none;
  font-size: clamp(1.3rem, 0.9rem + 2vw, 2.4rem); letter-spacing: -0.01em; line-height: 1.1;
}
.three-layers a:hover { color: var(--layer); }

/* Cards: index entries, not boxes. */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 19rem), 1fr)); gap: 0 2.5rem; margin: 1rem 0 2rem; }
.card { border-top: 1px solid var(--rule); padding: 0.85rem 0 1.25rem; }
.card h3 { font-size: 1.3em; font-weight: 500; margin: 0 0 0.2rem; line-height: 1.2; }
.card h3 a { color: var(--ink); text-decoration: none; }
.card h3 a:hover { color: var(--accent); text-decoration: underline; text-decoration-thickness: 1px; }
.meta { font-style: italic; color: var(--ink-soft); margin: 0 0 0.35rem; }
.card .badge { margin-bottom: 0.5rem; }
.card p:last-child { margin-bottom: 0; }
.card-source p { margin: 0; }

/* Timeline */
.filters { max-width: calc(var(--measure) + 8rem); border-top: 1px solid var(--ink); border-bottom: 1px solid var(--rule); padding: 0.8rem 0 0.4rem; margin: 1.5rem 0 2.5rem; }
.filters fieldset { border: 0; margin: 0 0 0.5rem; padding: 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.2rem 1.2rem; }
.filters legend { float: left; font-weight: 600; color: var(--ink-soft); width: 5.5rem; padding: 0; }
.filters label { white-space: nowrap; cursor: pointer; }
.filters [data-count] { font-style: italic; margin: 0.4rem 0 0.4rem; }

.timeline { list-style: none; padding: 0; margin: 0 0 3rem; max-width: calc(var(--measure) + 8rem); }
.tl-event { display: grid; grid-template-columns: 6.5rem minmax(0, 1fr); column-gap: 1.5rem; position: relative; }
.tl-event::before { content: ""; position: absolute; top: 0; bottom: 0; left: 8rem; border-left: 1px solid var(--rule); }
.tl-event > * { grid-column: 2; margin: 0 0 0 1.5rem; }
.tl-event > .tl-year {
  grid-column: 1; grid-row: 1 / span 6; margin: 0; text-align: right; padding-top: 1.1rem;
  font-size: 2.6rem; line-height: 1; color: var(--accent); letter-spacing: -0.02em;
}
.tl-event > time { padding-top: 1.35rem; color: var(--ink-soft); position: relative; }
.tl-event > time::before {
  content: ""; position: absolute; left: calc(-1.5rem - 5px); top: calc(1.35rem + 0.45em); width: 9px; height: 9px;
  background: var(--paper); border: 1px solid var(--accent); transform: rotate(45deg);
}
.tl-event > h2 { font-size: 1.45em; margin-top: 0.05em; margin-bottom: 0.15em; }
.tl-event > h2 a { color: var(--ink); text-decoration: none; }
.tl-event > h2 a:hover { color: var(--accent); text-decoration: underline; text-decoration-thickness: 1px; }
.tl-event > .badge { justify-self: start; margin-top: 0.35rem; margin-bottom: 0.5rem; }
.tl-event > p:last-child { padding-bottom: 1.25rem; }

.timeline.compact { max-width: var(--measure); }
.timeline.compact li { display: grid; grid-template-columns: 13rem minmax(0, 1fr); gap: 0 1.25rem; padding: 0.55rem 0; border-top: 1px solid var(--rule); }
.timeline.compact time { color: var(--ink-soft); }

/* Map */
.map { height: min(70vh, 40rem); min-height: 22rem; border: 1px solid var(--rule); margin: 1.5rem 0 2rem; background: var(--tint); }
.map.leaflet-container, .minimap.leaflet-container { font-family: var(--serif); font-size: 1rem; }
.map.leaflet-container, .minimap.leaflet-container { background: var(--tint); }
.leaflet-container .leaflet-popup-content { font-size: 1.05rem; margin: 0.7rem 1rem; }
.leaflet-container .leaflet-popup-content a { color: var(--oxblood); }
.leaflet-container .leaflet-control-attribution { font-size: 0.75rem; }
.map-list { columns: 2 16rem; column-gap: 2.5rem; padding-left: 1.1em; max-width: calc(var(--measure) + 8rem); }
.map-list li { break-inside: avoid; margin-bottom: 0.3em; }
.map-list small { font-variant-numeric: lining-nums tabular-nums; margin-left: 0.3em; }

/* Search */
.search-big { display: flex; gap: 0.5rem; max-width: var(--measure); margin: 1rem 0 1.5rem; }
.search-big input { flex: 1; font-size: 1.25em; padding: 0.3em 0.6em; border-color: var(--ink-soft); }
.search-big button { font-size: 1.1em; }

/* Source page */
.citation { font-size: 1.2em; line-height: 1.45; padding-left: 1rem; border-left: 1px solid var(--rule); }
.source-fields { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 0.3rem 1.25rem; }
.source-fields:empty { display: none; }
.source-fields dt { color: var(--ink-soft); }
.source-fields dd { margin: 0; overflow-wrap: anywhere; }
.note { font-style: italic; }
.entity-source > h2 { font-size: 1.3em; }

/* Error */
.error { max-width: var(--measure); padding: 2rem 0 3rem; }
.error h1 { color: var(--accent); }

/* Breadcrumbs */
.crumbs { max-width: 72rem; margin: 0 auto; padding: 0.9rem var(--gutter) 0; font-size: 0.95rem; color: var(--ink-soft); font-style: italic; }
.crumbs a { color: var(--ink-soft); }
.crumbs a:hover { color: var(--accent); }
.crumbs .sep { font-style: normal; margin: 0 0.2em; color: var(--rule); }
.crumbs [aria-current] { color: var(--ink); }
.crumbs + .main { padding-top: 1.5rem; }

/* Footer: three index columns, then the three-layer rule and the colophon. */
.footer {
  max-width: 72rem; margin: 4rem auto 0; padding: 1.25rem var(--gutter) 2.5rem;
  font-size: 0.95rem; color: var(--ink-soft);
}
.footer::before { content: ""; display: block; border-top: 1px solid var(--ink); margin-bottom: 1.1rem; }
.footer a { color: var(--ink-soft); }
.footer a:hover { color: var(--accent); }
.footer-cols { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.25rem 2.5rem; }
.footer-cols h2 {
  font-size: 1.05rem; font-weight: 600; color: var(--ink); margin: 0 0 0.35rem;
  font-variant-caps: all-small-caps; letter-spacing: 0.06em;
}
.footer-cols ul { list-style: none; padding: 0; margin: 0; }
.footer-cols li { margin-bottom: 0.25em; line-height: 1.3; }
.footer-rule { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 clamp(0.75rem, 3vw, 2.5rem); margin: 2rem 0 0.9rem; }
.footer-rule > :nth-child(1) { border-top: 1px solid var(--ink); }
.footer-rule > :nth-child(2) { border-top: 3px double var(--accent); }
.footer-rule > :nth-child(3) { border-top: 2px dotted var(--slate); }
.colophon { margin: 0; font-variant-numeric: lining-nums; }
@media (min-width: 720px) { .footer-cols { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* Phone */
@media (max-width: 44rem) {
  :root { --gutter: 16px; }
  .masthead { padding-top: 1rem; align-items: center; }
  .brand { font-size: 1.6rem; }
  .brand small { font-size: 0.9rem; }
  .nav { gap: 0.3rem 1rem; }
  .search { margin-left: 0; flex-basis: 100%; }
  .search input { flex: 1; width: auto; }
  .main { padding-top: 1.75rem; }
  .crumbs { padding-top: 0.75rem; }
  .crumbs + .main { padding-top: 1.25rem; }
  .layers { grid-template-columns: minmax(0, 1fr); gap: 1.25rem; }
  .tl-event { grid-template-columns: minmax(0, 1fr); }
  .tl-event::before { left: 4px; }
  .tl-event > * { grid-column: 1; margin-left: 1.25rem; }
  .tl-event > .tl-year { grid-column: 1; grid-row: auto; text-align: left; font-size: 2.1rem; padding-top: 1.5rem; margin-left: 1.25rem; }
  .tl-event > time::before { left: -1.25rem; }
  .filters legend { float: none; width: auto; }
  .timeline.compact li { grid-template-columns: minmax(0, 1fr); }
  .artifact, .minimap { max-width: none; }
  .map { height: min(55vh, 28rem); min-height: 18rem; }
  .source-fields { grid-template-columns: minmax(0, 1fr); }
  .source-fields dd { margin-bottom: 0.4rem; }
}
/* The nav collapses only when script can reopen it. */
@media (max-width: 44rem) and (scripting: enabled) {
  .nav-toggle {
    display: block; background: transparent; color: var(--ink); border: 1px solid var(--ink-soft);
    font-size: 1.05rem; padding: 0.1rem 0.8rem 0.25rem;
  }
  .nav-toggle[aria-expanded="true"] { background: var(--ink); color: var(--paper); }
  .masthead { padding-bottom: 0.9rem; border-bottom: 1px solid var(--ink); }
  .nav { display: none; border: 0; }
  .nav.open { display: flex; flex-direction: column; align-items: stretch; gap: 0; padding: 0.25rem 0 0.75rem; }
  .nav.open > a { padding: 0.45rem 0; border-bottom: 1px solid var(--rule); }
  .nav.open > a[aria-current="page"] { border-bottom: 1px solid var(--rule); border-left: 2px solid var(--accent); padding-left: 0.6rem; }
  .nav.open .search { order: -1; padding: 0.5rem 0 0.6rem; }
  .nav.open > a.lang { position: static; border-bottom: 0; }
}

/* Film navigation keeps its directory one step from every page. */
.nav-film{position:relative;color:var(--paper)}
.nav-film summary{display:flex;align-items:center;gap:.4rem;min-height:2.75rem;cursor:pointer;list-style:none;white-space:nowrap}
.nav-film summary::-webkit-details-marker{display:none}
.nav-film summary span{font-size:1.1em;line-height:1}
.nav-film[open] summary span{transform:rotate(180deg)}
.nav-film summary:hover,.nav-film--active summary{color:var(--brass)}
.nav-film summary:focus-visible,.nav-film__links a:focus-visible{outline:2px solid var(--brass);outline-offset:4px}
.nav-film__links{position:absolute;right:0;top:100%;z-index:30;min-width:15rem;padding:.5rem .9rem;background:#151612fa;border:1px solid #eee7d855;box-shadow:0 .8rem 2rem #08090770}
.nav-film__links a{display:flex;align-items:center;min-height:2.75rem;padding:.45rem .25rem;color:var(--paper);font:600 .85rem/1.4 var(--sans);letter-spacing:0;text-transform:none;text-decoration:none}
.nav-film__links a+a{border-top:1px solid #eee7d830}
.nav-film__links a:hover,.nav-film__links a[aria-current=page]{color:var(--brass)}
@media(max-width:1340px){
  .nav-film{width:100%;border-bottom:1px solid #eee7d83d}
  .nav-film summary{font-size:.85rem;padding:.62rem 0}
  .nav-film__links{position:static;min-width:0;padding:0 0 .5rem 1rem;background:none;border:0;border-left:1px solid #eee7d850;box-shadow:none;margin:0 0 .5rem}
  .nav-film__links a{font-size:.85rem}
}

/* Small editorial record on the same parchment as the article. */
.editorial-meta { display:flex; flex-wrap:wrap; gap:.35rem 1.5rem; margin:1.25rem 0 2rem; font: .78rem/1.6 var(--font-sans, sans-serif); color:var(--muted, #706957); }
.editorial-meta a { color:inherit; text-underline-offset:.2em; }
