/* The Satth Project — shared stylesheet
   Vintage cartographic. Parchment ground, sepia ink, sage land, terracotta
   accent, indigo water. No modern UI conventions anywhere. */

:root {
  /* paper */
  --paper:        #F2E7CE;
  --paper-warm:   #E8D8B8;
  --paper-aged:   #DCC9A4;
  --paper-deep:   #CDB68C;

  /* ink */
  --ink:          #3B322A;
  --ink-soft:     #6A5B49;
  --ink-faint:    #9C8C74;

  /* land + water */
  --sage:         #7C8B72;
  --sage-deep:    #5A6B54;
  --sage-wash:    #BFCAB4;
  --indigo:       #2E4159;
  --indigo-soft:  #5C7189;

  /* accent */
  --rust:         #B65F45;
  --rust-deep:    #8E4630;
  --haldi:        #C2953A;

  --rule:         #C4AE87;
  --rule-fine:    #D6C3A0;

  /* older rules call these two names. They point at the palette above so there
     is still one place to change a colour. */
  --ink-2:        var(--ink-soft);
  --surface:      var(--paper-warm);

  --display: "IM Fell English", "EB Garamond", Georgia, serif;
  --body:    "EB Garamond", "Iowan Old Style", Georgia, serif;
  --gur:     "Noto Serif Gurmukhi", "EB Garamond", serif;
}

* { box-sizing: border-box; }

/* nothing on the map or the chrome should highlight while you drag it.
   the essay on the front page stays selectable, because it is prose. */
body {
  -webkit-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.frontis p, .frontis h1, .panel p, .panel h2 {
  -webkit-user-select: text;
  user-select: text;
}
#map, #map text, .legend, .timeline, .atlas-head, .zoomers {
  -webkit-user-select: none;
  user-select: none;
}

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background-color: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 20px;
  line-height: 1.68;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Paper grain. Generated, so nothing external to load. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: .5;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)' opacity='0.22'/%3E%3C/svg%3E");
  mix-blend-mode: multiply;
}

/* Vignette, the way an old sheet darkens toward its edges. */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 2;
  background: radial-gradient(ellipse at 50% 42%,
              rgba(0,0,0,0) 42%, rgba(96,74,44,.10) 82%, rgba(78,58,32,.20) 100%);
}

.sheet { position: relative; z-index: 3; }

a { color: var(--rust-deep); text-decoration: none; border-bottom: 1px solid var(--rule); }
a:hover { color: var(--ink); border-bottom-color: var(--rust); }
:focus-visible { outline: 2px solid var(--rust); outline-offset: 3px; }

.gur { font-family: var(--gur); }

/* ── ornament ─────────────────────────────────────────────────────────── */

.rule-double {
  border: 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  height: 3px;
  margin: 0;
}

.ornament {
  display: flex;
  align-items: center;
  gap: 18px;
  color: var(--rule);
  margin: 0;
}
.ornament::before, .ornament::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--rule);
}
.ornament span {
  font-family: var(--display);
  font-size: 20px;
  color: var(--sage-deep);
  letter-spacing: .3em;
}

.smallcaps {
  font-variant: small-caps;
  letter-spacing: .16em;
  text-transform: lowercase;
}

