/* =====================================================
   THE LONG PLUNDER  -  styles
   Vanilla CSS, no frameworks
   ===================================================== */

:root {
  --bg: #0e0c0a;
  --bg-2: #181410;
  --bg-3: #221c14;
  --bg-card: #1f1a14;
  --bg-card-hover: #2a2218;
  --text: #efe6d8;
  --text-strong: #ffffff;
  --muted: #b6a890;
  --muted-2: #847866;
  --accent: #d97b2f;
  --accent-2: #e6a04b;
  --accent-soft: rgba(217, 123, 47, 0.12);
  --blood: #8a1818;
  --blood-soft: rgba(138, 24, 24, 0.18);
  --blood-text: #ff9c8f;
  --green: #1f6b3c;
  --green-soft: rgba(31, 107, 60, 0.18);
  --gold: #d4a85a;
  --line: #3a3024;
  --line-soft: #2a2218;
  --tag-atrocity: #6e1414;
  --tag-figure: #2b4a6b;
  --tag-resistance: #2f6b2f;
  --tag-event: #6b5524;
  --tag-famine: #5c2010;
  --tag-war: #4a2424;
  --tag-policy: #444444;
  --tag-milestone: #6b3a8a;
  --shadow-1: 0 4px 12px rgba(0,0,0,0.4);
  --shadow-2: 0 12px 36px rgba(0,0,0,0.6);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
[hidden] { display: none !important; }

body {
  margin: 0;
  font-family: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Palatino, Georgia, serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  font-size: 17px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
a { color: var(--accent-2); text-decoration: none; border-bottom: 1px dotted var(--accent-2); transition: color 0.15s, border-color 0.15s; }
a:hover { color: #fff; border-bottom-color: #fff; }
a:focus-visible, button:focus-visible, input:focus-visible {
  outline: 2px solid var(--accent-2);
  outline-offset: 2px;
  border-radius: 3px;
}
h1, h2, h3, h4 { font-family: "Iowan Old Style", "Palatino Linotype", Georgia, serif; font-weight: 700; letter-spacing: -0.01em; color: var(--text-strong); }
button { font-family: inherit; cursor: pointer; }
kbd {
  display: inline-block;
  padding: 1px 6px;
  font-size: 11px;
  background: rgba(255,255,255,0.08);
  border: 1px solid var(--line);
  border-radius: 3px;
  font-family: "SF Mono", "Menlo", monospace;
  color: var(--muted);
}
img { max-width: 100%; height: auto; }

/* =====================================================
   SITE HEADER
   ===================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(14, 12, 10, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.site-header-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  gap: 24px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-strong);
  border-bottom: none;
  flex-shrink: 0;
}
.brand:hover { color: var(--accent-2); border-bottom: none; }
.brand-mark { color: var(--accent); display: flex; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-title { font-weight: 700; font-size: 18px; }
.brand-sub { font-size: 11px; color: var(--muted-2); text-transform: uppercase; letter-spacing: 0.08em; margin-top: 2px; }

.primary-nav {
  display: flex;
  gap: 4px;
  margin-left: auto;
}
.primary-nav a {
  color: var(--muted);
  border-bottom: none;
  padding: 6px 12px;
  border-radius: 4px;
  font-size: 14.5px;
  font-weight: 500;
  transition: all 0.15s;
}
.primary-nav a:hover { color: var(--text-strong); background: var(--bg-card); border-bottom: none; }
.primary-nav a.active { color: var(--accent-2); background: var(--accent-soft); }

.search-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-card);
  border: 1px solid var(--line);
  color: var(--muted);
  padding: 6px 12px;
  border-radius: 4px;
  font-size: 13px;
  transition: all 0.15s;
}
.search-toggle:hover { color: var(--text); border-color: var(--accent); }
.search-toggle-text { font-family: inherit; }
.search-toggle kbd { font-size: 10.5px; }

.nav-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--line);
  width: 38px;
  height: 38px;
  border-radius: 4px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 0;
}
.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--text);
  border-radius: 1px;
  transition: transform 0.2s;
}

@media (max-width: 880px) {
  .primary-nav {
    position: fixed;
    top: 64px;
    left: 0; right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    padding: 16px;
    flex-direction: column;
    gap: 6px;
    transform: translateY(-200%);
    transition: transform 0.3s;
    z-index: 99;
    margin-left: 0;
  }
  .primary-nav.open { transform: translateY(0); }
  .primary-nav a { padding: 12px 16px; font-size: 16px; }
  .nav-toggle { display: flex; margin-left: auto; }
  .search-toggle-text { display: none; }
  .search-toggle kbd { display: none; }
  .brand-sub { display: none; }
}

/* =====================================================
   APP MAIN
   ===================================================== */
.app-main { flex: 1; }
.view { animation: fadeIn 0.35s ease-out; }
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}
.container-narrow {
  max-width: 820px;
  margin: 0 auto;
  padding: 0 24px;
}

/* =====================================================
   HOME PAGE
   ===================================================== */
.home-hero {
  padding: 100px 24px 60px;
  background:
    radial-gradient(ellipse at 30% 0%, rgba(217, 123, 47, 0.15) 0%, transparent 60%),
    radial-gradient(ellipse at 70% 100%, rgba(138, 24, 24, 0.10) 0%, transparent 60%),
    var(--bg);
  text-align: center;
  border-bottom: 1px solid var(--line);
  position: relative;
  overflow: hidden;
}
.home-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(217, 123, 47, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(217, 123, 47, 0.03) 1px, transparent 1px);
  background-size: 50px 50px;
  pointer-events: none;
}
.home-hero > * { position: relative; }
.hero-eyebrow {
  display: inline-block;
  font-size: 12px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent-2);
  margin-bottom: 24px;
  font-weight: 600;
}
.home-hero h1 {
  margin: 0 0 24px;
  font-size: clamp(40px, 7vw, 84px);
  line-height: 1.0;
  color: #fff;
  letter-spacing: -0.02em;
}
.hero-tagline {
  font-size: clamp(17px, 2.2vw, 22px);
  color: var(--accent-2);
  font-style: italic;
  margin: 0 auto 32px;
  max-width: 700px;
}
.hero-lede {
  max-width: 720px;
  margin: 0 auto 36px;
  color: var(--text);
  font-size: clamp(16px, 1.8vw, 19px);
  line-height: 1.7;
}
.hero-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 24px;
  background: var(--accent);
  color: #0e0c0a;
  border: 1px solid var(--accent);
  border-radius: 4px;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.15s;
  font-family: inherit;
}
.btn:hover { background: var(--accent-2); border-color: var(--accent-2); color: #0e0c0a; border-bottom: 1px solid var(--accent-2); }
.btn-secondary {
  background: transparent;
  color: var(--text);
  border-color: var(--line);
}
.btn-secondary:hover { background: var(--bg-card); color: var(--text-strong); border-color: var(--accent); }

/* Home stats */
.home-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  max-width: 1180px;
  margin: -32px auto 0;
  padding: 0 24px 60px;
  position: relative;
  z-index: 2;
}
.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 28px 22px;
  text-align: center;
  transition: border-color 0.2s, transform 0.2s;
}
.stat-card:hover { border-color: var(--accent); transform: translateY(-3px); }
.stat-num {
  font-size: clamp(28px, 4vw, 40px);
  color: var(--accent);
  font-weight: 700;
  line-height: 1.0;
  margin-bottom: 8px;
  font-feature-settings: "tnum" 1;
}
.stat-lbl {
  font-size: 12.5px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  line-height: 1.4;
}

