/* ---------- Fonts ---------- */
@font-face {
  font-family: 'Edict Display';
  src: url('fonts/EdictDisplayTrial-Light.otf') format('opentype');
  font-weight: 300; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Edict Display';
  src: url('fonts/EdictDisplayTrial-Regular.otf') format('opentype');
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Edict Display';
  src: url('fonts/EdictDisplayTrial-RegularItalic.otf') format('opentype');
  font-weight: 400; font-style: italic; font-display: swap;
}
@font-face {
  font-family: 'Edict Display';
  src: url('fonts/EdictDisplayTrial-Medium.otf') format('opentype');
  font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Edict Text';
  src: url('fonts/EdictTextTrial-Regular.otf') format('opentype');
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Edict Text';
  src: url('fonts/EdictTextTrial-RegularItalic.otf') format('opentype');
  font-weight: 400; font-style: italic; font-display: swap;
}

/* ---------- Tokens ---------- */
:root {
  --paper:   #efece4;
  --paper-2: #e8e4d9;
  --ink:     #14130f;
  --ink-2:   #2a2722;
  --ink-3:   #6f6a5e;
  --rule:    #b9b3a4;
  --rule-2:  #d8d2c1;
  --accent:  #a8362a;

  --serif: 'EB Garamond', 'Edict Text', 'Iowan Old Style', 'Apple Garamond', Georgia, serif;
  --display: 'Edict Display', 'Edict Text', Georgia, serif;
  --mono: 'JetBrains Mono', 'IBM Plex Mono', 'SFMono-Regular', ui-monospace, Menlo, monospace;
  --sans: 'Inter', system-ui, -apple-system, 'Helvetica Neue', Arial, sans-serif;

  --max: 1320px;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; min-width: 0; }
html, body { margin: 0; padding: 0; }
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  overflow-x: clip;
}
body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
  max-width: 100vw;
}
figure { margin: 0; }
blockquote { margin: 0; }
pre { margin: 0; max-width: 100%; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }

/* Subtle paper grain (very low; tinted vignette) */
body::after {
  content: '';
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: -1;
  background:
    radial-gradient(120% 80% at 50% 0%, rgba(20,19,15,0.0) 60%, rgba(20,19,15,0.05) 100%);
}

/* ---------- Masthead ---------- */
.masthead {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 100;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 18px 32px;
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-2);
  pointer-events: none;
  background: linear-gradient(to bottom, var(--paper) 0%, var(--paper) 60%, rgba(239,236,228,0.0) 100%);
}
.masthead > * { pointer-events: auto; }
.masthead-left { justify-self: start; }
.masthead-mid  { justify-self: center; font-family: var(--display); font-size: 13px; letter-spacing: .26em; }
.masthead-right{ justify-self: end; font-variant-numeric: tabular-nums; }

/* ---------- Cover ---------- */
.cover {
  min-height: 100vh;
  padding: 96px 32px 48px;
  display: grid;
  grid-template-rows: auto 1fr auto;
}
.cover-meta {
  display: flex; justify-content: space-between; align-items: center;
  font-family: var(--sans);
  font-size: 11px; letter-spacing: .22em; text-transform: uppercase;
  color: var(--ink-3);
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--rule);
  padding: 14px 0;
}
.cover-meta span { display: inline-block; }
.cover-meta .center { letter-spacing: .35em; }

.cover-title {
  font-family: var(--display);
  font-weight: 300;
  font-size: clamp(64px, 13.5vw, 220px);
  line-height: 0.92;
  letter-spacing: -0.025em;
  margin: 8vh 0 0;
  text-align: left;
}
.cover-title em {
  font-style: italic;
  font-weight: 400;
  color: var(--ink-2);
}
.cover-title .amp {
  font-style: italic; font-weight: 300; opacity: .55;
}

.cover-sub-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  margin-top: 4vh;
  align-items: end;
}
.cover-sub {
  font-family: var(--serif);
  font-size: 19px;
  line-height: 1.5;
  max-width: 38ch;
  color: var(--ink-2);
}
.cover-sub em { font-style: italic; }

