:root {
  --paper: #F6F0E4;
  --paper-2: #FBF7EE;
  --paper-3: #ECE3CE;
  --ink: #26211A;
  --ink-2: #574E40;
  --ink-3: #746B59;
  --line: #D9CDB4;
  --line-2: #C3B494;
  --accent: #4E6B44;
  --accent-deep: #38492F;
  --accent-soft: #E2E8DA;
  --ember: #8A5C22;
  --ember-soft: #EFE0C0;
  --sepia: #7E673E;
  --sepia-light: #E7DAC0;
  --warn: #8A5A2B;
  --ok: #4E6B44;
  --prob: #52657A;
  --rep: #7F6438;
  --unv: #746B59;
  --map-land: #EDE5D2;
  --map-water: #C9D6D0;
  --map-border: #B9A97F;
  --map-label: #6B6250;
  --serif: 'Spectral', Georgia, 'Times New Roman', serif;
  --sans: 'Inter', -apple-system, 'Segoe UI', Roboto, sans-serif;
  --mono: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  --shadow: 0 1px 2px rgba(38, 33, 26, .06), 0 8px 24px rgba(38, 33, 26, .06);
}

[data-theme="dark"] {
  --paper: #191D1F;
  --paper-2: #22282B;
  --paper-3: #121517;
  --ink: #EAE3D2;
  --ink-2: #B3A98E;
  --ink-3: #A29A8A;
  --line: #3A4346;
  --line-2: #4A5346;
  --accent: #7C9A66;
  --accent-deep: #93B47C;
  --accent-soft: #2A3326;
  --ember: #C89B5A;
  --ember-soft: #33291A;
  --sepia: #C9A976;
  --sepia-light: #2E2A1F;
  --warn: #C08A4F;
  --ok: #7C9A66;
  --prob: #8FA3B2;
  --rep: #C9A976;
  --unv: #A29A8A;
  --map-land: #23282B;
  --map-water: #2A3438;
  --map-border: #4A443A;
  --map-label: #8FA09A;
  --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 8px 24px rgba(0, 0, 0, .35);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  font-family: var(--serif);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background-color .4s ease, color .4s ease;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 999;
  pointer-events: none;
  opacity: .035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
}

[data-theme="dark"] body::after {
  opacity: .05;
}

::selection {
  background: var(--ember-soft);
  color: var(--ink);
}

a {
  color: var(--accent);
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}

a:hover {
  color: var(--accent-deep);
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

img, svg {
  display: block;
  max-width: 100%;
}

input, button {
  font-family: inherit;
  color: inherit;
}

.wrap {
  max-width: 1200px;
  margin-inline: auto;
  padding-inline: clamp(20px, 4vw, 48px);
}

.wrap-narrow {
  max-width: 820px;
}

.banner {
  background: var(--ink);
  color: var(--paper);
  font-family: var(--sans);
  font-size: 12.5px;
  line-height: 1.5;
  text-align: center;
  padding: 10px 24px;
}

.banner a {
  color: var(--ember);
}

.banner a:hover {
  color: var(--sepia);
}

.site-header {
  border-bottom: 1px solid var(--line);
  background: var(--paper);
}

.site-header .inner {
  display: flex;
  align-items: center;
  gap: 32px;
  padding-block: 18px;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  color: var(--ink);
}

.brand:hover {
  color: var(--ink);
}

.brand .stamp {
  width: 46px;
  height: 46px;
  color: var(--sepia);
  flex-shrink: 0;
}

.brand .name {
  font-family: var(--serif);
  font-size: 21px;
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: .01em;
}

.brand .sub {
  font-family: var(--sans);
  font-size: 10.5px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-top: 3px;
}

.site-nav {
  display: flex;
  gap: 24px;
  margin-left: auto;
}

.site-nav a {
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-2);
  text-decoration: none;
}

.site-nav a:hover {
  color: var(--accent);
}

.site-tools {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.lang-switch {
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 600;
  display: flex;
  gap: 8px;
}

.lang-btn {
  appearance: none;
  border: 0;
  background: transparent;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-3);
  cursor: pointer;
  padding: 2px;
}

.lang-btn[aria-current="true"] {
  color: var(--ink);
  border-bottom: 2px solid var(--ember);
}

.lang-btn:hover {
  color: var(--accent);
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 8px;
  z-index: 1000;
  background: var(--ink);
  color: var(--paper-2);
  font-family: var(--sans);
  font-size: 13px;
  padding: 10px 18px;
  border-radius: 2px;
  text-decoration: none;
}

