@font-face{font-family:"Source Serif 4";src:url(fonts/source-serif-4-normal-latin-ext.woff2) format("woff2");font-weight:200 900;font-style:normal;font-display:swap;unicode-range:U+0100-02AF,U+0218-021B,U+1E00-1EFF,U+2020,U+20A0-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}
@font-face{font-family:"Source Serif 4";src:url(fonts/source-serif-4-normal-latin.woff2) format("woff2");font-weight:200 900;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+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
@font-face{font-family:"Source Serif 4";src:url(fonts/source-serif-4-italic-latin-ext.woff2) format("woff2");font-weight:200 900;font-style:italic;font-display:swap;unicode-range:U+0100-02AF,U+0218-021B,U+1E00-1EFF,U+2C60-2C7F,U+A720-A7FF}
@font-face{font-family:"Source Serif 4";src:url(fonts/source-serif-4-italic-latin.woff2) format("woff2");font-weight:200 900;font-style:italic;font-display:swap;unicode-range:U+0000-00FF,U+2000-206F}
@font-face{font-family:"Atkinson";src:url(fonts/AtkinsonHyperlegibleNext.woff2) format("woff2");font-weight:200 800;font-display:swap}

:root{
  --bg:#f6f1e6;--surface:#fbf8f1;--surface-2:#efe8d8;--text:#1d1a16;--text-2:#3a342c;--muted:#4c453b;
  --line:#b9ad96;--line-soft:#d8cdb8;--accent:#7a2e12;--accent-2:#1f4f63;
  --doc:#7a2e12;--trad:#6b5e4a;--late:#1f4f63;--guess:#1d6b3a;--road:#5b3d8a;--danger:#8c1c1c;--ok:#1d5b33;
  --river:#4f7f93;--shadow:0 1px 2px rgba(0,0,0,.08),0 6px 24px rgba(0,0,0,.06);
  --serif:"Source Serif 4",Georgia,serif;--sans:"Atkinson",system-ui,sans-serif;
  color-scheme:light;
}
@media (prefers-color-scheme:dark){:root:not([data-theme="light"]){
  --bg:#17181a;--surface:#1f2023;--surface-2:#26272a;--text:#f1ece2;--text-2:#ddd5c6;--muted:#cbc2b2;
  --line:#5d574d;--line-soft:#3a3833;--accent:#f0a47f;--accent-2:#8fc7dc;
  --doc:#f0a47f;--trad:#c9bca6;--late:#8fc7dc;--guess:#8fd9a6;--road:#c7a8f0;--danger:#ff9c9c;--ok:#8fd9a6;
  --river:#6fa3b8;--shadow:none;color-scheme:dark}}
:root[data-theme="dark"]{
  --bg:#17181a;--surface:#1f2023;--surface-2:#26272a;--text:#f1ece2;--text-2:#ddd5c6;--muted:#cbc2b2;
  --line:#5d574d;--line-soft:#3a3833;--accent:#f0a47f;--accent-2:#8fc7dc;
  --doc:#f0a47f;--trad:#c9bca6;--late:#8fc7dc;--guess:#8fd9a6;--road:#c7a8f0;--danger:#ff9c9c;--ok:#8fd9a6;
  --river:#6fa3b8;--shadow:none;color-scheme:dark}

*{box-sizing:border-box}
html{scroll-behavior:smooth;-webkit-text-size-adjust:100%}
@media (prefers-reduced-motion:reduce){html{scroll-behavior:auto}*{transition:none!important;animation:none!important}}
body{margin:0;background:var(--bg);color:var(--text);font:1.125rem/1.62 var(--serif);font-optical-sizing:auto}
a{color:var(--accent)}a:hover{text-decoration-thickness:2px}
:focus-visible{outline:3px solid var(--accent-2);outline-offset:2px}
.skip{position:absolute;left:-999px;top:0}.skip:focus{left:1rem;top:.5rem;z-index:99;background:var(--surface);padding:.4rem .7rem}
.sr{position:absolute!important;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}

.topbar{position:sticky;top:0;z-index:40;display:flex;align-items:center;gap:.8rem;height:3rem;padding:0 1rem;background:color-mix(in srgb,var(--bg) 92%,transparent);backdrop-filter:blur(8px);border-bottom:1px solid var(--line-soft);font-family:var(--sans);font-size:.92rem;white-space:nowrap}
.topbar .home{color:var(--text);text-decoration:none;font-weight:700;flex:none}
.topnav{display:flex;gap:1rem;overflow-x:auto;scrollbar-width:none;min-width:0;flex:1 1 auto}
.topnav::-webkit-scrollbar{display:none}
.topnav a{color:var(--text-2);text-decoration:none;padding:.2rem 0;border-bottom:2px solid transparent}
.topnav a[aria-current="true"]{color:var(--text);border-bottom-color:var(--accent)}
.chip{flex:none;color:var(--text);text-decoration:none;border:1px solid var(--line);border-radius:1rem;padding:.15rem .6rem}
.icon-btn{flex:none;display:inline-grid;place-items:center;width:2.25rem;height:2.25rem;border-radius:50%;border:1px solid var(--line);background:transparent;color:var(--text);cursor:pointer;padding:0}
.icon-btn svg{display:block}.icon-btn svg[hidden]{display:none}
@media (pointer:coarse){.icon-btn{width:2.75rem;height:2.75rem}}
section{scroll-margin-top:3.5rem}

.wrap{width:min(100% - 2rem,40rem);margin-inline:auto}
.wide{width:min(100% - 1rem,76rem);margin-inline:auto}
header.hero{padding:clamp(2rem,6vw,4.5rem) 0 1rem}
.kicker{font-family:var(--sans);font-size:.9rem;letter-spacing:.04em;text-transform:uppercase;color:var(--muted);margin:0 0 .6rem}
h1{font-size:clamp(2rem,5.4vw,3.4rem);line-height:1.08;margin:0 0 1rem;font-weight:650;letter-spacing:-.01em;text-wrap:balance}
h2{font-size:clamp(1.5rem,3.4vw,2.1rem);line-height:1.15;margin:2.8rem 0 .8rem;font-weight:650;text-wrap:balance}
h3{font-size:1.2rem;margin:1.8rem 0 .4rem}
.deck{font-size:clamp(1.15rem,2.2vw,1.35rem);color:var(--text-2);margin:0 0 1rem}
.anchor{margin-left:.35rem;font-size:.7em;color:var(--muted);text-decoration:none;opacity:.0}
h2:hover .anchor,.anchor:focus{opacity:1}
p{margin:0 0 1rem}
.note{font-size:1rem;color:var(--muted)}

/* ---------------------------------------------------------------- map */
.stage{position:relative;margin:1rem auto 0;border-radius:.9rem;overflow:hidden;border:1px solid var(--line-soft);background:var(--surface-2);box-shadow:var(--shadow);touch-action:manipulation}
.stage .relief{display:block;width:100%;height:auto;aspect-ratio:2184/1296}
.stage .relief.dark{display:none}
:root[data-theme="dark"] .stage .relief.light{display:none}:root[data-theme="dark"] .stage .relief.dark{display:block}
@media (prefers-color-scheme:dark){:root:not([data-theme="light"]) .stage .relief.light{display:none}:root:not([data-theme="light"]) .stage .relief.dark{display:block}}
.stage svg.ov{position:absolute;inset:0;width:100%;height:100%}
.stage::after{content:"";position:absolute;inset:0;pointer-events:none;box-shadow:inset 0 0 40px 18px var(--surface-2)}
.ov text{font-family:var(--sans);paint-order:stroke;stroke:var(--bg);stroke-width:.28em;stroke-linejoin:round;fill:var(--text);font-size:1em}
.ov circle,.ov path,.ov rect,.ov line{vector-effect:non-scaling-stroke}
.ov .rlabel{font-style:italic;fill:var(--river);font-size:.95em;font-family:var(--serif)}
.ov .ctx{fill:var(--muted);font-size:.85em}
.ov .ctxdot{fill:var(--muted)}
.ov .scale{stroke:var(--text-2);stroke-width:2;fill:none}
.ov .house .hit{fill:transparent;stroke:none}
.ov .house .dot{fill:var(--doc);stroke:var(--bg);stroke-width:1.6}
.ov .house.edit .dot{fill:var(--bg);stroke:var(--doc);stroke-width:2.6}
.ov .house.later .dot{opacity:.8}
.ov .house .lbl{font-weight:700;font-size:1.02em}
.ov .house{cursor:pointer;transition:opacity .45s}
.ov .house.off{opacity:0;pointer-events:none}
.ov .house.sel .dot,.ov .house.hl .dot{stroke:var(--accent-2);stroke-width:3.2}
.ov .house.dim{opacity:.35}
.ov .house.dim.off{opacity:0}
.ov .late rect{fill:var(--late);stroke:var(--bg);stroke-width:1.4;cursor:pointer}
.ov .seat rect{fill:var(--text);stroke:var(--bg);stroke-width:1.4}
.ov .seat text{font-weight:700}
.ov .ring{fill:none;stroke:var(--text-2);stroke-width:1.4;stroke-dasharray:5 5;opacity:.7}
.ov .seat.off,.ov .ring.off,.ov .rev.off{opacity:0}
.ov .fort path{fill:var(--danger);stroke:var(--bg);stroke-width:1.4}
.ov .fort text{fill:var(--danger);font-weight:700}
.ov .sub{font-size:.85em;font-weight:400!important}
.ov .fort .sub{fill:var(--text-2)}
.ov .chev{fill:none;stroke:var(--text);stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round}
.ov .toll rect{fill:var(--road);stroke:var(--bg);stroke-width:1.2}
.ov .toll text{fill:var(--road)}
.ov .rev{fill:none;stroke:var(--road);stroke-width:2.2;stroke-dasharray:6 4;transition:opacity .4s}
.ov .revdot{fill:var(--road)}
.ov .westline{stroke:var(--accent-2);stroke-width:2.4;stroke-dasharray:2 5;stroke-linecap:round;fill:none}
.ov .guess circle{fill:color-mix(in srgb,var(--guess) 18%,transparent);stroke:var(--guess);stroke-width:2.6}
.ov .gnum{fill:var(--guess);font-weight:700;font-size:.95em}
.ov .layer{transition:opacity .35s}.ov .layer.off{opacity:0;pointer-events:none}
.stage.failed::before{content:"";}

.controls{display:flex;flex-wrap:wrap;gap:.6rem 1rem;align-items:center;margin:.8rem auto 0;font-family:var(--sans);font-size:1rem}
.btn{font:inherit;font-family:var(--sans);font-size:1rem;min-height:2.75rem;padding:.45rem 1rem;border-radius:1.4rem;border:1px solid var(--line);background:var(--surface);color:var(--text);cursor:pointer}
.btn.primary{background:var(--text);color:var(--bg);border-color:var(--text)}
.btn[aria-pressed="true"]{background:var(--accent);color:var(--bg);border-color:var(--accent)}
.btn:disabled{opacity:.5;cursor:default}
.year{font-family:var(--sans);font-variant-numeric:tabular-nums;font-size:1.6rem;font-weight:700;min-width:4ch}
input[type=range]{flex:1 1 14rem;accent-color:var(--accent);min-height:2.75rem}
.status{font-family:var(--sans);font-size:1rem;color:var(--text-2);min-height:1.5em;margin:.6rem 0 0}
.legend{display:flex;flex-wrap:wrap;gap:.3rem 1.1rem;font-family:var(--sans);font-size:.92rem;color:var(--muted);margin:.6rem 0 0}
.legend svg{vertical-align:-3px;margin-right:.3rem}

.card{background:var(--surface);border:1px solid var(--line-soft);border-radius:.8rem;padding:1rem 1.1rem;margin:.8rem 0;box-shadow:var(--shadow)}
.card h3{margin:0 0 .3rem}
.dates{display:grid;grid-template-columns:auto 1fr;gap:.2rem .8rem;font-family:var(--sans);font-size:.97rem;margin:.5rem 0}
.dates dt{color:var(--muted)}.dates dd{margin:0}
.tier{display:inline-block;font-family:var(--sans);font-size:.82rem;border:1px solid var(--line);border-radius:.8rem;padding:0 .5rem;color:var(--text-2)}

.hyps{display:flex;flex-wrap:wrap;gap:.5rem;margin:.8rem 0}
.verdict{border-left:4px solid var(--accent);padding:.2rem 0 .2rem 1rem;margin:1rem 0}
.verdict p:last-child{margin:0}

/* dumbbell: tradition vs record */
.gap{width:100%;height:auto;display:block;margin:1rem 0}
.gap text{font-family:var(--sans);font-size:13px;fill:var(--text-2)}
.gap .ax{stroke:var(--line);stroke-width:1}
.gap .bar{stroke:var(--trad);stroke-width:2;stroke-dasharray:3 3}
.gap .d{fill:var(--doc)}.gap .d.edit{fill:var(--bg);stroke:var(--doc);stroke-width:2.5}
.gap .t{fill:var(--bg);stroke:var(--trad);stroke-width:2}

table{border-collapse:collapse;width:100%;font-family:var(--sans);font-size:.95rem}
th,td{text-align:left;vertical-align:top;padding:.5rem .4rem;border-bottom:1px solid var(--line-soft)}
th{color:var(--muted);font-weight:600}
.tablewrap{overflow-x:auto}
details{margin:1rem 0}summary{cursor:pointer;font-family:var(--sans);min-height:2.75rem;display:flex;align-items:center}
.sources li{margin:.4rem 0;font-size:1rem}
footer{margin:4rem 0 2rem;padding-top:1.5rem;border-top:1px solid var(--line-soft);font-family:var(--sans);font-size:.95rem;color:var(--muted)}
footer a{color:var(--text-2)}

.share-row{display:flex;flex-wrap:nowrap;gap:.35rem;align-items:center}
.share-row .lab{font-size:.95rem;color:var(--muted);margin-right:.2rem;font-family:var(--sans)}
.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(--line-soft);background:transparent;color:var(--text-2);text-decoration:none;cursor:pointer}
.share-row a:hover,.share-row button:hover,.share-row a:focus-visible,.share-row button:focus-visible{color:var(--accent);border-color:var(--accent)}
.share-row [hidden]{display:none}
@media (pointer:coarse){.share-row a,.share-row button{width:2.75rem;height:2.75rem}}
.share-status{font-family:var(--sans);font-size:.95rem;color:var(--ok);min-height:1.2em;margin:.4rem 0 0}

.to-top{position:fixed;right:max(1rem,env(safe-area-inset-right));bottom:max(1rem,env(safe-area-inset-bottom));z-index:30;width:2.9rem;height:2.9rem;border-radius:50%;border:1px solid var(--line);background:var(--surface);color:var(--text);font-family:var(--sans);font-size:.72rem;cursor:pointer;box-shadow:var(--shadow);opacity:0;visibility:hidden;transition:opacity .2s}
.to-top.show{opacity:1;visibility:visible}

@media (max-width:640px){
  body{font-size:1.06rem}
  .topbar{gap:.55rem;padding:0 .6rem}
  .topbar .home{font-size:.85rem}
}

/* ---------------------------------------------------------------- scroll story */
.scrolly{position:relative;display:grid;grid-template-columns:minmax(0,1fr);width:min(100% - 1rem,86rem);margin:0 auto}
.mapcol{position:sticky;top:3rem;z-index:5;background:var(--bg);padding:.4rem 0 .3rem}
.mapcol .stage{margin:0}
.mapcol .legend{margin:.35rem .3rem 0;font-size:.82rem;gap:.15rem .8rem}
.mapcol .legend span[hidden]{display:none}
.steps{position:relative;z-index:1}
.step{min-height:70vh;padding:1.2rem 1rem 2rem;max-width:36rem;margin:0 auto}
.step h2{margin-top:.6rem}
.step:last-child{min-height:60vh}
.yearbadge{position:absolute;left:.7rem;top:.5rem;font-family:var(--sans);font-weight:700;font-size:1.3rem;font-variant-numeric:tabular-nums;color:var(--text);text-shadow:0 0 6px var(--bg),0 0 3px var(--bg)}
.popup{position:absolute;z-index:8;left:.6rem;right:.6rem;bottom:.6rem;margin:0;max-width:26rem;font-size:1rem}
.popup .close{position:absolute;right:.3rem;top:.2rem;width:2.75rem;height:2.75rem;border:0;background:transparent;color:var(--text);font-size:1.5rem;cursor:pointer}
.popup h3{margin:0 2.2rem .3rem 0;font-size:1.1rem}
.popup p{margin:.3rem 0;font-size:.97rem}
.stage{cursor:default}.stage.guessing{cursor:crosshair}
@media (max-width:899px){
  .mapcol .stage{border-radius:.6rem}
  .mapcol .legend{display:none}
  .step{min-height:62vh;background:color-mix(in srgb,var(--bg) 94%,transparent)}
  .popup{position:fixed;bottom:max(.6rem,env(safe-area-inset-bottom))}
}
@media (min-width:900px){
  .scrolly{grid-template-columns:minmax(20rem,30rem) minmax(0,1fr);gap:2rem;align-items:start}
  .mapcol{grid-column:2;grid-row:1;top:3.6rem;padding:0}
  .steps{grid-column:1;grid-row:1}
  .step{padding:1rem 0 3rem;min-height:85vh;margin:0}
}
#toate{width:auto}
#toate > h2,#toate > p{width:min(100% - 2rem,40rem);margin-left:auto;margin-right:auto}
#toate > h2{margin-top:2.8rem}
.tablein{width:min(100% - 1rem,76rem)}
