:root {
  --ink: #0c0d10;
  --ink-2: #15171c;
  --ink-3: #1d2028;
  --paper: #f1e9d8;
  --paper-dim: #c6bca8;
  --paper-faint: #958c7c;
  --kesri: #ea8a2c;
  --kesri-hi: #f7a95a;
  --kesri-soft: rgba(234, 138, 44, 0.14);
  --river: #8db6da;
  --line: rgba(241, 233, 216, 0.13);
  --sans: "Atkinson Hyperlegible Next", "Noto Sans Gurmukhi", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --bar: 3.6rem;
  --gurmukhi: "Noto Serif Gurmukhi", "Mukta Mahee", serif;
  --measure: 40rem;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  font: 400 1.1875rem/1.7 var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
/* paper grain over the whole page, very faint */
body::before {
  content: "";
  position: fixed; inset: 0; z-index: 100; pointer-events: none;
  opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
a { color: var(--kesri-hi); }
a:focus-visible, button:focus-visible, input:focus-visible, [role="option"]:focus-visible {
  outline: 2px solid var(--kesri-hi); outline-offset: 3px; border-radius: 4px;
}
.gur { font-family: var(--gurmukhi); }
.wrap { padding-inline: clamp(1rem, 4vw, 3rem); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* drifting motes sit behind everything; the content stacks above them */
#motes { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
.hero, .story, main, .sources, footer { position: relative; z-index: 1; }

/* ---------- hero ---------- */
.hero {
  min-height: calc(100svh - var(--bar));
  display: grid; place-items: center; text-align: center;
  isolation: isolate;
}
.hero-map { position: absolute; inset: 0; z-index: -1; display: grid; place-items: center; opacity: .55; }
.hero-map svg { width: min(92vw, 92svh); height: auto; }
.hero h1 { margin: 0; line-height: .9; }
.hero .big-gur {
  display: block; font: 700 clamp(4.5rem, 16vw, 11rem)/1 var(--gurmukhi);
  color: var(--paper); letter-spacing: .02em;
  text-shadow: 0 0 60px rgba(12,13,16,.9);
}
.hero .title {
  display: block; margin-top: .9rem;
  font: 700 clamp(1.45rem, 3.8vw, 2.4rem)/1.2 var(--sans);
  color: var(--kesri-hi);
}
.hero .sub {
  margin: 1.4rem auto 0; max-width: 32rem;
  font: 400 clamp(1.08rem, 2.2vw, 1.25rem)/1.6 var(--sans); color: var(--paper-dim);
  text-shadow: 0 0 30px var(--ink);
}
.hero-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: .7rem; margin-top: 1.8rem; }
.btn {
  display: inline-grid; place-items: center; min-height: 3rem; padding: 0 1.4rem;
  font: 700 1.02rem/1 var(--sans); color: var(--paper); text-decoration: none; cursor: pointer;
  background: rgba(21,23,28,.85); border: 1px solid var(--line); border-radius: 999px;
  transition: border-color .3s, color .3s, background .3s, translate .3s;
}
.btn:hover { border-color: var(--kesri); color: var(--kesri-hi); translate: 0 -2px; }
.btn-main { background: var(--kesri); color: var(--ink); border-color: var(--kesri); }
.btn-main:hover { background: var(--kesri-hi); color: var(--ink); }
.byline { margin-top: 1.6rem; font: 700 .85rem/1 var(--sans); letter-spacing: .26em; text-transform: uppercase; color: var(--paper-faint); }
.scroll-cue {
  position: absolute; bottom: 2rem; left: 50%; translate: -50% 0;
  font: 700 .78rem/1 var(--sans); letter-spacing: .3em; text-transform: uppercase; color: var(--paper-faint);
}
.scroll-cue::after {
  content: ""; display: block; width: 1px; height: 2.6rem; margin: .8rem auto 0;
  background: linear-gradient(var(--kesri), transparent);
  animation: drip 2.2s ease-in-out infinite;
}
@keyframes drip { 0%,100% { transform: scaleY(.3); transform-origin: top; } 50% { transform: scaleY(1); } }

/* the hero map is a backdrop: no labels behind the headline, and a soft dark
   pool under the text so lines never cross the words */
.hero-map :is(.city text, .river-label, .country-label) { display: none; }
.hero { overflow-x: clip; } /* the dark pool below reaches past the edge on phones; clip it, not the page */
.hero .wrap { position: relative; }
.hero .wrap::before {
  content: ""; position: absolute; inset: -3rem -1rem; z-index: -1; pointer-events: none;
  background: radial-gradient(closest-side, rgba(12,13,16,.92), rgba(12,13,16,.75) 60%, transparent);
}

/* ---------- about and the era overview ---------- */
.intro { position: relative; z-index: 1; max-width: 70rem; margin: 0 auto; padding-block: 10svh 8svh;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: clamp(2rem, 5vw, 4rem); align-items: start; }
.intro h2 { margin: 0 0 1rem; font: 800 clamp(1.5rem, 3.2vw, 2rem)/1.2 var(--sans); }
.about p { margin: 0 0 1rem; color: var(--paper-dim); }
.about-links { display: flex; flex-wrap: wrap; gap: .6rem 1.4rem; font-weight: 700; }
.era-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr)); gap: .7rem; }
.era-grid a {
  display: grid; grid-template-columns: auto 1fr; gap: .1rem .8rem; align-items: baseline; height: 100%;
  padding: .9rem 1rem; color: var(--paper); text-decoration: none;
  background: linear-gradient(180deg, var(--ink-2), var(--ink-3)); border: 1px solid var(--line); border-radius: 14px;
  transition: border-color .3s, translate .3s;
}
.era-grid a:hover { border-color: var(--kesri); translate: 0 -2px; }
.g-num { grid-row: span 3; font: 800 1.1rem/1.4 var(--sans); color: var(--kesri-hi); }
.g-gur { font: 700 1.15rem/1.3 var(--gurmukhi); }
.g-title { font-weight: 700; font-size: 1rem; line-height: 1.35; }
.g-span { font-size: .88rem; color: var(--paper-faint); }