.label {
  font-family: var(--body);
  font-size: 13px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

/* ── front page ───────────────────────────────────────────────────────── */

.frontis {
  max-width: 760px;
  margin: 0 auto;
  padding: 84px 32px 110px;
  text-align: center;
}

.frontis .masthead-mark {
  text-align: center;
  font-family: var(--gur);
  font-size: 62px;
  line-height: 1;
  color: var(--sage-deep);
  margin: 0 0 26px;
  letter-spacing: .04em;
}

.frontis h1.masthead {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(2.9rem, 8vw, 4.6rem);
  line-height: 1.04;
  letter-spacing: .01em;
  margin: 0 0 10px;
  color: var(--ink);
}

.frontis .masthead-sub {
  text-align: center;
  font-family: var(--body);
  font-size: 15px;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: 0 0 40px;
}

.frontis .rule-double { margin: 0 auto 44px; max-width: 300px; }

.frontis p {
  text-align: left;
  margin: 0 0 26px;
  font-size: 1.06rem;
  color: var(--ink);
}

.frontis p.opening::first-letter {
  font-family: var(--display);
  float: left;
  font-size: 4.4rem;
  line-height: .82;
  padding: 6px 12px 0 0;
  color: var(--rust-deep);
}

.enter {
  display: inline-block;
  margin: 46px 0 0;
  padding: 20px 54px 18px;
  font-family: var(--display);
  font-size: 1.5rem;
  letter-spacing: .06em;
  color: var(--paper);
  background: var(--rust-deep);
  border: 1px solid var(--rust-deep);
  box-shadow: 0 0 0 3px var(--paper), 0 0 0 4px var(--rust-deep);
  transition: background .25s ease, box-shadow .25s ease, transform .25s ease;
}
.enter:hover {
  background: var(--ink);
  border-color: var(--ink);
  box-shadow: 0 0 0 3px var(--paper), 0 0 0 4px var(--ink);
  color: var(--paper);
  transform: translateY(-1px);
}
.enter .sub {
  display: block;
  font-family: var(--body);
  font-size: 12px;
  letter-spacing: .26em;
  text-transform: uppercase;
  opacity: .74;
  margin-top: 6px;
}

.frontis footer {
  margin-top: 84px;
  font-size: .82rem;
  color: var(--ink-soft);
  font-style: italic;
}

/* ── map page ─────────────────────────────────────────────────────────── */

.atlas {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 356px;
  grid-template-rows: auto minmax(0, 1fr) auto;
  height: 100vh;
  height: 100dvh;
}

.atlas-head {
  grid-column: 1 / -1;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
  padding: 14px 26px 12px;
  border-bottom: 3px double var(--rule);
  background: var(--paper-warm);
}
.atlas-head .title {
  font-family: var(--display);
  font-size: 1.5rem;
  letter-spacing: .02em;
}
.atlas-head .title a { border: 0; color: var(--ink); }
.atlas-head .title a:hover { color: var(--rust-deep); }
.atlas-head .epoch {
  font-family: var(--display);
  font-size: 1.15rem;
  color: var(--rust-deep);
  text-align: right;
}
.atlas-head .epoch .yr {
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}

.canvas-wrap {
  position: relative;
  overflow: hidden;
  background: var(--paper-aged);
  border-right: 1px solid var(--rule);
}
#map { display: block; width: 100%; height: 100%; cursor: grab; }
#map.dragging { cursor: grabbing; }

.zoomers {
  position: absolute;
  top: 16px; left: 16px;
  display: flex; flex-direction: column;
  z-index: 5;
}
.zoomers button {
  width: 34px; height: 34px;
  font-family: var(--display);
  font-size: 20px; line-height: 1;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--rule);
  margin-bottom: -1px;
  cursor: pointer;
}
.zoomers button:hover { background: var(--paper-warm); color: var(--rust-deep); }

.legend {
  position: absolute;
  bottom: 16px; left: 16px;
  z-index: 5;
  background: rgba(242,231,206,.92);
  border: 1px solid var(--rule);
  padding: 11px 15px 12px;
  font-size: .755rem;
  line-height: 1.36;
  max-width: 226px;
}
.legend .label { display: block; margin-bottom: 7px; font-size: 11px; }
.legend .key { display: flex; align-items: flex-start; gap: 8px; margin-bottom: 2.5px; }
.legend .key i { font-style: italic; color: var(--ink-soft); }
.legend .sw { width: 17px; height: 10px; border: 1px solid var(--ink-soft); flex: none; margin-top: 2px; }

/* ── side panel ───────────────────────────────────────────────────────── */

.panel {
  overflow-y: auto;
  padding: 26px 28px 40px;
  background: var(--paper);
}
.panel h2 {
  font-family: var(--display);
  font-weight: 400;
  font-size: 1.75rem;
  line-height: 1.14;
  margin: 0 0 4px;
}
.panel .place-gur {
  font-family: var(--gur);
  font-size: 1.15rem;
  color: var(--sage-deep);
  margin: 0 0 14px;
}
.panel .coords {
  font-size: .78rem;
  letter-spacing: .1em;
  color: var(--ink-soft);
  font-variant-numeric: tabular-nums;
  margin: 0 0 18px;
}
.panel p { font-size: .95rem; margin: 0 0 15px; }
.panel .empty {
  font-style: italic;
  color: var(--ink-soft);
  border-left: 2px solid var(--rule);
  padding-left: 14px;
}
.panel .era-note {
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid var(--rule-fine);
  font-size: .88rem;
  color: var(--ink-soft);
}
.panel .dismiss {
  font-size: .78rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--ink-soft);
  cursor: pointer;
  background: none; border: 0; padding: 0;
  font-family: var(--body);
  margin-bottom: 20px;
}
.panel .dismiss:hover { color: var(--rust-deep); }

