/* ═══════════════════════════════════════════════════════
   ARAD-1849: autumn paper and iron-gall ink. One pinned valley story,
   fourteen files, one funnel, one fortress plan.
   ═══════════════════════════════════════════════════════ */

@font-face { font-family: 'Cormorant'; src: url('/arad-1849/assets/fonts/Cormorant-latin.woff2?v=c27d01380a') format('woff2'); font-weight: 300 700; font-style: normal; font-display: swap; 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: 'Cormorant'; src: url('/arad-1849/assets/fonts/Cormorant-latin-ext.woff2?v=d0b7884259') format('woff2'); font-weight: 300 700; font-style: normal; font-display: swap; 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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Cormorant'; src: url('/arad-1849/assets/fonts/CormorantItalic-latin.woff2?v=813edad704') format('woff2'); font-weight: 300 700; font-style: italic; font-display: swap; 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: 'Cormorant'; src: url('/arad-1849/assets/fonts/CormorantItalic-latin-ext.woff2?v=15d9251683') format('woff2'); font-weight: 300 700; font-style: italic; font-display: swap; 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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }

/* ── Tokens: light ──────────────────────────────────── */
:root {
  --paper: #f4efe3; --surface: #ebe4d2; --surface-2: #ded4bc; --stone: #b3a67f;
  --ink: #221c11; --ink-2: #3d3524; --ink-3: #544a30; --ink-4: #6b6248;
  --accent: #684006; --accent-bg: #f0e2c6;
  --verdict: #7a1f1f; --verdict-bg: #f3d9d4;
  --land: #efe9d8; --land-edge: #b0a482; --river: #4f7d9a; --river-ink: #265062; --road: #8a8172;
  --built: #ded3b8; --water: #9fbfcd; --water-deep: #7ba7b8; --forest: #d3dac0; --halo: rgba(244,239,227,.92); --scrim: rgba(244,239,227,.92);
  --fort-fill: #cfae7e; --fort-line: #6b4a26;
  --focus: #1d5d83; --border: rgba(34,28,17,.17);
  --bar-h: 2.75rem; --measure: 38rem; --gap: clamp(1.5rem, 3vw, 3rem);
  --font-display: 'Cormorant', 'Georgia', 'Times New Roman', serif;
  --font-body: 'Georgia', 'Times New Roman', serif;
}

/* ── Tokens: dark ───────────────────────────────────── */
:root[data-theme="dark"] {
  --paper: #14110b; --surface: #1d1912; --surface-2: #262118; --stone: #4a4433;
  --ink: #efe7d4; --ink-2: #d3c9b0; --ink-3: #b3a888; --ink-4: #978d74;
  --accent: #d9a44e; --accent-bg: #2b2110;
  --verdict: #e08a8a; --verdict-bg: #2c1414;
  --land: #1a1712; --land-edge: #4d4636; --river: #5f93ad; --river-ink: #a9c9da; --road: #7a7260;
  --built: #2a251b; --water: #16303c; --water-deep: #102832; --forest: #1a2620; --halo: rgba(20,17,11,.9); --scrim: rgba(20,17,11,.9);
  --fort-fill: #8a6b42; --fort-line: #e0c491;
  --focus: #9cc8e0; --border: rgba(239,231,212,.17);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #14110b; --surface: #1d1912; --surface-2: #262118; --stone: #4a4433;
    --ink: #efe7d4; --ink-2: #d3c9b0; --ink-3: #b3a888; --ink-4: #978d74;
    --accent: #d9a44e; --accent-bg: #2b2110;
    --verdict: #e08a8a; --verdict-bg: #2c1414;
    --land: #1a1712; --land-edge: #4d4636; --river: #5f93ad; --river-ink: #a9c9da; --road: #7a7260;
    --built: #2a251b; --water: #16303c; --water-deep: #102832; --forest: #1a2620; --halo: rgba(20,17,11,.9); --scrim: rgba(20,17,11,.9);
    --fort-fill: #8a6b42; --fort-line: #e0c491;
    --focus: #9cc8e0; --border: rgba(239,231,212,.17);
  }
}

