/* Jewish Ilnytsia (Ilonca) Community Archive — Standalone Archival Stylesheet */
:root {
  --bg: #F6F2E9;
  --surface: #FCF9F3;
  --surface-alt: #EFE9DC;
  --surface-deep: #E5DDCC;
  --ink: #1B2838;
  --ink-soft: #435163;
  --ink-muted: #5C6878;
  --gold: #9A7432;
  --gold-dark: #74551E;
  --gold-soft: #F3EAD7;
  --forest: #1E564B;
  --forest-soft: #E1EFEA;
  --border: #D9CFC0;
  --border-strong: #C2B59F;
  --shadow-sm: 0 1px 3px rgba(27, 40, 56, 0.06);
  --shadow-md: 0 8px 24px rgba(27, 40, 56, 0.08);
  --shadow-lg: 0 18px 42px rgba(27, 40, 56, 0.14);
  --serif: 'Source Serif 4', 'Iowan Old Style', 'Palatino Linotype', Georgia, 'Times New Roman', serif;
  --display: 'Cormorant Garamond', 'Source Serif 4', Georgia, 'Times New Roman', serif;
  --hebrew: 'Frank Ruhl Libre', 'SBL Hebrew', 'Ezra SIL', 'Times New Roman', serif;
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --mono: 'SFMono-Regular', Menlo, Consolas, monospace;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --maxw: 1180px;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
}

a { color: var(--forest); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--gold-dark); }
:focus-visible { outline: 2.5px solid var(--gold); outline-offset: 2px; border-radius: 4px; }

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

.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}

/* Header & Navigation */
.site-header {
  background: var(--ink);
  color: #F6F2E9;
  border-bottom: 3px solid var(--gold);
  position: sticky;
  top: 0;
  z-index: 40;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 68px;
  padding: 10px 0;
  flex-wrap: wrap;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: #F6F2E9;
  min-width: 0;
}
.brand:hover { color: #F6F2E9; }
.brand-crest {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  border: 1.5px solid rgba(212, 179, 117, 0.65);
  background: rgba(154, 116, 50, 0.16);
  display: grid;
  place-items: center;
  font-family: var(--serif);
  font-weight: 700;
  font-size: 19px;
  color: #E5C88E;
  flex-shrink: 0;
}
.brand-text { display: flex; flex-direction: column; min-width: 0; }
.brand-title {
  font-family: var(--serif);
  font-size: 19px;
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1.15;
  white-space: nowrap;
}
.brand-sub {
  font-size: 11.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #C7BEA9;
  line-height: 1.2;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}
.site-nav a {
  color: #E8E1D3;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  padding: 7px 11px;
  border-radius: 7px;
  transition: background 0.15s ease, color 0.15s ease;
  white-space: nowrap;
}
.site-nav a:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #FFF;
}
.site-nav a[aria-current="page"] {
  background: rgba(154, 116, 50, 0.28);
  color: #F8E5BE;
  border: 1px solid rgba(212, 179, 117, 0.45);
}

/* Hero Banner (Homepage) */
.hero {
  background:
    radial-gradient(1000px 420px at 85% -10%, rgba(154, 116, 50, 0.14), transparent 65%),
    radial-gradient(700px 360px at 10% 100%, rgba(30, 86, 75, 0.08), transparent 60%),
    linear-gradient(180deg, #FBF8F1 0%, var(--bg) 100%);
  border-bottom: 1px solid var(--border);
  padding: 56px 0 48px;
}
.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-dark);
  margin-bottom: 14px;
}
.hero-kicker::before {
  content: "";
  width: 24px;
  height: 1.5px;
  background: var(--gold);
  display: inline-block;
}
.hero h1 {
  font-family: var(--serif);
  font-size: clamp(32px, 5vw, 52px);
  line-height: 1.1;
  font-weight: 700;
  letter-spacing: -0.015em;
  margin: 0 0 14px;
  color: var(--ink);
}
.hero-lead {
  font-size: 18px;
  line-height: 1.6;
  color: var(--ink-soft);
  max-width: 720px;
  margin: 0 0 28px;
}

/* Global Search Bar */
.hero-search {
  background: var(--surface);
  border: 1.5px solid var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 8px;
  box-shadow: var(--shadow-md);
  max-width: 740px;
  display: flex;
  gap: 8px;
  align-items: stretch;
}
.hero-search input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  padding: 12px 14px;
  font-size: 16px;
  color: var(--ink);
  font-family: var(--sans);
}
.hero-search input::placeholder { color: #788290; }
.hero-search input:focus { outline: none; }
.hero-search:focus-within {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(154, 116, 50, 0.18), var(--shadow-md);
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 600;
  padding: 11px 20px;
  border-radius: 8px;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.08s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: var(--ink);
  color: #FCF9F3;
}
.btn-primary:hover {
  background: #283A50;
  color: #FFF;
}
.btn-gold {
  background: var(--gold-dark);
  color: #FFF;
}
.btn-gold:hover { background: #5E4315; color: #FFF; }
.btn-outline {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--border-strong);
}
.btn-outline:hover {
  background: var(--surface-alt);
  border-color: var(--gold);
  color: var(--ink);
}
.btn-sm { padding: 7px 12px; font-size: 13.5px; border-radius: 7px; }

.quick-chips {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  font-size: 13px;
  color: var(--ink-muted);
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 11px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.14s ease;
}
.chip:hover {
  border-color: var(--gold);
  background: var(--gold-soft);
  color: var(--ink);
}

/* Stats Strip */
.stats-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-top: 34px;
}
.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-top: 3px solid var(--gold);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  box-shadow: var(--shadow-sm);
}
.stat-num {
  font-family: var(--serif);
  font-size: 32px;
  font-weight: 700;
  line-height: 1.1;
  color: var(--ink);
}
.stat-label {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink-soft);
  margin-top: 4px;
}
.stat-sub {
  font-size: 12.5px;
  color: var(--ink-muted);
  margin-top: 3px;
}

/* Sections */
.section { padding: 48px 0; }
.section-alt {
  background: var(--surface-alt);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.section-kicker {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--gold-dark);
  margin: 0 0 6px;
}
.section-title {
  font-family: var(--serif);
  font-size: clamp(24px, 3vw, 32px);
  line-height: 1.2;
  margin: 0;
  color: var(--ink);
}
.section-desc {
  color: var(--ink-soft);
  margin: 8px 0 0;
  max-width: 680px;
}

/* Stage 1 Feature Cards */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}
.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 26px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow-sm);
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}
.feature-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--gold);
  color: inherit;
}
.feature-badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--forest-soft);
  color: var(--forest);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.feature-card h3 {
  font-family: var(--serif);
  font-size: 23px;
  line-height: 1.2;
  margin: 0;
  color: var(--ink);
}
.feature-card p {
  margin: 0;
  font-size: 15px;
  color: var(--ink-soft);
  flex: 1;
}
.feature-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--gold-dark);
}

/* Historical Context Two-Column Panel */
.context-grid {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 24px;
}
.paper-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px 26px;
  box-shadow: var(--shadow-sm);
}
.paper-box h3 {
  font-family: var(--serif);
  font-size: 21px;
  margin: 0 0 12px;
  color: var(--ink);
}
.paper-box p { margin: 0 0 12px; color: var(--ink-soft); font-size: 15px; }
.paper-box p:last-child { margin-bottom: 0; }
.record-breakdown {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}
.record-breakdown li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding-bottom: 8px;
  border-bottom: 1px dashed var(--border);
  font-size: 14.5px;
}
.record-breakdown li:last-child { border-bottom: 0; padding-bottom: 0; }
.record-breakdown strong { color: var(--ink); font-variant-numeric: tabular-nums; }

/* Upcoming Stages 2 & 3 Roadmap */
.roadmap-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}
.roadmap-col {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
}
.roadmap-tag {
  display: inline-block;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--gold-soft);
  color: var(--gold-dark);
  margin-bottom: 10px;
}
.roadmap-col h3 {
  font-family: var(--serif);
  font-size: 21px;
  margin: 0 0 14px;
}
.roadmap-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
}
.roadmap-list li {
  padding-left: 16px;
  position: relative;
  font-size: 14.5px;
  color: var(--ink-soft);
}
.roadmap-list li::before {
  content: "◆";
  position: absolute;
  left: 0;
  top: 1px;
  font-size: 9px;
  color: var(--gold);
}
.roadmap-list strong { color: var(--ink); }

/* Page Header (Sub-pages) */
.page-banner {
  background: linear-gradient(180deg, #FBF8F1 0%, var(--bg) 100%);
  border-bottom: 1px solid var(--border);
  padding: 30px 0 24px;
}
.page-banner h1 {
  font-family: var(--serif);
  font-size: clamp(26px, 4vw, 38px);
  line-height: 1.15;
  margin: 4px 0 8px;
}
.page-banner p {
  margin: 0;
  color: var(--ink-soft);
  max-width: 780px;
  font-size: 15.5px;
}

/* Search Page Controls & Results */
.filter-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  box-shadow: var(--shadow-sm);
  margin: 22px 0 18px;
}
.search-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.search-input-wrap {
  flex: 1 1 300px;
  position: relative;
}
.search-input-wrap input {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--border-strong);
  border-radius: 8px;
  font-size: 15.5px;
  background: #FFF;
  color: var(--ink);
  font-family: var(--sans);
}
.search-input-wrap input:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(154, 116, 50, 0.16);
}
.filter-selects {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}
.field-group { display: flex; flex-direction: column; gap: 4px; }
.field-group label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-muted);
}
.field-group select {
  padding: 9px 10px;
  border: 1px solid var(--border-strong);
  border-radius: 7px;
  background: #FFF;
  color: var(--ink);
  font-size: 14px;
  font-family: var(--sans);
  width: 100%;
}
.type-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 14px;
}
.type-pill {
  border: 1px solid var(--border-strong);
  background: var(--surface-alt);
  color: var(--ink-soft);
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.14s ease;
}
.type-pill:hover { border-color: var(--gold); color: var(--ink); }
.type-pill.active {
  background: var(--ink);
  border-color: var(--ink);
  color: #FCF9F3;
}
.type-pill .pill-cnt {
  font-size: 12px;
  opacity: 0.8;
  font-variant-numeric: tabular-nums;
}