.panel .roll { list-style: none; margin: 12px 0 0; padding: 0; }
.panel .roll li { border-bottom: 1px solid var(--rule-fine); }
.panel .roll button {
  width: 100%; text-align: left;
  background: none; border: 0; cursor: pointer;
  font-family: var(--body); font-size: .95rem; color: var(--ink);
  padding: 9px 2px;
  display: flex; justify-content: space-between; gap: 12px; align-items: baseline;
}
.panel .roll button:hover { color: var(--rust-deep); }
.panel .roll .yr {
  font-size: .78rem; color: var(--ink-soft);
  font-variant-numeric: tabular-nums; flex: none;
}

/* ── timeline ─────────────────────────────────────────────────────────── */

.timeline {
  grid-column: 1 / -1;
  border-top: 3px double var(--rule);
  background: var(--paper-warm);
  padding: 15px 26px 20px;
}
.timeline { display: flex; align-items: flex-start; gap: 22px; }
.timeline .scale { flex: 1; min-width: 0; position: relative; }
.play {
  flex: none;
  margin-top: 1px;
  font-family: var(--display);
  font-size: 1rem;
  letter-spacing: .05em;
  color: var(--paper);
  background: var(--sage-deep);
  border: 1px solid var(--sage-deep);
  padding: 4px 22px 3px;
  cursor: pointer;
  transition: background .2s ease, border-color .2s ease;
}
.play:hover { background: var(--ink); border-color: var(--ink); }
.play.on { background: var(--rust-deep); border-color: var(--rust-deep); }
.timeline input[type=range] {
  -webkit-appearance: none; appearance: none;
  width: 100%; height: 24px; background: transparent; cursor: pointer; margin: 0;
  display: block;
}
.timeline input[type=range]::-webkit-slider-runnable-track {
  height: 3px; background: var(--rule); border-top: 1px solid var(--paper-deep);
}
.timeline input[type=range]::-moz-range-track { height: 3px; background: var(--rule); }
.timeline input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 15px; height: 22px; margin-top: -10px;
  background: var(--rust-deep);
  border: 1px solid var(--paper);
  box-shadow: 0 0 0 1px var(--rust-deep);
}
.timeline input[type=range]::-moz-range-thumb {
  width: 15px; height: 22px; border-radius: 0;
  background: var(--rust-deep); border: 1px solid var(--paper);
}
.ticks {
  position: relative; height: 56px; margin-top: 2px;
}
.ticks .tick {
  position: absolute; top: 0; transform: translateX(-50%);
  text-align: center; cursor: pointer;
  font-size: 11px; letter-spacing: .08em; color: var(--ink-soft);
  font-variant-numeric: tabular-nums;
  background: none; border: 0; font-family: var(--body); padding: 0;
  white-space: nowrap;
}
.ticks .tick::before {
  content: ""; display: block; width: 1px; height: 7px;
  background: var(--rule); margin: 0 auto 4px;
}
.ticks .tick.minor::before { height: 5px; background: var(--paper-deep); }
.ticks .tick.minor { width: 11px; height: 14px; }
.ticks .tick.minor:hover::before, .ticks .tick.minor.on::before {
  background: var(--rust-deep); height: 9px;
}
.ticks .tick.low { top: 18px; }
.ticks .tick.low::before { height: 22px; margin-bottom: 3px; }
.ticks .tick:hover, .ticks .tick.on { color: var(--rust-deep); }
.ticks .tick.on::before { background: var(--rust-deep); height: 10px; }

/* ── responsive ───────────────────────────────────────────────────────── */

@media (max-width: 900px) {
  .atlas { grid-template-columns: minmax(0,1fr); grid-template-rows: auto minmax(0,1fr) auto auto; }
  .canvas-wrap { border-right: 0; border-bottom: 1px solid var(--rule); min-height: 46vh; }
  .panel { max-height: 34vh; border-bottom: 1px solid var(--rule); }
  .atlas-head { flex-direction: column; align-items: flex-start; gap: 4px; }
  .atlas-head .epoch { text-align: left; }
  .legend { display: none; }
}


/* ── selection ────────────────────────────────────────────────────────
   Clicking has to change the sheet, not just fill a box. The map steps
   back so the chosen thing steps forward. */

html { scroll-behavior: smooth; }
#map { will-change: transform; }

#map #L-place > g > .body, #map #L-territory > g > .body,
#map #L-neigh, #map #L-relief,
#map #L-desert, #map #L-route, #map #L-doab, #map #L-region, #map #L-grat,
#map #L-state, #map #L-geoname, #map #L-water, #map #L-forest {
  transition: opacity .3s ease;
}