.skip-link:focus {
  left: 8px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.mode-switch {
  display: inline-flex;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  padding: 3px;
  gap: 2px;
  background: var(--paper-3);
}

.mode-btn {
  appearance: none;
  border: 0;
  background: transparent;
  font-family: var(--sans);
  font-size: 12.5px;
  font-weight: 500;
  padding: 7px 14px;
  border-radius: 999px;
  cursor: pointer;
  color: var(--ink-2);
  white-space: nowrap;
}

.mode-btn[aria-pressed="true"] {
  background: var(--paper-2);
  color: var(--ink);
  box-shadow: 0 1px 4px rgba(38, 33, 26, .18);
}

.theme-btn {
  appearance: none;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: transparent;
  font-family: var(--sans);
  font-size: 12.5px;
  padding: 7px 14px;
  cursor: pointer;
  color: var(--ink-2);
}

.theme-btn:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.hero {
  padding-top: clamp(56px, 9vw, 104px);
  position: relative;
  overflow: hidden;
}

.overline {
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: .26em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 28px;
}

.hero-title {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(46px, 9vw, 104px);
  line-height: 1.04;
  letter-spacing: .005em;
  max-width: 14ch;
}

.hero-title em {
  font-style: italic;
  color: var(--ember);
}

.hero-lede {
  font-family: var(--serif);
  font-size: clamp(17px, 2vw, 20px);
  line-height: 1.7;
  color: var(--ink-2);
  max-width: 52ch;
  margin-top: 32px;
}

.hero-search {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 20px;
  max-width: 780px;
  margin-top: 44px;
}

.search-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.search-field label {
  font-family: var(--sans);
  font-size: 11.5px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.search-field input {
  font-family: var(--serif);
  font-size: 20px;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line-2);
  padding: 10px 2px;
  color: var(--ink);
  width: 100%;
}

.search-field input:focus {
  outline: none;
  border-bottom-color: var(--accent);
  border-bottom-width: 2px;
  padding-bottom: 9px;
}

.search-field input::placeholder {
  color: var(--ink-3);
  font-style: italic;
}

.counter {
  margin-top: clamp(48px, 7vw, 84px);
  padding-top: 40px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: baseline;
  gap: 20px;
  flex-wrap: wrap;
}

.counter .word {
  font-family: var(--sans);
  font-size: 13px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.counter .num {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(56px, 8vw, 108px);
  line-height: 1;
  color: var(--ember);
  font-variant-numeric: lining-nums;
}

.counter .note {
  font-family: var(--serif);
  font-size: 17px;
  color: var(--ink-2);
  max-width: 34ch;
}

.counter .how {
  display: block;
  font-family: var(--sans);
  font-size: 13px;
  color: var(--accent);
  margin-top: 8px;
  text-decoration: none;
}

.counter .how:hover {
  text-decoration: underline;
}

.landscape {
  width: 100%;
  height: auto;
  display: block;
  margin-top: clamp(32px, 5vw, 64px);
}

.mist-a {
  animation: drift-a 90s linear infinite alternate;
}

.mist-b {
  animation: drift-b 70s linear infinite alternate;
}

@keyframes drift-a {
  from { transform: translateX(0); }
  to { transform: translateX(60px); }
}

@keyframes drift-b {
  from { transform: translateX(0); }
  to { transform: translateX(-50px); }
}

.section {
  padding-block: clamp(56px, 9vw, 116px);
}

.section-head {
  max-width: 680px;
  margin-bottom: clamp(32px, 5vw, 56px);
}

.section-title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.15;
}

.section-lede {
  font-size: 16.5px;
  color: var(--ink-2);
  margin-top: 16px;
}

.divider {
  border-top: 1px solid var(--line);
  position: relative;
  margin-block: 8px;
}

.divider .stamp {
  position: absolute;
  left: 50%;
  top: 0;
  transform: translate(-50%, -50%);
  width: 56px;
  height: 56px;
  color: var(--sepia);
  background: var(--paper);
  border-radius: 50%;
}

.map-card {
  background: var(--paper-2);
  border: 1px solid var(--line);
  padding: clamp(16px, 3vw, 32px);
  box-shadow: var(--shadow);
}

.map-svg {
  width: 100%;
  height: auto;
}

.map-svg .dot {
  transition: r .2s ease;
}

.map-svg .dot:hover {
  r: 6;
}

.map-svg .region-label {
  font-family: var(--sans);
  font-size: 13px;
  letter-spacing: .14em;
  text-transform: uppercase;
  fill: var(--map-label);
  font-weight: 600;
}

.map-svg .city-label {
  font-family: var(--sans);
  font-size: 11.5px;
  fill: var(--map-label);
}

.map-legend {
  display: flex;
  gap: 28px;
  flex-wrap: wrap;
  margin-top: 20px;
  font-family: var(--sans);
  font-size: 13px;
  color: var(--ink-2);
}

.map-legend span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.map-legend i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}

.map-actions {
  margin-top: 24px;
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

.btn {
  display: inline-block;
  font-family: var(--sans);
  font-size: 14.5px;
  font-weight: 600;
  text-decoration: none;
  padding: 13px 26px;
  border-radius: 2px;
  border: 1px solid var(--accent-deep);
  background: var(--accent-deep);
  color: var(--paper-2);
  cursor: pointer;
  transition: background-color .2s ease, border-color .2s ease;
}

.btn:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--paper-2);
}

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line-2);
}

