/* Portfolio concept G: the year of walks (from E), then one walk drawn as a route on deep ink (from D),
   timed by a large clock (from E). Palette from the home page. */
@font-face { font-family: "DM Sans"; src: url("../assets/fonts/DMSans.ttf") format("truetype"); font-weight: 100 1000; font-display: swap; }
@font-face { font-family: "Cormorant Garamond"; src: url("../assets/fonts/CormorantGaramond.ttf") format("truetype"); font-weight: 300 700; font-display: swap; }
@font-face { font-family: "Caveat"; src: url("../assets/fonts/Caveat.ttf") format("truetype"); font-weight: 400 700; font-display: swap; }

:root {
  --field: #eef0f3;
  --hi: #fbfcfd;
  --lo: #dce0e5;
  --lo-soft: #e4e8ed;
  --paper: #f4efe6;   /* warm paper, sampled from the page backgrounds */
  --text: #424a58;
  --hand: #914430;
  --ink: #172031;
  --muted: #4c5666;
  --route: #d2582f;
  --deep: #172031;
  --on-deep: #eceff1;
  --on-deep-muted: #b7becb;
  --on-deep-link: #eeac8b;   /* warm orange for text on ink (8.6:1). The route orange (3.7:1) marks lines and dots only. */
  --gap-deep: #8f97a6;
  --line: color-mix(in oklab, var(--ink) 15%, transparent);
  --deep-line: color-mix(in oklab, var(--on-deep) 22%, transparent);
  --deep-hair: color-mix(in oklab, var(--on-deep) 7%, transparent);
  --chip: #222c3f;
  --warn: color-mix(in oklab, var(--route) 62%, var(--ink));
  --paper-shadow: 0 18px 34px -18px color-mix(in oklab, var(--ink) 48%, transparent), 0 2px 6px -2px color-mix(in oklab, var(--ink) 13%, transparent);
  --deep-shadow: 0 34px 60px -26px rgba(0, 0, 0, .75), 0 0 0 1px rgba(255, 255, 255, .05);
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --gutter: clamp(16px, 3.4vw, 48px);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0; background: var(--field); color: var(--text); overflow-x: clip;
  font: 400 18px/1.55 "DM Sans", system-ui, sans-serif; -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
img { height: auto; }
h1, h2, h3, p, figure, ul, ol, dl, dd { margin: 0; }
ul, ol { padding: 0; list-style: none; }
p { text-wrap: pretty; }
a { color: inherit; text-underline-offset: .2em; text-decoration-thickness: 1px; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--route); outline-offset: 3px; border-radius: 4px; }
[hidden] { display: none !important; }
.nowrap { white-space: nowrap; }
.vh { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.wrap { width: min(100% - 2 * var(--gutter), 1344px); margin-inline: auto; }
.skip { position: absolute; left: var(--gutter); top: -60px; z-index: 60; background: var(--ink); color: var(--field); padding: 12px 16px; border-radius: 4px; text-decoration: none; font-weight: 600; }
.skip:focus { top: 8px; }

/* Header (as on the home page) */
.top { display: flex; flex-wrap: wrap; align-items: center; gap: 0 20px; padding-block: 10px; }
.wordmark { font: 700 32px/1 "Caveat", cursive; color: var(--ink); text-decoration: none; display: inline-flex; align-items: center; min-height: 44px; }
.nav { display: flex; gap: 2px; margin-left: auto; }
.nav a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px; font-weight: 600; font-size: 16px; color: var(--ink); text-decoration: none; border-radius: 4px; }
.nav a[aria-current="page"] { box-shadow: inset 0 -2px 0 var(--route); border-radius: 0; }
@media (hover: hover) and (pointer: fine) { .nav a:not([aria-current]):hover { background: var(--line); } }

.label, .eyebrow { font: 600 12px/1.4 "DM Sans", system-ui, sans-serif; letter-spacing: .08em; text-transform: uppercase; }
.tag { display: inline-flex; align-items: center; min-height: 26px; padding: 0 10px; border: 1px solid color-mix(in oklab, var(--ink) 30%, transparent); border-radius: 999px; font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--ink); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 24px; border-radius: 999px; border: 0; background: var(--ink); color: var(--field); font-weight: 600; font-size: 16px; text-decoration: none; cursor: pointer; transition: background-color .2s ease; }
@media (hover: hover) and (pointer: fine) { .btn:hover { background: color-mix(in oklab, var(--ink) 84%, var(--field)); } }
.btn-deep { background: var(--on-deep); color: var(--ink); }
@media (hover: hover) and (pointer: fine) { .btn-deep:hover { background: #fff; } }
.link { display: inline-flex; align-items: center; min-height: 44px; padding: 0; border: 0; background: none; color: var(--hand); font-weight: 600; font-size: 15px; text-decoration: underline; text-underline-offset: .25em; cursor: pointer; }

/* ---------------------------------------------------------------- 1 The hero: a tabletop map and the selected journal
   One 12-column grid (24 px gutters) inside .wrap: headline and map on columns 1-8, intro sentence and card on 9-12.
   The map is a paper sheet lying on the table (CSS perspective + rotateX); the card's top and bottom equal the stage's,
   and the sheet is sized so its projected top and bottom edges land on the stage's. */
@property --tilt { syntax: "<angle>"; inherits: true; initial-value: 22deg; }
@property --sc { syntax: "<number>"; inherits: true; initial-value: 1; }
.hero {
  --cols: 12; --cg: 24px;
  --water: #cfd8e2; --water-edge: #bdc8d5;
  --land-us: #faf6ee; --land-ca: #eceef0;
  --tilt: 22deg; --sc: 1;
  padding-block: clamp(20px, 2.4vw, 32px) clamp(56px, 7vw, 96px);
}
.hero-grid { position: relative; display: grid; grid-template-columns: repeat(var(--cols), minmax(0, 1fr)); column-gap: var(--cg); align-items: last baseline; }
.hero-head { grid-column: 1 / 9; grid-row: 1; }
.kicker-top { font: 600 12px/1.4 "DM Sans", system-ui, sans-serif; letter-spacing: .08em; text-transform: uppercase; color: var(--hand); margin-bottom: 10px; }
h1 { font: 500 clamp(44px, 5.8vw, 86px)/.98 "Cormorant Garamond", serif; color: var(--ink); letter-spacing: -.01em; text-wrap: balance; }
.lede { grid-column: 9 / 13; grid-row: 1; font-size: 17px; line-height: 1.5; color: var(--text); }

.stage-col { grid-column: 1 / 9; grid-row: 2; align-self: stretch; margin-top: 28px; container-type: inline-size; min-width: 0; }
.sel { grid-column: 9 / 13; grid-row: 2; align-self: stretch; margin-top: 28px; }
.map-foot { grid-column: 1 / 9; grid-row: 3; }

/* ---------- the stage and the sheet ---------- */
/* Stage aspect: the sheet (764:484, the map build's frame) tilted by 22deg at perspective 300cqw projects to this height:
   h/w = (cos t / a) * 3 / (3 + sin t / a), a = 764/484 (see NOTES). */
.stage { position: relative; aspect-ratio: 1000 / 544.3; perspective: 300cqw; perspective-origin: 50% 100%; touch-action: manipulation; }
.sheet { position: absolute; left: 0; right: 0; bottom: 0; aspect-ratio: 764 / 484; transform-origin: 50% 100%;
  transform: rotateX(var(--tilt)) scale(var(--sc)); transform-style: preserve-3d; }
.paper { position: absolute; inset: 0; overflow: hidden; border-radius: 4px; background: var(--water);
  box-shadow: 0 44px 60px -34px color-mix(in oklab, var(--ink) 55%, transparent), 0 10px 22px -12px color-mix(in oklab, var(--ink) 30%, transparent); }
.paper::after { content: ""; position: absolute; inset: 0; z-index: 2; pointer-events: none; border-radius: inherit;
  /* light from the top left across the sheet, and a darker ocean margin */
  background: linear-gradient(160deg, rgba(255, 255, 255, .16), rgba(255, 255, 255, 0) 45%, color-mix(in oklab, var(--ink) 5%, transparent));
  box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--ink) 14%, transparent), inset 0 0 90px 10px var(--water-edge); }