.cover-foot {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 24px;
  margin-top: 8vh;
  padding-top: 18px;
  border-top: 1px solid var(--rule);
  font-family: var(--sans);
  font-size: 11px; letter-spacing: .18em; text-transform: uppercase;
  color: var(--ink-3);
}
.cover-foot strong {
  display: block;
  color: var(--ink);
  font-weight: 500;
  letter-spacing: .12em;
  margin-bottom: 4px;
}

/* ---------- Prologue ---------- */
.prologue {
  padding: 14vh 32px 12vh;
  max-width: 1320px;
  margin: 0 auto;
}
.prologue-title {
  font-family: var(--sans);
  font-size: 11px; letter-spacing: .3em; text-transform: uppercase;
  color: var(--ink-3);
  margin: 0 0 36px;
}
.prologue-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 72px;
}
.prologue-body p {
  font-size: 22px;
  line-height: 1.55;
  margin: 0 0 1.2em;
  color: var(--ink);
}
.prologue-body p:first-child::first-letter {
  font-family: var(--display);
  font-weight: 400;
  font-size: 5.5em;
  float: left;
  line-height: 0.85;
  padding: 8px 14px 0 0;
  color: var(--ink);
}
.prologue aside {
  font-family: var(--sans);
  font-size: 12px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--ink-3);
  border-top: 1px solid var(--rule);
  padding-top: 14px;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px;
}

/* ---------- Passage (sticky map + country header) ---------- */
.passage {
  position: relative;
  min-height: 200vh;
}
.passage-sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  display: grid;
  grid-template-columns: minmax(380px, 1fr) 1.2fr;
  align-items: stretch;
  border-top: 1px solid var(--rule);
}
.passage-text {
  padding: 88px 48px 56px;
  display: flex; flex-direction: column; justify-content: space-between;
}
.passage-roman {
  font-family: var(--display);
  font-weight: 300;
  font-size: 22px;
  letter-spacing: .14em;
  color: var(--ink-3);
}
.passage-name {
  font-family: var(--display);
  font-weight: 300;
  font-size: clamp(48px, 8.5vw, 132px);
  line-height: 0.94;
  letter-spacing: -0.02em;
  margin: 28px 0 18px;
}
.passage-name em { font-style: italic; font-weight: 400; }
.passage-tag {
  font-family: var(--sans);
  font-size: 11px; letter-spacing: .22em; text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 24px;
}
.passage-intro {
  font-family: var(--serif);
  font-size: 19px;
  line-height: 1.55;
  max-width: 38ch;
  color: var(--ink-2);
}
.passage-intro em { font-style: italic; }

.passage-foot {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  font-family: var(--sans);
  font-size: 10.5px; letter-spacing: .16em; text-transform: uppercase;
  color: var(--ink-3);
  border-top: 1px solid var(--rule);
  padding-top: 14px;
}
.passage-foot strong {
  display: block;
  color: var(--ink);
  font-weight: 500;
  letter-spacing: .08em;
  margin-bottom: 4px;
  font-family: var(--mono);
  font-size: 12px;
  text-transform: none;
}

.passage-map {
  position: relative;
  border-left: 1px solid var(--rule);
  background: linear-gradient(to bottom right, var(--paper) 0%, var(--paper-2) 100%);
  overflow: hidden;
}
.passage-map svg {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
}

/* Map graphics */
.map-context-land  { fill: rgba(20,19,15,0.04); stroke: var(--rule); stroke-width: 0.7; vector-effect: non-scaling-stroke; }
.map-journey-land  { fill: rgba(20,19,15,0.06); stroke: var(--ink-2); stroke-width: 1.1; vector-effect: non-scaling-stroke; }
.map-journey-land.is-active  { fill: rgba(20,19,15,0.22); stroke: var(--ink); stroke-width: 1.4; }
.map-journey-land.is-visited { fill: rgba(20,19,15,0.14); stroke: var(--ink-2); stroke-width: 1.2; }
.map-graticule { fill: none; stroke: var(--rule-2); stroke-width: 0.6; vector-effect: non-scaling-stroke; opacity: .55; }