.btn-ghost:hover {
  background: var(--paper-3);
  border-color: var(--ink-3);
  color: var(--ink);
}

.marquee {
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  padding-block: 14px;
}

.marquee-track {
  display: flex;
  width: max-content;
  animation: marquee 70s linear infinite;
}

.marquee[data-dir="reverse"] .marquee-track {
  animation-direction: reverse;
  animation-duration: 85s;
}

.marquee:hover .marquee-track,
.marquee:focus-within .marquee-track {
  animation-play-state: paused;
}

.marquee-group {
  display: flex;
  align-items: baseline;
  gap: 56px;
  padding-right: 56px;
  flex-shrink: 0;
}

@keyframes marquee {
  to { transform: translateX(-50%); }
}

.name-item {
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 500;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
}

.name-item:hover {
  color: var(--ember);
}

.name-item .age {
  font-family: var(--sans);
  font-size: 12.5px;
  font-weight: 400;
  color: var(--ink-3);
}

.name-item .sep {
  color: var(--sepia);
  font-weight: 300;
}

.name-badge {
  font-size: 13px;
}

.counter-note-s {
  font-family: var(--sans);
  font-size: 12.5px;
  color: var(--ink-3);
}

.principles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.principle {
  border-left: 3px solid var(--ember);
  padding-left: 22px;
}

.principle h3 {
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 500;
  margin-bottom: 10px;
}

.principle p {
  font-size: 15px;
  color: var(--ink-2);
  line-height: 1.65;
}

.waves {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
}

.wave-more {
  display: inline-block;
  margin-top: 22px;
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
}

.wave-more:hover {
  text-decoration: underline;
}

.waves-total {
  text-align: center;
  margin-top: 44px;
  font-family: var(--serif);
  font-size: clamp(20px, 2.6vw, 28px);
  line-height: 1.4;
  max-width: 46ch;
  margin-inline: auto;
}

.waves-total strong {
  font-weight: 500;
  color: var(--ember);
}

.archive-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.archive-card {
  border: 1px solid var(--line);
  background: var(--paper-2);
  padding: 22px;
  text-decoration: none;
  color: var(--ink);
  display: block;
  transition: transform .25s ease, box-shadow .25s ease;
}

.archive-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
  color: var(--ink);
}

.archive-card h3 {
  font-family: var(--serif);
  font-size: 19px;
  font-weight: 500;
  margin-bottom: 8px;
}

.archive-card p {
  font-size: 14px;
  color: var(--ink-2);
  line-height: 1.6;
}

.archive-card .arr {
  display: block;
  margin-top: 14px;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
}

.mem-card {
  border: 1px solid var(--line);
  background: var(--paper-2);
  display: flex;
  flex-direction: column;
  gap: 14px;
  text-decoration: none;
  color: var(--ink);
  transition: transform .25s ease, box-shadow .25s ease;
}

.mem-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
  color: var(--ink);
}

.mem-art {
  aspect-ratio: 4 / 3;
  background: var(--sepia-light);
  border-bottom: 1px solid var(--line);
  display: grid;
  place-items: center;
  color: var(--sepia);
  padding: 18px;
}

.mem-art svg {
  width: 100%;
  height: 100%;
  max-width: 240px;
}

.mem-body {
  padding: 0 18px 18px;
}

.mem-body h3 {
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 500;
  line-height: 1.3;
  margin-bottom: 6px;
}

.mem-body .meta {
  font-family: var(--sans);
  font-size: 12.5px;
  color: var(--ink-3);
  line-height: 1.7;
}

.mem-body .cap {
  display: block;
  margin-top: 10px;
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--ink-3);
  letter-spacing: .06em;
}

.wave {
  border: 1px solid var(--line);
  background: var(--paper-2);
  padding: clamp(24px, 3.5vw, 44px);
}

.wave-year {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(36px, 4.5vw, 54px);
  line-height: 1;
}

.wave-dir {
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--ember);
  margin-block: 18px;
  font-weight: 600;
}

.wave p {
  font-size: 16px;
  color: var(--ink-2);
  max-width: 46ch;
}

.testimony {
  text-align: center;
  max-width: 860px;
  margin-inline: auto;
}

.testimony .tmark {
  font-family: var(--serif);
  font-size: 120px;
  line-height: .4;
  color: var(--ember);
  opacity: .5;
  display: block;
  margin-bottom: 40px;
}

.testimony blockquote {
  font-family: var(--serif);
  font-weight: 300;
  font-style: italic;
  font-size: clamp(23px, 3.4vw, 36px);
  line-height: 1.4;
  border: 0;
}