/* ── Base ───────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; }
html { scroll-behavior: smooth; }
body { font-family: var(--font-body); font-size: clamp(1.05rem, 1rem + .22vw, 1.17rem); line-height: 1.65; color: var(--ink); background: var(--paper); -webkit-font-smoothing: antialiased; overflow-x: clip; }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: .15em; }
a:hover { text-decoration-thickness: 2px; }
img { max-width: 100%; height: auto; display: block; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 3px; }
.wrap { max-width: var(--measure); margin: 0 auto; padding: 0 clamp(1rem, 3vw, 2rem); }
.wrap-wide { max-width: 60rem; }
.funnel svg { width: 100%; height: auto; display: block; }
.funnel .fbar-bg { fill: var(--surface-2); }
.funnel .fbar-fg { fill: var(--accent); }
.funnel .f-exec { fill: var(--verdict); }
.funnel text { font-family: var(--font-display); font-weight: 700; font-size: 15px; fill: var(--ink); }
.compare-hint { margin-top: 1.5rem; font-size: .95rem; color: var(--ink-3); }
.skip { position: absolute; left: -999px; top: 0; z-index: 200; background: var(--paper); color: var(--ink); padding: .5rem 1rem; }
.skip:focus { left: .5rem; top: .5rem; }

/* ── Topbar ─────────────────────────────────────────── */
.topbar { position: sticky; top: 0; z-index: 100; display: flex; align-items: center; gap: .5rem; height: var(--bar-h); padding: 0 clamp(.75rem, 2vw, 1.25rem); background: var(--paper); border-bottom: 1px solid var(--border); font-family: var(--font-display); font-size: .95rem; letter-spacing: .02em; }
.topbar .home { color: var(--ink-3); text-decoration: none; white-space: nowrap; }
.topbar .home:hover { color: var(--ink); }
.topnav { display: flex; gap: .15rem; overflow-x: auto; scrollbar-width: none; }
.topnav::-webkit-scrollbar { display: none; }
.topnav a { color: var(--ink-3); text-decoration: none; white-space: nowrap; padding: .25rem .5rem; border-radius: 4px; }
.topnav a:hover { color: var(--ink); background: var(--surface); }
.topnav a[aria-current="true"] { color: var(--ink); font-weight: 600; }
.spacer { flex: 1; }
.chip { color: var(--ink-3); text-decoration: none; white-space: nowrap; padding: .2rem .6rem; border-radius: 4px; font-size: .9rem; }
.chip:hover { color: var(--ink); background: var(--surface); }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 2.75rem; height: 2.75rem; border-radius: 50%; border: none; background: none; color: var(--ink-3); cursor: pointer; padding: 0; }
.icon-btn:hover { color: var(--ink); background: var(--surface); }
.icon-btn svg[hidden] { display: none; }

/* progress hairline with a little star-fortress riding it (decorative) */
.progress { position: fixed; top: var(--bar-h); left: 0; right: 0; height: 3px; z-index: 99; pointer-events: none; }
#prog { display: block; height: 100%; background: var(--accent); transform-origin: left; transform: scaleX(0); }
#pstamp { position: absolute; left: 0; top: -.95rem; width: 1.15rem; height: 1.05rem; color: var(--accent); transform: translateX(0); }
#pstamp svg { display: block; width: 100%; height: 100%; }

section { scroll-margin-top: calc(var(--bar-h) + 1rem); }
.block { padding: var(--gap) 0; }
.block + .block { border-top: 1px solid var(--border); }

/* ── Type ───────────────────────────────────────────── */
h1 { font-family: var(--font-display); font-size: clamp(1.95rem, 1.2rem + 2.8vw, 3.4rem); line-height: 1.1; font-weight: 500; letter-spacing: -.01em; color: var(--ink); text-wrap: balance; }
h2 { font-family: var(--font-display); font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.35rem); line-height: 1.15; font-weight: 500; color: var(--ink); margin-bottom: 1rem; text-wrap: balance; }
h2 .anchor { color: inherit; text-decoration: none; display: inline-block; min-height: 2.75rem; }
h2 .anchor:hover { text-decoration: underline; text-decoration-thickness: 1px; }
h3 { font-family: var(--font-display); font-size: 1.35rem; line-height: 1.2; font-weight: 600; color: var(--ink); margin: .15rem 0 .5rem; }
.kicker { font-family: var(--font-display); font-size: 1rem; letter-spacing: .09em; text-transform: uppercase; color: var(--accent); margin-bottom: .6rem; font-weight: 600; }
.deck { font-size: clamp(1.08rem, 1rem + .35vw, 1.26rem); line-height: 1.55; color: var(--ink-2); max-width: 38rem; margin: 1rem auto 0; }
.lede { font-size: 1.1rem; color: var(--ink-2); margin-bottom: 1.5rem; }
.prose { max-width: var(--measure); }
.prose p + p { margin-top: 1em; }
i[lang] { font-style: italic; }
.nb { white-space: nowrap; }