/* Home featured sections */
.home-section {
  padding: 80px 0;
  border-bottom: 1px solid var(--line-soft);
}
.home-section:nth-child(even) { background: var(--bg-2); }
.home-section h2 {
  font-size: clamp(28px, 4vw, 40px);
  margin: 0 0 16px;
  letter-spacing: -0.01em;
}
.home-section-intro {
  color: var(--muted);
  max-width: 720px;
  margin: 0 0 36px;
  font-size: 16px;
}
.home-section-actions { margin-top: 28px; }

.featured-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}
.featured-card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 24px;
  transition: all 0.2s;
  cursor: pointer;
  border-bottom: 1px solid var(--line);
}
.featured-card:hover { border-color: var(--accent); transform: translateY(-2px); border-bottom: 1px solid var(--accent); }
.featured-card .year { color: var(--accent-2); font-size: 13px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 10px; }
.featured-card.witness-feature { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.featured-card.witness-feature .featured-photo { aspect-ratio: 16/10; overflow: hidden; }
.featured-card.witness-feature .featured-photo img { width: 100%; height: 100%; object-fit: cover; filter: sepia(0.08) contrast(1.02); transition: transform 0.4s; }
.featured-card.witness-feature:hover .featured-photo img { transform: scale(1.04); }
.featured-card.witness-feature .year { padding: 18px 24px 0; margin-bottom: 8px; }
.featured-card.witness-feature h3 { padding: 0 24px; margin-bottom: 8px; }
.featured-card.witness-feature p { padding: 0 24px 22px; }
.featured-card h3 { margin: 0 0 10px; font-size: 19px; color: var(--text-strong); line-height: 1.3; }
.featured-card p { margin: 0; color: var(--muted); font-size: 14.5px; line-height: 1.55; }

/* =====================================================
   TIMELINE VIEW
   ===================================================== */
.view-header {
  padding: 60px 24px 40px;
  text-align: center;
  border-bottom: 1px solid var(--line);
  background: var(--bg-2);
}
.view-header h1 {
  font-size: clamp(32px, 5vw, 52px);
  margin: 0 0 12px;
}
.view-header .lede {
  color: var(--muted);
  max-width: 720px;
  margin: 0 auto;
  font-size: clamp(15px, 1.8vw, 17px);
}

.era-nav-bar {
  position: sticky;
  top: 64px;
  z-index: 90;
  background: rgba(14, 12, 10, 0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.era-nav-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 10px 16px;
  display: flex;
  gap: 6px;
  overflow-x: auto;
}
.era-nav-inner a {
  color: var(--muted);
  border: 1px solid var(--line);
  padding: 7px 14px;
  border-radius: 4px;
  font-size: 12.5px;
  white-space: nowrap;
  flex-shrink: 0;
}
.era-nav-inner a:hover { color: var(--text); border-color: var(--accent); background: var(--bg-card); }

.filters-bar {
  max-width: 1180px;
  margin: 28px auto 0;
  padding: 0 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.filters-bar .label {
  color: var(--muted);
  font-size: 12.5px;
  margin-right: 6px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.filters-bar button {
  background: var(--bg-card);
  border: 1px solid var(--line);
  color: var(--muted);
  padding: 6px 12px;
  border-radius: 4px;
  font-size: 12.5px;
  transition: all 0.15s;
}
.filters-bar button:hover { color: var(--text); border-color: var(--accent); }
.filters-bar button.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #0e0c0a;
  font-weight: 600;
}

.timeline-wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding: 32px 24px 80px;
}
.era-banner {
  margin: 60px 0 32px;
  padding: 28px 28px 22px;
  background: linear-gradient(120deg, var(--accent-soft), rgba(217, 123, 47, 0.02));
  border-left: 4px solid var(--accent);
  border-radius: 0 8px 8px 0;
}
.era-banner:first-of-type { margin-top: 0; }
.era-banner h2 { margin: 0 0 6px; font-size: clamp(22px, 3vw, 30px); }
.era-banner .years { color: var(--accent-2); font-style: italic; font-size: 15px; margin-bottom: 12px; }
.era-banner .blurb { color: var(--muted); font-size: 15.5px; max-width: 820px; margin: 0; line-height: 1.65; }

.spine-wrap { position: relative; padding: 20px 0; }
.spine-wrap::before {
  content: '';
  position: absolute;
  left: 24px;
  top: 0; bottom: 0;
  width: 2px;
  background: linear-gradient(180deg, transparent, var(--line) 6%, var(--line) 94%, transparent);
}
@media (min-width: 820px) {
  .spine-wrap::before { left: 50%; transform: translateX(-1px); }
}

.event {
  position: relative;
  padding-left: 60px;
  margin-bottom: 32px;
}
.event::before {
  content: '';
  position: absolute;
  left: 17px;
  top: 24px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--accent);
  z-index: 2;
  transition: transform 0.2s;
}
.event:hover::before { transform: scale(1.25); }
.event.atrocity::before { border-color: var(--blood); background: var(--blood); }
.event.famine::before { border-color: #c9531e; background: #5c2010; }
.event.figure::before { border-color: var(--gold); background: var(--gold); }
.event.resistance::before { border-color: var(--green); background: var(--green); }
.event.milestone::before { border-color: #b07ad0; background: #b07ad0; }

@media (min-width: 820px) {
  .event { padding-left: 0; width: calc(50% - 36px); }
  .event:nth-child(even) { margin-left: auto; padding-right: 0; padding-left: 36px; }
  .event:nth-child(odd) { padding-right: 36px; text-align: right; }
  .event:nth-child(odd) .card-tags { justify-content: flex-end; }
  .event:nth-child(odd) .sources-row { justify-content: flex-end; }
  .event:nth-child(odd) .key-figures { justify-content: flex-end; }
  .event::before { left: auto; right: -45px; top: 26px; }
  .event:nth-child(even)::before { left: -45px; right: auto; }
}

.event-card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 22px;
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}
.event-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: var(--shadow-1);
}
.event-date {
  color: var(--accent-2);
  font-weight: 700;
  font-size: 12.5px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  margin-bottom: 6px;
}
.event-title {
  margin: 0 0 10px;
  font-size: 19px;
  line-height: 1.25;
}
.card-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.tag {
  font-size: 10.5px;
  padding: 3px 9px;
  border-radius: 100px;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 600;
}
.tag.atrocity { background: var(--tag-atrocity); }
.tag.figure { background: var(--tag-figure); }
.tag.resistance { background: var(--tag-resistance); }
.tag.event { background: var(--tag-event); }
.tag.famine { background: var(--tag-famine); }
.tag.war { background: var(--tag-war); }
.tag.policy { background: var(--tag-policy); }
.tag.milestone { background: var(--tag-milestone); }
.event-body {
  color: var(--text);
  font-size: 14.5px;
  line-height: 1.7;
}
.event-body p { margin: 0 0 10px; }
.event-body p:last-child { margin-bottom: 0; }
.event-body ul { padding-left: 22px; margin: 8px 0; }
.event-body li { margin-bottom: 4px; }
.toll {
  display: inline-block;
  background: var(--blood-soft);
  border: 1px solid rgba(138, 24, 24, 0.4);
  color: var(--blood-text);
  padding: 6px 12px;
  border-radius: 4px;
  font-size: 13px;
  margin: 8px 0;
  font-weight: 600;
}
.quote {
  border-left: 3px solid var(--accent);
  padding: 10px 14px;
  color: var(--muted);
  font-style: italic;
  font-size: 14px;
  margin: 12px 0;
  background: var(--accent-soft);
}
.quote cite {
  display: block;
  font-style: normal;
  color: var(--accent-2);
  font-size: 12px;
  margin-top: 6px;
  text-align: right;
}
.key-figures {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}
.figure-pill {
  background: rgba(43, 74, 107, 0.25);
  border: 1px solid rgba(43, 74, 107, 0.6);
  color: #aac8e6;
  padding: 4px 10px;
  border-radius: 100px;
  font-size: 11.5px;
  transition: all 0.15s;
  cursor: pointer;
}
.figure-pill:hover { background: rgba(43, 74, 107, 0.5); color: #fff; }
.sources-row {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px dashed var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}
.sources-row .src-label {
  color: var(--muted);
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.sources-row a {
  color: var(--muted);
  border-bottom: 1px dotted var(--muted);
  font-size: 12px;
}
.sources-row a:hover { color: var(--accent-2); border-bottom-color: var(--accent-2); }

.event.hidden { display: none; }

/* =====================================================
   FIGURES VIEW
   ===================================================== */
.figures-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 18px;
  padding: 40px 24px 80px;
  max-width: 1280px;
  margin: 0 auto;
}
.figure-card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  flex-direction: column;
}
.figure-card:hover {
  border-color: var(--accent);
  transform: translateY(-3px);
  box-shadow: var(--shadow-1);
}
.figure-portrait {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  background: linear-gradient(135deg, #2a1810, #1f1812);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.figure-portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
  filter: sepia(0.15) contrast(1.05);
  transition: filter 0.3s, transform 0.3s;
}
.figure-card:hover .figure-portrait img { filter: sepia(0); transform: scale(1.04); }
.figure-portrait .fallback {
  font-size: 64px;
  color: var(--accent);
  font-weight: 700;
  font-family: "Iowan Old Style", serif;
}
.figure-info {
  padding: 14px 16px 18px;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.figure-name {
  margin: 0 0 4px;
  font-size: 16px;
  color: var(--text-strong);
  line-height: 1.25;
}
.figure-lived {
  color: var(--accent-2);
  font-size: 11.5px;
  margin-bottom: 8px;
  letter-spacing: 0.03em;
}
.figure-role {
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.4;
  margin-top: auto;
}

.figures-filter {
  max-width: 1280px;
  margin: 0 auto;
  padding: 28px 24px 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.figures-filter .label { color: var(--muted); font-size: 12.5px; text-transform: uppercase; letter-spacing: 0.06em; margin-right: 6px; }
.figures-filter button {
  background: var(--bg-card);
  border: 1px solid var(--line);
  color: var(--muted);
  padding: 6px 14px;
  border-radius: 4px;
  font-size: 12.5px;
  transition: all 0.15s;
}
.figures-filter button:hover { color: var(--text); border-color: var(--accent); }
.figures-filter button.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #0e0c0a;
  font-weight: 600;
}
.figure-card.hidden { display: none; }

/* =====================================================
   MODAL
   ===================================================== */
.modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.2s ease-out;
}
.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.78);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.modal-content {
  position: relative;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 10px;
  max-width: 760px;
  width: calc(100% - 40px);
  max-height: 92vh;
  overflow-y: auto;
  box-shadow: var(--shadow-2);
  animation: modalIn 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
}
@keyframes modalIn {
  from { opacity: 0; transform: scale(0.96) translateY(8px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}
.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid var(--line);
  color: var(--text);
  font-size: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 5;
}
.modal-close:hover { background: var(--blood); border-color: var(--blood); }

.figure-modal-header {
  position: relative;
  height: 280px;
  background: linear-gradient(135deg, #2a1810, #1f1812);
  overflow: hidden;
}
.figure-modal-header img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  filter: sepia(0.1);
}
.figure-modal-header::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, var(--bg) 100%);
}
.figure-modal-body {
  padding: 28px 32px 36px;
  margin-top: -60px;
  position: relative;
}
.figure-modal-name {
  font-size: clamp(28px, 4vw, 38px);
  margin: 0 0 4px;
  line-height: 1.1;
}
.figure-modal-altnames {
  color: var(--accent-2);
  font-style: italic;
  font-size: 15px;
  margin-bottom: 6px;
}
.figure-modal-meta {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 20px;
  letter-spacing: 0.03em;
}
.figure-modal-meta strong { color: var(--accent-2); font-weight: 600; }
.figure-modal-bio p { margin: 0 0 14px; line-height: 1.7; color: var(--text); }
.figure-modal-quotes { margin: 24px 0; }
.figure-modal-quotes h4 { font-size: 13px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); margin: 0 0 10px; font-weight: 600; }
.figure-modal-related {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 18px 20px;
  margin-top: 24px;
}
.figure-modal-related h4 { font-size: 13px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); margin: 0 0 10px; font-weight: 600; }
.figure-modal-related ul { margin: 0; padding-left: 20px; color: var(--text); font-size: 14px; }
.figure-modal-related li { margin-bottom: 4px; }
.figure-modal-sources {
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px dashed var(--line);
}
.figure-modal-sources h4 { font-size: 13px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); margin: 0 0 10px; font-weight: 600; }
.figure-modal-sources a { display: inline-block; margin-right: 12px; font-size: 13px; }