.testimony cite {
  display: block;
  font-family: var(--sans);
  font-style: normal;
  font-size: 13.5px;
  color: var(--ink-3);
  margin-top: 32px;
  letter-spacing: .04em;
}

.testimony .fict {
  font-family: var(--sans);
  font-size: 12px;
  color: var(--warn);
  margin-top: 14px;
}

.stories {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.story-card {
  border: 1px solid var(--line);
  background: var(--paper-2);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  text-decoration: none;
  color: var(--ink);
  transition: transform .25s ease, box-shadow .25s ease;
}

.story-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
  color: var(--ink);
}

.portrait {
  aspect-ratio: 4 / 5;
  background: var(--sepia-light);
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  color: var(--ink-2);
  position: relative;
}

.portrait .initials {
  font-family: var(--serif);
  font-size: clamp(40px, 5vw, 64px);
  font-weight: 300;
}

.portrait .tag {
  position: absolute;
  bottom: 10px;
  right: 12px;
  font-family: var(--mono);
  font-size: 10px;
  color: var(--ink-3);
  letter-spacing: .08em;
}

.story-name {
  font-family: var(--serif);
  font-size: 23px;
  font-weight: 500;
  line-height: 1.2;
}

.story-meta {
  font-family: var(--sans);
  font-size: 12.5px;
  color: var(--ink-3);
}

.story-line {
  font-size: 15.5px;
  color: var(--ink-2);
  line-height: 1.6;
}

.story-more {
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  margin-top: auto;
}

.cta {
  background: var(--accent-deep);
  color: var(--paper-2);
  padding-block: clamp(56px, 8vw, 96px);
}

.cta .section-title {
  color: var(--paper-2);
}

.cta .section-lede {
  color: rgba(251, 247, 238, .75);
}

.cta .btn {
  background: var(--paper-2);
  color: var(--accent-deep);
  border-color: var(--paper-2);
}

.cta .btn:hover {
  background: var(--ember-soft);
  color: var(--ink);
  border-color: var(--ember-soft);
}

.site-footer {
  border-top: 1px solid var(--line);
  padding-block: 56px 40px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 40px;
}

.footer-brand {
  display: flex;
  gap: 18px;
  align-items: flex-start;
}

.footer-brand .stamp {
  width: 64px;
  height: 64px;
  color: var(--sepia);
  flex-shrink: 0;
}

.footer-brand p {
  font-size: 14px;
  color: var(--ink-2);
  max-width: 40ch;
}

.footer-col h4,
.footer-col h2 {
  font-family: var(--sans);
  font-size: 11.5px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 16px;
  font-weight: 600;
}

.footer-col a {
  display: block;
  font-family: var(--sans);
  font-size: 14px;
  color: var(--ink-2);
  text-decoration: none;
  margin-bottom: 10px;
}

.footer-col a:hover {
  color: var(--accent);
}

.footer-bottom {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  font-family: var(--sans);
  font-size: 12.5px;
  color: var(--ink-3);
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.breadcrumb {
  font-family: var(--sans);
  font-size: 13px;
  color: var(--ink-3);
  padding-block: 28px 8px;
}

.breadcrumb a {
  color: var(--ink-3);
  text-decoration: none;
}

.breadcrumb a:hover {
  color: var(--accent);
}

.village-head {
  padding-bottom: clamp(40px, 6vw, 72px);
  border-bottom: 1px solid var(--line);
}

.village-title {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(38px, 6.5vw, 72px);
  line-height: 1.06;
}

.village-polish {
  font-family: var(--serif);
  font-style: italic;
  font-size: 21px;
  color: var(--ink-2);
  margin-top: 8px;
}

.village-variants {
  font-family: var(--sans);
  font-size: 13px;
  color: var(--ink-3);
  margin-top: 14px;
  line-height: 1.8;
}

.village-variants .v {
  display: inline-block;
  margin-right: 18px;
}

.fate-badge {
  display: inline-block;
  font-family: var(--sans);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ember);
  border: 1px solid var(--ember);
  border-radius: 999px;
  padding: 7px 16px;
  margin-top: 24px;
}

.microstory {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: clamp(24px, 4vw, 48px);
  align-items: start;
}

.microstory .portrait {
  aspect-ratio: 4 / 5;
}

.microstory-text .kicker {
  font-family: var(--sans);
  font-size: 11.5px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 14px;
}

.microstory-text p {
  font-size: 17.5px;
  line-height: 1.7;
  color: var(--ink-2);
  margin-bottom: 16px;
}

.microstory-text a {
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}

.facts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 64px;
  row-gap: 0;
}

.fact-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 24px;
  border-bottom: 1px solid var(--line);
  padding-block: 15px;
}

.fact-label {
  font-family: var(--sans);
  font-size: 13px;
  color: var(--ink-3);
  white-space: nowrap;
}

.fact-value {
  font-size: 16.5px;
  text-align: right;
}

.fact-chip {
  display: block;
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--ink-3);
  margin-top: 2px;
  text-align: right;
}