.map-trace {
  fill: none;
  stroke: var(--ink);
  stroke-width: 1.6;
  stroke-dasharray: 4 3;
  vector-effect: non-scaling-stroke;
  stroke-dashoffset: 0;
}
.map-trace-bg {
  fill: none;
  stroke: var(--paper);
  stroke-width: 6;
  vector-effect: non-scaling-stroke;
  opacity: .95;
  stroke-linejoin: round;
  stroke-linecap: round;
}

.map-city {
  fill: var(--ink);
  stroke: var(--paper);
  stroke-width: 1.2;
  vector-effect: non-scaling-stroke;
  paint-order: stroke fill;
}
.map-city-ring {
  fill: none;
  stroke: var(--ink);
  stroke-width: 0.8;
  vector-effect: non-scaling-stroke;
  opacity: 0;
  transition: opacity .6s ease, transform .6s ease;
  transform-box: fill-box; transform-origin: center;
}
.map-city.is-current .map-city-ring { opacity: 1; }
.map-city-label {
  font-family: 'Inter', sans-serif;
  font-size: 10px;
  letter-spacing: .18em;
  text-transform: uppercase;
  fill: var(--ink-2);
  opacity: 0;
  transition: opacity .6s ease;
  pointer-events: none;
  paint-order: stroke fill;
  stroke: var(--paper);
  stroke-width: 4px;
  stroke-linejoin: round;
}
.map-city.is-visible .map-city-label,
.map-city.is-current .map-city-label { opacity: 1; }
.map-city.is-current .map-city-label { fill: var(--ink); font-weight: 500; }

.map-camera { transition: transform 1.4s cubic-bezier(.22,.61,.36,1); transform-origin: 0 0; }

.map-corner {
  position: absolute; left: 24px; bottom: 22px;
  font-family: var(--sans);
  font-size: 10px; letter-spacing: .22em; text-transform: uppercase;
  color: var(--ink-3);
  display: flex; gap: 18px;
  align-items: center;
}
.map-corner-scale {
  width: 80px; height: 1px; background: var(--ink-3);
  position: relative;
}
.map-corner-scale::before, .map-corner-scale::after {
  content: ''; position: absolute; top: -3px; width: 1px; height: 7px; background: var(--ink-3);
}
.map-corner-scale::before { left: 0; }
.map-corner-scale::after { right: 0; }
.map-corner-coords {
  position: absolute; right: 24px; bottom: 22px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-3);
  letter-spacing: .04em;
}

/* ---------- Story (photo + body) ---------- */
.story {
  padding: 12vh 32px 16vh;
  max-width: 1320px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 32px 24px;
  position: relative;
}

.story-figure { position: relative; margin: 0; }
.story-figure img { width: 100%; height: auto; display: block; filter: contrast(1.02) saturate(0.96); }
.story-figure figcaption {
  font-family: var(--sans);
  font-size: 10.5px; letter-spacing: .18em; text-transform: uppercase;
  color: var(--ink-3);
  margin-top: 10px;
  display: flex; justify-content: space-between; gap: 12px;
}
.story-figure figcaption .num { font-family: var(--mono); letter-spacing: .04em; text-transform: none; }

.story-prose {
  font-family: var(--serif);
  font-size: 19px;
  line-height: 1.6;
}
.story-prose p { margin: 0 0 1.1em; }
.story-prose p:first-child::first-letter {
  font-family: var(--display);
  float: left;
  font-size: 4.6em;
  line-height: 0.88;
  padding: 6px 12px 0 0;
  font-weight: 400;
}
.story-prose em { font-style: italic; }