/* ── Hero ───────────────────────────────────────────── */
.hero { padding: clamp(2.5rem, 6vw, 5rem) 0 clamp(1.5rem, 4vw, 3rem); text-align: center; }
.hero-text { max-width: 50rem; margin-bottom: clamp(1.5rem, 3vw, 2.5rem); }
.hero-fig { margin: 0 auto; max-width: 72rem; padding: 0 clamp(.5rem, 2vw, 1.5rem); }
.hero-fig img { width: 100%; border-radius: 12px; aspect-ratio: 16 / 10; object-fit: cover; object-position: 50% 55%; }
.hero-fig figcaption { font-size: .92rem; color: var(--ink-3); margin-top: .6rem; line-height: 1.45; text-align: left; max-width: 46rem; margin-left: auto; margin-right: auto; }
.cr { display: block; font-size: .85rem; margin-top: .25rem; }
.cr a { color: var(--ink-3); }
.near { margin-top: 1rem; font-family: var(--font-display); font-size: 1.05rem; color: var(--ink-2); }
.anniv { margin-top: .25rem; font-family: var(--font-display); font-size: 1.05rem; color: var(--verdict); }
.privacy { margin-top: .25rem; font-size: .8rem; color: var(--ink-4); }
.hint { margin-top: 1.5rem; color: var(--ink-3); font-size: .95rem; }
.hint span { display: inline-block; animation: bob 1.8s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(5px); } }

/* ── Figures ────────────────────────────────────────── */
.fig { margin: 1.5rem 0 0; }
.fig img { border-radius: 6px; }
.fig figcaption { font-size: .92rem; color: var(--ink-3); margin-top: .5rem; line-height: 1.45; }
.fig .cr { font-size: .85rem; display: block; margin-top: .25rem; }

/* ── Record quotes ──────────────────────────────────── */
.q { border-top: 2px solid var(--accent); margin-top: .8rem; padding-top: .6rem; font-family: var(--font-display); font-style: italic; font-size: 1.12rem; line-height: 1.5; color: var(--ink); }
.qsrc { font-size: .82rem; color: var(--ink-3); margin-top: .3rem; font-style: normal; font-family: var(--font-body); }
.tag { display: inline-block; font-family: var(--font-display); font-size: .78rem; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--ink-3); border: 1px solid var(--border); border-radius: 3px; padding: .1rem .45rem; margin-left: .3rem; vertical-align: .08em; white-space: nowrap; }
.tag-row { margin-top: .6rem; }
.tag-row .tag { margin-left: 0; }
.tag.m-rope { color: var(--verdict); border-color: var(--verdict); }
.tag.m-ball { color: var(--accent); border-color: var(--accent); }
.tag.m-prison { color: var(--ink-3); }