.count-sentence {
  font-size: clamp(19px, 2.4vw, 24px);
  line-height: 1.5;
  max-width: 56ch;
}

.count-sentence strong {
  font-weight: 500;
  color: var(--ember);
}

.count-sentence .info {
  font-family: var(--sans);
  font-size: 13px;
  color: var(--accent);
  text-decoration: none;
  margin-left: 6px;
}

.ba-slider {
  position: relative;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--line);
  overflow: hidden;
  background: var(--paper-3);
}

.ba-slider svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.ba-front {
  clip-path: inset(0 calc(100% - var(--pos, 50%)) 0 0);
}

.ba-divider {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--pos, 50%);
  width: 2px;
  background: var(--accent);
  transform: translateX(-1px);
  pointer-events: none;
}

.ba-divider::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--paper-2);
  border: 2px solid var(--accent);
  box-shadow: var(--shadow);
}

.ba-input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: ew-resize;
  margin: 0;
}

.ba-slider:focus-within {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.ba-labels {
  display: flex;
  justify-content: space-between;
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-top: 10px;
}

.ba-caption {
  font-family: var(--sans);
  font-size: 12.5px;
  color: var(--ink-3);
  margin-top: 14px;
}

.river {
  border-left: 2px solid var(--line-2);
  margin-left: 10px;
  padding-left: clamp(24px, 4vw, 48px);
  list-style: none;
}

.river-item {
  position: relative;
  padding-bottom: 44px;
}

.river-item:last-child {
  padding-bottom: 0;
}

.river-dot {
  position: absolute;
  left: calc(-1 * clamp(24px, 4vw, 48px) - 10px);
  top: 7px;
  width: 18px;
  height: 18px;
  transform: translateX(-8px);
  border-radius: 50%;
  background: var(--paper);
  border: 2px solid var(--accent);
}

.river-year {
  font-family: var(--serif);
  font-size: 26px;
  font-weight: 400;
  line-height: 1.2;
}

.river-edtf {
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--sepia);
  margin-left: 10px;
}

.river-tag {
  display: inline-block;
  font-family: var(--sans);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ember);
  border: 1px solid var(--ember);
  border-radius: 999px;
  padding: 3px 10px;
  margin-left: 10px;
  vertical-align: middle;
}

.river-text {
  font-size: 16px;
  color: var(--ink-2);
  margin-top: 8px;
  max-width: 60ch;
}

.names-search {
  font-family: var(--serif);
  font-size: 18px;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line-2);
  padding: 10px 2px;
  color: var(--ink);
  width: 100%;
  max-width: 420px;
  margin-bottom: 8px;
}

.names-search:focus {
  outline: none;
  border-bottom-color: var(--accent);
  border-bottom-width: 2px;
  padding-bottom: 9px;
}

.names-search::placeholder {
  color: var(--ink-3);
  font-style: italic;
}

.names-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 64px;
  list-style: none;
}

.name-row {
  display: flex;
  align-items: baseline;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  padding-block: 16px;
  flex-wrap: wrap;
}

.name-row.is-hidden {
  display: none;
}

.name-link {
  font-family: var(--serif);
  font-size: 19px;
  font-weight: 500;
  color: var(--ink);
  text-decoration: none;
}

.name-link:hover {
  color: var(--ember);
}

.name-row .age {
  font-family: var(--sans);
  font-size: 13px;
  color: var(--ink-3);
}

.name-row .chip {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-3);
  margin-left: auto;
}

.dontknow {
  list-style: none;
}

.dontknow li {
  border-left: 3px solid var(--ember);
  padding: 14px 0 14px 22px;
  margin-bottom: 18px;
  font-size: 16.5px;
  color: var(--ink-2);
  max-width: 62ch;
}

.sources-list {
  list-style: none;
}

.sources-list li {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--ink-2);
  padding-block: 10px;
  border-bottom: 1px solid var(--line);
  line-height: 1.7;
}

.sources-list li .src-type {
  display: inline-block;
  font-family: var(--sans);
  font-size: 10.5px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-right: 12px;
}

.related-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.related-chips a {
  font-family: var(--sans);
  font-size: 14px;
  text-decoration: none;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  padding: 9px 18px;
  color: var(--ink-2);
  background: var(--paper-2);
}

.related-chips a:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.person-head {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: clamp(32px, 5vw, 72px);
  align-items: start;
  padding-bottom: clamp(40px, 6vw, 72px);
  border-bottom: 1px solid var(--line);
}

.person-title {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(44px, 7.5vw, 96px);
  line-height: 1.03;
}

.person-years {
  font-family: var(--serif);
  font-size: 24px;
  color: var(--ember);
  margin-top: 14px;
}

.person-facts {
  margin-top: 36px;
  max-width: 420px;
}

.person-fact {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid var(--line);
  padding-block: 13px;
  font-size: 15.5px;
}