/* the sheet's thickness: a thin edge standing at its near side, facing the viewer */
.sheet-edge { position: absolute; left: 2px; right: 2px; bottom: 0; height: 5px; transform-origin: 50% 100%; transform: rotateX(-90deg);
  background: linear-gradient(#c3cad3, #b4bcc7); border-radius: 0 0 3px 3px; pointer-events: none; }
.map, .raise { position: absolute; inset: 0; width: 100%; height: 100%; }
.map { z-index: 0; }
.raise { z-index: 1; pointer-events: none; overflow: visible; }

/* layers, bottom to top: water (the paper) > graticule > coast shadow > land > borders > coast > raised state */
.grat { fill: none; stroke: color-mix(in oklab, var(--ink) 9%, transparent); stroke-width: .6px; vector-effect: non-scaling-stroke; }
.coast-shadow { fill: none; stroke: color-mix(in oklab, var(--ink) 18%, transparent); stroke-width: 3.2px; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.fills path { fill-rule: evenodd; stroke: none; cursor: pointer; transition: fill .3s ease, opacity .9s ease; }
.fills path.off { pointer-events: none; cursor: default; }   /* less than 15% of it inside the frame: drawn, not hoverable */
.fills path.us { fill: color-mix(in oklab, var(--ink) calc(var(--t) * 1.4%), var(--land-us)); }
.fills path.ca { fill: color-mix(in oklab, var(--ink) calc(var(--t) * 1.4%), var(--land-ca)); }
.b-inner { fill: none; stroke: color-mix(in oklab, var(--ink) 24%, transparent); stroke-width: .7px; stroke-linejoin: round; vector-effect: non-scaling-stroke; pointer-events: none; }
.b-intl { fill: none; stroke: color-mix(in oklab, var(--ink) 46%, transparent); stroke-width: 1px; stroke-dasharray: 5 3; stroke-linejoin: round; vector-effect: non-scaling-stroke; pointer-events: none; }
.coast { fill: none; stroke: color-mix(in oklab, var(--ink) 55%, transparent); stroke-width: 1px; stroke-linejoin: round; vector-effect: non-scaling-stroke; pointer-events: none; }
.b-inner, .b-intl, .coast, .grat, .coast-shadow { transition: opacity .9s ease; }

/* zoomed: the other places step back */
.stage.zoomed { --tilt: 17deg; --sc: .945; }
.sheet { transition: --tilt .9s cubic-bezier(.65, 0, .35, 1), --sc .9s cubic-bezier(.65, 0, .35, 1); }
.stage.zoomed .fills path:not(.is-focus) { opacity: .55; }
.stage.zoomed .b-inner, .stage.zoomed .grat { opacity: .6; }

/* ---------- the raised (extruded) state: built by main.js in svg.raise, only for the hovered or zoomed state ---------- */
.rz .wall { transform: translate(0px, 0px); transition: transform .35s cubic-bezier(.4, 0, .6, 1); }
.rz.up .wall { transform: translate(0px, calc(var(--k) * var(--lift) * -1px)); transition: transform .45s var(--ease-out); }
.rz .face { stroke: color-mix(in oklab, var(--ink) 40%, transparent); stroke-width: .9px; stroke-linejoin: round; vector-effect: non-scaling-stroke; fill-rule: evenodd; cursor: pointer; }
.rz .wall:not(.face) { fill-rule: evenodd; }
.rz .shade { fill: var(--ink); opacity: 0; transform: translate(0px, 0px); transition: opacity .35s ease, transform .35s ease; }
.rz.up .shade { opacity: .26; transform: translate(calc(var(--lift) * .25px), calc(var(--lift) * .35px)); transition: opacity .45s ease, transform .45s var(--ease-out); }

/* ---------- Philadelphia: a flat halo on the map and an upright flag facing the viewer ---------- */
.pins { position: absolute; inset: 0; transform-style: preserve-3d; pointer-events: none; z-index: 2; }
.phl-base, .phl { position: absolute; left: 0; top: 0; transform-style: preserve-3d; }
.phl-base { width: 0; height: 0; transform: translate3d(var(--x, 0px), var(--y, 0px), 0); }
.phl-base i { position: absolute; left: -22px; top: -22px; width: 44px; height: 44px; border-radius: 50%;
  background: radial-gradient(closest-side, color-mix(in oklab, var(--route) 55%, transparent), color-mix(in oklab, var(--route) 0%, transparent)); }
.phl-base i:nth-child(1) { animation: halo 3.2s cubic-bezier(.2, .6, .35, 1) infinite; }
.phl-base i:nth-child(2) { animation: halo 3.2s cubic-bezier(.2, .6, .35, 1) 1.6s infinite; }
.phl-base b { position: absolute; left: -4px; top: -4px; width: 8px; height: 8px; border-radius: 50%; background: var(--route); box-shadow: 0 0 0 1.5px var(--hi); }
@keyframes halo { 0% { transform: scale(.35); opacity: .9; } 100% { transform: scale(1.9); opacity: 0; } }
.phl { width: 44px; height: 66px; margin: -66px 0 0 -22px; padding: 0; border: 0; background: none; cursor: pointer; pointer-events: auto; border-radius: 22px 22px 4px 4px;
  transform-origin: 50% 100%;
  transform: translate3d(var(--x, 0px), var(--y, 0px), 0) rotateX(calc(-1 * var(--tilt))); }
.phl-stem { position: absolute; left: 21px; bottom: 0; width: 2px; height: 46px; border-radius: 1px; background: linear-gradient(var(--ink), color-mix(in oklab, var(--ink) 55%, transparent)); }
.phl-head { position: absolute; left: 10px; top: 2px; width: 24px; height: 24px; border-radius: 50%; background: var(--route);
  box-shadow: 0 0 0 2.5px var(--hi), 0 6px 12px -4px color-mix(in oklab, var(--ink) 55%, transparent); }
.phl-head::after { content: ""; position: absolute; left: 6px; top: 5px; width: 7px; height: 5px; border-radius: 50%; background: color-mix(in oklab, #fff 45%, transparent); }
.phl[aria-pressed="true"] .phl-head { box-shadow: 0 0 0 2.5px var(--hi), 0 0 0 4px var(--route), 0 6px 12px -4px color-mix(in oklab, var(--ink) 55%, transparent); }
.phl-lab { position: absolute; left: 40px; top: 2px; display: grid; gap: 1px; text-align: left; white-space: nowrap; pointer-events: none; opacity: 0; transition: opacity .3s ease;
  padding: 3px 8px; border-radius: 4px; background: color-mix(in oklab, var(--hi) 88%, transparent); }
.phl-lab b { font: 600 14px/1.2 "DM Sans"; color: var(--ink); }
.phl-lab span { font: 500 12px/1.2 "DM Sans"; color: var(--hand); }
.stage.in-pa .phl-lab { opacity: 1; transition: opacity .6s ease .5s; }
.phl.lab-left .phl-lab { left: auto; right: 40px; text-align: right; justify-items: end; }   /* also at home, where it is hidden, so it never widens the page */
.stage.pv-on .phl-lab { opacity: 0; transition: opacity .2s ease; }
.phl.off, .phl-base.off { opacity: 0; pointer-events: none; transition: opacity .3s ease; }
.phl-base.off i { animation: none; }   /* the halo grows to about 2x: not while hidden at the sheet's edge */
.phl.pulse .phl-head { animation: pop .9s var(--ease-out); }
@keyframes pop { 40% { transform: scale(1.18); } }
.phl:focus-visible { outline-offset: 2px; }

/* the pin rides up with Pennsylvania when it is raised */
.phl-lift { display: block; position: absolute; inset: 0; transition: transform .35s cubic-bezier(.4, 0, .6, 1); }
.phl-base .phl-lift { inset: auto; left: 0; top: 0; }
.stage.pa-up .phl-base .phl-lift { transform: translateY(calc(var(--lpx, 13px) * -1)); transition: transform .45s var(--ease-out); }
.stage.pa-up .phl .phl-lift { transform: translateY(calc(var(--lpx, 13px) * -.92)); transition: transform .45s var(--ease-out); }
.phl-pop { position: absolute; inset: 0; transform-origin: 50% 100%; }
.rz.up .face { pointer-events: visiblePainted; }

/* ---------- labels, back button, preview (screen-flat, in the stage) ---------- */
.st-lab { position: absolute; left: 0; top: 0; z-index: 4; display: grid; gap: 1px; padding: 7px 12px 8px; border-radius: 6px; background: var(--hi); pointer-events: none; opacity: 0;
  box-shadow: 0 10px 22px -12px color-mix(in oklab, var(--ink) 60%, transparent), 0 0 0 1px var(--line); transition: opacity .2s ease; }
.st-lab::after { content: ""; position: absolute; left: calc(var(--ax, 50%) - 6px); bottom: -6px; width: 12px; height: 12px; background: var(--hi); transform: rotate(45deg); box-shadow: 1px 1px 0 0 var(--line); clip-path: polygon(100% 0, 100% 100%, 0 100%); }
.st-lab b { font: 600 14px/1.25 "DM Sans"; color: var(--ink); white-space: nowrap; }
.st-lab span { font: 500 12.5px/1.25 "DM Sans"; color: var(--muted); white-space: nowrap; }
.st-lab.has span { color: var(--hand); }
.stage.lab-on .st-lab { opacity: 1; transition: opacity .3s ease .12s; }

.map-back { position: absolute; left: 0; top: 0; z-index: 5; display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 16px 0 10px; border: 0; border-radius: 999px;
  background: var(--hi); color: var(--ink); font-weight: 600; font-size: 14px; cursor: pointer; box-shadow: 0 6px 16px -10px color-mix(in oklab, var(--ink) 60%, transparent), 0 0 0 1px var(--line);
  opacity: 0; transition: opacity .25s ease; }
.map-back svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.stage.zoomed .map-back { opacity: 1; transition: opacity .6s ease .3s; }
@media (hover: hover) and (pointer: fine) { .map-back:hover { background: var(--field); } }

.leader { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 4; pointer-events: none; overflow: visible; }
.leader-line { fill: none; stroke: var(--route); stroke-width: 1.5; stroke-linecap: round; stroke-dasharray: var(--len, 200); stroke-dashoffset: var(--len, 200); opacity: 0; transition: opacity .2s ease; }
.leader-end { fill: var(--route); opacity: 0; transition: opacity .2s ease; }
.stage.pv-on .leader-line { opacity: 1; stroke-dashoffset: 0; transition: stroke-dashoffset .45s cubic-bezier(.65, 0, .35, 1), opacity .1s linear; }
.stage.pv-on .leader-end { opacity: 1; transition: opacity .3s ease .35s; }
.pv { position: absolute; left: 0; top: 0; z-index: 6; width: 340px; padding: 12px; border-radius: 8px; background: var(--hi); box-shadow: var(--paper-shadow), 0 0 0 1px var(--line); pointer-events: none;
  opacity: 0; transform: translate3d(0, 0, 0) scale(.96); transform-origin: var(--ox, 50%) var(--oy, 50%); transition: opacity .22s ease, transform .22s ease; }
.stage.pv-on .pv { opacity: 1; transform: translate3d(0, -6px, 0) scale(1); transition: opacity .6s ease .12s, transform .65s var(--ease-out) .12s; }
.pv-real { display: grid; grid-template-columns: 116px minmax(0, 1fr); gap: 14px; align-items: start; }
.pv-cover { border-radius: 3px; overflow: hidden; box-shadow: 0 6px 14px -8px color-mix(in oklab, var(--ink) 60%, transparent), 0 0 0 1px var(--line); }
.pv-cover img { width: 100%; aspect-ratio: 4 / 5; }
.pv-txt { display: grid; gap: 4px; justify-items: start; min-width: 0; }
.pv-kick { font: 600 11px/1.3 "DM Sans"; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.pv-title { font: 500 24px/1.05 "Cormorant Garamond", serif; color: var(--ink); }
.pv-meta { font-size: 13px; line-height: 1.4; color: var(--muted); }
.pv-strip { display: flex; gap: 6px; margin-top: 6px; }
.pv-strip li { width: 42px; border-radius: 2px; overflow: hidden; box-shadow: 0 0 0 1px var(--line); }
.pv-strip img { width: 100%; aspect-ratio: 4 / 5; }
.pv-tag { margin-top: 6px; font: 600 10.5px/1 "DM Sans"; letter-spacing: .08em; text-transform: uppercase; color: var(--hand); }

/* the orange thread: from the end of the headline to Philadelphia (homepage thread language) */
.thread { position: absolute; left: 0; top: 0; width: 100%; height: 100%; z-index: 3; pointer-events: none; overflow: visible; }
.thread-line { fill: none; stroke: var(--route); stroke-width: 1.6; stroke-linecap: round; stroke-dasharray: 1 1; stroke-dashoffset: 0; transition: opacity .4s ease; }
.hero.zoomed .thread-line { opacity: 0; transition: opacity .3s ease; }
.hero.pv-on .thread-line, .hero.lab-on .thread-line { opacity: .25; }

/* under the map: legend left, credit right, on the stage's edges */
.map-foot { display: flex; justify-content: space-between; align-items: baseline; gap: 4px 24px; flex-wrap: wrap; margin-top: 14px; font-size: 13.5px; color: var(--muted); }
.legend { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.legend .mk { width: 10px; height: 10px; border-radius: 50%; background: var(--route); box-shadow: 0 0 0 3px color-mix(in oklab, var(--route) 22%, transparent); align-self: center; }
.legend-note { margin-left: 16px; }
.credit { font: 600 11px/1.3 "DM Sans"; letter-spacing: .08em; text-transform: uppercase; }

/* ---------- the card ---------- */
.sel { position: relative; min-width: 0; background: var(--hi); border-radius: 10px; box-shadow: var(--paper-shadow), 0 0 0 1px color-mix(in oklab, var(--ink) 6%, transparent); }
.sel-in { position: absolute; inset: 0; display: grid; padding: 24px; }
.sel-real, .sel-ph { grid-area: 1 / 1; display: flex; flex-direction: column; min-height: 0; }
.sel .off { visibility: hidden; }
.deck { --peek: 26px; flex: 1 1 auto; min-height: 0; container-type: size; }
.deck-in { --cw: min(calc(100cqw - 3 * var(--peek) - 14px), calc(100cqh * .8)); position: relative; width: calc(var(--cw) + 3 * var(--fan)); height: calc(var(--cw) * 1.25); touch-action: pan-y;
  /* the fan: the front page keeps its size (set by the card's height) and stays left; the three back pages share the rest of the width
     in even steps, so the last one's right edge lands on the card's inner right edge. Each back page is rotated --rot per step about its
     bottom right corner, which pushes its top right corner out by about 1.25 * cw * (1 - 3 * .035) * sin(3 * --rot) = .0585 cw at 1deg. */
  --rot: 1deg; --fan: max(var(--peek), calc((100cqw - var(--cw) * 1.0585) / 3)); }
.pg { --k: 0; --hx: 0px; --hy: 0px; position: absolute; left: 0; top: 0; width: var(--cw); aspect-ratio: 4 / 5; padding: 0; border: 0; background: none; cursor: pointer; border-radius: 3px;
  transform-origin: 100% 100%;
  transform: translate(calc(var(--k) * var(--fan) + var(--hx)), var(--hy)) rotate(calc(var(--k) * var(--rot))) scale(calc(1 - var(--k) * .035));
  transition: transform .6s cubic-bezier(.65, 0, .35, 1); }
.pg[data-slot="0"] { --k: 0; z-index: 4; }
.pg[data-slot="1"] { --k: 1; z-index: 3; }
.pg[data-slot="2"] { --k: 2; z-index: 2; }
.pg[data-slot="3"] { --k: 3; z-index: 1; }
.pg-in { position: absolute; inset: 0; display: block; border-radius: 3px; overflow: hidden; background: var(--paper);
  box-shadow: 0 0 0 1px var(--line), 0 14px 26px -16px color-mix(in oklab, var(--ink) 65%, transparent);
  transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transition: transform .6s var(--ease-out); }
.pg-in img { width: 100%; height: 100%; object-fit: cover; }
.pg-in::after { content: ""; position: absolute; inset: 0; background: var(--ink); opacity: calc(var(--k) * .05); transition: opacity .6s ease; pointer-events: none; }
.sheen { position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .5s ease;
  background: radial-gradient(circle at var(--mx, 30%) var(--my, 20%), rgba(255, 255, 255, .42), rgba(255, 255, 255, 0) 55%); mix-blend-mode: soft-light; }
.pg.tilting .pg-in { transition: transform .18s linear; }
.pg.tilting .sheen { opacity: 1; }
@media (hover: hover) and (pointer: fine) {
  .pg:not([data-slot="0"]):hover { --hx: 4px; --hy: -12px; transition-duration: .45s; transition-timing-function: var(--ease-out); }
}
.pg:focus-visible { outline-offset: 4px; }

.sel-txt { flex: none; display: flex; flex-direction: column; align-items: flex-start; padding-top: 18px; }
.kicker { font: 600 12px/1.3 "DM Sans"; letter-spacing: .08em; text-transform: uppercase; color: var(--hand); }
.sel-title { margin-top: 6px; font: 500 32px/1.04 "Cormorant Garamond", serif; color: var(--ink); }
.sel-meta { margin-top: 4px; font-size: 15px; line-height: 1.4; color: var(--muted); }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.sel-act { display: flex; align-items: center; gap: 12px; width: 100%; margin-top: 18px; }
.sel-act .btn { flex: 1 1 auto; }
.pager { display: flex; align-items: center; gap: 2px; }
.pg-btn { display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--ink); cursor: pointer; box-shadow: inset 0 0 0 1.5px color-mix(in oklab, var(--ink) 22%, transparent); transition: background-color .2s ease; }
.pg-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
@media (hover: hover) and (pointer: fine) { .pg-btn:hover { background: var(--field); } }
.pg-num { min-width: 44px; text-align: center; font: 500 14px/1 "DM Sans"; color: var(--muted); font-variant-numeric: tabular-nums; }
.pg-num b { color: var(--ink); font-weight: 600; }
.btn-quiet { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px color-mix(in oklab, var(--ink) 35%, transparent); }
@media (hover: hover) and (pointer: fine) { .btn-quiet:hover { background: var(--field); } }
.sel-ph { justify-content: flex-start; align-items: flex-start; }
.ph-city { font-size: 40px; color: var(--muted); }
.jl-empty { margin-top: 16px; width: 100%; padding: 16px; border: 1.5px dashed color-mix(in oklab, var(--ink) 25%, transparent); border-radius: 6px; font-size: 15px; line-height: 1.5; color: var(--muted); }
.sel-ph .btn { margin-top: auto; width: 100%; }
.sel.swap .sel-in > div:not(.off) { animation: sel-in .7s var(--ease-out); }
@keyframes sel-in { from { opacity: 0; transform: translateY(6px); } }

/* ---------- intro: before main.js starts it, the parts that assemble are hidden (inline script in <head> sets .intro-pre).
   A CSS fallback shows them after 6 s in case the script never runs. ---------- */
.intro-pre .sel, .intro-pre .paper, .intro-pre .sheet-edge, .intro-pre .pins, .intro-pre .deck, .intro-pre .sel-txt, .intro-pre .map-foot, .intro-pre .thread { opacity: 0; animation: intro-safe 0s 6s forwards; }
@keyframes intro-safe { to { opacity: 1; } }

/* ---------- narrower screens ---------- */
/* Below 1181 px the card's column would make its front page too small: map full width, card below it. */
@media (max-width: 1180px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr); align-items: start; }
  .hero-head, .lede, .stage-col, .map-foot, .sel { grid-column: 1; grid-row: auto; }
  .hero-head { order: 1; } .stage-col { order: 2; } .map-foot { order: 3; } .lede { order: 4; } .sel { order: 5; }
  .lede { margin-top: 28px; max-width: 34em; }
  .sel { margin-top: 20px; max-width: 560px; }
  .sel-in { position: static; }
  .deck { flex: none; container-type: inline-size; }
  .deck-in { --cw: min(calc(100cqw - 3 * var(--peek) - 14px), 300px); }
  .sel-ph .btn { margin-top: 24px; }
}
@media (max-width: 759px) {
  .hero { --tilt: 10deg; }
  .stage.zoomed { --tilt: 6deg; --sc: .96; }
  .stage-col { margin-top: 20px; }
  .stage { aspect-ratio: 1000 / 601.8; }   /* same sheet as desktop (764:484), tilted 10deg */
  h1 { font-size: 46px; }
  .kicker-top { margin-bottom: 8px; }
  .lede { margin-top: 22px; font-size: 16px; }
  .map-foot { margin-top: 10px; font-size: 12.5px; }
  .legend-note { margin-left: 0; flex-basis: 100%; }
  .map-back { font-size: 13px; padding-right: 12px; }
  .phl { height: 54px; margin-top: -54px; }
  .phl-stem { height: 36px; }
  .phl-head { left: 13px; top: 2px; width: 18px; height: 18px; }
  .phl-head::after { left: 4px; top: 4px; width: 5px; height: 4px; }
  .phl-lab { left: 34px; top: -2px; }
  .phl.lab-left .phl-lab { right: 34px; }
  .phl-lab b { font-size: 13px; }
  .phl-lab span { font-size: 11.5px; }
  .pv { width: 236px; padding: 8px; }
  .pv-real { grid-template-columns: 64px minmax(0, 1fr); gap: 10px; }
  .pv-title { font-size: 18px; }
  .pv-kick, .pv-tag { font-size: 9.5px; }
  .pv-meta { font-size: 11.5px; }
  .pv-strip li { width: 26px; }
  .sel-in { padding: 20px 16px; }
  .deck { --peek: 22px; }
  .sel-title { font-size: 30px; }
}

/* Tablets (below the desktop layout): the card is centred; from 820 px it lies on its side across the full content width,
   the page deck on the left and the text on the right. 1100-1180 px keeps the upright card above. */
@media (max-width: 1099px) {
  .sel { width: 100%; margin-inline: auto; }   /* width: a grid item with auto margins would shrink to fit */
}
@media (min-width: 820px) and (max-width: 1099px) {
  .sel { max-width: none; }
  .sel-in { padding: 28px; }
  .sel-real { flex-direction: row; align-items: center; gap: clamp(28px, 4vw, 44px); }
  .deck { flex: 0 1 55%; min-width: 0; }   /* gives way so the text column keeps its 320 px (title on one line, tags on one row) */
  .deck-in { --cw: min(calc(100cqw - 3 * var(--peek) - 14px), 340px); }
  .sel-txt { flex: 1 0 320px; min-width: 320px; padding-top: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .sheet { transition: none; }
  .fills path, .b-inner, .b-intl, .coast, .grat, .coast-shadow, .map-back, .stage.zoomed .map-back, .phl-lab, .stage.in-pa .phl-lab { transition: none; }
  .rz .wall, .rz.up .wall, .rz .shade, .rz.up .shade { transition: none; }
  .phl-base i:nth-child(n) { animation: none; opacity: .5; transform: scale(1.1); }
  .phl-base i:nth-child(2) { display: none; }
  .phl.pulse .phl-head { animation: none; }
  .pg, .pg-in, .pg-in::after { transition: opacity .3s ease; }
  .sheen { display: none; }
  .sel.swap .sel-in > div { animation: none !important; }
  .pv, .stage.pv-on .pv { transform: none; transition: opacity .3s ease; }
  .stage.pv-on .leader-line { transition: none; }
}

/* ---------------------------------------------------------------- 2 The walk on ink (route from D, clock from E) */
.walk { position: relative; background: var(--deep); color: var(--on-deep); }
.walk-in { position: relative; z-index: 2; width: min(100% - 2 * var(--gutter), 1344px); margin-inline: auto; display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 40px; }

/* Clock column: sticky, so the clock never sits over a page */
.clock-col { position: relative; }
.clock-box { position: sticky; top: max(48px, 13vh); padding-top: clamp(84px, 9vw, 120px); padding-bottom: 24px; }
.walk .eyebrow { color: var(--on-deep-muted); }
.clock { display: flex; align-items: flex-start; gap: 8px; margin-top: 14px; color: var(--on-deep); }
.clock .c-hm { font: 500 128px/.82 "Cormorant Garamond", serif; font-variant-numeric: lining-nums tabular-nums; letter-spacing: -.02em; white-space: nowrap; }
.clock .c-ap { font: 600 14px/1 "DM Sans"; letter-spacing: .08em; color: var(--on-deep-link); margin-top: .5em; }
.clock-box .c-started { margin-top: 22px; font-size: 15px; color: var(--on-deep-muted); }
.c-status-row { display: flex; align-items: center; gap: 10px; min-height: 30px; margin-top: 6px; font-size: 18px; font-weight: 600; color: var(--on-deep); font-variant-numeric: tabular-nums; }
.c-ico { flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--route); transition: background-color .4s ease, box-shadow .4s ease; }
.in-gap .c-ico { background: transparent; box-shadow: inset 0 0 0 2px var(--gap-deep); }
.in-gap .c-status { color: var(--on-deep-muted); }
.clock-tag { display: inline-flex; margin-top: 22px; padding: 5px 10px; border: 1px solid var(--deep-line); border-radius: 999px; font-size: 13px; font-weight: 500; color: var(--on-deep-muted); }
.reduce-clock .c-ico { display: none; }

/* Phone strip (hidden on desktop) */
.strip { display: none; }

.walk-main { min-width: 0; container-type: inline-size; }
.walk-head { text-align: center; padding-top: clamp(84px, 9vw, 120px); }
.walk-head .label { color: var(--on-deep-muted); }
.walk-head h2 { margin-top: 8px; font: 500 clamp(40px, 4.6vw, 64px)/1.02 "Cormorant Garamond", Georgia, serif; color: var(--on-deep); }
.walk-meta { margin-top: 10px; font-size: 15px; color: var(--on-deep-muted); }

/* Street hairlines and the route are placed over the whole walk; main.js sizes them in px. */
.streets, .route { position: absolute; left: 0; top: 0; pointer-events: none; overflow: visible; }
.streets { z-index: 0; stroke: var(--deep-hair); stroke-width: 1; fill: none; }
/* Change of ground at the finish: an opaque paper sheet with a short feathered top edge, above the streets.
   The wrapper runs from the bottom of page 4 to the end of the walk and clips; main.js moves the sheet up by translateY,
   so the screen always shows clean ink above and clean paper below, never a blend of the two. */
.ground { position: absolute; left: 0; right: 0; bottom: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.ground-sheet { position: absolute; inset: 0; will-change: transform;
  background: linear-gradient(rgb(244 239 230 / 0), rgb(244 239 230 / .06) 18px, rgb(244 239 230 / .22) 32px, rgb(244 239 230 / .5) 45px,
    rgb(244 239 230 / .78) 58px, rgb(244 239 230 / .94) 72px, var(--paper) 90px); }
.reduce-clock .strip { transition: opacity .3s ease; }
.strip.gone { opacity: 0; }
html:not(.js) .ground { display: none; }
.streets .river { stroke: color-mix(in oklab, var(--on-deep) 10%, transparent); }
.route { z-index: 1; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.route .seg { stroke: var(--route); stroke-width: 5; }
.route .glow { stroke: var(--route); stroke-width: 16; opacity: .16; }
.route .seg-gap { stroke: var(--gap-deep); stroke-width: 2.5; stroke-dasharray: 3 9; }
.route .gap-reveal { stroke: #fff; stroke-width: 14; fill: none; }
html:not(.js) .route, html:not(.js) .streets, html:not(.js) .marker, html:not(.js) .layer, html:not(.js) .hooks { display: none; }

.layer, .hooks { position: absolute; inset: 0; z-index: 3; pointer-events: none; }
.start-dot, .end-dot { position: absolute; left: 0; top: 0; width: 16px; height: 16px; margin: -8px 0 0 -8px; border-radius: 50%; }
.start-dot { background: var(--deep); border: 3.5px solid var(--route); }
.end-dot { width: 26px; height: 26px; margin: -13px 0 0 -13px; background: var(--route); box-shadow: 0 0 0 5px var(--paper), 0 0 0 6.5px var(--route), 0 0 28px 6px color-mix(in oklab, var(--route) 30%, transparent); opacity: 0; transition: opacity .8s ease; }
.end-dot.on { opacity: 1; }
.end-dot:not(.on), .pin-end:not(.on) { transition-duration: .25s; transition-delay: 0s; }   /* quick exit when scrolling back up */
.pin { position: absolute; left: 0; top: 0; font-size: 13px; line-height: 1.3; color: var(--on-deep-muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.pin b { color: var(--on-deep); font-weight: 600; margin-right: 4px; }
.pin-end { opacity: 0; transition: opacity .7s ease .2s; }
.pin-end.on { opacity: 1; }
.walk.end-lit .pin-end { color: var(--muted); }
.walk.end-lit .pin-end b { color: var(--ink); }

/* The walker: an HTML dot moved by transform only */
.marker { position: absolute; left: 0; top: 0; z-index: 4; width: 0; height: 0; will-change: transform; pointer-events: none; }
.marker span { position: absolute; left: -9px; top: -9px; width: 18px; height: 18px; border-radius: 50%; background: var(--route); box-shadow: 0 0 0 4px var(--deep), 0 0 18px 4px color-mix(in oklab, var(--route) 45%, transparent); transition: background-color .4s ease, box-shadow .4s ease; }
.marker span::after { content: ""; position: absolute; inset: -10px; border-radius: 50%; border: 1.5px solid var(--route); opacity: 0; }
.marker.moving span::after { animation: ping 2.4s var(--ease-out) infinite; }
.marker.in-gap span { background: var(--deep); box-shadow: 0 0 0 2.5px var(--gap-deep); }
.marker.in-gap span::after { border-color: var(--gap-deep); }
@keyframes ping { 0% { transform: scale(.5); opacity: .6; } 70%, 100% { transform: scale(1.5); opacity: 0; } }

/* Stops: one page per step, alternating sides. The caption sits across the line in the empty half. */
.stops { --inner: 100px; --leaf-w: min(360px, 50cqi - var(--inner)); --step: calc(var(--leaf-w) * 1.25 + 60px);
  position: relative; padding-top: 120px; }
.stop { position: relative; height: var(--step); }
.stop:last-child { height: calc(var(--leaf-w) * 1.25); }
.leaf { position: absolute; top: 0; width: var(--leaf-w); display: block; padding: 0; border: 0; background: none; cursor: zoom-in; border-radius: 3px; }
.stop[data-side="l"] .leaf { right: calc(50% + var(--inner)); }
.stop[data-side="r"] .leaf { left: calc(50% + var(--inner)); }
.leaf::before { content: ""; position: absolute; inset: 0; border-radius: 3px; box-shadow: var(--deep-shadow); }
.leaf-clip { display: block; border-radius: 3px; overflow: hidden; background: #f3efe6; }
.leaf-clip img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.cap { position: absolute; top: 14%; width: min(280px, calc(50% - var(--inner) - 72px)); }
.stop[data-side="r"] .cap { right: calc(50% + 236px); width: min(260px, calc(50% - 236px)); text-align: right; }
.stop[data-side="l"] .cap { left: calc(50% + var(--inner) + 72px); }
.cap-n { font: 600 12px/1.3 "DM Sans"; letter-spacing: .08em; text-transform: uppercase; color: var(--on-deep-link); }
.cap h3 { margin-top: 4px; font: 500 32px/1.08 "Cormorant Garamond", Georgia, serif; color: var(--on-deep); }
.cap p { margin-top: 6px; font-size: 15px; line-height: 1.45; color: var(--on-deep-muted); }

/* Unfold (from D): the page opens from the edge that touches the line, lifts, then its shadow settles. */
.js .walk.armed .leaf { transform: translate3d(0, 22px, 0); transition: transform .9s var(--ease-out); }
.js .walk.armed .leaf::before { opacity: 0; transition: opacity .6s ease .45s; }
.js .walk.armed .leaf-clip { transition: clip-path .9s cubic-bezier(.65, 0, .25, 1); }
.js .walk.armed .stop[data-side="l"]:not(.open) .leaf-clip { clip-path: inset(0 0 0 100% round 3px); }
.js .walk.armed .stop[data-side="r"]:not(.open) .leaf-clip { clip-path: inset(0 100% 0 0 round 3px); }
.js .walk.armed .cap { opacity: 0; transform: translate3d(0, 10px, 0); transition: opacity .7s ease .3s, transform .8s var(--ease-out) .3s; }
.js .walk.armed .stop.open .leaf { transform: none; }
.js .walk.armed .stop.open .leaf::before { opacity: 1; }
.js .walk.armed .stop.open .leaf-clip { clip-path: inset(0 0 0 0 round 3px); }
.js .walk.armed .stop.open .cap { opacity: 1; transform: none; }

/* Time hooks: photo times printed on the pages, pinned to the line where they were taken */
.hook { position: absolute; left: 0; top: 0; display: flex; align-items: center; height: 0; font: 600 13px/1 "DM Sans", system-ui, sans-serif; color: var(--on-deep); font-variant-numeric: tabular-nums; white-space: nowrap; opacity: 0; transition: opacity .7s ease; }
.hook.on { opacity: 1; }
.hook i { flex: none; width: 9px; height: 9px; margin-left: -4.5px; border-radius: 50%; background: var(--deep); border: 2px solid var(--on-deep-link); }
.hook s { flex: none; width: 16px; height: 1px; background: var(--deep-line); }
.hook em { display: flex; align-items: baseline; gap: 7px; font-style: normal; padding: 5px 9px; border-radius: 5px; background: var(--chip); box-shadow: 0 0 0 1px var(--deep-line); }
.hook em b { font-weight: 700; color: var(--on-deep); }
.hook em span { font-weight: 500; color: var(--on-deep-muted); }
.hook em span::before { content: "·"; margin-right: 7px; color: var(--on-deep-link); }
.hook.flip { flex-direction: row-reverse; }
.hook.flip i { margin-left: 0; margin-right: -4.5px; }

/* GPS gap */
.gap-note { position: relative; height: 220px; }
.gap-note .hand { position: absolute; top: 40%; left: calc(50% + 6px); transform: rotate(-3deg); font: 600 32px/1.1 "Caveat", cursive; color: var(--on-deep-link); white-space: nowrap; }
.js .walk.armed .gap-note .hand { clip-path: inset(-20% 100% -20% 0); transition: clip-path 1.4s cubic-bezier(.45, .05, .35, 1); }
.js .walk.armed .gap-note.open .hand { clip-path: inset(-20% 0 -20% 0); }

/* ---------------------------------------------------------------- 3 The finish (from E) */
.finish { position: relative; z-index: 2; width: min(100% - 2 * var(--gutter), 1200px); margin-inline: auto; padding: 330px 0 clamp(80px, 9vw, 120px); text-align: center; }
.fin-title { margin-top: 10px; font: 500 clamp(44px, 5vw, 72px)/1 "Cormorant Garamond", serif; color: var(--on-deep); }
.sum { margin-top: 14px; display: flex; flex-wrap: wrap; justify-content: center; gap: 0 12px; font: 500 clamp(22px, 2.2vw, 28px)/1.3 "DM Sans", sans-serif; color: var(--on-deep); font-variant-numeric: tabular-nums; }
.sum .dot { color: var(--on-deep-link); }
.row { margin-top: 40px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(14px, 2vw, 28px); text-align: left; }
.row button { display: grid; gap: 10px; width: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; color: var(--on-deep-muted); }
.row img { width: 100%; aspect-ratio: 4 / 5; border-radius: 3px; box-shadow: var(--deep-shadow); transition: transform .7s var(--ease-out); }
.row span { font-size: 14px; font-weight: 600; }
@media (hover: hover) and (pointer: fine) { .row button:hover img { transform: translateY(-6px); } }
.finish .read { margin-top: 36px; }
.walk.grounded .finish { color: var(--ink); }
.walk.grounded .finish .eyebrow { color: var(--muted); }
.walk.grounded .fin-title, .walk.grounded .sum { color: var(--ink); }
.walk.grounded .sum .dot { color: var(--hand); }
.walk.grounded .row button { color: var(--text); }
.walk.grounded .row img { box-shadow: var(--paper-shadow), 0 0 0 1px var(--line); }
.walk.grounded .fine { color: var(--muted); }
.walk.grounded .finish :focus-visible { outline-color: var(--route); }
html:not(.js) .finish .read { background: var(--on-deep); color: var(--ink); }
.fine { margin-top: 14px; font-size: 14px; line-height: 1.45; color: var(--on-deep-muted); }
/* the pages settle into the row once the route reaches the finish */
.js .walk.armed .finish > :not(.row), .js .walk.armed .row li { opacity: 0; transform: translate3d(0, 16px, 0); transition: opacity .5s ease, transform .5s var(--ease-out); }
.js .walk.armed .row li { transform: translate3d(0, 28px, 0) scale(.96); }
.js .walk.armed .finish.open > :not(.row), .js .walk.armed .finish.open .row li { opacity: 1; transform: none; }
/* everything is in place 1.08 s after the trigger (main.js: the eyebrow 75% down the viewport, or the end of the route) */
.js .walk.armed .finish.open > :nth-child(2) { transition-delay: .06s; }
.js .walk.armed .finish.open > :nth-child(3) { transition-delay: .12s; }
.js .walk.armed .finish.open .row li:nth-child(1) { transition-delay: .18s; }
.js .walk.armed .finish.open .row li:nth-child(2) { transition-delay: .26s; }
.js .walk.armed .finish.open .row li:nth-child(3) { transition-delay: .34s; }
.js .walk.armed .finish.open .row li:nth-child(4) { transition-delay: .42s; }
.js .walk.armed .finish.open > :nth-child(5) { transition-delay: .5s; }
.js .walk.armed .finish.open > :nth-child(6) { transition-delay: .58s; }

/* Frozen: no transitions, so the first layout shows the walk already drawn up to the current scroll. */
.frozen *, .frozen *::before, .frozen *::after { transition: none !important; animation: none !important; }

/* ---------------------------------------------------------------- Reader */
.reader { width: 100%; max-width: 100%; height: 100%; max-height: 100%; margin: 0; padding: 0; border: 0; background: transparent; color: var(--on-deep); }
.reader::backdrop { background: rgba(15, 21, 33, .97); }
.reader[open] { animation: r-in .6s ease; }
@keyframes r-in { from { opacity: 0; } }
.r-in { height: 100%; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; justify-items: center; gap: 12px; padding: 12px 16px 16px; }
.r-top { width: min(100%, 760px); display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.r-count { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 12px; }
.r-name { font: 500 26px/1.1 "Cormorant Garamond", serif; color: var(--on-deep); }
.r-num { font-size: 14px; color: var(--on-deep-muted); font-variant-numeric: tabular-nums; }
.r-num b { font-weight: 600; color: var(--on-deep); }
.r-page { min-height: 0; height: 100%; display: flex; align-items: center; justify-content: center; }
.r-img { max-height: 100%; width: auto; max-width: 100%; aspect-ratio: 4 / 5; object-fit: contain; border-radius: 3px; box-shadow: 0 30px 60px -30px #000; transition: opacity .6s ease; }
.r-img.fade { opacity: 0; transition-duration: .25s; }
.r-nav { display: flex; align-items: center; gap: 18px; }
.r-hint { font-size: 13px; color: var(--on-deep-muted); }
.r-btn { display: inline-grid; place-items: center; width: 48px; height: 48px; padding: 0; border: 1px solid var(--deep-line); border-radius: 50%; background: transparent; color: var(--on-deep); cursor: pointer; transition: background-color .2s ease, opacity .2s ease; }
.r-btn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.r-btn:disabled { opacity: .3; cursor: default; }
@media (hover: hover) and (pointer: fine) { .r-btn:not(:disabled):hover { background: rgba(255, 255, 255, .08); } }
.walk :focus-visible, .reader :focus-visible { outline-color: var(--on-deep-link); }

/* Footer (as on the home page) */
.foot { background: var(--hi); border-top: 1px solid var(--line); padding: 20px var(--gutter) 28px; }
.foot .wrap { width: min(100%, 1344px); }
.foot-in { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 28px; }
.foot .wordmark { font-size: 26px; }
.foot-links { display: flex; flex-wrap: wrap; gap: 0 22px; }
.foot-links a { display: inline-flex; align-items: center; min-height: 44px; font-size: 14px; }
.foot-links a { color: var(--ink); }
.copy { margin-left: auto; font-size: 14px; color: var(--muted); }

/* ---------------------------------------------------------------- narrower screens */
/* Walk on narrow screens: the route on a left rail, pages to its right, the clock as a sticky strip */
@media (max-width: 1099px) {
  .walk { --rail-pad: 96px; }
  .walk-in { display: block; }
  .clock-col { display: none; }
  .strip { position: sticky; top: 0; z-index: 8; display: flex; align-items: center; gap: 10px; height: 64px; overflow: hidden; padding: 8px var(--gutter);
    background: var(--deep); border-bottom: 1px solid var(--deep-line); }
  .strip-clock { display: flex; align-items: flex-start; gap: 4px; color: var(--on-deep); }
  .strip-clock .c-hm { font: 500 38px/.9 "Cormorant Garamond", serif; font-variant-numeric: lining-nums tabular-nums; min-width: 2.25em; }
  .strip-clock .c-ap { font: 600 11px/1 "DM Sans"; letter-spacing: .08em; color: var(--on-deep-link); margin-top: 4px; }
  .strip-txt { display: grid; gap: 2px; white-space: nowrap; font-size: 12.5px; line-height: 1.3; font-variant-numeric: tabular-nums; }
  .strip-txt .c-started { color: var(--on-deep-muted); }
  .strip-txt .c-status { color: var(--on-deep); font-weight: 600; }
  .strip.in-gap .c-status { color: var(--on-deep-muted); }
  .strip-tag { margin-left: auto; text-align: right; white-space: nowrap; font: 600 10px/1.35 "DM Sans"; letter-spacing: .06em; text-transform: uppercase; color: var(--on-deep-muted); }
  .walk-head { text-align: left; padding-left: var(--rail-pad); padding-top: 48px; }
  .stops { padding-top: 84px; }
  .stop, .stop:last-child { height: auto; margin-left: var(--rail-pad); margin-bottom: 52px; max-width: 460px; }
  .stop:last-child { margin-bottom: 0; }
  .leaf, .stop[data-side="l"] .leaf, .stop[data-side="r"] .leaf { position: relative; left: auto; right: auto; width: 100%; }
  .cap, .stop[data-side="l"] .cap, .stop[data-side="r"] .cap { position: static; width: auto; margin-top: 14px; text-align: left; }
  .cap h3 { font-size: 26px; }
  .js .walk.armed .stop:not(.open) .leaf-clip { clip-path: inset(0 100% 0 0 round 3px); }
  .gap-note { height: 190px; }
  .gap-note .hand { left: var(--rail-pad); top: 30%; font-size: 28px; }
  .finish { padding-top: 310px; width: auto; margin-inline: var(--gutter); }   /* centred: the route ends above its middle (main.js) */
  .sum { align-items: center; }
  .row { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 520px; margin-inline: auto; }
}

/* Tablets: the rail (wide enough for the time hooks), the pages and their captions form one group centred in the screen.
   From 900 px the caption sits to the right of its page; below that a page beside its caption would drop under 360 px wide,
   so the caption stays under the page. */
@media (min-width: 760px) and (max-width: 1099px) {
  .walk { --rail-pad: 184px; }
  .walk-main { width: min(100%, var(--rail-pad) + 460px); margin-inline: auto; }
  .row { grid-template-columns: repeat(4, minmax(0, 1fr)); max-width: 760px; }
}
@media (min-width: 900px) and (max-width: 1099px) {
  .walk { --cap-w: clamp(200px, 26vw, 268px); --cap-gap: 40px; }
  .walk-main { width: min(100%, var(--rail-pad) + 460px + var(--cap-gap) + var(--cap-w)); }
  .stop, .stop:last-child { display: grid; grid-template-columns: minmax(0, 1fr) var(--cap-w); column-gap: var(--cap-gap); align-items: start; max-width: none; }
  .cap, .stop[data-side="l"] .cap, .stop[data-side="r"] .cap { margin-top: clamp(40px, 7vw, 72px); }
}

@media (max-width: 759px) {
  .nav a { padding: 0 9px; }
  .strip-tag { font-size: 9px; }
  .fin-title { font-size: 40px; }
  .sum { flex-direction: column; gap: 0; font-size: 22px; }
  .sum .dot { display: none; }
  /* Phones: no time hooks (each caption already gives the times). The page sits centred between the rail and the right edge:
     rail at 10 px, page at 26 px, so 16 px on each side, the same as the gutter. */
  .hooks { display: none; }
  .walk { --rail-pad: 26px; }
  .r-hint { display: none; }
  .r-name { font-size: 22px; }
  .copy { margin-left: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .marker span::after { animation: none; }
  .reader[open] { animation: none; }
  .r-img { transition: opacity .3s ease; }
}

/* On the paper ground the walker's ring matches the paper (main.js compares the walker with the edge). */
.walk.lit .marker span { box-shadow: 0 0 0 4px var(--paper), 0 0 18px 4px color-mix(in oklab, var(--route) 35%, transparent); }

/* The streets drawing is wider than the walk at 320 px; keep it from widening the page. */
.walk { overflow-x: clip; }

/* Phone header, same on every page: the wordmark on its own row, the four links on the next, aligned to the text edge. */
@media (max-width: 640px) {
  .top { flex-wrap: wrap; gap: 0 12px; padding-block: 6px 0; }
  .nav { order: 3; width: 100%; margin-left: -12px; }
}

/* ---------- Chinese pages (html lang="zh-Hans", the /zh/ copies load this same file). System fonts only, nothing downloaded:
   the brand faces stay first, so Latin letters and digits keep them, and the CJK face that follows draws the Chinese.
   No faux italic, no tracking on label styles (it pulls Chinese apart), no negative tracking on headings (it makes
   Chinese glyphs touch), and a little more line height where Chinese runs as body text or wraps in headings. */
html:lang(zh) :is(body, .label, .eyebrow, .kicker-top, .phl-lab b, .phl-lab span, .st-lab b, .st-lab span, .pv-kick, .pv-tag, .credit, .kicker, .pg-num, .clock .c-ap, .cap-n, .hook, .sum, .strip-clock .c-ap, .strip-tag) { font-family: "DM Sans", "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Microsoft YaHei", sans-serif; }
html:lang(zh) :is(h1, .pv-title, .sel-title, .walk-head h2, .cap h3, .fin-title, .r-name) { font-family: "Cormorant Garamond", "Songti SC", "Noto Serif SC", serif; }
html:lang(zh) :is(.wordmark, .gap-note .hand) { font-family: "Caveat", "Kaiti SC", "STKaiti", "KaiTi", cursive; }
html:lang(zh) :is(.label, .eyebrow, .tag, .kicker-top, .pv-kick, .pv-tag, .credit, .kicker, .cap-n, .strip-tag, .clock .c-ap, .strip-clock .c-ap, h1) { letter-spacing: 0; }
html:lang(zh) :is(em, i, cite, dfn, var, address) { font-style: normal; }
html:lang(zh) body { line-height: 1.7; }
html:lang(zh) :is(h1, .fin-title) { line-height: 1.15; }
html:lang(zh) .walk-head h2 { line-height: 1.2; }
/* 上午 / 下午 comes before the time in Chinese: the clocks are flex rows, so the label moves to the front. */
html:lang(zh) :is(.clock, .strip-clock) .c-ap { order: -1; }
/* Short Chinese footer labels (支持) still get a 44 px wide target. */
html:lang(zh) .foot-links a { min-width: 44px; justify-content: center; }