.story-h3 {
  font-family: var(--display);
  font-weight: 400; font-style: italic;
  font-size: 28px;
  letter-spacing: -0.01em;
  margin: 0 0 18px;
  color: var(--ink);
}

/* Field notes / data blocks */
.fieldnotes {
  font-family: var(--mono);
  font-size: 11.5px;
  line-height: 1.6;
  background: transparent;
  color: var(--ink-2);
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--rule);
  padding: 14px 0;
  letter-spacing: 0.01em;
}
.fieldnotes-title {
  display: block;
  font-family: var(--sans);
  font-size: 10px; letter-spacing: .26em; text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 10px;
}
.fieldnotes dl { display: grid; grid-template-columns: max-content 1fr; gap: 4px 16px; margin: 0; }
.fieldnotes dt { color: var(--ink-3); white-space: nowrap; }
.fieldnotes dd { margin: 0; color: var(--ink); }

.pullquote {
  font-family: var(--display);
  font-style: italic;
  font-weight: 300;
  font-size: clamp(28px, 3.5vw, 44px);
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--ink);
  padding: 24px 0 24px 32px;
  border-left: 1px solid var(--ink);
  margin: 0;
}
.pullquote-attr {
  display: block;
  margin-top: 16px;
  font-family: var(--sans);
  font-style: normal;
  font-size: 10.5px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--ink-3);
}

/* Transit document — a "found object" slip: train ticket, customs stamp,
   telegram. Warm aged paper, dark ink header bar, mono body. */
.codeblock {
  font-family: var(--mono);
  font-size: 11.5px;
  line-height: 1.75;
  background:
    /* faint perforation strip down the left edge */
    radial-gradient(circle at 8px 8px, var(--paper) 2px, transparent 2.5px) 0 0/14px 14px repeat-y,
    /* base paper */
    linear-gradient(180deg, #ede4cb 0%, #e6dcc0 100%);
  background-position: 0 0, 0 0;
  color: var(--ink);
  padding: 46px 22px 22px 30px;
  border: 1px solid rgba(20,19,15,0.18);
  letter-spacing: 0;
  overflow-x: auto;
  position: relative;
  box-shadow:
    inset 0 0 0 1px rgba(20,19,15,0.04),
    0 1px 0 rgba(20,19,15,0.06);
}
/* dark ink header band — like a typed/stamped label */
.codeblock::before {
  content: attr(data-label);
  position: absolute;
  top: 0; left: 0; right: 0;
  display: flex;
  align-items: center;
  height: 28px;
  padding: 0 18px;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--sans);
  font-size: 9.5px;
  letter-spacing: .32em;
  text-transform: uppercase;
}
/* a small ornament on the right of the header — like a serial number / seal */
.codeblock::after {
  content: '№  ' attr(data-serial);
  position: absolute;
  top: 0; right: 18px;
  height: 28px;
  display: flex;
  align-items: center;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .14em;
  color: rgba(239, 236, 228, 0.78);
}

.codeblock .k {
  color: var(--accent);
  font-style: normal;
}
.codeblock .s { color: var(--ink); }
.codeblock .c { color: rgba(20,19,15,0.55); font-style: italic; }
.codeblock .n { color: var(--accent); }

/* Grid placements — use grid-column-end (longhand) so .off-N can set start
   without nuking end. The `grid-column: span N` shorthand sets end:auto,
   which causes single-column collapse when .off-N is applied. */
.col-12 { grid-column-end: span 12; }
.col-10 { grid-column-end: span 10; }
.col-8  { grid-column-end: span 8; }
.col-7  { grid-column-end: span 7; }
.col-6  { grid-column-end: span 6; }
.col-5  { grid-column-end: span 5; }
.col-4  { grid-column-end: span 4; }
.col-3  { grid-column-end: span 3; }
.off-1  { grid-column-start: 2; }
.off-2  { grid-column-start: 3; }
.off-3  { grid-column-start: 4; }
.justify-end { justify-self: end; }