.person-fact .k {
  font-family: var(--sans);
  font-size: 13px;
  color: var(--ink-3);
  white-space: nowrap;
  padding-top: 2px;
}

.person-fact .v {
  text-align: right;
}

.person-fact .v a {
  color: var(--ink);
  text-decoration-color: var(--sepia);
}

.prose {
  font-size: 17px;
  line-height: 1.75;
  color: var(--ink-2);
  max-width: 62ch;
}

.prose p {
  margin-bottom: 20px;
}

.prose p:first-of-type::first-letter {
  font-family: var(--serif);
  font-size: 52px;
  line-height: .8;
  float: left;
  padding-right: 10px;
  padding-top: 6px;
  color: var(--ember);
}

.maybe-note {
  border: 1px dashed var(--sepia);
  background: var(--paper-2);
  padding: 22px 26px;
  font-size: 15px;
  color: var(--ink-2);
  max-width: 62ch;
  margin-top: 28px;
}

.maybe-note strong {
  color: var(--ember);
  font-weight: 500;
}

.research-only,
.mode-research {
  display: none;
}

html[data-mode="research"] .research-only,
html[data-mode="research"] .mode-research {
  display: revert;
}

html[data-mode="research"] .mode-memorial {
  display: none;
}

html[data-mode="research"] .names-grid {
  grid-template-columns: 1fr;
}

.badge {
  font-size: 13px;
}

.badge-ok { color: var(--ok); }
.badge-prob { color: var(--prob); }
.badge-rep { color: var(--rep); }
.badge-unv { color: var(--unv); }

.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .7s ease, transform .7s ease;
}

.reveal.in {
  opacity: 1;
  transform: none;
}

.print-only {
  display: none;
}

@media (max-width: 960px) {
  .site-nav {
    display: none;
  }

  .waves,
  .stories,
  .principles,
  .archive-grid {
    grid-template-columns: 1fr;
  }

  .microstory,
  .person-head {
    grid-template-columns: 1fr;
  }

  .microstory .portrait,
  .person-head .portrait {
    max-width: 300px;
  }

  .facts,
  .names-grid {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }

  .hero-search {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  body {
    transition: none;
  }

  .marquee {
    -webkit-mask-image: none;
    mask-image: none;
    overflow-x: auto;
  }

  .marquee-track {
    animation: none;
    width: auto;
  }

  .mist-a,
  .mist-b {
    animation: none;
  }

  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .story-card {
    transition: none;
  }
}

@media print {
  body {
    background: #fff;
    color: #111;
  }

  body::after {
    display: none;
  }

  .banner,
  .site-header,
  .hero-search,
  .cta,
  .site-footer,
  .mode-switch,
  .theme-btn,
  .breadcrumb,
  .ba-slider,
  .names-search,
  .related-chips {
    display: none !important;
  }

  .print-only {
    display: block;
  }

  .print-title {
    font-family: var(--serif);
    font-size: 30px;
    margin-bottom: 6px;
  }

  .print-sub {
    font-size: 14px;
    color: #444;
    margin-bottom: 28px;
  }

  .print-qr {
    width: 96px;
    height: 96px;
    border: 1px solid #999;
    display: grid;
    place-items: center;
    font-family: var(--sans);
    font-size: 11px;
    color: #666;
    margin-block: 28px;
  }

  .print-foot {
    margin-top: 40px;
    padding-top: 16px;
    border-top: 1px solid #bbb;
    font-family: var(--sans);
    font-size: 11px;
    color: #555;
    display: flex;
    justify-content: space-between;
  }

  .names-grid {
    grid-template-columns: 1fr 1fr;
    column-gap: 40px;
  }

  .name-row {
    border-bottom: 1px solid #ddd;
    padding-block: 9px;
  }

  .section {
    padding-block: 32px;
  }
}

.chip-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-block: 28px 8px;
}

.fchip {
  appearance: none;
  border: 1px solid var(--line-2);
  background: var(--paper-2);
  color: var(--ink-2);
  font-family: var(--sans);
  font-size: 13px;
  padding: 8px 16px;
  border-radius: 999px;
  cursor: pointer;
}

.fchip:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.fchip[aria-pressed="true"] {
  background: var(--accent-deep);
  border-color: var(--accent-deep);
  color: var(--paper-2);
}

.dots-group {
  transition: opacity .35s ease;
}

.dots-group.is-dim {
  opacity: .07;
}

.vtable {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--sans);
  font-size: 14px;
}

.vtable th {
  text-align: left;
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-3);
  font-weight: 600;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line-2);
}

.vtable td {
  padding: 14px;
  border-bottom: 1px solid var(--line);
  vertical-align: baseline;
}

.vtable tr.is-hidden {
  display: none;
}

.vtable .vname {
  font-family: var(--serif);
  font-size: 17.5px;
  font-weight: 500;
}

.vtable .vname a {
  color: var(--ink);
  text-decoration: none;
}