/* Event modal (similar but simpler) */
.event-modal-body { padding: 32px; }
.event-modal-body .event-date { font-size: 13.5px; margin-bottom: 8px; }
.event-modal-body .event-title { font-size: 28px; margin-bottom: 16px; line-height: 1.15; }

/* =====================================================
   MAP VIEW
   ===================================================== */
.map-wrap {
  max-width: 1280px;
  margin: 0 auto;
  padding: 40px 24px 80px;
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 32px;
}
@media (max-width: 980px) {
  .map-wrap { grid-template-columns: 1fr; }
}
.map-container {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 20px;
  position: relative;
  min-height: 600px;
}
.india-map { width: 100%; height: auto; display: block; }
.india-map .outline {
  fill: var(--bg-2);
  stroke: var(--line);
  stroke-width: 1.5;
}
.india-map .water {
  fill: rgba(43, 74, 107, 0.15);
}
.india-map .marker {
  cursor: pointer;
  transition: all 0.2s;
}
.india-map .marker-dot {
  fill: var(--accent);
  stroke: var(--bg);
  stroke-width: 3;
  transition: all 0.2s;
}
.india-map .marker:hover .marker-dot,
.india-map .marker.selected .marker-dot {
  fill: var(--accent-2);
  r: 14;
}
.india-map .marker-ring {
  fill: none;
  stroke: var(--accent);
  stroke-width: 2;
  opacity: 0;
  transition: opacity 0.2s;
}
.india-map .marker.selected .marker-ring { opacity: 0.4; animation: pulseRing 1.5s ease-out infinite; }
@keyframes pulseRing {
  0% { r: 14; opacity: 0.6; }
  100% { r: 38; opacity: 0; }
}
.india-map .marker-label {
  fill: var(--text);
  font-size: 14px;
  font-family: inherit;
  pointer-events: none;
  text-anchor: middle;
  opacity: 0.7;
  font-weight: 500;
}
.india-map .marker.atrocity .marker-dot { fill: var(--blood); }
.india-map .marker.atrocity:hover .marker-dot { fill: #b85050; }
.map-container { min-height: 700px; }

/* =====================================================
   WITNESS GALLERY
   ===================================================== */
.witness-grid {
  max-width: 1280px;
  margin: 0 auto;
  padding: 40px 24px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 36px;
}
@media (min-width: 920px) {
  .witness-grid { grid-template-columns: 1fr 1fr; }
}
.witness-card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  transition: border-color 0.2s, transform 0.2s;
  display: flex;
  flex-direction: column;
}
.witness-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.witness-photo {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  background: linear-gradient(135deg, #2a1810, #1f1812);
  overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}
.witness-photo img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  filter: sepia(0.05) contrast(1.02);
  cursor: zoom-in;
  transition: transform 0.4s;
}
.witness-card:hover .witness-photo img { transform: scale(1.03); }
.witness-photo-fallback {
  display: none;
  position: absolute; inset: 0;
  background: var(--bg-3);
  color: var(--muted);
  font-size: 13px; text-align: center;
  align-items: center; justify-content: center;
  padding: 24px;
  font-style: italic;
}
.witness-photo.photo-failed .witness-photo-fallback { display: flex; }
.witness-photo.photo-failed img { display: none; }
.witness-body { padding: 22px; flex: 1; display: flex; flex-direction: column; }
.witness-date {
  color: var(--accent-2);
  font-weight: 700; font-size: 12px;
  letter-spacing: 0.08em; text-transform: uppercase;
  margin-bottom: 6px;
}
.witness-title {
  margin: 0 0 12px; font-size: 20px;
  color: var(--text-strong); line-height: 1.25;
}
.witness-caption {
  margin: 0 0 14px; color: var(--text);
  font-size: 14.5px; line-height: 1.65;
}
.witness-meta {
  display: flex; flex-direction: column; gap: 4px;
  font-size: 12.5px; color: var(--muted);
  margin: 8px 0;
}
.witness-meta strong { color: var(--accent-2); font-weight: 600; }
.witness-footer {
  max-width: 1080px; margin: 0 auto;
  padding: 24px; color: var(--muted);
  font-size: 13px; text-align: center;
  border-top: 1px solid var(--line-soft);
}