/* Marquee row of small photos */
.marquee {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.marquee img { aspect-ratio: 3/4; object-fit: cover; }

/* Secondary contact-sheet grid — denser, smaller selects from the leg */
.contact-sheet {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
  margin-top: 24px;
  padding-top: 28px;
  border-top: 1px solid var(--rule);
  position: relative;
}
.contact-sheet-label {
  position: absolute;
  top: -10px; left: 0;
  background: var(--paper);
  padding: 0 12px 0 0;
  font-family: var(--sans);
  font-size: 10px; letter-spacing: .28em; text-transform: uppercase;
  color: var(--ink-3);
}
.contact-sheet img {
  width: 100%;
  aspect-ratio: 1/1;
  object-fit: cover;
  filter: grayscale(0.05) contrast(1.02);
  cursor: zoom-in;
  transition: opacity .25s, filter .25s, transform .35s;
}
.contact-sheet img:hover {
  opacity: 0.96;
  filter: none;
}

/* Passport stamps */
.stamp {
  position: absolute;
  pointer-events: none;
  mix-blend-mode: multiply;
  z-index: 5;
}
.stamp--passage {
  right: 4%; top: 16%;
  width: clamp(220px, 22vw, 360px);
  opacity: 0.88;
}
.stamp--india      { transform: rotate(-9deg);  width: clamp(180px, 18vw, 280px); right: 6%; top: 12%; filter: saturate(1.05); }
.stamp--nepal      { transform: rotate(8deg);   width: clamp(260px, 26vw, 420px); right: 4%; top: 22%; filter: saturate(1.1); }
.stamp--uzbekistan { transform: rotate(-6deg);  width: clamp(260px, 26vw, 400px); right: 5%; top: 14%; filter: hue-rotate(-6deg) saturate(1.1); }
.stamp--kazakhstan { transform: rotate(7deg);   width: clamp(260px, 26vw, 400px); right: 5%; top: 18%; filter: hue-rotate(-6deg) saturate(1.1); }

.stamp--story {
  width: clamp(180px, 20vw, 280px);
  transform: rotate(7deg);
  right: -28px;
  top: -36px;
  opacity: 0.88;
}

/* ---------- Epilogue ---------- */
.epilogue {
  padding: 14vh 32px 12vh;
  border-top: 1px solid var(--rule);
  text-align: center;
}
.epilogue-title {
  font-family: var(--display);
  font-weight: 300;
  font-style: italic;
  font-size: clamp(40px, 6vw, 96px);
  line-height: 1;
  margin: 0 0 30px;
  letter-spacing: -0.02em;
}
.epilogue-body {
  max-width: 56ch;
  margin: 0 auto;
  font-size: 19px;
  line-height: 1.6;
  color: var(--ink-2);
}
.epilogue-body p { margin: 0 0 1em; }

/* ---------- Footer ---------- */
.footer {
  padding: 32px;
  border-top: 1px solid var(--ink);
  display: flex; justify-content: space-between;
  font-family: var(--sans);
  font-size: 11px; letter-spacing: .22em; text-transform: uppercase;
  color: var(--ink-3);
}

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed; inset: 0;
  z-index: 500;
  background: rgba(14, 13, 10, 0.93);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity .35s ease;
  padding: 32px;
}
.lightbox.is-open {
  opacity: 1;
  pointer-events: auto;
}
.lightbox-stage {
  flex: 1;
  min-height: 0;
  width: 100%;
  display: flex;
  align-items: center; justify-content: center;
  position: relative;
}
.lightbox-img {
  max-width: min(96%, 1600px);
  max-height: 100%;
  object-fit: contain;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
  opacity: 0;
  transition: opacity .35s ease;
  user-select: none;
  -webkit-user-drag: none;
}
.lightbox-img.is-shown { opacity: 1; }