/* ── Story: stage + steps ───────────────────────────── */
.block-wide { padding-left: 0; padding-right: 0; }
.story { display: grid; grid-template-columns: minmax(0, 1fr); max-width: 80rem; margin: 0 auto; padding: 0 clamp(.75rem, 3vw, 2rem); gap: 0; }
.stage { position: sticky; top: var(--bar-h); z-index: 5; height: 46svh; min-height: 15rem; background: var(--paper); padding: .5rem 0; }
.stage-in { position: relative; height: 100%; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; background: var(--surface); display: flex; flex-direction: column; }
.steps { padding: 0 0 12vh; }
.step { position: relative; margin: 0 0 min(55vh, 28rem); padding: 1.15rem 1.3rem; border: 1px solid var(--border); border-top: 4px solid var(--border); border-radius: 8px; background: var(--paper); transition: border-color .3s; scroll-margin-top: calc(var(--bar-h) + 48svh); }
.step:first-child { margin-top: 38vh; }
.step.on { border-top-color: var(--accent); }
.step p { font-size: 1rem; color: var(--ink-2); line-height: 1.58; }
.step p + p { margin-top: .6em; }
.step .note { font-size: .9rem; color: var(--ink-3); }
.step .yr-tag { font-family: var(--font-display); font-size: .95rem; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); font-weight: 700; margin-bottom: .1rem; }
@media (min-width: 62rem) {
  .story { grid-template-columns: minmax(0, 2fr) minmax(18rem, 1fr); gap: 1.75rem; }
  .stage { top: calc(var(--bar-h) + .5rem); height: calc(100svh - var(--bar-h) - 1.5rem); min-height: 24rem; background: transparent; padding: 0; }
  .step { margin-bottom: 70vh; scroll-margin-top: calc(var(--bar-h) + 2rem); }
  .step:first-child { margin-top: 30vh; }
}
@media (max-height: 34rem) { .stage { position: static; height: 70svh; } .step, .step:first-child { margin-top: 1.5rem; margin-bottom: 1.5rem; } }

/* record sections: the same steps, no sticky stage */
.record { max-width: var(--measure); margin: 0 auto; padding: 0 clamp(1rem, 3vw, 2rem); }
.record .step { margin: 0 0 1rem; scroll-margin-top: calc(var(--bar-h) + 1rem); }
.record .step:first-child { margin-top: 0; }