#map.has-sel #L-place > g:not(.sel) > .body { opacity: .28; }
#map.has-sel #L-neigh, #map.has-sel #L-relief, #map.has-sel #L-desert,
#map.has-sel #L-route, #map.has-sel #L-doab, #map.has-sel #L-region,
#map.has-sel #L-state, #map.has-sel #L-geoname, #map.has-sel #L-water,
#map.has-sel #L-forest { opacity: .3; }
#map.has-sel #L-territory > g:not(.sel) > .body { opacity: .4; }
#map.has-sel #L-river { opacity: .5; }

#map #L-territory > g.sel .body > path:last-of-type {
  stroke-width: 3.6;
  filter: drop-shadow(0 0 7px rgba(142,70,48,.6));
}
#map #L-territory > g.sel .body text { fill-opacity: .95; }

#map .place.sel .halo { animation: ping 1.7s ease-out infinite; }
@keyframes ping {
  0%   { r: 10; opacity: .95; stroke-width: 1.8; }
  75%  { r: 22; opacity: 0;   stroke-width: .5;  }
  100% { r: 22; opacity: 0;   stroke-width: .5;  }
}
#map .place.sel text { fill: #8E4630; }

/* ── page feel ───────────────────────────────────────────────────────── */

.panel h2, .panel > p, .panel .roll { animation: rise .34s ease both; }
@keyframes rise { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: none; } }
.frontis > * { animation: rise .6s ease both; }
.frontis > *:nth-child(2) { animation-delay: .06s; }
.frontis > *:nth-child(3) { animation-delay: .11s; }
.frontis > *:nth-child(5) { animation-delay: .17s; }
.frontis .enter { animation-delay: .3s; }
.legend .key { transition: opacity .25s ease; }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

/* ── site navigation ──────────────────────────────────────────────────── */

.topbar {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 24px; flex-wrap: wrap;
  padding: 18px 32px 16px;
  border-bottom: 3px double var(--rule);
  background: var(--paper-warm);
  position: relative; z-index: 4;
}
.topbar .brand {
  font-family: var(--display); font-size: 1.4rem; letter-spacing: .02em;
}
.topbar .brand a { border: 0; color: var(--ink); }
.topbar .brand a:hover { color: var(--rust-deep); }
.topbar nav { display: flex; gap: 26px; flex-wrap: wrap; }
.topbar nav a {
  font-family: var(--body); font-size: 13px; letter-spacing: .16em;
  text-transform: uppercase; color: var(--ink-soft); border: 0;
  padding-bottom: 2px; border-bottom: 1px solid transparent;
}
.topbar nav a:hover { color: var(--ink); }
.topbar nav a.here { color: var(--rust-deep); border-bottom-color: var(--rust); }

.page { max-width: 940px; margin: 0 auto; padding: 54px 32px 110px; }
.page.narrow { max-width: 720px; }
.page h1 {
  font-family: var(--display); font-weight: 400;
  font-size: clamp(2.1rem, 5vw, 3.1rem); line-height: 1.06;
  margin: 0 0 10px; text-wrap: balance;
}
.page .deck {
  font-size: 1.08rem; color: var(--ink-2); max-width: 62ch;
  margin: 0 0 34px; font-style: italic;
}
.page h2 {
  font-family: var(--display); font-weight: 400; font-size: 1.6rem;
  margin: 44px 0 14px; padding-top: 8px; border-top: 1px solid var(--rule);
  text-wrap: balance;
}
.page h3 { font-family: var(--body); font-weight: 600; font-size: 1.1rem; margin: 26px 0 8px; }
.page p, .page li { max-width: 68ch; }
.page p { margin: 0 0 18px; }
.page ul, .page ol { padding-left: 1.2em; margin: 0 0 20px; }
.page li { margin-bottom: 8px; }

/* ── vaar and story cards ─────────────────────────────────────────────── */

.vaaran { display: grid; grid-template-columns: repeat(auto-fill, minmax(215px, 1fr));
          gap: 10px; margin: 0 0 40px; }
.vaar { background: var(--surface); padding: 17px 18px 19px; display: block;
        border: 1px solid var(--rule); transition: background .2s ease, border-color .2s ease; }
.vaar:hover { background: var(--paper-aged); border-color: var(--rust); }
.vaar .yr { font-family: var(--body); font-size: 11px; letter-spacing: .18em;
            color: var(--ink-soft); display: block; margin-bottom: 5px; }
.vaar .nm { font-family: var(--display); font-size: 1.24rem; color: var(--ink);
            display: block; line-height: 1.14; margin-bottom: 6px; }
.vaar .ct { font-size: .84rem; color: var(--ink-soft); display: block; }