.vtable .vname a:hover {
  color: var(--ember);
}

.vtable .pol {
  display: block;
  color: var(--ink-3);
  font-style: italic;
  font-size: 13px;
  font-family: var(--serif);
  margin-top: 2px;
}

.fate {
  display: inline-block;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid;
  white-space: nowrap;
}

.fate-lost {
  color: var(--warn);
  border-color: var(--warn);
}

.fate-extant {
  color: var(--accent);
  border-color: var(--accent);
}

.fate-depop {
  color: var(--sepia);
  border-color: var(--sepia);
}

.hint {
  font-family: var(--sans);
  font-size: 12.5px;
  color: var(--ink-3);
  margin-top: 6px;
}

.registry-row {
  display: flex;
  align-items: baseline;
  gap: 14px;
  border-bottom: 1px solid var(--line);
  padding-block: 17px;
  flex-wrap: wrap;
}

.registry-row.is-hidden {
  display: none;
}

.registry-row .vill {
  font-family: var(--sans);
  font-size: 13px;
  color: var(--ink-3);
}

.registry-row .vill a {
  color: var(--ink-3);
  text-decoration: none;
}

.registry-row .vill a:hover {
  color: var(--accent);
}

.form-steps {
  display: flex;
  gap: 8px;
  margin-bottom: 32px;
  max-width: 620px;
}

.fstep {
  flex: 1;
  height: 3px;
  background: var(--line);
  border-radius: 2px;
}

.fstep.done {
  background: var(--ember);
}

.step-panel {
  display: none;
}

.step-panel.active {
  display: block;
}

.step-title {
  font-family: var(--serif);
  font-size: 26px;
  font-weight: 500;
  margin-bottom: 8px;
}

.step-lede {
  font-size: 15.5px;
  color: var(--ink-2);
  margin-bottom: 28px;
  max-width: 52ch;
}

.field {
  margin-bottom: 22px;
  max-width: 560px;
}

.field label {
  display: block;
  font-family: var(--sans);
  font-size: 11.5px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 8px;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  font-family: var(--serif);
  font-size: 17px;
  background: var(--paper-2);
  border: 1px solid var(--line-2);
  padding: 12px 14px;
  color: var(--ink);
  border-radius: 2px;
}

.field textarea {
  min-height: 140px;
  line-height: 1.65;
  resize: vertical;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: 2px solid var(--accent);
  outline-offset: 0;
  border-color: var(--accent);
}

.choice-row {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  border: 1px solid var(--line);
  background: var(--paper-2);
  padding: 14px 16px;
  border-radius: 2px;
  margin-bottom: 10px;
  max-width: 560px;
  font-size: 15px;
  cursor: pointer;
}

.choice-row input {
  margin-top: 4px;
  accent-color: var(--accent);
}

.choice-row .ch-meta {
  font-family: var(--sans);
  font-size: 12.5px;
  color: var(--ink-3);
  display: block;
  margin-top: 3px;
}

.form-actions {
  display: flex;
  gap: 14px;
  margin-top: 28px;
  flex-wrap: wrap;
}

.success-box {
  border: 1px solid var(--line-2);
  background: var(--paper-2);
  padding: clamp(28px, 5vw, 48px);
  max-width: 620px;
}

.success-box .stamp {
  width: 56px;
  height: 56px;
  color: var(--ember);
  margin-bottom: 20px;
}

.success-box h2 {
  font-family: var(--serif);
  font-size: 28px;
  font-weight: 500;
  margin-bottom: 12px;
}

.success-box p {
  font-size: 15.5px;
  color: var(--ink-2);
  margin-bottom: 12px;
  max-width: 52ch;
}

.badge-legend {
  list-style: none;
  margin-top: 24px;
  max-width: 560px;
}

.badge-legend li {
  display: flex;
  gap: 14px;
  align-items: baseline;
  border-bottom: 1px solid var(--line);
  padding-block: 13px;
  font-size: 15px;
}

.badge-legend .glyph {
  font-size: 16px;
  width: 24px;
  text-align: center;
  flex-shrink: 0;
}

.badge-legend .bname {
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 600;
  width: 130px;
  flex-shrink: 0;
}

.badge-legend .bdesc {
  color: var(--ink-2);
  font-size: 14px;
}

.notfound {
  padding-block: clamp(80px, 14vw, 180px);
  text-align: center;
}

.notfound .hero-title {
  margin-inline: auto;
}

.notfound .hero-lede {
  margin-inline: auto;
  margin-top: 24px;
}

.notfound .map-actions {
  justify-content: center;
  margin-top: 40px;
}


.candle {
  display: inline-block;
  width: 56px;
  text-align: center;
}