/* ── Maps ───────────────────────────────────────────── */
.stage-row { flex: 1 1 0; min-height: 0; display: flex; }
.map { display: block; width: 100%; height: 100%; --fs: 14px; --r: 6.5px; touch-action: pan-y; flex: 1 1 0; min-width: 0; }
.map .base { fill: var(--land); }
.map image { transition: opacity .6s; }
.map .th-d { display: none; }
:root[data-theme="dark"] .map .th-l { display: none; }
:root[data-theme="dark"] .map .th-d { display: inline; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .map .th-l { display: none; } :root:not([data-theme="light"]) .map .th-d { display: inline; } }
.map .dem-valley { opacity: 0; }
.map[data-zoom="far"] .dem-valley { opacity: .55; }
.map[data-zoom="mid"] .dem-valley, .map[data-zoom="near"] .dem-valley, .map[data-zoom="plan"] .dem-valley { opacity: .9; }
.map .riv { fill: none; stroke: var(--river); stroke-width: 1.4px; vector-effect: non-scaling-stroke; stroke-linecap: round; opacity: .9; }
.map .riv-2 { stroke-width: .9px; opacity: .8; }
.map .rd { fill: none; stroke: var(--road); stroke-linecap: round; vector-effect: non-scaling-stroke; opacity: .55; }
.map .rd-main { stroke-width: 1.6px; }
.map .rd-mid { stroke-width: .9px; opacity: .45; }
.map .rlbl { font-family: var(--font-display); font-style: italic; font-weight: 600; font-size: calc(var(--fs) * 1.05); fill: var(--river-ink); paint-order: stroke; stroke: var(--halo); stroke-width: 3px; stroke-linejoin: round; vector-effect: non-scaling-stroke; pointer-events: none; }
.lay-local { opacity: 0; transition: opacity .6s; }
.map[data-zoom="plan"] .lay-local { opacity: 1; }
.lay-local path { stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.lay-local .foot { fill: var(--fort-fill); fill-opacity: .5; stroke: var(--fort-line); stroke-width: 1.6px; }
.lay-local .bld { fill: var(--ink-4); stroke: none; opacity: .8; }
.lay-local .fwat { fill: var(--water); stroke: var(--river); stroke-width: 1px; }
.lay-local .fgrn { fill: var(--forest); stroke: none; }
.lay-local .frd { fill: none; stroke: var(--road); stroke-width: 1px; }
.pt { transition: opacity .45s; }
.js .pt.off { opacity: 0; pointer-events: none; }
.pt .dot { r: var(--r); fill: var(--ink-3); stroke: var(--paper); stroke-width: 1.6px; vector-effect: non-scaling-stroke; }
.pt .lbl { font-family: var(--font-display); font-weight: 700; font-size: var(--fs); fill: var(--ink); paint-order: stroke; stroke: var(--halo); stroke-width: 3.5px; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.pt.r .lbl { text-anchor: start; transform: translate(calc(var(--r) * 1.9), calc(var(--fs) * .33)); }
.pt.l .lbl { text-anchor: end; transform: translate(calc(var(--r) * -1.9), calc(var(--fs) * .33)); }
.pt.u .lbl { text-anchor: middle; transform: translate(0, calc(var(--r) * -1.9)); }
.pt.d .lbl { text-anchor: middle; transform: translate(0, calc(var(--fs) + var(--r) * 1.2)); }
.pt.k-doc .dot { fill: var(--accent); r: calc(var(--r) * 1.2); }
.pt.k-doc .lbl { fill: var(--accent); }
.pt.k-fort .dot { fill: var(--verdict); r: calc(var(--r) * 1.3); }
.pt.k-fort .lbl { fill: var(--verdict); }
.pt.k-army .dot { fill: var(--paper); stroke: var(--accent); stroke-width: 2.4px; }
.pt.k-army .lbl { fill: var(--accent); }
.pt.k-russian .dot { fill: var(--paper); stroke: var(--river-ink); stroke-width: 2.4px; }
.pt.k-russian .lbl { fill: var(--river-ink); }
.pt.k-place .dot { fill: var(--ink-4); r: calc(var(--r) * .7); }
.pt.k-place .lbl { fill: var(--ink-3); font-weight: 600; }
.clock { position: absolute; left: .6rem; top: .6rem; padding: .15rem .7rem .2rem; border-radius: 8px; background: var(--scrim); border: 1px solid var(--border); pointer-events: none; z-index: 2; }
.clock .yr { font-family: var(--font-display); font-weight: 700; font-size: clamp(1.1rem, .9rem + 1vw, 1.7rem); color: var(--ink); letter-spacing: .01em; }
.stage-ctl { position: absolute; right: .6rem; top: .6rem; display: flex; gap: .4rem; z-index: 2; }
.stage-ctl button { min-height: 2.75rem; min-width: 2.75rem; padding: .2rem .7rem; border-radius: 8px; border: 1px solid var(--border); background: var(--scrim); color: var(--ink-2); font-family: var(--font-display); font-size: .95rem; font-weight: 600; cursor: pointer; }
.stage-ctl button:hover { color: var(--ink); }
.scale { position: absolute; right: .7rem; bottom: 3.3rem; display: flex; flex-direction: column; align-items: flex-end; gap: .1rem; padding: .25rem .5rem; border-radius: 6px; background: var(--scrim); pointer-events: none; font-size: .78rem; color: var(--ink-2); font-family: var(--font-body); z-index: 2; }
.scale i { display: block; width: 3rem; height: 7px; border: 2px solid var(--ink-2); border-top: none; }
.legend { list-style: none; padding: .35rem .7rem; display: flex; flex-wrap: nowrap; overflow-x: auto; white-space: nowrap; scrollbar-width: thin; gap: .15rem 1rem; font-size: .8rem; color: var(--ink-2); margin: 0; flex: none; background: var(--paper); border-top: 1px solid var(--border); }
@media (min-width: 62rem) { .legend { flex-wrap: wrap; white-space: normal; } }
.legend li { display: flex; align-items: center; gap: .35rem; }
.legend .dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; flex: none; }
.lg-doc .dot { background: var(--accent); }
.lg-fort .dot { background: var(--verdict); }
.lg-army .dot { background: var(--paper); border: 2px solid var(--accent); }
.lg-russian .dot { background: var(--paper); border: 2px solid var(--river-ink); }
.lg-place .dot { background: var(--ink-4); width: 8px; height: 8px; }

/* ── Day axis ───────────────────────────────────────── */
.axisfig { margin: 1.5rem 0 0; }
.axisfig svg { width: 100%; height: auto; display: block; font-family: var(--font-display); }
.axisfig .rail-l { stroke: var(--ink-3); stroke-width: 2; }
.axisfig .tick { stroke: var(--ink-3); stroke-width: 1.5; }
.axisfig .tday { fill: var(--accent); font-size: 15px; font-weight: 700; }
.axisfig .tdate { fill: var(--ink-3); font-size: 13px; }
.axisfig .lane-verdict { fill: var(--verdict); }
.axisfig .lane-confirm { fill: var(--verdict); }
.axisfig .lane-letter, .axisfig .lane-dispatch { fill: var(--accent); }
.axisfig .lane-memoir, .axisfig .lane-witness { fill: var(--ink-3); }
.axisfig figcaption { font-size: .92rem; color: var(--ink-3); margin-top: .5rem; line-height: 1.45; }

/* ── The funnel ─────────────────────────────────────── */
.funnel { margin: 1.5rem 0 0; }
.funnel .frow { display: grid; grid-template-columns: 7.5rem 1fr 4.5rem; gap: .6rem; align-items: center; margin-top: .45rem; }
.funnel .flab { font-family: var(--font-display); font-weight: 700; font-size: .95rem; color: var(--ink-2); text-align: right; }
.funnel .fbar { height: 1.5rem; border-radius: 4px; background: var(--surface-2); position: relative; }
.funnel .fbar i { position: absolute; inset: 0 auto 0 0; border-radius: 4px; background: var(--accent); }
.funnel .frow:last-child .fbar i { background: var(--verdict); }
.funnel .fnum { font-family: var(--font-display); font-weight: 700; color: var(--ink); }
.funnel figcaption { font-size: .92rem; color: var(--ink-3); margin-top: .6rem; line-height: 1.45; }

/* ── The comparison: two papers ─────────────────────── */
.compare { display: grid; grid-template-columns: 1fr; gap: 1rem; margin-top: 1.5rem; }
@media (min-width: 52rem) { .compare { grid-template-columns: 1fr 1fr; } }
.paper { border: 1px solid var(--border); border-radius: 8px; background: var(--paper); overflow: hidden; }
.paper > h3 { padding: .8rem 1rem .2rem; font-size: 1.15rem; }
.paper > p { padding: 0 1rem .6rem; font-size: .88rem; color: var(--ink-3); }
.paper ul { list-style: none; padding: 0 0 .6rem; }
.paper li button { display: flex; justify-content: space-between; gap: .6rem; width: 100%; min-height: 2.75rem; align-items: center; text-align: left; background: none; border: none; border-top: 1px solid var(--border); padding: .45rem 1rem; font-family: var(--font-body); font-size: .95rem; color: var(--ink-2); cursor: pointer; }
.paper li button:hover { background: var(--surface); }
.paper li button .m { font-family: var(--font-display); font-weight: 700; white-space: nowrap; }
.paper li.lit button { background: var(--verdict-bg); color: var(--ink); }
.paper li.lit button .m { color: var(--verdict); }
.receipt { margin-top: 1rem; border-top: 2px solid var(--verdict); padding-top: .6rem; }

/* ── The fourteen files ─────────────────────────────── */
.files { display: grid; grid-template-columns: 1fr; gap: 1rem; margin-top: 1.5rem; }
@media (min-width: 52rem) { .files { grid-template-columns: 1fr 1fr; } }
.file { border: 1px solid var(--border); border-top: 3px solid var(--accent); border-radius: 8px; background: var(--paper); padding: .9rem 1.1rem; }
.file.f-rope { border-top-color: var(--verdict); }
.file h3 { font-size: 1.2rem; margin: 0 0 .35rem; }
.file dl { display: grid; grid-template-columns: auto 1fr; gap: .15rem .7rem; font-size: .93rem; }
.file dt { color: var(--ink-3); font-family: var(--font-display); font-weight: 600; }
.file dd { color: var(--ink-2); margin: 0; }
.file .sent { margin-top: .4rem; font-style: italic; }
.file .docs { margin-top: .3rem; font-size: .82rem; color: var(--ink-4); }

/* ── Two tellings, fortress plan, trip, method ───────── */
.duo { display: grid; grid-template-columns: 1fr; gap: 1.5rem; }
@media (min-width: 52rem) { .duo { grid-template-columns: 1fr 1fr; } }
.duo h3 { font-size: 1.25rem; }
.duo div p + p { margin-top: 1em; }
.fortplan svg { width: 100%; height: auto; display: block; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); }
.fortplan .foot { fill: var(--fort-fill); fill-opacity: .45; stroke: var(--fort-line); stroke-width: 2; }
.fortplan .bld { fill: var(--ink-4); opacity: .8; }
.fortplan .fwat { fill: var(--water); stroke: var(--river); }
.fortplan .frd { fill: none; stroke: var(--road); stroke-width: 1.5; }
.fortplan .fgrn { fill: var(--forest); }
.fortplan .scalebar { stroke: var(--ink-2); stroke-width: 2; }
.fortplan .scalet { fill: var(--ink-2); font-size: 13px; font-family: var(--font-body); }
.trip { list-style: none; padding: 0; margin-top: 1rem; }
.trip li { padding: .7rem 0; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; gap: 1rem; align-items: baseline; }
.trip li:last-child { border-bottom: none; }
.trip .km { font-family: var(--font-display); font-weight: 700; color: var(--accent); white-space: nowrap; }
.method { padding-left: 1.2rem; margin-top: 1rem; }
.method li { margin-top: .6rem; font-size: .98rem; color: var(--ink-2); }