/* Lightbox */
.lightbox-wrap { padding: 24px; text-align: center; }
.lightbox-img { max-width: 100%; max-height: 78vh; border-radius: 4px; }
.lightbox-caption { color: var(--muted); font-size: 13px; margin-top: 12px; font-style: italic; }

/* SHARE BUTTONS */
.share-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px dashed var(--line);
}
.share-row .share-label {
  color: var(--muted);
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-right: 4px;
}
.share-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--bg-3);
  border: 1px solid var(--line);
  color: var(--muted);
  padding: 5px 10px;
  border-radius: 4px;
  font-size: 11.5px;
  font-family: inherit;
  cursor: pointer;
  text-decoration: none;
  border-bottom: 1px solid var(--line);
  transition: all 0.15s;
}
.share-btn:hover {
  color: var(--text-strong);
  border-color: var(--accent);
  background: var(--bg-card-hover);
  border-bottom: 1px solid var(--accent);
}
.share-btn.whatsapp:hover { color: #25d366; border-color: #25d366; border-bottom-color: #25d366; }
.share-btn.twitter:hover { color: #1da1f2; border-color: #1da1f2; border-bottom-color: #1da1f2; }
.share-btn.reddit:hover { color: #ff4500; border-color: #ff4500; border-bottom-color: #ff4500; }
.share-btn.quote-card:hover { color: var(--accent); border-color: var(--accent); border-bottom-color: var(--accent); }
.share-btn svg { flex-shrink: 0; }

/* Photo support in event cards */
.event-photo {
  margin: 14px -22px 0;
  width: calc(100% + 44px);
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--bg-3);
}
.event-photo img {
  width: 100%; height: 100%;
  object-fit: cover; display: block;
  filter: sepia(0.05);
}
.event-photo-caption {
  font-size: 11px; color: var(--muted);
  padding: 8px 22px 0;
  font-style: italic;
}

.map-side {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 24px;
  max-height: 700px;
  overflow-y: auto;
  position: sticky;
  top: 100px;
}
@media (max-width: 980px) {
  .map-side { position: static; max-height: none; }
}
.map-side h2 { font-size: 20px; margin: 0 0 4px; }
.map-side .side-sub { color: var(--muted); font-size: 13px; margin: 0 0 18px; }
.map-event-list { list-style: none; padding: 0; margin: 0; }
.map-event-list li {
  padding: 12px 0;
  border-bottom: 1px solid var(--line-soft);
}
.map-event-list li:last-child { border-bottom: none; }
.map-event-list .yr { color: var(--accent-2); font-size: 12px; font-weight: 600; letter-spacing: 0.04em; }
.map-event-list .tt { color: var(--text); font-size: 14px; margin: 4px 0 0; line-height: 1.4; }
.map-empty { color: var(--muted); font-style: italic; padding: 20px 0; font-size: 14px; text-align: center; }
.map-legend {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  font-size: 12px;
  color: var(--muted);
}
.map-legend span { display: inline-flex; align-items: center; gap: 6px; }
.map-legend .dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.map-legend .dot.normal { background: var(--accent); }
.map-legend .dot.atrocity { background: var(--blood); }

/* =====================================================
   NUMBERS VIEW (data viz)
   ===================================================== */
.numbers-wrap {
  max-width: 1080px;
  margin: 0 auto;
  padding: 40px 24px 80px;
}
.chart-block {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 32px;
  margin-bottom: 28px;
}
.chart-block h2 {
  font-size: clamp(22px, 3vw, 28px);
  margin: 0 0 8px;
}
.chart-block .chart-sub {
  color: var(--muted);
  margin: 0 0 24px;
  font-size: 15px;
  max-width: 720px;
}
.chart-svg { width: 100%; height: auto; display: block; }
.chart-axis { stroke: var(--line); stroke-width: 1; }
.chart-axis-text { fill: var(--muted); font-size: 11px; font-family: inherit; }
.chart-grid { stroke: var(--line-soft); stroke-width: 1; stroke-dasharray: 2,3; }
.chart-line { fill: none; stroke: var(--accent); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.chart-line-fill { fill: var(--accent); opacity: 0.15; }
.chart-bar { fill: var(--blood); transition: fill 0.2s; }
.chart-bar:hover { fill: #b85050; }
.chart-bar-label { fill: var(--muted); font-size: 11px; font-family: inherit; }
.chart-point { fill: var(--accent-2); stroke: var(--bg); stroke-width: 2; transition: r 0.2s; }
.chart-point:hover { r: 6; }
.chart-point-label { fill: var(--text-strong); font-size: 11px; font-weight: 600; font-family: inherit; }
.chart-tooltip {
  position: absolute;
  background: var(--bg);
  border: 1px solid var(--accent);
  padding: 8px 12px;
  border-radius: 4px;
  pointer-events: none;
  font-size: 13px;
  display: none;
  z-index: 10;
  white-space: nowrap;
}

.compare-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-top: 16px;
}
.compare-card {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 22px;
}
.compare-card h4 { margin: 0 0 14px; font-size: 14px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; font-weight: 600; }
.compare-row { display: flex; justify-content: space-between; align-items: baseline; padding: 8px 0; border-bottom: 1px dashed var(--line); }
.compare-row:last-child { border-bottom: none; }
.compare-row .when { color: var(--muted); font-size: 13px; }
.compare-row .val { color: var(--accent-2); font-weight: 700; font-size: 18px; }

/* =====================================================
   ABOUT VIEW
   ===================================================== */
.about-wrap {
  max-width: 820px;
  margin: 0 auto;
  padding: 40px 24px 80px;
  font-size: 16.5px;
  line-height: 1.75;
}
.about-wrap h2 {
  font-size: clamp(22px, 3vw, 30px);
  margin: 40px 0 12px;
  padding-top: 24px;
  border-top: 1px solid var(--line-soft);
}
.about-wrap h2:first-child { margin-top: 0; padding-top: 0; border-top: none; }
.about-wrap p { color: var(--text); margin: 0 0 16px; }
.about-wrap ul { color: var(--text); padding-left: 22px; }
.about-wrap li { margin-bottom: 8px; }
.about-wrap em { color: var(--accent-2); font-style: italic; }
.callout {
  background: var(--accent-soft);
  border-left: 4px solid var(--accent);
  padding: 20px 24px;
  margin: 24px 0;
  border-radius: 0 6px 6px 0;
}
.callout p:first-child { margin-top: 0; }
.callout p:last-child { margin-bottom: 0; }

/* =====================================================
   SEARCH OVERLAY
   ===================================================== */
.search-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 1000;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 10vh;
  animation: fadeIn 0.2s;
}
.search-box {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 10px;
  width: calc(100% - 40px);
  max-width: 680px;
  max-height: 75vh;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-2);
}
.search-input-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
}
.search-input-row svg { color: var(--muted); flex-shrink: 0; }
#search-input {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text);
  font-size: 18px;
  font-family: inherit;
  outline: none;
  padding: 4px 0;
}
#search-input::placeholder { color: var(--muted-2); }
#search-close {
  background: transparent;
  border: none;
  color: var(--muted);
  font-size: 28px;
  width: 32px;
  height: 32px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}