.lightbox-caption {
  margin-top: 18px;
  font-family: var(--sans);
  color: rgba(239, 236, 228, 0.78);
  font-size: 11px;
  letter-spacing: .22em;
  text-transform: uppercase;
  display: flex; gap: 24px; align-items: center;
}
.lightbox-counter {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .04em;
  text-transform: none;
  color: rgba(239, 236, 228, 0.55);
}

.lightbox-btn {
  position: absolute;
  top: 50%; transform: translateY(-50%);
  width: 56px; height: 56px;
  border: 1px solid rgba(239, 236, 228, 0.25);
  background: rgba(14, 13, 10, 0.4);
  color: rgba(239, 236, 228, 0.85);
  font-family: var(--sans);
  font-size: 20px;
  cursor: pointer;
  border-radius: 0;
  transition: background .2s, color .2s, border-color .2s;
  display: flex; align-items: center; justify-content: center;
}
.lightbox-btn:hover {
  background: rgba(239, 236, 228, 0.08);
  color: var(--paper);
  border-color: rgba(239, 236, 228, 0.5);
}
.lightbox-prev { left: 32px; }
.lightbox-next { right: 32px; }

.lightbox-close {
  position: absolute;
  top: 24px; right: 28px;
  background: transparent;
  border: 0;
  color: rgba(239, 236, 228, 0.7);
  cursor: pointer;
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: .22em;
  text-transform: uppercase;
  padding: 12px 18px;
  transition: color .2s;
}
.lightbox-close::before {
  content: '✕  ';
  font-size: 14px;
  letter-spacing: 0;
}
.lightbox-close:hover { color: var(--paper); }

/* photo figures: cursor pointer to hint clickability */
.story-figure { cursor: zoom-in; }
.story-figure img:not(.stamp) { transition: opacity .25s ease; }
.story-figure:hover img:not(.stamp) { opacity: 0.92; }
.marquee img { cursor: zoom-in; transition: opacity .25s ease; }
.marquee img:hover { opacity: 0.92; }

@media (max-width: 900px) {
  .lightbox { padding: 16px; }
  .lightbox-btn { width: 44px; height: 44px; }
  .lightbox-prev { left: 8px; }
  .lightbox-next { right: 8px; }
}

/* ---------- Progress bar ---------- */
.progress {
  position: fixed; top: 0; left: 0; right: 0; height: 2px;
  background: transparent; z-index: 110;
}
.progress-fill { height: 100%; background: var(--ink); width: 0; transition: width .15s linear; }