.candle .flame {
  width: 20px;
  height: 26px;
  margin: 0 auto 2px;
  background: radial-gradient(ellipse at 50% 70%, #fffbe8 0%, #ffe9a8 35%, #ffb84d 65%, rgba(255, 140, 26, 0) 100%);
  border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
  filter: drop-shadow(0 0 14px rgba(255, 176, 92, .25));
  transform-origin: 50% 100%;
  animation: candle-flicker 2.6s ease-in-out infinite;
}

.candle .wick {
  width: 2px;
  height: 6px;
  margin: 0 auto;
  background: #4a3728;
}

.candle .body {
  width: 22px;
  height: 40px;
  margin: 0 auto;
  background: linear-gradient(90deg, #f0e6cc 0%, #e0cfa4 40%, #c9b384 100%);
  border-radius: 2px;
  box-shadow: inset 2px 0 3px rgba(74, 55, 40, .25);
}

@keyframes candle-flicker {
  0%, 100% { transform: scale(1) rotate(0deg); }
  25% { transform: scale(1.06) rotate(2deg); }
  50% { transform: scale(0.96) rotate(-1.5deg); }
  75% { transform: scale(1.03) rotate(1deg); }
}

.candle.is-lit .flame {
  animation: none;
  opacity: 0;
  transform: scale(0.6);
}

.memorial-strip {
  text-align: center;
  padding-block: clamp(40px, 7vw, 80px);
}

.memorial-strip .candles {
  display: flex;
  justify-content: center;
  gap: 28px;
  margin-block: 28px;
}

.memorial-strip .epitaph {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 300;
  font-size: clamp(19px, 2.6vw, 26px);
  color: var(--ink-2);
  max-width: 46ch;
  margin-inline: auto;
  line-height: 1.6;
}

.acc-fab {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 900;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid var(--line-2);
  background: var(--paper-2);
  color: var(--ink);
  font-size: 20px;
  cursor: pointer;
  box-shadow: var(--shadow);
}

.acc-panel {
  position: fixed;
  right: 18px;
  bottom: 76px;
  z-index: 901;
  width: 240px;
  background: var(--paper-2);
  border: 1px solid var(--line-2);
  border-radius: 4px;
  box-shadow: var(--shadow);
  padding: 16px;
  font-family: var(--sans);
  font-size: 13px;
}

.acc-panel[hidden] {
  display: none;
}

.acc-panel h4 {
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 12px;
}

.acc-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-block: 6px;
}

.acc-btn {
  border: 1px solid var(--line-2);
  background: transparent;
  color: var(--ink-2);
  border-radius: 2px;
  padding: 3px 9px;
  cursor: pointer;
  font-size: 12px;
}

.acc-btn[aria-pressed="true"] {
  background: var(--accent-deep);
  border-color: var(--accent-deep);
  color: var(--paper-2);
}

body.acc-sepia {
  filter: sepia(0.35);
}

body.acc-contrast {
  filter: contrast(1.25);
}

body.acc-font-lg {
  font-size: 1.1em;
}

body.acc-font-xl {
  font-size: 1.25em;
}


.map-layout {
  display: grid;
  grid-template-columns: 300px 1fr;
  border: 1px solid var(--line);
  border-radius: 2px;
  overflow: hidden;
  min-height: 560px;
}

.map-sidebar {
  background: var(--paper-2);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  max-height: 560px;
  overflow: hidden;
}

.map-sidebar input {
  border: 0;
  border-bottom: 1px solid var(--line);
  padding: 14px 16px;
  font-family: var(--serif);
  font-size: 15.5px;
  background: var(--paper-2);
  color: var(--ink);
}

.map-sidebar input:focus {
  outline: none;
  border-bottom-color: var(--accent);
  border-bottom-width: 2px;
  padding-bottom: 13px;
}

.map-sidebar ul {
  list-style: none;
  overflow-y: auto;
  flex: 1;
}

.map-sidebar li button {
  width: 100%;
  text-align: left;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line);
  padding: 11px 16px;
  cursor: pointer;
  font-family: var(--sans);
  font-size: 13px;
  color: var(--ink);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.map-sidebar li button:hover {
  background: var(--paper-3);
}

.map-sidebar li button strong {
  font-family: var(--serif);
  font-size: 15.5px;
  font-weight: 500;
}

.map-sidebar li button span {
  color: var(--ink-3);
  font-size: 12px;
}

.zk-pin-wrap {
  background: transparent;
  border: 0;
}

.zk-pin {
  display: block;
  width: 18px;
  height: 18px;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  border: 2px solid #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .35);
}

.zk-pin::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 5px;
  height: 5px;
  margin: -2.5px;
  background: #fff;
  border-radius: 50%;
}

.leaflet-cluster-icon {
  background: var(--ember);
  color: #fff;
  border: 2px solid #fff;
  border-radius: 50%;
  font-family: var(--sans);
  font-weight: 600;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .35);
}

@media (max-width: 900px) {
  .map-layout {
    grid-template-columns: 1fr;
  }

  .map-sidebar {
    max-height: 240px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
}