#search-close:hover { background: var(--bg-card); color: var(--text); }
.search-results {
  flex: 1;
  overflow-y: auto;
  padding: 8px;
}
.search-result {
  display: block;
  padding: 12px 14px;
  border-radius: 6px;
  color: var(--text);
  border-bottom: none;
  transition: background 0.1s;
  cursor: pointer;
}
.search-result:hover, .search-result.active { background: var(--bg-card); color: var(--text-strong); border-bottom: none; }
.search-result .res-type { font-size: 10.5px; color: var(--accent-2); text-transform: uppercase; letter-spacing: 0.08em; }
.search-result .res-title { font-size: 15px; margin-top: 3px; line-height: 1.3; }
.search-result .res-sub { font-size: 12.5px; color: var(--muted); margin-top: 3px; }
.search-results .no-results { padding: 32px; text-align: center; color: var(--muted); font-style: italic; }
.search-tips {
  padding: 10px 16px;
  font-size: 12px;
  color: var(--muted);
  border-top: 1px solid var(--line);
  text-align: center;
}

/* =====================================================
   SITE FOOTER
   ===================================================== */
.site-footer {
  background: var(--bg-2);
  border-top: 1px solid var(--line);
  padding: 40px 24px;
  margin-top: 60px;
}
.site-footer-inner {
  max-width: 1180px;
  margin: 0 auto;
  color: var(--muted);
  font-size: 14px;
  text-align: center;
}
.site-footer-inner p { margin: 0 0 8px; }
.site-footer-credit { font-size: 12.5px; color: var(--muted-2); margin-top: 12px; }

/* =====================================================
   UTILITIES
   ===================================================== */
.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;
}
.text-center { text-align: center; }
.mt-1 { margin-top: 8px; } .mt-2 { margin-top: 16px; } .mt-3 { margin-top: 24px; } .mt-4 { margin-top: 32px; }