/* ---------- Side index nav ---------- */
.sidenav {
  position: fixed; right: 24px; top: 50%;
  transform: translateY(-50%);
  z-index: 90;
  display: flex; flex-direction: column; gap: 12px;
  font-family: var(--sans);
  font-size: 10px; letter-spacing: .22em; text-transform: uppercase;
  padding: 16px 14px;
  background: rgba(239, 236, 228, 0.92);
  border: 1px solid var(--rule);
  opacity: 0;
  pointer-events: none;
  transition: opacity .5s ease;
}
.sidenav.is-visible {
  opacity: 1;
  pointer-events: auto;
}
.sidenav a {
  display: flex; align-items: center; gap: 10px;
  color: var(--ink-3); text-decoration: none;
  transition: color .3s;
}
.sidenav a .dash {
  display: inline-block;
  width: 14px; height: 1px;
  background: var(--ink-3);
  transition: width .3s, background .3s;
}
.sidenav a.is-active { color: var(--ink); }
.sidenav a.is-active .dash { width: 32px; background: var(--ink); }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  body { font-size: 17px; }
  .masthead {
    padding: 12px 18px;
    font-size: 10px;
    grid-template-columns: 1fr auto;
  }
  .masthead-mid { display: none; }
  .masthead-right { font-size: 9px; }

  .cover { padding: 76px 20px 36px; }
  .cover-meta {
    grid-template-columns: 1fr;
    gap: 4px;
    text-align: left;
  }
  .cover-meta .center { letter-spacing: .22em; }
  .cover-sub-row { grid-template-columns: 1fr; gap: 24px; }
  .cover-sub { font-size: 17px; }
  .cover-sub:last-child { text-align: left !important; }
  .cover-foot { grid-template-columns: 1fr; gap: 14px; }

  .prologue { padding: 10vh 20px; }
  .prologue-title { margin-bottom: 24px; }
  .prologue-body { grid-template-columns: 1fr; gap: 8px; }
  .prologue-body p { font-size: 19px; }
  .prologue aside { font-size: 10px; gap: 8px; }

  /* No more sticky on mobile — content just flows.
     Sticky maps + 100vh blocks fight touch-scroll on iOS and create dead-space gaps. */
  .passage { min-height: 0; }
  .passage-sticky {
    position: static;
    display: flex;
    flex-direction: column;
    height: auto;
    grid-template-columns: none;
    grid-template-rows: none;
    background: var(--paper);
  }
  .passage-text {
    padding: 56px 20px 18px;
    gap: 14px;
    justify-content: flex-start;   /* kill the space-between gap */
  }
  .passage-roman { font-size: 18px; }
  .passage-name {
    font-size: clamp(38px, 11vw, 56px);
    margin: 10px 0 8px;
    line-height: 0.96;
  }
  .passage-tag { margin-bottom: 8px; font-size: 10px; }
  .passage-intro { font-size: 15px; line-height: 1.5; max-width: none; }
  .passage-foot {
    grid-template-columns: 1fr 1fr 1fr;
    gap: 8px;
    font-size: 9px;
    padding-top: 12px;
    margin-top: 18px;
  }
  .passage-foot strong { font-size: 10.5px; }
  .passage-map {
    border-left: 0;
    border-top: 1px solid var(--rule);
    min-height: 0;
    height: 280px;
    position: relative;
  }

  .story {
    padding: 8vh 20px 10vh;
    display: block;          /* drop the grid — every section becomes a stack */
  }
  .story > * { margin-bottom: 32px; }
  .story > *:last-child { margin-bottom: 0; }
  .col-12, .col-10, .col-8, .col-7, .col-6, .col-5, .col-4, .col-3 {
    grid-column: auto !important;
    width: 100%;
  }
  .off-1, .off-2, .off-3 { grid-column-start: auto !important; }
  .marquee {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
  .contact-sheet {
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    margin-top: 18px;
    padding-top: 22px;
  }
  /* prose readable */
  .story-prose { font-size: 17px; line-height: 1.6; }
  .story-prose p:first-child::first-letter { font-size: 3.6em; padding: 4px 10px 0 0; }
  .story-h3 { font-size: 22px; }
  .pullquote {
    font-size: clamp(22px, 6.2vw, 30px);
    padding: 16px 0 16px 20px;
    line-height: 1.2;
  }
  .pullquote-attr { font-size: 9px; letter-spacing: .18em; }
  .fieldnotes dl { grid-template-columns: max-content 1fr; gap: 4px 14px; }
  .codeblock { font-size: 10.5px; padding: 14px 16px; }
  .story-figure figcaption { font-size: 10px; letter-spacing: .14em; }
  .sidenav { display: none; }

  /* stamps: smaller + placed over the map area, not the text */
  .stamp--passage {
    width: clamp(140px, 40vw, 200px);
    right: 4%;
    top: auto;
    bottom: 4%;
  }
  .stamp--india,
  .stamp--nepal,
  .stamp--uzbekistan,
  .stamp--kazakhstan {
    width: clamp(140px, 40vw, 200px);
    right: 4%;
    top: auto;
    bottom: 4%;
  }
  .stamp--india { transform: rotate(-7deg); }
  .stamp--nepal { transform: rotate(6deg); }
  .stamp--uzbekistan { transform: rotate(-5deg); }
  .stamp--kazakhstan { transform: rotate(6deg); }

  .stamp--story {
    width: clamp(110px, 28vw, 160px);
    right: -10px;
    top: -20px;
  }
}