/* ---------- key words ---------- */
.glossary { position: relative; z-index: 1; max-width: var(--measure); margin: 0 auto; padding-block: 12svh 0; }
.glossary h2 { font: 800 clamp(2rem, 5vw, 2.8rem)/1.1 var(--sans); text-align: center; margin: 0 0 .7rem; }
.glossary .lede { text-align: center; color: var(--paper-dim); margin: 0 auto 2.4rem; }
.glossary dl { margin: 0; display: grid; gap: 1.1rem; }
.gl { padding-bottom: 1.1rem; border-bottom: 1px solid var(--line); }
.gl dt { font-weight: 800; font-size: 1.1rem; }
.gl dt span { margin-left: .5rem; font-weight: 600; color: var(--kesri-hi); }
.gl dd { margin: .3rem 0 0; color: var(--paper-dim); line-height: 1.65; }

/* ---------- the map ---------- */
.map svg { overflow: visible; }
.province { fill: rgba(241,233,216,.035); stroke: var(--paper); stroke-width: 1.4; stroke-linejoin: round; }
.river { fill: none; stroke: var(--river); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.river-label { font: italic 600 20px var(--sans); fill: var(--river); letter-spacing: .03em; }
.city circle { fill: var(--paper); }
.city text { font: 600 16px var(--sans); fill: var(--paper-dim); }
.city.sacred circle { fill: var(--kesri); }
.city.sacred text { fill: var(--kesri-hi); font-weight: 700; }
.city text, .river-label { paint-order: stroke; stroke: var(--ink); stroke-width: 4px; stroke-linejoin: round; }
.radcliffe { fill: none; stroke: #e0574a; stroke-width: 2.6; stroke-dasharray: 9 6; }
.country-label { font: 800 32px var(--sans); letter-spacing: .22em; fill: var(--paper); opacity: 0; }

/* ---------- pinned map story ---------- */
.story-stage {
  height: calc(100svh - var(--bar)); display: grid; grid-template-columns: 1fr; place-items: center;
  overflow: hidden;
}
.story-stage .map { width: min(94vw, 82svh); }
.story-caption {
  position: absolute; left: 50%; bottom: 6svh; translate: -50% 0;
  width: min(92vw, 34rem); text-align: center;
  background: rgba(12,13,16,.86); backdrop-filter: blur(6px);
  border: 1px solid var(--line); border-radius: 16px; padding: 1.1rem 1.4rem;
}
.story-caption .yr { font: 800 1.9rem/1.1 var(--sans); color: var(--kesri-hi); }
.story-caption .yr.gur { font-family: var(--gurmukhi); font-weight: 700; }
.story-caption p { margin: .5rem 0 0; color: var(--paper); font-size: 1.12rem; line-height: 1.6; }

@media (min-width: 900px) {
  .story-stage { grid-template-columns: minmax(18rem, 26rem) minmax(0, 1fr); gap: 3rem; padding-inline: clamp(1.5rem, 4vw, 4rem); }
  .story-stage .map { width: min(100%, 86svh); justify-self: center; }
  .story-caption { position: static; translate: none; width: auto; text-align: left; order: -1; padding: 1.7rem 1.9rem; }
  .story-caption .yr { font-size: 2.4rem; }
  .story-caption p { font-size: 1.2rem; line-height: 1.65; }
}

/* ---------- top bar: era links and search ---------- */
.era-nav {
  position: sticky; top: 0; z-index: 50; height: var(--bar);
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  padding: 0 1rem;
  border-bottom: 1px solid var(--line);
}
/* The blur lives on a layer behind the bar: a backdrop-filter on the bar itself
   would trap the phone's full-screen search panel inside the bar. */
.era-nav::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: rgba(12,13,16,.9); backdrop-filter: blur(10px);
}
.brand { justify-self: start; font: 700 1.35rem/1 var(--gurmukhi); color: var(--paper); text-decoration: none; }
.brand:hover { color: var(--kesri-hi); }
.era-links { grid-column: 2; display: flex; gap: .35rem; justify-content: center; }
.bar-end { grid-column: 3; justify-self: end; display: flex; align-items: center; gap: .5rem; }
.lang-switch {
  display: inline-grid; place-items: center; min-height: 2.75rem; padding: 0 .95rem;
  font: 700 .98rem/1 var(--sans); color: var(--paper); text-decoration: none;
  border: 1px solid var(--line); border-radius: 999px; background: var(--ink-3);
  transition: border-color .3s, color .3s;
}
.lang-switch:hover { border-color: var(--kesri); color: var(--kesri-hi); }
.ls-short { display: none; }
.era-links a {
  display: grid; place-items: center; min-width: 2.75rem; min-height: 2.75rem; padding: 0 .65rem;
  font: 700 .95rem/1 var(--sans); letter-spacing: .08em;
  color: var(--paper-dim); text-decoration: none; border-radius: 999px;
  transition: color .3s, background .3s;
}
.era-links a:hover, .era-links a.on { color: var(--ink); background: var(--kesri); }
.search { position: static; }
.search-open {
  display: inline-flex; align-items: center; gap: .5rem; min-height: 2.75rem; padding: 0 1rem;
  font: 700 .95rem/1 var(--sans); color: var(--paper); cursor: pointer;
  background: var(--ink-3); border: 1px solid var(--line); border-radius: 999px;
  transition: border-color .3s, color .3s;
}
.search-open:hover, .search-open[aria-expanded="true"] { border-color: var(--kesri); color: var(--kesri-hi); }
.search-panel {
  position: absolute; top: calc(100% + .5rem); right: 1rem;
  width: min(38rem, calc(100vw - 2rem)); max-height: min(72vh, 44rem);
  display: flex; flex-direction: column;
  background: var(--ink-2); border: 1px solid var(--line); border-radius: 18px;
  box-shadow: 0 30px 80px -20px rgba(0,0,0,.8);
  overflow: hidden;
}
.search-panel[hidden] { display: none; }
.search-box { display: flex; align-items: center; gap: .5rem; padding: .8rem .8rem .6rem 1rem; border-bottom: 1px solid var(--line); }
.search-box input {
  flex: 1; min-width: 0; min-height: 2.9rem; padding: 0 .9rem;
  font: 400 1.15rem/1 var(--sans); color: var(--paper);
  background: var(--ink); border: 1px solid var(--line); border-radius: 12px;
}
.search-box input::placeholder { color: var(--paper-faint); }
.search-box input::-webkit-search-cancel-button { display: none; }
.search-close {
  width: 2.75rem; height: 2.75rem; flex: none; font: 400 1.8rem/1 var(--sans);
  color: var(--paper-dim); background: none; border: 0; border-radius: 50%; cursor: pointer;
}
.search-close:hover { color: var(--kesri-hi); background: var(--kesri-soft); }
.search-count { margin: 0; padding: .6rem 1.1rem .2rem; font-size: .95rem; color: var(--paper-faint); }
.search-results { list-style: none; margin: 0; padding: .3rem .5rem .7rem; overflow-y: auto; overscroll-behavior: contain; }
.search-results li {
  display: grid; gap: .2rem; padding: .75rem .8rem; border-radius: 12px; cursor: pointer;
}
.search-results li[aria-selected="true"], .search-results li:hover { background: var(--kesri-soft); }
.r-meta { display: flex; gap: .6rem; align-items: baseline; font: 700 .9rem/1.2 var(--sans); }
.r-date { color: var(--kesri-hi); }
.r-era { color: var(--paper-faint); letter-spacing: .08em; text-transform: uppercase; font-size: .78rem; }
.r-title { font: 700 1.08rem/1.35 var(--sans); color: var(--paper); }
.r-snip { font-size: .95rem; line-height: 1.5; color: var(--paper-dim); }
mark { background: rgba(234,138,44,.32); color: var(--paper); border-radius: 3px; padding: 0 .08em; }

/* ---------- year rail ---------- */
.year-rail {
  position: fixed; right: clamp(.6rem, 2vw, 2rem); top: 50%; translate: 0 -50%; z-index: 40;
  font: 800 clamp(1.4rem, 3vw, 2.3rem)/1 var(--sans); color: var(--kesri-hi); letter-spacing: .06em;
  writing-mode: vertical-rl; opacity: 0; transition: opacity .4s;
  pointer-events: none;
}
.year-rail.show { opacity: .85; }

/* ---------- era headers ---------- */
.era { padding-block: 16svh 6svh; position: relative; }
.era-head { text-align: center; max-width: 46rem; margin: 0 auto 5rem; }
.era-num { font: 800 1rem/1 var(--sans); color: var(--kesri-hi); letter-spacing: .3em; }
.era-gur { display: block; font: 700 clamp(3.4rem, 10vw, 6.5rem)/1.05 var(--gurmukhi); color: var(--paper); margin: .6rem 0 .3rem; }
.era-title { font: 800 clamp(1.8rem, 4.4vw, 2.7rem)/1.15 var(--sans); margin: 0; }
.era-span { font: 700 .95rem/1 var(--sans); letter-spacing: .2em; color: var(--paper-faint); margin-top: 1rem; text-transform: uppercase; }
.era-blurb { font: 400 clamp(1.1rem, 2.2vw, 1.3rem)/1.6 var(--sans); color: var(--paper-dim); margin: 1.4rem auto 0; max-width: 34rem; }

/* ---------- the spine ---------- */
.spine { position: relative; max-width: 70rem; margin: 0 auto; }
.spine::before {
  content: ""; position: absolute; left: 50%; top: 0; bottom: 0; width: 1px;
  background: linear-gradient(transparent, var(--line) 6%, var(--line) 94%, transparent);
}
.spine-fill {
  position: absolute; left: 50%; top: 0; width: 2px; height: 0; translate: -.5px 0;
  background: linear-gradient(var(--kesri), rgba(234,138,44,.25));
}
.ev { position: relative; width: calc(50% - 2.6rem); margin-bottom: 2.4rem; scroll-margin-top: 6rem; }
.ev:nth-child(odd of .ev) { margin-right: auto; }
.ev:nth-child(even of .ev) { margin-left: auto; }
.dot {
  position: absolute; top: 1.5rem; width: 13px; height: 13px; border-radius: 50%;
  background: var(--ink); border: 2px solid var(--kesri);
}
.ev:nth-child(odd of .ev) .dot { right: calc(-2.6rem - 6.5px); }
.ev:nth-child(even of .ev) .dot { left: calc(-2.6rem - 6.5px); }
.dot::after {
  content: ""; position: absolute; inset: -2px; border-radius: 50%;
  border: 2px solid var(--kesri); opacity: 0;
}
.ev.in .dot::after { animation: ping 1.4s ease-out .35s; }
@keyframes ping { from { transform: scale(1); opacity: .9; } to { transform: scale(3.4); opacity: 0; } }

.card {
  background: linear-gradient(180deg, var(--ink-2), var(--ink-3));
  border: 1px solid var(--line); border-radius: 18px; padding: 1.35rem 1.55rem 1.45rem;
  transition: border-color .35s, box-shadow .35s, translate .35s;
}
@media (hover: hover) {
  .card:hover { border-color: rgba(234,138,44,.45); translate: 0 -3px; box-shadow: 0 18px 44px -22px rgba(234,138,44,.45); }
}
.ev.flash .card { animation: flash 2.4s ease-out; }
@keyframes flash {
  0%, 30% { border-color: var(--kesri); box-shadow: 0 0 0 3px rgba(234,138,44,.55), 0 0 50px rgba(234,138,44,.35); }
  100% { border-color: var(--line); box-shadow: none; }
}
.ev-date {
  display: inline-block; padding: .4rem .75rem;
  font: 700 1rem/1 var(--sans); letter-spacing: .02em; color: var(--kesri-hi);
  background: var(--kesri-soft); border: 1px solid rgba(234,138,44,.38); border-radius: 999px;
}
.ev-title { font: 700 1.32rem/1.35 var(--sans); margin: .75rem 0 .45rem; color: var(--paper); }
.ev-sig { margin: 0; color: var(--paper-dim); font-size: 1.06rem; line-height: 1.6; }
sup.cite { font: 700 .72em/0 var(--sans); color: var(--kesri-hi); margin-left: .12em; }
sup.cite a { text-decoration: none; padding: .2em .1em; }
sup.cite.dag a { color: var(--river); }
.more {
  margin-top: 1rem; display: inline-flex; align-items: center; gap: .45rem; min-height: 2.75rem;
  font: 700 .85rem/1 var(--sans); letter-spacing: .12em; text-transform: uppercase;
  color: var(--paper); background: none; border: 1px solid var(--line); border-radius: 999px;
  padding: 0 1rem; cursor: pointer; transition: border-color .3s, color .3s;
}
.more:hover { border-color: var(--kesri); color: var(--kesri-hi); }
.more .chev { transition: transform .35s; }
.more[aria-expanded="true"] .chev { transform: rotate(180deg); }
.body { overflow: hidden; height: 0; }
.body-inner { padding-top: 1.1rem; border-top: 1px solid var(--line); margin-top: 1.1rem; font-size: 1.06rem; line-height: 1.75; color: var(--paper); }
.body-inner p { margin: 0 0 .9rem; }
.body-inner ul { margin: 0 0 .9rem; padding-left: 1.2rem; }
.body-inner li { margin-bottom: .3rem; }
.body-inner strong { color: var(--paper); font-weight: 700; }

/* ---------- article previews inside an opened card ---------- */
.previews { display: grid; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); gap: .8rem; margin-top: .4rem; }
.previews:empty { display: none; }
.pv-label { grid-column: 1 / -1; margin: .2rem 0 0; font: 700 .8rem/1.2 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--paper-faint); }
.pv {
  display: flex; flex-direction: column; overflow: hidden;
  background: var(--ink); border: 1px solid var(--line); border-radius: 14px;
  color: inherit; text-decoration: none;
  transition: border-color .3s, translate .3s;
}
.pv:hover { border-color: rgba(234,138,44,.6); translate: 0 -2px; }
.pv-img { display: block; aspect-ratio: 1.91 / 1; background: var(--ink-3); overflow: hidden; }
.pv-img img { display: block; width: 100%; height: 100%; object-fit: cover; }
.pv.noimg .pv-img { display: none; }
.pv-text { flex: 1; display: flex; flex-direction: column; gap: .35rem; padding: .8rem .95rem .9rem; }
.pv-site { font: 700 .74rem/1.2 var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--paper-faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pv-title, .pv-desc { display: -webkit-box; -webkit-box-orient: vertical; overflow: hidden; }
.pv-title { font: 700 1rem/1.35 var(--sans); color: var(--paper); -webkit-line-clamp: 3; }
.pv-desc { font-size: .9rem; line-height: 1.5; color: var(--paper-dim); -webkit-line-clamp: 2; }
.pv-go { margin-top: auto; padding-top: .35rem; display: flex; justify-content: space-between; gap: .6rem; font: 700 .85rem/1.3 var(--sans); color: var(--kesri-hi); }
.pv-n { color: var(--paper-faint); font-weight: 600; white-space: nowrap; }

/* ---------- reader corrections ---------- */
.fix-btn {
  margin-top: 1rem; display: inline-flex; align-items: center; gap: .45rem; min-height: 2.75rem; padding: 0 1rem;
  font: 700 .92rem/1 var(--sans); color: var(--paper-dim); cursor: pointer;
  background: none; border: 1px dashed var(--line); border-radius: 999px;
  transition: border-color .3s, color .3s;
}
.fix-btn:hover { border-color: var(--kesri); color: var(--kesri-hi); }
.credit { margin: 1rem 0 0; font-size: .95rem; color: var(--river); }
.thanks { padding-left: 1.2rem; color: var(--paper-dim); }
.thanks-empty { color: var(--paper-dim); }
.fix-general { margin-top: .6rem; }

.fix {
  width: min(40rem, calc(100vw - 2rem)); max-height: calc(100svh - 2rem); padding: 0;
  color: var(--paper); background: var(--ink-2); border: 1px solid var(--line); border-radius: 20px;
  box-shadow: 0 40px 100px -20px rgba(0,0,0,.9);
}
.fix::backdrop { background: rgba(5,6,8,.72); backdrop-filter: blur(3px); }
.fix-form { display: grid; gap: .9rem; padding: 1.5rem 1.6rem 1.6rem; }
.fix-form h2 { margin: 0; font: 800 1.55rem/1.2 var(--sans); }
.fix-about { margin: -.4rem 0 0; font-weight: 700; color: var(--kesri-hi); }
.fix-intro, .fix-privacy { margin: 0; color: var(--paper-dim); font-size: 1rem; line-height: 1.6; }
.fix-privacy { font-size: .9rem; color: var(--paper-faint); }
.field { display: grid; gap: .35rem; font-weight: 700; font-size: .98rem; }
.field input, .field textarea {
  width: 100%; padding: .7rem .85rem; font: 400 1.05rem/1.5 var(--sans); color: var(--paper);
  background: var(--ink); border: 1px solid var(--line); border-radius: 12px;
}
.field textarea { resize: vertical; min-height: 5.5rem; }
.field input:focus, .field textarea:focus { outline: 2px solid var(--kesri-hi); outline-offset: 1px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: .9rem; }
.check { display: flex; gap: .6rem; align-items: center; font-size: 1rem; color: var(--paper-dim); }
.check input { width: 1.25rem; height: 1.25rem; accent-color: var(--kesri); }
.fix-status { margin: 0; min-height: 1.5em; font-weight: 700; color: var(--kesri-hi); }
.fix-actions { display: flex; justify-content: flex-end; gap: .6rem; flex-wrap: wrap; }
.hp { position: absolute; left: -9999px; }
/* once sent, only the thank-you and a close button remain */
.fix-form.sent > :is(.fix-intro, .field, .field-row, .check, .fix-privacy), .fix-form.sent #fix-send { display: none; }

/* ---------- sources ---------- */
.sources { max-width: var(--measure); margin: 0 auto; padding-block: 14svh 10svh; }
.sources h2 { font: 800 clamp(2rem, 5vw, 2.8rem)/1.1 var(--sans); text-align: center; margin: 0 0 .7rem; }
.sources .lede { text-align: center; color: var(--paper-dim); margin: 0 auto 3rem; }
.sources h3 { font: 800 1.3rem/1.2 var(--sans); color: var(--kesri-hi); margin: 2.4rem 0 1rem; }
.sources ol { padding-left: 2.6rem; margin: 0; }
.sources li { margin-bottom: .85rem; color: var(--paper-dim); font-size: 1.02rem; line-height: 1.6; scroll-margin-top: 5rem; overflow-wrap: anywhere; }
.sources li:target { color: var(--paper); }
.sources .dagger li::marker { content: "†" counter(list-item) "  "; color: var(--river); }
footer { text-align: center; padding: 4rem 1rem 6rem; color: var(--paper-faint); font-size: 1rem; border-top: 1px solid var(--line); }
footer .gur { font-size: 1.4rem; color: var(--paper-dim); display: block; margin-bottom: .6rem; }

/* interleave: each card rises beside the previous one on the opposite side */
@media (min-width: 761px) { .ev + .ev { margin-top: -2.8rem; } }

/* ---------- phone layout ---------- */
@media (max-width: 760px) {
  body { font-size: 1.125rem; }
  .wrap { padding-inline: 1rem; }

  /* one bar: era numbers scroll sideways; language and search stay put at the right */
  .era-nav { display: flex; gap: .35rem; padding: 0 .5rem 0 .4rem; }
  .brand { display: none; }
  .bar-end { gap: .3rem; flex: none; }
  .lang-switch { padding: 0 .5rem; font-size: .9rem; }
  .era-nav .ls-long { display: none; }
  .era-nav .ls-short { display: inline; }
  .hero-actions { flex-direction: column; align-items: stretch; max-width: 20rem; margin-inline: auto; }
  .hero-map { opacity: .35; }
  .intro { grid-template-columns: 1fr; padding-block: 7svh 5svh; }
  .era-grid { grid-template-columns: 1fr; }
  .fix { width: 100vw; max-width: none; height: 100svh; max-height: none; margin: 0; border-radius: 0; border: 0; }
  .fix-form { padding: calc(1.2rem + env(safe-area-inset-top)) 1rem calc(1.4rem + env(safe-area-inset-bottom)); }
  .field-row { grid-template-columns: 1fr; }
  .era-links { flex: 1; min-width: 0; justify-content: flex-start; gap: .15rem; overflow-x: auto; scrollbar-width: none; }
  .era-links::-webkit-scrollbar { display: none; }
  .era-links { gap: .05rem; }
  .era-links a { min-width: 2.2rem; padding: 0 .1rem; font-size: .9rem; }
  .search-open { width: 2.75rem; padding: 0; justify-content: center; flex: none; }
  .search-label { display: none; }
  .search-panel {
    position: fixed; inset: 0; width: auto; max-height: none; border-radius: 0; border: 0;
    padding-top: env(safe-area-inset-top); padding-bottom: env(safe-area-inset-bottom);
  }
  html.search-locked body { overflow: hidden; }
  .search-box { padding: .7rem .6rem .6rem 1rem; }
  .search-results li { padding: .85rem .7rem; }

  .story-caption { bottom: 3svh; padding: .95rem 1.1rem; }
  .story-caption .yr { font-size: 1.55rem; }
  .story-caption p { font-size: 1.04rem; }

  .era { padding-block: 9svh 3svh; }
  .era-head { margin-bottom: 2.8rem; }
  .era-span { letter-spacing: .14em; }

  .spine::before, .spine-fill { left: .9rem; }
  .ev, .ev:nth-child(odd of .ev), .ev:nth-child(even of .ev) { width: auto; margin-left: 2.5rem; margin-right: 0; margin-bottom: 1.4rem; }
  .ev:nth-child(odd of .ev) .dot, .ev:nth-child(even of .ev) .dot { left: calc(.9rem - 2.5rem - 6.5px); right: auto; }
  .card { padding: 1.1rem 1.15rem 1.2rem; border-radius: 16px; }
  .ev-date { font-size: .95rem; }
  .ev-title { font-size: 1.2rem; }
  .ev-sig { font-size: 1.02rem; }
  .body-inner { font-size: 1.02rem; }

  .year-rail { display: none; }
  .country-label { font-size: 22px; }
  .sources ol { padding-left: 2.1rem; }
}

/* ---------- Punjabi ---------- */
:lang(pa) .era-num, :lang(pa) .byline, :lang(pa) .scroll-cue, :lang(pa) .era-span,
:lang(pa) .more, :lang(pa) .pv-label, :lang(pa) .pv-site, :lang(pa) .r-era,
:lang(pa) .country-label, :lang(pa) .river-label { letter-spacing: 0; }
html:lang(pa) body { line-height: 1.8; }
/* small capitals-style labels are sized for Latin; Gurmukhi needs more room */
:lang(pa) .byline, :lang(pa) .scroll-cue { font-size: 1rem; }
:lang(pa) .era-num, :lang(pa) .pv-label, :lang(pa) .r-era, :lang(pa) .pv-site { font-size: .95rem; }
html:lang(pa) .body-inner { line-height: 1.85; }
html:lang(pa) .ev-title, html:lang(pa) .r-title { line-height: 1.5; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .scroll-cue::after, .ev.in .dot::after, .ev.flash .card { animation: none; }
  #motes { display: none; }
}

/* ---------- key words: marked in the text, meaning on hover or tap ---------- */
.term { text-decoration: underline dotted rgba(247,169,90,.75); text-decoration-thickness: 1.5px; text-underline-offset: .22em; cursor: help; border-radius: 3px; }
.term:hover, .term:focus-visible { background: var(--kesri-soft); outline: none; }
.term-pop {
  position: absolute; z-index: 90; max-width: 320px; padding: .8rem .95rem;
  font: 400 .98rem/1.55 var(--sans); color: var(--paper);
  background: #23262e; border: 1px solid rgba(234,138,44,.5); border-radius: 12px;
  box-shadow: 0 18px 40px -12px rgba(0,0,0,.8);
}
.term-pop strong { display: block; margin-bottom: .25rem; color: var(--kesri-hi); font-weight: 800; }
.term-pop[hidden] { display: none; }

/* ---------- timeline extras ---------- */
.counsel { margin: 1.2rem 0 0; padding: 1rem 1.1rem; border-left: 3px solid var(--kesri); background: var(--kesri-soft); border-radius: 0 12px 12px 0; }
.counsel h4 { margin: 0 0 .4rem; font: 800 .9rem/1.2 var(--sans); color: var(--kesri-hi); letter-spacing: .04em; }
.counsel p { margin: 0 0 .4rem; }
.counsel .counsel-src { font-size: .85rem; margin-bottom: .9rem; }
.counsel .counsel-src:last-child { margin-bottom: 0; }
.page-link { margin: 1rem 0 0; font-weight: 700; }
.theme-banner { position: relative; z-index: 1; max-width: 70rem; margin: 2rem auto 0; padding: .9rem 1.2rem;
  font-weight: 700; background: var(--kesri-soft); border: 1px solid rgba(234,138,44,.45); border-radius: 14px; }
