:root {
  --paper: #f4eee3;
  --ink: #1d2b45;          /* the blue of the route lines in the book */
  --ink-soft: #55617a;
  --accent: #a2552f;
  --line: rgba(29, 43, 69, .18);
  --de: #6b6f76;
  --su: #b04a3a;
  --pl: #c9b88f;
  --serif: "Frank Ruhl Libre", "David", serif;
  --sans: "IBM Plex Sans Hebrew", "Arial Hebrew", sans-serif;
  --t: 1.6s;
}
/* Seasons tint the whole world */
body[data-season="summer"] { --paper: #f5eedb; --ink: #2a2b1f; --accent: #b8772c; }
body[data-season="autumn"] { --paper: #efe2cf; --ink: #33231a; --accent: #9c4a22; }
body[data-season="winter"] { --paper: #e9edf1; --ink: #1b2638; --accent: #4b6a8f; }
body[data-season="thaw"]   { --paper: #e8e6df; --ink: #2a2f30; --accent: #6e7d6a; }
body[data-season="spring"] { --paper: #f3efe6; --ink: #25301f; --accent: #8a6f9e; }
body[data-season="war"]    { --paper: #e4e0d8; --ink: #1a1c20; --accent: #8e2f22; }
body[data-season="night"]  { --paper: #15171b; --ink: #e8e2d6; --accent: #c98a5a; }

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--serif); font-size: 20px; line-height: 1.75;
  transition: background-color var(--t) ease, color var(--t) ease;
  overflow-x: hidden;
}
#weather { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 1; }
main { position: relative; z-index: 2; }

.screen { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 10vh 16px; }
.kicker { font-family: var(--sans); font-size: 14px; letter-spacing: .2em; color: var(--accent); margin: 0 0 .5em; transition: color var(--t); }
h1 { font-size: clamp(56px, 11vw, 128px); font-weight: 300; margin: 0; line-height: 1; }
h2 { font-size: clamp(36px, 6vw, 60px); font-weight: 300; margin: 0; line-height: 1.1; }
.years { font-family: var(--sans); font-size: 15px; letter-spacing: .12em; color: var(--ink-soft); margin: .9em 0 0; }
.sub { font-size: 22px; color: var(--ink-soft); margin: .8em 0 0; }
.hint { font-family: var(--sans); font-size: 13px; color: var(--ink-soft); margin-top: 2em; animation: breathe 3s ease-in-out infinite; }
@keyframes breathe { 50% { opacity: .35; } }
.road-start { width: 80px; height: 160px; margin-top: 3em; }
.road-start path { fill: none; stroke: var(--ink); stroke-width: 2.2; stroke-dasharray: 600; stroke-dashoffset: 600; animation: draw 3s 0.6s ease forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }

/* ---------- Dial ---------- */
#dial { position: fixed; top: 20px; left: 20px; z-index: 5; width: 112px; text-align: center; opacity: 0; transition: opacity .8s; pointer-events: none; }
#dial.on { opacity: 1; }
#dial svg { width: 112px; height: 112px; overflow: visible; }
#dial .ring { fill: none; stroke: var(--line); stroke-width: 1; }
#dial .hand { fill: var(--accent); transition: fill var(--t); }
#dial .s { font-family: var(--sans); font-size: 9px; text-anchor: middle; fill: var(--ink-soft); opacity: .5; transition: opacity .6s; }
#dial .s.on { opacity: 1; fill: var(--ink); font-weight: 500; }
.dial-label { font-family: var(--sans); font-size: 12px; color: var(--ink-soft); margin-top: 4px; min-height: 1.4em; }
#dial .calendar { display: none; font-family: var(--sans); background: var(--paper); border: 1px solid var(--ink); padding: 8px 6px 6px; line-height: 1.15; }
#dial.cal svg, #dial.cal .dial-label { display: none; }
#dial.cal { top: auto; bottom: 20px; width: 92px; }
#dial.cal .calendar { display: block; }
.cal-day { display: block; font-size: 34px; font-weight: 500; }
.cal-month { display: block; font-size: 13px; }
.cal-year { display: block; font-size: 12px; color: var(--ink-soft); }
.cal-approx .cal-day { font-size: 18px; padding: 8px 0; }

/* ---------- Year ---------- */
#year { padding: 0 16px; }
.chapter-head { min-height: 70vh; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; }
.note { font-family: var(--sans); font-size: 15px; color: var(--ink-soft); max-width: 30em; }
.scene { min-height: 100vh; max-width: 640px; margin: 0 auto; display: flex; flex-direction: column; justify-content: center; padding: 10vh 0; }
.scene .label { font-family: var(--sans); font-size: 13px; letter-spacing: .15em; color: var(--accent); transition: color var(--t); }
.scene h3 { font-size: 34px; font-weight: 400; margin: .1em 0 .6em; }
.scene p.his { margin: 0 0 1em; opacity: 0; transform: translateY(14px); transition: opacity 1.1s ease, transform 1.1s ease; }
.scene.in p.his { opacity: 1; transform: none; }
.scene.in p.his:nth-child(4) { transition-delay: .35s; }
.scene.in p.his:nth-child(5) { transition-delay: .7s; }
.page-ref { font-family: var(--sans); font-size: 12px; color: var(--ink-soft); }
.obj { width: 64px; height: 64px; margin-bottom: 18px; }
.obj * { fill: none; stroke: var(--ink); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.photo { margin: 1.4em 0 0; }
.photo img { max-width: 100%; max-height: 52vh; display: block; filter: sepia(.25) contrast(.95); box-shadow: 0 8px 30px rgba(0,0,0,.18); }
.photo figcaption { font-family: var(--sans); font-size: 12px; color: var(--ink-soft); margin-top: 6px; }

/* ---------- Rupture ---------- */
#rupture .rupture-line { font-size: 28px; font-weight: 300; }
#rupture .rupture-date { font-family: var(--sans); font-size: clamp(80px, 18vw, 200px); font-weight: 300; margin: .2em 0 0; color: var(--accent); letter-spacing: -.02em; }

/* ---------- War ---------- */
#war, #ussr, #cross, #il { padding: 0 16px; }
/* phones: no sideways drag/pan, no rubber-band bounce; vertical scroll and pinch-zoom stay */
html { overflow-x: hidden; overscroll-behavior: none; }
body { overflow-x: clip; overscroll-behavior: none; touch-action: pan-y pinch-zoom; position: relative; width: 100%; }
img, svg, video { max-width: 100%; }
.war-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 48px; max-width: 1280px; margin: 0 auto; }
.war-map { position: relative; }
.map-frame { position: sticky; top: 6vh; height: 88vh; display: flex; flex-direction: column; justify-content: center; }
#map { width: 100%; height: auto; max-height: 76vh; }
.map-date { font-family: var(--sans); font-size: 15px; text-align: center; margin-top: 8px; min-height: 1.5em; }
.map-legend { display: flex; gap: 16px; justify-content: center; font-family: var(--sans); font-size: 12px; color: var(--ink-soft); margin-top: 6px; flex-wrap: wrap; }
.sw { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-inline-end: 5px; vertical-align: middle; }
.sw.pl { background: var(--pl); } .sw.de { background: var(--de); } .sw.su { background: var(--su); }

.wstep { min-height: 90vh; display: flex; flex-direction: column; justify-content: center; padding: 6vh 0; }
.wstep .when { font-family: var(--sans); font-size: 13px; letter-spacing: .1em; color: var(--accent); }
.wstep h3 { font-size: 30px; font-weight: 400; margin: .1em 0 .5em; }
.wstep p.his { margin: 0 0 .9em; }

/* the historical layer: an archive card, visibly not his voice */
.hist { font-family: var(--sans); font-size: 15px; line-height: 1.65; background: rgba(255,255,255,.45); border-inline-start: 3px solid var(--ink); padding: 16px 18px 12px; margin: 4vh 0; min-height: auto; }
.hist .tag { font-size: 11px; letter-spacing: .18em; color: var(--ink-soft); }
.hist .hdate { font-weight: 500; font-size: 13px; margin-top: 2px; }
.hist h4 { font-size: 18px; font-weight: 500; margin: .2em 0 .4em; }
.hist p { margin: 0 0 .6em; }
.hist details { font-size: 12px; color: var(--ink-soft); }
.hist details a { color: inherit; word-break: break-all; }
.hist .conf-low { color: var(--accent); }

/* map elements */
svg .side-label { font-family: var(--sans); font-size: 12px; letter-spacing: .15em; fill: var(--ink-soft); transition: opacity .8s; }
svg .line { fill: none; stroke-width: 2; stroke-dasharray: 6 5; opacity: 0; transition: opacity .8s; }
svg .line.on { opacity: 1; }
svg .line.l1 { stroke: var(--ink-soft); }
svg .line.l2 { stroke: var(--ink); stroke-width: 2.6; }
svg .line-label { font-family: var(--sans); font-size: 11px; fill: var(--ink); opacity: 0; transition: opacity .8s; }
svg .line-label.on { opacity: 1; }
svg .town circle.halo { transition: fill .9s, r .9s; opacity: .55; }
svg .town circle.dot { fill: var(--ink); }
svg .town text { font-family: var(--sans); font-size: 13px; fill: var(--ink); paint-order: stroke; stroke: var(--paper); stroke-width: 4px; }
svg .town.home text { font-size: 15px; font-weight: 500; }

svg .river-label { font-family: var(--sans); font-size: 11px; fill: #6d87a3; font-style: italic; }

/* ---------- living map layers ---------- */
#map, #map2 { background: color-mix(in srgb, var(--paper) 85%, #fff); border-radius: 4px; }
.relief { opacity: .55; mix-blend-mode: multiply; }
.forest { stroke: #4f6b48; stroke-opacity: .18; stroke-width: .6; }
.coastline { fill: none; stroke: #7d97b3; stroke-width: 1.1; opacity: .8; }
.river { fill: none; stroke: #7d97b3; stroke-linecap: round; stroke-linejoin: round; opacity: .85; }
.river.r1 { stroke-width: 2; } .river.r2 { stroke-width: 1.3; } .river.r3 { stroke-width: .8; opacity: .6; }
.road { fill: none; stroke: #b9a98a; stroke-width: 1; opacity: .7; }
.rail-base { fill: none; stroke: #3a3a3a; stroke-width: 1.6; opacity: .55; }
.rail-tie { fill: none; stroke: var(--paper); stroke-width: .9; stroke-dasharray: 3 3; opacity: .9; }
.zone { opacity: 0; transition: opacity 1.4s; } .zone.on { opacity: 1; }
.occupied { opacity: 0; transition: opacity 1.2s; } .occupied.on { opacity: 1; }
.front { fill: none; stroke: var(--su); stroke-width: 2.2; stroke-linejoin: round; opacity: 0; transition: opacity 1.2s; filter: drop-shadow(0 0 2px rgba(176,74,58,.4)); }
.front.on { opacity: .9; }
svg .arrow { fill: none; stroke-width: 3; stroke-linecap: round; opacity: 0; transition: opacity .8s; stroke-dasharray: 10 6; animation: march 1.2s linear infinite; }
svg .arrow.de { stroke: #4d5158; } svg .arrow.su { stroke: var(--su); }
svg .arrow.on { opacity: .85; }
@keyframes march { to { stroke-dashoffset: -16; } }
svg .arrow-label { font-family: var(--sans); font-size: 11px; opacity: 0; transition: opacity .8s; paint-order: stroke; stroke: var(--paper); stroke-width: 3px; }
svg .arrow-label.de { fill: #3b3e44; } svg .arrow-label.su { fill: var(--su); } svg .arrow-label.on { opacity: 1; }
svg .event { opacity: 0; transition: opacity .8s; } svg .event.on { opacity: 1; }
svg .ev-label { font-family: var(--sans); font-size: 11px; fill: var(--accent); paint-order: stroke; stroke: var(--paper); stroke-width: 3px; }
svg .smoke { fill: #333; opacity: .0; animation: smoke 2.7s ease-out infinite; transform-box: fill-box; transform-origin: center; }
@keyframes smoke { 0% { opacity: .35; transform: scale(.4) translateY(0); } 100% { opacity: 0; transform: scale(2.2) translateY(-10px); } }
svg .flame { fill: #d9662b; animation: flicker .5s ease-in-out infinite alternate; }
@keyframes flicker { to { fill: #f2a33a; } }
svg .swords { stroke: var(--ink); stroke-width: 2; stroke-linecap: round; }
svg .ring { fill: none; stroke: var(--accent); stroke-width: 1.5; animation: ping 1.8s ease-out infinite; transform-box: fill-box; transform-origin: center; }
@keyframes ping { 0% { opacity: .9; transform: scale(.6); } 100% { opacity: 0; transform: scale(1.8); } }
svg .flow-path { fill: none; stroke: var(--accent); stroke-width: 1; stroke-dasharray: 2 4; opacity: .5; }
svg .flow-dot { fill: var(--accent); offset-rotate: 0deg; animation: flow 6.3s linear infinite; }
@keyframes flow { from { offset-distance: 0%; } to { offset-distance: 100%; } }
svg .q-ring { fill: var(--paper); stroke: var(--accent); stroke-width: 1.3; stroke-dasharray: 2 2; }
svg .q { font-family: var(--sans); font-size: 10px; font-weight: 500; fill: var(--accent); }
svg .route-ghost { fill: none; stroke: var(--accent); stroke-width: 1; stroke-dasharray: 1 5; opacity: .35; }
svg .route { fill: none; stroke: var(--accent); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
svg .you { transition: transform 1.6s cubic-bezier(.45,.05,.3,1); }
svg .you-dot { fill: var(--accent); stroke: var(--paper); stroke-width: 2; }
svg .you-halo { fill: var(--accent); opacity: .25; animation: ping 2.2s ease-out infinite; transform-box: fill-box; transform-origin: center; }
svg .town .pulse { fill: none; stroke: var(--ink); stroke-width: 1; opacity: .5; animation: ping 3s ease-out infinite; transform-box: fill-box; transform-origin: center; }
svg .town.minor text { font-size: 10px; fill: var(--ink-soft); }
svg .town.minor .dot { fill: var(--ink-soft); }
#map2 .town text { font-size: 10px; } #map2 .town.home text { font-size: 11.5px; }
#map2 .town.minor text { font-size: 8.5px; }
#map2 .ev-label, #map2 .side-label { font-size: 9px; }
.map-frame.wide #map2 { max-height: 60vh; }
.map-km { font-family: var(--sans); font-size: 14px; text-align: center; margin-top: 8px; }
.map-km span { font-size: 24px; font-weight: 500; color: var(--accent); }
.sw.route-sw { background: var(--accent); border-radius: 2px; height: 3px; width: 14px; }
.sw.front-sw { background: var(--su); border-radius: 2px; height: 3px; width: 14px; }
.sw.occ-sw { background: repeating-linear-gradient(45deg, rgba(85,88,94,.45) 0 2px, transparent 2px 5px); border-radius: 0; }
.editor { font-family: var(--sans); font-size: 14px; line-height: 1.6; color: var(--ink-soft); border-top: 1px dashed var(--line); padding-top: 10px; margin-top: 14px; }
.editor span { display: block; font-size: 11px; letter-spacing: .15em; color: var(--accent); }
.attr { font-size: 11px; }

/* ---------- newspaper clipping ---------- */
.clipping { min-height: auto; padding: 8vh 0; }
.clipping .tag { font-family: var(--sans); font-size: 11px; letter-spacing: .18em; color: var(--ink-soft); }
.clipping h3 { font-size: 28px; font-weight: 400; margin: .1em 0 .6em; }
.clip-img img { width: 100%; max-width: 460px; display: block; margin: 0 auto; transform: rotate(-1.2deg); box-shadow: 0 10px 30px rgba(0,0,0,.25); }
.clip-img { margin: 0 0 22px; }
.clip-wrap { position: relative; width: min(100%, 460px); margin: 0 auto; transform: rotate(-1.2deg); }
.clip-wrap img { transform: none; width: 100%; }
.clip-wrap .face { position: absolute; aspect-ratio: 1; transform: translate(-50%, -50%); border-radius: 50%; cursor: default; outline: none; }
.clip-wrap .face b { position: absolute; top: 96%; left: 50%; transform: translateX(-50%); white-space: nowrap; font-family: var(--sans); font-size: 12px; font-weight: 400; color: var(--ink); background: color-mix(in srgb, var(--paper) 88%, transparent); padding: 1px 8px; border-radius: 3px; box-shadow: 0 1px 4px rgba(0,0,0,.12); }
/* hovering a name softly dims everything except that face */
.clip-wrap::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: rgba(30, 24, 16, .5); opacity: 0; transition: opacity .6s ease;
  -webkit-mask: radial-gradient(circle at var(--fx, 50%) var(--fy, 50%), transparent var(--fr, 10%), #000 calc(var(--fr, 10%) + 7%));
          mask: radial-gradient(circle at var(--fx, 50%) var(--fy, 50%), transparent var(--fr, 10%), #000 calc(var(--fr, 10%) + 7%)); }
.clip-wrap.spot::after { opacity: 1; }
.clip-cap strong { cursor: default; border-bottom: 1px dotted currentColor; }
.clip-cap { font-family: var(--sans); font-size: 14px; color: var(--ink-soft); text-align: center; margin-top: 14px; }
.clip-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.clip-tabs button { font-family: var(--sans); font-size: 13px; padding: 6px 12px; border: 1px solid var(--line); background: transparent; color: var(--ink); border-radius: 20px; cursor: pointer; }
.clip-tabs button[aria-selected="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.clip-pane { font-size: 16px; line-height: 1.75; background: rgba(255,255,255,.4); padding: 14px 16px; border-radius: 4px; }
.clip-pane[lang="ru"] { font-family: "Frank Ruhl Libre", Georgia, serif; text-align: left; }
.clip-pane .small { font-family: var(--sans); font-size: 12px; color: var(--ink-soft); text-align: start; }
.clip-pane[lang="ru"] .small { direction: rtl; text-align: right; }
mark.err { background: none; color: inherit; padding: 0 1px; text-decoration: underline wavy #c0392b; text-decoration-thickness: 1.5px; text-underline-offset: 3px; position: relative; cursor: help; }
mark.err .flag { position: absolute; top: calc(100% - 1px); left: 50%; transform: translateX(-50%); font-family: var(--sans); font-size: 9px; line-height: 1; font-weight: 400; color: #c0392b; text-decoration: none; white-space: nowrap; pointer-events: none; }
.miss { font-family: var(--sans); font-size: 12px; color: var(--accent); position: relative; cursor: help; }
mark.err .why, .miss .why { display: none; position: absolute; inset-inline-start: 0; top: calc(100% + 12px); z-index: 4; width: min(280px, 70vw); font-family: var(--sans); font-size: 12.5px; line-height: 1.5; font-weight: 400; background: var(--ink); color: var(--paper); padding: 8px 10px; border-radius: 4px; }
mark.err:hover .why, mark.err:focus .why, .miss:hover .why, .miss:focus .why { display: block; }

/* ---------- his words, in full ---------- */
.key { background: linear-gradient(transparent 62%, color-mix(in srgb, var(--accent) 16%, transparent) 62%); transition: background var(--t); }
h4.sub { font-family: var(--serif); font-size: 22px; font-weight: 500; margin: 1.2em 0 .4em; }
.more p.his { opacity: 1 !important; transform: none !important; }
.more { animation: unfold .6s ease; }
@keyframes unfold { from { opacity: 0; transform: translateY(-6px); } }
.more-btn { font-family: var(--sans); font-size: 14px; color: var(--accent); background: none; border: 0; border-bottom: 1px solid currentColor; padding: 2px 0; margin: .2em 0 1.2em; cursor: pointer; }
.more-btn::after { content: " ↓"; }
.more-btn[aria-expanded="true"]::after { content: " ↑"; }
.book-note { font-family: var(--sans); font-size: 13px; color: var(--ink-soft); border-inline-start: 2px solid var(--line); padding-inline-start: 10px; }

/* ---------- chapter 3 ---------- */
body[data-season="dawn"]   { --paper: #f3e2d6; --ink: #2b2433; --accent: #c0643c; }
body[data-season="israel"] { --paper: #f6f0e2; --ink: #2b2a22; --accent: #b3713a; }
#map4 .line.l2 { stroke-dasharray: 4 3; stroke-width: 1.4; }
#map4 .town text { font-size: 10px; } #map4 .town.home text { font-size: 11.5px; }
#map4 .town.minor text { font-size: 8.5px; }
#map4 .side-label { font-size: 8px; letter-spacing: .05em; }
#map3 .side-label { font-size: 11px; }
#map3 .route { stroke-width: 2.4; }
#map4 .route { stroke-width: 2; }
.map-frame:has(#map4) #map4 { max-height: 82vh; }

.thread { list-style: none; margin: 0 auto; padding: 0 16px 10vh; max-width: 720px; position: relative; }
.thread::before { content: ""; position: absolute; top: 0; bottom: 0; inset-inline-start: 84px; width: 2px; background: linear-gradient(var(--accent), color-mix(in srgb, var(--accent) 20%, transparent)); }
.knot { display: grid; grid-template-columns: 70px 1fr; gap: 28px; padding: 6vh 0; position: relative; opacity: 0; transform: translateY(16px); transition: opacity 1s, transform 1s; }
.knot.in { opacity: 1; transform: none; }
.knot::after { content: ""; position: absolute; inset-inline-start: 63px; top: calc(6vh + 14px); width: 12px; height: 12px; border-radius: 50%; background: var(--paper); border: 2px solid var(--accent); }
.knot .yr { font-family: var(--sans); font-size: 20px; font-weight: 500; color: var(--accent); padding-top: 6px; text-align: start; }
.knot h3 { font-size: 26px; font-weight: 400; margin: 0 0 .3em; }
.knot .his { margin: 0 0 .5em; }
.hist.mini { margin: 16px 0 0; min-height: auto; }
.portraits { display: flex; gap: 18px; justify-content: center; margin-bottom: 2em; }
.portraits img { width: min(38vw, 260px); filter: grayscale(1) contrast(1.05); mix-blend-mode: multiply; opacity: .9; }
.portraits figure { margin: 0; }
.portraits figcaption { font-family: var(--sans); font-size: 13px; color: var(--ink-soft); margin-top: 6px; }
#end .last { font-size: 24px; font-weight: 300; max-width: 26em; margin: 1.2em auto .3em; }
@media (max-width: 820px) {
  .thread::before { inset-inline-start: 56px; }
  .knot { grid-template-columns: 44px 1fr; gap: 22px; }
  .knot::after { inset-inline-start: 50px; }
  .knot .yr { font-size: 15px; }
  #map4 { max-height: 46vh !important; }
}

/* ---------- photo versions (a switch on each image) ---------- */
.pv-frame { position: relative; display: inline-block; max-width: 100%; vertical-align: top; }
.pv-frame img { display: block; }
.pv-frame:not(.ready) .pv-switch { display: none; }   /* no switch until the photo has a size */
.pv-switch { position: absolute; bottom: 10px; right: 10px; display: flex; gap: 2px; padding: 3px; border-radius: 16px; background: rgba(20, 18, 14, .55); backdrop-filter: blur(6px); font-family: var(--sans); font-size: 12px; opacity: .8; transition: opacity .3s; }
.pv-frame:hover .pv-switch, .pv-switch:focus-within { opacity: 1; }
.pv-switch button { font: inherit; border: 0; background: none; color: #f3eee4; padding: 4px 10px; border-radius: 13px; cursor: pointer; }
.pv-switch button[aria-pressed="true"] { background: #f3eee4; color: #1f1b14; }
.portraits .pv-frame img { width: 100%; }
.clip-wrap .pv-frame { display: block; }
.clip-wrap .pv-switch { bottom: auto; top: 10px; }
.ai-note { display: block; font-family: var(--sans); font-size: 11px; color: var(--accent); margin-top: 3px; }
.ai-note:empty { display: none; }
@media (max-width: 820px) { .pv-switch { bottom: 6px; right: 6px; font-size: 12px; opacity: 1; } .pv-switch button { padding: 7px 11px; min-height: 32px; } }

/* ---------- km ---------- */
.km-num { font-family: var(--sans); font-size: clamp(72px, 16vw, 180px); font-weight: 300; margin: 0; line-height: 1; }
.km-text { font-size: 24px; margin: .6em 0 0; }
.km-text.small { font-size: 18px; color: var(--ink-soft); }

.stops { list-style: none; padding: 0; margin: 1.4em 0 .4em; display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 0; font-family: var(--sans); font-size: 14px; }
.stops li { padding: 0 10px; position: relative; }
.stops li + li::before { content: "←"; position: absolute; inset-inline-start: -6px; color: var(--ink-soft); }
.stops li.added { color: var(--accent); font-weight: 500; }
.stops li.added span { display: block; font-size: 10px; font-weight: 400; color: var(--ink-soft); }
footer { font-family: var(--sans); font-size: 13px; color: var(--ink-soft); text-align: center; padding: 40px 16px 60px; border-top: 1px solid var(--line); }

/* ---------- mobile ---------- */
@media (max-width: 820px) {
  body { font-size: 18px; }
  /* the season dial sits in the bottom corner on phones, small and out of the text's way */
  #dial { top: auto; bottom: 10px; left: 10px; width: 58px; opacity: .9; }
  #dial svg { width: 58px; height: 58px; }
  #dial .dial-label { display: none; }
  .war-grid { grid-template-columns: 1fr; gap: 0; }
  .war-map { order: -1; position: sticky; top: 0; z-index: 3; background: var(--paper); transition: background-color var(--t); margin: 0 -16px; padding: 0 16px; box-shadow: 0 6px 12px -10px rgba(0,0,0,.25); }
  .map-frame { position: static; height: auto; padding: 6px 0; }
  #map, #map2, #map3 { max-height: 36vh; width: 100%; }
  .map-frame.wide #map2 { max-height: 30vh; }
  .map-km { margin-top: 2px; font-size: 12px; } .map-km span { font-size: 18px; }
  .scene, .wstep { padding-inline: 0; }
  .scene h3, .wstep h3 { font-size: 26px; }
  h4.sub { font-size: 20px; }
  .hist { padding: 14px 14px 10px; }
  /* the clipping: no tilt on phones, so it never pokes past the screen edge */
  .clip-wrap { transform: none; width: 100%; }
  .clip-tabs button { font-size: 12px; padding: 5px 10px; }
  .clip-pane { font-size: 15px; padding: 12px; }
  .photo img { max-height: 46vh; width: auto; margin-inline: auto; }
  .portraits img { width: 100%; }
  .stops { font-size: 12px; }
  .km-text { font-size: 20px; }
  #rupture .rupture-line { font-size: 22px; }
  .screen { padding: 8vh 16px; }
  .map-legend { display: none; }
  #dial.cal { display: none; }
  .wstep { min-height: 55vh; }
  .wstep.hist { min-height: 0; margin: 5vh 0; }
  .clipping.wstep { min-height: 0; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition-duration: .01s !important; animation: none !important; }
  .scene p.his { opacity: 1; transform: none; }
}

p.his, .knot .his { line-height: 1.9; }
h3 mark.err .flag, h4 mark.err .flag { font-size: 10px; top: 100%; }