.results-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin: 14px 0;
  font-size: 14px;
  color: var(--ink-soft);
}
.results-list {
  display: grid;
  gap: 10px;
}
.rec-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 15px 18px;
  display: grid;
  gap: 6px;
  box-shadow: var(--shadow-sm);
}
.rec-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}
.rec-name {
  font-family: var(--serif);
  font-size: 19px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.25;
}
.rec-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}
.badge-g { background: #EFE6D5; color: #6B4D18; }
.badge-b { background: #E1EFEA; color: #195246; }
.badge-d { background: #EFE3E7; color: #753042; }
.badge-m { background: #EAE3F2; color: #543773; }
.badge-c { background: #E1EAF3; color: #224E78; }
.rec-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  font-size: 14px;
  color: var(--ink-soft);
}
.rec-meta span strong { color: var(--ink); font-weight: 600; }
.rec-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  padding-top: 6px;
  border-top: 1px dashed var(--border);
  font-size: 12.5px;
  color: var(--ink-muted);
}
.rec-links { display: flex; gap: 10px; flex-wrap: wrap; }
.rec-links a { font-weight: 600; font-size: 13px; text-decoration: none; }
.rec-links a:hover { text-decoration: underline; }

.pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 24px 0 40px;
  flex-wrap: wrap;
}

/* Cemetery Map Page */
.cem-controls {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px 18px;
  margin: 20px 0 14px;
  display: grid;
  gap: 12px;
  box-shadow: var(--shadow-sm);
}
.cem-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
}
.cem-search {
  flex: 1 1 260px;
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.cem-search input {
  flex: 1;
  min-width: 0;
  padding: 10px 13px;
  border: 1.5px solid var(--border-strong);
  border-radius: 8px;
  font-size: 15px;
  background: #FFF;
  color: var(--ink);
}
.cem-search input:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(154, 116, 50, 0.16);
}
.segmented {
  display: inline-flex;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  overflow: hidden;
  background: var(--surface-alt);
}
.segmented button {
  border: 0;
  background: transparent;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-soft);
  cursor: pointer;
}
.segmented button.active {
  background: var(--ink);
  color: #FCF9F3;
}
.cem-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 10px 0 2px;
  border-top: 1px dashed var(--border);
}
.legend-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
}
.legend-chip.active {
  box-shadow: 0 0 0 2px var(--ink);
}
.legend-swatch {
  width: 13px;
  height: 13px;
  border-radius: 3px;
  border: 1.5px solid currentColor;
  flex-shrink: 0;
}

.cem-workspace {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 18px;
  align-items: start;
  margin-bottom: 44px;
}
.cem-map-shell {
  background: #EFEAD9;
  border: 1.5px solid var(--border-strong);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.cem-map-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 14px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  font-size: 13px;
  color: var(--ink-soft);
  flex-wrap: wrap;
}
.cem-zoom-btns { display: flex; gap: 6px; align-items: center; }
.cem-viewport {
  overflow: auto;
  max-height: 680px;
  padding: 16px;
  background:
    repeating-linear-gradient(0deg, rgba(154,116,50,0.03) 0 1px, transparent 1px 28px),
    #ECE6D6;
}
.cem-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(76px, 1fr));
  gap: 8px;
  transform-origin: top left;
}
.stone-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  min-height: 76px;
  padding: 7px 5px 6px;
  border-radius: 14px 14px 4px 4px;
  border: 1.5px solid var(--stone-border, #8D8474);
  background: var(--stone-fill, #F7F3EA);
  color: var(--ink);
  cursor: pointer;
  text-align: center;
  font-family: var(--sans);
  transition: transform 0.12s ease, box-shadow 0.12s ease, opacity 0.15s ease;
  box-shadow: 0 2px 0 rgba(27,40,56,0.12);
}
.stone-tile:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 12px rgba(27,40,56,0.18);
  z-index: 2;
}
.stone-tile.selected {
  box-shadow: 0 0 0 3px var(--ink), 0 6px 16px rgba(27,40,56,0.25);
  z-index: 3;
}
.stone-tile.dimmed { opacity: 0.22; }
.stone-tile.matched {
  box-shadow: 0 0 0 2.5px var(--gold-dark), 0 4px 12px rgba(154,116,50,0.35);
}
.stone-tile.illegible {
  border-style: dashed;
  background: #E8E2D4;
  border-color: #A69D8B;
  color: #5D646E;
}
.stone-num {
  font-size: 11px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--stone-accent, var(--ink));
  line-height: 1;
}
.stone-name {
  font-size: 11px;
  font-weight: 600;
  line-height: 1.15;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  word-break: break-word;
}
.stone-yr {
  font-size: 10px;
  color: var(--ink-muted);
  font-variant-numeric: tabular-nums;
}
.stone-dot {
  position: absolute;
  top: 4px;
  right: 5px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--forest);
}
.stone-shared-tag {
  position: absolute;
  top: 3px;
  left: 4px;
  font-size: 9px;
  font-weight: 800;
  color: var(--gold-dark);
}

/* Stone Detail Panel */
.stone-detail {
  background: var(--surface);
  border: 1.5px solid var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-md);
  position: sticky;
  top: 84px;
}
.stone-tablet-head {
  background: var(--ink);
  color: #FCF9F3;
  border-radius: 26px 26px 8px 8px;
  padding: 18px 16px 14px;
  text-align: center;
  border-bottom: 3px solid var(--gold);
  margin-bottom: 16px;
}
.stone-tablet-num {
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #E5C88E;
  font-weight: 700;
}
.stone-tablet-name {
  font-family: var(--serif);
  font-size: 24px;
  font-weight: 700;
  margin: 4px 0 2px;
  line-height: 1.2;
}
.stone-tablet-sub { font-size: 13.5px; color: #D7CFC0; }
.stone-dl {
  display: grid;
  gap: 9px;
  margin: 0 0 16px;
  font-size: 14px;
}
.stone-dl div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 7px;
  border-bottom: 1px dashed var(--border);
}
.stone-dl dt { font-weight: 700; color: var(--ink-muted); font-size: 12.5px; text-transform: uppercase; letter-spacing: 0.04em; flex-shrink: 0; }
.stone-dl dd { margin: 0; text-align: right; color: var(--ink); }
.stone-actions { display: grid; gap: 8px; }
.shared-tabs { display: flex; gap: 6px; margin-bottom: 12px; }
.shared-tabs button {
  flex: 1;
  padding: 6px 10px;
  font-size: 13px;
  font-weight: 600;
  border-radius: 6px;
  border: 1px solid var(--border-strong);
  background: var(--surface-alt);
  color: var(--ink);
  cursor: pointer;
}
.shared-tabs button.active {
  background: var(--gold-dark);
  border-color: var(--gold-dark);
  color: #FFF;
}