.roll-stories { border-top: 1px solid var(--rule); margin: 8px 0 0; }
.st-row {
  display: grid; grid-template-columns: 1fr auto; gap: 18px; align-items: baseline;
  padding: 16px 10px; border-bottom: 1px solid var(--rule-fine); border-left: 0;
  color: var(--ink-2);
  transition: background .18s ease;
}
.st-row, .st-row:hover { text-decoration: none; }
.st-row:hover { background: var(--surface); }
.st-row .place { font-family: var(--body); font-size: 11px; letter-spacing: .14em;
                 text-transform: uppercase; color: var(--ink-soft); display: block; margin-bottom: 3px; }
.st-row .ttl { font-family: var(--display); font-size: 1.2rem; color: var(--ink); line-height: 1.2; }
.st-row .blurb { font-size: .92rem; color: var(--ink-2); margin-top: 5px; max-width: 62ch; }
.st-row .ttl, .st-row:hover .ttl { color: var(--ink); }
.st-row:hover .ttl { color: var(--rust-deep); }
.st-row .state {
  font-family: var(--body); font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase;
  padding: 3px 9px 2px; border: 1px solid var(--rule); color: var(--ink-soft); white-space: nowrap;
}
.st-row .state.told { border-color: var(--sage-deep); color: var(--sage-deep); }
.st-row .state.open { border-color: var(--rust); color: var(--rust-deep); }

/* ── a story ──────────────────────────────────────────────────────────── */

.dateline {
  font-family: var(--body); font-size: 12px; letter-spacing: .18em;
  text-transform: uppercase; color: var(--rust-deep); margin: 0 0 14px;
}
.story-body p:first-of-type::first-letter {
  font-family: var(--display); float: left; font-size: 3.9rem; line-height: .84;
  padding: 5px 11px 0 0; color: var(--rust-deep);
}
.pull {
  font-family: var(--display); font-size: 1.5rem; line-height: 1.34;
  color: var(--ink); border-left: 2px solid var(--rust); padding: 4px 0 4px 22px;
  margin: 30px 0; max-width: 46ch;
}
.sourcebox {
  background: var(--surface); border: 1px solid var(--rule);
  padding: 20px 24px 22px; margin: 40px 0 0;
}
.sourcebox h3 { margin-top: 0; font-size: .82rem; letter-spacing: .16em;
                text-transform: uppercase; color: var(--ink-soft); font-weight: 600; }
.sourcebox ol { font-size: .9rem; margin-bottom: 0; }
.unknown { border-left: 2px solid var(--sage-deep); padding-left: 18px; margin: 30px 0; }
.unknown h3 { margin-top: 0; }
.unknown li { font-size: .95rem; color: var(--ink-2); }

.readlink {
  font-family: var(--display); font-size: 1.06rem; color: var(--rust-deep);
  border-bottom: 1px solid var(--rule);
}
.readlink:hover { color: var(--ink); border-bottom-color: var(--rust); }

.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
           margin: 0 0 26px; padding-bottom: 20px; border-bottom: 1px solid var(--rule); }
.filt {
  font-family: var(--body); font-size: 12px; letter-spacing: .1em; text-transform: uppercase;
  background: none; border: 1px solid var(--rule); color: var(--ink-soft);
  padding: 6px 13px 5px; cursor: pointer; transition: all .18s ease;
}
.filt:hover { border-color: var(--rust); color: var(--rust-deep); }
.filt.on { background: var(--sage-deep); border-color: var(--sage-deep); color: var(--paper); }
#q {
  font-family: var(--body); font-size: 14px; padding: 6px 12px 5px; margin-left: auto;
  background: var(--surface); border: 1px solid var(--rule); color: var(--ink);
  min-width: 210px;
}
#q:focus { outline: none; border-color: var(--rust); }

/* ── the modern sheet ─────────────────────────────────────────────────
   Deliberately unlike the historical map: no grain, no vignette, no
   antique furniture. A working administrative sheet. */