/* ── Sources, share, footer ─────────────────────────── */
.src-h { font-family: var(--font-display); font-size: 1.15rem; font-weight: 700; color: var(--ink); margin: 1.25rem 0 .25rem; }
.srcs { padding: 0; list-style: none; }
.srcs li { padding: .5rem 0; border-bottom: 1px solid var(--border); font-size: .95rem; color: var(--ink-2); }
.srcs li:last-child { border-bottom: none; }
.srcs a { overflow-wrap: anywhere; }
.share-block .share { --sr-line: var(--border); --sr-ink: var(--ink-2); --sr-acc: var(--accent); --sr-ok: var(--ink-2); }
.share-block { padding: 1.5rem 0; }
.foot { padding: 2rem 0; text-align: center; font-size: .9rem; color: var(--ink-3); border-top: 1px solid var(--border); }
.foot a { color: var(--ink-2); }
.foot p + p { margin-top: .25rem; }
.rail { display: none; }
@media (min-width: 90rem) {
  .rail { display: flex; flex-direction: column; gap: .15rem; position: fixed; right: 1.5rem; top: 50%; transform: translateY(-50%); z-index: 90; }
  .rail a { display: flex; align-items: center; gap: .5rem; color: var(--ink-3); text-decoration: none; font-size: .9rem; font-family: var(--font-display); justify-content: flex-end; }
  .rail a i { width: 8px; height: 8px; border-radius: 50%; background: var(--stone); display: block; flex-shrink: 0; }
  .rail a[aria-current="true"] { color: var(--ink); font-weight: 700; }
  .rail a[aria-current="true"] i { background: var(--accent); }
}
.notfound { padding-top: 4rem; text-align: center; }
.notfound p { margin-top: .5rem; }
.see-also { margin-top: 1.25rem; font-size: .98rem; color: var(--ink-2); }