/* Footer */
.site-footer {
  background: var(--ink);
  color: #D2CBB9;
  border-top: 3px solid var(--gold);
  padding: 32px 0;
  font-size: 14px;
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  flex-wrap: wrap;
}
.footer-title {
  font-family: var(--serif);
  color: #FCF9F3;
  font-size: 18px;
  font-weight: 700;
  margin: 0 0 6px;
}
.footer-note { max-width: 560px; margin: 0; line-height: 1.55; font-size: 13.5px; }
.footer-links { display: flex; gap: 16px; flex-wrap: wrap; }
.footer-links a { color: #E5C88E; text-decoration: none; font-weight: 500; }
.footer-links a:hover { text-decoration: underline; }

/* Responsive Breakpoints (zero horizontal overflow at 390px) */
@media (max-width: 980px) {
  .stats-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .feature-grid { grid-template-columns: 1fr; }
  .context-grid { grid-template-columns: 1fr; }
  .roadmap-grid { grid-template-columns: 1fr; }
  .cem-workspace { grid-template-columns: 1fr; }
  .stone-detail { position: static; }
}

@media (max-width: 640px) {
  .wrap { padding: 0 14px; }
  .header-inner { gap: 8px; padding: 10px 0; }
  .brand-title { font-size: 17px; }
  .site-nav { width: 100%; gap: 4px; }
  .site-nav a { font-size: 13.5px; padding: 6px 10px; }
  .hero { padding: 32px 0 28px; }
  .hero-lead { font-size: 16px; }
  .hero-search { flex-direction: column; padding: 8px; }
  .hero-search .btn { width: 100%; }
  .stats-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .stat-card { padding: 14px; }
  .stat-num { font-size: 26px; }
  .filter-selects { grid-template-columns: 1fr; }
  .cem-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
  .stone-tile { min-height: 68px; padding: 5px 3px; }
  .cem-viewport { max-height: 460px; padding: 10px; }
}

/* === REV10 & SURVEY CEMETERY MAP ADDITIONS === */
/* Additional Search Badges for WWII Roster & Postwar List */
.badge-w { background: #F5E7E7; color: #732626; border-color: #D7B4B4; }
.badge-p { background: #E7EEF2; color: #264B63; border-color: #B7CCD9; }

/* Survey Cemetery Map Stage */
.cem-view-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 10px;
  padding: 10px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}
.cem-view-tabs {
  display: inline-flex;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 3px;
  gap: 3px;
}
.cem-view-tab {
  border: 0;
  background: transparent;
  color: var(--ink-soft);
  font-weight: 600;
  font-size: 13.5px;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  transition: background .15s, color .15s;
}
.cem-view-tab.active {
  background: var(--ink);
  color: #FCF9F3;
}
.cem-map-tools {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.cem-tool-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  font-size: 13px;
  font-weight: 600;
  border-radius: 6px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
}
.cem-tool-btn:hover { background: var(--surface-alt); }
.cem-tool-btn.active {
  background: var(--gold-soft);
  border-color: var(--gold);
  color: var(--gold-dark);
}
.cem-zoom-group {
  display: inline-flex;
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  overflow: hidden;
}
.cem-zoom-group button {
  border: 0;
  border-right: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink);
  font-weight: 700;
  font-size: 14px;
  padding: 5px 10px;
  cursor: pointer;
}
.cem-zoom-group button:last-child { border-right: 0; font-size: 12.5px; font-weight: 600; }
.cem-zoom-group button:hover { background: var(--surface-alt); }

.cem-svg-stage {
  position: relative;
  width: 100%;
  height: 580px;
  background: #FAF6ED;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  touch-action: none;
  cursor: grab;
  user-select: none;
  box-shadow: inset 0 1px 4px rgba(27,40,56,0.05);
}
.cem-svg-stage.dragging { cursor: grabbing; }
.cem-svg-stage svg {
  width: 100%;
  height: 100%;
  display: block;
}
.cem-map-hint {
  position: absolute;
  left: 12px;
  bottom: 10px;
  background: rgba(252, 249, 243, 0.92);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 12px;
  color: var(--ink-muted);
  pointer-events: none;
}
.cem-map-scale {
  position: absolute;
  right: 12px;
  bottom: 10px;
  background: rgba(252, 249, 243, 0.92);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-soft);
  pointer-events: none;
}
.svg-stone {
  cursor: pointer;
  transition: opacity .15s;
}
.svg-stone rect.stone-body {
  stroke-width: 1.25;
  rx: 2;
  ry: 2;
  transition: stroke-width .12s, filter .12s;
}
.svg-stone:hover rect.stone-body {
  stroke: #1B2838 !important;
  stroke-width: 2.3 !important;
  filter: drop-shadow(0 1px 2px rgba(27,40,56,0.3));
}
.svg-stone.selected rect.stone-body {
  stroke: #9A7432 !important;
  stroke-width: 3 !important;
  filter: drop-shadow(0 0 4px rgba(154,116,50,0.65));
}
.svg-stone.match rect.stone-body {
  stroke: #74551E !important;
  stroke-width: 2.5 !important;
}
.svg-stone.dimmed {
  opacity: 0.16;
}
.svg-stone.scan-extra {
  cursor: pointer;
}
.svg-stone text.stone-lbl {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-weight: 700;
  text-anchor: middle;
  dominant-baseline: central;
  pointer-events: none;
  fill: #1B2838;
}
.svg-stone.illegible text.stone-lbl {
  fill: #6B6559;
  font-weight: 600;
}
.cem-tooltip {
  position: absolute;
  z-index: 20;
  pointer-events: none;
  background: rgba(27, 40, 56, 0.95);
  color: #FCF9F3;
  padding: 7px 11px;
  border-radius: 7px;
  font-size: 12.5px;
  line-height: 1.4;
  max-width: 250px;
  box-shadow: var(--shadow-md);
  border: 1px solid rgba(212,179,117,0.4);
}
.cem-tooltip strong { color: #E5C88E; }

.cem-adjacent-strip {
  margin-top: 12px;
  padding: 12px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 13.5px;
}
.cem-adjacent-pills {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.adj-stone-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 11px;
  border-radius: 7px;
  border: 1.5px dashed var(--gold);
  background: var(--gold-soft);
  color: var(--ink);
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
}
.adj-stone-btn:hover, .adj-stone-btn.selected {
  background: var(--gold);
  color: #FFF;
}
.cem-underlay-ctrl {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  color: var(--ink-muted);
}
.cem-underlay-ctrl input[type="range"] {
  width: 68px;
  accent-color: var(--gold);
}

/* WWII Memorial & Community Roster Page */
.memorial-notice {
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-left: 4px solid var(--gold);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  margin: 22px 0 18px;
  font-size: 14.5px;
  color: var(--ink-soft);
  line-height: 1.6;
}
.memorial-notice strong { color: var(--ink); }
.mem-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}
.mem-stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  box-shadow: var(--shadow-sm);
}
.mem-stat-card.perished { border-top: 3px solid #7E2D2D; }
.mem-stat-card.survived { border-top: 3px solid #1E564B; }
.mem-stat-card.unknown  { border-top: 3px solid #6E7682; }
.mem-stat-card.total    { border-top: 3px solid var(--gold); }
.mem-stat-num {
  font-family: var(--serif);
  font-size: 30px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.15;
}
.mem-stat-label {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
  margin-top: 4px;
}
.mem-stat-sub {
  font-size: 12.5px;
  color: var(--ink-muted);
  margin-top: 4px;
}

.mem-list {
  display: grid;
  gap: 10px;
  margin: 14px 0 24px;
}
.mem-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  box-shadow: var(--shadow-sm);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  flex-wrap: wrap;
}
.mem-card.fate-perished { border-left: 4px solid #7E2D2D; }
.mem-card.fate-survived { border-left: 4px solid #1E564B; }
.mem-card.fate-unknown  { border-left: 4px solid #969CA6; }
.mem-card-main { flex: 1 1 320px; min-width: 0; }
.mem-name-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}
.mem-name {
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 700;
  color: var(--ink);
  margin: 0;
}
.mem-alt {
  font-size: 13px;
  color: var(--ink-muted);
}
.mem-meta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 13.5px;
  color: var(--ink-soft);
  margin-top: 4px;
}
.mem-rel {
  font-size: 13px;
  color: var(--ink-muted);
  margin-top: 5px;
}
.mem-card-side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 7px;
  flex-shrink: 0;
}
.fate-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 700;
  border: 1px solid transparent;
}
.fate-pill.perished { background: #F6E6E6; color: #752222; border-color: #D9B4B4; }
.fate-pill.survived { background: #E1EFEA; color: #194B41; border-color: #AED1C5; }
.fate-pill.unknown  { background: #ECEAE4; color: #4A5462; border-color: #CFCAC0; }
.mem-src-tags {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.mem-src-tag {
  font-size: 11.5px;
  padding: 2px 7px;
  border-radius: 5px;
  background: var(--surface-alt);
  color: var(--ink-soft);
  border: 1px solid var(--border);
}
.mem-ext-link {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--forest);
  text-decoration: none;
  padding: 4px 9px;
  border-radius: 6px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
}
.mem-ext-link:hover {
  background: var(--forest-soft);
  border-color: var(--forest);
}

@media (max-width: 980px) {
  .mem-stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cem-svg-stage { height: 470px; }
}
@media (max-width: 640px) {
  .mem-stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .mem-stat-card { padding: 12px 14px; }
  .mem-stat-num { font-size: 24px; }
  .mem-card-side { align-items: flex-start; width: 100%; }
  .mem-src-tags { justify-content: flex-start; }
  .cem-svg-stage { height: 390px; }
  .cem-view-bar { padding: 8px 10px; }
  .cem-map-hint { display: none; }
}

/* === VISUAL QA PASS-2 POLISH === */
.section-head {
  display: block;
  margin-bottom: 20px;
}
.section-head h2 {
  margin: 4px 0 6px;
}
.section-head p {
  margin: 0;
  color: var(--ink-soft);
  max-width: 720px;
}
.cem-color-mode {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.mode-btn, .filter-chip {
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 600;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--ink-soft);
  cursor: pointer;
  transition: background .14s, color .14s, border-color .14s;
}
.mode-btn:hover, .filter-chip:hover {
  background: var(--surface-alt);
  color: var(--ink);
}
.mode-btn.active, .filter-chip.active {
  background: var(--ink);
  border-color: var(--ink);
  color: #FCF9F3;
}
.link-btn {
  display: inline-block;
  padding: 3px 9px;
  margin: 3px 4px 3px 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--forest);
  background: var(--forest-soft);
  border: 1px solid #B5D2C8;
  border-radius: 6px;
  cursor: pointer;
}
.link-btn:hover {
  background: var(--forest);
  color: #FFF;
  border-color: var(--forest);
}
.stone-detail-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 12px;
}
.stone-detail-head h2 {
  font-family: var(--serif);
  font-size: 22px;
  margin: 4px 0 0;
  color: var(--ink);
}
.stone-badge {
  display: inline-block;
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--gold-dark);
  background: var(--gold-soft);
  border: 1px solid rgba(154,116,50,0.35);
  border-radius: 999px;
  padding: 2px 9px;
}
.stone-nav-btns {
  display: flex;
  gap: 5px;
  flex-shrink: 0;
}
.stone-empty {
  text-align: left;
}
.stone-empty-icon {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 700;
  color: var(--gold-dark);
  margin-bottom: 6px;
}
.breakdown-list {
  margin: 14px 0 0;
  padding: 0;
  display: grid;
  gap: 8px;
}
.breakdown-list > div {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding-bottom: 7px;
  border-bottom: 1px dashed var(--border);
  font-size: 14.5px;
}
.breakdown-list dt { color: var(--ink-soft); }
.breakdown-list dd { margin: 0; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; }


/* ============================================================================
   UPGRADE: MUSEUM-GRADE MEMORIAL OVERVIEW PAGE & HEBREW STONE INSCRIPTION
   ============================================================================ */

/* Gold CTA button for Cemetery -> Family Tree branch link */
.btn-gold {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: linear-gradient(180deg, #A9813A 0%, #876324 100%);
  color: #FFFDF8;
  border: 1px solid #74551E;
  text-decoration: none;
  font-weight: 600;
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: transform 0.12s ease, box-shadow 0.15s ease, filter 0.15s ease;
}
.btn-gold:hover {
  color: #FFFDF8;
  filter: brightness(1.06);
  box-shadow: 0 4px 12px rgba(116, 85, 30, 0.25);
}

/* Prominent Hebrew Gravestone Inscription at top of Stone Detail Box */
.stone-head-titles {
  min-width: 0;
  flex: 1;
}
.stone-hebrew-head {
  font-family: var(--hebrew);
  font-size: 29px;
  font-weight: 700;
  line-height: 1.32;
  color: #1A2431;
  margin: 10px 0 4px;
  padding: 8px 14px 9px;
  background: linear-gradient(180deg, #FBF7EE 0%, #F3EAD7 100%);
  border: 1px solid rgba(154, 116, 50, 0.38);
  border-right: 4px solid var(--gold);
  border-radius: 8px;
  text-align: right;
  letter-spacing: 0.01em;
  word-break: break-word;
}
@media (max-width: 600px) {
  .stone-hebrew-head {
    font-size: 24px;
    padding: 7px 12px;
  }
}

/* ---- REIMAGINED OVERVIEW PAGE ---- */
.page-overview {
  background: #F4EFE4;
}

/* Atmospheric Hero with 1910 Bereg Map Backdrop */
.mem-hero {
  position: relative;
  overflow: hidden;
  background: #141B24;
  color: #F7F1E3;
  padding: 76px 0 68px;
  border-bottom: 3px solid var(--gold);
}
.mem-hero-bg {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(ellipse at 50% 35%, rgba(20, 27, 36, 0.56) 0%, rgba(16, 21, 28, 0.88) 72%, rgba(13, 18, 24, 0.96) 100%),
    linear-gradient(180deg, rgba(22, 26, 33, 0.72) 0%, rgba(28, 23, 18, 0.82) 100%),
    url('ilonca-1910-map.jpg');
  background-size: cover;
  background-position: center 32%;
  filter: sepia(0.36) contrast(0.95) brightness(0.86);
  transform: scale(1.02);
}
.mem-hero-inner {
  position: relative;
  z-index: 2;
  max-width: 820px;
  margin: 0 auto;
  text-align: center;
}
.mem-hero-hebrew {
  font-family: var(--hebrew);
  font-size: clamp(20px, 2.5vw, 26px);
  font-weight: 500;
  color: #E7CCA0;
  letter-spacing: 0.03em;
  margin-bottom: 14px;
}
.mem-hero-rule {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 0 auto 20px;
  max-width: 240px;
}
.mem-hero-rule span {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(224, 192, 134, 0.65), transparent);
}
.mem-hero-diamond {
  width: 7px;
  height: 7px;
  background: #DFBC7B;
  transform: rotate(45deg);
  display: inline-block;
}
.mem-hero h1 {
  font-family: var(--display);
  font-size: clamp(40px, 6.2vw, 66px);
  font-weight: 600;
  line-height: 1.05;
  margin: 0 0 10px;
  letter-spacing: 0.01em;
  color: #FFFBF2;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.45);
}
.mem-hero .hero-paren {
  font-weight: 500;
  color: #E5C891;
}
.mem-hero-subtitle {
  font-family: var(--sans);
  font-size: 12.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #CDBE9F;
  margin: 0 0 22px;
}
.mem-hero-lead {
  font-family: var(--serif);
  font-size: clamp(17px, 2vw, 19.5px);
  line-height: 1.72;
  color: #EAE2D1;
  max-width: 680px;
  margin: 0 auto 30px;
}
.mem-hero-search {
  max-width: 640px;
  margin: 0 auto 20px;
  background: rgba(252, 248, 240, 0.96);
  border: 1.5px solid rgba(218, 186, 126, 0.65);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.34);
}
.mem-hero-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 26px;
  margin-top: 16px;
  font-size: 14px;
}
.mem-hero-links a {
  color: #E8CF9C;
  text-decoration: none;
  border-bottom: 1px solid rgba(232, 207, 156, 0.35);
  padding-bottom: 2px;
  font-weight: 500;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.mem-hero-links a:hover {
  color: #FFF8E8;
  border-color: #FFF8E8;
}

/* Av HaRachamim Memorial Centerpiece */
.av-section {
  padding: 56px 0 36px;
  background: linear-gradient(180deg, #EDE5D4 0%, #F4EFE4 100%);
}
.av-frame {
  max-width: 900px;
  margin: 0 auto;
  background: linear-gradient(180deg, #FCF8EE 0%, #F7EFE0 100%);
  border: 1.5px solid #C6A972;
  border-radius: 14px;
  padding: 12px;
  box-shadow: 0 20px 50px rgba(34, 27, 16, 0.11), inset 0 1px 0 rgba(255, 255, 255, 0.8);
}
.av-frame-inner {
  border: 1px solid rgba(154, 116, 50, 0.42);
  border-radius: 8px;
  padding: 40px 48px 36px;
  text-align: center;
  position: relative;
}
.av-crest {
  margin: 0 auto 10px;
  display: flex;
  justify-content: center;
}
.av-kicker {
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold-dark);
  margin: 0 0 22px;
}
.av-hebrew {
  font-family: var(--hebrew);
  font-size: clamp(23px, 3.1vw, 33px);
  font-weight: 500;
  line-height: 2.02;
  color: #19222E;
  margin: 0 auto;
  max-width: 760px;
  text-align: center;
}
.av-highlight-he {
  background: linear-gradient(180deg, transparent 58%, rgba(212, 169, 82, 0.34) 58%, rgba(212, 169, 82, 0.34) 94%, transparent 94%);
  color: #5E3F0C;
  font-weight: 700;
  padding: 0 4px;
  border-radius: 3px;
}
.av-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin: 26px auto 24px;
  max-width: 280px;
  color: var(--gold);
}
.av-divider span {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(154, 116, 50, 0.55), transparent);
}
.av-divider i {
  font-style: normal;
  font-size: 12px;
}
.av-english {
  font-family: var(--display);
  font-style: italic;
  font-size: clamp(20px, 2.4vw, 25px);
  font-weight: 500;
  line-height: 1.62;
  color: #2B3646;
  max-width: 720px;
  margin: 0 auto 22px;
}
.av-highlight-en {
  color: #6B4A12;
  font-weight: 700;
  font-style: normal;
  border-bottom: 1.5px solid rgba(154, 116, 50, 0.45);
  padding-bottom: 1px;
}
.av-attribution {
  font-family: var(--sans);
  font-size: 12.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #6E5D42;
  margin: 0;
}

