/* ============================================================
   KEY EVIDENCE — REDESIGN ADDITIONS
   Charles Gannsen Research · added 9 May 2026
   ============================================================
   Adds a scannable summary strip, filter-chip bar, and see-also
   cross-link footer to the existing #evidence section without
   touching the per-card markup the cinematic.css and dark-mode.css
   rules already target. The 8 cards keep their existing
   <details class="card accent evidence-card"> structure — these
   styles wrap and complement them.

   Design tokens are inherited from theme.css (light) and
   dark-mode.css (dark) — every color uses var() so this CSS
   automatically tracks both themes.
   ------------------------------------------------------------ */

/* ---- Summary strip (at-a-glance scan view) ------------------ */
.ev-strip-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin: 1.6rem 0 0.6rem;
}
.ev-strip-head h3 {
  font-family: var(--font-display, 'Cormorant Garamond', Georgia, serif);
  font-size: 1.25rem;
  margin: 0;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--brand-dark, #8a6420);
}
.ev-strip-head .ev-strip-helper {
  font-size: 0.78rem;
  color: var(--text-meta, #6a5a42);
  font-style: italic;
}

.ev-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.7rem;
  margin-bottom: 1.4rem;
}
@media (max-width: 880px) { .ev-strip { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 540px) { .ev-strip { grid-template-columns: 1fr; } }

.ev-tile {
  display: block;
  background: var(--bg-card, #fffaf0);
  border: 1px solid var(--border-light, #d8c8a8);
  border-left: 4px solid var(--brand-dark, #8a6420);
  border-radius: 4px;
  padding: 0.65rem 0.85rem 0.7rem;
  text-decoration: none;
  color: inherit;
  transition: background 0.18s, border-color 0.18s, transform 0.18s, box-shadow 0.18s;
}
.ev-tile:hover {
  background: var(--bg-elevated, #f6ebd2);
  border-color: var(--border-medium, #d8b366);
  border-left-color: var(--brand, #d8b366);
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}
.ev-tile.keystone {
  border-left-color: var(--section-civilwar, #805c3f);
  background: linear-gradient(135deg, rgba(144, 103, 71, 0.04) 0%, var(--bg-card, #fffaf0) 70%);
}
.ev-tile-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.4rem;
  margin-bottom: 0.25rem;
}
.ev-tile-num {
  font-family: var(--font-display, 'Cormorant Garamond', Georgia, serif);
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 1;
  color: var(--brand-dark, #8a6420);
}
.ev-tile.keystone .ev-tile-num { color: var(--section-civilwar, #906747); }
.ev-tile-date {
  font-size: 0.76rem;
  font-family: var(--font-mono, 'SF Mono', Menlo, monospace);
  color: var(--text-meta, #6a5a42);
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.ev-tile-title {
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--text-strong, #3a2f1e);
  line-height: 1.3;
  margin-bottom: 0.35rem;
}
.ev-tile-pin {
  display: inline-block;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 700;
  padding: 0.12rem 0.45rem;
  border-radius: 4px;
  background: rgba(216, 179, 102, 0.18);
  color: var(--brand-dark, #8a6420);
}
.ev-tile-pin.kurhessen { background: rgba(200, 74, 74, 0.12); color: #a3441f; }
.ev-tile-pin.surname   { background: rgba(122, 156, 90, 0.14); color: #5a7c3a; }
.ev-tile-pin.service   { background: rgba(168, 128, 74, 0.14); color: #80582c; }
.ev-tile-pin.identity  { background: rgba(106, 138, 204, 0.14); color: #2a4a8a; }

/* Dark-mode pin colors */
@media (prefers-color-scheme: dark) {
  html:not(.theme-light) .ev-tile-pin           { background: rgba(216, 179, 102, 0.22); color: #fadea0; }
  html:not(.theme-light) .ev-tile-pin.kurhessen { background: rgba(200, 90, 72, 0.22);  color: #f4a098; }
  html:not(.theme-light) .ev-tile-pin.surname   { background: rgba(122, 156, 90, 0.22); color: #b8e0a4; }
  html:not(.theme-light) .ev-tile-pin.service   { background: rgba(168, 128, 74, 0.22); color: #f0d8a8; }
  html:not(.theme-light) .ev-tile-pin.identity  { background: rgba(106, 138, 204, 0.22); color: #a8c0e0; }
  html:not(.theme-light) .ev-tile-num           { color: var(--brand-light, #fadea0); }
  html:not(.theme-light) .ev-tile.keystone .ev-tile-num { color: #d9c4b3; }
}
:root.theme-dark .ev-tile-pin           { background: rgba(216, 179, 102, 0.22); color: #fadea0; }
:root.theme-dark .ev-tile-pin.kurhessen { background: rgba(200, 90, 72, 0.22);  color: #f4a098; }
:root.theme-dark .ev-tile-pin.surname   { background: rgba(122, 156, 90, 0.22); color: #b8e0a4; }
:root.theme-dark .ev-tile-pin.service   { background: rgba(168, 128, 74, 0.22); color: #f0d8a8; }
:root.theme-dark .ev-tile-pin.identity  { background: rgba(106, 138, 204, 0.22); color: #a8c0e0; }
:root.theme-dark .ev-tile-num           { color: var(--brand-light, #fadea0); }
:root.theme-dark .ev-tile.keystone .ev-tile-num { color: #d9c4b3; }

/* ---- Filter chip bar ---------------------------------------- */
.ev-filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 0.9rem;
  padding: 0.7rem 0.95rem;
  background: var(--bg-card-tint, #f6ebd2);
  border: 1px solid var(--border-light, #d8c8a8);
  border-radius: 4px;
  margin: 0 0 1.6rem;
}
.ev-filter-group {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
}
.ev-filter-group .ev-filter-label {
  font-size: 0.76rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-meta, #6a5a42);
  font-weight: 700;
  margin-right: 0.2rem;
}
.ev-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.22rem 0.6rem;
  background: transparent;
  border: 1px solid var(--border-medium, #d8b366);
  border-radius: 999px;
  color: var(--text-body, #3a2f1e);
  font-size: 0.78rem;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.ev-chip:hover {
  background: var(--bg-elevated, #f6ebd2);
  border-color: var(--brand-dark, #8a6420);
  color: var(--brand-dark, #8a6420);
}
.ev-chip.active {
  background: var(--brand, #d8b366);
  color: #1f1a14;
  border-color: var(--brand, #d8b366);
}
.ev-chip-count {
  font-size: 0.76rem;
  opacity: 0.7;
  font-variant-numeric: tabular-nums;
}
.ev-chip.active .ev-chip-count { opacity: 1; }
.ev-filter-bar .ev-sep {
  width: 1px;
  height: 1.1rem;
  background: var(--border-medium, #d8b366);
  margin: 0 0.2rem;
}

@media (prefers-color-scheme: dark) {
  html:not(.theme-light) .ev-chip {
    background: transparent;
    border-color: var(--border-medium, #33496b);
    color: var(--text-body, #e8dfc8);
  }
  html:not(.theme-light) .ev-chip:hover {
    background: var(--bg-elevated, #1e2c43);
    border-color: var(--brand-dark, #d8b366);
    color: var(--brand-light, #fadea0);
  }
  html:not(.theme-light) .ev-chip.active {
    background: var(--brand, #e6c47a);
    color: #162132;
    border-color: var(--brand, #e6c47a);
  }
}
:root.theme-dark .ev-chip {
  background: transparent;
  border-color: var(--border-medium, #33496b);
  color: var(--text-body, #e8dfc8);
}
:root.theme-dark .ev-chip:hover {
  background: var(--bg-elevated, #1e2c43);
  border-color: var(--brand-dark, #d8b366);
  color: var(--brand-light, #fadea0);
}
:root.theme-dark .ev-chip.active {
  background: var(--brand, #e6c47a);
  color: #162132;
  border-color: var(--brand, #e6c47a);
}

/* ---- Filter-applied state: hide non-matching cards --------- */
.evidence-cards.ev-filtered details.evidence-card[data-ev-hidden="true"] {
  display: none !important;
}

/* ---- Card highlight when targeted via #card6 etc. ---------- */
details.evidence-card:target {
  border-left-width: 4px !important;
  box-shadow: 0 0 0 2px rgba(216, 179, 102, 0.3);
  scroll-margin-top: 4rem;
}

/* ---- See-also cross-references footer ---------------------- */
.ev-see-also {
  margin-top: 0.6rem;
  padding: 0.55rem 0.9rem;
  background: rgba(216, 179, 102, 0.06);
  border: 1px dashed var(--border-medium, #d8b366);
  border-radius: 4px;
  font-size: 0.8rem;
  color: var(--text-meta, #6a5a42);
}
.ev-see-also strong {
  color: var(--text-meta, #6a5a42);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-right: 0.4rem;
  font-weight: 700;
}
.ev-see-also a {
  color: var(--brand-dark, #8a6420);
  text-decoration: none;
  margin: 0 0.18rem;
  border-bottom: 1px dotted var(--brand-dark, #8a6420);
  font-weight: 500;
  white-space: nowrap;
}
.ev-see-also a:hover {
  color: var(--brand, #d8b366);
  border-bottom-color: var(--brand, #d8b366);
}
.ev-see-also .sep { color: var(--border-medium, #d8b366); margin: 0 0.15rem; }

@media (prefers-color-scheme: dark) {
  html:not(.theme-light) .ev-see-also {
    background: rgba(216, 179, 102, 0.05);
    border-color: var(--border-medium, #33496b);
    color: var(--text-meta, #c8b896);
  }
  html:not(.theme-light) .ev-see-also strong { color: var(--text-meta, #c8b896); }
  html:not(.theme-light) .ev-see-also a {
    color: var(--brand-light, #fadea0);
    border-bottom-color: var(--brand-dark, #d8b366);
  }
  html:not(.theme-light) .ev-see-also a:hover {
    color: var(--brand, #e6c47a);
    border-bottom-color: var(--brand, #e6c47a);
  }
}
:root.theme-dark .ev-see-also {
  background: rgba(216, 179, 102, 0.05);
  border-color: var(--border-medium, #33496b);
  color: var(--text-meta, #c8b896);
}
:root.theme-dark .ev-see-also strong { color: var(--text-meta, #c8b896); }
:root.theme-dark .ev-see-also a {
  color: var(--brand-light, #fadea0);
  border-bottom-color: var(--brand-dark, #d8b366);
}
:root.theme-dark .ev-see-also a:hover {
  color: var(--brand, #e6c47a);
  border-bottom-color: var(--brand, #e6c47a);
}

/* ---- "What this tells us" — promote to always-visible ------
   The .ec-tells callout is currently the first child of .ec-body
   (inside the <details> body). To make the takeaway visible
   without expanding each card, we render a teaser version in
   the summary line via the data-tells-teaser attribute. The
   full callout remains in the body unchanged.
   ------------------------------------------------------------ */
details.evidence-card > summary .ec-summary-content > h3 {
  margin-bottom: 0.15rem;
}

/* When the page is targeting a specific card via #card6 etc.,
   open it automatically — handled by JS that adds `open` to the
   matched <details>. CSS just smooths the transition. */
details.evidence-card { transition: border-left-color 0.2s; }

/* ============================================================
   FLAT CARD ANATOMY — added 10 May 2026
   Replaces the nested-<details> per-card structure with an
   always-open <article class="ev-card-v2"> built from:
     head (number + title + date pill + badge + meta line)
     tells   (always-visible "What this tells us")
     facts   (key/value strip — the buried-in-callouts surfaced)
     thumb   (image of the document, if any)
     deep    (single inline <details> per card — no nesting)
     links   (source links row)
     see-also (cross-references)
   All colors via CSS variables so theme.css/dark-mode.css drive
   light + dark with no further overrides except the few accents.
   ============================================================ */

/* Container layout — sits inside .evidence-cards (flex column).
   Inherits the sitewide body font (Iowan Old Style serif via
   theme.css :root rule) so the prose inside cards reads the same
   as the overview tab's body text. UI labels still get var(--font-ui)
   on their own selectors below. */
.ev-card-v2 {
  background: var(--bg-card, #fffaf0);
  border: 1px solid var(--border-light, #d8c8a8);
  border-left: 4px solid var(--brand-dark, #d8b366);
  border-radius: 4px;
  overflow: hidden;
  transition: border-color 0.2s;
  font-family: var(--font-serif, 'Iowan Old Style', Georgia, 'Times New Roman', serif);
  /* Clear the sticky tab bar (nav.tabs, ~3.3rem) when scrolled to via
     #card1 etc., so the card number sits cleanly below the nav rather
     than tucked behind it. Matches the sitewide 4rem offset convention. */
  scroll-margin-top: 4rem;
}
.ev-card-v2.keystone {
  border-left-color: var(--section-civilwar, #805c3f);
}
.ev-card-v2:target {
  border-left-color: var(--brand, #d8b366);
  box-shadow: 0 0 0 2px rgba(216, 179, 102, 0.30);
  scroll-margin-top: 4rem;
}

/* --- Head ---------------------------------------------------- */
.ev-card-v2 .ev-head {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1rem 1.2rem 0.7rem;
  border-bottom: 1px solid var(--border-light, #d8c8a8);
}
.ev-card-v2 .ev-num {
  flex: 0 0 auto;
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 50%;
  background: var(--bg-elevated, #fffaf0);
  border: 1.5px solid var(--brand-dark, #d8b366);
  color: var(--brand-dark, #8a6420);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display, 'Cormorant Garamond', Georgia, serif);
  font-weight: 600;
  font-size: 1.2rem;
  line-height: 1;
}
.ev-card-v2.keystone .ev-num {
  background: rgba(144, 103, 71, 0.12);
  border-color: var(--section-civilwar, #805c3f);
  color: var(--section-civilwar, #906747);
}
.ev-card-v2 .ev-head-main { flex: 1 1 auto; min-width: 0; }
.ev-card-v2 .ev-head-row {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.18rem;
}
.ev-card-v2 .ev-head-row h3 {
  font-family: var(--font-display, 'Cormorant Garamond', Georgia, serif);
  font-size: 1.18rem;
  color: var(--text-heading, #8a6420);
  margin: 0;
  font-weight: 600;
  line-height: 1.3;
}
.ev-card-v2 .ev-date-pill {
  display: inline-block;
  font-family: var(--font-mono, 'SF Mono', Menlo, monospace);
  font-size: 0.72rem;
  color: var(--brand-dark, #8a6420);
  background: var(--bg-card-tint, #f6ebd2);
  border: 1px solid var(--brand-dark, #d8b366);
  border-radius: 4px;
  padding: 0.1rem 0.45rem;
  letter-spacing: 0.02em;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.ev-card-v2 .ev-badge {
  display: inline-block;
  font-family: var(--font-ui, Inter, sans-serif);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  background: var(--status-confirmed, #2f496b);
  color: #f6f1e7;
}
.ev-card-v2 .ev-meta-line {
  margin-top: 0.18rem;
  font-size: 0.78rem;
  color: var(--text-meta, #6a5a42);
  font-style: italic;
}

/* --- Tells (always visible) --------------------------------- */
.ev-card-v2 .ev-tells {
  padding: 0.85rem 1.2rem 0.95rem;
  background: var(--bg-card-tint, #f6ebd2);
  border-bottom: 1px solid var(--border-light, #d8c8a8);
}
.ev-card-v2 .ev-tells-label {
  display: inline-block;
  font-family: var(--font-ui, Inter, sans-serif);
  font-size: 0.76rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--brand-dark, #8a6420);
  font-weight: 700;
  margin-bottom: 0.3rem;
}
.ev-card-v2 .ev-tells-label .ev-star {
  color: var(--brand, #d8b366);
  margin-right: 0.2rem;
}
.ev-card-v2 .ev-tells p {
  margin: 0;
  color: var(--text-strong, #3a2f1e);
  font-size: 0.94rem;
  line-height: 1.6;
}
.ev-card-v2 .ev-tells p strong { color: var(--brand-dark, #8a6420); font-weight: 700; }
.ev-card-v2 .ev-tells p + p { margin-top: 0.55rem; }

/* --- Facts strip (key/value pairs) -------------------------- */
.ev-card-v2 .ev-facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0.55rem 1.2rem;
  padding: 0.7rem 1.2rem 0.85rem;
  border-bottom: 1px solid var(--border-light, #d8c8a8);
  background: var(--bg-card, #fffaf0);
  margin: 0;
}
.ev-card-v2 .ev-fact { display: flex; flex-direction: column; min-width: 0; }
.ev-card-v2 .ev-facts dt {
  font-family: var(--font-ui, Inter, sans-serif);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-meta, #6a5a42);
  font-weight: 700;
  margin-bottom: 0.1rem;
}
.ev-card-v2 .ev-facts dd {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-strong, #3a2f1e);
  line-height: 1.4;
}

/* --- Thumb row (document image) -----------------------------
   Default: medium thumbnail (320px) — appropriate for short
   tables, portraits, and any image where the headline detail
   has already been transcribed in the body.
   Per-card overrides further down promote full-width display
   on cards where the source handwriting needs to be readable
   in-page (Card 3 marriage register, Card 6 baptism register). */
.ev-card-v2 .ev-thumb-row {
  display: block;
  padding: 0.9rem 1.2rem 0;
  text-decoration: none;
}
.ev-card-v2 .ev-thumb-row img {
  display: block;
  max-width: 320px;
  width: 100%;
  height: auto;
  border: 1px solid var(--border-medium, #a88a4a);
  border-radius: 3px;
  margin: 0 auto;
  background: #fffaf0;
  transition: transform 0.18s, box-shadow 0.18s;
}
.ev-card-v2 .ev-thumb-row:hover img {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0,0,0,0.18);
}
.ev-card-v2 .ev-thumb-cap {
  display: block;
  font-size: 0.95rem;
  color: var(--text-strong, #3a2f1e);
  font-style: italic;
  text-align: center;
  margin: 0.6rem auto 0;
  max-width: 460px;
  line-height: 1.4;
  font-family: var(--font-serif, 'Iowan Old Style', Georgia, serif);
}

/* Per-card large-thumbnail overrides — parish-register and
   naturalization scans where the user wants the original
   document handwriting readable in-page. */
.ev-card-v2#card3 .ev-thumb-row img,
.ev-card-v2#card5 .ev-thumb-row img,
.ev-card-v2#card6 .ev-thumb-row img {
  max-width: 100%;
}
.ev-card-v2#card3 .ev-thumb-cap,
.ev-card-v2#card5 .ev-thumb-cap,
.ev-card-v2#card6 .ev-thumb-cap {
  max-width: 100%;
}

/* --- Deep-dive inline expander (one per card, never nested) -- */
.ev-card-v2 .ev-deep {
  margin: 0.85rem 1.2rem 0;
  border: 1px solid var(--border-medium, #a88a4a);
  border-left: 4px solid var(--brand-dark, #d8b366);
  border-radius: 4px;
  background: var(--bg-elevated, #fffaf0);
  overflow: hidden;
}
.ev-card-v2 .ev-deep > summary {
  cursor: pointer;
  list-style: none;
  padding: 0.55rem 0.9rem;
  font-family: var(--font-ui, Inter, sans-serif);
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--brand-dark, #8a6420);
  display: flex;
  align-items: center;
  gap: 0.4rem;
  transition: background 0.15s;
}
.ev-card-v2 .ev-deep > summary::-webkit-details-marker { display: none; }
.ev-card-v2 .ev-deep > summary::before {
  content: '▶';
  font-size: 0.72rem;
  color: var(--brand-dark, #8a6420);
  transition: transform 0.18s;
}
.ev-card-v2 .ev-deep[open] > summary::before { transform: rotate(90deg); }
.ev-card-v2 .ev-deep > summary:hover { background: var(--bg-card-tint, #f6ebd2); }
.ev-card-v2 .ev-deep .ev-deep-body {
  padding: 0.7rem 0.9rem 0.85rem;
  border-top: 1px solid var(--border-light, #d8c8a8);
  font-size: 0.88rem;
  line-height: 1.55;
  color: var(--text-body, #2c2620);
}
.ev-card-v2 .ev-deep .ev-deep-body > *:first-child { margin-top: 0; }
.ev-card-v2 .ev-deep .ev-deep-body > *:last-child  { margin-bottom: 0; }

/* --- Source-links row --------------------------------------- */
.ev-card-v2 .ev-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 0.7rem;
  padding: 0.85rem 1.2rem 0.9rem;
  background: var(--bg-card, #fffaf0);
  border-top: 1px solid var(--border-light, #d8c8a8);
  margin-top: 0.85rem;
}
.ev-card-v2 .ev-links-label {
  font-family: var(--font-ui, Inter, sans-serif);
  font-size: 0.76rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-meta, #6a5a42);
  font-weight: 700;
  margin-right: 0.2rem;
}
.ev-card-v2 .ev-links a {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.28rem 0.6rem;
  border: 1px solid var(--border-medium, #a88a4a);
  border-radius: 4px;
  color: var(--brand-dark, #8a6420);
  text-decoration: none;
  font-family: var(--font-ui, Inter, sans-serif);
  font-size: 0.8rem;
  font-weight: 500;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.ev-card-v2 .ev-links a:hover {
  background: var(--brand-dark, #d8b366);
  color: #1f1a14;
  border-color: var(--brand, #d8b366);
}

/* --- See-also footer (overrides the older .ev-see-also for v2) */
.ev-card-v2 .ev-see-also {
  margin: 0;
  padding: 0.55rem 1.2rem 0.65rem;
  background: var(--bg-card, #fffaf0);
  border-top: 1px dashed var(--border-light, #d8c8a8);
  border-radius: 0;
  font-size: 0.78rem;
  color: var(--text-meta, #6a5a42);
}

/* --- Filter-applied state: hide non-matching v2 cards -------- */
.evidence-cards.ev-filtered .ev-card-v2[data-ev-hidden="true"] {
  display: none !important;
}

/* ---- Dark mode overrides for flat cards -------------------- */
:root.theme-dark .ev-card-v2 .ev-num                  { color: var(--brand-light, #fadea0); background: var(--bg-elevated, #1e2c43); }
:root.theme-dark .ev-card-v2.keystone .ev-num         { color: #d9c4b3; background: rgba(144, 103, 71, 0.18); }
:root.theme-dark .ev-card-v2 .ev-head-row h3          { color: var(--text-heading, #f1cf85); }
:root.theme-dark .ev-card-v2 .ev-date-pill            { color: var(--brand-light, #fadea0); background: var(--bg-deep, #0b1119); border-color: var(--brand-dark, #d8b366); }
:root.theme-dark .ev-card-v2 .ev-badge                { background: var(--status-confirmed, #6083b0); color: #0b1119; }
:root.theme-dark .ev-card-v2 .ev-tells-label          { color: var(--brand-light, #fadea0); }
:root.theme-dark .ev-card-v2 .ev-tells-label .ev-star { color: var(--brand, #e6c47a); }
:root.theme-dark .ev-card-v2 .ev-tells p              { color: var(--text-strong, #f4ead0); }
:root.theme-dark .ev-card-v2 .ev-tells p strong       { color: var(--brand-light, #fadea0); }
:root.theme-dark .ev-card-v2 .ev-facts dd             { color: var(--text-strong, #f4ead0); }
:root.theme-dark .ev-card-v2 .ev-deep > summary       { color: var(--brand-light, #fadea0); }
:root.theme-dark .ev-card-v2 .ev-deep > summary::before { color: var(--brand-light, #fadea0); }
:root.theme-dark .ev-card-v2 .ev-deep                 { background: var(--bg-elevated, #1e2c43); border-color: var(--border-medium, #33496b); }
:root.theme-dark .ev-card-v2 .ev-links a              { color: var(--brand-light, #fadea0); border-color: var(--border-medium, #33496b); }
:root.theme-dark .ev-card-v2 .ev-links a:hover        { background: var(--brand-dark, #d8b366); color: #131d2b; border-color: var(--brand, #e6c47a); }

@media (prefers-color-scheme: dark) {
  html:not(.theme-light) .ev-card-v2 .ev-num                  { color: var(--brand-light, #fadea0); background: var(--bg-elevated, #1e2c43); }
  html:not(.theme-light) .ev-card-v2.keystone .ev-num         { color: #d9c4b3; background: rgba(144, 103, 71, 0.18); }
  html:not(.theme-light) .ev-card-v2 .ev-head-row h3          { color: var(--text-heading, #f1cf85); }
  html:not(.theme-light) .ev-card-v2 .ev-date-pill            { color: var(--brand-light, #fadea0); background: var(--bg-deep, #0b1119); border-color: var(--brand-dark, #d8b366); }
  html:not(.theme-light) .ev-card-v2 .ev-badge                { background: var(--status-confirmed, #6083b0); color: #0b1119; }
  html:not(.theme-light) .ev-card-v2 .ev-tells-label          { color: var(--brand-light, #fadea0); }
  html:not(.theme-light) .ev-card-v2 .ev-tells p              { color: var(--text-strong, #f4ead0); }
  html:not(.theme-light) .ev-card-v2 .ev-tells p strong       { color: var(--brand-light, #fadea0); }
  html:not(.theme-light) .ev-card-v2 .ev-facts dd             { color: var(--text-strong, #f4ead0); }
  html:not(.theme-light) .ev-card-v2 .ev-deep > summary       { color: var(--brand-light, #fadea0); }
  html:not(.theme-light) .ev-card-v2 .ev-deep                 { background: var(--bg-elevated, #1e2c43); border-color: var(--border-medium, #33496b); }
  html:not(.theme-light) .ev-card-v2 .ev-links a              { color: var(--brand-light, #fadea0); border-color: var(--border-medium, #33496b); }
  html:not(.theme-light) .ev-card-v2 .ev-links a:hover        { background: var(--brand-dark, #d8b366); color: #131d2b; border-color: var(--brand, #e6c47a); }
}

/* ============================================================
   EVIDENCE NOT FOUND PANEL — added 10 May 2026
   ============================================================ */
.ev-enf {
  margin-top: 2.5rem;
  background: var(--bg-card, #fffaf0);
  border: 1px solid var(--border-medium, #a88a4a);
  border-radius: 6px;
  padding: 1rem 1.2rem 1.2rem;
}
.ev-enf h3 {
  margin: 0 0 0.3rem;
  font-family: var(--font-display, 'Cormorant Garamond', Georgia, serif);
  font-size: 1.3rem;
  color: var(--brand-dark, #8a6420);
  font-weight: 600;
  font-style: italic;
}
.ev-enf .ev-enf-lede {
  font-size: 0.85rem;
  color: var(--text-body, #2c2620);
  margin: 0 0 0.8rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--border-light, #d8c8a8);
}
.ev-enf-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 0.55rem;
}
.ev-enf-tile {
  display: block;
  padding: 0.55rem 0.75rem;
  background: var(--bg-card-tint, #f6ebd2);
  border: 1px solid var(--border-light, #d8c8a8);
  border-left: 4px solid var(--section-civilwar, #805c3f);
  border-radius: 4px;
  color: inherit;
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s, transform 0.18s;
}
.ev-enf-tile:hover {
  background: var(--bg-elevated, #fffaf0);
  border-left-color: #d9c4b3;
  transform: translateY(-1px);
}
.ev-enf-tile .ev-enf-when {
  font-family: var(--font-mono, 'SF Mono', Menlo, monospace);
  font-size: 0.76rem;
  color: var(--section-civilwar-d, #5c432e);
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.ev-enf-tile .ev-enf-what {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-strong, #3a2f1e);
  margin-top: 0.1rem;
}
.ev-enf-tile .ev-enf-where {
  margin-top: 0.18rem;
  font-size: 0.78rem;
  color: var(--text-meta, #6a5a42);
  font-style: italic;
}

:root.theme-dark .ev-enf h3                { color: var(--brand-light, #fadea0); }
:root.theme-dark .ev-enf .ev-enf-lede      { color: var(--text-body, #e8dfc8); }
:root.theme-dark .ev-enf-tile              { background: var(--bg-card-tint, #1f2e45); }
:root.theme-dark .ev-enf-tile:hover        { background: var(--bg-elevated, #1e2c43); }
:root.theme-dark .ev-enf-tile .ev-enf-when { color: #d9c4b3; }
:root.theme-dark .ev-enf-tile .ev-enf-what { color: var(--text-strong, #f4ead0); }

@media (prefers-color-scheme: dark) {
  html:not(.theme-light) .ev-enf h3                { color: var(--brand-light, #fadea0); }
  html:not(.theme-light) .ev-enf .ev-enf-lede      { color: var(--text-body, #e8dfc8); }
  html:not(.theme-light) .ev-enf-tile              { background: var(--bg-card-tint, #1f2e45); }
  html:not(.theme-light) .ev-enf-tile:hover        { background: var(--bg-elevated, #1e2c43); }
  html:not(.theme-light) .ev-enf-tile .ev-enf-when { color: #d9c4b3; }
  html:not(.theme-light) .ev-enf-tile .ev-enf-what { color: var(--text-strong, #f4ead0); }
}