@media (max-width: 39.99rem) { .map { --fs: 17px; --r: 8px; } .funnel .frow { grid-template-columns: 5.5rem 1fr 3.8rem; } }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hint span { animation: none; }
  .map image, .pt, .lay-local * { transition: none; }
}

/* share row (standards/v2/tools/share_row.py) */
.share-row{display:flex;flex-wrap:wrap;gap:.35rem;align-items:center}
.share-row .lab{font-size:.95rem;margin-inline-end:.3rem}
.share-row a,.share-row button{display:inline-grid;place-items:center;flex:none;width:2.5rem;height:2.5rem;padding:0;border-radius:50%;border:1px solid var(--sr-line,color-mix(in srgb,currentColor 28%,transparent));background:transparent;color:var(--sr-ink,inherit);text-decoration:none;cursor:pointer;font:inherit;transition:color .15s,border-color .15s}
.share-row a:hover,.share-row button:hover,.share-row a:focus-visible,.share-row button:focus-visible{color:var(--sr-acc,inherit);border-color:var(--sr-acc,currentColor)}
.share-row [hidden]{display:none}
@media (pointer:coarse){.share-row a,.share-row button{width:2.75rem;height:2.75rem}}
@media (max-width:30rem){.share-row .lab{flex-basis:100%;margin:0 0 .15rem}}
.share-status{font-size:.92rem;color:var(--sr-ok,inherit);min-height:1.2em;margin:.4rem 0 0}
.share-status:empty{display:none}
.share-field{display:block;width:100%;max-width:36rem;margin-top:.4rem;font:inherit;font-size:.9rem}