/* Editorial Section Headers */
.section-head-editorial {
  max-width: 760px;
  margin-bottom: 34px;
}
.section-head-editorial.centered {
  margin: 0 auto 34px;
  text-align: center;
}
.eyebrow {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gold-dark);
  margin-bottom: 8px;
}
.section-head-editorial h2 {
  font-family: var(--display);
  font-size: clamp(30px, 4vw, 42px);
  font-weight: 600;
  line-height: 1.12;
  color: var(--ink);
  margin: 0 0 12px;
}
.section-lead {
  font-family: var(--serif);
  font-size: 17.5px;
  line-height: 1.72;
  color: var(--ink-soft);
  margin: 0;
}

/* The World That Was: Chronology + Vintage Map */
.world-section {
  padding: 44px 0 56px;
}
.world-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  gap: 40px;
  align-items: start;
}
.chronicle-timeline {
  list-style: none;
  margin: 0;
  padding: 0 0 0 22px;
  border-left: 2px solid rgba(154, 116, 50, 0.35);
  display: grid;
  gap: 24px;
}
.chronicle-timeline li {
  position: relative;
  padding-left: 12px;
}
.chronicle-timeline li::before {
  content: '';
  position: absolute;
  left: -29px;
  top: 7px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #FBF7EE;
  border: 2.5px solid var(--gold);
  box-shadow: 0 0 0 3px #F4EFE4;
}
.chron-year {
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold-dark);
  margin-bottom: 3px;
}
.chron-body h3 {
  font-family: var(--display);
  font-size: 24px;
  font-weight: 600;
  margin: 0 0 5px;
  color: var(--ink);
  line-height: 1.2;
}
.chron-body p {
  font-family: var(--serif);
  font-size: 15.5px;
  line-height: 1.65;
  color: var(--ink-soft);
  margin: 0;
}

.vintage-map-card {
  margin: 0;
  background: #FCF8EF;
  border: 1px solid #CBB998;
  border-radius: 12px;
  padding: 14px;
  box-shadow: 0 14px 36px rgba(27, 40, 56, 0.10);
  position: sticky;
  top: 86px;
}
.vintage-map-frame {
  border: 1px solid rgba(120, 93, 46, 0.38);
  border-radius: 6px;
  overflow: hidden;
  background: #E8DEC7;
}
.vintage-map-frame img {
  display: block;
  width: 100%;
  height: auto;
  filter: sepia(0.12) contrast(1.02);
}
.vintage-map-caption {
  padding: 14px 6px 4px;
}
.map-plate-label {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--gold-dark);
  margin-bottom: 5px;
}
.vintage-map-caption p {
  font-family: var(--serif);
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--ink-soft);
  margin: 0;
}