body.modern { background: #F4F2EA; }
body.modern::before, body.modern::after { display: none; }
body.modern .atlas { grid-template-rows: auto minmax(0,1fr); }
body.modern .atlas-head { background: #EFEDE3; border-bottom: 1px solid var(--rule); align-items: center; }
body.modern .canvas-wrap { background: #F4F2EA; }
#mmap { width: 100%; height: 100%; background: #EDEBE1; }
body.modern .panel { background: #FAF9F3; }
body.modern .legend { background: rgba(250,249,243,.94); }

.msearch { position: relative; flex: 1; max-width: 380px; margin: 0 auto; }
.msearch input {
  width: 100%; font-family: var(--body); font-size: 15px; padding: 8px 14px 7px;
  background: #FAF9F3; border: 1px solid var(--rule); color: var(--ink);
}
.msearch input:focus { outline: none; border-color: var(--rust); }
#mresults {
  display: none; position: absolute; top: 100%; left: 0; right: 0; z-index: 20;
  background: #FAF9F3; border: 1px solid var(--rule); border-top: 0; max-height: 320px;
  overflow-y: auto;
}
.mres {
  padding: 9px 14px; cursor: pointer; font-size: .95rem;
  border-bottom: 1px solid var(--rule-fine); display: flex;
  justify-content: space-between; gap: 12px; align-items: baseline;
}
.mres:hover { background: var(--paper-warm); color: var(--rust-deep); }
.mres span { font-size: .76rem; color: var(--ink-soft); letter-spacing: .08em;
             text-transform: uppercase; white-space: nowrap; }
.mres.none { cursor: default; display: block; font-style: italic; color: var(--ink-soft); }
.mres.none:hover { background: none; color: var(--ink-soft); }
#M-place .mplace circle:nth-child(2) { transition: r .15s ease; }
#M-place .mplace:hover circle:nth-child(2) { r: 6; }

/* Leaflet, dressed to match the rest of the site */
.leaflet-container { font-family: var(--body); background: #EDEBE1; }
.leaflet-control-zoom a {
  background: var(--paper); color: var(--ink); border-color: var(--rule) !important;
  font-family: var(--display); font-weight: 400;
}
.leaflet-control-zoom a:hover { background: var(--paper-warm); color: var(--rust-deep); }
.leaflet-control-attribution {
  background: rgba(250,249,243,.88) !important; font-size: 10.5px;
  color: var(--ink-soft); font-family: var(--body);
}
.leaflet-control-attribution a { color: var(--ink-soft); border: 0; }
.leaflet-tooltip.ptip, .leaflet-tooltip.dtip {
  background: var(--paper); border: 1px solid var(--rule); color: var(--ink);
  font-family: var(--body); font-size: 13px; box-shadow: none; border-radius: 0;
  padding: 3px 9px 2px;
}
.leaflet-tooltip.dtip {
  font-family: var(--display); font-size: 15px; letter-spacing: .06em;
  background: rgba(242,231,206,.9);
}
.leaflet-tooltip.ptip::before, .leaflet-tooltip.dtip::before { display: none; }
.leaflet-tile { filter: saturate(.72) contrast(.94) sepia(.16); }

/* ── related pages, at the foot of every account ─────────────────────── */
.related{margin:40px 0 0;padding:22px 26px;border:1px solid var(--rule);
  background:rgba(124,139,114,.07)}
.related h3{margin:0 0 12px;font-family:"IM Fell English",Georgia,serif;
  font-size:1.02rem;font-weight:400;letter-spacing:.04em;text-transform:uppercase;
  color:var(--sage-deep)}
.related ul{margin:0;padding:0;list-style:none;
  column-count:2;column-gap:34px}
.related li{margin:0 0 9px;break-inside:avoid;font-size:.97rem;line-height:1.45}
.related li a{color:var(--ink);text-decoration:none;
  border-bottom:1px solid rgba(182,95,69,.4)}
.related li a:hover{border-bottom-color:var(--rust)}
.related .rv{display:block;font-size:.8rem;color:var(--ink-soft);font-style:italic}
@media (max-width:640px){.related ul{column-count:1}}
.chapline{margin:20px 0 0;font-size:.92rem;color:var(--ink-soft);font-style:italic}
.chapline a{color:var(--rust)}

/* --- source links ------------------------------------------------------- */
.sourcebox a.srclink{display:inline-block;margin-left:.35em;font-size:.86em;
  color:var(--rust);text-decoration:none;border-bottom:1px solid rgba(182,95,69,.4)}
.sourcebox a.srclink:hover{border-bottom-color:var(--rust);background:rgba(182,95,69,.07)}
.sourcebox .srcnone{margin-left:.35em;font-size:.82em;font-style:italic;
  color:#8a8375;letter-spacing:.02em}
.sourcebox .oknote{margin:14px 0 0;padding:10px 12px;font-size:.88rem;line-height:1.5;
  color:var(--sage-deep);background:rgba(124,139,114,.11);border-left:3px solid var(--sage)}

/* --- where to check this ------------------------------------------------ */
.sourcebox .srchead{font-size:.86rem;margin:14px 0 6px;color:var(--ink-soft);
  font-style:italic;line-height:1.5}
.sourcebox ul.srcnamed{margin:0 0 4px;padding-left:1.15rem;list-style:disc}
.sourcebox ul.srcnamed li{color:var(--ink-soft);margin:.2rem 0}
.sourcebox ol.srclinked{margin:0 0 4px;padding-left:1.3rem}
.sourcebox p.prov{font-size:.86rem;margin:14px 0 0;color:var(--ink-soft);
  font-style:italic;line-height:1.55;border-top:1px solid var(--rule);padding-top:10px}
.sourcebox p.checknote{font-size:.86rem;margin:12px 0 0;color:var(--ink-soft)}

/* --- the record readings: epigraph, object, open question ---------------- */
.epigraph{margin:0 0 30px;padding:18px 22px;border-left:3px solid var(--sage);
  background:rgba(124,139,114,.07)}
.epigraph .gur{font-family:"Noto Serif Gurmukhi",serif;font-size:1.22rem;
  line-height:1.95;color:var(--sage-deep);margin:0 0 10px}
.epigraph .translit{font-style:italic;font-size:.92rem;color:var(--ink-soft);
  margin:0 0 8px;letter-spacing:.01em}
.epigraph blockquote{margin:0;font-size:1.04rem;line-height:1.6;color:var(--ink)}
.epigraph figcaption{margin-top:9px;font-size:.78rem;letter-spacing:.12em;
  text-transform:uppercase;color:var(--ink-soft)}

.artifact{margin:34px 0 0;padding:16px 20px;border:1px solid var(--rule);
  background:rgba(0,0,0,.015)}
.artifact h3{margin:0 0 10px;font-size:.78rem;letter-spacing:.16em;
  text-transform:uppercase;color:var(--ink-soft);font-weight:600}
.artifact .art-t{margin:0 0 6px;font-size:1.02rem;line-height:1.45}
.artifact .art-k{margin:0 0 4px;font-size:.86rem;color:var(--ink-soft);font-style:italic}
.artifact .art-h{margin:0 0 8px;font-size:.86rem;color:var(--ink-soft);line-height:1.5}
.artifact .art-u{margin:0}
.artifact .art-u a{font-size:.9rem}

.leftopen{margin:26px 0 0;padding-top:16px;border-top:1px solid var(--rule);
  font-style:italic;font-size:1.06rem;line-height:1.6;color:var(--rust)}

@media (max-width:640px){
  .epigraph{padding:14px 16px}
  .epigraph .gur{font-size:1.08rem}
  .artifact{padding:13px 15px}
}

/* --- the world sheet ----------------------------------------------------- */
#world{width:100%;height:100%;display:block;touch-action:none;cursor:grab;
  background:#EFE6D2}
.sheet.atlas .canvas-wrap:has(#world){background:#EFE6D2}
#world:active{cursor:grabbing}
#world .wplace{transition:r .12s ease}
#world .wplace:hover{stroke:#3B322A;stroke-width:2}
#world .wplace.on{stroke:#3B322A;stroke-width:2.6}
#world .wlabel{pointer-events:none;paint-order:stroke;stroke:#EFE6D2;
  stroke-width:3px;stroke-linejoin:round;font-family:"EB Garamond",serif}
ul.wlegend{list-style:none;margin:16px 0 0;padding:0;font-size:.88rem}
ul.wlegend li{display:flex;align-items:center;gap:9px;margin:.36rem 0;
  color:var(--ink-soft)}
ul.wlegend .sw{width:13px;height:13px;border-radius:50%;flex:0 0 auto;
  border:1px solid rgba(0,0,0,.18)}
ul.wlegend .sw.dash{border-radius:0;height:0;border:0;border-top:2px dashed #B65F45;
  width:16px}
ul.wlegend .n{margin-left:auto;font-variant-numeric:tabular-nums;
  font-size:.82rem;opacity:.75}
.atlas-head .sheetswap{display:block;margin-top:4px;font-size:11px;
  letter-spacing:.14em;text-transform:uppercase;color:var(--ink-soft);border:0}
.atlas-head .sheetswap:hover{color:var(--rust)}

/* ---- utility classes, October 2026 ------------------------------------
 * These replace inline style= attributes so the site can run under a
 * Content-Security-Policy with no 'unsafe-inline'. Values are copied
 * verbatim from the attributes they replace: nothing here changes how
 * any page looks. If you add a new one, add it here, never inline. */
.pagenav        { margin-top:38px; font-size:.9rem }
.cta            { font-size:.94rem }
.cta-last       { font-size:.94rem; margin-bottom:0 }
.gur-head       { font-size:1.3rem;  color:var(--sage-deep); margin:-4px 0 26px }
.gur-head-v     { font-size:1.35rem; color:var(--sage-deep); margin:-4px 0 26px }
.gur-inline     { font-size:.9rem; color:var(--sage-deep) }
.district-deck  { margin:-6px 0 22px; font-size:1rem }
.plainlink      { border:0; color:var(--ink-soft) }
.noborder       { border:0 }
.emptymsg       { display:none; color:var(--ink-soft); font-style:italic; padding:24px 0 }
.is-hidden      { display:none }
.morewrap       { display:none; padding:22px 0 }
.centerrow      { text-align:center; margin:26px 0 0 }
.ornament-gap   { margin:52px 0 22px }
.srcnote        { margin:0 0 12px }
.frontnav       { display:flex; gap:26px; justify-content:center; flex-wrap:wrap;
                  font-size:13px; letter-spacing:.16em; text-transform:uppercase }
.gurnote        { margin:9px 0 0; font-style:italic; font-size:.76rem;
                  line-height:1.45; color:#6A5B49 }
.sw-paper       { background:#FFFDF7; border-color:#8C9885 }
.sw-red         { background:#8E4630 }
.sw-sage        { background:#7C8B72; opacity:.4 }
.redirectbody   { font-family:Georgia,serif; padding:40px }

/* Panels and legends built by the map scripts. These were inline style
 * attributes inside innerHTML strings, which a CSP without 'unsafe-inline'
 * blocks. Values are the originals. */
.mt14 { margin-top:14px }
.mt18 { margin-top:18px }
.mt20 { margin-top:20px }
.mt22 { margin-top:22px }
.mt26 { margin-top:26px }
.ls-wide  { letter-spacing:.14em }
.note86   { font-size:.86rem }
.gur-plain{ text-transform:none; letter-spacing:0 }
/* the world sheet's four kinds of place */
ul.wlegend .sw-k-settled { background:#7C8B72 }
ul.wlegend .sw-k-refusal { background:#B65F45 }
ul.wlegend .sw-k-sent    { background:#3B322A }
ul.wlegend .sw-k-record  { background:#A0813E }

/* ── the front page's three ways in ───────────────────────────────────── */
.entrances {
  display: flex;
  gap: 18px;
  justify-content: center;
  flex-wrap: wrap;
  margin: 50px 0 0;
}
.entrances .enter {
  margin: 0;
  flex: 1 1 210px;
  max-width: 260px;
  padding: 22px 26px 19px;
  font-size: 1.32rem;
  text-align: center;
}
/* the map stays the loudest of the three */
.entrances .enter:first-child {
  background: var(--rust-deep);
}
.entrances .enter:nth-child(2),
.entrances .enter:nth-child(3) {
  background: var(--sage-deep);
  border-color: var(--sage-deep);
  box-shadow: 0 0 0 3px var(--paper), 0 0 0 4px var(--sage-deep);
}
.entrances .enter:nth-child(2):hover,
.entrances .enter:nth-child(3):hover {
  background: var(--ink);
  border-color: var(--ink);
  box-shadow: 0 0 0 3px var(--paper), 0 0 0 4px var(--ink);
}
@media (max-width: 560px) {
  .entrances { gap: 14px }
  .entrances .enter { flex: 1 1 100%; max-width: none; font-size: 1.22rem }
}

/* the two one-line turns in the opening, set apart from the narrative */
.frontis p.aside {
  text-align: center;
  font-family: var(--display);
  font-size: 1.28rem;
  color: var(--rust-deep);
  margin: 30px 0 30px;
}
.frontis p.closing {
  font-family: var(--display);
  font-size: 1.2rem;
  line-height: 1.55;
  color: var(--ink);
  margin: 34px 0 0;
  padding-top: 26px;
  border-top: 1px solid var(--rule);
}

/* ── the two of us, at the foot of the About page ──────────────────────── */

.founders { display: flex; flex-wrap: wrap; gap: 20px; margin: 0 0 20px; }
.founder {
  flex: 1 1 240px; max-width: 320px;
  background: var(--paper-warm); border: 1px solid var(--rule);
  padding: 16px 18px 18px;
}
.founder .fname {
  font-family: var(--display); font-size: 1.28rem; line-height: 1.14;
  color: var(--ink); margin: 0;
}
.founder .frole {
  font-family: var(--body); font-size: 10.5px; letter-spacing: .14em;
  text-transform: uppercase; color: var(--sage-deep); margin: 5px 0 9px;
}
.founder .fnote {
  font-size: .92rem; color: var(--ink-soft); line-height: 1.55; margin: 0;
  max-width: none;
}
@media (max-width: 560px) {
  .founder { flex: 1 1 100%; max-width: none; }
}