/* Four Pillars of Remembrance */
.pillars-section {
  padding: 52px 0;
  background: #ECE4D4;
  border-top: 1px solid #D8CCB5;
  border-bottom: 1px solid #D8CCB5;
}
.pillars-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}
.pillar-card {
  display: flex;
  flex-direction: column;
  background: #FCF9F2;
  border: 1px solid #D2C3A7;
  border-top: 4px solid var(--gold);
  border-radius: 12px;
  padding: 26px 28px 24px;
  text-decoration: none;
  color: var(--ink);
  box-shadow: 0 6px 20px rgba(27, 40, 56, 0.06);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.pillar-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 32px rgba(27, 40, 56, 0.11);
  color: var(--ink);
}
.pillar-memorial { border-top-color: #8C3D35; }
.pillar-cemetery { border-top-color: #1E564B; }
.pillar-trees { border-top-color: #9A7432; }
.pillar-search { border-top-color: #2B4566; }

.pillar-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.pillar-tag {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold-dark);
}
.pillar-num {
  font-family: var(--display);
  font-size: 32px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.pillar-card h3 {
  font-family: var(--display);
  font-size: 27px;
  font-weight: 600;
  margin: 0 0 10px;
  line-height: 1.18;
  color: var(--ink);
}
.pillar-card p {
  font-family: var(--serif);
  font-size: 15.5px;
  line-height: 1.62;
  color: var(--ink-soft);
  margin: 0 0 18px;
  flex: 1;
}
.pillar-cta {
  font-size: 14px;
  font-weight: 600;
  color: var(--forest);
}
.pillar-card:hover .pillar-cta {
  color: var(--gold-dark);
}

/* Quiet Archival Ledger Strip */
.ledger-section {
  padding: 52px 0 26px;
}
.ledger-panel {
  background: #FCF9F2;
  border: 1px solid #D4C7AF;
  border-radius: 14px;
  padding: 34px 36px;
  box-shadow: var(--shadow-sm);
}
.ledger-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: 24px;
  padding-bottom: 18px;
  border-bottom: 1px solid #E2D7C3;
}
.ledger-head h2 {
  font-family: var(--display);
  font-size: 32px;
  font-weight: 600;
  margin: 0;
  color: var(--ink);
}
.ledger-note {
  font-family: var(--serif);
  font-size: 15px;
  color: var(--ink-soft);
  max-width: 440px;
  margin: 0;
}
.ledger-strip {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 16px;
  margin: 0 0 28px;
  padding: 0 0 26px;
  border-bottom: 1px solid #E2D7C3;
}
.ledger-strip > div {
  display: flex;
  flex-direction: column;
  text-align: center;
  padding: 8px 6px;
  border-right: 1px solid #E6DCC8;
}
.ledger-strip > div:last-child {
  border-right: none;
}
.ledger-strip dd {
  margin: 0 0 4px;
  font-family: var(--display);
  font-size: 30px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.05;
  font-variant-numeric: tabular-nums;
  order: -1;
}
.ledger-strip dt {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--ink-muted);
}
.ledger-families-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
}
.ledger-families-head h3 {
  font-family: var(--display);
  font-size: 24px;
  font-weight: 600;
  margin: 0;
  color: var(--ink);
}
.surname-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.surname-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 13px;
  background: #F4EDE0;
  border: 1px solid #D4C6AA;
  border-radius: 999px;
  text-decoration: none;
  color: var(--ink);
  font-size: 13.5px;
  font-weight: 500;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.surname-chip small {
  color: var(--gold-dark);
  font-weight: 600;
  font-size: 12px;
}
.surname-chip:hover {
  background: var(--ink);
  border-color: var(--ink);
  color: #FFFBF2;
}
.surname-chip:hover small {
  color: #E5C88E;
}

.method-section {
  padding: 18px 0 58px;
}
.method-box {
  background: rgba(252, 249, 242, 0.72);
  border: 1px solid #D9CEB8;
  border-left: 3.5px solid var(--gold);
  border-radius: 10px;
  padding: 20px 24px;
}
.method-box h3 {
  font-family: var(--display);
  font-size: 22px;
  font-weight: 600;
  margin: 0 0 6px;
  color: var(--ink);
}
.method-box p {
  font-family: var(--serif);
  font-size: 15px;
  line-height: 1.65;
  color: var(--ink-soft);
  margin: 0;
}

/* Responsive adjustments for Overview */
@media (max-width: 960px) {
  .world-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }
  .vintage-map-card {
    position: static;
  }
  .ledger-strip {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .ledger-strip > div:nth-child(3n) {
    border-right: none;
  }
}
@media (max-width: 720px) {
  .mem-hero {
    padding: 50px 0 46px;
  }
  .av-section {
    padding: 36px 0 24px;
  }
  .av-frame {
    padding: 8px;
  }
  .av-frame-inner {
    padding: 26px 18px 24px;
  }
  .pillars-grid {
    grid-template-columns: 1fr;
  }
  .ledger-panel {
    padding: 24px 18px;
  }
  .ledger-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .ledger-strip > div {
    border-right: none;
    border-bottom: 1px dashed #E2D7C3;
    padding: 10px 4px;
  }
}

/* Polish: Hero search button styling & keep קהלות הקדש unbroken */
.mem-hero-search {
  display: flex;
  align-items: stretch;
  gap: 8px;
  padding: 7px 8px;
  border-radius: 12px;
}
.mem-hero-search input {
  flex: 1;
  min-width: 0;
  border: none;
  background: transparent;
  padding: 10px 14px;
  font-size: 15.5px;
  color: var(--ink);
  font-family: var(--sans);
  outline: none;
}
.mem-hero-search button {
  background: linear-gradient(180deg, #9F7833 0%, #7F5C1F 100%);
  color: #FFFDF7;
  border: 1px solid #6E4F19;
  border-radius: 8px;
  padding: 11px 22px;
  font-family: var(--sans);
  font-size: 14.5px;
  font-weight: 600;
  letter-spacing: 0.01em;
  cursor: pointer;
  white-space: nowrap;
  transition: filter 0.15s ease, box-shadow 0.15s ease;
}
.mem-hero-search button:hover {
  filter: brightness(1.08);
  box-shadow: 0 4px 14px rgba(110, 79, 25, 0.35);
}
@media (max-width: 600px) {
  .mem-hero-search {
    flex-direction: column;
    padding: 8px;
  }
  .mem-hero-search button {
    width: 100%;
    padding: 12px 16px;
  }
}
.av-highlight-he {
  white-space: nowrap;
}


/* ============================================================================
   DESCENDANTS LEGACY LINE (OVERVIEW)
   ============================================================================ */
.av-descendants-legacy {
  margin: 1.5rem auto 0;
  padding-top: 1.25rem;
  max-width: 60ch;
  border-top: 1px solid rgba(154, 116, 50, 0.28);
  font-family: 'Source Serif 4', Georgia, serif;
  font-style: italic;
  font-size: 1.02rem;
  line-height: 1.72;
  color: #463A29;
  text-align: center;
}

/* ============================================================================
   WWII MEMORIAL — UNIFIED BADGE, TREE LINKS & KNOWN FAMILY FATES
   ============================================================================ */
.mem-merged-tag {
  display: inline-flex;
  align-items: center;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  background: rgba(154, 116, 50, 0.14);
  color: #6B4D18;
  border: 1px solid rgba(154, 116, 50, 0.34);
}
.mem-card-highlight {
  box-shadow: 0 0 0 3px rgba(154, 116, 50, 0.48), 0 10px 28px rgba(27, 40, 56, 0.14) !important;
  background: #FFFDF7 !important;
}
.mem-nav-links {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 4px;
  width: 100%;
}
.mem-tree-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 11px;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.15s ease, background 0.15s ease;
  text-align: center;
}
.mem-tree-direct {
  background: #1B3B36;
  color: #FAF6EC;
  border: 1px solid #16302C;
}
.mem-tree-direct:hover { background: #142D29; color: #FFFFFF; }
.mem-grave-btn {
  background: #F6EBD4;
  color: #5D4212;
  border: 1px solid rgba(154, 116, 50, 0.42);
}
.mem-grave-btn:hover { background: #EFE0BF; }

.mem-family-box {
  margin-top: 12px;
  padding: 11px 14px;
  border-radius: 10px;
  background: #FBF8F1;
  border: 1px solid rgba(154, 116, 50, 0.24);
}
.mem-family-title {
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #705832;
  margin-bottom: 8px;
}
.ff-row {
  display: grid;
  grid-template-columns: 74px 1fr;
  gap: 8px;
  align-items: start;
  padding: 4px 0;
}
.ff-row + .ff-row {
  border-top: 1px dashed rgba(154, 116, 50, 0.2);
  padding-top: 7px;
  margin-top: 3px;
}
.ff-role {
  font-size: 0.78rem;
  font-weight: 600;
  color: #5A4D3C;
  padding-top: 4px;
}
.ff-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.ff-chip {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
  padding: 4px 9px;
  border-radius: 7px;
  background: #FFFFFF;
  border: 1px solid #DDD3C0;
  color: #222B36;
  font-size: 0.81rem;
  text-decoration: none;
  line-height: 1.3;
  transition: border-color 0.15s ease, background 0.15s ease;
}
a.ff-chip:hover {
  border-color: #9A7432;
  background: #FFFDF8;
}
.ff-chip-name { font-weight: 500; }
.ff-badge {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 999px;
  font-size: 0.71rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}
.ff-badge-perished { background: #F5E1E1; color: #7E2424; border: 1px solid #DFB6B6; }
.ff-badge-survived { background: #E0EFE7; color: #1E5A3E; border: 1px solid #B3D7C3; }
.ff-badge-unknown  { background: #EAEFF4; color: #3D4F63; border: 1px solid #C8D4E0; }
.ff-badge-prewar   { background: #F3ECE0; color: #634F31; border: 1px solid #D9C9AD; }

.pill-family {
  border-color: rgba(31, 107, 93, 0.35);
  color: #1A574B;
}
.pill-family.active {
  background: #1B4E44;
  color: #FFFDF7;
  border-color: #1B4E44;
}

@media (max-width: 640px) {
  .ff-row { grid-template-columns: 1fr; gap: 4px; }
  .mem-nav-links { flex-direction: row; flex-wrap: wrap; }
}

/* ============================================================================
   CONTACT & SHARE PAGE
   ============================================================================ */
.contact-head {
  background: linear-gradient(155deg, #1E242D 0%, #2C2722 55%, #1D2832 100%);
  color: #F7F1E3;
  border-bottom: 3px solid #9A7432;
}
.contact-head .eyebrow { color: #E2C383; }
.contact-head h1 {
  color: #FFFBF2;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 600;
  font-size: clamp(2rem, 4vw, 2.9rem);
}
.contact-head .page-lead { color: rgba(247, 241, 227, 0.88); max-width: 66ch; }
.heb-inline { font-family: 'Frank Ruhl Libre', Georgia, serif; font-size: 1.08em; }

.contact-helps-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 28px;
}
.contact-help-card {
  background: #FFFDF9;
  border: 1px solid #E2D7C3;
  border-top: 3px solid #9A7432;
  border-radius: 12px;
  padding: 20px 22px;
  box-shadow: 0 4px 16px rgba(27, 40, 56, 0.05);
}
.help-kicker {
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #8E6A2A;
  margin-bottom: 6px;
}
.contact-help-card h2 {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.42rem;
  font-weight: 700;
  color: #1B2838;
  margin: 0 0 8px;
}
.contact-help-card p {
  font-size: 0.94rem;
  line-height: 1.62;
  color: #3E4652;
  margin: 0;
}

.contact-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}
.contact-form-card {
  background: #FFFDF9;
  border: 1px solid #DFD4BF;
  border-radius: 14px;
  padding: 26px 28px;
  box-shadow: 0 8px 26px rgba(27, 40, 56, 0.06);
}
.contact-form-card h2 {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.75rem;
  color: #1B2838;
  margin: 0 0 6px;
}
.contact-form-intro {
  color: #4A5260;
  font-size: 0.95rem;
  margin: 0 0 18px;
}
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.contact-row-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.contact-form input,
.contact-form select,
.contact-form textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 10px 12px;
  border: 1px solid #CFC3AC;
  border-radius: 8px;
  background: #FFFFFF;
  color: #1B2838;
  font: inherit;
  font-size: 0.95rem;
}
.contact-form textarea { resize: vertical; min-height: 130px; line-height: 1.55; }
.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: #9A7432;
  box-shadow: 0 0 0 3px rgba(154, 116, 50, 0.18);
}
.contact-form-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 4px;
}
.contact-feedback {
  font-size: 0.86rem;
  font-weight: 600;
  color: #1E564B;
}

.contact-aside {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.contact-direct-box,
.contact-privacy-box {
  background: #F9F4E8;
  border: 1px solid #DFD2BA;
  border-radius: 12px;
  padding: 20px 22px;
}
.contact-direct-box h3,
.contact-privacy-box h3 {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.38rem;
  color: #1B2838;
  margin: 0 0 8px;
}
.contact-direct-box p { font-size: 0.92rem; line-height: 1.58; color: #3D4550; margin: 0 0 10px; }
.contact-email-display {
  margin: 12px 0 !important;
  padding: 10px 12px;
  border-radius: 8px;
  background: #FFFFFF;
  border: 1px solid #D9C9AA;
  text-align: center;
}
.contact-email-display a {
  font-weight: 700;
  font-size: 1rem;
  color: #1B3B36;
  text-decoration: none;
  word-break: break-all;
}
.contact-email-display a:hover { text-decoration: underline; }
.contact-privacy-box ul {
  margin: 0;
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 9px;
  font-size: 0.9rem;
  line-height: 1.55;
  color: #3D4550;
}

@media (max-width: 900px) {
  .contact-helps-grid { grid-template-columns: 1fr; }
  .contact-layout { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .contact-row-2 { grid-template-columns: 1fr; }
  .contact-form-card { padding: 18px; }
}


/* Accessible skip-link: hidden until keyboard focus */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 9999;
  padding: 10px 16px;
  background: #1B2838;
  color: #FAF6EC;
  font-weight: 600;
  text-decoration: none;
  border-radius: 0 0 8px 0;
}
.skip-link:focus {
  left: 12px;
  top: 12px;
  outline: 2px solid #D4B475;
}
.contact-head {
  padding: 44px 0 42px;
}


/* ==========================================================================
   OVERVIEW HERO LEGACY PARAGRAPH & 5-PILLAR BALANCED GRID
   ========================================================================== */
.mem-hero-lead {
  margin: 0 auto 18px;
}
.mem-hero-legacy {
  font-family: 'Source Serif 4', Georgia, serif;
  font-style: italic;
  font-size: clamp(16px, 1.85vw, 18.5px);
  line-height: 1.72;
  color: #F2DFB6;
  max-width: 660px;
  margin: 0 auto 30px;
  padding-top: 16px;
  border-top: 1px solid rgba(218, 186, 126, 0.32);
}

@media (min-width: 900px) {
  .pillars-grid.pillars-grid-5 {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
  .pillars-grid.pillars-grid-5 > .pillar-card:nth-child(1),
  .pillars-grid.pillars-grid-5 > .pillar-card:nth-child(2) {
    grid-column: span 3;
  }
  .pillars-grid.pillars-grid-5 > .pillar-card:nth-child(3),
  .pillars-grid.pillars-grid-5 > .pillar-card:nth-child(4),
  .pillars-grid.pillars-grid-5 > .pillar-card:nth-child(5) {
    grid-column: span 2;
  }
}

.pillar-card.pillar-town {
  border-top-color: #7D5B2B;
}

.mem-tree-btn.mem-town-btn {
  background: #F4EFE3;
  color: #4A381D;
  border-color: #C7B38E;
}
.mem-tree-btn.mem-town-btn:hover {
  background: #EAE0CA;
  color: #2B1F0E;
}

/* ==========================================================================
   WALK THROUGH 1921 ILNYTSIA (town.html)
   ========================================================================== */
.town-hero {
  background:
    radial-gradient(960px 380px at 80% 0%, rgba(154, 116, 50, 0.22), transparent 62%),
    linear-gradient(155deg, #162231 0%, #1E2F44 55%, #233342 100%);
  color: #F8F4EA;
  padding: 38px 0 34px;
  border-bottom: 3px solid var(--gold);
}
.town-hero .page-hero-eyebrow {
  color: #DFC080;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 8px;
}
.town-hero h1 {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: clamp(32px, 4.2vw, 46px);
  font-weight: 600;
  color: #FFFBF0;
  margin: 0 0 10px;
  line-height: 1.12;
}
.town-hero .page-hero-lead {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 16.5px;
  line-height: 1.65;
  color: #E2DAC9;
  max-width: 780px;
  margin: 0 0 22px;
}
.town-hero .page-hero-lead strong {
  color: #F9E5BA;
}

.town-kpi-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.town-kpi {
  background: rgba(255, 251, 240, 0.07);
  border: 1px solid rgba(218, 186, 126, 0.28);
  border-radius: 10px;
  padding: 12px 15px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.town-kpi strong {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 28px;
  line-height: 1.05;
  color: #F6DFB0;
  font-weight: 700;
}
.town-kpi span {
  font-size: 12.5px;
  color: #D7CEBC;
  line-height: 1.35;
}
.town-kpi span em {
  font-style: normal;
  color: #F5E6C8;
  font-weight: 600;
}
.town-kpi-wwii {
  border-color: rgba(196, 102, 114, 0.48);
  background: rgba(139, 38, 53, 0.16);
}

.town-main {
  padding-top: 24px;
  padding-bottom: 56px;
}

/* Dignified Historical Disclosure */
.town-disclosure {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: linear-gradient(135deg, #FBF6EA 0%, #F4ECDC 100%);
  border: 1px solid #D5C199;
  border-left: 4px solid var(--gold);
  border-radius: 10px;
  padding: 14px 18px;
  margin-bottom: 18px;
  box-shadow: 0 3px 12px rgba(27, 40, 56, 0.04);
}
.town-disclosure-icon {
  color: var(--gold);
  font-size: 15px;
  line-height: 1.5;
  flex-shrink: 0;
}
.town-disclosure-text {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 14.5px;
  line-height: 1.58;
  color: #3E3323;
}
.town-disclosure-text strong {
  color: #1B2838;
  font-family: 'Inter', sans-serif;
  font-size: 13.5px;
  letter-spacing: 0.01em;
}

/* Walkthrough Controls */
.town-controls {
  background: #FCF9F2;
  border: 1px solid #D9CCB3;
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 18px;
  box-shadow: 0 4px 14px rgba(27, 40, 56, 0.04);
}
.town-walk-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding-bottom: 12px;
  border-bottom: 1px solid #E7DEC9;
  margin-bottom: 12px;
}
.town-walk-step {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.town-progress-pill {
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  background: #1B2838;
  color: #F6E2B8;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.01em;
}
.town-jump-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.town-jump-select {
  font-family: 'Inter', sans-serif;
  font-size: 13.5px;
  color: var(--ink);
  background: #FFFDF8;
  border: 1px solid #C8B99B;
  border-radius: 8px;
  padding: 7px 12px;
  min-width: 240px;
  max-width: 100%;
}
.town-kbd-hint {
  font-size: 12px;
  color: var(--ink-muted);
  white-space: nowrap;
}

.town-search-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.town-search-box {
  position: relative;
  flex: 1 1 300px;
  display: flex;
  align-items: center;
}
.town-search-box input {
  width: 100%;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  padding: 9px 70px 9px 14px;
  border: 1px solid #C9BA9C;
  border-radius: 8px;
  background: #FFFDF8;
  color: var(--ink);
}
.town-search-box input:focus {
  outline: 2px solid rgba(154, 116, 50, 0.35);
  border-color: var(--gold);
}
.town-clear-btn {
  position: absolute;
  right: 8px;
  background: #EDE4D2;
  border: 1px solid #CEBEA0;
  color: #463A28;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 6px;
  cursor: pointer;
}
.town-clear-btn:hover {
  background: #E2D5BC;
}

.town-filter-pills {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.t-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid #CFC0A3;
  background: #F7F1E4;
  color: #3B3224;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.14s ease;
}
.t-pill span {
  font-size: 11.5px;
  padding: 1px 6px;
  border-radius: 999px;
  background: rgba(27, 40, 56, 0.08);
  color: #4D4334;
  font-weight: 600;
}
.t-pill:hover {
  border-color: var(--gold);
  background: #F2E8D4;
}
.t-pill.active {
  background: #1B2838;
  border-color: #1B2838;
  color: #FAF3E3;
}
.t-pill.active span {
  background: rgba(246, 226, 184, 0.22);
  color: #F8E3B5;
}
.town-match-status {
  margin-top: 8px;
  font-size: 13px;
  color: #5C4928;
  font-weight: 500;
}
.town-match-status:empty {
  display: none;
}

/* Split Workspace: Bird's-Eye Map + Household Spotlight */
.town-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.48fr) minmax(340px, 1fr);
  gap: 20px;
  align-items: start;
  margin-bottom: 36px;
}

.town-map-panel {
  background: #FCF9F2;
  border: 1px solid #D5C5A7;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 8px 26px rgba(27, 40, 56, 0.07);
}
.town-map-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  padding: 10px 14px;
  background: #1B2838;
  color: #F4ECDD;
  border-bottom: 2px solid var(--gold);
}
.town-map-title-group {
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.town-map-badge {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 18px;
  font-weight: 700;
  color: #F9E7C2;
  line-height: 1.15;
}
.town-map-sub {
  font-size: 11.5px;
  color: #C7BEB0;
}
.town-map-btns {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
}
.map-tool-btn {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(218, 186, 126, 0.35);
  color: #F6EBD4;
  border-radius: 6px;
  padding: 5px 10px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.14s ease;
}
.map-tool-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}
.map-tool-btn.active {
  background: rgba(154, 116, 50, 0.42);
  border-color: #DFC080;
  color: #FFF6E0;
}

.town-map-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 1200 / 820;
  min-height: 360px;
  background: #EFE7D6;
  cursor: grab;
  overflow: hidden;
  user-select: none;
  touch-action: none;
}
.town-map-stage.is-dragging {
  cursor: grabbing;
}
.town-map-stage svg {
  width: 100%;
  height: 100%;
  display: block;
}

.town-loading {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(244, 238, 225, 0.88);
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 16px;
  color: #463A29;
}

/* SVG Cartographic Typography & Cottages */
.map-lbl {
  font-family: 'Cormorant Garamond', Georgia, serif;
  paint-order: stroke;
  stroke: rgba(247, 242, 230, 0.92);
  stroke-width: 3.5px;
  stroke-linejoin: round;
}
.map-lbl-village {
  font-size: 20px;
  font-weight: 700;
  fill: #1B2838;
  letter-spacing: 0.03em;
}
.map-lbl-quarter {
  font-size: 14px;
  font-weight: 700;
  fill: #514433;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.map-lbl-water {
  font-family: 'Source Serif 4', Georgia, serif;
  font-style: italic;
  font-size: 12.5px;
  font-weight: 600;
  fill: #2E6482;
}
.map-lbl-hill {
  font-style: italic;
  font-size: 16px;
  font-weight: 600;
  fill: #58694C;
  letter-spacing: 0.08em;
}
.map-lbl-dir {
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  font-weight: 600;
  fill: #6B5636;
}
.map-cem-link {
  cursor: pointer;
}
.map-cem-link:hover rect {
  fill: #2B4838;
}

.map-cottage {
  cursor: pointer;
  transition: opacity 0.2s ease;
}
.map-cottage .cottage-beacon {
  opacity: 0;
  transform-box: fill-box;
  transform-origin: center;
  transition: opacity 0.2s ease;
}
.map-cottage .cottage-icon {
  transform-box: fill-box;
  transform-origin: center;
  transition: transform 0.16s ease;
}
.map-cottage:hover .cottage-icon {
  transform: scale(1.22);
}
.map-cottage.is-dimmed {
  opacity: 0.20;
}
.map-cottage.is-match .cottage-icon {
  transform: scale(1.14);
}
.map-cottage.is-active {
  opacity: 1;
}
.map-cottage.is-active .cottage-beacon {
  opacity: 1;
  animation: lanternPulse 2.4s ease-in-out infinite;
}
.map-cottage.is-active .cottage-icon {
  transform: scale(1.36);
}
.map-cottage.is-active .cottage-tag-bg {
  fill: #9A6B1A;
  stroke: #FFF3D1;
  stroke-width: 1px;
}
.map-cottage.is-active .cottage-tag-txt {
  fill: #FFFFFF;
}

@keyframes lanternPulse {
  0%, 100% { transform: scale(1); opacity: 0.85; }
  50% { transform: scale(1.22); opacity: 0.45; }
}

/* Hover Tooltip */
.town-tooltip {
  position: absolute;
  z-index: 20;
  pointer-events: none;
  background: rgba(23, 35, 49, 0.95);
  color: #F9F3E6;
  border: 1px solid rgba(218, 186, 126, 0.6);
  border-radius: 8px;
  padding: 8px 12px;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.28);
  max-width: 260px;
}
.tt-head {
  font-size: 13px;
  line-height: 1.3;
  margin-bottom: 2px;
}
.tt-head strong {
  color: #F6DFB0;
}
.tt-meta {
  font-size: 11.5px;
  color: #D2C8B6;
}

/* Map Legend */
.town-map-legend {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 16px;
  padding: 11px 15px;
  background: #F6F0E3;
  border-top: 1px solid #DDD0B6;
  font-size: 12px;
  color: #3E3528;
}
.tleg-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}
.tleg-swatch {
  width: 12px;
  height: 12px;
  border-radius: 3px;
  display: inline-block;
  border: 1px solid rgba(0, 0, 0, 0.22);
}
.tleg-perished { background: #8B2635; }
.tleg-survived { background: #2D6A4F; }
.tleg-wartime  { background: #9A6B24; }
.tleg-tree     { background: #365578; }
.tleg-census   { background: #7B7265; }
.tleg-lantern {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: inline-block;
  background: radial-gradient(circle, #F5C754 0%, #B8821D 70%);
  box-shadow: 0 0 6px rgba(212, 162, 60, 0.85);
}

/* Household Spotlight Card (Right Side) */
.town-spotlight-panel {
  position: sticky;
  top: 16px;
}
.sp-card {
  background: #FCF9F2;
  border: 1px solid #D3C3A5;
  border-top: 5px solid var(--gold);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 10px 28px rgba(27, 40, 56, 0.08);
}
.sp-card.tier-perished { border-top-color: #8B2635; }
.sp-card.tier-survived { border-top-color: #2D6A4F; }
.sp-card.tier-wartime  { border-top-color: #9A6B24; }
.sp-card.tier-tree     { border-top-color: #365578; }
.sp-card.tier-census   { border-top-color: #7B7265; }

.sp-head {
  padding: 18px 20px 15px;
  background: linear-gradient(180deg, #F8F2E4 0%, #FCF9F2 100%);
  border-bottom: 1px solid #E5DAC4;
}
.sp-head-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}
.sp-house-badge {
  display: inline-flex;
  align-items: center;
  background: #1B2838;
  color: #F7E4BA;
  padding: 4px 11px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.sp-pos {
  font-size: 12px;
  color: var(--ink-muted);
  font-weight: 600;
}
.sp-title {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 26px;
  line-height: 1.18;
  color: #1B2838;
  margin: 0 0 5px;
  font-weight: 700;
}
.sp-surnames {
  font-size: 13px;
  color: #5A4E3D;
  margin-bottom: 10px;
}
.sp-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}
.sp-pill {
  font-size: 11.5px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 999px;
}
.sp-pill-ink      { background: #EAE2D1; color: #2F2920; }
.sp-pill-tree     { background: #E3ECF5; color: #1E4266; }
.sp-pill-perished { background: #F7E1E4; color: #7C1D2B; }
.sp-pill-survived { background: #DFF1E8; color: #1B543A; }
.sp-pill-wartime  { background: #F5EBD7; color: #754E12; }
.sp-pill-grave    { background: #E6ECE3; color: #364F2E; }

.sp-scan-link {
  display: inline-flex;
  align-items: center;
  font-size: 12.5px;
  font-weight: 600;
  color: #78551E;
  text-decoration: none;
  border-bottom: 1px dotted #B8934A;
}
.sp-scan-link:hover {
  color: #1B2838;
  border-bottom-color: #1B2838;
}

.town-house-note {
  margin: 0;
  padding: 8px 20px;
  background: #F6EEDB;
  font-size: 12.5px;
  color: #5E4B29;
  border-bottom: 1px solid #E5DAC4;
}

.sp-body {
  padding: 14px 18px 10px;
  max-height: 540px;
  overflow-y: auto;
}
.sp-roster-label {
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #7A6747;
  margin-bottom: 10px;
}

.town-res-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.town-res-row {
  background: #FFFDF8;
  border: 1px solid #E5DBC6;
  border-radius: 9px;
  padding: 11px 13px;
}
.town-res-row.is-query-hit {
  border-color: var(--gold);
  background: #FFF9EB;
  box-shadow: 0 0 0 2px rgba(154, 116, 50, 0.16);
}
.town-res-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}
.town-res-name-wrap {
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.town-res-name {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 15.5px;
  color: #1B2838;
  line-height: 1.25;
}
.town-res-canon {
  font-size: 12px;
  font-style: italic;
  color: #6B5839;
}
.town-res-role {
  font-size: 11.5px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 6px;
  background: #EFE7D6;
  color: #4A3E2D;
  white-space: nowrap;
  flex-shrink: 0;
}
.town-res-meta {
  margin-top: 5px;
  font-size: 12.5px;
  color: #5A5042;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 6px;
}
.town-res-meta .dot-sep {
  color: #B4A58B;
}
.town-res-links {
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.res-link {
  display: inline-flex;
  align-items: center;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 9px;
  border-radius: 6px;
  text-decoration: none;
  border: 1px solid transparent;
  transition: filter 0.12s ease, transform 0.12s ease;
}
a.res-link:hover {
  filter: brightness(0.95);
  transform: translateY(-1px);
}
.res-link-tree {
  background: #E4EEF7;
  color: #1A3E63;
  border-color: #BDD2E7;
}
.res-link-perished {
  background: #F8E2E5;
  color: #7D1B2A;
  border-color: #E2B3BA;
}
.res-link-survived {
  background: #DEF2E8;
  color: #1A563B;
  border-color: #ACD6C2;
}
.res-link-wartime {
  background: #F6ECD7;
  color: #734D10;
  border-color: #DFCA9F;
}
.res-link-grave {
  background: #E8EFE5;
  color: #2E4B28;
  border-color: #BFCFBA;
}
.res-link-prewar {
  background: #F1ECE1;
  color: #5C5243;
  border-color: #DCD2BE;
}

.sp-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 18px;
  background: #F5EFE2;
  border-top: 1px solid #E2D6BE;
}

/* All-Houses Directory Grid */
.town-directory-section {
  border-top: 1px solid #DED1B8;
  padding-top: 28px;
}
.town-dir-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}
.town-dir-head h2 {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 30px;
  margin: 2px 0 0;
  color: #1B2838;
}
.town-dir-count {
  font-size: 13.5px;
  color: var(--ink-muted);
  margin: 0;
}

.town-dir-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(225px, 1fr));
  gap: 12px;
}
.dir-house-card {
  text-align: left;
  background: #FCF9F2;
  border: 1px solid #D8C9AD;
  border-left: 4px solid #7B7265;
  border-radius: 10px;
  padding: 12px 13px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: transform 0.14s ease, box-shadow 0.14s ease, border-color 0.14s ease;
  font-family: 'Inter', sans-serif;
}
.dir-house-card.tier-perished { border-left-color: #8B2635; }
.dir-house-card.tier-survived { border-left-color: #2D6A4F; }
.dir-house-card.tier-wartime  { border-left-color: #9A6B24; }
.dir-house-card.tier-tree     { border-left-color: #365578; }
.dir-house-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(27, 40, 56, 0.08);
  border-color: var(--gold);
}
.dir-house-card.is-active {
  background: #FFF9EB;
  border-color: #9A7432;
  box-shadow: 0 0 0 2px rgba(154, 116, 50, 0.25);
}
.dh-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}
.dh-num {
  font-size: 12px;
  font-weight: 700;
  color: #1B2838;
  background: #EDE4D2;
  padding: 2px 7px;
  border-radius: 5px;
}
.dh-size {
  font-size: 11.5px;
  color: var(--ink-muted);
}
.dh-head {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 15px;
  font-weight: 600;
  color: #1B2838;
  line-height: 1.25;
}
.dh-surs {
  font-size: 12px;
  color: #6B5E4B;
}
.dh-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 4px;
}
.dh-tag {
  font-size: 10.5px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
}
.dh-perished { background: #F7E1E4; color: #7C1D2B; }
.dh-survived { background: #DFF1E8; color: #1B543A; }
.dh-wartime  { background: #F5EBD7; color: #754E12; }
.dh-tree     { background: #E3ECF5; color: #1E4266; }
.dh-grave    { background: #E6ECE3; color: #364F2E; }

.town-dir-empty {
  grid-column: 1 / -1;
  background: #FCF9F2;
  border: 1px dashed #CDBEA0;
  border-radius: 10px;
  padding: 28px 20px;
  text-align: center;
  color: #5A4E3D;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

/* Responsive Breakpoints for 1921 Town */
@media (max-width: 1060px) {
  .town-workspace {
    grid-template-columns: 1fr;
  }
  .town-spotlight-panel {
    position: static;
  }
  .sp-body {
    max-height: none;
  }
}

@media (max-width: 760px) {
  .town-kpi-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .town-kbd-hint {
    display: none;
  }
  .town-jump-select {
    width: 100%;
    min-width: 0;
  }
  .town-jump-wrap {
    width: 100%;
  }
  .town-walk-step {
    width: 100%;
    justify-content: space-between;
  }
  .town-map-stage {
    min-height: 260px;
  }
  .town-dir-grid {
    grid-template-columns: 1fr;
  }
}

/* Wide-screen interactive canvas containers (Trees, Cemetery, 1921 Town) */
.wrap.tree-page-main,
.wrap.town-main,
.wrap.cem-page-main {
  max-width: min(96vw, 1840px);
}
@media (max-width: 760px) {
  .wrap.tree-page-main,
  .wrap.town-main,
  .wrap.cem-page-main {
    max-width: 100%;
  }
}

/* Homepage Grandparents Dedication Plaque (top-right on desktop, centered top on mobile) */
.mem-hero-dedication {
  position: absolute;
  top: 22px;
  right: 28px;
  z-index: 3;
  text-align: center;
  padding: 12px 18px 13px;
  border-radius: 10px;
  background: rgba(15, 22, 31, 0.70);
  border: 1px solid rgba(218, 186, 126, 0.36);
  backdrop-filter: blur(4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
  max-width: 260px;
}
.mem-ded-label {
  font-family: var(--sans);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #DFBC7B;
  margin-bottom: 6px;
}
.mem-ded-he {
  font-family: var(--hebrew);
  font-size: 17px;
  font-weight: 500;
  line-height: 1.38;
  color: #FFFBF2;
}
.mem-ded-and {
  font-family: var(--serif);
  font-style: italic;
  font-size: 12px;
  line-height: 1.2;
  color: #CDBE9F;
  margin: 2px 0;
}
@media (max-width: 1180px) {
  .mem-hero-dedication {
    position: relative;
    top: auto;
    right: auto;
    margin: 0 auto 24px;
    display: inline-block;
  }
  .mem-hero {
    text-align: center;
    padding-top: 32px;
  }
}

/* 1921 Town clickable Family Index (matches Cemetery legend) */
.town-family-legend {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(182, 166, 134, 0.34);
}

/* Sources & Archival Attribution block inside method-box */
.method-subhead {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid rgba(182, 166, 134, 0.35);
}
.method-intro {
  margin-bottom: 10px;
}
.sources-credit-list {
  margin: 0 0 14px;
  padding-left: 20px;
  display: grid;
  gap: 6px;
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink-soft, #3B3A36);
}
.sources-credit-list a,
.method-note a {
  color: var(--navy, #1B2838);
  text-decoration: underline;
  text-decoration-color: rgba(154, 116, 50, 0.5);
  text-underline-offset: 2px;
}
.method-note {
  font-size: 13.5px;
  color: var(--muted, #625C52);
  margin: 0;
}

/* HFPJC Preservation & Restoration Card on cemetery.html */
.hfpjc-card {
  margin: 28px auto 8px;
  background: #FFFDF8;
  border: 1px solid rgba(182, 166, 134, 0.45);
  border-radius: 14px;
  padding: 22px;
  display: grid;
  grid-template-columns: minmax(260px, 380px) 1fr;
  gap: 24px;
  align-items: center;
  box-shadow: 0 8px 26px rgba(27, 40, 56, 0.06);
}
.hfpjc-media img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 10px;
  border: 1px solid rgba(182, 166, 134, 0.45);
}
.hfpjc-caption {
  margin-top: 8px;
  font-size: 12.5px;
  color: var(--muted, #625C52);
  line-height: 1.45;
}
.hfpjc-caption a {
  color: var(--navy, #1B2838);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.hfpjc-eyebrow {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--gold-dark, #8A6522);
  margin-bottom: 6px;
}
.hfpjc-body h2 {
  font-family: var(--display);
  font-size: clamp(22px, 2.4vw, 28px);
  color: var(--navy, #1B2838);
  margin: 0 0 10px;
  line-height: 1.2;
}
.hfpjc-body p {
  font-size: 15px;
  line-height: 1.65;
  color: var(--ink-soft, #3B3A36);
  margin: 0 0 16px;
}
.hfpjc-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
@media (max-width: 820px) {
  .hfpjc-card {
    grid-template-columns: 1fr;
    padding: 18px;
    gap: 16px;
  }
}
