/* ============================================================
   Dark-mode variant
   Charles Gannsen Research · added 8 May 2026 (audit-fix pass)
   ============================================================
   Honors the user's OS-level preference for dark colour schemes.
   Re-binds the theme variables defined in theme.css so the
   cinematic palette inverts: deep walnut body, warm cream text,
   gold accents preserved. Designed to feel like an antique
   library at night rather than "GitHub dark."
   ------------------------------------------------------------ */

/* MIGRATION STATUS (16 May 2026 cleanup pass):
   Inline `style="background:#…"` purge essentially complete (was ~83, now ~19
   functional residuals). Overrides for fully-retired legacy classes
   (.whats-new, .schrader-tile, .schrader-tile-*, .smoking-gun) deleted in
   this pass. Heavy-use legacy classes still appear as primary styling and
   their override blocks remain load-bearing: .ge-tile, .ca-tile, .cw-tile,
   .im-tile, .person-card, .peter-quote, .friedrich-callout, .konsen-feature.
   See AUDIT-MIGRATION.md for full list. */

@media (prefers-color-scheme: dark) {

  :root:not(.theme-light) {
    /* Page surfaces — deep walnut */
    --bg-page:        #1a1612;     /* main background */
    --bg-card:        #24201a;     /* card background */
    --bg-card-tint:   #2c261d;     /* subtle tint */
    --bg-elevated:    #2a2519;
    --bg-deep:        #0d0a06;     /* darkest — already-dark heroes get even darker */
    --bg-deep-grad:   #16110a;

    /* Text — warm cream on walnut. Brightened 30 May 2026: light text on a
       dark ground reads optically thinner, so the body/meta/muted tones were
       lifted for fuller stroke contrast and easier reading. */
    --text-primary:   #f6f1e7;
    --text-body:      #f1ead7;
    --text-strong:    #f8efd8;
    --text-meta:      #d6c8a6;
    --text-muted:     #c2a878;
    --text-on-dark:   #f6f1e7;
    --text-on-dark-d: #c8b896;
    --text-heading:   #f1cf85;     /* H1/H2/H3 — bright gilt that pops on walnut (12.6:1 AAA) */

    /* Borders — soft gold */
    --border-light:   #3c352a;
    --border-medium:  #6a5a40;
    --border-strong:  #a88a4a;
    --divider:        #2e2820;

    /* Brand stays bright; section colors lift slightly */
    --brand:          #e6c47a;
    --brand-dark:     #d8b366;
    --brand-light:    #fadea0;
    --brand-tint:     #3a2f1e;

    --section-civilwar:    #906747;
    --section-civilwar-d:  #825e40;
    --section-civilwar-t:  #2c231c;

    --section-immigration: #6a8acc;
    --section-immigration-d:#4a6a9c;
    --section-immigration-t:#1c2230;

    --section-germany:     #5a779c;
    --section-germany-d:   #3a577c;
    --section-germany-t:   #1a1f26;

    --section-charles:     #d08a40;
    --section-charles-d:   #a86820;
    --section-charles-t:   #2e2316;

    --section-schrader:    #a8804a;
    --section-schrader-d:  #80582c;
    --section-schrader-t:  #2a2018;

    /* Status colours — slightly brighter so they read on dark */
    --status-confirmed:    #6083b0;
    --status-eliminated:   #906747;
    --status-eliminated-t: #2c231c;
    --status-open:         #e8a050;
    --status-open-t:       #2e2316;
    --status-active:       #8e713e;
    --status-active-t:     #2c261c;
    --status-context:      #b89c70;
  }

  /* Card backgrounds inside section heroes need explicit dark surfaces
     because some hardcode #fff hex values inline. */
  :root:not(.theme-light) body { background: var(--bg-page); color: var(--text-body); }

  /* Global body-link colour in dark mode (added 26 May 2026).
     Many page-level <style> blocks hardcode  a { color: #8a6420; }  — that's
     the light-mode "gilt-deep" which is essentially invisible on the dark page
     background. The selectors below (0,1,1 specificity) override those without
     needing per-page edits. More-specific scoped overrides further down in this
     file (e.g. .page-toc a, section.section a) still win, so nav / TOC / card
     contexts keep their bespoke colours. */
  :root:not(.theme-light) a,
  html.theme-dark a              { color: #e6cd96; }
  :root:not(.theme-light) a:hover,
  html.theme-dark a:hover        { color: #f3dfae; }
  :root:not(.theme-light) a:visited,
  html.theme-dark a:visited      { color: #e6c47a; }

  /* Inline backgrounds that were hardcoded to cream tones — neutralize.
     We can't reach inline styles from CSS, but we can tint via blend. */
  :root:not(.theme-light) .card, :root:not(.theme-light) .ev-card, :root:not(.theme-light) .corr-card, :root:not(.theme-light) .bio-card, :root:not(.theme-light) .pathway, :root:not(.theme-light) .sub-card, :root:not(.theme-light) .parish-card, :root:not(.theme-light) article.ev-card {
    background: var(--bg-card);
    color: var(--text-body);
  }

  :root:not(.theme-light) .card.hypothesis, :root:not(.theme-light) .ev-card.major { background: var(--bg-card-tint); }

  /* Confidence pills — keep their semantic colors but darken text bg */
  :root:not(.theme-light) .conf.confirmed, :root:not(.theme-light) .badge.confirmed { background: var(--status-confirmed); }
  :root:not(.theme-light) .conf.working { background: var(--brand); color: #1f1a14; }
  :root:not(.theme-light) .conf.open, :root:not(.theme-light) .badge.open { background: var(--status-open); }
  :root:not(.theme-light) .conf.eliminated, :root:not(.theme-light) .badge.eliminated { background: var(--status-eliminated); }

  /* Amber confidence pills (.pill.low = bronze, .pill.mod = orange — used on
     birthdate-records.html and reusable elsewhere) glare on the dark page.
     Mute the backgrounds and use light text, sitewide. Added per the
     dark-mode readability pass, 19 June 2026. */
  :root:not(.theme-light) .pill.low, html.theme-dark .pill.low { background: #6d5325; color: #f2e7cd; }
  :root:not(.theme-light) .pill.mod, html.theme-dark .pill.mod { background: #8a6e22; color: #f8efd1; }

  /* ============================================================
     Evidence-analysis term colour standard (sitewide) — added 19 Jun 2026.
     A single, consistent colour for each genealogical evidence term so the
     same word always reads the same hue across the site (birthdate-records,
     methodology taxonomy, evidence cards, etc.). Grouped by axis:
       Source       — original (green)   / derivative (amber)
       Information  — primary (blue)      / secondary (indigo)
       Evidence     — direct (violet) / indirect (mauve) / negative (red)
     These base rules are unscoped, so they apply in BOTH light and dark
     mode (dark-mode.css is loaded on every page); the dark overrides below
     lighten each hue for the dark background.
     ------------------------------------------------------------ */
  .ev-term { font-weight: 700; }
  .ev-original   { color: #224777; font-weight: 700; }
  .ev-derivative { color: #9a6510; font-weight: 700; }
  .ev-primary    { color: #1f5e9e; font-weight: 700; }
  .ev-secondary  { color: #4a4f86; font-weight: 700; }
  .ev-direct     { color: #866935; font-weight: 700; }
  .ev-indirect   { color: #816a42; font-weight: 700; }
  .ev-negative   { color: #835f41; font-weight: 700; }
  /* small swatch used in the taxonomy colour key */
  .ev-swatch { display: inline-block; width: 0.78em; height: 0.78em; border-radius: 4px; margin-right: 0.35em; vertical-align: -0.06em; }
  .ev-swatch.ev-original   { background: #1f7a3a; }
  .ev-swatch.ev-derivative { background: #9a6510; }
  .ev-swatch.ev-primary    { background: #1f5e9e; }
  .ev-swatch.ev-secondary  { background: #4a4f86; }
  .ev-swatch.ev-direct     { background: #6a3fa0; }
  .ev-swatch.ev-indirect   { background: #9a4f8e; }
  .ev-swatch.ev-negative   { background: #a83a32; }

  :root:not(.theme-light) .ev-original,   html.theme-dark .ev-original   { color: #7fa1ce; }
  :root:not(.theme-light) .ev-derivative, html.theme-dark .ev-derivative { color: #e0b96a; }
  :root:not(.theme-light) .ev-primary,    html.theme-dark .ev-primary    { color: #82b4e8; }
  :root:not(.theme-light) .ev-secondary,  html.theme-dark .ev-secondary  { color: #a8acd8; }
  :root:not(.theme-light) .ev-direct,     html.theme-dark .ev-direct     { color: #e6cca0; }
  :root:not(.theme-light) .ev-indirect,   html.theme-dark .ev-indirect   { color: #d9c39c; }
  :root:not(.theme-light) .ev-negative,   html.theme-dark .ev-negative   { color: #d3bba7; }
  :root:not(.theme-light) .ev-swatch.ev-original,   html.theme-dark .ev-swatch.ev-original   { background: #7fce95; }
  :root:not(.theme-light) .ev-swatch.ev-derivative, html.theme-dark .ev-swatch.ev-derivative { background: #e0b96a; }
  :root:not(.theme-light) .ev-swatch.ev-primary,    html.theme-dark .ev-swatch.ev-primary    { background: #82b4e8; }
  :root:not(.theme-light) .ev-swatch.ev-secondary,  html.theme-dark .ev-swatch.ev-secondary  { background: #a8acd8; }
  :root:not(.theme-light) .ev-swatch.ev-direct,     html.theme-dark .ev-swatch.ev-direct     { background: #bda0e6; }
  :root:not(.theme-light) .ev-swatch.ev-indirect,   html.theme-dark .ev-swatch.ev-indirect   { background: #d99ccb; }
  :root:not(.theme-light) .ev-swatch.ev-negative,   html.theme-dark .ev-swatch.ev-negative   { background: #e89a92; }

  /* Selection colour */
  :root:not(.theme-light) ::selection { background: var(--brand); color: #1f1a14; }

  /* Site-search results dropdown (defined in site-search.js) */
  :root:not(.theme-light) .site-search-results, :root:not(.theme-light) #site-search-results {
    background: var(--bg-card) !important;
    color: var(--text-body) !important;
    border-color: var(--border-medium) !important;
  }

  /* Image / svg primary-source figures — slight dim so they don't blast */
  :root:not(.theme-light) .figure-embed img, :root:not(.theme-light) .figure-embed object, :root:not(.theme-light) figure img { filter: brightness(0.92); }

  /* SVG-object charts (visualize, abstract, foundation, evidence cards, etc.) — */
  /* the SVGs are authored against a paper backdrop with dark walnut text, so   */
  /* rendering them on the dark-mode page reads as "glowing white box." Keep    */
  /* the figure background as paper in dark mode so the SVG sits on a "page on  */
  /* dark desk" — its internal contrast is preserved, the page no longer blasts.*/
  :root:not(.theme-light) figure:has(object[type="image/svg+xml"]),
  :root:not(.theme-light) .vz-section figure,
  :root:not(.theme-light) figure:has(> img[src*=".svg"]:not([class*="-dark"])) {
    background: #fffdf6 !important;
    border-color: #d8c8a8 !important;
  }
  :root:not(.theme-light) figure:has(object[type="image/svg+xml"]) object,
  :root:not(.theme-light) figure:has(object[type="image/svg+xml"]) img,
  :root:not(.theme-light) .vz-section figure img,
  :root:not(.theme-light) .vz-section figure object {
    filter: none !important;
  }

  /* Tables in body prose */
  :root:not(.theme-light) table { background: var(--bg-card); color: var(--text-body); }
  :root:not(.theme-light) table.kv td { border-color: var(--border-light) !important; }
  /* civilwar/_shared.css ships table.kv th with a light cream (#ede4d0) background
     and table.kv td:first-child with a light cream (#f6ebd2) background — both
     stay light in dark mode without these overrides. The posting-by-posting
     timeline on civilwar/places-served.html and similar tables on
     civilwar/new-madrid.html, smallpox-hospital.html, etc. all benefit. */
  :root:not(.theme-light) table.kv thead,
  :root.theme-dark table.kv thead,
  :root:not(.theme-light) table.kv th,
  :root.theme-dark table.kv th {
    background: var(--bg-elevated, #2c261d) !important;
    color: var(--brand-light, #f1cf85) !important;
    border-color: var(--border-medium, #6a5a40) !important;
  }
  :root:not(.theme-light) table.kv td:first-child,
  :root.theme-dark table.kv td:first-child {
    background: var(--bg-card-tint, #2c261d) !important;
    color: var(--text-meta, #c8b896) !important;
  }

  /* Scrollbar tinting (Firefox + WebKit) */
  :root:not(.theme-light) * { scrollbar-color: var(--brand-dark) var(--bg-page); }

  /* ============================================================
     Comprehensive contrast pass — added 8 May 2026.
     Pages across the site hardcode dark-on-light colors in their
     own <style> blocks (section.page > h2, .card h3, .card.open,
     .whats-new, .tab-meta, etc.). Those hardcoded colors flatten
     into invisible/near-invisible text or jarring cream boxes when
     the OS flips to dark. Override them here so the rest of the
     site matches the cinematic Story → Overview tab.
     ------------------------------------------------------------ */

  /* ---- Page section H2 / lede / tab-meta (index.html tab system) ---- */
  :root:not(.theme-light) section.page > h2 {
    color: var(--text-heading) !important;
    border-bottom-color: var(--border-medium) !important;
  }
  :root:not(.theme-light) section.page > .lede { color: var(--text-body) !important; }
  :root:not(.theme-light) .tab-meta { color: var(--text-meta) !important; }
  :root:not(.theme-light) .tab-meta time { color: var(--text-strong) !important; }
  :root:not(.theme-light) .tab-meta::before { color: var(--brand) !important; }

  /* ---- Card headings ---- */
  :root:not(.theme-light) .card h3, :root:not(.theme-light) .card h4, :root:not(.theme-light) .ev-card h3, :root:not(.theme-light) .corr-card h3, :root:not(.theme-light) .bio-card h3, :root:not(.theme-light) .parish-card h3, :root:not(.theme-light) .sub-card h3, :root:not(.theme-light) .pathway h3 {
    color: var(--text-heading) !important;
  }

  /* ---- H4 fallback (index.html hardcodes #6a5a42) ---- */
  :root:not(.theme-light) section.page h4 { color: var(--text-strong); }

  /* ---- .small / .mono utilities ---- */
  :root:not(.theme-light) .small { color: var(--text-meta) !important; }
  :root:not(.theme-light) .mono {
    background: var(--bg-card-tint) !important;
    color: var(--text-body) !important;
    border-color: var(--border-light) !important;
  }

  /* ---- Card variants with hardcoded cream/pink backgrounds ----
     These rules in index.html declared cream / pink-cream backgrounds
     directly on the class, beating the generic .card override above. */
  :root:not(.theme-light) .card.open, :root:not(.theme-light) .card.hypothesis, :root:not(.theme-light) .card.accent {
    background: var(--bg-card-tint) !important;
    color: var(--text-body) !important;
  }
  :root:not(.theme-light) .card.open h3, :root:not(.theme-light) .card.hypothesis h3, :root:not(.theme-light) .card.accent h3 {
    color: var(--text-heading) !important;
  }

  /* ---- Per-tab "Open questions" block ---- */
  :root:not(.theme-light) .tab-open-q {
    background: var(--bg-card-tint) !important;
    border-color: var(--border-medium) !important;
    color: var(--text-body) !important;
  }
  :root:not(.theme-light) .tab-open-q h4 { color: var(--text-heading) !important; }

  /* ---- Per-tab in-page mini-TOC ("On this tab" strip) ----
     The light-mode rules in index.html (and cinematic.css when
     body.cine-typography is active) leave .page-toc anchors at
     #5a4a32, which is dark-on-dark in walnut mode. Lift the link
     text and divider color so the TOC is legible at night. ---- */
  :root:not(.theme-light) .page-toc {
    background: var(--bg-card) !important;
    border-color: var(--border-medium) !important;
    border-left-color: var(--brand) !important;
    color: var(--text-body) !important;
  }
  :root:not(.theme-light) .page-toc .toc-label { color: var(--brand-light) !important; }
  :root:not(.theme-light) .page-toc a {
    color: var(--text-body) !important;
    border-bottom-color: var(--border-medium) !important;
  }
  :root:not(.theme-light) .page-toc a:hover {
    color: var(--brand-light) !important;
    border-bottom-color: var(--brand) !important;
  }
  :root:not(.theme-light) .page-toc li::after { color: var(--border-medium) !important; }

  /* ---- Confidence-key strip and conf-desc text ---- */
  :root:not(.theme-light) .conf-key {
    background: var(--bg-card) !important;
    border-color: var(--border-light) !important;
    color: var(--text-body) !important;
  }
  :root:not(.theme-light) .conf-key-label, :root:not(.theme-light) .conf-desc { color: var(--text-meta) !important; }

  /* ---- updates.html month-section headings (hardcoded #2c2620) ---- */
  :root:not(.theme-light) .month-section h2 { color: var(--text-heading) !important; }

  /* ---- index.html family-file links (hardcoded #3a2f1e) ---- */
  :root:not(.theme-light) .family-file h4 a.fam-link { color: var(--text-heading) !important; }

  /* ============================================================
     Tile-grid inner-children (legacy BEM inner classes kept after
     parent .ge-tile/.im-tile/.ca-tile/.cw-tile migrated to .tile
     with data-section attribute on 16 May 2026 cleanup pass).
     Bare parent and compound .cross/.primary/.keystone rules
     deleted — markup no longer uses those parent classes.
     Inner-child rules remain because the BEM children are still
     present in index.html "Life & places" tile grid where the
     parent has the new `.tile primary coming-soon` class but
     the inner divs still use legacy names.
     ------------------------------------------------------------ */
  :root:not(.theme-light) .ge-tile-title, :root:not(.theme-light) .im-tile-title, :root:not(.theme-light) .ca-tile-title, :root:not(.theme-light) .cw-tile-title {
    color: var(--text-heading) !important;
  }
  :root:not(.theme-light) .ge-tile-sub, :root:not(.theme-light) .im-tile-sub, :root:not(.theme-light) .ca-tile-sub, :root:not(.theme-light) .cw-tile-sub {
    color: var(--text-body) !important;
  }
  :root:not(.theme-light) .ge-tile-eyebrow, :root:not(.theme-light) .im-tile-eyebrow, :root:not(.theme-light) .ca-tile-eyebrow, :root:not(.theme-light) .cw-tile-eyebrow {
    color: var(--brand) !important;
  }

  /* ---- the Trendelburg researcher's page <details> wrappers ("Eliminated candidates",
     "Other reference pages") — both use hardcoded cream backgrounds
     and dim olive summary text. Re-skin to dark surfaces. ---- */
  :root:not(.theme-light) main.tab-body > details[style*="background:#fffaf0"],
  :root:not(.theme-light) main.tab-body > details[style*="background:#fbf5e6"] {
    background: var(--bg-card-tint) !important;
    border-color: var(--border-medium) !important;
    color: var(--text-body) !important;
  }
  :root:not(.theme-light) main.tab-body > details > summary[style] {
    color: var(--text-heading) !important;
  }
  :root:not(.theme-light) main.tab-body > details ul.small[style],
  :root:not(.theme-light) main.tab-body > details p.small[style] {
    color: var(--text-body) !important;
  }

  /* ---- Visit-today block (Germany tab) — same cream-card pattern ---- */
  :root:not(.theme-light) .ge-visit-card {
    background: var(--bg-card) !important;
    border-color: var(--border-medium) !important;
    border-left-color: var(--section-germany) !important;
    color: var(--text-body) !important;
  }
  :root:not(.theme-light) .ge-visit-card h4 { color: var(--text-heading) !important; }
  :root:not(.theme-light) .ge-visit-card p { color: var(--text-body) !important; }
  :root:not(.theme-light) .ge-visit-card a {
    color: var(--brand-light) !important;
    border-bottom-color: var(--border-medium) !important;
  }

  /* ---- Image-gallery figure cards (Germany tab villages strip) ----
     Hard-coded background:#fffaf0 + figcaption color:#3a2f1e go cream-
     on-cream in light, but dark-on-dark in walnut. Re-paint. ---- */
  :root:not(.theme-light) .ge-img-gallery figure {
    background: var(--bg-card) !important;
    border-color: var(--border-light) !important;
    color: var(--text-body) !important;
  }
  :root:not(.theme-light) .ge-img-gallery figcaption {
    color: var(--text-body) !important;
  }
  :root:not(.theme-light) .ge-img-gallery figcaption strong {
    color: var(--text-heading) !important;
  }
  :root:not(.theme-light) .ge-img-gallery figcaption .credit {
    color: var(--text-meta) !important;
  }

  /* ---- Map legends (ca-map-legend, cw-map-legend, im-map-legend) ---- */
  :root:not(.theme-light) .ca-map-legend, :root:not(.theme-light) .cw-map-legend, :root:not(.theme-light) .im-map-legend {
    background: var(--bg-card) !important;
    border-color: var(--border-light) !important;
    color: var(--text-body) !important;
  }
  :root:not(.theme-light) .ca-map-legend h3, :root:not(.theme-light) .cw-map-legend h3, :root:not(.theme-light) .im-map-legend h3 {
    color: var(--text-heading) !important;
    border-bottom-color: var(--border-light) !important;
  }
  :root:not(.theme-light) .ca-map-legend .legend-label, :root:not(.theme-light) .cw-map-legend .legend-label, :root:not(.theme-light) .im-map-legend .legend-label { color: var(--text-body) !important; }
  :root:not(.theme-light) .ca-map-legend .legend-label .small, :root:not(.theme-light) .cw-map-legend .legend-label .small, :root:not(.theme-light) .im-map-legend .legend-label .small { color: var(--text-meta) !important; }

  /* ---- Inline-styled prose (escape hatch) ----
     Several passages (e.g. the "Charles was born in 1835…" lede on the
     Germany tab) declare color: #3a2f1e directly on the element via
     <p style=…>. Inline declarations beat normal author CSS, so we use
     !important to lift them in dark mode. Scoped to elements that
     actually carry a style attr to avoid steamrolling intentional
     component colors elsewhere. ---- */
  :root:not(.theme-light) section.page p[style] { color: var(--text-body)    !important; }
  :root:not(.theme-light) section.page h3[style], :root:not(.theme-light) section.page h4[style] { color: var(--text-heading) !important; }
  :root:not(.theme-light) section.page span[style] { color: inherit             !important; }
  /* table.kv (Identity at a glance) */
  :root:not(.theme-light) section.page table.kv td { color: var(--text-body) !important; }
  :root:not(.theme-light) section.page table.kv td:first-child { color: var(--text-meta) !important; }

  /* ============================================================
     Evidence-card expansion (Key Evidence tab) + abstract.html
     hero callouts. Both rely on cream/white inline-styled callout
     blocks nested several levels inside otherwise-overridden
     containers. We need attribute-selector overrides because the
     inline `style="background:#fffaf0; ..."` declarations lose to
     normal author CSS only when we supply !important.
     ------------------------------------------------------------ */

  /* abstract.html — the .key-finding gradient strip */
  :root:not(.theme-light) .key-finding {
    background: var(--bg-card) !important;
    border-color: var(--brand) !important;
    border-left-color: var(--brand) !important;
    color: var(--text-body) !important;
  }
  :root:not(.theme-light) .key-finding strong { color: var(--text-heading) !important; }

  /* abstract.html — keywords block uses --bg-card-tint already, just
     make sure the muted text is readable */
  :root:not(.theme-light) .keywords { color: var(--text-body) !important; }
  :root:not(.theme-light) .keywords strong { color: var(--text-heading) !important; }

  /* Evidence-card details accordion (.ec-*) overrides retired 16 May 2026 — markup pattern no longer used. */


  /* ============================================================
     Latest-Findings hero blocks (added 9 May 2026 — third pass).
     The overview/Latest-Findings tab is built from inline-styled
     <a>/<div>/<figure> elements with hardcoded cream linear-gradient
     backgrounds and dark text colors. These need a generic dark-mode
     override per the same attribute-selector pattern we already use
     for evidence cards.
     ------------------------------------------------------------ */

  /* Cream/cream-tint linear-gradient backgrounds → dark card */
  :root:not(.theme-light) section.page [style*="background:linear-gradient"],
  :root:not(.theme-light) section.page [style*="background: linear-gradient"] {
    background: var(--bg-card) !important;
    border-color: var(--border-medium) !important;
    color: var(--text-body) !important;
  }

  /* Inline-styled divs / anchors / figures with cream-ish solid backgrounds */
  :root:not(.theme-light) section.page [style*="background:#fff"],
  :root:not(.theme-light) section.page [style*="background: #fff"],
  :root:not(.theme-light) section.page [style*="background:#fbf8f2"],
  :root:not(.theme-light) section.page [style*="background:#f7f1e5"],
  :root:not(.theme-light) section.page [style*="background:#f0e3ca"],
  :root:not(.theme-light) section.page [style*="background:#f4ead7"],
  :root:not(.theme-light) section.page [style*="background:#a57727"],
  :root:not(.theme-light) section.page [style*="background:#f0f4"],
  :root:not(.theme-light) section.page [style*="background:#e9edf3"],
  :root:not(.theme-light) section.page [style*="background:#f0f3f7"] {
    background: var(--bg-card-tint) !important;
    color: var(--text-body) !important;
    border-color: var(--border-medium) !important;
  }

  /* Inline color flatten — common dark-on-light text colors used
     throughout the Latest Findings hero. */
  :root:not(.theme-light) section.page [style*="color:#1f1a14"],
  :root:not(.theme-light) section.page [style*="color: #1f1a14"],
  :root:not(.theme-light) section.page [style*="color:#1a2540"],
  :root:not(.theme-light) section.page [style*="color: #1a2540"],
  :root:not(.theme-light) section.page [style*="color:#2c2620"],
  :root:not(.theme-light) section.page [style*="color: #2c2620"],
  :root:not(.theme-light) section.page [style*="color:#3a2f1e"],
  :root:not(.theme-light) section.page [style*="color: #3a2f1e"] {
    color: var(--text-body) !important;
  }
  :root:not(.theme-light) section.page [style*="color:#5a4a32"],
  :root:not(.theme-light) section.page [style*="color: #5a4a32"],
  :root:not(.theme-light) section.page [style*="color:#6a5a42"],
  :root:not(.theme-light) section.page [style*="color: #6a5a42"] {
    color: var(--text-meta) !important;
  }
  :root:not(.theme-light) section.page [style*="color:#8a6420"],
  :root:not(.theme-light) section.page [style*="color: #8a6420"],
  :root:not(.theme-light) section.page [style*="color:#8a5418"],
  :root:not(.theme-light) section.page [style*="color: #8a5418"] {
    color: var(--brand-light) !important;
  }
  :root:not(.theme-light) section.page [style*="color:#2a466a"],
  :root:not(.theme-light) section.page [style*="color: #2a466a"] {
    color: var(--section-germany) !important;
  }
  :root:not(.theme-light) section.page [style*="color:#2a4a8a"],
  :root:not(.theme-light) section.page [style*="color: #2a4a8a"] {
    color: var(--section-immigration) !important;
  }
  :root:not(.theme-light) section.page [style*="color:#76553a"],
  :root:not(.theme-light) section.page [style*="color: #76553a"],
  :root:not(.theme-light) section.page [style*="color:#75543a"],
  :root:not(.theme-light) section.page [style*="color: #75543a"] {
    color: var(--section-civilwar) !important;
  }


  /* ---- Belt-and-suspenders fallback (added 9 May 2026) ----
     Any descendant of a container we just re-painted to a dark surface
     should inherit warm cream body text by default. This catches inline
     colors we haven't enumerated by hex above, and inline-styled <strong>
     and <span> elements whose hex is buried inside a longer style string. */
  :root:not(.theme-light) section.page [style*="background:linear-gradient"] *,
  :root:not(.theme-light) section.page [style*="background: linear-gradient"] *,
  :root:not(.theme-light) section.page [style*="background:#fff"] *,
  :root:not(.theme-light) section.page [style*="background: #fff"] *,
  :root:not(.theme-light) section.page [style*="background:#fbf8f2"] *,
  :root:not(.theme-light) section.page [style*="background:#f7f1e5"] *,
  :root:not(.theme-light) section.page [style*="background:#f0e3ca"] *,
  :root:not(.theme-light) section.page [style*="background:#f4ead7"] *,
  :root:not(.theme-light) section.page [style*="background:#a57727"] *,
  :root:not(.theme-light) section.page [style*="background:#f0f4"] *,
  :root:not(.theme-light) section.page [style*="background:#e9edf3"] * {
    color: inherit;
  }
  :root:not(.theme-light) section.page [style*="background:linear-gradient"],
  :root:not(.theme-light) section.page [style*="background: linear-gradient"],
  :root:not(.theme-light) section.page [style*="background:#fff"],
  :root:not(.theme-light) section.page [style*="background: #fff"],
  :root:not(.theme-light) section.page [style*="background:#fbf8f2"],
  :root:not(.theme-light) section.page [style*="background:#f7f1e5"],
  :root:not(.theme-light) section.page [style*="background:#f0e3ca"],
  :root:not(.theme-light) section.page [style*="background:#f4ead7"],
  :root:not(.theme-light) section.page [style*="background:#a57727"],
  :root:not(.theme-light) section.page [style*="background:#f0f4"],
  :root:not(.theme-light) section.page [style*="background:#e9edf3"] {
    color: var(--text-body) !important;
  }

  /* And any inline-styled <p>/<div>/<span> whose style-attribute color is
     ANY of the dark-on-light shades we use across the project. The
     selector list is long but precise — and matters because attribute
     selectors only match exact substrings. */
  :root:not(.theme-light) section.page p[style*="color:"],
  :root:not(.theme-light) section.page div[style*="color:"]:not([style*="color:#fff"]):not([style*="color:#f6"]):not([style*="color:#fa"]):not([style*="color:#fd"]):not([style*="color:#fe"]) {
    color: var(--text-body) !important;
  }


  /* ---- Latest-Findings hero — push contrast even higher (9 May 2026) ----
     Per user feedback: the warm-cream body text on dark walnut (11.6:1
     against #24201a) was reading as dim. Bump body text inside the
     inline-styled hero boxes to --text-strong (#f4ead0, 13.6:1) and
     promote <strong> emphasis to gilt heading colour so important
     phrases really pop. ---- */
  :root:not(.theme-light) section.page [style*="background:linear-gradient"],
  :root:not(.theme-light) section.page [style*="background:#fff"],
  :root:not(.theme-light) section.page [style*="background:#fbf8f2"],
  :root:not(.theme-light) section.page [style*="background:#f7f1e5"],
  :root:not(.theme-light) section.page [style*="background:#f0e3ca"],
  :root:not(.theme-light) section.page [style*="background:#f4ead7"],
  :root:not(.theme-light) section.page [style*="background:#a57727"],
  :root:not(.theme-light) section.page [style*="background:#f0f4"],
  :root:not(.theme-light) section.page [style*="background:#e9edf3"],
  :root:not(.theme-light) section.page [style*="background:linear-gradient"] p,
  :root:not(.theme-light) section.page [style*="background:#fff"] p,
  :root:not(.theme-light) section.page [style*="background:#fbf8f2"] p,
  :root:not(.theme-light) section.page [style*="background:#f7f1e5"] p,
  :root:not(.theme-light) section.page [style*="background:#f0e3ca"] p,
  :root:not(.theme-light) section.page [style*="background:#f4ead7"] p,
  :root:not(.theme-light) section.page [style*="background:#a57727"] p,
  :root:not(.theme-light) section.page [style*="background:#f0f4"] p,
  :root:not(.theme-light) section.page [style*="background:#e9edf3"] p,
  :root:not(.theme-light) section.page p[style*="color:"] {
    color: var(--text-strong) !important;
  }
  :root:not(.theme-light) section.page [style*="background:linear-gradient"] strong,
  :root:not(.theme-light) section.page [style*="background:#fff"] strong,
  :root:not(.theme-light) section.page [style*="background:#fbf8f2"] strong,
  :root:not(.theme-light) section.page [style*="background:#f7f1e5"] strong,
  :root:not(.theme-light) section.page [style*="background:#f4ead7"] strong,
  :root:not(.theme-light) section.page [style*="background:#a57727"] strong,
  :root:not(.theme-light) section.page [style*="background:#f0f4"] strong,
  :root:not(.theme-light) section.page [style*="background:#e9edf3"] strong {
    color: var(--text-heading) !important;
  }
  :root:not(.theme-light) section.page [style*="background:linear-gradient"] em,
  :root:not(.theme-light) section.page [style*="background:#fff"] em,
  :root:not(.theme-light) section.page [style*="background:#fbf8f2"] em,
  :root:not(.theme-light) section.page [style*="background:#f7f1e5"] em,
  :root:not(.theme-light) section.page [style*="background:#f4ead7"] em {
    color: var(--brand-light) !important;
  }


  /* ---- MAX-CONTRAST nuclear override (added 9 May 2026, third pass) ----
     User reports body text in the Latest-Findings hero boxes still reads
     as dim even after multiple lifts. Force the brightest possible body
     text — #ffffff with !important — for any inline-styled <p> nested
     inside a re-painted dark hero card on section.page. Once the user
     confirms readability we can dial back to something less brutal. */
  :root:not(.theme-light) section.page [style*="background:linear-gradient"] p,
  :root:not(.theme-light) section.page [style*="background:linear-gradient"] p strong,
  :root:not(.theme-light) section.page [style*="background:linear-gradient"] p em,
  :root:not(.theme-light) section.page [style*="background:linear-gradient"] p span,
  :root:not(.theme-light) section.page [style*="background:linear-gradient"] figcaption,
  :root:not(.theme-light) section.page [style*="background:linear-gradient"] figcaption p,
  :root:not(.theme-light) section.page [style*="background:linear-gradient"] figcaption strong,
  :root:not(.theme-light) section.page [style*="background:linear-gradient"] figcaption em,
  :root:not(.theme-light) section.page p[style*="color:"],
  :root:not(.theme-light) section.page figcaption[style*="color:"],
  :root:not(.theme-light) section.page figcaption[style*="color:"] p,
  :root:not(.theme-light) section.page figcaption[style*="color:"] strong,
  :root:not(.theme-light) section.page figcaption[style*="color:"] em {
    color: #f6efe2 !important;
  }


  /* ---- Background-image nuke (added 9 May 2026, fourth pass) ----
     Some inline backgrounds set `background:linear-gradient(...)` which
     resolves to `background-image: <gradient>` + `background-color: transparent`.
     Setting `background: var(--bg-card)` shorthand SHOULD wipe the image
     too, but in practice when there are many overlapping !important rules
     the gradient image can sneak through. Explicitly null it and also
     pin the colour. Highest-specificity selector ensures we win. ---- */
  html:not(.theme-light) section.page div[style*="linear-gradient"],
  html:not(.theme-light) section.page a[style*="linear-gradient"],
  html:not(.theme-light) section.page figure[style*="linear-gradient"],
  html:not(.theme-light) section.page section[style*="linear-gradient"] {
    background-color: var(--bg-card) !important;
    background-image: none !important;
    border-color: var(--border-medium) !important;
    color: #f6efe2 !important;
  }
  html:not(.theme-light) section.page div[style*="linear-gradient"] *,
  html:not(.theme-light) section.page a[style*="linear-gradient"] *,
  html:not(.theme-light) section.page figure[style*="linear-gradient"] *,
  html:not(.theme-light) section.page section[style*="linear-gradient"] * {
    color: #f6efe2 !important;
    background-image: none !important;
  }
  /* Headings/strong/em inside hero blocks — keep them gilt for hierarchy */
  html:not(.theme-light) section.page div[style*="linear-gradient"] strong,
  html:not(.theme-light) section.page a[style*="linear-gradient"] strong,
  html:not(.theme-light) section.page figure[style*="linear-gradient"] strong {
    color: #fadea0 !important;
  }

}

/* ============================================================
   User-toggled dark mode — same rules as the @media block above,
   prefixed with :root.theme-dark so they fire when JS adds that
   class regardless of OS preference. The toggle is wired up by
   assets/theme-toggle.js; the inline init script in each <head>
   sets the class before first paint to avoid FOUC.
   ------------------------------------------------------------ */

  :root.theme-dark {
    /* Page surfaces — deep walnut */
    --bg-page:        #131d2b;     /* main background */
    --bg-card:        #1a273b;     /* card background */
    --bg-card-tint:   #1f2e45;     /* subtle tint */
    --bg-elevated:    #1e2c43;
    --bg-deep:        #0b1119;     /* darkest — already-dark heroes get even darker */
    --bg-deep-grad:   #101824;

    /* Text — warm cream on walnut. Brightened 30 May 2026: light text on a
       dark ground reads optically thinner, so the body/meta/muted tones were
       lifted for fuller stroke contrast and easier reading. */
    --text-primary:   #f6f1e7;
    --text-body:      #f1ead7;
    --text-strong:    #f8efd8;
    --text-meta:      #d6c8a6;
    --text-muted:     #c2a878;
    --text-on-dark:   #f6f1e7;
    --text-on-dark-d: #c8b896;
    --text-heading:   #f1cf85;     /* H1/H2/H3 — bright gilt that pops on walnut (12.6:1 AAA) */

    /* Borders — soft gold */
    --border-light:   #293e5d;
    --border-medium:  #6a5a40;
    --border-strong:  #a88a4a;
    --divider:        #203048;

    /* Brand stays bright; section colors lift slightly */
    --brand:          #e6c47a;
    --brand-dark:     #d8b366;
    --brand-light:    #fadea0;
    --brand-tint:     #263855;

    --section-civilwar:    #906747;
    --section-civilwar-d:  #825e40;
    --section-civilwar-t:  #2c231c;

    --section-immigration: #6a8acc;
    --section-immigration-d:#4a6a9c;
    --section-immigration-t:#1c2230;

    --section-germany:     #5a779c;
    --section-germany-d:   #3a577c;
    --section-germany-t:   #1a1f26;

    --section-charles:     #d08a40;
    --section-charles-d:   #a86820;
    --section-charles-t:   #2e2316;

    --section-schrader:    #a8804a;
    --section-schrader-d:  #80582c;
    --section-schrader-t:  #2a2018;

    /* Status colours — slightly brighter so they read on dark */
    --status-confirmed:    #6083b0;
    --status-eliminated:   #906747;
    --status-eliminated-t: #2c231c;
    --status-open:         #e8a050;
    --status-open-t:       #1d2c42;
    --status-active:       #8e713e;
    --status-active-t:     #2c261c;
    --status-context:      #b89c70;
  }

  /* Card backgrounds inside section heroes need explicit dark surfaces
     because some hardcode #fff hex values inline. */
  :root.theme-dark body { background: var(--bg-page); color: var(--text-body); }

  /* Inline backgrounds that were hardcoded to cream tones — neutralize.
     We can't reach inline styles from CSS, but we can tint via blend. */
  :root.theme-dark .card, :root.theme-dark .ev-card, :root.theme-dark .corr-card, :root.theme-dark .bio-card, :root.theme-dark .pathway, :root.theme-dark .sub-card, :root.theme-dark .parish-card, :root.theme-dark article.ev-card {
    background: var(--bg-card);
    color: var(--text-body);
  }

  :root.theme-dark .card.hypothesis, :root.theme-dark .ev-card.major { background: var(--bg-card-tint); }

  /* Confidence pills — keep their semantic colors but darken text bg */
  :root.theme-dark .conf.confirmed, :root.theme-dark .badge.confirmed { background: var(--status-confirmed); }
  :root.theme-dark .conf.working { background: var(--brand); color: #162132; }
  :root.theme-dark .conf.open, :root.theme-dark .badge.open { background: var(--status-open); }
  :root.theme-dark .conf.eliminated, :root.theme-dark .badge.eliminated { background: var(--status-eliminated); }

  /* Selection colour */
  :root.theme-dark ::selection { background: var(--brand); color: #162132; }

  /* Site-search results dropdown (defined in site-search.js) */
  :root.theme-dark .site-search-results, :root.theme-dark #site-search-results {
    background: var(--bg-card) !important;
    color: var(--text-body) !important;
    border-color: var(--border-medium) !important;
  }

  /* Image / svg primary-source figures — slight dim so they don't blast */
  :root.theme-dark .figure-embed img, :root.theme-dark .figure-embed object, :root.theme-dark figure img { filter: brightness(0.92); }

  /* SVG-object charts — paper backdrop, see explanation in :not(.theme-light) block above. */
  :root.theme-dark figure:has(object[type="image/svg+xml"]),
  :root.theme-dark .vz-section figure,
  :root.theme-dark figure:has(> img[src*=".svg"]:not([class*="-dark"])) {
    background: #fffdf6 !important;
    border-color: #d8c8a8 !important;
  }
  :root.theme-dark figure:has(object[type="image/svg+xml"]) object,
  :root.theme-dark figure:has(object[type="image/svg+xml"]) img,
  :root.theme-dark .vz-section figure img,
  :root.theme-dark .vz-section figure object {
    filter: none !important;
  }

  /* Tables in body prose */
  :root.theme-dark table { background: var(--bg-card); color: var(--text-body); }
  :root.theme-dark table.kv td { border-color: var(--border-light) !important; }

  /* Scrollbar tinting (Firefox + WebKit) */
  :root.theme-dark * { scrollbar-color: var(--brand-dark) var(--bg-page); }

  /* ============================================================
     Comprehensive contrast pass — added 8 May 2026.
     Pages across the site hardcode dark-on-light colors in their
     own <style> blocks (section.page > h2, .card h3, .card.open,
     .whats-new, .tab-meta, etc.). Those hardcoded colors flatten
     into invisible/near-invisible text or jarring cream boxes when
     the OS flips to dark. Override them here so the rest of the
     site matches the cinematic Story → Overview tab.
     ------------------------------------------------------------ */

  /* ---- Page section H2 / lede / tab-meta (index.html tab system) ---- */
  :root.theme-dark section.page > h2 {
    color: var(--text-heading) !important;
    border-bottom-color: var(--border-medium) !important;
  }
  :root.theme-dark section.page > .lede { color: var(--text-body) !important; }
  :root.theme-dark .tab-meta { color: var(--text-meta) !important; }
  :root.theme-dark .tab-meta time { color: var(--text-strong) !important; }
  :root.theme-dark .tab-meta::before { color: var(--brand) !important; }

  /* ---- Card headings ---- */
  :root.theme-dark .card h3, :root.theme-dark .card h4, :root.theme-dark .ev-card h3, :root.theme-dark .corr-card h3, :root.theme-dark .bio-card h3, :root.theme-dark .parish-card h3, :root.theme-dark .sub-card h3, :root.theme-dark .pathway h3 {
    color: var(--text-heading) !important;
  }

  /* ---- H4 fallback (index.html hardcodes #6a5a42) ---- */
  :root.theme-dark section.page h4 { color: var(--text-strong); }

  /* ---- .small / .mono utilities ---- */
  :root.theme-dark .small { color: var(--text-meta) !important; }
  :root.theme-dark .mono {
    background: var(--bg-card-tint) !important;
    color: var(--text-body) !important;
    border-color: var(--border-light) !important;
  }

  /* ---- Card variants with hardcoded cream/pink backgrounds ----
     These rules in index.html declared cream / pink-cream backgrounds
     directly on the class, beating the generic .card override above. */
  :root.theme-dark .card.open, :root.theme-dark .card.hypothesis, :root.theme-dark .card.accent {
    background: var(--bg-card-tint) !important;
    color: var(--text-body) !important;
  }
  :root.theme-dark .card.open h3, :root.theme-dark .card.hypothesis h3, :root.theme-dark .card.accent h3 {
    color: var(--text-heading) !important;
  }

  /* ---- Per-tab "Open questions" block ---- */
  :root.theme-dark .tab-open-q {
    background: var(--bg-card-tint) !important;
    border-color: var(--border-medium) !important;
    color: var(--text-body) !important;
  }
  :root.theme-dark .tab-open-q h4 { color: var(--text-heading) !important; }

  /* ---- Per-tab in-page mini-TOC ("On this tab" strip) ----
     The light-mode rules in index.html (and cinematic.css when
     body.cine-typography is active) leave .page-toc anchors at
     #5a4a32, which is dark-on-dark in walnut mode. Lift the link
     text and divider color so the TOC is legible at night. ---- */
  :root.theme-dark .page-toc {
    background: var(--bg-card) !important;
    border-color: var(--border-medium) !important;
    border-left-color: var(--brand) !important;
    color: var(--text-body) !important;
  }
  :root.theme-dark .page-toc .toc-label { color: var(--brand-light) !important; }
  :root.theme-dark .page-toc a {
    color: var(--text-body) !important;
    border-bottom-color: var(--border-medium) !important;
  }
  :root.theme-dark .page-toc a:hover {
    color: var(--brand-light) !important;
    border-bottom-color: var(--brand) !important;
  }
  :root.theme-dark .page-toc li::after { color: var(--border-medium) !important; }

  /* ---- Confidence-key strip and conf-desc text ---- */
  :root.theme-dark .conf-key {
    background: var(--bg-card) !important;
    border-color: var(--border-light) !important;
    color: var(--text-body) !important;
  }
  :root.theme-dark .conf-key-label, :root.theme-dark .conf-desc { color: var(--text-meta) !important; }

  /* ---- updates.html month-section headings (hardcoded #2c2620) ---- */
  :root.theme-dark .month-section h2 { color: var(--text-heading) !important; }

  /* ---- index.html family-file links (hardcoded #3a2f1e) ---- */
  :root.theme-dark .family-file h4 a.fam-link { color: var(--text-heading) !important; }

  /* Tile-grid inner-children (legacy BEM inner classes) —
     mirror of @media block above. ------------------------- */
  :root.theme-dark .ge-tile-title, :root.theme-dark .im-tile-title, :root.theme-dark .ca-tile-title, :root.theme-dark .cw-tile-title {
    color: var(--text-heading) !important;
  }
  :root.theme-dark .ge-tile-sub, :root.theme-dark .im-tile-sub, :root.theme-dark .ca-tile-sub, :root.theme-dark .cw-tile-sub {
    color: var(--text-body) !important;
  }
  :root.theme-dark .ge-tile-eyebrow, :root.theme-dark .im-tile-eyebrow, :root.theme-dark .ca-tile-eyebrow, :root.theme-dark .cw-tile-eyebrow {
    color: var(--brand) !important;
  }

  /* ---- the Trendelburg researcher's page <details> wrappers ("Eliminated candidates",
     "Other reference pages") — both use hardcoded cream backgrounds
     and dim olive summary text. Re-skin to dark surfaces. ---- */
  :root.theme-dark main.tab-body > details[style*="background:#fffaf0"],
  :root.theme-dark main.tab-body > details[style*="background:#fbf5e6"] {
    background: var(--bg-card-tint) !important;
    border-color: var(--border-medium) !important;
    color: var(--text-body) !important;
  }
  :root.theme-dark main.tab-body > details > summary[style] {
    color: var(--text-heading) !important;
  }
  :root.theme-dark main.tab-body > details ul.small[style],
  :root.theme-dark main.tab-body > details p.small[style] {
    color: var(--text-body) !important;
  }

  /* ============================================================
     the Trendelburg researcher's page redesign — dark-mode adjustments (added 10 May 2026)
     Scoreboard, spotlight, eliminations table, the Trendelburg researcher quote, and
     operating-principles example lines all use light-mode tokens by
     default. Re-skin them for walnut.
     ============================================================ */
  :root.theme-dark .schrader-scoreboard .scb-item,
  :root:not(.theme-light) .schrader-scoreboard .scb-item {
    background: var(--bg-card) !important;
    border-color: var(--border-light) !important;
    color: var(--text-body) !important;
  }
  :root.theme-dark .schrader-scoreboard .scb-num,
  :root:not(.theme-light) .schrader-scoreboard .scb-num { color: var(--text-heading) !important; }
  :root.theme-dark .schrader-scoreboard .scb-open .scb-num,
  :root:not(.theme-light) .schrader-scoreboard .scb-open .scb-num { color: #e8a050 !important; }
  :root.theme-dark .schrader-scoreboard .scb-eliminated .scb-num,
  :root:not(.theme-light) .schrader-scoreboard .scb-eliminated .scb-num { color: #906747 !important; }
  :root.theme-dark .schrader-scoreboard .scb-ref .scb-num,
  :root:not(.theme-light) .schrader-scoreboard .scb-ref .scb-num { color: #b89c70 !important; }
  :root.theme-dark .schrader-scoreboard .scb-last .scb-num,
  :root:not(.theme-light) .schrader-scoreboard .scb-last .scb-num { color: var(--text-body) !important; }
  :root.theme-dark .schrader-scoreboard .scb-lbl,
  :root:not(.theme-light) .schrader-scoreboard .scb-lbl { color: var(--text-strong) !important; }
  :root.theme-dark .schrader-scoreboard .scb-sub,
  :root:not(.theme-light) .schrader-scoreboard .scb-sub { color: var(--text-meta) !important; }

  /* Spotlight panel — keep amber accent, swap surface to dark */
  :root.theme-dark .schrader-spotlight,
  :root:not(.theme-light) .schrader-spotlight {
    background: linear-gradient(140deg, var(--bg-card), var(--bg-card-tint)) !important;
    border-color: #c87a30 !important;
    color: var(--text-body) !important;
  }
  :root.theme-dark .schrader-spotlight h4,
  :root:not(.theme-light) .schrader-spotlight h4 { color: var(--text-heading) !important; }
  :root.theme-dark .schrader-spotlight .sp-eyebrow,
  :root:not(.theme-light) .schrader-spotlight .sp-eyebrow {
    color: #e8a050 !important;
    background: rgba(232, 160, 80, 0.15) !important;
  }
  :root.theme-dark .schrader-spotlight .sp-status,
  :root.theme-dark .schrader-spotlight .sp-body,
  :root:not(.theme-light) .schrader-spotlight .sp-status,
  :root:not(.theme-light) .schrader-spotlight .sp-body { color: var(--text-body) !important; }
  :root.theme-dark .schrader-spotlight .sp-status strong,
  :root:not(.theme-light) .schrader-spotlight .sp-status strong { color: #e8a050 !important; }
  :root.theme-dark .schrader-spotlight .sp-body strong,
  :root:not(.theme-light) .schrader-spotlight .sp-body strong { color: var(--text-heading) !important; }
  :root.theme-dark .schrader-spotlight .sp-xref,
  :root:not(.theme-light) .schrader-spotlight .sp-xref {
    color: var(--brand-light) !important;
    border-bottom-color: var(--border-medium) !important;
  }
  :root.theme-dark .schrader-spotlight .sp-cta,
  :root:not(.theme-light) .schrader-spotlight .sp-cta {
    background: #c87a30 !important;
    color: #162132 !important;
  }
  :root.theme-dark .schrader-spotlight .sp-cta:hover,
  :root:not(.theme-light) .schrader-spotlight .sp-cta:hover {
    background: #e8a050 !important;
  }

  /* Eliminations intro */
  :root.theme-dark .schrader-elims-intro,
  :root:not(.theme-light) .schrader-elims-intro { color: var(--text-body) !important; }
  :root.theme-dark .schrader-elims-intro h4,
  :root:not(.theme-light) .schrader-elims-intro h4 { color: var(--text-heading) !important; }
  :root.theme-dark .schrader-elims-intro .footnote,
  :root:not(.theme-light) .schrader-elims-intro .footnote { color: var(--text-meta) !important; }

  /* Eliminations table */
  :root.theme-dark table.schrader-elims,
  :root:not(.theme-light) table.schrader-elims {
    background: var(--bg-card) !important;
    border-color: var(--border-light) !important;
    color: var(--text-body) !important;
  }
  :root.theme-dark table.schrader-elims thead th,
  :root:not(.theme-light) table.schrader-elims thead th {
    background: var(--bg-card-tint) !important;
    border-bottom-color: var(--border-medium) !important;
    color: var(--text-heading) !important;
  }
  :root.theme-dark table.schrader-elims tbody td,
  :root:not(.theme-light) table.schrader-elims tbody td {
    border-bottom-color: var(--border-light) !important;
    color: var(--text-body) !important;
  }
  :root.theme-dark table.schrader-elims tbody tr:hover,
  :root:not(.theme-light) table.schrader-elims tbody tr:hover {
    background: rgba(216, 179, 102, 0.08) !important;
  }
  :root.theme-dark table.schrader-elims .elim-num,
  :root:not(.theme-light) table.schrader-elims .elim-num { color: #906747 !important; }
  :root.theme-dark table.schrader-elims .elim-name a,
  :root:not(.theme-light) table.schrader-elims .elim-name a {
    color: var(--brand-light) !important;
    border-bottom-color: var(--border-medium) !important;
  }
  :root.theme-dark table.schrader-elims .elim-name a:hover,
  :root:not(.theme-light) table.schrader-elims .elim-name a:hover { color: var(--text-heading) !important; }
  :root.theme-dark table.schrader-elims .elim-date,
  :root:not(.theme-light) table.schrader-elims .elim-date { color: var(--text-meta) !important; }
  :root.theme-dark table.schrader-elims .elim-name .small,
  :root:not(.theme-light) table.schrader-elims .elim-name .small { color: var(--text-meta) !important; }

  /* Elimination-reason tags — keep distinct hues; dark variants */
  :root.theme-dark .elim-tag-stayed,
  :root:not(.theme-light) .elim-tag-stayed { background: rgba(184, 156, 112, 0.18) !important; color: #d8c8a8 !important; }
  :root.theme-dark .elim-tag-dest,
  :root:not(.theme-light) .elim-tag-dest { background: rgba(106, 138, 204, 0.18) !important; color: #a8b8e0 !important; }
  :root.theme-dark .elim-tag-religion,
  :root:not(.theme-light) .elim-tag-religion { background: rgba(142, 113, 62, 0.20) !important; color: #e8d8b8 !important; }
  :root.theme-dark .elim-tag-notrace,
  :root:not(.theme-light) .elim-tag-notrace { background: rgba(144, 103, 71, 0.18) !important; color: #d8c2b0 !important; }
  :root.theme-dark .elim-tag-name,
  :root:not(.theme-light) .elim-tag-name { background: rgba(232, 160, 80, 0.20) !important; color: #e8b890 !important; }
  :root.theme-dark .elim-tag-vital,
  :root:not(.theme-light) .elim-tag-vital { background: rgba(168, 128, 74, 0.22) !important; color: #d8b890 !important; }

  /* the Trendelburg researcher quote blockquote */
  :root.theme-dark .peter-quote,
  :root:not(.theme-light) .peter-quote {
    background: var(--bg-card-tint) !important;
    border-left-color: var(--brand) !important;
    color: var(--text-body) !important;
  }
  :root.theme-dark .peter-quote::before,
  :root:not(.theme-light) .peter-quote::before { color: var(--brand) !important; }
  :root.theme-dark .peter-quote cite,
  :root:not(.theme-light) .peter-quote cite { color: var(--text-meta) !important; }

  /* Operating-principle example lines */
  :root.theme-dark .card .example-line,
  :root:not(.theme-light) .card .example-line {
    color: var(--text-meta) !important;
    border-top-color: var(--border-light) !important;
  }
  :root.theme-dark .card .example-line strong,
  :root:not(.theme-light) .card .example-line strong { color: var(--text-heading) !important; }

  /* ---- Visit-today block (Germany tab) — same cream-card pattern ---- */
  :root.theme-dark .ge-visit-card {
    background: var(--bg-card) !important;
    border-color: var(--border-medium) !important;
    border-left-color: var(--section-germany) !important;
    color: var(--text-body) !important;
  }
  :root.theme-dark .ge-visit-card h4 { color: var(--text-heading) !important; }
  :root.theme-dark .ge-visit-card p { color: var(--text-body) !important; }
  :root.theme-dark .ge-visit-card a {
    color: var(--brand-light) !important;
    border-bottom-color: var(--border-medium) !important;
  }

  /* ---- Image-gallery figure cards (Germany tab villages strip) ----
     Hard-coded background:#fffaf0 + figcaption color:#3a2f1e go cream-
     on-cream in light, but dark-on-dark in walnut. Re-paint. ---- */
  :root.theme-dark .ge-img-gallery figure {
    background: var(--bg-card) !important;
    border-color: var(--border-light) !important;
    color: var(--text-body) !important;
  }
  :root.theme-dark .ge-img-gallery figcaption {
    color: var(--text-body) !important;
  }
  :root.theme-dark .ge-img-gallery figcaption strong {
    color: var(--text-heading) !important;
  }
  :root.theme-dark .ge-img-gallery figcaption .credit {
    color: var(--text-meta) !important;
  }

  /* ---- Map legends (ca-map-legend, cw-map-legend, im-map-legend) ---- */
  :root.theme-dark .ca-map-legend, :root.theme-dark .cw-map-legend, :root.theme-dark .im-map-legend {
    background: var(--bg-card) !important;
    border-color: var(--border-light) !important;
    color: var(--text-body) !important;
  }
  :root.theme-dark .ca-map-legend h3, :root.theme-dark .cw-map-legend h3, :root.theme-dark .im-map-legend h3 {
    color: var(--text-heading) !important;
    border-bottom-color: var(--border-light) !important;
  }
  :root.theme-dark .ca-map-legend .legend-label, :root.theme-dark .cw-map-legend .legend-label, :root.theme-dark .im-map-legend .legend-label { color: var(--text-body) !important; }
  :root.theme-dark .ca-map-legend .legend-label .small, :root.theme-dark .cw-map-legend .legend-label .small, :root.theme-dark .im-map-legend .legend-label .small { color: var(--text-meta) !important; }

  /* ---- Inline-styled prose (escape hatch) ----
     Several passages (e.g. the "Charles was born in 1835…" lede on the
     Germany tab) declare color: #3a2f1e directly on the element via
     <p style=…>. Inline declarations beat normal author CSS, so we use
     !important to lift them in dark mode. Scoped to elements that
     actually carry a style attr to avoid steamrolling intentional
     component colors elsewhere. ---- */
  :root.theme-dark section.page p[style] { color: var(--text-body)    !important; }
  :root.theme-dark section.page h3[style], :root.theme-dark section.page h4[style] { color: var(--text-heading) !important; }
  :root.theme-dark section.page span[style] { color: inherit             !important; }
  /* table.kv (Identity at a glance) */
  :root.theme-dark section.page table.kv td { color: var(--text-body) !important; }
  :root.theme-dark section.page table.kv td:first-child { color: var(--text-meta) !important; }

  /* ============================================================
     Evidence-card expansion (Key Evidence tab) + abstract.html
     hero callouts. Both rely on cream/white inline-styled callout
     blocks nested several levels inside otherwise-overridden
     containers. We need attribute-selector overrides because the
     inline `style="background:#fffaf0; ..."` declarations lose to
     normal author CSS only when we supply !important.
     ------------------------------------------------------------ */

  /* abstract.html — the .key-finding gradient strip */
  :root.theme-dark .key-finding {
    background: var(--bg-card) !important;
    border-color: var(--brand) !important;
    border-left-color: var(--brand) !important;
    color: var(--text-body) !important;
  }
  :root.theme-dark .key-finding strong { color: var(--text-heading) !important; }

  /* abstract.html — keywords block uses --bg-card-tint already, just
     make sure the muted text is readable */
  :root.theme-dark .keywords { color: var(--text-body) !important; }
  :root.theme-dark .keywords strong { color: var(--text-heading) !important; }

  /* .ec-* mirror retired 16 May 2026 — see @media block above. */


  /* ============================================================
     Latest-Findings hero blocks (added 9 May 2026 — third pass).
     The overview/Latest-Findings tab is built from inline-styled
     <a>/<div>/<figure> elements with hardcoded cream linear-gradient
     backgrounds and dark text colors. These need a generic dark-mode
     override per the same attribute-selector pattern we already use
     for evidence cards.
     ------------------------------------------------------------ */

  /* Cream/cream-tint linear-gradient backgrounds → dark card */
  :root.theme-dark section.page [style*="background:linear-gradient"],
  :root.theme-dark section.page [style*="background: linear-gradient"] {
    background: var(--bg-card) !important;
    border-color: var(--border-medium) !important;
    color: var(--text-body) !important;
  }

  /* Inline-styled divs / anchors / figures with cream-ish solid backgrounds */
  :root.theme-dark section.page [style*="background:#fff"],
  :root.theme-dark section.page [style*="background: #fff"],
  :root.theme-dark section.page [style*="background:#fbf8f2"],
  :root.theme-dark section.page [style*="background:#f7f1e5"],
  :root.theme-dark section.page [style*="background:#f0e3ca"],
  :root.theme-dark section.page [style*="background:#f4ead7"],
  :root.theme-dark section.page [style*="background:#a57727"],
  :root.theme-dark section.page [style*="background:#f0f4"],
  :root.theme-dark section.page [style*="background:#e9edf3"],
  :root.theme-dark section.page [style*="background:#f0f3f7"] {
    background: var(--bg-card-tint) !important;
    color: var(--text-body) !important;
    border-color: var(--border-medium) !important;
  }

  /* Inline color flatten — common dark-on-light text colors used
     throughout the Latest Findings hero. */
  :root.theme-dark section.page [style*="color:#1f1a14"],
  :root.theme-dark section.page [style*="color: #1f1a14"],
  :root.theme-dark section.page [style*="color:#1a2540"],
  :root.theme-dark section.page [style*="color: #1a2540"],
  :root.theme-dark section.page [style*="color:#2c2620"],
  :root.theme-dark section.page [style*="color: #2c2620"],
  :root.theme-dark section.page [style*="color:#3a2f1e"],
  :root.theme-dark section.page [style*="color: #3a2f1e"] {
    color: var(--text-body) !important;
  }
  :root.theme-dark section.page [style*="color:#5a4a32"],
  :root.theme-dark section.page [style*="color: #5a4a32"],
  :root.theme-dark section.page [style*="color:#6a5a42"],
  :root.theme-dark section.page [style*="color: #6a5a42"] {
    color: var(--text-meta) !important;
  }
  :root.theme-dark section.page [style*="color:#8a6420"],
  :root.theme-dark section.page [style*="color: #8a6420"],
  :root.theme-dark section.page [style*="color:#8a5418"],
  :root.theme-dark section.page [style*="color: #8a5418"] {
    color: var(--brand-light) !important;
  }
  :root.theme-dark section.page [style*="color:#2a466a"],
  :root.theme-dark section.page [style*="color: #2a466a"] {
    color: var(--section-germany) !important;
  }
  :root.theme-dark section.page [style*="color:#2a4a8a"],
  :root.theme-dark section.page [style*="color: #2a4a8a"] {
    color: var(--section-immigration) !important;
  }
  :root.theme-dark section.page [style*="color:#76553a"],
  :root.theme-dark section.page [style*="color: #76553a"],
  :root.theme-dark section.page [style*="color:#75543a"],
  :root.theme-dark section.page [style*="color: #75543a"] {
    color: var(--section-civilwar) !important;
  }

  /* ---- Belt-and-suspenders fallback (added 9 May 2026) ----
     Any descendant of a container we just re-painted to a dark surface
     should inherit warm cream body text by default. This catches inline
     colors we haven't enumerated by hex above, and inline-styled <strong>
     and <span> elements whose hex is buried inside a longer style string. */
  :root.theme-dark section.page [style*="background:linear-gradient"] *,
  :root.theme-dark section.page [style*="background: linear-gradient"] *,
  :root.theme-dark section.page [style*="background:#fff"] *,
  :root.theme-dark section.page [style*="background: #fff"] *,
  :root.theme-dark section.page [style*="background:#fbf8f2"] *,
  :root.theme-dark section.page [style*="background:#f7f1e5"] *,
  :root.theme-dark section.page [style*="background:#f0e3ca"] *,
  :root.theme-dark section.page [style*="background:#f4ead7"] *,
  :root.theme-dark section.page [style*="background:#a57727"] *,
  :root.theme-dark section.page [style*="background:#f0f4"] *,
  :root.theme-dark section.page [style*="background:#e9edf3"] * {
    color: inherit;
  }
  :root.theme-dark section.page [style*="background:linear-gradient"],
  :root.theme-dark section.page [style*="background: linear-gradient"],
  :root.theme-dark section.page [style*="background:#fff"],
  :root.theme-dark section.page [style*="background: #fff"],
  :root.theme-dark section.page [style*="background:#fbf8f2"],
  :root.theme-dark section.page [style*="background:#f7f1e5"],
  :root.theme-dark section.page [style*="background:#f0e3ca"],
  :root.theme-dark section.page [style*="background:#f4ead7"],
  :root.theme-dark section.page [style*="background:#a57727"],
  :root.theme-dark section.page [style*="background:#f0f4"],
  :root.theme-dark section.page [style*="background:#e9edf3"] {
    color: var(--text-body) !important;
  }

  /* And any inline-styled <p>/<div>/<span> whose style-attribute color is
     ANY of the dark-on-light shades we use across the project. The
     selector list is long but precise — and matters because attribute
     selectors only match exact substrings. */
  :root.theme-dark section.page p[style*="color:"],
  :root.theme-dark section.page div[style*="color:"]:not([style*="color:#fff"]):not([style*="color:#f6"]):not([style*="color:#fa"]):not([style*="color:#fd"]):not([style*="color:#fe"]) {
    color: var(--text-body) !important;
  }

  /* ---- Latest-Findings hero — push contrast even higher (9 May 2026) ----
     Per user feedback: the warm-cream body text on dark walnut (11.6:1
     against #24201a) was reading as dim. Bump body text inside the
     inline-styled hero boxes to --text-strong (#f4ead0, 13.6:1) and
     promote <strong> emphasis to gilt heading colour so important
     phrases really pop. ---- */
  :root.theme-dark section.page [style*="background:linear-gradient"],
  :root.theme-dark section.page [style*="background:#fff"],
  :root.theme-dark section.page [style*="background:#fbf8f2"],
  :root.theme-dark section.page [style*="background:#f7f1e5"],
  :root.theme-dark section.page [style*="background:#f0e3ca"],
  :root.theme-dark section.page [style*="background:#f4ead7"],
  :root.theme-dark section.page [style*="background:#a57727"],
  :root.theme-dark section.page [style*="background:#f0f4"],
  :root.theme-dark section.page [style*="background:#e9edf3"],
  :root.theme-dark section.page [style*="background:linear-gradient"] p,
  :root.theme-dark section.page [style*="background:#fff"] p,
  :root.theme-dark section.page [style*="background:#fbf8f2"] p,
  :root.theme-dark section.page [style*="background:#f7f1e5"] p,
  :root.theme-dark section.page [style*="background:#f0e3ca"] p,
  :root.theme-dark section.page [style*="background:#f4ead7"] p,
  :root.theme-dark section.page [style*="background:#a57727"] p,
  :root.theme-dark section.page [style*="background:#f0f4"] p,
  :root.theme-dark section.page [style*="background:#e9edf3"] p,
  :root.theme-dark section.page p[style*="color:"] {
    color: var(--text-strong) !important;
  }
  :root.theme-dark section.page [style*="background:linear-gradient"] strong,
  :root.theme-dark section.page [style*="background:#fff"] strong,
  :root.theme-dark section.page [style*="background:#fbf8f2"] strong,
  :root.theme-dark section.page [style*="background:#f7f1e5"] strong,
  :root.theme-dark section.page [style*="background:#f4ead7"] strong,
  :root.theme-dark section.page [style*="background:#a57727"] strong,
  :root.theme-dark section.page [style*="background:#f0f4"] strong,
  :root.theme-dark section.page [style*="background:#e9edf3"] strong {
    color: var(--text-heading) !important;
  }
  :root.theme-dark section.page [style*="background:linear-gradient"] em,
  :root.theme-dark section.page [style*="background:#fff"] em,
  :root.theme-dark section.page [style*="background:#fbf8f2"] em,
  :root.theme-dark section.page [style*="background:#f7f1e5"] em,
  :root.theme-dark section.page [style*="background:#f4ead7"] em {
    color: var(--brand-light) !important;
  }

  /* ---- MAX-CONTRAST nuclear override (added 9 May 2026, third pass) ----
     User reports body text in the Latest-Findings hero boxes still reads
     as dim even after multiple lifts. Force the brightest possible body
     text — #ffffff with !important — for any inline-styled <p> nested
     inside a re-painted dark hero card on section.page. Once the user
     confirms readability we can dial back to something less brutal. */
  :root.theme-dark section.page [style*="background:linear-gradient"] p,
  :root.theme-dark section.page [style*="background:linear-gradient"] p strong,
  :root.theme-dark section.page [style*="background:linear-gradient"] p em,
  :root.theme-dark section.page [style*="background:linear-gradient"] p span,
  :root.theme-dark section.page [style*="background:linear-gradient"] figcaption,
  :root.theme-dark section.page [style*="background:linear-gradient"] figcaption p,
  :root.theme-dark section.page [style*="background:linear-gradient"] figcaption strong,
  :root.theme-dark section.page [style*="background:linear-gradient"] figcaption em,
  :root.theme-dark section.page p[style*="color:"],
  :root.theme-dark section.page figcaption[style*="color:"],
  :root.theme-dark section.page figcaption[style*="color:"] p,
  :root.theme-dark section.page figcaption[style*="color:"] strong,
  :root.theme-dark section.page figcaption[style*="color:"] em {
    color: #f6efe2 !important;
  }

  /* ---- Background-image nuke (added 9 May 2026, fourth pass) ----
     Some inline backgrounds set `background:linear-gradient(...)` which
     resolves to `background-image: <gradient>` + `background-color: transparent`.
     Setting `background: var(--bg-card)` shorthand SHOULD wipe the image
     too, but in practice when there are many overlapping !important rules
     the gradient image can sneak through. Explicitly null it and also
     pin the colour. Highest-specificity selector ensures we win. ---- */
  html.theme-dark section.page div[style*="linear-gradient"],
  html.theme-dark section.page a[style*="linear-gradient"],
  html.theme-dark section.page figure[style*="linear-gradient"],
  html.theme-dark section.page section[style*="linear-gradient"] {
    background-color: var(--bg-card) !important;
    background-image: none !important;
    border-color: var(--border-medium) !important;
    color: #f6efe2 !important;
  }
  html.theme-dark section.page div[style*="linear-gradient"] *,
  html.theme-dark section.page a[style*="linear-gradient"] *,
  html.theme-dark section.page figure[style*="linear-gradient"] *,
  html.theme-dark section.page section[style*="linear-gradient"] * {
    color: #f6efe2 !important;
    background-image: none !important;
  }
  /* Headings/strong/em inside hero blocks — keep them gilt for hierarchy */
  html.theme-dark section.page div[style*="linear-gradient"] strong,
  html.theme-dark section.page a[style*="linear-gradient"] strong,
  html.theme-dark section.page figure[style*="linear-gradient"] strong {
    color: #fadea0 !important;
  }

/* ============================================================
   FINAL OVERRIDES — beat the high-specificity cinematic.css rules
   that pin cream gradients via `body.cine-typography` + ID/class
   selectors with !important. Without these, the figure background
   stays cream while text gets repainted to light cream → unreadable.
   Specificity here: 0,2,1,3 (1 ID + 2 classes + 3 elements) which
   beats cinematic's 0,1,1,1. Covers both prefers-color-scheme and
   the user-toggled .theme-dark class.
   Reported issue: 9 May 2026 — Charles portrait box on Latest Findings.
   ------------------------------------------------------------ */
@media (prefers-color-scheme: dark) {
  html:not(.theme-light) body.cine-typography #charles-portrait-figure {
    background: #24201a !important;
    background-image: none !important;
    border: 1px solid #6a5a40 !important;
    border-left: 4px solid #b48a3a !important;
    color: #f6efe2 !important;
  }
  html:not(.theme-light) body.cine-typography #charles-portrait-figure figcaption,
  html:not(.theme-light) body.cine-typography #charles-portrait-figure figcaption p {
    color: #f6efe2 !important;
  }
  html:not(.theme-light) body.cine-typography #charles-portrait-figure figcaption strong {
    color: #fadea0 !important;
  }
  html:not(.theme-light) body.cine-typography #charles-portrait-figure figcaption a {
    color: #fadea0 !important;
  }
  /* Same pattern for tab-open-q panel. */
  html:not(.theme-light) body.cine-typography .tab-open-q {
    background: #24201a !important;
    background-image: none !important;
    border-color: #6a5a40 !important;
    color: #f6efe2 !important;
  }
  html:not(.theme-light) body.cine-typography .tab-open-q * {
    color: #f6efe2 !important;
  }
  html:not(.theme-light) body.cine-typography .tab-open-q h4 {
    color: #fadea0 !important;
  }
}
html.theme-dark body.cine-typography #charles-portrait-figure {
  background: #1a273b !important;
  background-image: none !important;
  border: 1px solid #6a5a40 !important;
  border-left: 4px solid #b48a3a !important;
  color: #f6efe2 !important;
}
html.theme-dark body.cine-typography #charles-portrait-figure figcaption,
html.theme-dark body.cine-typography #charles-portrait-figure figcaption p {
  color: #f6efe2 !important;
}
html.theme-dark body.cine-typography #charles-portrait-figure figcaption strong {
  color: #fadea0 !important;
}
html.theme-dark body.cine-typography #charles-portrait-figure figcaption a {
  color: #fadea0 !important;
}
html.theme-dark body.cine-typography .tab-open-q {
  background: #1a273b !important;
  background-image: none !important;
  border-color: #33496b !important;
  color: #f6efe2 !important;
}
html.theme-dark body.cine-typography .tab-open-q * {
  color: #f6efe2 !important;
}
html.theme-dark body.cine-typography .tab-open-q h4 {
  color: #fadea0 !important;
}

/* ============================================================
   PEOPLE-CARD CONTRAST PASS — added 9 May 2026.
   Person cards on the People tab kept their light-mode
   text/eyebrow palette in dark mode: dark-red eyebrows on a
   slightly-darker-red tint, dark-brown summaries on a dark
   page, faint italic meta lines. Lift each to a legible cream
   / pastel and brighten the role-pill backgrounds so the eyebrow
   pops instead of fading. Covers both prefers-color-scheme and
   the user-toggled .theme-dark class.
   ------------------------------------------------------------ */
@media (prefers-color-scheme: dark) {
  /* .person-card descendant overrides retired 16 May 2026 — class no longer in markup */

  /* FamilySearch ID / name pills (a.fsn, a.fsn.pid) — dark-brown on
     transparent gold/blue tint becomes invisible in dark mode. */
  html:not(.theme-light) a.fsn {
    color: #f0d68c !important;
    background: rgba(216,179,102,0.18) !important;
    border-bottom: 1px dotted #d8b366 !important;
  }
  html:not(.theme-light) a.fsn:hover {
    background: #d8b366 !important;
    color: #1f1a14 !important;
    border-bottom-color: #d8b366 !important;
  }
  html:not(.theme-light) a.fsn::after { color: #c8b890 !important; }
  html:not(.theme-light) a.fsn.pid {
    color: #a8c8ff !important;
    background: rgba(74,118,200,0.28) !important;
    border-bottom-color: #b8c6da !important;
  }
  html:not(.theme-light) a.fsn.pid:hover {
    background: #4a76c8 !important;
    color: #ffffff !important;
  }
  html:not(.theme-light) a.fsn.pid::after { color: #a8c8ff !important; }
  html:not(.theme-light) a.fsn.pid:hover::after { color: #ffffff !important; }

  /* Citation block (#cite section) — three boxes on the homepage
     bottom and the inner <code> blocks were pinned cream/white. */
  html:not(.theme-light) section#cite { border-top-color: #6a5a40 !important; }
  html:not(.theme-light) section#cite h2 {
    color: #f6efe2 !important;
    border-bottom-color: #8a6420 !important;
  }
  html:not(.theme-light) section#cite .lede,
  html:not(.theme-light) section#cite > p { color: #d8c8a8 !important; }
  html:not(.theme-light) section#cite > div > div {
    background: #2a251d !important;
    border-color: #8a6420 !important;
  }
  html:not(.theme-light) section#cite > div > div > div { color: #f0d68c !important; }
  html:not(.theme-light) section#cite code {
    background: #1f1b15 !important;
    color: #f6efe2 !important;
    border-color: #1c2a3f !important;
  }
  html:not(.theme-light) section#cite a { color: #f0d68c !important; }
}
/* .person-card descendant overrides retired 16 May 2026 — class no longer in markup */

:root.theme-dark a.fsn {
  color: #f0d68c !important;
  background: rgba(216,179,102,0.18) !important;
  border-bottom: 1px dotted #d8b366 !important;
}
:root.theme-dark a.fsn:hover {
  background: #d8b366 !important;
  color: #162132 !important;
  border-bottom-color: #d8b366 !important;
}
:root.theme-dark a.fsn::after { color: #c8b890 !important; }
:root.theme-dark a.fsn.pid {
  color: #a8c8ff !important;
  background: rgba(74,118,200,0.28) !important;
  border-bottom-color: #7a9fdc !important;
}
:root.theme-dark a.fsn.pid:hover {
  background: #33507a !important;
  color: #ffffff !important;
}
:root.theme-dark a.fsn.pid::after { color: #a8c8ff !important; }
:root.theme-dark a.fsn.pid:hover::after { color: #ffffff !important; }

:root.theme-dark section#cite { border-top-color: #33496b !important; }
:root.theme-dark section#cite h2 {
  color: #f6efe2 !important;
  border-bottom-color: #33496b !important;
}
:root.theme-dark section#cite .lede,
:root.theme-dark section#cite > p { color: #d8c8a8 !important; }
:root.theme-dark section#cite > div > div {
  background: #1e2d43 !important;
  border-color: #33496b !important;
}
:root.theme-dark section#cite > div > div > div { color: #f0d68c !important; }
:root.theme-dark section#cite code {
  background: #172233 !important;
  color: #f6efe2 !important;
  border-color: #324b70 !important;
}
:root.theme-dark section#cite a { color: #f0d68c !important; }

/* ============================================================
   MAP LEGEND BOXES + LEAFLET POPUPS — added 9 May 2026.
   Every embedded Leaflet map ships its own legend (.ca-map-legend
   on Charles in America, .cw-map-legend on Civil War, .ge-map-legend
   on Germany, .im-map-legend on Immigration, .map-legend on the St.
   Louis residences page, .towns-legend on the Towns index). All hard-
   code cream backgrounds + dark labels and stay light in dark mode.
   Lift each into the page palette via the substring selector — and
   tint the inner Leaflet popup bubbles to match.
   ------------------------------------------------------------ */
@media (prefers-color-scheme: dark) {
  html:not(.theme-light) .ca-map-legend,
  html:not(.theme-light) .cw-map-legend,
  html:not(.theme-light) .ge-map-legend,
  html:not(.theme-light) .im-map-legend,
  html:not(.theme-light) .map-legend,
  html:not(.theme-light) .towns-legend {
    background: #2a251d !important;
    border-color: #6a5a40 !important;
    color: #e8dfc8 !important;
  }
  html:not(.theme-light) .ca-map-legend h3,
  html:not(.theme-light) .cw-map-legend h3,
  html:not(.theme-light) .ge-map-legend h3,
  html:not(.theme-light) .im-map-legend h3,
  html:not(.theme-light) .map-legend h3 {
    color: #fadea0 !important;
    border-bottom-color: #6a5a40 !important;
  }
  html:not(.theme-light) .ca-map-legend .legend-label,
  html:not(.theme-light) .cw-map-legend .legend-label,
  html:not(.theme-light) .ge-map-legend .legend-label,
  html:not(.theme-light) .im-map-legend .legend-label,
  html:not(.theme-light) .map-legend .legend-label,
  html:not(.theme-light) .towns-legend .legend-label {
    color: #e8dfc8 !important;
  }
  html:not(.theme-light) .ca-map-legend .legend-label .small,
  html:not(.theme-light) .cw-map-legend .legend-label .small,
  html:not(.theme-light) .ge-map-legend .legend-label .small,
  html:not(.theme-light) .im-map-legend .legend-label .small,
  html:not(.theme-light) .map-legend .legend-label .small {
    color: #c8b890 !important;
  }
  /* Swatch outline contrast — the cream ring becomes a dark-page ring */
  html:not(.theme-light) .ca-map-legend .swatch,
  html:not(.theme-light) .cw-map-legend .swatch,
  html:not(.theme-light) .ge-map-legend .swatch,
  html:not(.theme-light) .im-map-legend .swatch,
  html:not(.theme-light) .map-legend .swatch,
  html:not(.theme-light) .towns-legend .swatch {
    border-color: #2a251d !important;
    box-shadow: 0 0 0 1px #c8b890 !important;
  }

  /* Leaflet popup bubbles — inner panel is cream by default */
  html:not(.theme-light) .leaflet-popup-content-wrapper {
    background: #2a251d !important;
    color: #e8dfc8 !important;
  }
  html:not(.theme-light) .leaflet-popup-tip { background: #2a251d !important; }
  html:not(.theme-light) .leaflet-popup-content,
  html:not(.theme-light) .leaflet-popup-content .body {
    color: #e8dfc8 !important;
  }
  html:not(.theme-light) .leaflet-popup-content h4 {
    color: #fadea0 !important;
    border-bottom-color: #6a5a40 !important;
  }
  html:not(.theme-light) .leaflet-popup-content a,
  html:not(.theme-light) .leaflet-popup-content a.openmap,
  html:not(.theme-light) .leaflet-popup-content a.detail {
    color: #f0d68c !important;
    border-bottom-color: #6a5a40 !important;
  }
  html:not(.theme-light) .leaflet-popup-close-button {
    color: #e8dfc8 !important;
  }
}
:root.theme-dark .ca-map-legend,
:root.theme-dark .cw-map-legend,
:root.theme-dark .ge-map-legend,
:root.theme-dark .im-map-legend,
:root.theme-dark .map-legend,
:root.theme-dark .towns-legend {
  background: #1e2d43 !important;
  border-color: #6a5a40 !important;
  color: #e8dfc8 !important;
}
:root.theme-dark .ca-map-legend h3,
:root.theme-dark .cw-map-legend h3,
:root.theme-dark .ge-map-legend h3,
:root.theme-dark .im-map-legend h3,
:root.theme-dark .map-legend h3 {
  color: #fadea0 !important;
  border-bottom-color: #6a5a40 !important;
}
:root.theme-dark .ca-map-legend .legend-label,
:root.theme-dark .cw-map-legend .legend-label,
:root.theme-dark .ge-map-legend .legend-label,
:root.theme-dark .im-map-legend .legend-label,
:root.theme-dark .map-legend .legend-label,
:root.theme-dark .towns-legend .legend-label {
  color: #e8dfc8 !important;
}
:root.theme-dark .ca-map-legend .legend-label .small,
:root.theme-dark .cw-map-legend .legend-label .small,
:root.theme-dark .ge-map-legend .legend-label .small,
:root.theme-dark .im-map-legend .legend-label .small,
:root.theme-dark .map-legend .legend-label .small {
  color: #c8b890 !important;
}
:root.theme-dark .ca-map-legend .swatch,
:root.theme-dark .cw-map-legend .swatch,
:root.theme-dark .ge-map-legend .swatch,
:root.theme-dark .im-map-legend .swatch,
:root.theme-dark .map-legend .swatch,
:root.theme-dark .towns-legend .swatch {
  border-color: #1e2d43 !important;
  box-shadow: 0 0 0 1px #c8b890 !important;
}
:root.theme-dark .leaflet-popup-content-wrapper {
  background: #1e2d43 !important;
  color: #e8dfc8 !important;
}
:root.theme-dark .leaflet-popup-tip { background: #1e2d43 !important; }
:root.theme-dark .leaflet-popup-content,
:root.theme-dark .leaflet-popup-content .body { color: #e8dfc8 !important; }
:root.theme-dark .leaflet-popup-content h4 {
  color: #fadea0 !important;
  border-bottom-color: #6a5a40 !important;
}
:root.theme-dark .leaflet-popup-content a,
:root.theme-dark .leaflet-popup-content a.openmap,
:root.theme-dark .leaflet-popup-content a.detail {
  color: #f0d68c !important;
  border-bottom-color: #6a5a40 !important;
}
:root.theme-dark .leaflet-popup-close-button { color: #e8dfc8 !important; }

/* ============================================================
   TOWNS INDEX BOXES — added 9 May 2026.
   towns/index.html and the per-town pages share towns/_shared.css
   which defines .resource-card (the ten-towns grid) and an inline
   <style> block re-defining .card / .card.hypothesis / .card.accent.
   All keep cream backgrounds in dark mode. Lift every variant into
   the page palette so the Towns page reads cohesively dark.
   ------------------------------------------------------------ */
@media (prefers-color-scheme: dark) {
  html:not(.theme-light) .resource-card {
    background: #2a251d !important;
    border-color: #8a6420 !important;
    color: #e8dfc8 !important;
  }
  html:not(.theme-light) .resource-card h4 { color: #fadea0 !important; }
  html:not(.theme-light) .resource-card p  { color: #e8dfc8 !important; }
  html:not(.theme-light) .resource-card .source-label { color: #c8b890 !important; }
  /* Coloured source-label variants — lift each towards a brighter pastel */
  html:not(.theme-light) .resource-card .source-label.archion     { color: #a8c8ff !important; }
  html:not(.theme-light) .resource-card .source-label.census      { color: #a4bee0 !important; }
  html:not(.theme-light) .resource-card .source-label.immigration { color: #f4b890 !important; }
  html:not(.theme-light) .resource-card .source-label.newspaper   { color: #d9c4b3 !important; }
  html:not(.theme-light) .resource-card .source-label.civil       { color: #e8d3b0 !important; }
  html:not(.theme-light) .resource-card .source-label.cemetery    { color: #a8c8ff !important; }
  html:not(.theme-light) .resource-card .source-label.undigitized { color: #d9c4b3 !important; }

  /* In-page <style> .card overrides on towns/index.html (research context). */
  html:not(.theme-light) .towns-tab .card,
  html:not(.theme-light) body.cine-typography section .card.confirmed,
  html:not(.theme-light) body.cine-typography section .card.hypothesis,
  html:not(.theme-light) body.cine-typography section .card.accent {
    background: #2a251d !important;
    border-color: #8a6420 !important;
    color: #e8dfc8 !important;
  }
}
:root.theme-dark .resource-card {
  background: #1e2d43 !important;
  border-color: #33496b !important;
  color: #e8dfc8 !important;
}
:root.theme-dark .resource-card h4 { color: #fadea0 !important; }
:root.theme-dark .resource-card p  { color: #e8dfc8 !important; }
:root.theme-dark .resource-card .source-label { color: #c8b890 !important; }
:root.theme-dark .resource-card .source-label.archion     { color: #a8c8ff !important; }
:root.theme-dark .resource-card .source-label.census      { color: #a4bee0 !important; }
:root.theme-dark .resource-card .source-label.immigration { color: #f4b890 !important; }
:root.theme-dark .resource-card .source-label.newspaper   { color: #d9c4b3 !important; }
:root.theme-dark .resource-card .source-label.civil       { color: #e8d3b0 !important; }
:root.theme-dark .resource-card .source-label.cemetery    { color: #a8c8ff !important; }
:root.theme-dark .resource-card .source-label.undigitized { color: #d9c4b3 !important; }
:root.theme-dark body.cine-typography section .card.confirmed,
:root.theme-dark body.cine-typography section .card.hypothesis,
:root.theme-dark body.cine-typography section .card.accent {
  background: #1e2d43 !important;
  border-color: #33496b !important;
  color: #e8dfc8 !important;
}

/* ============================================================
   GERMANY & ORIGINS — 10 Hessian villages mini-tile strip
   (.ge-town-mini in index.html). Hardcoded cream + green palette
   for the .origin / .regional / .pending variants. The .origin
   variant also pins a cream gradient with !important via the
   inline style block, so we need ID-class specificity to win.
   Added 9 May 2026.
   ------------------------------------------------------------ */
@media (prefers-color-scheme: dark) {
  html:not(.theme-light) .ge-town-mini {
    background: #2a251d !important;
    border-color: #8a6420 !important;
    color: #e8dfc8 !important;
    box-shadow: 0 1px 2px rgba(0,0,0,0.45) !important;
  }
  html:not(.theme-light) .ge-town-mini:hover {
    background: #332c22 !important;
    box-shadow: 0 2px 6px rgba(0,0,0,0.55) !important;
  }
  html:not(.theme-light) .ge-town-mini.origin {
    background: #332a1d !important;
    background-image: none !important;
    border-left-color: #d8b366 !important;
  }
  html:not(.theme-light) .ge-town-mini.regional { border-left-color: #c8a850 !important; }
  html:not(.theme-light) .ge-town-mini.pending  { border-left-color: #906747 !important; }
  html:not(.theme-light) .ge-town-mini .name           { color: #fadea0 !important; }
  html:not(.theme-light) .ge-town-mini .role           { color: #c8b890 !important; }
  html:not(.theme-light) .ge-town-mini.origin   .role  { color: #f0d68c !important; }
  html:not(.theme-light) .ge-town-mini.regional .role  { color: #f0d68c !important; }
  html:not(.theme-light) .ge-town-mini.pending  .role  { color: #d9c4b3 !important; }
}
:root.theme-dark .ge-town-mini {
  background: #1e2d43 !important;
  border-color: #33496b !important;
  color: #e8dfc8 !important;
  box-shadow: 0 1px 2px rgba(0,0,0,0.45) !important;
}
:root.theme-dark .ge-town-mini:hover {
  background: #23354f !important;
  box-shadow: 0 2px 6px rgba(0,0,0,0.55) !important;
}
:root.theme-dark .ge-town-mini.origin {
  background: #22334c !important;
  background-image: none !important;
  border-left-color: #d8b366 !important;
}
:root.theme-dark .ge-town-mini.regional { border-left-color: #c8a850 !important; }
:root.theme-dark .ge-town-mini.pending  { border-left-color: #906747 !important; }
:root.theme-dark .ge-town-mini .name           { color: #fadea0 !important; }
:root.theme-dark .ge-town-mini .role           { color: #c8b890 !important; }
:root.theme-dark .ge-town-mini.origin   .role  { color: #f0d68c !important; }
:root.theme-dark .ge-town-mini.regional .role  { color: #f0d68c !important; }
:root.theme-dark .ge-town-mini.pending  .role  { color: #d9c4b3 !important; }

/* ============================================================
   FAMILY TREE — added 9 May 2026.
   The hierarchical tree (.family-tree, .ft-couple-card,
   .ft-person-card, .ft-marriage-bar, .ft-marriage-branch-fs)
   ships with hardcoded cream / pale-blue / pale-pink panels
   on family-tree-spa.html and every family_pages/*.html. Force
   dark equivalents that preserve the gender-coded accent colors
   without setting cream backgrounds. Also darkens any tree
   visualisations on tree-interactive.html, Family_Tree_All_Families.html
   and Kontze_Family_Tree_Graphic.html that share the same classes.
   ------------------------------------------------------------ */
@media (prefers-color-scheme: dark) {
  /* Couple card — cream → dark, gilt border preserved */
  html:not(.theme-light) .ft-couple-card {
    background: #24201a !important;
    border-color: #b48a3a !important;
  }
  html:not(.theme-light) .ft-couple-card a.ft-person {
    color: #e8dfc8 !important;
    background: transparent !important;
  }
  html:not(.theme-light) .ft-couple-card a.ft-person:hover {
    background: rgba(216,179,102,0.20) !important;
  }
  html:not(.theme-light) .ft-couple-card a.ft-person.ft-female {
    background: rgba(156, 117, 48,0.10) !important;
  }
  html:not(.theme-light) .ft-couple-card a.ft-person.ft-female:hover {
    background: rgba(156, 117, 48,0.22) !important;
  }
  html:not(.theme-light) .ft-couple-card .ft-marriage-bar {
    background: #1f1b15 !important;
    color: #f0e3b8 !important;
    border-top-color: #6a5a40 !important;
    border-bottom-color: #6a5a40 !important;
  }

  /* Single-person card — three colour variants */
  html:not(.theme-light) .ft-person-card {
    background: #1f2a3a !important;
    border-color: #6a8acc !important;
    color: #e8dfc8 !important;
  }
  html:not(.theme-light) .ft-person-card.ft-female {
    background: #2e281f !important;
    border-color: #9c7530 !important;
  }
  html:not(.theme-light) .ft-person-card.ft-subject {
    background: #2e2616 !important;
    border-color: #d8b366 !important;
    box-shadow: 0 2px 8px rgba(212,160,23,0.30) !important;
  }
  html:not(.theme-light) .ft-person-card.ft-died-young {
    background: #2a231d !important;
    border-color: #87684f !important;
    opacity: 0.92 !important;
  }

  /* Tree typography */
  html:not(.theme-light) .family-tree .ft-name   { color: #ffffff !important; }
  html:not(.theme-light) .family-tree .ft-dates  { color: #fff5d8 !important; font-weight: 500 !important; opacity: 1 !important; }
  html:not(.theme-light) .family-tree .ft-detail { color: #ffe8b8 !important; font-style: italic; opacity: 1 !important; }
  html:not(.theme-light) .family-tree .ft-pid    { color: #c8e0ff !important; font-weight: 700 !important; }
  html:not(.theme-light) .ft-couple-card a.ft-person.ft-female .ft-pid,
  html:not(.theme-light) .ft-person-card.ft-female .ft-pid    { color: #f3e9d4 !important; }

  /* Connector lines — lift to a brighter gold so they're visible */
  html:not(.theme-light) .family-tree .ft-trunk,
  html:not(.theme-light) .ft-trunk,
  html:not(.theme-light) .ft-sibling-bar {
    background: #d8b366 !important;
  }

  /* Marriage-branch wrapper (the dashed cream container) */
  html:not(.theme-light) .ft-marriage-branch-fs {
    background: #1f1b15 !important;
    border-color: #6a5a40 !important;
  }
  html:not(.theme-light) .ft-marriage-branch-fs > h4 {
    color: #fadea0 !important;
  }

  /* Hover-shadow lift for cards on dark backgrounds */
  html:not(.theme-light) .ft-couple-card,
  html:not(.theme-light) .ft-person-card {
    box-shadow: 0 1px 3px rgba(0,0,0,0.45) !important;
  }
  html:not(.theme-light) .ft-couple-card:hover,
  html:not(.theme-light) .ft-person-card:hover {
    box-shadow: 0 2px 10px rgba(0,0,0,0.55) !important;
  }
}
:root.theme-dark .ft-couple-card {
  background: #1a273b !important;
  border-color: #b48a3a !important;
}
:root.theme-dark .ft-couple-card a.ft-person {
  color: #e8dfc8 !important;
  background: transparent !important;
}
:root.theme-dark .ft-couple-card a.ft-person:hover {
  background: rgba(216,179,102,0.20) !important;
}
:root.theme-dark .ft-couple-card a.ft-person.ft-female {
  background: rgba(156, 117, 48,0.10) !important;
}
:root.theme-dark .ft-couple-card a.ft-person.ft-female:hover {
  background: rgba(156, 117, 48,0.22) !important;
}
:root.theme-dark .ft-couple-card .ft-marriage-bar {
  background: #172233 !important;
  color: #f0e3b8 !important;
  border-top-color: #6a5a40 !important;
  border-bottom-color: #6a5a40 !important;
}
:root.theme-dark .ft-person-card {
  background: #1f2a3a !important;
  border-color: #6a8acc !important;
  color: #e8dfc8 !important;
}
:root.theme-dark .ft-person-card.ft-female {
  background: #2e281f !important;
  border-color: #9c7530 !important;
}
:root.theme-dark .ft-person-card.ft-subject {
  background: #1f2e45 !important;
  border-color: #d8b366 !important;
  box-shadow: 0 2px 8px rgba(212,160,23,0.30) !important;
}
:root.theme-dark .ft-person-card.ft-died-young {
  background: #2a231d !important;
  border-color: #87684f !important;
  opacity: 0.92 !important;
}
:root.theme-dark .family-tree .ft-name   { color: #ffffff !important; }
:root.theme-dark .family-tree .ft-dates  { color: #fff5d8 !important; font-weight: 500 !important; opacity: 1 !important; }
:root.theme-dark .family-tree .ft-detail { color: #ffe8b8 !important; font-style: italic; opacity: 1 !important; }
:root.theme-dark .family-tree .ft-pid    { color: #c8e0ff !important; font-weight: 700 !important; }
:root.theme-dark .ft-couple-card a.ft-person.ft-female .ft-pid,
:root.theme-dark .ft-person-card.ft-female .ft-pid    { color: #f3e9d4 !important; }

/* Highest-specificity override for the index.html inline <style> block
   that re-defines .family-tree typography. Some browsers cache the
   inline block more aggressively than linked CSS — pin colour at the
   <html.theme-dark body> level so the new palette wins regardless. */
html.theme-dark body .family-tree .ft-name,
html.theme-dark body .ft-couple-card .ft-name,
html.theme-dark body .ft-person-card .ft-name,
html.theme-dark body .family-tree .ft-name.ft-name-tight {
  color: #ffffff !important;
}
html.theme-dark body .family-tree .ft-dates,
html.theme-dark body .ft-couple-card .ft-dates,
html.theme-dark body .ft-person-card .ft-dates {
  color: #fff5d8 !important;
  font-weight: 500 !important;
}
html.theme-dark body .family-tree .ft-detail,
html.theme-dark body .ft-couple-card .ft-detail,
html.theme-dark body .ft-person-card .ft-detail {
  color: #ffe8b8 !important;
}
html.theme-dark body .family-tree .ft-pid,
html.theme-dark body .ft-couple-card .ft-pid,
html.theme-dark body .ft-person-card .ft-pid {
  color: #c8e0ff !important;
  font-weight: 700 !important;
}
html.theme-dark body .ft-couple-card a.ft-person.ft-female .ft-pid,
html.theme-dark body .ft-person-card.ft-female .ft-pid {
  color: #f3e9d4 !important;
}
html.theme-dark body .ft-couple-card .ft-marriage-bar {
  color: #fff5d8 !important;
  background: #131d2b !important;
}

/* ============================================================
   FAMILY-TILE SLIMDOWN — added 9 May 2026.
   Per the user, each family tile should show only:
     · Name (.ft-name)
     · Birth/death dates (.ft-dates)
     · FamilySearch ID (.ft-pid)
   Everything else (.ft-detail — italic notes like marriage info,
   "Battery B veteran · died young", "Bottler at Anheuser-Busch")
   gets hidden site-wide via the .family-tree scope.
   Applies in both light AND dark mode (not theme-scoped).
   ------------------------------------------------------------ */
.family-tree .ft-detail,
.ft-couple-card .ft-detail,
.ft-person-card .ft-detail {
  display: none !important;
}

/* And brighten birth/death dates further — close to pure white. */
html.theme-dark .family-tree .ft-dates,
html.theme-dark body .family-tree .ft-dates,
html.theme-dark body .ft-couple-card .ft-dates,
html.theme-dark body .ft-person-card .ft-dates,
:root.theme-dark .family-tree .ft-dates,
html:not(.theme-light) .family-tree .ft-dates {
  color: #fafafa !important;
  font-weight: 600 !important;
  opacity: 1 !important;
}

/* ============================================================
   .ft-bd / .ft-dd — the *actual* birth-date / death-date classes
   used in index.html and family-tree-spa.html. Previous overrides
   targeted .ft-dates which only some pages use. The "b. " / "d. "
   prefixes are rendered via ::before pseudo-elements with their
   own hardcoded colors — bump those too.
   Added 9 May 2026.
   ------------------------------------------------------------ */
.family-tree .ft-bd,
.family-tree .ft-dd,
.ft-couple-card .ft-bd,
.ft-couple-card .ft-dd,
.ft-person-card .ft-bd,
.ft-person-card .ft-dd {
  /* Light-mode + dark-mode shared base — let theme rules below override. */
}
html.theme-dark .family-tree .ft-bd,
html.theme-dark .family-tree .ft-dd,
html.theme-dark body .family-tree .ft-bd,
html.theme-dark body .family-tree .ft-dd,
html.theme-dark body .ft-couple-card .ft-bd,
html.theme-dark body .ft-couple-card .ft-dd,
html.theme-dark body .ft-person-card .ft-bd,
html.theme-dark body .ft-person-card .ft-dd,
:root.theme-dark .family-tree .ft-bd,
:root.theme-dark .family-tree .ft-dd,
html:not(.theme-light) .family-tree .ft-bd,
html:not(.theme-light) .family-tree .ft-dd {
  color: #fafafa !important;
  font-weight: 500 !important;
  opacity: 1 !important;
}
/* The "b. " and "d. " prefixes are ::before content. Index.html sets
   color:#6a5a42 on them — beat that with our gilt for hierarchy. */
html.theme-dark .family-tree .ft-bd::before,
html.theme-dark .family-tree .ft-dd::before,
html.theme-dark body .family-tree .ft-bd::before,
html.theme-dark body .family-tree .ft-dd::before,
:root.theme-dark .family-tree .ft-bd::before,
:root.theme-dark .family-tree .ft-dd::before,
html:not(.theme-light) .family-tree .ft-bd::before,
html:not(.theme-light) .family-tree .ft-dd::before {
  color: #fadea0 !important;
  font-weight: 700 !important;
}
:root.theme-dark .family-tree .ft-trunk,
:root.theme-dark .ft-trunk,
:root.theme-dark .ft-sibling-bar {
  background: #d8b366 !important;
}
:root.theme-dark .ft-marriage-branch-fs {
  background: #172233 !important;
  border-color: #6a5a40 !important;
}
:root.theme-dark .ft-marriage-branch-fs > h4 {
  color: #fadea0 !important;
}
:root.theme-dark .ft-couple-card,
:root.theme-dark .ft-person-card {
  box-shadow: 0 1px 3px rgba(0,0,0,0.45) !important;
}
:root.theme-dark .ft-couple-card:hover,
:root.theme-dark .ft-person-card:hover {
  box-shadow: 0 2px 10px rgba(0,0,0,0.55) !important;
}

/* ============================================================
   STANDALONE FAMILY-TREE PAGES — added 9 May 2026.
   Family_Tree_All_Families.html and Kontze_Family_Tree_Graphic.html
   each ship a self-contained <style> block with hardcoded cream
   page backgrounds and white toolbar buttons that bypass the
   site's CSS variables. Override directly via tag selector inside
   the .theme-dark scope. The Kontze SVG also pins fills inline
   for .male/.female/.unknown rect — lift those toward darker
   variants while preserving the gender-coded stroke colors.
   ------------------------------------------------------------ */
@media (prefers-color-scheme: dark) {
  /* Family_Tree_All_Families.html */
  html:not(.theme-light) body { background: #1a1612 !important; color: #e8dfc8 !important; }
  html:not(.theme-light) .toolbar { background: #2a251d !important; border-bottom-color: #6a5a40 !important; }
  html:not(.theme-light) .toolbar button {
    background: #1f1b15 !important;
    color: #e8dfc8 !important;
    border-color: #6a5a40 !important;
  }
  html:not(.theme-light) .toolbar button:hover { background: #d8b366 !important; color: #1f1a14 !important; }
  html:not(.theme-light) .toolbar button.active { background: #5c3d2e !important; color: #fadea0 !important; border-color: #d8b366 !important; }
  html:not(.theme-light) .toolbar .sep { background: #6a5a40 !important; }

  /* Kontze_Family_Tree_Graphic.html — SVG fills */
  html:not(.theme-light) .male rect      { fill: #1f2a3a !important; stroke: #6a8acc !important; }
  html:not(.theme-light) .female rect    { fill: #2e281f !important; stroke: #9c7530 !important; }
  html:not(.theme-light) .unknown rect   { fill: #2a261d !important; stroke: #b8a878 !important; }
  html:not(.theme-light) .candidate rect { fill: #2e2616 !important; stroke: #d8b366 !important; }
  html:not(.theme-light) .person-name    { fill: #fadea0 !important; }
  html:not(.theme-light) .person-dates   { fill: #c8b890 !important; }
  html:not(.theme-light) .person-detail  { fill: #b8a878 !important; }
  html:not(.theme-light) .person-question{ fill: #fadea0 !important; }
  html:not(.theme-light) .marriage-line  { stroke: #c8b890 !important; }
  html:not(.theme-light) .descent-line   { stroke: #8a7858 !important; }
  html:not(.theme-light) .marriage-label { fill: #c8b890 !important; }
  html:not(.theme-light) .section-label  { fill: #fadea0 !important; }
  html:not(.theme-light) .gen-label      { fill: #c8b890 !important; }
  html:not(.theme-light) .note           { fill: #fadea0 !important; }
  html:not(.theme-light) .legend-box     { border-color: #6a5a40 !important; }
}
:root.theme-dark body { background: #131d2b !important; color: #e8dfc8 !important; }
:root.theme-dark .toolbar { background: #1e2d43 !important; border-bottom-color: #33496b !important; }
:root.theme-dark .toolbar button {
  background: #172233 !important;
  color: #e8dfc8 !important;
  border-color: #33496b !important;
}
:root.theme-dark .toolbar button:hover { background: #d8b366 !important; color: #162132 !important; }
:root.theme-dark .toolbar button.active { background: #1c2a3f !important; color: #fadea0 !important; border-color: #d8b366 !important; }
:root.theme-dark .toolbar .sep { background: #8a5a12 !important; }

:root.theme-dark .male rect      { fill: #1f2a3a !important; stroke: #6a8acc !important; }
:root.theme-dark .female rect    { fill: #2e281f !important; stroke: #9c7530 !important; }
:root.theme-dark .unknown rect   { fill: #1e2d44 !important; stroke: #b8a878 !important; }
:root.theme-dark .candidate rect { fill: #1f2e45 !important; stroke: #d8b366 !important; }
:root.theme-dark .person-name    { fill: #fadea0 !important; }
:root.theme-dark .person-dates   { fill: #c8b890 !important; }
:root.theme-dark .person-detail  { fill: #b8a878 !important; }
:root.theme-dark .person-question{ fill: #fadea0 !important; }
:root.theme-dark .marriage-line  { stroke: #c8b890 !important; }
:root.theme-dark .descent-line   { stroke: #8a7858 !important; }
:root.theme-dark .marriage-label { fill: #c8b890 !important; }
:root.theme-dark .section-label  { fill: #fadea0 !important; }
:root.theme-dark .gen-label      { fill: #c8b890 !important; }
:root.theme-dark .note           { fill: #fadea0 !important; }
:root.theme-dark .legend-box     { border-color: #6a5a40 !important; }

/* ============================================================
   "Evidence not found" subsection on Key Evidence (index.html)
   + the "★ Direct source" inline-styled <details> inside
   Evidence card #7 (Civil War pension file).
   Added 9 May 2026.

   The .enf-* class rules in index.html hard-code a deep red-walnut
   (#2a1a14) background that was tuned for the cream light-mode page.
   In dark mode the page surface itself is walnut, so the section
   loses its "callout" identity and blends into the body. Re-paint
   the whole .enf-block as a unified dark card and align the borders
   to the dark-mode token set so it reads as one cohesive panel
   wrapping the heading, intro paragraph, items, and 1890-census
   footnote together.

   Evidence card #7's "Direct source" disclosure uses inline
   background:#f6f0e0 — a cream tone that is NOT caught by the
   existing #fff/#fef/#fdf/#fbf/#fce/#f6e attribute-selector list
   (#f6f0e0 starts with #f6f, not #f6e). Add an explicit override.
   ------------------------------------------------------------ */
/* .enf-* and .ec-body details overrides retired 16 May 2026 — neither class
   appears in markup (actual classes are .ev-enf-* with different prefix and
   .evidence-card without the details-accordion structure). */

/* ============================================================
   DOC-CARD (Source Archive tab) — dark-mode overrides
   Added 10 May 2026.
   The .doc-card inline rules in <style> in the head hardcode
   light backgrounds and dark text colors that go invisible on
   the dark theme. These rules invert the palette using the
   theme-token values (matched to the rest of the dark library).
   ============================================================ */

@media (prefers-color-scheme: dark) {
  html:not(.theme-light) .doc-card {
    background: var(--bg-card, #24201a) !important;
    border-color: var(--border-medium, #6a5a40) !important;
    color: var(--text-body, #e8dfc8);
  }
  html:not(.theme-light) .doc-card:hover {
    background: var(--bg-elevated, #2a2519) !important;
  }
  html:not(.theme-light) .doc-card .doc-title {
    color: var(--text-heading, #f1cf85) !important;
  }
  html:not(.theme-light) .doc-card .doc-type {
    color: var(--brand-light, #fadea0) !important;
  }
  html:not(.theme-light) .doc-card .doc-desc {
    color: var(--text-body, #e8dfc8) !important;
  }
  html:not(.theme-light) a.doc-card {
    border-bottom-color: var(--border-medium, #6a5a40) !important;
  }
  html:not(.theme-light) a.doc-card:hover {
    background: var(--bg-elevated, #2a2519) !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.45) !important;
  }
  html:not(.theme-light) a.doc-card::after {
    color: var(--brand-dark, #d8b366) !important;
  }
  html:not(.theme-light) a.doc-card:hover::after {
    color: var(--brand-light, #fadea0) !important;
  }
  html:not(.theme-light) a.doc-card .doc-title {
    color: var(--text-heading, #f1cf85) !important;
  }
  html:not(.theme-light) a.doc-card .doc-desc {
    color: var(--text-body, #e8dfc8) !important;
  }
  /* Strong / em inside doc-cards too */
  html:not(.theme-light) .doc-card strong {
    color: var(--brand-light, #fadea0) !important;
  }
  html:not(.theme-light) .doc-card em {
    color: var(--text-meta, #c8b896) !important;
  }
}

/* Same rules under explicit theme-dark toggle */
:root.theme-dark .doc-card {
  background: var(--bg-card, #1a273b) !important;
  border-color: var(--border-medium, #33496b) !important;
  color: var(--text-body, #e8dfc8);
}
:root.theme-dark .doc-card:hover {
  background: var(--bg-elevated, #1e2c43) !important;
}
:root.theme-dark .doc-card .doc-title {
  color: var(--text-heading, #f1cf85) !important;
}
:root.theme-dark .doc-card .doc-type {
  color: var(--brand-light, #fadea0) !important;
}
:root.theme-dark .doc-card .doc-desc {
  color: var(--text-body, #e8dfc8) !important;
}
:root.theme-dark a.doc-card {
  border-bottom-color: var(--border-medium, #33496b) !important;
}
:root.theme-dark a.doc-card:hover {
  background: var(--bg-elevated, #1e2c43) !important;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.45) !important;
}
:root.theme-dark a.doc-card::after {
  color: var(--brand-dark, #d8b366) !important;
}
:root.theme-dark a.doc-card:hover::after {
  color: var(--brand-light, #fadea0) !important;
}
:root.theme-dark a.doc-card .doc-title {
  color: var(--text-heading, #f1cf85) !important;
}
:root.theme-dark a.doc-card .doc-desc {
  color: var(--text-body, #e8dfc8) !important;
}
:root.theme-dark .doc-card strong {
  color: var(--brand-light, #fadea0) !important;
}
:root.theme-dark .doc-card em {
  color: var(--text-meta, #c8b896) !important;
}

/* ============================================================
   People-page upgrade — dark-mode parity (10 May 2026 evening pass)
   ============================================================
   The May 10 people-page upgrade added new content patterns that
   weren't covered by the original dark-mode rules:
     · <section class="section">  (basic body-section wrapper)
     · table.kv  (Vital details key-value table)
     · .evidence-card  (Sources/key-evidence cards with inline cream backgrounds)
     · .charles-link, .bottom-line, .quick-facts/.qf/.qf-label/.qf-value
       (At-a-Glance summary-card subcomponents)
     · .family-tree and the .ft-* descend-tree subcomponents
     · .sponsors, .surname-pill
     · Inline style="color:#8a6420" / #5a4a32 / #6a5a42 / #a3441f / #8a3a3a / #c84a4a
   The rules below force readable text colors on dark walnut backgrounds.
   Each rule duplicates the @media (prefers-color-scheme: dark) selector
   pattern (:root:not(.theme-light)) AND the explicit (:root.theme-dark)
   selector so it applies in both auto-dark and toggle-dark modes.
   ------------------------------------------------------------ */

/* Generic section wrapper — paragraph/list text on dark walnut */
:root:not(.theme-light) section.section,
:root.theme-dark section.section {
  color: var(--text-body, #e8dfc8) !important;
}
:root:not(.theme-light) section.section p,
:root:not(.theme-light) section.section li,
:root:not(.theme-light) section.section td,
:root:not(.theme-light) section.section dd,
:root.theme-dark section.section p,
:root.theme-dark section.section li,
:root.theme-dark section.section td,
:root.theme-dark section.section dd {
  color: var(--text-body, #e8dfc8) !important;
}
:root:not(.theme-light) section.section h2,
:root:not(.theme-light) section.section h3,
:root:not(.theme-light) section.section h4,
:root.theme-dark section.section h2,
:root.theme-dark section.section h3,
:root.theme-dark section.section h4 {
  color: var(--text-heading, #f1cf85) !important;
}
:root:not(.theme-light) section.section strong,
:root:not(.theme-light) section.section b,
:root.theme-dark section.section strong,
:root.theme-dark section.section b {
  color: var(--brand-light, #fadea0) !important;
}
:root:not(.theme-light) section.section em,
:root:not(.theme-light) section.section i,
:root.theme-dark section.section em,
:root.theme-dark section.section i {
  color: var(--text-meta, #c8b896) !important;
}
:root:not(.theme-light) section.section a,
:root.theme-dark section.section a {
  color: var(--brand-light, #fadea0) !important;
}

/* Vital details kv table (regardless of context — was previously scoped to section.page only) */
:root:not(.theme-light) table.kv,
:root.theme-dark table.kv {
  background: var(--bg-card, #1a273b) !important;
  color: var(--text-body, #e8dfc8) !important;
  border-color: var(--border-light, #293e5d) !important;
}
:root:not(.theme-light) table.kv td,
:root.theme-dark table.kv td {
  color: var(--text-body, #e8dfc8) !important;
  border-color: var(--border-light, #293e5d) !important;
}
:root:not(.theme-light) table.kv td:first-child,
:root.theme-dark table.kv td:first-child {
  color: var(--text-meta, #c8b896) !important;
}
:root:not(.theme-light) table.kv a,
:root.theme-dark table.kv a {
  color: var(--brand-light, #fadea0) !important;
}
:root:not(.theme-light) table.kv strong,
:root.theme-dark table.kv strong {
  color: var(--brand-light, #fadea0) !important;
}

/* Evidence card — light cream surface with inline color:#8a6420 headings.
   Force readable dark-mode colors across the card and its descendants. */
:root:not(.theme-light) .evidence-card,
:root.theme-dark .evidence-card {
  background: var(--bg-card, #1a273b) !important;
  background-image: none !important;
  border-color: var(--border-medium, #33496b) !important;
  color: var(--text-body, #e8dfc8) !important;
}
:root:not(.theme-light) .evidence-card *,
:root.theme-dark .evidence-card * {
  color: var(--text-body, #e8dfc8) !important;
}
:root:not(.theme-light) .evidence-card h2,
:root:not(.theme-light) .evidence-card h3,
:root:not(.theme-light) .evidence-card h4,
:root.theme-dark .evidence-card h2,
:root.theme-dark .evidence-card h3,
:root.theme-dark .evidence-card h4 {
  color: var(--text-heading, #f1cf85) !important;
}
:root:not(.theme-light) .evidence-card a,
:root.theme-dark .evidence-card a {
  color: var(--brand-light, #fadea0) !important;
}
:root:not(.theme-light) .evidence-card strong,
:root.theme-dark .evidence-card strong {
  color: var(--brand-light, #fadea0) !important;
}
:root:not(.theme-light) .evidence-card em,
:root.theme-dark .evidence-card em {
  color: var(--text-meta, #c8b896) !important;
}
:root:not(.theme-light) .evidence-card figure img,
:root.theme-dark .evidence-card figure img {
  border-color: var(--border-medium, #6a5a40) !important;
}
:root:not(.theme-light) .evidence-card figcaption,
:root.theme-dark .evidence-card figcaption {
  color: var(--text-meta, #c8b896) !important;
}

/* At-a-Glance summary-card subcomponents (bottom-line, charles-link, quick-facts) */
:root:not(.theme-light) .bottom-line,
:root.theme-dark .bottom-line {
  color: var(--text-body, #e8dfc8) !important;
}
:root:not(.theme-light) .bottom-line strong,
:root.theme-dark .bottom-line strong {
  color: var(--brand-light, #fadea0) !important;
}
:root:not(.theme-light) .bottom-line em,
:root.theme-dark .bottom-line em {
  color: var(--text-meta, #c8b896) !important;
}
:root:not(.theme-light) .bottom-line a,
:root.theme-dark .bottom-line a {
  color: var(--brand-light, #fadea0) !important;
}
:root:not(.theme-light) .charles-link,
:root.theme-dark .charles-link {
  background: var(--bg-card-tint, #1f2e45) !important;
  color: var(--text-body, #e8dfc8) !important;
  border-color: var(--border-medium, #33496b) !important;
}
:root:not(.theme-light) .charles-link strong,
:root.theme-dark .charles-link strong {
  color: var(--brand-light, #fadea0) !important;
}
:root:not(.theme-light) .charles-link em,
:root.theme-dark .charles-link em {
  color: var(--text-meta, #c8b896) !important;
}
:root:not(.theme-light) .charles-link a,
:root.theme-dark .charles-link a {
  color: var(--brand-light, #fadea0) !important;
}
:root:not(.theme-light) .quick-facts .qf,
:root.theme-dark .quick-facts .qf {
  background: var(--bg-card-tint, #1f2e45) !important;
  color: var(--text-body, #e8dfc8) !important;
  border-color: var(--border-light, #293e5d) !important;
}
:root:not(.theme-light) .quick-facts .qf-label,
:root.theme-dark .quick-facts .qf-label {
  color: var(--text-meta, #c8b896) !important;
}
:root:not(.theme-light) .quick-facts .qf-value,
:root.theme-dark .quick-facts .qf-value {
  color: var(--text-body, #e8dfc8) !important;
}
:root:not(.theme-light) .quick-facts .qf-value strong,
:root.theme-dark .quick-facts .qf-value strong {
  color: var(--brand-light, #fadea0) !important;
}
:root:not(.theme-light) .quick-facts a,
:root.theme-dark .quick-facts a {
  color: var(--brand-light, #fadea0) !important;
}

/* Card-pill (status chip in summary-card header) */
:root:not(.theme-light) .card-pill,
:root.theme-dark .card-pill {
  color: var(--text-on-dark, #f6f1e7) !important;
}
:root:not(.theme-light) .card-pill.confirmed,
:root.theme-dark .card-pill.confirmed {
  background: rgba(96, 131, 176, 0.28) !important;
  color: #bfccdc !important;
  border: 1px solid rgba(96, 131, 176, 0.5) !important;
}
:root:not(.theme-light) .card-pill.open,
:root:not(.theme-light) .card-pill.open-id,
:root.theme-dark .card-pill.open,
:root.theme-dark .card-pill.open-id {
  background: rgba(232, 160, 80, 0.28) !important;
  color: #f4c8a8 !important;
  border: 1px solid rgba(232, 160, 80, 0.5) !important;
}

/* Family tree — couple cards, children row, person cards */
:root:not(.theme-light) .family-tree,
:root.theme-dark .family-tree {
  color: var(--text-body, #e8dfc8) !important;
}
:root:not(.theme-light) .ft-couple-card,
:root:not(.theme-light) .ft-person-card,
:root:not(.theme-light) .ft-person,
:root:not(.theme-light) .ft-child,
:root.theme-dark .ft-couple-card,
:root.theme-dark .ft-person-card,
:root.theme-dark .ft-person,
:root.theme-dark .ft-child {
  background: var(--bg-card-tint, #1f2e45) !important;
  color: var(--text-body, #e8dfc8) !important;
  border-color: var(--border-light, #293e5d) !important;
}
:root:not(.theme-light) .ft-name,
:root.theme-dark .ft-name {
  color: var(--text-heading, #f1cf85) !important;
}
:root:not(.theme-light) .ft-name-tight,
:root.theme-dark .ft-name-tight {
  color: var(--text-heading, #f1cf85) !important;
}
:root:not(.theme-light) .ft-bd,
:root:not(.theme-light) .ft-dd,
:root.theme-dark .ft-bd,
:root.theme-dark .ft-dd {
  color: var(--text-body, #e8dfc8) !important;
}
:root:not(.theme-light) .ft-pid,
:root.theme-dark .ft-pid {
  color: var(--text-meta, #c8b896) !important;
}
:root:not(.theme-light) .ft-marriage-bar,
:root.theme-dark .ft-marriage-bar {
  color: var(--text-meta, #c8b896) !important;
}
:root:not(.theme-light) .ft-trunk,
:root:not(.theme-light) .ft-sibling-bar,
:root.theme-dark .ft-trunk,
:root.theme-dark .ft-sibling-bar {
  background: var(--border-medium, #6a5a40) !important;
  border-color: var(--border-medium, #6a5a40) !important;
}
:root:not(.theme-light) .ft-person-card.ft-died-young,
:root.theme-dark .ft-person-card.ft-died-young {
  background: rgba(200, 88, 26, 0.18) !important;
  border-color: rgba(200, 88, 26, 0.5) !important;
}
:root:not(.theme-light) .ft-person-card.ft-female,
:root.theme-dark .ft-person-card.ft-female {
  background: rgba(145, 113, 59, 0.15) !important;
}
:root:not(.theme-light) .ft-person-card.ft-subject,
:root.theme-dark .ft-person-card.ft-subject {
  background: var(--brand-tint, #263855) !important;
  border-color: var(--brand-dark, #d8b366) !important;
}
:root:not(.theme-light) .ft-person-card a,
:root:not(.theme-light) .ft-couple-card a,
:root:not(.theme-light) .family-tree a,
:root.theme-dark .ft-person-card a,
:root.theme-dark .ft-couple-card a,
:root.theme-dark .family-tree a {
  color: var(--brand-light, #fadea0) !important;
}

/* Sponsor lists & surname pills */
:root:not(.theme-light) ul.sponsors li,
:root.theme-dark ul.sponsors li {
  color: var(--text-body, #e8dfc8) !important;
}
:root:not(.theme-light) ul.sponsors em,
:root.theme-dark ul.sponsors em {
  color: var(--text-meta, #c8b896) !important;
}
:root:not(.theme-light) .surname-pill,
:root.theme-dark .surname-pill {
  background: rgba(232, 160, 80, 0.20) !important;
  color: #f4c8a8 !important;
  border: 1px solid rgba(232, 160, 80, 0.4) !important;
}

/* Aggressive inline-color overrides — the May 10 evidence-card / sources / vital-details
   blocks used hardcoded brown/red inline color values that disappear on walnut. */
:root:not(.theme-light) [style*="color:#8a6420"],
:root:not(.theme-light) [style*="color: #8a6420"],
:root:not(.theme-light) [style*="color:#6a5a42"],
:root:not(.theme-light) [style*="color: #6a5a42"],
:root:not(.theme-light) [style*="color:#5a4a32"],
:root:not(.theme-light) [style*="color: #5a4a32"],
:root:not(.theme-light) [style*="color:#1f1a14"],
:root:not(.theme-light) [style*="color: #1f1a14"],
:root.theme-dark [style*="color:#8a6420"],
:root.theme-dark [style*="color: #8a6420"],
:root.theme-dark [style*="color:#6a5a42"],
:root.theme-dark [style*="color: #6a5a42"],
:root.theme-dark [style*="color:#5a4a32"],
:root.theme-dark [style*="color: #5a4a32"],
:root.theme-dark [style*="color:#1f1a14"],
:root.theme-dark [style*="color: #1f1a14"] {
  color: var(--brand-light, #fadea0) !important;
}
:root:not(.theme-light) [style*="color:#75543a"],
:root:not(.theme-light) [style*="color: #75543a"],
:root:not(.theme-light) [style*="color:#76553a"],
:root:not(.theme-light) [style*="color: #76553a"],
:root:not(.theme-light) [style*="color:#906747"],
:root:not(.theme-light) [style*="color: #906747"],
:root.theme-dark [style*="color:#75543a"],
:root.theme-dark [style*="color: #75543a"],
:root.theme-dark [style*="color:#76553a"],
:root.theme-dark [style*="color: #76553a"],
:root.theme-dark [style*="color:#906747"],
:root.theme-dark [style*="color: #906747"] {
  color: #f4c8a8 !important;
}

/* Inline backgrounds I used in the upgrade — make sure they read on dark */
:root:not(.theme-light) [style*="background:#fdf3d8"],
:root:not(.theme-light) [style*="background: #fdf3d8"],
:root:not(.theme-light) [style*="background:#fff2c2"],
:root:not(.theme-light) [style*="background: #fff2c2"],
:root:not(.theme-light) [style*="background:#fce8d6"],
:root:not(.theme-light) [style*="background: #fce8d6"],
:root.theme-dark [style*="background:#fdf3d8"],
:root.theme-dark [style*="background: #fdf3d8"],
:root.theme-dark [style*="background:#fff2c2"],
:root.theme-dark [style*="background: #fff2c2"],
:root.theme-dark [style*="background:#fce8d6"],
:root.theme-dark [style*="background: #fce8d6"] {
  background: var(--brand-tint, #33507a) !important;
  color: var(--brand-light, #fadea0) !important;
  border-color: var(--brand-dark, #d8b366) !important;
}

/* Details/research-log dropdown */
:root:not(.theme-light) details.research-log,
:root.theme-dark details.research-log {
  background: var(--bg-card, #1a273b) !important;
  border-color: var(--border-medium, #33496b) !important;
  color: var(--text-body, #e8dfc8) !important;
}
:root:not(.theme-light) details.research-log > summary,
:root.theme-dark details.research-log > summary {
  background: linear-gradient(180deg, var(--bg-card-tint, #1f2e45) 0%, var(--bg-card, #1a273b) 100%) !important;
  color: var(--text-heading, #f1cf85) !important;
  border-bottom-color: var(--border-medium, #33496b) !important;
}
:root:not(.theme-light) details.research-log .log-meta,
:root.theme-dark details.research-log .log-meta {
  color: var(--text-meta, #c8b896) !important;
}

/* Section h2 inline date-badge */
:root:not(.theme-light) .section h2 .badge-inline,
:root.theme-dark .section h2 .badge-inline {
  background: var(--brand-tint, #33507a) !important;
  color: var(--brand-light, #fadea0) !important;
  border-color: var(--brand-dark, #d8b366) !important;
}

/* Back-nav footer & general ul/li/p in main */
:root:not(.theme-light) main p,
:root:not(.theme-light) main li,
:root.theme-dark main p,
:root.theme-dark main li {
  color: var(--text-body, #e8dfc8);
}
:root:not(.theme-light) main strong,
:root.theme-dark main strong {
  color: var(--brand-light, #fadea0);
}
:root:not(.theme-light) main em,
:root.theme-dark main em {
  color: var(--text-meta, #c8b896);
}

/* Lifespan + crumbs at top of person page (already styled but ensure) */
:root:not(.theme-light) header.child-hero .lifespan,
:root.theme-dark header.child-hero .lifespan,
:root:not(.theme-light) header.cinema-section-hero .lifespan,
:root.theme-dark header.cinema-section-hero .lifespan {
  color: var(--text-meta, #c8b896) !important;
}
:root:not(.theme-light) header.child-hero .sub,
:root.theme-dark header.child-hero .sub,
:root:not(.theme-light) header.cinema-section-hero .sub,
:root.theme-dark header.cinema-section-hero .sub {
  color: var(--text-on-dark-d, #c8b896) !important;
}
:root:not(.theme-light) header .crumbs,
:root.theme-dark header .crumbs,
:root:not(.theme-light) header .crumbs a,
:root.theme-dark header .crumbs a {
  color: var(--text-meta, #c8b896) !important;
}

/* End May 10 evening pass */

/* ============================================================
   Inline-background sweep — cream-tone catch (10 May 2026 night pass,
   pruned 16 May 2026 cleanup)
   ============================================================
   Pruned 100+ redundant hex-specific selectors that were already
   subsumed by the [style*="background:#fff"]/#fbf8f2/#f7f1e5/#f0e3ca/#a57727/etc.
   wildcards below. `background-color:` form retained because the
   wildcard list below only covers the shorthand form.
   ------------------------------------------------------------ */

:root:not(.theme-light) [style*="background-color:#fffaf0"],
:root:not(.theme-light) [style*="background-color: #fffaf0"],
:root:not(.theme-light) [style*="background-color:#fff4e8"],
:root:not(.theme-light) [style*="background-color: #fff4e8"],
:root:not(.theme-light) [style*="background-color:#f6ebd2"],
:root:not(.theme-light) [style*="background-color: #f6ebd2"],
:root.theme-dark [style*="background-color:#fffaf0"],
:root.theme-dark [style*="background-color: #fffaf0"],
:root.theme-dark [style*="background-color:#fff4e8"],
:root.theme-dark [style*="background-color: #fff4e8"],
:root.theme-dark [style*="background-color:#f6ebd2"],
:root.theme-dark [style*="background-color: #f6ebd2"] {
  background: var(--bg-card, #1a273b) !important;
  background-image: none !important;
  color: var(--text-body, #e8dfc8) !important;
  border-color: var(--border-medium, #33496b) !important;
}

/* Plain white backgrounds — table rows, info boxes, etc. */
:root:not(.theme-light) [style*="background:#fff;"],
:root:not(.theme-light) [style*="background: #fff;"],
:root:not(.theme-light) [style*="background:#ffffff"],
:root:not(.theme-light) [style*="background: #ffffff"],
:root:not(.theme-light) [style*="background-color:#fff;"],
:root:not(.theme-light) [style*="background-color: #fff;"],
:root:not(.theme-light) [style*="background-color:#ffffff"],
:root:not(.theme-light) [style*="background-color: #ffffff"],
:root.theme-dark [style*="background:#fff;"],
:root.theme-dark [style*="background: #fff;"],
:root.theme-dark [style*="background:#ffffff"],
:root.theme-dark [style*="background: #ffffff"],
:root.theme-dark [style*="background-color:#fff;"],
:root.theme-dark [style*="background-color: #fff;"],
:root.theme-dark [style*="background-color:#ffffff"],
:root.theme-dark [style*="background-color: #ffffff"] {
  background: var(--bg-card, #1a273b) !important;
  background-image: none !important;
  color: var(--text-body, #e8dfc8) !important;
  border-color: var(--border-medium, #33496b) !important;
}

/* Inline gradients on cards — neutralize all cream/white linear-gradients */
:root:not(.theme-light) [style*="linear-gradient(140deg, #fffaee"],
:root:not(.theme-light) [style*="linear-gradient(140deg,#fffaee"],
:root:not(.theme-light) [style*="linear-gradient(140deg, #fffaf0"],
:root:not(.theme-light) [style*="linear-gradient(140deg,#fffaf0"],
:root:not(.theme-light) [style*="linear-gradient(140deg, #f0f4ff"],
:root:not(.theme-light) [style*="linear-gradient(140deg,#f0f4ff"],
:root:not(.theme-light) [style*="linear-gradient(135deg,#fffaf0"],
:root:not(.theme-light) [style*="linear-gradient(135deg, #fffaf0"],
:root:not(.theme-light) [style*="linear-gradient(180deg, #f6ebd2"],
:root:not(.theme-light) [style*="linear-gradient(180deg,#f6ebd2"],
:root.theme-dark [style*="linear-gradient(140deg, #fffaee"],
:root.theme-dark [style*="linear-gradient(140deg,#fffaee"],
:root.theme-dark [style*="linear-gradient(140deg, #fffaf0"],
:root.theme-dark [style*="linear-gradient(140deg,#fffaf0"],
:root.theme-dark [style*="linear-gradient(140deg, #f0f4ff"],
:root.theme-dark [style*="linear-gradient(140deg,#f0f4ff"],
:root.theme-dark [style*="linear-gradient(135deg,#fffaf0"],
:root.theme-dark [style*="linear-gradient(135deg, #fffaf0"],
:root.theme-dark [style*="linear-gradient(180deg, #f6ebd2"],
:root.theme-dark [style*="linear-gradient(180deg,#f6ebd2"] {
  background: var(--bg-card, #1a273b) !important;
  background-image: none !important;
  color: var(--text-body, #e8dfc8) !important;
  border-color: var(--border-medium, #33496b) !important;
}

/* Tinted-translucent backgrounds (semi-transparent rgba) on cards.
   Most are intentional (highlight tints), but force them to read on
   walnut by re-baselining their alpha against the dark surface. */
:root:not(.theme-light) [style*="background:rgba(74, 102, 138,0.08)"],
:root:not(.theme-light) [style*="background: rgba(74, 102, 138,0.08)"],
:root:not(.theme-light) [style*="background:rgba(138,120,88,0.15)"],
:root:not(.theme-light) [style*="background: rgba(138,120,88,0.15)"],
:root.theme-dark [style*="background:rgba(74, 102, 138,0.08)"],
:root.theme-dark [style*="background: rgba(74, 102, 138,0.08)"],
:root.theme-dark [style*="background:rgba(138,120,88,0.15)"],
:root.theme-dark [style*="background: rgba(138,120,88,0.15)"] {
  background: rgba(96, 131, 176, 0.18) !important;  /* lifted to dark-readable green tint */
  color: var(--text-body, #e8dfc8) !important;
}

/* Catch-all safety net: any element with an inline background starting with
   #fff (any cream/white shade) or #fbf8f2 / #f7f1e5 / #f0e3ca / #e5c691 / #a57727 shorthand */
:root:not(.theme-light) [style*="background:#fbf8f2"],
:root:not(.theme-light) [style*="background: #fbf8f2"],
:root:not(.theme-light) [style*="background:#f7f1e5"],
:root:not(.theme-light) [style*="background: #f7f1e5"],
:root:not(.theme-light) [style*="background:#f0e3ca"],
:root:not(.theme-light) [style*="background: #f0e3ca"],
:root:not(.theme-light) [style*="background:#a57727"],
:root:not(.theme-light) [style*="background: #a57727"],
:root:not(.theme-light) [style*="background:#e5c691"],
:root:not(.theme-light) [style*="background: #e5c691"],
:root:not(.theme-light) [style*="background:#fbf8f2"],
:root:not(.theme-light) [style*="background: #fbf8f2"],
:root.theme-dark [style*="background:#fbf8f2"],
:root.theme-dark [style*="background: #fbf8f2"],
:root.theme-dark [style*="background:#f7f1e5"],
:root.theme-dark [style*="background: #f7f1e5"],
:root.theme-dark [style*="background:#f0e3ca"],
:root.theme-dark [style*="background: #f0e3ca"],
:root.theme-dark [style*="background:#a57727"],
:root.theme-dark [style*="background: #a57727"],
:root.theme-dark [style*="background:#e5c691"],
:root.theme-dark [style*="background: #e5c691"],
:root.theme-dark [style*="background:#fbf8f2"],
:root.theme-dark [style*="background: #fbf8f2"] {
  background: var(--bg-card, #1a273b) !important;
  background-image: none !important;
  color: var(--text-body, #e8dfc8) !important;
  border-color: var(--border-medium, #33496b) !important;
}

/* End night pass — comprehensive inline-background sweep */

/* ============================================================
   Descendant-text fixup for inline-bg overridden boxes
   ============================================================
   The inline-bg sweep above flips the box surface to walnut, but
   descendants (paragraphs, list items, table cells, headings,
   strong/em) keep their inherited dark-text color and disappear.
   These rules force readable cream/gilt text on every descendant
   of any cream-background box in dark mode.
   ------------------------------------------------------------ */

:root:not(.theme-light) [style*="background:#fff"] *,
:root:not(.theme-light) [style*="background: #fff"] *,
:root:not(.theme-light) [style*="background:#fbf8f2"] *,
:root:not(.theme-light) [style*="background: #fbf8f2"] *,
:root:not(.theme-light) [style*="background:#f7f1e5"] *,
:root:not(.theme-light) [style*="background: #f7f1e5"] *,
:root:not(.theme-light) [style*="background:#f0e3ca"] *,
:root:not(.theme-light) [style*="background: #f0e3ca"] *,
:root:not(.theme-light) [style*="background:#a57727"] *,
:root:not(.theme-light) [style*="background: #a57727"] *,
:root:not(.theme-light) [style*="background:#e5c691"] *,
:root:not(.theme-light) [style*="background: #e5c691"] *,
:root:not(.theme-light) [style*="background:#a57727"] *,
:root:not(.theme-light) [style*="background: #a57727"] *,
:root:not(.theme-light) [style*="background:#fbf8f2"] *,
:root:not(.theme-light) [style*="background: #fbf8f2"] *,
:root:not(.theme-light) [style*="background:#e8cd9f"] *,
:root:not(.theme-light) [style*="background: #e8cd9f"] *,
:root:not(.theme-light) [style*="background-color:#fff"] *,
:root:not(.theme-light) [style*="background-color: #fff"] *,
:root:not(.theme-light) [style*="background-color:#f"] *,
:root:not(.theme-light) [style*="background-color: #f"] *,
:root:not(.theme-light) [style*="linear-gradient(140deg, #fff"] *,
:root:not(.theme-light) [style*="linear-gradient(140deg,#fff"] *,
:root:not(.theme-light) [style*="linear-gradient(135deg, #fff"] *,
:root:not(.theme-light) [style*="linear-gradient(135deg,#fff"] *,
:root:not(.theme-light) [style*="linear-gradient(180deg, #f6"] *,
:root:not(.theme-light) [style*="linear-gradient(180deg,#f6"] *,
:root.theme-dark [style*="background:#fff"] *,
:root.theme-dark [style*="background: #fff"] *,
:root.theme-dark [style*="background:#fbf8f2"] *,
:root.theme-dark [style*="background: #fbf8f2"] *,
:root.theme-dark [style*="background:#f7f1e5"] *,
:root.theme-dark [style*="background: #f7f1e5"] *,
:root.theme-dark [style*="background:#f0e3ca"] *,
:root.theme-dark [style*="background: #f0e3ca"] *,
:root.theme-dark [style*="background:#a57727"] *,
:root.theme-dark [style*="background: #a57727"] *,
:root.theme-dark [style*="background:#e5c691"] *,
:root.theme-dark [style*="background: #e5c691"] *,
:root.theme-dark [style*="background:#a57727"] *,
:root.theme-dark [style*="background: #a57727"] *,
:root.theme-dark [style*="background:#fbf8f2"] *,
:root.theme-dark [style*="background: #fbf8f2"] *,
:root.theme-dark [style*="background:#e8cd9f"] *,
:root.theme-dark [style*="background: #e8cd9f"] *,
:root.theme-dark [style*="background-color:#fff"] *,
:root.theme-dark [style*="background-color: #fff"] *,
:root.theme-dark [style*="background-color:#f"] *,
:root.theme-dark [style*="background-color: #f"] *,
:root.theme-dark [style*="linear-gradient(140deg, #fff"] *,
:root.theme-dark [style*="linear-gradient(140deg,#fff"] *,
:root.theme-dark [style*="linear-gradient(135deg, #fff"] *,
:root.theme-dark [style*="linear-gradient(135deg,#fff"] *,
:root.theme-dark [style*="linear-gradient(180deg, #f6"] *,
:root.theme-dark [style*="linear-gradient(180deg,#f6"] * {
  color: var(--text-body, #e8dfc8) !important;
}

/* And lift headings/strong/em/links inside those boxes specifically */
:root:not(.theme-light) [style*="background:#fff"] h2,
:root:not(.theme-light) [style*="background:#fff"] h3,
:root:not(.theme-light) [style*="background:#fff"] h4,
:root:not(.theme-light) [style*="background:#fbf8f2"] h2,
:root:not(.theme-light) [style*="background:#fbf8f2"] h3,
:root:not(.theme-light) [style*="background:#fbf8f2"] h4,
:root:not(.theme-light) [style*="background:#f7f1e5"] h2,
:root:not(.theme-light) [style*="background:#f7f1e5"] h3,
:root:not(.theme-light) [style*="background:#f7f1e5"] h4,
:root:not(.theme-light) [style*="background:#f0e3ca"] h2,
:root:not(.theme-light) [style*="background:#f0e3ca"] h3,
:root:not(.theme-light) [style*="background:#f0e3ca"] h4,
:root:not(.theme-light) [style*="background:#a57727"] h2,
:root:not(.theme-light) [style*="background:#a57727"] h3,
:root:not(.theme-light) [style*="background:#a57727"] h4,
:root:not(.theme-light) [style*="background:#e5c691"] h2,
:root:not(.theme-light) [style*="background:#e5c691"] h3,
:root:not(.theme-light) [style*="background:#e5c691"] h4,
:root:not(.theme-light) [style*="linear-gradient"] h2,
:root:not(.theme-light) [style*="linear-gradient"] h3,
:root:not(.theme-light) [style*="linear-gradient"] h4,
:root.theme-dark [style*="background:#fff"] h2,
:root.theme-dark [style*="background:#fff"] h3,
:root.theme-dark [style*="background:#fff"] h4,
:root.theme-dark [style*="background:#fbf8f2"] h2,
:root.theme-dark [style*="background:#fbf8f2"] h3,
:root.theme-dark [style*="background:#fbf8f2"] h4,
:root.theme-dark [style*="background:#f7f1e5"] h2,
:root.theme-dark [style*="background:#f7f1e5"] h3,
:root.theme-dark [style*="background:#f7f1e5"] h4,
:root.theme-dark [style*="background:#f0e3ca"] h2,
:root.theme-dark [style*="background:#f0e3ca"] h3,
:root.theme-dark [style*="background:#f0e3ca"] h4,
:root.theme-dark [style*="background:#a57727"] h2,
:root.theme-dark [style*="background:#a57727"] h3,
:root.theme-dark [style*="background:#a57727"] h4,
:root.theme-dark [style*="background:#e5c691"] h2,
:root.theme-dark [style*="background:#e5c691"] h3,
:root.theme-dark [style*="background:#e5c691"] h4,
:root.theme-dark [style*="linear-gradient"] h2,
:root.theme-dark [style*="linear-gradient"] h3,
:root.theme-dark [style*="linear-gradient"] h4 {
  color: var(--text-heading, #f1cf85) !important;
}

:root:not(.theme-light) [style*="background:#fff"] strong,
:root:not(.theme-light) [style*="background:#fbf8f2"] strong,
:root:not(.theme-light) [style*="background:#f7f1e5"] strong,
:root:not(.theme-light) [style*="background:#f0e3ca"] strong,
:root:not(.theme-light) [style*="background:#a57727"] strong,
:root:not(.theme-light) [style*="background:#e5c691"] strong,
:root:not(.theme-light) [style*="linear-gradient"] strong,
:root.theme-dark [style*="background:#fff"] strong,
:root.theme-dark [style*="background:#fbf8f2"] strong,
:root.theme-dark [style*="background:#f7f1e5"] strong,
:root.theme-dark [style*="background:#f0e3ca"] strong,
:root.theme-dark [style*="background:#a57727"] strong,
:root.theme-dark [style*="background:#e5c691"] strong,
:root.theme-dark [style*="linear-gradient"] strong {
  color: var(--brand-light, #fadea0) !important;
}

:root:not(.theme-light) [style*="background:#fff"] em,
:root:not(.theme-light) [style*="background:#fbf8f2"] em,
:root:not(.theme-light) [style*="background:#f7f1e5"] em,
:root:not(.theme-light) [style*="background:#f0e3ca"] em,
:root:not(.theme-light) [style*="background:#a57727"] em,
:root:not(.theme-light) [style*="background:#e5c691"] em,
:root:not(.theme-light) [style*="linear-gradient"] em,
:root.theme-dark [style*="background:#fff"] em,
:root.theme-dark [style*="background:#fbf8f2"] em,
:root.theme-dark [style*="background:#f7f1e5"] em,
:root.theme-dark [style*="background:#f0e3ca"] em,
:root.theme-dark [style*="background:#a57727"] em,
:root.theme-dark [style*="background:#e5c691"] em,
:root.theme-dark [style*="linear-gradient"] em {
  color: var(--text-meta, #c8b896) !important;
}

:root:not(.theme-light) [style*="background:#fff"] a,
:root:not(.theme-light) [style*="background:#fbf8f2"] a,
:root:not(.theme-light) [style*="background:#f7f1e5"] a,
:root:not(.theme-light) [style*="background:#f0e3ca"] a,
:root:not(.theme-light) [style*="background:#a57727"] a,
:root:not(.theme-light) [style*="background:#e5c691"] a,
:root:not(.theme-light) [style*="linear-gradient"] a,
:root.theme-dark [style*="background:#fff"] a,
:root.theme-dark [style*="background:#fbf8f2"] a,
:root.theme-dark [style*="background:#f7f1e5"] a,
:root.theme-dark [style*="background:#f0e3ca"] a,
:root.theme-dark [style*="background:#a57727"] a,
:root.theme-dark [style*="background:#e5c691"] a,
:root.theme-dark [style*="linear-gradient"] a {
  color: var(--brand-light, #fadea0) !important;
}

/* End descendant-text fixup */

/* Final stragglers — additional cream tones surfaced after audit */
:root:not(.theme-light) [style*="background:#f0e3ca"],
:root:not(.theme-light) [style*="background: #f0e3ca"],
:root:not(.theme-light) [style*="background:#f4ead7"],
:root:not(.theme-light) [style*="background: #f4ead7"],
:root:not(.theme-light) [style*="background:#a57727"],
:root:not(.theme-light) [style*="background: #a57727"],
:root.theme-dark [style*="background:#f0e3ca"],
:root.theme-dark [style*="background: #f0e3ca"],
:root.theme-dark [style*="background:#f4ead7"],
:root.theme-dark [style*="background: #f4ead7"],
:root.theme-dark [style*="background:#a57727"],
:root.theme-dark [style*="background: #a57727"] {
  background: var(--bg-card, #1a273b) !important;
  background-image: none !important;
  color: var(--text-body, #e8dfc8) !important;
  border-color: var(--border-medium, #33496b) !important;
}
:root:not(.theme-light) [style*="background:#f0e3ca"] *,
:root:not(.theme-light) [style*="background: #f0e3ca"] *,
:root:not(.theme-light) [style*="background:#f4ead7"] *,
:root:not(.theme-light) [style*="background: #f4ead7"] *,
:root:not(.theme-light) [style*="background:#a57727"] *,
:root:not(.theme-light) [style*="background: #a57727"] *,
:root.theme-dark [style*="background:#f0e3ca"] *,
:root.theme-dark [style*="background: #f0e3ca"] *,
:root.theme-dark [style*="background:#f4ead7"] *,
:root.theme-dark [style*="background: #f4ead7"] *,
:root.theme-dark [style*="background:#a57727"] *,
:root.theme-dark [style*="background: #a57727"] * {
  color: var(--text-body, #e8dfc8) !important;
}

/* ============================================================
   Final fix — section wrapper backgrounds (11 May 2026 morning)
   ============================================================
   The previous patches set descendant text colors but never the
   actual <section class="section"> background, which is pinned
   to cream rgb(255,250,240) by people/_shared.css. Override it
   directly so the outer wrapper goes walnut in dark mode.
   ------------------------------------------------------------ */
:root:not(.theme-light) section.section,
:root:not(.theme-light) .section,
:root.theme-dark section.section,
:root.theme-dark .section {
  background: var(--bg-card, #1a273b) !important;
  background-image: none !important;
  border-color: var(--border-medium, #33496b) !important;
  color: var(--text-body, #e8dfc8) !important;
}
:root:not(.theme-light) section.section.limited-record-note,
:root:not(.theme-light) .section.limited-record-note,
:root.theme-dark section.section.limited-record-note,
:root.theme-dark .section.limited-record-note {
  background: var(--bg-card-tint, #1f2e45) !important;
  background-image: none !important;
}
/* And the same for any container that uses .summary-card open
   or any plain .summary-card (some children pages use that as a
   plain wrapper, not just for the At-a-Glance card) */
:root:not(.theme-light) section.summary-card,
:root:not(.theme-light) .summary-card,
:root.theme-dark section.summary-card,
:root.theme-dark .summary-card {
  background: var(--bg-card, #1a273b) !important;
  background-image: none !important;
  border-color: var(--border-medium, #33496b) !important;
  color: var(--text-body, #e8dfc8) !important;
}

/* ============================================================
   GLOBAL inline-style background flip (17 May 2026 night)
   ============================================================
   The earlier inline-style attribute overrides at line ~366 are
   scoped to `section.page` (i.e., only fire inside the SPA index
   tabs). Standalone pages — every key-evidence.html, abstract.html,
   children/<name>.html, people/<name>.html, stories/<n>-*.html,
   germany/*, civilwar/*, immigration/*, etc. — bypass that scope.
   This block re-applies the same flip with no ancestor scope so
   inline-styled boxes invert correctly site-wide.
   ------------------------------------------------------------ */

/* ---- Light backgrounds → dark-card surface in dark mode ----
   Catches the common cream/gold/copper tint hex prefixes the
   project uses inline: #fffaf0, #fffaee, #fffdf6, #fef3d6,
   #fef0e0, #fde8b0, #fdf4d8, #fdf7e0, #fdf3f0, #fce8d6, #fcf*,
   #fbeef3, #fbf*, #fbe*, #f8ecc8, #f8e*, #f6ebd2, #f6e*, #f4f9ee,
   #f4ecd6, #f4f*, #f0f4e8, #f0f*, #f0e6d0, #eef3fb, plus #fff. */
:root:not(.theme-light) [style*="background:#fff"]:not(.no-dark-flip),
:root:not(.theme-light) [style*="background: #fff"]:not(.no-dark-flip),
:root:not(.theme-light) [style*="background:#fef"]:not(.no-dark-flip),
:root:not(.theme-light) [style*="background: #fef"]:not(.no-dark-flip),
:root:not(.theme-light) [style*="background:#fde"]:not(.no-dark-flip),
:root:not(.theme-light) [style*="background: #fde"]:not(.no-dark-flip),
:root:not(.theme-light) [style*="background:#fdf"]:not(.no-dark-flip),
:root:not(.theme-light) [style*="background: #fdf"]:not(.no-dark-flip),
:root:not(.theme-light) [style*="background:#fce"]:not(.no-dark-flip),
:root:not(.theme-light) [style*="background: #fce"]:not(.no-dark-flip),
:root:not(.theme-light) [style*="background:#fcf"]:not(.no-dark-flip),
:root:not(.theme-light) [style*="background: #fcf"]:not(.no-dark-flip),
:root:not(.theme-light) [style*="background:#fbe"]:not(.no-dark-flip),
:root:not(.theme-light) [style*="background: #fbe"]:not(.no-dark-flip),
:root:not(.theme-light) [style*="background:#fbf"]:not(.no-dark-flip),
:root:not(.theme-light) [style*="background: #fbf"]:not(.no-dark-flip),
:root:not(.theme-light) [style*="background:#f8e"]:not(.no-dark-flip),
:root:not(.theme-light) [style*="background: #f8e"]:not(.no-dark-flip),
:root:not(.theme-light) [style*="background:#f6e"]:not(.no-dark-flip),
:root:not(.theme-light) [style*="background: #f6e"]:not(.no-dark-flip),
:root:not(.theme-light) [style*="background:#f4e"]:not(.no-dark-flip),
:root:not(.theme-light) [style*="background: #f4e"]:not(.no-dark-flip),
:root:not(.theme-light) [style*="background:#f4f"]:not(.no-dark-flip),
:root:not(.theme-light) [style*="background: #f4f"]:not(.no-dark-flip),
:root:not(.theme-light) [style*="background:#f0f"]:not(.no-dark-flip),
:root:not(.theme-light) [style*="background: #f0f"]:not(.no-dark-flip),
:root:not(.theme-light) [style*="background:#f0e"]:not(.no-dark-flip),
:root:not(.theme-light) [style*="background: #f0e"]:not(.no-dark-flip),
:root:not(.theme-light) [style*="background:#eef"]:not(.no-dark-flip),
:root:not(.theme-light) [style*="background: #eef"]:not(.no-dark-flip),
:root:not(.theme-light) [style*="background:#e8d"]:not(.no-dark-flip),
:root:not(.theme-light) [style*="background: #e8d"]:not(.no-dark-flip),
:root:not(.theme-light) [style*="background:#e8c"]:not(.no-dark-flip),
:root:not(.theme-light) [style*="background: #e8c"]:not(.no-dark-flip),
:root.theme-dark [style*="background:#fff"]:not(.no-dark-flip),
:root.theme-dark [style*="background: #fff"]:not(.no-dark-flip),
:root.theme-dark [style*="background:#fef"]:not(.no-dark-flip),
:root.theme-dark [style*="background: #fef"]:not(.no-dark-flip),
:root.theme-dark [style*="background:#fde"]:not(.no-dark-flip),
:root.theme-dark [style*="background: #fde"]:not(.no-dark-flip),
:root.theme-dark [style*="background:#fdf"]:not(.no-dark-flip),
:root.theme-dark [style*="background: #fdf"]:not(.no-dark-flip),
:root.theme-dark [style*="background:#fce"]:not(.no-dark-flip),
:root.theme-dark [style*="background: #fce"]:not(.no-dark-flip),
:root.theme-dark [style*="background:#fcf"]:not(.no-dark-flip),
:root.theme-dark [style*="background: #fcf"]:not(.no-dark-flip),
:root.theme-dark [style*="background:#fbe"]:not(.no-dark-flip),
:root.theme-dark [style*="background: #fbe"]:not(.no-dark-flip),
:root.theme-dark [style*="background:#fbf"]:not(.no-dark-flip),
:root.theme-dark [style*="background: #fbf"]:not(.no-dark-flip),
:root.theme-dark [style*="background:#f8e"]:not(.no-dark-flip),
:root.theme-dark [style*="background: #f8e"]:not(.no-dark-flip),
:root.theme-dark [style*="background:#f6e"]:not(.no-dark-flip),
:root.theme-dark [style*="background: #f6e"]:not(.no-dark-flip),
:root.theme-dark [style*="background:#f4e"]:not(.no-dark-flip),
:root.theme-dark [style*="background: #f4e"]:not(.no-dark-flip),
:root.theme-dark [style*="background:#f4f"]:not(.no-dark-flip),
:root.theme-dark [style*="background: #f4f"]:not(.no-dark-flip),
:root.theme-dark [style*="background:#f0f"]:not(.no-dark-flip),
:root.theme-dark [style*="background: #f0f"]:not(.no-dark-flip),
:root.theme-dark [style*="background:#f0e"]:not(.no-dark-flip),
:root.theme-dark [style*="background: #f0e"]:not(.no-dark-flip),
:root.theme-dark [style*="background:#eef"]:not(.no-dark-flip),
:root.theme-dark [style*="background: #eef"]:not(.no-dark-flip),
:root.theme-dark [style*="background:#e8d"]:not(.no-dark-flip),
:root.theme-dark [style*="background: #e8d"]:not(.no-dark-flip),
:root.theme-dark [style*="background:#e8c"]:not(.no-dark-flip),
:root.theme-dark [style*="background: #e8c"]:not(.no-dark-flip) {
  background: var(--bg-card, #1a273b) !important;
  background-image: none !important;
  border-color: var(--border-medium, #33496b) !important;
  color: var(--text-body, #e8dfc8) !important;
}

/* ---- Inline linear-gradient backgrounds (cream/cream → dark) ---- */
:root:not(.theme-light) [style*="background:linear-gradient"]:not(.no-dark-flip),
:root:not(.theme-light) [style*="background: linear-gradient"]:not(.no-dark-flip),
:root.theme-dark [style*="background:linear-gradient"]:not(.no-dark-flip),
:root.theme-dark [style*="background: linear-gradient"]:not(.no-dark-flip) {
  background: var(--bg-card-tint, #1f2e45) !important;
  background-image: none !important;
  border-color: var(--border-medium, #33496b) !important;
  color: var(--text-body, #e8dfc8) !important;
}

/* ---- Force descendant text colors inside light-bg boxes to flip too,
       because the parent's text-color override doesn't always cascade
       (when descendants have their own inline color). ---- */
:root:not(.theme-light) [style*="background:#fff"]:not(.no-dark-flip) *,
:root:not(.theme-light) [style*="background: #fff"]:not(.no-dark-flip) *,
:root:not(.theme-light) [style*="background:#fbf8f2"]:not(.no-dark-flip) *,
:root:not(.theme-light) [style*="background:#f7f1e5"]:not(.no-dark-flip) *,
:root:not(.theme-light) [style*="background:#f7f1e5"]:not(.no-dark-flip) *,
:root:not(.theme-light) [style*="background:#f4ead7"]:not(.no-dark-flip) *,
:root:not(.theme-light) [style*="background:#f4ead7"]:not(.no-dark-flip) *,
:root:not(.theme-light) [style*="background:#f0e3ca"]:not(.no-dark-flip) *,
:root:not(.theme-light) [style*="background:#e8cd9f"]:not(.no-dark-flip) *,
:root:not(.theme-light) [style*="background:#a57727"]:not(.no-dark-flip) *,
:root:not(.theme-light) [style*="background:#a57727"]:not(.no-dark-flip) *,
:root:not(.theme-light) [style*="background:#a57727"]:not(.no-dark-flip) *,
:root.theme-dark [style*="background:#fff"]:not(.no-dark-flip) *,
:root.theme-dark [style*="background: #fff"]:not(.no-dark-flip) *,
:root.theme-dark [style*="background:#fbf8f2"]:not(.no-dark-flip) *,
:root.theme-dark [style*="background:#f7f1e5"]:not(.no-dark-flip) *,
:root.theme-dark [style*="background:#f7f1e5"]:not(.no-dark-flip) *,
:root.theme-dark [style*="background:#f4ead7"]:not(.no-dark-flip) *,
:root.theme-dark [style*="background:#f4ead7"]:not(.no-dark-flip) *,
:root.theme-dark [style*="background:#f0e3ca"]:not(.no-dark-flip) *,
:root.theme-dark [style*="background:#e8cd9f"]:not(.no-dark-flip) *,
:root.theme-dark [style*="background:#a57727"]:not(.no-dark-flip) *,
:root.theme-dark [style*="background:#a57727"]:not(.no-dark-flip) *,
:root.theme-dark [style*="background:#a57727"]:not(.no-dark-flip) * {
  color: var(--text-body, #e8dfc8) !important;
}
:root:not(.theme-light) [style*="background:#fff"]:not(.no-dark-flip) strong,
:root:not(.theme-light) [style*="background:#fff"]:not(.no-dark-flip) h1,
:root:not(.theme-light) [style*="background:#fff"]:not(.no-dark-flip) h2,
:root:not(.theme-light) [style*="background:#fff"]:not(.no-dark-flip) h3,
:root:not(.theme-light) [style*="background:#fff"]:not(.no-dark-flip) h4,
:root.theme-dark [style*="background:#fff"]:not(.no-dark-flip) strong,
:root.theme-dark [style*="background:#fff"]:not(.no-dark-flip) h1,
:root.theme-dark [style*="background:#fff"]:not(.no-dark-flip) h2,
:root.theme-dark [style*="background:#fff"]:not(.no-dark-flip) h3,
:root.theme-dark [style*="background:#fff"]:not(.no-dark-flip) h4 {
  color: var(--text-heading, #f1cf85) !important;
}

/* ---- INVERSE: Dark backgrounds applied inline that should be light
       when the user is in light mode. Most "dark hex on light page"
       cases are intentional hero strips (e.g., the cinematic dark
       banner at the top of every section landing) and SHOULD STAY
       DARK, so this section is deliberately narrow: it only catches
       hex prefixes that the project doesn't use for hero strips. ---- */
:root.theme-light [style*="background:#3a2f"]:not(.no-light-flip):not(.cinema-banner):not(.cinema-section-hero):not(.cinema-chapter):not(header):not(.tab-hero):not(.sec-hero):not(.ge-hero):not(.faq-hero):not(.ab-hero):not(.method-hero):not(.st-hero),
:root.theme-light [style*="background: #3a2f"]:not(.no-light-flip):not(.cinema-banner):not(.cinema-section-hero):not(.cinema-chapter):not(header):not(.tab-hero):not(.sec-hero):not(.ge-hero):not(.faq-hero):not(.ab-hero):not(.method-hero):not(.st-hero) {
  background: var(--bg-card-tint, #f6ebd2) !important;
  background-image: none !important;
  color: var(--text-body, #2c2620) !important;
}
/* ============================================================
   GLOBAL dark-mode override for sub-page CSS-class backgrounds
   (17 May 2026 night, post-theme-flip sweep)
   ============================================================
   Auto-generated from a sweep of every live HTML page's inline
   <style> block. Catches CSS class rules of the form
       .className { background:#XXX (or linear-gradient(...) }
   where the background is light — these wouldn't otherwise be
   caught by the earlier [style*=] attribute-selector overrides.
   ------------------------------------------------------------ */

:root:not(.theme-light) .access-bar,
:root.theme-dark .access-bar,
:root:not(.theme-light) .actor-card,
:root.theme-dark .actor-card,
:root:not(.theme-light) .actor-card.agent,
:root.theme-dark .actor-card.agent,
:root:not(.theme-light) .address-map-wrap,
:root.theme-dark .address-map-wrap,
:root:not(.theme-light) .affidavit,
:root.theme-dark .affidavit,
:root:not(.theme-light) .brv-controls button.active,
:root.theme-dark .brv-controls button.active,
:root:not(.theme-light) .brv-wrap::-webkit-scrollbar-thumb,
:root.theme-dark .brv-wrap::-webkit-scrollbar-thumb,
:root:not(.theme-light) .ca-tile,
:root.theme-dark .ca-tile,
:root:not(.theme-light) .ca-tile.keystone,
:root.theme-dark .ca-tile.keystone,
:root:not(.theme-light) .ca-tile.profile,
:root.theme-dark .ca-tile.profile,
:root:not(.theme-light) .ca-tile.theme,
:root.theme-dark .ca-tile.theme,
:root:not(.theme-light) .card,
:root.theme-dark .card,
:root:not(.theme-light) .card, .summary-card, table.kv,
:root.theme-dark .card, .summary-card, table.kv,
:root:not(.theme-light) .card.accent,
:root.theme-dark .card.accent,
:root:not(.theme-light) .card.evidence-card > summary > .ec-summary-content > h3 .ec-date,
:root.theme-dark .card.evidence-card > summary > .ec-summary-content > h3 .ec-date,
:root:not(.theme-light) .card.hypothesis,
:root.theme-dark .card.hypothesis,
:root:not(.theme-light) .card.open,
:root.theme-dark .card.open,
:root:not(.theme-light) .chart-link,
:root.theme-dark .chart-link,
:root:not(.theme-light) .chart-link .chart-caption,
:root.theme-dark .chart-link .chart-caption,
:root:not(.theme-light) .chart-link img,
:root.theme-dark .chart-link img,
:root:not(.theme-light) .chart-link.pdf img,
  .chart-link.docx img,
  .chart-link.xlsx img,
:root.theme-dark .chart-link.pdf img,
  .chart-link.docx img,
  .chart-link.xlsx img,
:root:not(.theme-light) .check,
:root.theme-dark .check,
:root:not(.theme-light) .child-card,
:root.theme-dark .child-card,
:root:not(.theme-light) .child-card.accent,
:root.theme-dark .child-card.accent,
:root:not(.theme-light) .child-card.died-young,
:root.theme-dark .child-card.died-young,
:root:not(.theme-light) .child-card.subject,
:root.theme-dark .child-card.subject,
:root:not(.theme-light) .child-card.subject .order,
:root.theme-dark .child-card.subject .order,
:root:not(.theme-light) .children-tree,
:root.theme-dark .children-tree,
:root:not(.theme-light) .citation-box code,
:root.theme-dark .citation-box code,
:root:not(.theme-light) .cite-inline,
:root.theme-dark .cite-inline,
:root:not(.theme-light) .collapse,
:root.theme-dark .collapse,
:root:not(.theme-light) .conclusion-card,
:root.theme-dark .conclusion-card,
:root:not(.theme-light) .conf-key,
:root.theme-dark .conf-key,
:root:not(.theme-light) .conf.open,
:root.theme-dark .conf.open,
:root:not(.theme-light) .conf.working,
:root.theme-dark .conf.working,
:root:not(.theme-light) .cw-map-legend,
:root.theme-dark .cw-map-legend,
:root:not(.theme-light) .cw-tile,
:root.theme-dark .cw-tile,
:root:not(.theme-light) .cw-tile.keystone,
:root.theme-dark .cw-tile.keystone,
:root:not(.theme-light) .cw-tile.mystery,
:root.theme-dark .cw-tile.mystery,
:root:not(.theme-light) .cw-tile.profile,
:root.theme-dark .cw-tile.profile,
:root:not(.theme-light) .cw-tile.theme,
:root.theme-dark .cw-tile.theme,
:root:not(.theme-light) .doc-card,
:root.theme-dark .doc-card,
:root:not(.theme-light) .doc-table,
:root.theme-dark .doc-table,
:root:not(.theme-light) .doc-table .type-tag,
:root.theme-dark .doc-table .type-tag,
:root:not(.theme-light) .ec-tells,
:root.theme-dark .ec-tells,
:root:not(.theme-light) .entry,
:root.theme-dark .entry,
:root:not(.theme-light) .er-entry .er-meta .severity.minor,
:root.theme-dark .er-entry .er-meta .severity.minor,
:root:not(.theme-light) .evidence-row .ev-thumb,
:root.theme-dark .evidence-row .ev-thumb,
:root:not(.theme-light) .family-file,
:root.theme-dark .family-file,
:root:not(.theme-light) .family-file.active,
:root.theme-dark .family-file.active,
:root:not(.theme-light) .family-file.open,
:root.theme-dark .family-file.open,
:root:not(.theme-light) .filter-row,
:root.theme-dark .filter-row,
:root:not(.theme-light) .friedrich-callout,
:root.theme-dark .friedrich-callout,
:root:not(.theme-light) .ft-couple-card,
:root.theme-dark .ft-couple-card,
:root:not(.theme-light) .ft-couple-card .ft-marriage-bar,
:root.theme-dark .ft-couple-card .ft-marriage-bar,
:root:not(.theme-light) .ft-marriage-branch-fs,
:root.theme-dark .ft-marriage-branch-fs,
:root:not(.theme-light) .ft-person-card,
:root.theme-dark .ft-person-card,
:root:not(.theme-light) .ft-person-card.ft-died-young,
:root.theme-dark .ft-person-card.ft-died-young,
:root:not(.theme-light) .ft-person-card.ft-female,
:root.theme-dark .ft-person-card.ft-female,
:root:not(.theme-light) .ft-person-card.ft-subject,
:root.theme-dark .ft-person-card.ft-subject,
:root:not(.theme-light) .ge-chrono-strip-wrap,
:root.theme-dark .ge-chrono-strip-wrap,
:root:not(.theme-light) .ge-contribute,
:root.theme-dark .ge-contribute,
:root:not(.theme-light) .ge-img-gallery figure,
:root.theme-dark .ge-img-gallery figure,
:root:not(.theme-light) .ge-map-legend,
:root.theme-dark .ge-map-legend,
:root:not(.theme-light) .ge-surname-card,
:root.theme-dark .ge-surname-card,
:root:not(.theme-light) .ge-surname-card.status,
:root.theme-dark .ge-surname-card.status,
:root:not(.theme-light) .ge-surname-step.verdict,
:root.theme-dark .ge-surname-step.verdict,
:root:not(.theme-light) .ge-surname-table th,
:root.theme-dark .ge-surname-table th,
:root:not(.theme-light) .ge-surname-table tr.self td,
:root.theme-dark .ge-surname-table tr.self td,
:root:not(.theme-light) .ge-tile,
:root.theme-dark .ge-tile,
:root:not(.theme-light) .ge-tile.cross,
:root.theme-dark .ge-tile.cross,
:root:not(.theme-light) .ge-timeline,
:root.theme-dark .ge-timeline,
:root:not(.theme-light) .ge-timeline-mobile,
:root.theme-dark .ge-timeline-mobile,
:root:not(.theme-light) .ge-timeline-prose,
:root.theme-dark .ge-timeline-prose,
:root:not(.theme-light) .ge-town-mini,
:root.theme-dark .ge-town-mini,
:root:not(.theme-light) .ge-town-mini.origin,
:root.theme-dark .ge-town-mini.origin,
:root:not(.theme-light) .ge-visit-card,
:root.theme-dark .ge-visit-card,
:root:not(.theme-light) .gmail-link,
:root.theme-dark .gmail-link,
:root:not(.theme-light) .hesse-timeline .ht-flag img,
:root.theme-dark .hesse-timeline .ht-flag img,
:root:not(.theme-light) .hesse-timeline .ht-row,
:root.theme-dark .hesse-timeline .ht-row,
:root:not(.theme-light) .hesse-timeline .ht-row.pivot,
:root.theme-dark .hesse-timeline .ht-row.pivot,
:root:not(.theme-light) .ht-map,
:root.theme-dark .ht-map,
:root:not(.theme-light) .ht-map img,
:root.theme-dark .ht-map img,
:root:not(.theme-light) .ht-row,
:root.theme-dark .ht-row,
:root:not(.theme-light) .im-tile,
:root.theme-dark .im-tile,
:root:not(.theme-light) .im-tile.cross,
:root.theme-dark .im-tile.cross,
:root:not(.theme-light) .img-gallery figure,
:root.theme-dark .img-gallery figure,
:root:not(.theme-light) .index-controls,
:root.theme-dark .index-controls,
:root:not(.theme-light) .infographic-wrap,
:root.theme-dark .infographic-wrap,
:root:not(.theme-light) .instructions,
:root.theme-dark .instructions,
:root:not(.theme-light) .interests-list,
:root.theme-dark .interests-list,
:root:not(.theme-light) .ix-card,
:root.theme-dark .ix-card,
:root:not(.theme-light) .key-finding,
:root.theme-dark .key-finding,
:root:not(.theme-light) .key-insight,
:root.theme-dark .key-insight,
:root:not(.theme-light) .konsen-feature,
:root.theme-dark .konsen-feature,
:root:not(.theme-light) .konze-status-banner,
:root.theme-dark .konze-status-banner,
:root:not(.theme-light) .konzen-tag,
:root.theme-dark .konzen-tag,
:root:not(.theme-light) .leaflet-popup-content-wrapper,
:root.theme-dark .leaflet-popup-content-wrapper,
:root:not(.theme-light) .leaflet-popup-tip,
:root.theme-dark .leaflet-popup-tip,
:root:not(.theme-light) .legend,
:root.theme-dark .legend,
:root:not(.theme-light) .legend .sw.aff,
:root.theme-dark .legend .sw.aff,
:root:not(.theme-light) .legend-dot.charles,
:root.theme-dark .legend-dot.charles,
:root:not(.theme-light) .legend-dot.friend,
:root.theme-dark .legend-dot.friend,
:root:not(.theme-light) .legend-dot.working,
:root.theme-dark .legend-dot.working,
:root:not(.theme-light) .map-legend,
:root.theme-dark .map-legend,
:root:not(.theme-light) .map-svg-wrap,
:root.theme-dark .map-svg-wrap,
:root:not(.theme-light) .marriage-block,
:root.theme-dark .marriage-block,
:root:not(.theme-light) .marriage-block.second,
:root.theme-dark .marriage-block.second,
:root:not(.theme-light) .mo-img-gallery figure,
:root.theme-dark .mo-img-gallery figure,
:root:not(.theme-light) .mono,
:root.theme-dark .mono,
:root:not(.theme-light) .muster,
:root.theme-dark .muster,
:root:not(.theme-light) .page-card,
:root.theme-dark .page-card,
:root:not(.theme-light) .page-card .text-col .verbatim,
:root.theme-dark .page-card .text-col .verbatim,
:root:not(.theme-light) .page-toc,
:root.theme-dark .page-toc,
:root:not(.theme-light) .parish th,
:root.theme-dark .parish th,
:root:not(.theme-light) .pdf-icon,
:root.theme-dark .pdf-icon,
:root:not(.theme-light) .people-view-toggle button,
:root.theme-dark .people-view-toggle button,
:root:not(.theme-light) .people-view-toggle button.active,
:root.theme-dark .people-view-toggle button.active,
:root:not(.theme-light) .person-box-html,
:root.theme-dark .person-box-html,
:root:not(.theme-light) .person-box-html.candidate,
:root.theme-dark .person-box-html.candidate,
:root:not(.theme-light) .person-box-html.female,
:root.theme-dark .person-box-html.female,
:root:not(.theme-light) .person-box-html.male,
:root.theme-dark .person-box-html.male,
:root:not(.theme-light) .person-card,
:root.theme-dark .person-card,
:root:not(.theme-light) .person-list li .role-tag,
:root.theme-dark .person-list li .role-tag,
:root:not(.theme-light) .person-list li .role-tag.active,
:root.theme-dark .person-list li .role-tag.active,
:root:not(.theme-light) .person-list li .role-tag.child,
:root.theme-dark .person-list li .role-tag.child,
:root:not(.theme-light) .person-list li .role-tag.open,
:root.theme-dark .person-list li .role-tag.open,
:root:not(.theme-light) .person-list li .role-tag.witness,
:root.theme-dark .person-list li .role-tag.witness,
:root:not(.theme-light) .person-section,
:root.theme-dark .person-section,
:root:not(.theme-light) .person.f-gans,
:root.theme-dark .person.f-gans,
:root:not(.theme-light) .person.f-grandjot,
:root.theme-dark .person.f-grandjot,
:root:not(.theme-light) .person.f-herwig,
:root.theme-dark .person.f-herwig,
:root:not(.theme-light) .person.f-hofeditz,
:root.theme-dark .person.f-hofeditz,
:root:not(.theme-light) .person.f-konze_d,
:root.theme-dark .person.f-konze_d,
:root:not(.theme-light) .person.f-konze_t,
:root.theme-dark .person.f-konze_t,
:root:not(.theme-light) .person.f-other,
:root.theme-dark .person.f-other,
:root:not(.theme-light) .person.unverified,
:root.theme-dark .person.unverified,
:root:not(.theme-light) .poster-stage,
:root.theme-dark .poster-stage,
:root:not(.theme-light) .poster-stage object,
  .poster-stage img,
:root.theme-dark .poster-stage object,
  .poster-stage img,
:root:not(.theme-light) .pull,
:root.theme-dark .pull,
:root:not(.theme-light) .research-log,
:root.theme-dark .research-log,
:root:not(.theme-light) .research-log > summary,
:root.theme-dark .research-log > summary,
:root:not(.theme-light) .rl-banner,
:root.theme-dark .rl-banner,
:root:not(.theme-light) .rl-card,
:root.theme-dark .rl-card,
:root:not(.theme-light) .rl-card.candidate,
:root.theme-dark .rl-card.candidate,
:root:not(.theme-light) .rl-found-box,
:root.theme-dark .rl-found-box,
:root:not(.theme-light) .rl-next,
:root.theme-dark .rl-next,
:root:not(.theme-light) .rl-passes,
:root.theme-dark .rl-passes,
:root:not(.theme-light) .rl-round,
:root.theme-dark .rl-round,
:root:not(.theme-light) .rl-round .finding,
:root.theme-dark .rl-round .finding,
:root:not(.theme-light) .rl-round .null,
:root.theme-dark .rl-round .null,
:root:not(.theme-light) .rl-status,
:root.theme-dark .rl-status,
:root:not(.theme-light) .rl-tells,
:root.theme-dark .rl-tells,
:root:not(.theme-light) .row,
:root.theme-dark .row,
:root:not(.theme-light) .row.active,
:root.theme-dark .row.active,
:root:not(.theme-light) .row.open,
:root.theme-dark .row.open,
:root:not(.theme-light) .schrader-tile,
:root.theme-dark .schrader-tile,
:root:not(.theme-light) .schrader-tile.active,
:root.theme-dark .schrader-tile.active,
:root:not(.theme-light) .schrader-tile.eliminated,
:root.theme-dark .schrader-tile.eliminated,
:root:not(.theme-light) .schrader-tile.open,
:root.theme-dark .schrader-tile.open,
:root:not(.theme-light) .seven-stats .stat,
:root.theme-dark .seven-stats .stat,
:root:not(.theme-light) .site-search-meta,
:root.theme-dark .site-search-meta,
:root:not(.theme-light) .site-search-result .ssr-type,
:root.theme-dark .site-search-result .ssr-type,
:root:not(.theme-light) .site-search-result .ssr-type.charles,
:root.theme-dark .site-search-result .ssr-type.charles,
:root:not(.theme-light) .site-search-result .ssr-type.theme,
:root.theme-dark .site-search-result .ssr-type.theme,
:root:not(.theme-light) .site-search-result mark,
:root.theme-dark .site-search-result mark,
:root:not(.theme-light) .site-search-results,
:root.theme-dark .site-search-results,
:root:not(.theme-light) .site-search-wrap .site-search-input,
:root.theme-dark .site-search-wrap .site-search-input,
:root:not(.theme-light) .smoking-gun .vowel-pair,
:root.theme-dark .smoking-gun .vowel-pair,
:root:not(.theme-light) .smoking-gun .vowel-pair .surname strong,
:root.theme-dark .smoking-gun .vowel-pair .surname strong,
:root:not(.theme-light) .source-links a,
:root.theme-dark .source-links a,
:root:not(.theme-light) .src-card,
:root.theme-dark .src-card,
:root:not(.theme-light) .stat,
:root.theme-dark .stat,
:root:not(.theme-light) .stat-detail,
:root.theme-dark .stat-detail,
:root:not(.theme-light) .stat-detail .parish-grid .pcell,
:root.theme-dark .stat-detail .parish-grid .pcell,
:root:not(.theme-light) .stat-tile,
:root.theme-dark .stat-tile,
:root:not(.theme-light) .summary-card,
:root.theme-dark .summary-card,
:root:not(.theme-light) .surname-strip span.bold-konsen,
:root.theme-dark .surname-strip span.bold-konsen,
:root:not(.theme-light) .surname-trail-card,
:root.theme-dark .surname-trail-card,
:root:not(.theme-light) .tab-open-q,
:root.theme-dark .tab-open-q,
:root:not(.theme-light) .toc,
:root.theme-dark .toc,
:root:not(.theme-light) .toolbar,
:root.theme-dark .toolbar,
:root:not(.theme-light) .toolbar .sep,
:root.theme-dark .toolbar .sep,
:root:not(.theme-light) .toolbar button,
:root.theme-dark .toolbar button,
:root:not(.theme-light) .tooltip,
:root.theme-dark .tooltip,
:root:not(.theme-light) .towns-legend,
:root.theme-dark .towns-legend,
:root:not(.theme-light) .ts-event.elim,
:root.theme-dark .ts-event.elim,
:root:not(.theme-light) .ts-event.in,
:root.theme-dark .ts-event.in,
:root:not(.theme-light) .ts-event.piv,
:root.theme-dark .ts-event.piv,
:root:not(.theme-light) .verdict-disputed,
:root.theme-dark .verdict-disputed,
:root:not(.theme-light) .verdict-open,
:root.theme-dark .verdict-open,
:root:not(.theme-light) .verdict-table th,
:root.theme-dark .verdict-table th,
:root:not(.theme-light) .version-list a,
:root.theme-dark .version-list a,
:root:not(.theme-light) .whats-new,
:root.theme-dark .whats-new,
:root:not(.theme-light) .whats-new .label,
:root.theme-dark .whats-new .label {
  background: var(--bg-card, #24201a) !important;
  background-image: none !important;
  border-color: var(--border-medium, #6a5a40) !important;
  color: var(--text-body, #e8dfc8) !important;
}

/* ============================================================
   GLOBAL dark-mode TEXT-color override for sub-page CSS classes
   (17 May 2026 night, post-background-sweep follow-up)
   ============================================================
   Auto-generated. Catches CSS class rules of the form
       .className { color:#XXX } where #XXX is dark text
   in any page's inline <style> block — flips them to cream
   when the user is in dark mode.
   ------------------------------------------------------------ */

:root:not(.theme-light) .ab-hero,
:root.theme-dark .ab-hero,
:root:not(.theme-light) .ab-hero h1, :root:not(.theme-light) header.ab-hero .sub,
:root.theme-dark .ab-hero h1, :root.theme-dark header.ab-hero .sub,
:root:not(.theme-light) .about-hero,
:root.theme-dark .about-hero,
:root:not(.theme-light) .about-hero h1, :root:not(.theme-light) header.about-hero .sub, :root:not(.theme-light) header.about-hero .crumbs a,
:root.theme-dark .about-hero h1, :root.theme-dark header.about-hero .sub, :root.theme-dark header.about-hero .crumbs a,
:root:not(.theme-light) .access-bar .label,
:root.theme-dark .access-bar .label,
:root:not(.theme-light) .actor-card .role,
:root.theme-dark .actor-card .role,
:root:not(.theme-light) .actor-card .what,
:root.theme-dark .actor-card .what,
:root:not(.theme-light) .actor-card .who,
:root.theme-dark .actor-card .who,
:root:not(.theme-light) .actor-card.agent,
:root.theme-dark .actor-card.agent,
:root:not(.theme-light) .actor-card.agent .role,
:root.theme-dark .actor-card.agent .role,
:root:not(.theme-light) .actor-card.civilian,
:root.theme-dark .actor-card.civilian,
:root:not(.theme-light) .actor-card.civilian .role,
:root.theme-dark .actor-card.civilian .role,
:root:not(.theme-light) .affidavit,
:root.theme-dark .affidavit,
:root:not(.theme-light) .affidavit .cite,
:root.theme-dark .affidavit .cite,
:root:not(.theme-light) .answer-source-tile .resolves,
:root.theme-dark .answer-source-tile .resolves,
:root:not(.theme-light) .bb-hero,
:root.theme-dark .bb-hero,
:root:not(.theme-light) .brv-caption,
:root.theme-dark .brv-caption,
:root:not(.theme-light) .brv-controls .brv-label,
:root.theme-dark .brv-controls .brv-label,
:root:not(.theme-light) .brv-controls button.active,
:root.theme-dark .brv-controls button.active,
:root:not(.theme-light) .brv-zoom-readout,
:root.theme-dark .brv-zoom-readout,
:root:not(.theme-light) .ca-tile,
:root.theme-dark .ca-tile,
:root:not(.theme-light) .ca-tile-arrow,
:root.theme-dark .ca-tile-arrow,
:root:not(.theme-light) .ca-tile-eyebrow,
:root.theme-dark .ca-tile-eyebrow,
:root:not(.theme-light) .ca-tile-sub,
:root.theme-dark .ca-tile-sub,
:root:not(.theme-light) .ca-tile.keystone,
:root.theme-dark .ca-tile.keystone,
:root:not(.theme-light) .ca-tile.keystone .ca-tile-arrow,
:root.theme-dark .ca-tile.keystone .ca-tile-arrow,
:root:not(.theme-light) .ca-tile.keystone .ca-tile-eyebrow,
:root.theme-dark .ca-tile.keystone .ca-tile-eyebrow,
:root:not(.theme-light) .ca-tile.keystone .ca-tile-icon,
:root.theme-dark .ca-tile.keystone .ca-tile-icon,
:root:not(.theme-light) .ca-tile.primary,
:root.theme-dark .ca-tile.primary,
:root:not(.theme-light) .ca-tile.profile,
:root.theme-dark .ca-tile.profile,
:root:not(.theme-light) .ca-tile.profile .ca-tile-arrow,
:root.theme-dark .ca-tile.profile .ca-tile-arrow,
:root:not(.theme-light) .ca-tile.profile .ca-tile-eyebrow,
:root.theme-dark .ca-tile.profile .ca-tile-eyebrow,
:root:not(.theme-light) .ca-tile.theme,
:root.theme-dark .ca-tile.theme,
:root:not(.theme-light) .ca-tile.theme .ca-tile-arrow,
:root.theme-dark .ca-tile.theme .ca-tile-arrow,
:root:not(.theme-light) .ca-tile.theme .ca-tile-eyebrow,
:root.theme-dark .ca-tile.theme .ca-tile-eyebrow,
:root:not(.theme-light) .callout.milestone,
:root.theme-dark .callout.milestone,
:root:not(.theme-light) .callout.milestone .lbl,
:root.theme-dark .callout.milestone .lbl,
:root:not(.theme-light) .card h3,
:root.theme-dark .card h3,
:root:not(.theme-light) .card h3, .card h4,
:root.theme-dark .card h3, .card h4,
:root:not(.theme-light) .card.accent h3,
:root.theme-dark .card.accent h3,
:root:not(.theme-light) .card.confirmed,
:root.theme-dark .card.confirmed,
:root:not(.theme-light) .card.evidence-card > summary > .ec-summary-content > .ec-tagline,
:root.theme-dark .card.evidence-card > summary > .ec-summary-content > .ec-tagline,
:root:not(.theme-light) .card.evidence-card > summary > .ec-summary-content > h3 .ec-date,
:root.theme-dark .card.evidence-card > summary > .ec-summary-content > h3 .ec-date,
:root:not(.theme-light) .cast-hero,
:root.theme-dark .cast-hero,
:root:not(.theme-light) .chart-link .chart-caption,
:root.theme-dark .chart-link .chart-caption,
:root:not(.theme-light) .child-card h4 a,
:root.theme-dark .child-card h4 a,
:root:not(.theme-light) .child-card p.cta,
:root.theme-dark .child-card p.cta,
:root:not(.theme-light) .child-card p.small,
:root.theme-dark .child-card p.small,
:root:not(.theme-light) .child-card p.small a,
:root.theme-dark .child-card p.small a,
:root:not(.theme-light) .child-card p.small a.fsn,
:root.theme-dark .child-card p.small a.fsn,
:root:not(.theme-light) .child-card.died-young,
:root.theme-dark .child-card.died-young,
:root:not(.theme-light) .child-card.subject .order,
:root.theme-dark .child-card.subject .order,
:root:not(.theme-light) .cite-inline,
:root.theme-dark .cite-inline,
:root:not(.theme-light) .cl-hero,
:root.theme-dark .cl-hero,
:root:not(.theme-light) .collapse > summary,
:root.theme-dark .collapse > summary,
:root:not(.theme-light) .conf-key,
:root.theme-dark .conf-key,
:root:not(.theme-light) .conf-key .conf-key-label,
:root.theme-dark .conf-key .conf-key-label,
:root:not(.theme-light) .conf-key span.conf-desc,
:root.theme-dark .conf-key span.conf-desc,
:root:not(.theme-light) .conf.working,
:root.theme-dark .conf.working,
:root:not(.theme-light) .cross-label,
:root.theme-dark .cross-label,
:root:not(.theme-light) .cw-map-legend .legend-label,
:root.theme-dark .cw-map-legend .legend-label,
:root:not(.theme-light) .cw-map-legend .legend-label .small,
:root.theme-dark .cw-map-legend .legend-label .small,
:root:not(.theme-light) .cw-tile,
:root.theme-dark .cw-tile,
:root:not(.theme-light) .cw-tile-arrow,
:root.theme-dark .cw-tile-arrow,
:root:not(.theme-light) .cw-tile-eyebrow,
:root.theme-dark .cw-tile-eyebrow,
:root:not(.theme-light) .cw-tile-sub,
:root.theme-dark .cw-tile-sub,
:root:not(.theme-light) .cw-tile.keystone,
:root.theme-dark .cw-tile.keystone,
:root:not(.theme-light) .cw-tile.keystone .cw-tile-eyebrow,
:root.theme-dark .cw-tile.keystone .cw-tile-eyebrow,
:root:not(.theme-light) .cw-tile.keystone .cw-tile-icon,
:root.theme-dark .cw-tile.keystone .cw-tile-icon,
:root:not(.theme-light) .cw-tile.mystery .cw-tile-eyebrow,
:root.theme-dark .cw-tile.mystery .cw-tile-eyebrow,
:root:not(.theme-light) .cw-tile.primary,
:root.theme-dark .cw-tile.primary,
:root:not(.theme-light) .cw-tile.profile,
:root.theme-dark .cw-tile.profile,
:root:not(.theme-light) .cw-tile.profile .cw-tile-arrow,
:root.theme-dark .cw-tile.profile .cw-tile-arrow,
:root:not(.theme-light) .cw-tile.profile .cw-tile-eyebrow,
:root.theme-dark .cw-tile.profile .cw-tile-eyebrow,
:root:not(.theme-light) .cw-tile.theme .cw-tile-eyebrow,
:root.theme-dark .cw-tile.theme .cw-tile-eyebrow,
:root:not(.theme-light) .desc,
:root.theme-dark .desc,
:root:not(.theme-light) .doc-card .doc-desc,
:root.theme-dark .doc-card .doc-desc,
:root:not(.theme-light) .doc-card .doc-title,
:root.theme-dark .doc-card .doc-title,
:root:not(.theme-light) .doc-card .doc-title a,
:root.theme-dark .doc-card .doc-title a,
:root:not(.theme-light) .doc-card .doc-type,
:root.theme-dark .doc-card .doc-type,
:root:not(.theme-light) .doc-card.message,
:root.theme-dark .doc-card.message,
:root:not(.theme-light) .doc-card.session,
:root.theme-dark .doc-card.session,
:root:not(.theme-light) .doc-card.synthesis,
:root.theme-dark .doc-card.synthesis,
:root:not(.theme-light) .doc-table .doc-key,
:root.theme-dark .doc-table .doc-key,
:root:not(.theme-light) .doc-table .type-tag,
:root.theme-dark .doc-table .type-tag,
:root:not(.theme-light) .ec-tells .ec-tells-label,
:root.theme-dark .ec-tells .ec-tells-label,
:root:not(.theme-light) .eliminated-table td .verdict,
:root.theme-dark .eliminated-table td .verdict,
:root:not(.theme-light) .entry .links,
:root.theme-dark .entry .links,
:root:not(.theme-light) .entry .what,
:root.theme-dark .entry .what,
:root:not(.theme-light) .entry .when,
:root.theme-dark .entry .when,
:root:not(.theme-light) .entry.cleanup,
:root.theme-dark .entry.cleanup,
:root:not(.theme-light) .entry.cleanup .when,
:root.theme-dark .entry.cleanup .when,
:root:not(.theme-light) .entry.research,
:root.theme-dark .entry.research,
:root:not(.theme-light) .entry.research .when,
:root.theme-dark .entry.research .when,
:root:not(.theme-light) .entry.structural,
:root.theme-dark .entry.structural,
:root:not(.theme-light) .entry.structural .when,
:root.theme-dark .entry.structural .when,
:root:not(.theme-light) .er-block.after,
:root.theme-dark .er-block.after,
:root:not(.theme-light) .er-block.after  .lbl,
:root.theme-dark .er-block.after  .lbl,
:root:not(.theme-light) .er-block.before,
:root.theme-dark .er-block.before,
:root:not(.theme-light) .er-block.before .lbl,
:root.theme-dark .er-block.before .lbl,
:root:not(.theme-light) .er-entry .er-meta .severity.minor,
:root.theme-dark .er-entry .er-meta .severity.minor,
:root:not(.theme-light) .er-hero,
:root.theme-dark .er-hero,
:root:not(.theme-light) .er-hero h1, :root:not(.theme-light) header.er-hero .sub, :root:not(.theme-light) header.er-hero .crumbs,
:root.theme-dark .er-hero h1, :root.theme-dark header.er-hero .sub, :root.theme-dark header.er-hero .crumbs,
:root:not(.theme-light) .evidence-row .ev-thumb .cap,
:root.theme-dark .evidence-row .ev-thumb .cap,
:root:not(.theme-light) .fam,
:root.theme-dark .fam,
:root:not(.theme-light) .family-file .ff-section h5,
:root.theme-dark .family-file .ff-section h5,
:root:not(.theme-light) .family-file .meta,
:root.theme-dark .family-file .meta,
:root:not(.theme-light) .family-file .verdict,
:root.theme-dark .family-file .verdict,
:root:not(.theme-light) .family-file h4 a.fam-link,
:root.theme-dark .family-file h4 a.fam-link,
:root:not(.theme-light) .family-file.eliminated,
:root.theme-dark .family-file.eliminated,
:root:not(.theme-light) .family-file.eliminated .verdict,
:root.theme-dark .family-file.eliminated .verdict,
:root:not(.theme-light) .family-tree .ft-bd, .family-tree .ft-dd,
:root.theme-dark .family-tree .ft-bd, .family-tree .ft-dd,
:root:not(.theme-light) .family-tree .ft-dates,
:root.theme-dark .family-tree .ft-dates,
:root:not(.theme-light) .family-tree .ft-detail,
:root.theme-dark .family-tree .ft-detail,
:root:not(.theme-light) .family-tree .ft-name,
:root.theme-dark .family-tree .ft-name,
:root:not(.theme-light) .family-tree .ft-pid,
:root.theme-dark .family-tree .ft-pid,
:root:not(.theme-light) .faq-hero,
:root.theme-dark .faq-hero,
:root:not(.theme-light) .ff-related a,
:root.theme-dark .ff-related a,
:root:not(.theme-light) .ff-related h6,
:root.theme-dark .ff-related h6,
:root:not(.theme-light) .filter-row strong,
:root.theme-dark .filter-row strong,
:root:not(.theme-light) .fn a,
:root.theme-dark .fn a,
:root:not(.theme-light) .friedrich-callout h2,
:root.theme-dark .friedrich-callout h2,
:root:not(.theme-light) .fsn,
:root.theme-dark .fsn,
:root:not(.theme-light) .ft-couple-card .ft-marriage-bar,
:root.theme-dark .ft-couple-card .ft-marriage-bar,
:root:not(.theme-light) .ft-couple-card a.ft-person,
:root.theme-dark .ft-couple-card a.ft-person,
:root:not(.theme-light) .ft-couple-card a.ft-person.ft-female .ft-pid,
:root.theme-dark .ft-couple-card a.ft-person.ft-female .ft-pid,
:root:not(.theme-light) .ft-gen-label,
:root.theme-dark .ft-gen-label,
:root:not(.theme-light) .ft-person-card,
:root.theme-dark .ft-person-card,
:root:not(.theme-light) .ft-person-card.ft-female .ft-pid,
:root.theme-dark .ft-person-card.ft-female .ft-pid,
:root:not(.theme-light) .ge-contribute,
:root.theme-dark .ge-contribute,
:root:not(.theme-light) .ge-contribute a,
:root.theme-dark .ge-contribute a,
:root:not(.theme-light) .ge-contribute strong,
:root.theme-dark .ge-contribute strong,
:root:not(.theme-light) .ge-explore-section .group-label,
:root.theme-dark .ge-explore-section .group-label,
:root:not(.theme-light) .ge-img-gallery figure figcaption,
:root.theme-dark .ge-img-gallery figure figcaption,
:root:not(.theme-light) .ge-img-gallery figure figcaption .credit,
:root.theme-dark .ge-img-gallery figure figcaption .credit,
:root:not(.theme-light) .ge-img-gallery figure figcaption details summary,
:root.theme-dark .ge-img-gallery figure figcaption details summary,
:root:not(.theme-light) .ge-img-gallery figure figcaption strong,
:root.theme-dark .ge-img-gallery figure figcaption strong,
:root:not(.theme-light) .ge-map-legend .legend-label,
:root.theme-dark .ge-map-legend .legend-label,
:root:not(.theme-light) .ge-map-legend .legend-label .small,
:root.theme-dark .ge-map-legend .legend-label .small,
:root:not(.theme-light) .ge-map-legend .legend-line.route,
:root.theme-dark .ge-map-legend .legend-line.route,
:root:not(.theme-light) .ge-surname-card,
:root.theme-dark .ge-surname-card,
:root:not(.theme-light) .ge-surname-card h4,
:root.theme-dark .ge-surname-card h4,
:root:not(.theme-light) .ge-surname-card p,
:root.theme-dark .ge-surname-card p,
:root:not(.theme-light) .ge-surname-card.status,
:root.theme-dark .ge-surname-card.status,
:root:not(.theme-light) .ge-surname-card.status h4,
:root.theme-dark .ge-surname-card.status h4,
:root:not(.theme-light) .ge-surname-table .meta,
:root.theme-dark .ge-surname-table .meta,
:root:not(.theme-light) .ge-surname-table .star,
:root.theme-dark .ge-surname-table .star,
:root:not(.theme-light) .ge-surname-table tfoot td,
:root.theme-dark .ge-surname-table tfoot td,
:root:not(.theme-light) .ge-surname-table th,
:root.theme-dark .ge-surname-table th,
:root:not(.theme-light) .ge-surname-table th, .ge-surname-table td,
:root.theme-dark .ge-surname-table th, .ge-surname-table td,
:root:not(.theme-light) .ge-surname-table tr.self td:first-child,
:root.theme-dark .ge-surname-table tr.self td:first-child,
:root:not(.theme-light) .ge-tile,
:root.theme-dark .ge-tile,
:root:not(.theme-light) .ge-tile-arrow,
:root.theme-dark .ge-tile-arrow,
:root:not(.theme-light) .ge-tile-eyebrow,
:root.theme-dark .ge-tile-eyebrow,
:root:not(.theme-light) .ge-tile-sub,
:root.theme-dark .ge-tile-sub,
:root:not(.theme-light) .ge-tile.cross,
:root.theme-dark .ge-tile.cross,
:root:not(.theme-light) .ge-tile.cross .ge-tile-arrow,
:root.theme-dark .ge-tile.cross .ge-tile-arrow,
:root:not(.theme-light) .ge-tile.cross .ge-tile-eyebrow,
:root.theme-dark .ge-tile.cross .ge-tile-eyebrow,
:root:not(.theme-light) .ge-tile.primary,
:root.theme-dark .ge-tile.primary,
:root:not(.theme-light) .ge-timeline-mobile ol li,
:root.theme-dark .ge-timeline-mobile ol li,
:root:not(.theme-light) .ge-timeline-mobile ol li .age,
:root.theme-dark .ge-timeline-mobile ol li .age,
:root:not(.theme-light) .ge-timeline-mobile ol li .yr,
:root.theme-dark .ge-timeline-mobile ol li .yr,
:root:not(.theme-light) .ge-timeline-mobile ol li.pivot .yr,
:root.theme-dark .ge-timeline-mobile ol li.pivot .yr,
:root:not(.theme-light) .ge-timeline-prose .body,
:root.theme-dark .ge-timeline-prose .body,
:root:not(.theme-light) .ge-timeline-prose summary,
:root.theme-dark .ge-timeline-prose summary,
:root:not(.theme-light) .ge-town-mini,
:root.theme-dark .ge-town-mini,
:root:not(.theme-light) .ge-town-mini .name,
:root.theme-dark .ge-town-mini .name,
:root:not(.theme-light) .ge-town-mini .role,
:root.theme-dark .ge-town-mini .role,
:root:not(.theme-light) .ge-town-mini.origin .role,
:root.theme-dark .ge-town-mini.origin .role,
:root:not(.theme-light) .ge-town-mini.pending,
:root.theme-dark .ge-town-mini.pending,
:root:not(.theme-light) .ge-town-mini.pending .role,
:root.theme-dark .ge-town-mini.pending .role,
:root:not(.theme-light) .ge-town-mini.regional,
:root.theme-dark .ge-town-mini.regional,
:root:not(.theme-light) .ge-town-mini.regional .role,
:root.theme-dark .ge-town-mini.regional .role,
:root:not(.theme-light) .ge-visit-card a,
:root.theme-dark .ge-visit-card a,
:root:not(.theme-light) .ge-visit-card h3,
:root.theme-dark .ge-visit-card h3,
:root:not(.theme-light) .ge-visit-card h4,
:root.theme-dark .ge-visit-card h4,
:root:not(.theme-light) .ge-visit-card p,
:root.theme-dark .ge-visit-card p,
:root:not(.theme-light) .gl-hero,
:root.theme-dark .gl-hero,
:root:not(.theme-light) .hesse-timeline .ht-flag .ht-flag-cap,
:root.theme-dark .hesse-timeline .ht-flag .ht-flag-cap,
:root:not(.theme-light) .hesse-timeline .ht-row.pivot,
:root.theme-dark .hesse-timeline .ht-row.pivot,
:root:not(.theme-light) .hesse-timeline .ht-when,
:root.theme-dark .hesse-timeline .ht-when,
:root:not(.theme-light) .hk-hero,
:root.theme-dark .hk-hero,
:root:not(.theme-light) .ht-body h4,
:root.theme-dark .ht-body h4,
:root:not(.theme-light) .ht-flag-cap,
:root.theme-dark .ht-flag-cap,
:root:not(.theme-light) .ht-links,
:root.theme-dark .ht-links,
:root:not(.theme-light) .ht-map-cap,
:root.theme-dark .ht-map-cap,
:root:not(.theme-light) .ht-map-cap a,
:root.theme-dark .ht-map-cap a,
:root:not(.theme-light) .ht-map-title,
:root.theme-dark .ht-map-title,
:root:not(.theme-light) .ht-when,
:root.theme-dark .ht-when,
:root:not(.theme-light) .hyp-label,
:root.theme-dark .hyp-label,
:root:not(.theme-light) .hypothesis-card .h-section.against .label,
:root.theme-dark .hypothesis-card .h-section.against .label,
:root:not(.theme-light) .hypothesis-card .h-section.confirm .label,
:root.theme-dark .hypothesis-card .h-section.confirm .label,
:root:not(.theme-light) .hypothesis-card .h-section.for .label,
:root.theme-dark .hypothesis-card .h-section.for .label,
:root:not(.theme-light) .im-resolution-row.likely   .im-resolution-prob,
:root.theme-dark .im-resolution-row.likely   .im-resolution-prob,
:root:not(.theme-light) .im-resolution-row.unlikely .im-resolution-prob,
:root.theme-dark .im-resolution-row.unlikely .im-resolution-prob,
:root:not(.theme-light) .im-tile,
:root.theme-dark .im-tile,
:root:not(.theme-light) .im-tile-arrow,
:root.theme-dark .im-tile-arrow,
:root:not(.theme-light) .im-tile-eyebrow,
:root.theme-dark .im-tile-eyebrow,
:root:not(.theme-light) .im-tile-sub,
:root.theme-dark .im-tile-sub,
:root:not(.theme-light) .im-tile.cross,
:root.theme-dark .im-tile.cross,
:root:not(.theme-light) .im-tile.cross .im-tile-arrow,
:root.theme-dark .im-tile.cross .im-tile-arrow,
:root:not(.theme-light) .im-tile.cross .im-tile-eyebrow,
:root.theme-dark .im-tile.cross .im-tile-eyebrow,
:root:not(.theme-light) .im-tile.primary,
:root.theme-dark .im-tile.primary,
:root:not(.theme-light) .img-gallery figure figcaption,
:root.theme-dark .img-gallery figure figcaption,
:root:not(.theme-light) .img-gallery figure figcaption .credit,
:root.theme-dark .img-gallery figure figcaption .credit,
:root:not(.theme-light) .img-gallery figure figcaption strong,
:root.theme-dark .img-gallery figure figcaption strong,
:root:not(.theme-light) .index-controls label,
:root.theme-dark .index-controls label,
:root:not(.theme-light) .konsen-feature h3,
:root.theme-dark .konsen-feature h3,
:root:not(.theme-light) .konsen-feature p,
:root.theme-dark .konsen-feature p,
:root:not(.theme-light) .konsen-feature strong,
:root.theme-dark .konsen-feature strong,
:root:not(.theme-light) .kv td a,
:root.theme-dark .kv td a,
:root:not(.theme-light) .kv td:first-child,
:root.theme-dark .kv td:first-child,
:root:not(.theme-light) .leaflet-popup-content,
:root.theme-dark .leaflet-popup-content,
:root:not(.theme-light) .leaflet-popup-content .body,
:root.theme-dark .leaflet-popup-content .body,
:root:not(.theme-light) .leaflet-popup-content .openmap,
:root.theme-dark .leaflet-popup-content .openmap,
:root:not(.theme-light) .leaflet-popup-content .yr,
:root.theme-dark .leaflet-popup-content .yr,
:root:not(.theme-light) .leaflet-popup-content a,
:root.theme-dark .leaflet-popup-content a,
:root:not(.theme-light) .leaflet-popup-content a.detail,
:root.theme-dark .leaflet-popup-content a.detail,
:root:not(.theme-light) .leaflet-popup-content a.openmap,
:root.theme-dark .leaflet-popup-content a.openmap,
:root:not(.theme-light) .leaflet-popup-content h4,
:root.theme-dark .leaflet-popup-content h4,
:root:not(.theme-light) .legend,
:root.theme-dark .legend,
:root:not(.theme-light) .legend strong,
:root.theme-dark .legend strong,
:root:not(.theme-light) .legend-item,
:root.theme-dark .legend-item,
:root:not(.theme-light) .log-entry .date,
:root.theme-dark .log-entry .date,
:root:not(.theme-light) .log-entry .verdict,
:root.theme-dark .log-entry .verdict,
:root:not(.theme-light) .log-entry > h3,
:root.theme-dark .log-entry > h3,
:root:not(.theme-light) .map-legend .legend-label,
:root.theme-dark .map-legend .legend-label,
:root:not(.theme-light) .map-legend .legend-label .small,
:root.theme-dark .map-legend .legend-label .small,
:root:not(.theme-light) .map-legend h3,
:root.theme-dark .map-legend h3,
:root:not(.theme-light) .marriage-block .marr-label,
:root.theme-dark .marriage-block .marr-label,
:root:not(.theme-light) .marriage-block.second .marr-label,
:root.theme-dark .marriage-block.second .marr-label,
:root:not(.theme-light) .meta,
:root.theme-dark .meta,
:root:not(.theme-light) .meta-band,
:root.theme-dark .meta-band,
:root:not(.theme-light) .meta-band .mb-key, .meta-band .mb-val,
:root.theme-dark .meta-band .mb-key, .meta-band .mb-val,
:root:not(.theme-light) .method-hero,
:root.theme-dark .method-hero,
:root:not(.theme-light) .method-hero h1, :root:not(.theme-light) header.method-hero .sub,
:root.theme-dark .method-hero h1, :root.theme-dark header.method-hero .sub,
:root:not(.theme-light) .mo-img-gallery figure figcaption,
:root.theme-dark .mo-img-gallery figure figcaption,
:root:not(.theme-light) .mo-img-gallery figure figcaption .credit,
:root.theme-dark .mo-img-gallery figure figcaption .credit,
:root:not(.theme-light) .mo-img-gallery figure figcaption strong,
:root.theme-dark .mo-img-gallery figure figcaption strong,
:root:not(.theme-light) .month-section h2,
:root.theme-dark .month-section h2,
:root:not(.theme-light) .muster,
:root.theme-dark .muster,
:root:not(.theme-light) .muster .cite,
:root.theme-dark .muster .cite,
:root:not(.theme-light) .muted-meta,
:root.theme-dark .muted-meta,
:root:not(.theme-light) .narrative-card.contested  .nc-eyebrow,
:root.theme-dark .narrative-card.contested  .nc-eyebrow,
:root:not(.theme-light) .narrative-card.documented .nc-eyebrow,
:root.theme-dark .narrative-card.documented .nc-eyebrow,
:root:not(.theme-light) .nr-hero,
:root.theme-dark .nr-hero,
:root:not(.theme-light) .nr-hero h1, :root:not(.theme-light) header.nr-hero .sub,
:root.theme-dark .nr-hero h1, :root.theme-dark header.nr-hero .sub,
:root:not(.theme-light) .num,
:root.theme-dark .num,
:root:not(.theme-light) .open-lead .ol-action strong,
:root.theme-dark .open-lead .ol-action strong,
:root:not(.theme-light) .open-lead .ol-rank,
:root.theme-dark .open-lead .ol-rank,
:root:not(.theme-light) .oq-hero,
:root.theme-dark .oq-hero,
:root:not(.theme-light) .page > .lede,
:root.theme-dark .page > .lede,
:root:not(.theme-light) .page > h2,
:root.theme-dark .page > h2,
:root:not(.theme-light) .page-card .img-col figcaption,
:root.theme-dark .page-card .img-col figcaption,
:root:not(.theme-light) .page-card .text-col .note,
:root.theme-dark .page-card .text-col .note,
:root:not(.theme-light) .page-card .text-col .ptype,
:root.theme-dark .page-card .text-col .ptype,
:root:not(.theme-light) .page-card .text-col .verbatim,
:root.theme-dark .page-card .text-col .verbatim,
:root:not(.theme-light) .page-card .text-col dl dd,
:root.theme-dark .page-card .text-col dl dd,
:root:not(.theme-light) .page-card .text-col dl dt,
:root.theme-dark .page-card .text-col dl dt,
:root:not(.theme-light) .page-card .text-col h4,
:root.theme-dark .page-card .text-col h4,
:root:not(.theme-light) .page-toc .toc-label,
:root.theme-dark .page-toc .toc-label,
:root:not(.theme-light) .page-toc a,
:root.theme-dark .page-toc a,
:root:not(.theme-light) .parish th,
:root.theme-dark .parish th,
:root:not(.theme-light) .pathway.archive,
:root.theme-dark .pathway.archive,
:root:not(.theme-light) .pathway.descendant,
:root.theme-dark .pathway.descendant,
:root:not(.theme-light) .pathway.researcher,
:root.theme-dark .pathway.researcher,
:root:not(.theme-light) .pdf-icon,
:root.theme-dark .pdf-icon,
:root:not(.theme-light) .people-view-toggle button,
:root.theme-dark .people-view-toggle button,
:root:not(.theme-light) .people-view-toggle button.active,
:root.theme-dark .people-view-toggle button.active,
:root:not(.theme-light) .person-box-html .dates,
:root.theme-dark .person-box-html .dates,
:root:not(.theme-light) .person-box-html .name,
:root.theme-dark .person-box-html .name,
:root:not(.theme-light) .person-box-html .role,
:root.theme-dark .person-box-html .role,
:root:not(.theme-light) .person-card,
:root.theme-dark .person-card,
:root:not(.theme-light) .person-card .meta,
:root.theme-dark .person-card .meta,
:root:not(.theme-light) .person-card .role,
:root.theme-dark .person-card .role,
:root:not(.theme-light) .person-card .role.battery,
:root.theme-dark .person-card .role.battery,
:root:not(.theme-light) .person-card .role.family,
:root.theme-dark .person-card .role.family,
:root:not(.theme-light) .person-card .role.open-id,
:root.theme-dark .person-card .role.open-id,
:root:not(.theme-light) .person-card .summary,
:root.theme-dark .person-card .summary,
:root:not(.theme-light) .person-card h3,
:root.theme-dark .person-card h3,
:root:not(.theme-light) .person-card.battery,
:root.theme-dark .person-card.battery,
:root:not(.theme-light) .person-card.family,
:root.theme-dark .person-card.family,
:root:not(.theme-light) .person-card.open-id,
:root.theme-dark .person-card.open-id,
:root:not(.theme-light) .person-list li .desc,
:root.theme-dark .person-list li .desc,
:root:not(.theme-light) .person-list li .desc a,
:root.theme-dark .person-list li .desc a,
:root:not(.theme-light) .person-list li .name,
:root.theme-dark .person-list li .name,
:root:not(.theme-light) .person-list li .role-tag,
:root.theme-dark .person-list li .role-tag,
:root:not(.theme-light) .person-list li .role-tag.open,
:root.theme-dark .person-list li .role-tag.open,
:root:not(.theme-light) .person-list li .role-tag.witness,
:root.theme-dark .person-list li .role-tag.witness,
:root:not(.theme-light) .person-section > .section-blurb,
:root.theme-dark .person-section > .section-blurb,
:root:not(.theme-light) .person-section > h2,
:root.theme-dark .person-section > h2,
:root:not(.theme-light) .person.f-gans,
:root.theme-dark .person.f-gans,
:root:not(.theme-light) .person.f-grandjot,
:root.theme-dark .person.f-grandjot,
:root:not(.theme-light) .person.f-herwig,
:root.theme-dark .person.f-herwig,
:root:not(.theme-light) .person.f-hofeditz,
:root.theme-dark .person.f-hofeditz,
:root:not(.theme-light) .person.f-konze_d,
:root.theme-dark .person.f-konze_d,
:root:not(.theme-light) .person.f-konze_t,
:root.theme-dark .person.f-konze_t,
:root:not(.theme-light) .person.f-other,
:root.theme-dark .person.f-other,
:root:not(.theme-light) .person.unverified,
:root.theme-dark .person.unverified,
:root:not(.theme-light) .phonetic-cluster .speaker-yes,
:root.theme-dark .phonetic-cluster .speaker-yes,
:root:not(.theme-light) .pm-hero,
:root.theme-dark .pm-hero,
:root:not(.theme-light) .pull,
:root.theme-dark .pull,
:root:not(.theme-light) .pull strong,
:root.theme-dark .pull strong,
:root:not(.theme-light) .research-log .log-meta,
:root.theme-dark .research-log .log-meta,
:root:not(.theme-light) .research-log > h2,
:root.theme-dark .research-log > h2,
:root:not(.theme-light) .research-log > summary,
:root.theme-dark .research-log > summary,
:root:not(.theme-light) .rl-card h5,
:root.theme-dark .rl-card h5,
:root:not(.theme-light) .rl-card.candidate,
:root.theme-dark .rl-card.candidate,
:root:not(.theme-light) .rl-card.confirmed,
:root.theme-dark .rl-card.confirmed,
:root:not(.theme-light) .rl-card.eliminated,
:root.theme-dark .rl-card.eliminated,
:root:not(.theme-light) .rl-found-box h3,
:root.theme-dark .rl-found-box h3,
:root:not(.theme-light) .rl-found-box table td:first-child,
:root.theme-dark .rl-found-box table td:first-child,
:root:not(.theme-light) .rl-next h2,
:root.theme-dark .rl-next h2,
:root:not(.theme-light) .rl-passes h3,
:root.theme-dark .rl-passes h3,
:root:not(.theme-light) .rl-result.collateral,
:root.theme-dark .rl-result.collateral,
:root:not(.theme-light) .rl-result.elim,
:root.theme-dark .rl-result.elim,
:root:not(.theme-light) .rl-result.held,
:root.theme-dark .rl-result.held,
:root:not(.theme-light) .rl-result.neg,
:root.theme-dark .rl-result.neg,
:root:not(.theme-light) .rl-result.pos,
:root.theme-dark .rl-result.pos,
:root:not(.theme-light) .rl-round .finding strong,
:root.theme-dark .rl-round .finding strong,
:root:not(.theme-light) .rl-round .null strong,
:root.theme-dark .rl-round .null strong,
:root:not(.theme-light) .rl-round h3,
:root.theme-dark .rl-round h3,
:root:not(.theme-light) .rl-round h3 .when,
:root.theme-dark .rl-round h3 .when,
:root:not(.theme-light) .rl-section h2,
:root.theme-dark .rl-section h2,
:root:not(.theme-light) .rl-section h3,
:root.theme-dark .rl-section h3,
:root:not(.theme-light) .rl-star,
:root.theme-dark .rl-star,
:root:not(.theme-light) .rl-status h3,
:root.theme-dark .rl-status h3,
:root:not(.theme-light) .rl-tells h2,
:root.theme-dark .rl-tells h2,
:root:not(.theme-light) .row.eliminated,
:root.theme-dark .row.eliminated,
:root:not(.theme-light) .schrader-tile,
:root.theme-dark .schrader-tile,
:root:not(.theme-light) .schrader-tile-blurb,
:root.theme-dark .schrader-tile-blurb,
:root:not(.theme-light) .schrader-tile-candidate-meta,
:root.theme-dark .schrader-tile-candidate-meta,
:root:not(.theme-light) .schrader-tile-eyebrow,
:root.theme-dark .schrader-tile-eyebrow,
:root:not(.theme-light) .schrader-tile-foot,
:root.theme-dark .schrader-tile-foot,
:root:not(.theme-light) .schrader-tile-num,
:root.theme-dark .schrader-tile-num,
:root:not(.theme-light) .schrader-tile-sub,
:root.theme-dark .schrader-tile-sub,
:root:not(.theme-light) .schrader-tile.active .schrader-tile-candidate,
:root.theme-dark .schrader-tile.active .schrader-tile-candidate,
:root:not(.theme-light) .schrader-tile.active .schrader-tile-foot,
:root.theme-dark .schrader-tile.active .schrader-tile-foot,
:root:not(.theme-light) .schrader-tile.active .schrader-tile-num,
:root.theme-dark .schrader-tile.active .schrader-tile-num,
:root:not(.theme-light) .schrader-tile.eliminated,
:root.theme-dark .schrader-tile.eliminated,
:root:not(.theme-light) .schrader-tile.eliminated .schrader-tile-candidate,
:root.theme-dark .schrader-tile.eliminated .schrader-tile-candidate,
:root:not(.theme-light) .schrader-tile.eliminated .schrader-tile-foot,
:root.theme-dark .schrader-tile.eliminated .schrader-tile-foot,
:root:not(.theme-light) .schrader-tile.eliminated .schrader-tile-num,
:root.theme-dark .schrader-tile.eliminated .schrader-tile-num,
:root:not(.theme-light) .sec-hero,
:root.theme-dark .sec-hero,
:root:not(.theme-light) .seven-stats .stat-lbl,
:root.theme-dark .seven-stats .stat-lbl,
:root:not(.theme-light) .seven-stats .stat-num,
:root.theme-dark .seven-stats .stat-num,
:root:not(.theme-light) .site-footer .footer-meta,
:root.theme-dark .site-footer .footer-meta,
:root:not(.theme-light) .site-search-empty,
:root.theme-dark .site-search-empty,
:root:not(.theme-light) .site-search-input,
:root.theme-dark .site-search-input,
:root:not(.theme-light) .site-search-input::placeholder,
:root.theme-dark .site-search-input::placeholder,
:root:not(.theme-light) .site-search-meta,
:root.theme-dark .site-search-meta,
:root:not(.theme-light) .site-search-result,
:root.theme-dark .site-search-result,
:root:not(.theme-light) .site-search-result .ssr-desc,
:root.theme-dark .site-search-result .ssr-desc,
:root:not(.theme-light) .site-search-result .ssr-title,
:root.theme-dark .site-search-result .ssr-title,
:root:not(.theme-light) .site-search-result .ssr-type,
:root.theme-dark .site-search-result .ssr-type,
:root:not(.theme-light) .site-search-result mark,
:root.theme-dark .site-search-result mark,
:root:not(.theme-light) .small,
:root.theme-dark .small,
:root:not(.theme-light) .small-link,
:root.theme-dark .small-link,
:root:not(.theme-light) .smoking-gun .sg-eyebrow,
:root.theme-dark .smoking-gun .sg-eyebrow,
:root:not(.theme-light) .smoking-gun .vowel-arrow,
:root.theme-dark .smoking-gun .vowel-arrow,
:root:not(.theme-light) .smoking-gun .vowel-pair .surname,
:root.theme-dark .smoking-gun .vowel-pair .surname,
:root:not(.theme-light) .smoking-gun .vowel-pair .surname strong,
:root.theme-dark .smoking-gun .vowel-pair .surname strong,
:root:not(.theme-light) .smoking-gun .vowel-pair .year,
:root.theme-dark .smoking-gun .vowel-pair .year,
:root:not(.theme-light) .smoking-gun h3,
:root.theme-dark .smoking-gun h3,
:root:not(.theme-light) .source-links,
:root.theme-dark .source-links,
:root:not(.theme-light) .source-links a,
:root.theme-dark .source-links a,
:root:not(.theme-light) .source-links strong,
:root.theme-dark .source-links strong,
:root:not(.theme-light) .source-row a,
:root.theme-dark .source-row a,
:root:not(.theme-light) .sr-hero,
:root.theme-dark .sr-hero,
:root:not(.theme-light) .sr-hero h1, :root:not(.theme-light) header.sr-hero .sub,
:root.theme-dark .sr-hero h1, :root.theme-dark header.sr-hero .sub,
:root:not(.theme-light) .sr-table .kin-aug,
:root.theme-dark .sr-table .kin-aug,
:root:not(.theme-light) .sr-table .kin-circ,
:root.theme-dark .sr-table .kin-circ,
:root:not(.theme-light) .sr-table .kin-none,
:root.theme-dark .sr-table .kin-none,
:root:not(.theme-light) .src-card .desc,
:root.theme-dark .src-card .desc,
:root:not(.theme-light) .src-card .doc-type,
:root.theme-dark .src-card .doc-type,
:root:not(.theme-light) .src-card h3,
:root.theme-dark .src-card h3,
:root:not(.theme-light) .st-hero,
:root.theme-dark .st-hero,
:root:not(.theme-light) .stat .lab,
:root.theme-dark .stat .lab,
:root:not(.theme-light) .stat .num,
:root.theme-dark .stat .num,
:root:not(.theme-light) .stat-detail .archion-breadcrumb,
:root.theme-dark .stat-detail .archion-breadcrumb,
:root:not(.theme-light) .stat-detail .parish-grid .pcell .src,
:root.theme-dark .stat-detail .parish-grid .pcell .src,
:root:not(.theme-light) .stat-detail .parish-grid .pcell .src.archion-nav,
:root.theme-dark .stat-detail .parish-grid .pcell .src.archion-nav,
:root:not(.theme-light) .stat-detail .parish-grid .pcell .src.archion-nav em,
:root.theme-dark .stat-detail .parish-grid .pcell .src.archion-nav em,
:root:not(.theme-light) .stat-detail .parish-grid .pcell .src.archion-nav strong,
:root.theme-dark .stat-detail .parish-grid .pcell .src.archion-nav strong,
:root:not(.theme-light) .stat-detail .parish-grid .pcell strong,
:root.theme-dark .stat-detail .parish-grid .pcell strong,
:root:not(.theme-light) .stat-detail h4,
:root.theme-dark .stat-detail h4,
:root:not(.theme-light) .stat-detail h5,
:root.theme-dark .stat-detail h5,
:root:not(.theme-light) .stat-tile .lab,
:root.theme-dark .stat-tile .lab,
:root:not(.theme-light) .stat-tile .num,
:root.theme-dark .stat-tile .num,
:root:not(.theme-light) .status-section-h.priority,
:root.theme-dark .status-section-h.priority,
:root:not(.theme-light) .status.contested,
:root.theme-dark .status.contested,
:root:not(.theme-light) .status.documented,
:root.theme-dark .status.documented,
:root:not(.theme-light) .status.eliminated,
:root.theme-dark .status.eliminated,
:root:not(.theme-light) .status.open,
:root.theme-dark .status.open,
:root:not(.theme-light) .status.reference,
:root.theme-dark .status.reference,
:root:not(.theme-light) .stl-hero,
:root.theme-dark .stl-hero,
:root:not(.theme-light) .subtitle,
:root.theme-dark .subtitle,
:root:not(.theme-light) .surname-chronology .speaker-flag,
:root.theme-dark .surname-chronology .speaker-flag,
:root:not(.theme-light) .surname-chronology td.surname.cluster,
:root.theme-dark .surname-chronology td.surname.cluster,
:root:not(.theme-light) .surname-strip span.bold-konsen,
:root.theme-dark .surname-strip span.bold-konsen,
:root:not(.theme-light) .surname-trail-card h3,
:root.theme-dark .surname-trail-card h3,
:root:not(.theme-light) .surname-trail-card p,
:root.theme-dark .surname-trail-card p,
:root:not(.theme-light) .tab-cross-ref,
:root.theme-dark .tab-cross-ref,
:root:not(.theme-light) .tab-meta,
:root.theme-dark .tab-meta,
:root:not(.theme-light) .tab-meta time,
:root.theme-dark .tab-meta time,
:root:not(.theme-light) .tab-open-q,
:root.theme-dark .tab-open-q,
:root:not(.theme-light) .tab-open-q a,
:root.theme-dark .tab-open-q a,
:root:not(.theme-light) .tab-open-q h4,
:root.theme-dark .tab-open-q h4,
:root:not(.theme-light) .tab-open-q li,
:root.theme-dark .tab-open-q li,
:root:not(.theme-light) .text-confirmed,
:root.theme-dark .text-confirmed,
:root:not(.theme-light) .text-eliminated,
:root.theme-dark .text-eliminated,
:root:not(.theme-light) .text-soft,
:root.theme-dark .text-soft,
:root:not(.theme-light) .theme-dark .status-section-h.priority,
:root.theme-dark .theme-dark .status-section-h.priority,
:root:not(.theme-light) .timeline .event .when,
:root.theme-dark .timeline .event .when,
:root:not(.theme-light) .timeline-row .when,
:root.theme-dark .timeline-row .when,
:root:not(.theme-light) .tl-event .src,
:root.theme-dark .tl-event .src,
:root:not(.theme-light) .tl-event .what,
:root.theme-dark .tl-event .what,
:root:not(.theme-light) .tl-event .when,
:root.theme-dark .tl-event .when,
:root:not(.theme-light) .toc h3,
:root.theme-dark .toc h3,
:root:not(.theme-light) .toolbar button,
:root.theme-dark .toolbar button,
:root:not(.theme-light) .tooltip .td,
:root.theme-dark .tooltip .td,
:root:not(.theme-light) .tooltip .ti,
:root.theme-dark .tooltip .ti,
:root:not(.theme-light) .towns-legend .legend-label,
:root.theme-dark .towns-legend .legend-label,
:root:not(.theme-light) .tr-hero,
:root.theme-dark .tr-hero,
:root:not(.theme-light) .tree .sib a,
:root.theme-dark .tree .sib a,
:root:not(.theme-light) .tree-note,
:root.theme-dark .tree-note,
:root:not(.theme-light) .twocol > div h3,
:root.theme-dark .twocol > div h3,
:root:not(.theme-light) .union-flag,
:root.theme-dark .union-flag,
:root:not(.theme-light) .verdict-table th,
:root.theme-dark .verdict-table th,
:root:not(.theme-light) .version-list a,
:root.theme-dark .version-list a,
:root:not(.theme-light) .vz-hero,
:root.theme-dark .vz-hero,
:root:not(.theme-light) .whats-new,
:root.theme-dark .whats-new,
:root:not(.theme-light) .whats-new .date,
:root.theme-dark .whats-new .date,
:root:not(.theme-light) .whats-new a,
:root.theme-dark .whats-new a,
:root:not(.theme-light) .whats-new strong,
:root.theme-dark .whats-new strong,
:root:not(.theme-light) .zoom-display,
:root.theme-dark .zoom-display {
  color: var(--text-body, #e8dfc8) !important;
}

/* ============================================================
   Surname-chronology cluster-green RESTORE (17 May 2026 night)
   ============================================================
   The auto-generated dark-text sweep above accidentally caught
   `.surname-chronology td.surname.cluster` and forced it to
   cream — overriding the intentional green that marks cluster
   members. Restore the green and give the Konzen row (only
   one carrying the Hessian z-form) a distinctive emphasis:
   bolder weight, slight glow / row-tint, and a clearly green
   color in both light and dark modes.
   ------------------------------------------------------------ */

/* Cluster-member surnames: green in both modes (project convention) */
:root:not(.theme-light) .surname-chronology td.surname.cluster,
:root.theme-dark .surname-chronology td.surname.cluster {
  color: #a4bee0 !important;            /* fresh leaf-green on walnut */
}
:root.theme-light .surname-chronology td.surname.cluster {
  color: #2a466a !important;            /* forest green on cream */
}

/* The Konzen 1890 row — the singular American attestation of the full
   Hessian z-form. Make it pop with row-tint + a brighter green for the
   surname cell, in both light and dark modes. */
.surname-chronology tr.konzen-keystone td {
  background: rgba(74, 102, 138, 0.10) !important;
}
:root:not(.theme-light) .surname-chronology tr.konzen-keystone td,
:root.theme-dark .surname-chronology tr.konzen-keystone td {
  background: rgba(96, 131, 176, 0.18) !important;
}
.surname-chronology tr.konzen-keystone td.surname.cluster {
  color: #1c375a !important;            /* deeper forest green for emphasis (light) */
  font-weight: 800 !important;
}
:root:not(.theme-light) .surname-chronology tr.konzen-keystone td.surname.cluster,
:root.theme-dark .surname-chronology tr.konzen-keystone td.surname.cluster {
  color: #cad4e2 !important;            /* brighter green for emphasis (dark) */
  font-weight: 800 !important;
}
/* ============================================================
   AGGRESSIVE comprehensive dark-mode override (17 May 2026 night)
   ============================================================
   Catches every class selector across the entire site whose
   inline <style> rule sets a light background or a dark text
   color. Covers small pills / chips / badges / swatches that
   the conservative sweep excluded.
   ------------------------------------------------------------ */

:root:not(.theme-light) .access-bar,
:root.theme-dark .access-bar,
:root:not(.theme-light) .actor-card,
:root.theme-dark .actor-card,
:root:not(.theme-light) .actor-card.agent,
:root.theme-dark .actor-card.agent,
:root:not(.theme-light) .address-map-wrap,
:root.theme-dark .address-map-wrap,
:root:not(.theme-light) .affidavit,
:root.theme-dark .affidavit,
:root:not(.theme-light) .badge.confirmed,
:root.theme-dark .badge.confirmed,
:root:not(.theme-light) .badge.dna,
:root.theme-dark .badge.dna,
:root:not(.theme-light) .badge.hypothesis,
:root.theme-dark .badge.hypothesis,
:root:not(.theme-light) .badge.open,
:root.theme-dark .badge.open,
:root:not(.theme-light) .badge.partial,
:root.theme-dark .badge.partial,
:root:not(.theme-light) .brv-controls button.active,
:root.theme-dark .brv-controls button.active,
:root:not(.theme-light) .brv-wrap::-webkit-scrollbar-thumb,
:root.theme-dark .brv-wrap::-webkit-scrollbar-thumb,
:root:not(.theme-light) .ca-tile,
:root.theme-dark .ca-tile,
:root:not(.theme-light) .ca-tile.keystone,
:root.theme-dark .ca-tile.keystone,
:root:not(.theme-light) .ca-tile.profile,
:root.theme-dark .ca-tile.profile,
:root:not(.theme-light) .ca-tile.theme,
:root.theme-dark .ca-tile.theme,
:root:not(.theme-light) .card,
:root.theme-dark .card,
:root:not(.theme-light) .card, .summary-card, table.kv,
:root.theme-dark .card, .summary-card, table.kv,
:root:not(.theme-light) .card.accent,
:root.theme-dark .card.accent,
:root:not(.theme-light) .card.evidence-card > summary > .ec-summary-content > h3 .ec-date,
:root.theme-dark .card.evidence-card > summary > .ec-summary-content > h3 .ec-date,
:root:not(.theme-light) .card.hypothesis,
:root.theme-dark .card.hypothesis,
:root:not(.theme-light) .card.open,
:root.theme-dark .card.open,
:root:not(.theme-light) .chart-link,
:root.theme-dark .chart-link,
:root:not(.theme-light) .chart-link .chart-caption,
:root.theme-dark .chart-link .chart-caption,
:root:not(.theme-light) .chart-link img,
:root.theme-dark .chart-link img,
:root:not(.theme-light) .chart-link.pdf img,
  .chart-link.docx img,
  .chart-link.xlsx img,
:root.theme-dark .chart-link.pdf img,
  .chart-link.docx img,
  .chart-link.xlsx img,
:root:not(.theme-light) .check,
:root.theme-dark .check,
:root:not(.theme-light) .child-card,
:root.theme-dark .child-card,
:root:not(.theme-light) .child-card.accent,
:root.theme-dark .child-card.accent,
:root:not(.theme-light) .child-card.died-young,
:root.theme-dark .child-card.died-young,
:root:not(.theme-light) .child-card.subject,
:root.theme-dark .child-card.subject,
:root:not(.theme-light) .child-card.subject .order,
:root.theme-dark .child-card.subject .order,
:root:not(.theme-light) .child-card.subject .surname-pill,
:root.theme-dark .child-card.subject .surname-pill,
:root:not(.theme-light) .children-tree,
:root.theme-dark .children-tree,
:root:not(.theme-light) .citation-box code,
:root.theme-dark .citation-box code,
:root:not(.theme-light) .cite-inline,
:root.theme-dark .cite-inline,
:root:not(.theme-light) .collapse,
:root.theme-dark .collapse,
:root:not(.theme-light) .conclusion-card,
:root.theme-dark .conclusion-card,
:root:not(.theme-light) .conf-key,
:root.theme-dark .conf-key,
:root:not(.theme-light) .conf.open,
:root.theme-dark .conf.open,
:root:not(.theme-light) .conf.working,
:root.theme-dark .conf.working,
:root:not(.theme-light) .cw-map-legend,
:root.theme-dark .cw-map-legend,
:root:not(.theme-light) .cw-map-legend .swatch.detached,
:root.theme-dark .cw-map-legend .swatch.detached,
:root:not(.theme-light) .cw-tile,
:root.theme-dark .cw-tile,
:root:not(.theme-light) .cw-tile.keystone,
:root.theme-dark .cw-tile.keystone,
:root:not(.theme-light) .cw-tile.mystery,
:root.theme-dark .cw-tile.mystery,
:root:not(.theme-light) .cw-tile.profile,
:root.theme-dark .cw-tile.profile,
:root:not(.theme-light) .cw-tile.theme,
:root.theme-dark .cw-tile.theme,
:root:not(.theme-light) .doc-card,
:root.theme-dark .doc-card,
:root:not(.theme-light) .doc-table,
:root.theme-dark .doc-table,
:root:not(.theme-light) .doc-table .type-tag,
:root.theme-dark .doc-table .type-tag,
:root:not(.theme-light) .ec-tells,
:root.theme-dark .ec-tells,
:root:not(.theme-light) .entry,
:root.theme-dark .entry,
:root:not(.theme-light) .er-entry .er-meta .severity.minor,
:root.theme-dark .er-entry .er-meta .severity.minor,
:root:not(.theme-light) .evidence-row .ev-thumb,
:root.theme-dark .evidence-row .ev-thumb,
:root:not(.theme-light) .family-file,
:root.theme-dark .family-file,
:root:not(.theme-light) .family-file.active,
:root.theme-dark .family-file.active,
:root:not(.theme-light) .family-file.open,
:root.theme-dark .family-file.open,
:root:not(.theme-light) .filter-chip,
:root.theme-dark .filter-chip,
:root:not(.theme-light) .filter-chip.active,
:root.theme-dark .filter-chip.active,
:root:not(.theme-light) .filter-pill,
:root.theme-dark .filter-pill,
:root:not(.theme-light) .filter-pill.active,
:root.theme-dark .filter-pill.active,
:root:not(.theme-light) .filter-row,
:root.theme-dark .filter-row,
:root:not(.theme-light) .friedrich-callout,
:root.theme-dark .friedrich-callout,
:root:not(.theme-light) .ft-couple-card,
:root.theme-dark .ft-couple-card,
:root:not(.theme-light) .ft-couple-card .ft-marriage-bar,
:root.theme-dark .ft-couple-card .ft-marriage-bar,
:root:not(.theme-light) .ft-marriage-branch-fs,
:root.theme-dark .ft-marriage-branch-fs,
:root:not(.theme-light) .ft-person-card,
:root.theme-dark .ft-person-card,
:root:not(.theme-light) .ft-person-card.ft-died-young,
:root.theme-dark .ft-person-card.ft-died-young,
:root:not(.theme-light) .ft-person-card.ft-female,
:root.theme-dark .ft-person-card.ft-female,
:root:not(.theme-light) .ft-person-card.ft-subject,
:root.theme-dark .ft-person-card.ft-subject,
:root:not(.theme-light) .ge-chrono-strip-wrap,
:root.theme-dark .ge-chrono-strip-wrap,
:root:not(.theme-light) .ge-contribute,
:root.theme-dark .ge-contribute,
:root:not(.theme-light) .ge-img-gallery figure,
:root.theme-dark .ge-img-gallery figure,
:root:not(.theme-light) .ge-map-legend,
:root.theme-dark .ge-map-legend,
:root:not(.theme-light) .ge-surname-card,
:root.theme-dark .ge-surname-card,
:root:not(.theme-light) .ge-surname-card.status,
:root.theme-dark .ge-surname-card.status,
:root:not(.theme-light) .ge-surname-step.verdict,
:root.theme-dark .ge-surname-step.verdict,
:root:not(.theme-light) .ge-surname-table th,
:root.theme-dark .ge-surname-table th,
:root:not(.theme-light) .ge-surname-table tr.self td,
:root.theme-dark .ge-surname-table tr.self td,
:root:not(.theme-light) .ge-tile,
:root.theme-dark .ge-tile,
:root:not(.theme-light) .ge-tile.cross,
:root.theme-dark .ge-tile.cross,
:root:not(.theme-light) .ge-timeline,
:root.theme-dark .ge-timeline,
:root:not(.theme-light) .ge-timeline-mobile,
:root.theme-dark .ge-timeline-mobile,
:root:not(.theme-light) .ge-timeline-prose,
:root.theme-dark .ge-timeline-prose,
:root:not(.theme-light) .ge-town-mini,
:root.theme-dark .ge-town-mini,
:root:not(.theme-light) .ge-town-mini.origin,
:root.theme-dark .ge-town-mini.origin,
:root:not(.theme-light) .ge-visit-card,
:root.theme-dark .ge-visit-card,
:root:not(.theme-light) .gmail-link,
:root.theme-dark .gmail-link,
:root:not(.theme-light) .hesse-timeline .ht-flag img,
:root.theme-dark .hesse-timeline .ht-flag img,
:root:not(.theme-light) .hesse-timeline .ht-row,
:root.theme-dark .hesse-timeline .ht-row,
:root:not(.theme-light) .hesse-timeline .ht-row.pivot,
:root.theme-dark .hesse-timeline .ht-row.pivot,
:root:not(.theme-light) .ht-map,
:root.theme-dark .ht-map,
:root:not(.theme-light) .ht-map img,
:root.theme-dark .ht-map img,
:root:not(.theme-light) .ht-row,
:root.theme-dark .ht-row,
:root:not(.theme-light) .im-cost-bar-key .swatch.barge,
:root.theme-dark .im-cost-bar-key .swatch.barge,
:root:not(.theme-light) .im-cost-bar-key .swatch.lodging,
:root.theme-dark .im-cost-bar-key .swatch.lodging,
:root:not(.theme-light) .im-cost-bar-key .swatch.onward,
:root.theme-dark .im-cost-bar-key .swatch.onward,
:root:not(.theme-light) .im-cost-bar-segment.barge,
:root.theme-dark .im-cost-bar-segment.barge,
:root:not(.theme-light) .im-cost-bar-segment.lodging,
:root.theme-dark .im-cost-bar-segment.lodging,
:root:not(.theme-light) .im-cost-bar-segment.onward,
:root.theme-dark .im-cost-bar-segment.onward,
:root:not(.theme-light) .im-map-legend .swatch.dest,
:root.theme-dark .im-map-legend .swatch.dest,
:root:not(.theme-light) .im-tile,
:root.theme-dark .im-tile,
:root:not(.theme-light) .im-tile.cross,
:root.theme-dark .im-tile.cross,
:root:not(.theme-light) .im-time-bar-key .swatch.barge,
:root.theme-dark .im-time-bar-key .swatch.barge,
:root:not(.theme-light) .im-time-bar-key .swatch.onward,
:root.theme-dark .im-time-bar-key .swatch.onward,
:root:not(.theme-light) .im-time-bar-key .swatch.wait,
:root.theme-dark .im-time-bar-key .swatch.wait,
:root:not(.theme-light) .im-time-bar-segment.barge,
:root.theme-dark .im-time-bar-segment.barge,
:root:not(.theme-light) .im-time-bar-segment.onward,
:root.theme-dark .im-time-bar-segment.onward,
:root:not(.theme-light) .im-time-bar-segment.wait,
:root.theme-dark .im-time-bar-segment.wait,
:root:not(.theme-light) .img-gallery figure,
:root.theme-dark .img-gallery figure,
:root:not(.theme-light) .index-controls,
:root.theme-dark .index-controls,
:root:not(.theme-light) .infographic-wrap,
:root.theme-dark .infographic-wrap,
:root:not(.theme-light) .instructions,
:root.theme-dark .instructions,
:root:not(.theme-light) .interests-list,
:root.theme-dark .interests-list,
:root:not(.theme-light) .ix-card,
:root.theme-dark .ix-card,
:root:not(.theme-light) .key-finding,
:root.theme-dark .key-finding,
:root:not(.theme-light) .key-insight,
:root.theme-dark .key-insight,
:root:not(.theme-light) .konsen-feature,
:root.theme-dark .konsen-feature,
:root:not(.theme-light) .konze-status-banner,
:root.theme-dark .konze-status-banner,
:root:not(.theme-light) .konzen-tag,
:root.theme-dark .konzen-tag,
:root:not(.theme-light) .leaflet-popup-content-wrapper,
:root.theme-dark .leaflet-popup-content-wrapper,
:root:not(.theme-light) .leaflet-popup-tip,
:root.theme-dark .leaflet-popup-tip,
:root:not(.theme-light) .legend,
:root.theme-dark .legend,
:root:not(.theme-light) .legend .sw.aff,
:root.theme-dark .legend .sw.aff,
:root:not(.theme-light) .legend-dot.charles,
:root.theme-dark .legend-dot.charles,
:root:not(.theme-light) .legend-dot.friend,
:root.theme-dark .legend-dot.friend,
:root:not(.theme-light) .legend-dot.working,
:root.theme-dark .legend-dot.working,
:root:not(.theme-light) .legend-overlay .lswatch.charles,
:root.theme-dark .legend-overlay .lswatch.charles,
:root:not(.theme-light) .legend-overlay .lswatch.child,
:root.theme-dark .legend-overlay .lswatch.child,
:root:not(.theme-light) .legend-overlay .lswatch.unknown,
:root.theme-dark .legend-overlay .lswatch.unknown,
:root:not(.theme-light) .map-legend,
:root.theme-dark .map-legend,
:root:not(.theme-light) .map-legend .swatch.approx,
:root.theme-dark .map-legend .swatch.approx,
:root:not(.theme-light) .map-legend .swatch.house,
:root.theme-dark .map-legend .swatch.house,
:root:not(.theme-light) .map-svg-wrap,
:root.theme-dark .map-svg-wrap,
:root:not(.theme-light) .marriage-block,
:root.theme-dark .marriage-block,
:root:not(.theme-light) .marriage-block.second,
:root.theme-dark .marriage-block.second,
:root:not(.theme-light) .mo-img-gallery figure,
:root.theme-dark .mo-img-gallery figure,
:root:not(.theme-light) .mono,
:root.theme-dark .mono,
:root:not(.theme-light) .muster,
:root.theme-dark .muster,
:root:not(.theme-light) .page-card,
:root.theme-dark .page-card,
:root:not(.theme-light) .page-card .text-col .badge.special,
:root.theme-dark .page-card .text-col .badge.special,
:root:not(.theme-light) .page-card .text-col .verbatim,
:root.theme-dark .page-card .text-col .verbatim,
:root:not(.theme-light) .page-toc,
:root.theme-dark .page-toc,
:root:not(.theme-light) .parish th,
:root.theme-dark .parish th,
:root:not(.theme-light) .pdf-icon,
:root.theme-dark .pdf-icon,
:root:not(.theme-light) .people-view-toggle button,
:root.theme-dark .people-view-toggle button,
:root:not(.theme-light) .people-view-toggle button.active,
:root.theme-dark .people-view-toggle button.active,
:root:not(.theme-light) .person-box-html,
:root.theme-dark .person-box-html,
:root:not(.theme-light) .person-box-html.candidate,
:root.theme-dark .person-box-html.candidate,
:root:not(.theme-light) .person-box-html.female,
:root.theme-dark .person-box-html.female,
:root:not(.theme-light) .person-box-html.male,
:root.theme-dark .person-box-html.male,
:root:not(.theme-light) .person-card,
:root.theme-dark .person-card,
:root:not(.theme-light) .person-list li .role-tag,
:root.theme-dark .person-list li .role-tag,
:root:not(.theme-light) .person-list li .role-tag.active,
:root.theme-dark .person-list li .role-tag.active,
:root:not(.theme-light) .person-list li .role-tag.child,
:root.theme-dark .person-list li .role-tag.child,
:root:not(.theme-light) .person-list li .role-tag.open,
:root.theme-dark .person-list li .role-tag.open,
:root:not(.theme-light) .person-list li .role-tag.witness,
:root.theme-dark .person-list li .role-tag.witness,
:root:not(.theme-light) .person-section,
:root.theme-dark .person-section,
:root:not(.theme-light) .person.f-gans,
:root.theme-dark .person.f-gans,
:root:not(.theme-light) .person.f-grandjot,
:root.theme-dark .person.f-grandjot,
:root:not(.theme-light) .person.f-herwig,
:root.theme-dark .person.f-herwig,
:root:not(.theme-light) .person.f-hofeditz,
:root.theme-dark .person.f-hofeditz,
:root:not(.theme-light) .person.f-konze_d,
:root.theme-dark .person.f-konze_d,
:root:not(.theme-light) .person.f-konze_t,
:root.theme-dark .person.f-konze_t,
:root:not(.theme-light) .person.f-other,
:root.theme-dark .person.f-other,
:root:not(.theme-light) .person.unverified,
:root.theme-dark .person.unverified,
:root:not(.theme-light) .pill.charles,
:root.theme-dark .pill.charles,
:root:not(.theme-light) .pill.friend,
:root.theme-dark .pill.friend,
:root:not(.theme-light) .pill.working,
:root.theme-dark .pill.working,
:root:not(.theme-light) .poster-stage,
:root.theme-dark .poster-stage,
:root:not(.theme-light) .poster-stage object,
  .poster-stage img,
:root.theme-dark .poster-stage object,
  .poster-stage img,
:root:not(.theme-light) .pull,
:root.theme-dark .pull,
:root:not(.theme-light) .research-log,
:root.theme-dark .research-log,
:root:not(.theme-light) .research-log > summary,
:root.theme-dark .research-log > summary,
:root:not(.theme-light) .rl-banner,
:root.theme-dark .rl-banner,
:root:not(.theme-light) .rl-card,
:root.theme-dark .rl-card,
:root:not(.theme-light) .rl-card.candidate,
:root.theme-dark .rl-card.candidate,
:root:not(.theme-light) .rl-found-box,
:root.theme-dark .rl-found-box,
:root:not(.theme-light) .rl-next,
:root.theme-dark .rl-next,
:root:not(.theme-light) .rl-passes,
:root.theme-dark .rl-passes,
:root:not(.theme-light) .rl-result.collateral,
:root.theme-dark .rl-result.collateral,
:root:not(.theme-light) .rl-result.elim,
:root.theme-dark .rl-result.elim,
:root:not(.theme-light) .rl-result.held,
:root.theme-dark .rl-result.held,
:root:not(.theme-light) .rl-result.neg,
:root.theme-dark .rl-result.neg,
:root:not(.theme-light) .rl-result.pos,
:root.theme-dark .rl-result.pos,
:root:not(.theme-light) .rl-round,
:root.theme-dark .rl-round,
:root:not(.theme-light) .rl-round .finding,
:root.theme-dark .rl-round .finding,
:root:not(.theme-light) .rl-round .null,
:root.theme-dark .rl-round .null,
:root:not(.theme-light) .rl-status,
:root.theme-dark .rl-status,
:root:not(.theme-light) .rl-tells,
:root.theme-dark .rl-tells,
:root:not(.theme-light) .row,
:root.theme-dark .row,
:root:not(.theme-light) .row.active,
:root.theme-dark .row.active,
:root:not(.theme-light) .row.open,
:root.theme-dark .row.open,
:root:not(.theme-light) .schrader-tile,
:root.theme-dark .schrader-tile,
:root:not(.theme-light) .schrader-tile-pill.active,
:root.theme-dark .schrader-tile-pill.active,
:root:not(.theme-light) .schrader-tile-pill.open,
:root.theme-dark .schrader-tile-pill.open,
:root:not(.theme-light) .schrader-tile.active,
:root.theme-dark .schrader-tile.active,
:root:not(.theme-light) .schrader-tile.eliminated,
:root.theme-dark .schrader-tile.eliminated,
:root:not(.theme-light) .schrader-tile.open,
:root.theme-dark .schrader-tile.open,
:root:not(.theme-light) .section h2 .badge-inline,
:root.theme-dark .section h2 .badge-inline,
:root:not(.theme-light) .seven-stats .stat,
:root.theme-dark .seven-stats .stat,
:root:not(.theme-light) .site-search-meta,
:root.theme-dark .site-search-meta,
:root:not(.theme-light) .site-search-result .ssr-type,
:root.theme-dark .site-search-result .ssr-type,
:root:not(.theme-light) .site-search-result .ssr-type.charles,
:root.theme-dark .site-search-result .ssr-type.charles,
:root:not(.theme-light) .site-search-result .ssr-type.theme,
:root.theme-dark .site-search-result .ssr-type.theme,
:root:not(.theme-light) .site-search-result mark,
:root.theme-dark .site-search-result mark,
:root:not(.theme-light) .site-search-results,
:root.theme-dark .site-search-results,
:root:not(.theme-light) .site-search-wrap .site-search-input,
:root.theme-dark .site-search-wrap .site-search-input,
:root:not(.theme-light) .smoking-gun .vowel-pair,
:root.theme-dark .smoking-gun .vowel-pair,
:root:not(.theme-light) .smoking-gun .vowel-pair .surname strong,
:root.theme-dark .smoking-gun .vowel-pair .surname strong,
:root:not(.theme-light) .source-links a,
:root.theme-dark .source-links a,
:root:not(.theme-light) .src-card,
:root.theme-dark .src-card,
:root:not(.theme-light) .stat,
:root.theme-dark .stat,
:root:not(.theme-light) .stat-detail,
:root.theme-dark .stat-detail,
:root:not(.theme-light) .stat-detail .parish-grid .pcell,
:root.theme-dark .stat-detail .parish-grid .pcell,
:root:not(.theme-light) .stat-tile,
:root.theme-dark .stat-tile,
:root:not(.theme-light) .status-pill.open,
:root.theme-dark .status-pill.open,
:root:not(.theme-light) .status-summary .ss-pill.charles,
:root.theme-dark .status-summary .ss-pill.charles,
:root:not(.theme-light) .status-summary .ss-pill.working,
:root.theme-dark .status-summary .ss-pill.working,
:root:not(.theme-light) .summary-card,
:root.theme-dark .summary-card,
:root:not(.theme-light) .surname-strip span.bold-konsen,
:root.theme-dark .surname-strip span.bold-konsen,
:root:not(.theme-light) .surname-trail-card,
:root.theme-dark .surname-trail-card,
:root:not(.theme-light) .tab-open-q,
:root.theme-dark .tab-open-q,
:root:not(.theme-light) .theme-dark .chron-key .kbox.cluster, :root:not(.theme-light) .chron-key .kbox.cluster,
:root.theme-dark .theme-dark .chron-key .kbox.cluster, :root:not(.theme-light) .chron-key .kbox.cluster,
:root:not(.theme-light) .toc,
:root.theme-dark .toc,
:root:not(.theme-light) .toolbar,
:root.theme-dark .toolbar,
:root:not(.theme-light) .toolbar .sep,
:root.theme-dark .toolbar .sep,
:root:not(.theme-light) .toolbar button,
:root.theme-dark .toolbar button,
:root:not(.theme-light) .tooltip,
:root.theme-dark .tooltip,
:root:not(.theme-light) .towns-legend,
:root.theme-dark .towns-legend,
:root:not(.theme-light) .towns-legend .swatch.reference,
:root.theme-dark .towns-legend .swatch.reference,
:root:not(.theme-light) .ts-event.elim,
:root.theme-dark .ts-event.elim,
:root:not(.theme-light) .ts-event.in,
:root.theme-dark .ts-event.in,
:root:not(.theme-light) .ts-event.piv,
:root.theme-dark .ts-event.piv,
:root:not(.theme-light) .verdict-disputed,
:root.theme-dark .verdict-disputed,
:root:not(.theme-light) .verdict-open,
:root.theme-dark .verdict-open,
:root:not(.theme-light) .verdict-table th,
:root.theme-dark .verdict-table th,
:root:not(.theme-light) .version-list a,
:root.theme-dark .version-list a,
:root:not(.theme-light) .whats-new,
:root.theme-dark .whats-new,
:root:not(.theme-light) .whats-new .label,
:root.theme-dark .whats-new .label {
  background: var(--bg-card, #24201a) !important;
  background-image: none !important;
  border-color: var(--border-medium, #6a5a40) !important;
  color: var(--text-body, #e8dfc8) !important;
}

:root:not(.theme-light) .ab-hero,
:root.theme-dark .ab-hero,
:root:not(.theme-light) .ab-hero h1, :root:not(.theme-light) header.ab-hero .sub,
:root.theme-dark .ab-hero h1, :root.theme-dark header.ab-hero .sub,
:root:not(.theme-light) .about-hero,
:root.theme-dark .about-hero,
:root:not(.theme-light) .about-hero h1, :root:not(.theme-light) header.about-hero .sub, :root:not(.theme-light) header.about-hero .crumbs a,
:root.theme-dark .about-hero h1, :root.theme-dark header.about-hero .sub, :root.theme-dark header.about-hero .crumbs a,
:root:not(.theme-light) .access-bar .label,
:root.theme-dark .access-bar .label,
:root:not(.theme-light) .actor-card .role,
:root.theme-dark .actor-card .role,
:root:not(.theme-light) .actor-card .what,
:root.theme-dark .actor-card .what,
:root:not(.theme-light) .actor-card .who,
:root.theme-dark .actor-card .who,
:root:not(.theme-light) .actor-card.agent .role,
:root.theme-dark .actor-card.agent .role,
:root:not(.theme-light) .actor-card.civilian,
:root.theme-dark .actor-card.civilian,
:root:not(.theme-light) .actor-card.civilian .role,
:root.theme-dark .actor-card.civilian .role,
:root:not(.theme-light) .affidavit .cite,
:root.theme-dark .affidavit .cite,
:root:not(.theme-light) .answer-source-tile .resolves,
:root.theme-dark .answer-source-tile .resolves,
:root:not(.theme-light) .bb-hero,
:root.theme-dark .bb-hero,
:root:not(.theme-light) .bb-hero h1, :root:not(.theme-light) header.bb-hero .sub, :root:not(.theme-light) header.bb-hero .crumbs, :root:not(.theme-light) header.bb-hero .crumbs a,
:root.theme-dark .bb-hero h1, :root.theme-dark header.bb-hero .sub, :root.theme-dark header.bb-hero .crumbs, :root.theme-dark header.bb-hero .crumbs a,
:root:not(.theme-light) .brv-caption,
:root.theme-dark .brv-caption,
:root:not(.theme-light) .brv-controls .brv-label,
:root.theme-dark .brv-controls .brv-label,
:root:not(.theme-light) .brv-zoom-readout,
:root.theme-dark .brv-zoom-readout,
:root:not(.theme-light) .ca-tile-arrow,
:root.theme-dark .ca-tile-arrow,
:root:not(.theme-light) .ca-tile-eyebrow,
:root.theme-dark .ca-tile-eyebrow,
:root:not(.theme-light) .ca-tile-sub,
:root.theme-dark .ca-tile-sub,
:root:not(.theme-light) .ca-tile.keystone .ca-tile-arrow,
:root.theme-dark .ca-tile.keystone .ca-tile-arrow,
:root:not(.theme-light) .ca-tile.keystone .ca-tile-eyebrow,
:root.theme-dark .ca-tile.keystone .ca-tile-eyebrow,
:root:not(.theme-light) .ca-tile.keystone .ca-tile-icon,
:root.theme-dark .ca-tile.keystone .ca-tile-icon,
:root:not(.theme-light) .ca-tile.primary,
:root.theme-dark .ca-tile.primary,
:root:not(.theme-light) .ca-tile.profile .ca-tile-arrow,
:root.theme-dark .ca-tile.profile .ca-tile-arrow,
:root:not(.theme-light) .ca-tile.profile .ca-tile-eyebrow,
:root.theme-dark .ca-tile.profile .ca-tile-eyebrow,
:root:not(.theme-light) .ca-tile.theme .ca-tile-arrow,
:root.theme-dark .ca-tile.theme .ca-tile-arrow,
:root:not(.theme-light) .ca-tile.theme .ca-tile-eyebrow,
:root.theme-dark .ca-tile.theme .ca-tile-eyebrow,
:root:not(.theme-light) .callout.milestone,
:root.theme-dark .callout.milestone,
:root:not(.theme-light) .callout.milestone .lbl,
:root.theme-dark .callout.milestone .lbl,
:root:not(.theme-light) .card h3,
:root.theme-dark .card h3,
:root:not(.theme-light) .card h3, .card h4,
:root.theme-dark .card h3, .card h4,
:root:not(.theme-light) .card.accent h3,
:root.theme-dark .card.accent h3,
:root:not(.theme-light) .card.confirmed,
:root.theme-dark .card.confirmed,
:root:not(.theme-light) .card.evidence-card > summary > .ec-summary-content > .ec-tagline,
:root.theme-dark .card.evidence-card > summary > .ec-summary-content > .ec-tagline,
:root:not(.theme-light) .cast-hero,
:root.theme-dark .cast-hero,
:root:not(.theme-light) .cast-hero h1, :root:not(.theme-light) header.cast-hero .sub, :root:not(.theme-light) header.cast-hero .crumbs, :root:not(.theme-light) header.cast-hero .crumbs a,
:root.theme-dark .cast-hero h1, :root.theme-dark header.cast-hero .sub, :root.theme-dark header.cast-hero .crumbs, :root.theme-dark header.cast-hero .crumbs a,
:root:not(.theme-light) .child-card h4 a,
:root.theme-dark .child-card h4 a,
:root:not(.theme-light) .child-card p.cta,
:root.theme-dark .child-card p.cta,
:root:not(.theme-light) .child-card p.small,
:root.theme-dark .child-card p.small,
:root:not(.theme-light) .child-card p.small a,
:root.theme-dark .child-card p.small a,
:root:not(.theme-light) .child-card p.small a.fsn,
:root.theme-dark .child-card p.small a.fsn,
:root:not(.theme-light) .cl-hero,
:root.theme-dark .cl-hero,
:root:not(.theme-light) .cl-hero h1, :root:not(.theme-light) header.cl-hero .sub, :root:not(.theme-light) header.cl-hero .crumbs, :root:not(.theme-light) header.cl-hero .crumbs a,
:root.theme-dark .cl-hero h1, :root.theme-dark header.cl-hero .sub, :root.theme-dark header.cl-hero .crumbs, :root.theme-dark header.cl-hero .crumbs a,
:root:not(.theme-light) .cl-pill,
:root.theme-dark .cl-pill,
:root:not(.theme-light) .collapse > summary,
:root.theme-dark .collapse > summary,
:root:not(.theme-light) .conf-key .conf-key-label,
:root.theme-dark .conf-key .conf-key-label,
:root:not(.theme-light) .conf-key span.conf-desc,
:root.theme-dark .conf-key span.conf-desc,
:root:not(.theme-light) .cross-label,
:root.theme-dark .cross-label,
:root:not(.theme-light) .cw-map-legend .legend-label,
:root.theme-dark .cw-map-legend .legend-label,
:root:not(.theme-light) .cw-map-legend .legend-label .small,
:root.theme-dark .cw-map-legend .legend-label .small,
:root:not(.theme-light) .cw-tile-arrow,
:root.theme-dark .cw-tile-arrow,
:root:not(.theme-light) .cw-tile-eyebrow,
:root.theme-dark .cw-tile-eyebrow,
:root:not(.theme-light) .cw-tile-sub,
:root.theme-dark .cw-tile-sub,
:root:not(.theme-light) .cw-tile.keystone .cw-tile-eyebrow,
:root.theme-dark .cw-tile.keystone .cw-tile-eyebrow,
:root:not(.theme-light) .cw-tile.keystone .cw-tile-icon,
:root.theme-dark .cw-tile.keystone .cw-tile-icon,
:root:not(.theme-light) .cw-tile.mystery .cw-tile-eyebrow,
:root.theme-dark .cw-tile.mystery .cw-tile-eyebrow,
:root:not(.theme-light) .cw-tile.primary,
:root.theme-dark .cw-tile.primary,
:root:not(.theme-light) .cw-tile.profile .cw-tile-arrow,
:root.theme-dark .cw-tile.profile .cw-tile-arrow,
:root:not(.theme-light) .cw-tile.profile .cw-tile-eyebrow,
:root.theme-dark .cw-tile.profile .cw-tile-eyebrow,
:root:not(.theme-light) .cw-tile.theme .cw-tile-eyebrow,
:root.theme-dark .cw-tile.theme .cw-tile-eyebrow,
:root:not(.theme-light) .desc,
:root.theme-dark .desc,
:root:not(.theme-light) .doc-card .doc-desc,
:root.theme-dark .doc-card .doc-desc,
:root:not(.theme-light) .doc-card .doc-title,
:root.theme-dark .doc-card .doc-title,
:root:not(.theme-light) .doc-card .doc-title a,
:root.theme-dark .doc-card .doc-title a,
:root:not(.theme-light) .doc-card .doc-type,
:root.theme-dark .doc-card .doc-type,
:root:not(.theme-light) .doc-card.message,
:root.theme-dark .doc-card.message,
:root:not(.theme-light) .doc-card.session,
:root.theme-dark .doc-card.session,
:root:not(.theme-light) .doc-card.synthesis,
:root.theme-dark .doc-card.synthesis,
:root:not(.theme-light) .doc-table .doc-key,
:root.theme-dark .doc-table .doc-key,
:root:not(.theme-light) .ec-tells .ec-tells-label,
:root.theme-dark .ec-tells .ec-tells-label,
:root:not(.theme-light) .eliminated-table td .verdict,
:root.theme-dark .eliminated-table td .verdict,
:root:not(.theme-light) .entry .links,
:root.theme-dark .entry .links,
:root:not(.theme-light) .entry .what,
:root.theme-dark .entry .what,
:root:not(.theme-light) .entry .when,
:root.theme-dark .entry .when,
:root:not(.theme-light) .entry.cleanup,
:root.theme-dark .entry.cleanup,
:root:not(.theme-light) .entry.cleanup .when,
:root.theme-dark .entry.cleanup .when,
:root:not(.theme-light) .entry.research,
:root.theme-dark .entry.research,
:root:not(.theme-light) .entry.research .when,
:root.theme-dark .entry.research .when,
:root:not(.theme-light) .entry.structural,
:root.theme-dark .entry.structural,
:root:not(.theme-light) .entry.structural .when,
:root.theme-dark .entry.structural .when,
:root:not(.theme-light) .er-block.after,
:root.theme-dark .er-block.after,
:root:not(.theme-light) .er-block.after  .lbl,
:root.theme-dark .er-block.after  .lbl,
:root:not(.theme-light) .er-block.before,
:root.theme-dark .er-block.before,
:root:not(.theme-light) .er-block.before .lbl,
:root.theme-dark .er-block.before .lbl,
:root:not(.theme-light) .er-hero,
:root.theme-dark .er-hero,
:root:not(.theme-light) .er-hero h1, :root:not(.theme-light) header.er-hero .sub, :root:not(.theme-light) header.er-hero .crumbs,
:root.theme-dark .er-hero h1, :root.theme-dark header.er-hero .sub, :root.theme-dark header.er-hero .crumbs,
:root:not(.theme-light) .evidence-row .ev-thumb .cap,
:root.theme-dark .evidence-row .ev-thumb .cap,
:root:not(.theme-light) .fam,
:root.theme-dark .fam,
:root:not(.theme-light) .family-file .ff-section h5,
:root.theme-dark .family-file .ff-section h5,
:root:not(.theme-light) .family-file .meta,
:root.theme-dark .family-file .meta,
:root:not(.theme-light) .family-file .verdict,
:root.theme-dark .family-file .verdict,
:root:not(.theme-light) .family-file h4 a.fam-link,
:root.theme-dark .family-file h4 a.fam-link,
:root:not(.theme-light) .family-file.eliminated,
:root.theme-dark .family-file.eliminated,
:root:not(.theme-light) .family-file.eliminated .verdict,
:root.theme-dark .family-file.eliminated .verdict,
:root:not(.theme-light) .family-tree .ft-bd, .family-tree .ft-dd,
:root.theme-dark .family-tree .ft-bd, .family-tree .ft-dd,
:root:not(.theme-light) .family-tree .ft-dates,
:root.theme-dark .family-tree .ft-dates,
:root:not(.theme-light) .family-tree .ft-detail,
:root.theme-dark .family-tree .ft-detail,
:root:not(.theme-light) .family-tree .ft-name,
:root.theme-dark .family-tree .ft-name,
:root:not(.theme-light) .family-tree .ft-pid,
:root.theme-dark .family-tree .ft-pid,
:root:not(.theme-light) .faq-hero,
:root.theme-dark .faq-hero,
:root:not(.theme-light) .faq-hero h1, :root:not(.theme-light) header.faq-hero .sub, :root:not(.theme-light) header.faq-hero .crumbs, :root:not(.theme-light) header.faq-hero .crumbs a,
:root.theme-dark .faq-hero h1, :root.theme-dark header.faq-hero .sub, :root.theme-dark header.faq-hero .crumbs, :root.theme-dark header.faq-hero .crumbs a,
:root:not(.theme-light) .ff-related a,
:root.theme-dark .ff-related a,
:root:not(.theme-light) .ff-related h6,
:root.theme-dark .ff-related h6,
:root:not(.theme-light) .filter-row strong,
:root.theme-dark .filter-row strong,
:root:not(.theme-light) .fn a,
:root.theme-dark .fn a,
:root:not(.theme-light) .friedrich-callout h2,
:root.theme-dark .friedrich-callout h2,
:root:not(.theme-light) .fsn,
:root.theme-dark .fsn,
:root:not(.theme-light) .ft-couple-card a.ft-person,
:root.theme-dark .ft-couple-card a.ft-person,
:root:not(.theme-light) .ft-couple-card a.ft-person.ft-female .ft-pid,
:root.theme-dark .ft-couple-card a.ft-person.ft-female .ft-pid,
:root:not(.theme-light) .ft-gen-label,
:root.theme-dark .ft-gen-label,
:root:not(.theme-light) .ft-person-card.ft-female .ft-pid,
:root.theme-dark .ft-person-card.ft-female .ft-pid,
:root:not(.theme-light) .ge-contribute a,
:root.theme-dark .ge-contribute a,
:root:not(.theme-light) .ge-contribute strong,
:root.theme-dark .ge-contribute strong,
:root:not(.theme-light) .ge-explore-section .group-label,
:root.theme-dark .ge-explore-section .group-label,
:root:not(.theme-light) .ge-img-gallery figure figcaption,
:root.theme-dark .ge-img-gallery figure figcaption,
:root:not(.theme-light) .ge-img-gallery figure figcaption .credit,
:root.theme-dark .ge-img-gallery figure figcaption .credit,
:root:not(.theme-light) .ge-img-gallery figure figcaption details summary,
:root.theme-dark .ge-img-gallery figure figcaption details summary,
:root:not(.theme-light) .ge-img-gallery figure figcaption strong,
:root.theme-dark .ge-img-gallery figure figcaption strong,
:root:not(.theme-light) .ge-map-legend .legend-label,
:root.theme-dark .ge-map-legend .legend-label,
:root:not(.theme-light) .ge-map-legend .legend-label .small,
:root.theme-dark .ge-map-legend .legend-label .small,
:root:not(.theme-light) .ge-map-legend .legend-line.route,
:root.theme-dark .ge-map-legend .legend-line.route,
:root:not(.theme-light) .ge-surname-card h4,
:root.theme-dark .ge-surname-card h4,
:root:not(.theme-light) .ge-surname-card p,
:root.theme-dark .ge-surname-card p,
:root:not(.theme-light) .ge-surname-card.status h4,
:root.theme-dark .ge-surname-card.status h4,
:root:not(.theme-light) .ge-surname-table .meta,
:root.theme-dark .ge-surname-table .meta,
:root:not(.theme-light) .ge-surname-table .star,
:root.theme-dark .ge-surname-table .star,
:root:not(.theme-light) .ge-surname-table tfoot td,
:root.theme-dark .ge-surname-table tfoot td,
:root:not(.theme-light) .ge-surname-table th, .ge-surname-table td,
:root.theme-dark .ge-surname-table th, .ge-surname-table td,
:root:not(.theme-light) .ge-surname-table tr.self td:first-child,
:root.theme-dark .ge-surname-table tr.self td:first-child,
:root:not(.theme-light) .ge-tile-arrow,
:root.theme-dark .ge-tile-arrow,
:root:not(.theme-light) .ge-tile-eyebrow,
:root.theme-dark .ge-tile-eyebrow,
:root:not(.theme-light) .ge-tile-sub,
:root.theme-dark .ge-tile-sub,
:root:not(.theme-light) .ge-tile.cross .ge-tile-arrow,
:root.theme-dark .ge-tile.cross .ge-tile-arrow,
:root:not(.theme-light) .ge-tile.cross .ge-tile-eyebrow,
:root.theme-dark .ge-tile.cross .ge-tile-eyebrow,
:root:not(.theme-light) .ge-tile.primary,
:root.theme-dark .ge-tile.primary,
:root:not(.theme-light) .ge-timeline-mobile ol li,
:root.theme-dark .ge-timeline-mobile ol li,
:root:not(.theme-light) .ge-timeline-mobile ol li .age,
:root.theme-dark .ge-timeline-mobile ol li .age,
:root:not(.theme-light) .ge-timeline-mobile ol li .yr,
:root.theme-dark .ge-timeline-mobile ol li .yr,
:root:not(.theme-light) .ge-timeline-mobile ol li.pivot .yr,
:root.theme-dark .ge-timeline-mobile ol li.pivot .yr,
:root:not(.theme-light) .ge-timeline-prose .body,
:root.theme-dark .ge-timeline-prose .body,
:root:not(.theme-light) .ge-timeline-prose summary,
:root.theme-dark .ge-timeline-prose summary,
:root:not(.theme-light) .ge-town-mini .name,
:root.theme-dark .ge-town-mini .name,
:root:not(.theme-light) .ge-town-mini .role,
:root.theme-dark .ge-town-mini .role,
:root:not(.theme-light) .ge-town-mini.origin .role,
:root.theme-dark .ge-town-mini.origin .role,
:root:not(.theme-light) .ge-town-mini.pending,
:root.theme-dark .ge-town-mini.pending,
:root:not(.theme-light) .ge-town-mini.pending .role,
:root.theme-dark .ge-town-mini.pending .role,
:root:not(.theme-light) .ge-town-mini.regional,
:root.theme-dark .ge-town-mini.regional,
:root:not(.theme-light) .ge-town-mini.regional .role,
:root.theme-dark .ge-town-mini.regional .role,
:root:not(.theme-light) .ge-visit-card a,
:root.theme-dark .ge-visit-card a,
:root:not(.theme-light) .ge-visit-card h3,
:root.theme-dark .ge-visit-card h3,
:root:not(.theme-light) .ge-visit-card h4,
:root.theme-dark .ge-visit-card h4,
:root:not(.theme-light) .ge-visit-card p,
:root.theme-dark .ge-visit-card p,
:root:not(.theme-light) .gl-hero,
:root.theme-dark .gl-hero,
:root:not(.theme-light) .gl-hero h1, :root:not(.theme-light) header.gl-hero .sub, :root:not(.theme-light) header.gl-hero .crumbs, :root:not(.theme-light) header.gl-hero .crumbs a,
:root.theme-dark .gl-hero h1, :root.theme-dark header.gl-hero .sub, :root.theme-dark header.gl-hero .crumbs, :root.theme-dark header.gl-hero .crumbs a,
:root:not(.theme-light) .hesse-timeline .ht-flag .ht-flag-cap,
:root.theme-dark .hesse-timeline .ht-flag .ht-flag-cap,
:root:not(.theme-light) .hesse-timeline .ht-when,
:root.theme-dark .hesse-timeline .ht-when,
:root:not(.theme-light) .hk-hero,
:root.theme-dark .hk-hero,
:root:not(.theme-light) .hk-hero h1, :root:not(.theme-light) header.hk-hero .sub, :root:not(.theme-light) header.hk-hero .crumbs, :root:not(.theme-light) header.hk-hero .crumbs a,
:root.theme-dark .hk-hero h1, :root.theme-dark header.hk-hero .sub, :root.theme-dark header.hk-hero .crumbs, :root.theme-dark header.hk-hero .crumbs a,
:root:not(.theme-light) .ht-body h4,
:root.theme-dark .ht-body h4,
:root:not(.theme-light) .ht-flag-cap,
:root.theme-dark .ht-flag-cap,
:root:not(.theme-light) .ht-links,
:root.theme-dark .ht-links,
:root:not(.theme-light) .ht-map-cap,
:root.theme-dark .ht-map-cap,
:root:not(.theme-light) .ht-map-cap a,
:root.theme-dark .ht-map-cap a,
:root:not(.theme-light) .ht-map-title,
:root.theme-dark .ht-map-title,
:root:not(.theme-light) .ht-when,
:root.theme-dark .ht-when,
:root:not(.theme-light) .hyp-label,
:root.theme-dark .hyp-label,
:root:not(.theme-light) .hypothesis-card .h-section.against .label,
:root.theme-dark .hypothesis-card .h-section.against .label,
:root:not(.theme-light) .hypothesis-card .h-section.confirm .label,
:root.theme-dark .hypothesis-card .h-section.confirm .label,
:root:not(.theme-light) .hypothesis-card .h-section.for .label,
:root.theme-dark .hypothesis-card .h-section.for .label,
:root:not(.theme-light) .im-cost-bar-segment,
:root.theme-dark .im-cost-bar-segment,
:root:not(.theme-light) .im-resolution-row.likely   .im-resolution-prob,
:root.theme-dark .im-resolution-row.likely   .im-resolution-prob,
:root:not(.theme-light) .im-resolution-row.unlikely .im-resolution-prob,
:root.theme-dark .im-resolution-row.unlikely .im-resolution-prob,
:root:not(.theme-light) .im-tile-arrow,
:root.theme-dark .im-tile-arrow,
:root:not(.theme-light) .im-tile-eyebrow,
:root.theme-dark .im-tile-eyebrow,
:root:not(.theme-light) .im-tile-sub,
:root.theme-dark .im-tile-sub,
:root:not(.theme-light) .im-tile.cross .im-tile-arrow,
:root.theme-dark .im-tile.cross .im-tile-arrow,
:root:not(.theme-light) .im-tile.cross .im-tile-eyebrow,
:root.theme-dark .im-tile.cross .im-tile-eyebrow,
:root:not(.theme-light) .im-tile.primary,
:root.theme-dark .im-tile.primary,
:root:not(.theme-light) .im-time-bar-segment,
:root.theme-dark .im-time-bar-segment,
:root:not(.theme-light) .img-gallery figure figcaption,
:root.theme-dark .img-gallery figure figcaption,
:root:not(.theme-light) .img-gallery figure figcaption .credit,
:root.theme-dark .img-gallery figure figcaption .credit,
:root:not(.theme-light) .img-gallery figure figcaption strong,
:root.theme-dark .img-gallery figure figcaption strong,
:root:not(.theme-light) .index-controls label,
:root.theme-dark .index-controls label,
:root:not(.theme-light) .konsen-feature h3,
:root.theme-dark .konsen-feature h3,
:root:not(.theme-light) .konsen-feature p,
:root.theme-dark .konsen-feature p,
:root:not(.theme-light) .konsen-feature strong,
:root.theme-dark .konsen-feature strong,
:root:not(.theme-light) .kv td a,
:root.theme-dark .kv td a,
:root:not(.theme-light) .kv td:first-child,
:root.theme-dark .kv td:first-child,
:root:not(.theme-light) .leaflet-popup-content,
:root.theme-dark .leaflet-popup-content,
:root:not(.theme-light) .leaflet-popup-content .body,
:root.theme-dark .leaflet-popup-content .body,
:root:not(.theme-light) .leaflet-popup-content .openmap,
:root.theme-dark .leaflet-popup-content .openmap,
:root:not(.theme-light) .leaflet-popup-content .yr,
:root.theme-dark .leaflet-popup-content .yr,
:root:not(.theme-light) .leaflet-popup-content a,
:root.theme-dark .leaflet-popup-content a,
:root:not(.theme-light) .leaflet-popup-content a.detail,
:root.theme-dark .leaflet-popup-content a.detail,
:root:not(.theme-light) .leaflet-popup-content a.openmap,
:root.theme-dark .leaflet-popup-content a.openmap,
:root:not(.theme-light) .leaflet-popup-content h4,
:root.theme-dark .leaflet-popup-content h4,
:root:not(.theme-light) .legend strong,
:root.theme-dark .legend strong,
:root:not(.theme-light) .legend-item,
:root.theme-dark .legend-item,
:root:not(.theme-light) .log-entry .date,
:root.theme-dark .log-entry .date,
:root:not(.theme-light) .log-entry .verdict,
:root.theme-dark .log-entry .verdict,
:root:not(.theme-light) .log-entry > h3,
:root.theme-dark .log-entry > h3,
:root:not(.theme-light) .map-legend .legend-label,
:root.theme-dark .map-legend .legend-label,
:root:not(.theme-light) .map-legend .legend-label .small,
:root.theme-dark .map-legend .legend-label .small,
:root:not(.theme-light) .map-legend h3,
:root.theme-dark .map-legend h3,
:root:not(.theme-light) .marriage-block .marr-label,
:root.theme-dark .marriage-block .marr-label,
:root:not(.theme-light) .marriage-block.second .marr-label,
:root.theme-dark .marriage-block.second .marr-label,
:root:not(.theme-light) .meta,
:root.theme-dark .meta,
:root:not(.theme-light) .meta-band,
:root.theme-dark .meta-band,
:root:not(.theme-light) .meta-band .mb-key, .meta-band .mb-val,
:root.theme-dark .meta-band .mb-key, .meta-band .mb-val,
:root:not(.theme-light) .method-hero,
:root.theme-dark .method-hero,
:root:not(.theme-light) .method-hero h1, :root:not(.theme-light) header.method-hero .sub,
:root.theme-dark .method-hero h1, :root.theme-dark header.method-hero .sub,
:root:not(.theme-light) .mo-img-gallery figure figcaption,
:root.theme-dark .mo-img-gallery figure figcaption,
:root:not(.theme-light) .mo-img-gallery figure figcaption .credit,
:root.theme-dark .mo-img-gallery figure figcaption .credit,
:root:not(.theme-light) .mo-img-gallery figure figcaption strong,
:root.theme-dark .mo-img-gallery figure figcaption strong,
:root:not(.theme-light) .month-section h2,
:root.theme-dark .month-section h2,
:root:not(.theme-light) .muster .cite,
:root.theme-dark .muster .cite,
:root:not(.theme-light) .muted-meta,
:root.theme-dark .muted-meta,
:root:not(.theme-light) .narrative-card.contested  .nc-eyebrow,
:root.theme-dark .narrative-card.contested  .nc-eyebrow,
:root:not(.theme-light) .narrative-card.documented .nc-eyebrow,
:root.theme-dark .narrative-card.documented .nc-eyebrow,
:root:not(.theme-light) .nr-hero,
:root.theme-dark .nr-hero,
:root:not(.theme-light) .nr-hero h1, :root:not(.theme-light) header.nr-hero .sub,
:root.theme-dark .nr-hero h1, :root.theme-dark header.nr-hero .sub,
:root:not(.theme-light) .num,
:root.theme-dark .num,
:root:not(.theme-light) .open-lead .ol-action strong,
:root.theme-dark .open-lead .ol-action strong,
:root:not(.theme-light) .open-lead .ol-rank,
:root.theme-dark .open-lead .ol-rank,
:root:not(.theme-light) .oq-hero,
:root.theme-dark .oq-hero,
:root:not(.theme-light) .oq-hero h1, :root:not(.theme-light) header.oq-hero .sub, :root:not(.theme-light) header.oq-hero .crumbs, :root:not(.theme-light) header.oq-hero .crumbs a,
:root.theme-dark .oq-hero h1, :root.theme-dark header.oq-hero .sub, :root.theme-dark header.oq-hero .crumbs, :root.theme-dark header.oq-hero .crumbs a,
:root:not(.theme-light) .oq-pill,
:root.theme-dark .oq-pill,
:root:not(.theme-light) .page > .lede,
:root.theme-dark .page > .lede,
:root:not(.theme-light) .page > h2,
:root.theme-dark .page > h2,
:root:not(.theme-light) .page-card .img-col figcaption,
:root.theme-dark .page-card .img-col figcaption,
:root:not(.theme-light) .page-card .text-col .note,
:root.theme-dark .page-card .text-col .note,
:root:not(.theme-light) .page-card .text-col .ptype,
:root.theme-dark .page-card .text-col .ptype,
:root:not(.theme-light) .page-card .text-col dl dd,
:root.theme-dark .page-card .text-col dl dd,
:root:not(.theme-light) .page-card .text-col dl dt,
:root.theme-dark .page-card .text-col dl dt,
:root:not(.theme-light) .page-card .text-col h4,
:root.theme-dark .page-card .text-col h4,
:root:not(.theme-light) .page-toc .toc-label,
:root.theme-dark .page-toc .toc-label,
:root:not(.theme-light) .page-toc a,
:root.theme-dark .page-toc a,
:root:not(.theme-light) .pathway.archive,
:root.theme-dark .pathway.archive,
:root:not(.theme-light) .pathway.descendant,
:root.theme-dark .pathway.descendant,
:root:not(.theme-light) .pathway.researcher,
:root.theme-dark .pathway.researcher,
:root:not(.theme-light) .person-box-html .dates,
:root.theme-dark .person-box-html .dates,
:root:not(.theme-light) .person-box-html .name,
:root.theme-dark .person-box-html .name,
:root:not(.theme-light) .person-box-html .role,
:root.theme-dark .person-box-html .role,
:root:not(.theme-light) .person-card .meta,
:root.theme-dark .person-card .meta,
:root:not(.theme-light) .person-card .role,
:root.theme-dark .person-card .role,
:root:not(.theme-light) .person-card .role.battery,
:root.theme-dark .person-card .role.battery,
:root:not(.theme-light) .person-card .role.family,
:root.theme-dark .person-card .role.family,
:root:not(.theme-light) .person-card .role.open-id,
:root.theme-dark .person-card .role.open-id,
:root:not(.theme-light) .person-card .summary,
:root.theme-dark .person-card .summary,
:root:not(.theme-light) .person-card h3,
:root.theme-dark .person-card h3,
:root:not(.theme-light) .person-card.battery,
:root.theme-dark .person-card.battery,
:root:not(.theme-light) .person-card.family,
:root.theme-dark .person-card.family,
:root:not(.theme-light) .person-card.open-id,
:root.theme-dark .person-card.open-id,
:root:not(.theme-light) .person-list li .desc,
:root.theme-dark .person-list li .desc,
:root:not(.theme-light) .person-list li .desc a,
:root.theme-dark .person-list li .desc a,
:root:not(.theme-light) .person-list li .name,
:root.theme-dark .person-list li .name,
:root:not(.theme-light) .person-section > .section-blurb,
:root.theme-dark .person-section > .section-blurb,
:root:not(.theme-light) .person-section > h2,
:root.theme-dark .person-section > h2,
:root:not(.theme-light) .phonetic-cluster .speaker-yes,
:root.theme-dark .phonetic-cluster .speaker-yes,
:root:not(.theme-light) .pill,
:root.theme-dark .pill,
:root:not(.theme-light) .pill, .ss-pill,
:root.theme-dark .pill, .ss-pill,
:root:not(.theme-light) .pm-hero,
:root.theme-dark .pm-hero,
:root:not(.theme-light) .pm-hero h1, :root:not(.theme-light) header.pm-hero .sub, :root:not(.theme-light) header.pm-hero .crumbs, :root:not(.theme-light) header.pm-hero .crumbs a,
:root.theme-dark .pm-hero h1, :root.theme-dark header.pm-hero .sub, :root.theme-dark header.pm-hero .crumbs, :root.theme-dark header.pm-hero .crumbs a,
:root:not(.theme-light) .pull strong,
:root.theme-dark .pull strong,
:root:not(.theme-light) .research-log .log-meta,
:root.theme-dark .research-log .log-meta,
:root:not(.theme-light) .research-log > h2,
:root.theme-dark .research-log > h2,
:root:not(.theme-light) .rl-card h5,
:root.theme-dark .rl-card h5,
:root:not(.theme-light) .rl-card.confirmed,
:root.theme-dark .rl-card.confirmed,
:root:not(.theme-light) .rl-card.eliminated,
:root.theme-dark .rl-card.eliminated,
:root:not(.theme-light) .rl-found-box h3,
:root.theme-dark .rl-found-box h3,
:root:not(.theme-light) .rl-found-box table td:first-child,
:root.theme-dark .rl-found-box table td:first-child,
:root:not(.theme-light) .rl-next h2,
:root.theme-dark .rl-next h2,
:root:not(.theme-light) .rl-passes h3,
:root.theme-dark .rl-passes h3,
:root:not(.theme-light) .rl-round .finding strong,
:root.theme-dark .rl-round .finding strong,
:root:not(.theme-light) .rl-round .null strong,
:root.theme-dark .rl-round .null strong,
:root:not(.theme-light) .rl-round h3,
:root.theme-dark .rl-round h3,
:root:not(.theme-light) .rl-round h3 .when,
:root.theme-dark .rl-round h3 .when,
:root:not(.theme-light) .rl-section h2,
:root.theme-dark .rl-section h2,
:root:not(.theme-light) .rl-section h3,
:root.theme-dark .rl-section h3,
:root:not(.theme-light) .rl-star,
:root.theme-dark .rl-star,
:root:not(.theme-light) .rl-status h3,
:root.theme-dark .rl-status h3,
:root:not(.theme-light) .rl-tells h2,
:root.theme-dark .rl-tells h2,
:root:not(.theme-light) .row.eliminated,
:root.theme-dark .row.eliminated,
:root:not(.theme-light) .schrader-tile-blurb,
:root.theme-dark .schrader-tile-blurb,
:root:not(.theme-light) .schrader-tile-candidate-meta,
:root.theme-dark .schrader-tile-candidate-meta,
:root:not(.theme-light) .schrader-tile-eyebrow,
:root.theme-dark .schrader-tile-eyebrow,
:root:not(.theme-light) .schrader-tile-foot,
:root.theme-dark .schrader-tile-foot,
:root:not(.theme-light) .schrader-tile-num,
:root.theme-dark .schrader-tile-num,
:root:not(.theme-light) .schrader-tile-sub,
:root.theme-dark .schrader-tile-sub,
:root:not(.theme-light) .schrader-tile.active .schrader-tile-candidate,
:root.theme-dark .schrader-tile.active .schrader-tile-candidate,
:root:not(.theme-light) .schrader-tile.active .schrader-tile-foot,
:root.theme-dark .schrader-tile.active .schrader-tile-foot,
:root:not(.theme-light) .schrader-tile.active .schrader-tile-num,
:root.theme-dark .schrader-tile.active .schrader-tile-num,
:root:not(.theme-light) .schrader-tile.eliminated .schrader-tile-candidate,
:root.theme-dark .schrader-tile.eliminated .schrader-tile-candidate,
:root:not(.theme-light) .schrader-tile.eliminated .schrader-tile-foot,
:root.theme-dark .schrader-tile.eliminated .schrader-tile-foot,
:root:not(.theme-light) .schrader-tile.eliminated .schrader-tile-num,
:root.theme-dark .schrader-tile.eliminated .schrader-tile-num,
:root:not(.theme-light) .sec-hero,
:root.theme-dark .sec-hero,
:root:not(.theme-light) .sec-hero h1, :root:not(.theme-light) header.sec-hero .sub, :root:not(.theme-light) header.sec-hero .crumbs, :root:not(.theme-light) header.sec-hero .crumbs a,
:root.theme-dark .sec-hero h1, :root.theme-dark header.sec-hero .sub, :root.theme-dark header.sec-hero .crumbs, :root.theme-dark header.sec-hero .crumbs a,
:root:not(.theme-light) .seven-stats .stat-lbl,
:root.theme-dark .seven-stats .stat-lbl,
:root:not(.theme-light) .seven-stats .stat-num,
:root.theme-dark .seven-stats .stat-num,
:root:not(.theme-light) .site-footer .footer-meta,
:root.theme-dark .site-footer .footer-meta,
:root:not(.theme-light) .site-search-empty,
:root.theme-dark .site-search-empty,
:root:not(.theme-light) .site-search-input,
:root.theme-dark .site-search-input,
:root:not(.theme-light) .site-search-input::placeholder,
:root.theme-dark .site-search-input::placeholder,
:root:not(.theme-light) .site-search-result,
:root.theme-dark .site-search-result,
:root:not(.theme-light) .site-search-result .ssr-desc,
:root.theme-dark .site-search-result .ssr-desc,
:root:not(.theme-light) .site-search-result .ssr-title,
:root.theme-dark .site-search-result .ssr-title,
:root:not(.theme-light) .small,
:root.theme-dark .small,
:root:not(.theme-light) .small-link,
:root.theme-dark .small-link,
:root:not(.theme-light) .smoking-gun .sg-eyebrow,
:root.theme-dark .smoking-gun .sg-eyebrow,
:root:not(.theme-light) .smoking-gun .vowel-arrow,
:root.theme-dark .smoking-gun .vowel-arrow,
:root:not(.theme-light) .smoking-gun .vowel-pair .surname,
:root.theme-dark .smoking-gun .vowel-pair .surname,
:root:not(.theme-light) .smoking-gun .vowel-pair .year,
:root.theme-dark .smoking-gun .vowel-pair .year,
:root:not(.theme-light) .smoking-gun h3,
:root.theme-dark .smoking-gun h3,
:root:not(.theme-light) .source-links,
:root.theme-dark .source-links,
:root:not(.theme-light) .source-links strong,
:root.theme-dark .source-links strong,
:root:not(.theme-light) .source-row a,
:root.theme-dark .source-row a,
:root:not(.theme-light) .sr-hero,
:root.theme-dark .sr-hero,
:root:not(.theme-light) .sr-hero h1, :root:not(.theme-light) header.sr-hero .sub,
:root.theme-dark .sr-hero h1, :root.theme-dark header.sr-hero .sub,
:root:not(.theme-light) .sr-table .kin-aug,
:root.theme-dark .sr-table .kin-aug,
:root:not(.theme-light) .sr-table .kin-circ,
:root.theme-dark .sr-table .kin-circ,
:root:not(.theme-light) .sr-table .kin-none,
:root.theme-dark .sr-table .kin-none,
:root:not(.theme-light) .src-card .desc,
:root.theme-dark .src-card .desc,
:root:not(.theme-light) .src-card .doc-type,
:root.theme-dark .src-card .doc-type,
:root:not(.theme-light) .src-card h3,
:root.theme-dark .src-card h3,
:root:not(.theme-light) .st-hero,
:root.theme-dark .st-hero,
:root:not(.theme-light) .st-hero h1, :root:not(.theme-light) header.st-hero .sub, :root:not(.theme-light) header.st-hero .crumbs, :root:not(.theme-light) header.st-hero .crumbs a,
:root.theme-dark .st-hero h1, :root.theme-dark header.st-hero .sub, :root.theme-dark header.st-hero .crumbs, :root.theme-dark header.st-hero .crumbs a,
:root:not(.theme-light) .stat .lab,
:root.theme-dark .stat .lab,
:root:not(.theme-light) .stat .num,
:root.theme-dark .stat .num,
:root:not(.theme-light) .stat-detail .archion-breadcrumb,
:root.theme-dark .stat-detail .archion-breadcrumb,
:root:not(.theme-light) .stat-detail .parish-grid .pcell .src,
:root.theme-dark .stat-detail .parish-grid .pcell .src,
:root:not(.theme-light) .stat-detail .parish-grid .pcell .src.archion-nav,
:root.theme-dark .stat-detail .parish-grid .pcell .src.archion-nav,
:root:not(.theme-light) .stat-detail .parish-grid .pcell .src.archion-nav em,
:root.theme-dark .stat-detail .parish-grid .pcell .src.archion-nav em,
:root:not(.theme-light) .stat-detail .parish-grid .pcell .src.archion-nav strong,
:root.theme-dark .stat-detail .parish-grid .pcell .src.archion-nav strong,
:root:not(.theme-light) .stat-detail .parish-grid .pcell strong,
:root.theme-dark .stat-detail .parish-grid .pcell strong,
:root:not(.theme-light) .stat-detail h4,
:root.theme-dark .stat-detail h4,
:root:not(.theme-light) .stat-detail h5,
:root.theme-dark .stat-detail h5,
:root:not(.theme-light) .stat-tile .lab,
:root.theme-dark .stat-tile .lab,
:root:not(.theme-light) .stat-tile .num,
:root.theme-dark .stat-tile .num,
:root:not(.theme-light) .status-pill,
:root.theme-dark .status-pill,
:root:not(.theme-light) .status-section-h.priority,
:root.theme-dark .status-section-h.priority,
:root:not(.theme-light) .status.contested,
:root.theme-dark .status.contested,
:root:not(.theme-light) .status.documented,
:root.theme-dark .status.documented,
:root:not(.theme-light) .status.eliminated,
:root.theme-dark .status.eliminated,
:root:not(.theme-light) .status.open,
:root.theme-dark .status.open,
:root:not(.theme-light) .status.reference,
:root.theme-dark .status.reference,
:root:not(.theme-light) .stl-hero,
:root.theme-dark .stl-hero,
:root:not(.theme-light) .stl-hero h1, :root:not(.theme-light) header.stl-hero .sub, :root:not(.theme-light) header.stl-hero .crumbs, :root:not(.theme-light) header.stl-hero .crumbs a,
:root.theme-dark .stl-hero h1, :root.theme-dark header.stl-hero .sub, :root.theme-dark header.stl-hero .crumbs, :root.theme-dark header.stl-hero .crumbs a,
:root:not(.theme-light) .subtitle,
:root.theme-dark .subtitle,
:root:not(.theme-light) .surname-chronology .speaker-flag,
:root.theme-dark .surname-chronology .speaker-flag,
:root:not(.theme-light) .surname-chronology td.surname.cluster,
:root.theme-dark .surname-chronology td.surname.cluster,
:root:not(.theme-light) .surname-pill.surname-pill--highlight,
:root.theme-dark .surname-pill.surname-pill--highlight,
:root:not(.theme-light) .surname-trail-card h3,
:root.theme-dark .surname-trail-card h3,
:root:not(.theme-light) .surname-trail-card p,
:root.theme-dark .surname-trail-card p,
:root:not(.theme-light) .tab-cross-ref,
:root.theme-dark .tab-cross-ref,
:root:not(.theme-light) .tab-meta,
:root.theme-dark .tab-meta,
:root:not(.theme-light) .tab-meta time,
:root.theme-dark .tab-meta time,
:root:not(.theme-light) .tab-open-q a,
:root.theme-dark .tab-open-q a,
:root:not(.theme-light) .tab-open-q h4,
:root.theme-dark .tab-open-q h4,
:root:not(.theme-light) .tab-open-q li,
:root.theme-dark .tab-open-q li,
:root:not(.theme-light) .text-confirmed,
:root.theme-dark .text-confirmed,
:root:not(.theme-light) .text-eliminated,
:root.theme-dark .text-eliminated,
:root:not(.theme-light) .text-soft,
:root.theme-dark .text-soft,
:root:not(.theme-light) .theme-dark .filter-chip.active,
  :root:not(.theme-light) .filter-chip.active,
:root.theme-dark .theme-dark .filter-chip.active,
  :root:not(.theme-light) .filter-chip.active,
:root:not(.theme-light) .theme-dark .status-section-h.priority,
:root.theme-dark .theme-dark .status-section-h.priority,
:root:not(.theme-light) .timeline .event .when,
:root.theme-dark .timeline .event .when,
:root:not(.theme-light) .timeline-row .when,
:root.theme-dark .timeline-row .when,
:root:not(.theme-light) .tl-event .src,
:root.theme-dark .tl-event .src,
:root:not(.theme-light) .tl-event .what,
:root.theme-dark .tl-event .what,
:root:not(.theme-light) .tl-event .when,
:root.theme-dark .tl-event .when,
:root:not(.theme-light) .toc h3,
:root.theme-dark .toc h3,
:root:not(.theme-light) .tooltip .td,
:root.theme-dark .tooltip .td,
:root:not(.theme-light) .tooltip .ti,
:root.theme-dark .tooltip .ti,
:root:not(.theme-light) .town-count-chip.documented,
:root.theme-dark .town-count-chip.documented,
:root:not(.theme-light) .town-count-chip.eliminated,
:root.theme-dark .town-count-chip.eliminated,
:root:not(.theme-light) .town-count-chip.open,
:root.theme-dark .town-count-chip.open,
:root:not(.theme-light) .towns-legend .legend-label,
:root.theme-dark .towns-legend .legend-label,
:root:not(.theme-light) .tr-hero,
:root.theme-dark .tr-hero,
:root:not(.theme-light) .tr-hero h1, :root:not(.theme-light) header.tr-hero .sub, :root:not(.theme-light) header.tr-hero .crumbs, :root:not(.theme-light) header.tr-hero .crumbs a,
:root.theme-dark .tr-hero h1, :root.theme-dark header.tr-hero .sub, :root.theme-dark header.tr-hero .crumbs, :root.theme-dark header.tr-hero .crumbs a,
:root:not(.theme-light) .tree .sib a,
:root.theme-dark .tree .sib a,
:root:not(.theme-light) .tree-note,
:root.theme-dark .tree-note,
:root:not(.theme-light) .twocol > div h3,
:root.theme-dark .twocol > div h3,
:root:not(.theme-light) .union-flag,
:root.theme-dark .union-flag,
:root:not(.theme-light) .vz-hero,
:root.theme-dark .vz-hero,
:root:not(.theme-light) .vz-hero h1, :root:not(.theme-light) header.vz-hero .sub, :root:not(.theme-light) header.vz-hero .crumbs, :root:not(.theme-light) header.vz-hero .crumbs a,
:root.theme-dark .vz-hero h1, :root.theme-dark header.vz-hero .sub, :root.theme-dark header.vz-hero .crumbs, :root.theme-dark header.vz-hero .crumbs a,
:root:not(.theme-light) .whats-new .date,
:root.theme-dark .whats-new .date,
:root:not(.theme-light) .whats-new a,
:root.theme-dark .whats-new a,
:root:not(.theme-light) .whats-new strong,
:root.theme-dark .whats-new strong,
:root:not(.theme-light) .zoom-display,
:root.theme-dark .zoom-display {
  color: var(--text-body, #e8dfc8) !important;
}

/* ============================================================
   FINAL — Konzen-keystone restore (re-appended after aggressive
   sweep so the cluster-green and row-highlight win the cascade)
   ============================================================ */

/* Cluster-member surnames keep their green in both modes (including any
   descendants — strong, em — which otherwise inherit a different color
   from rules higher up in the cascade). */
:root:not(.theme-light) .surname-chronology td.surname.cluster,
:root:not(.theme-light) .surname-chronology td.surname.cluster strong,
:root:not(.theme-light) .surname-chronology td.surname.cluster em,
:root:not(.theme-light) .surname-chronology td.surname.cluster a,
:root.theme-dark       .surname-chronology td.surname.cluster,
:root.theme-dark       .surname-chronology td.surname.cluster strong,
:root.theme-dark       .surname-chronology td.surname.cluster em,
:root.theme-dark       .surname-chronology td.surname.cluster a {
  color: #a4bee0 !important;
}
:root.theme-light .surname-chronology td.surname.cluster,
:root.theme-light .surname-chronology td.surname.cluster strong,
:root.theme-light .surname-chronology td.surname.cluster em,
:root.theme-light .surname-chronology td.surname.cluster a,
html:not(.theme-dark) .surname-chronology td.surname.cluster,
html:not(.theme-dark) .surname-chronology td.surname.cluster strong,
html:not(.theme-dark) .surname-chronology td.surname.cluster em {
  color: #2a466a !important;
}

/* Konzen 1890 row — the singular Hessian z-form attestation. Stand out
   in a brighter green + bolder weight + tinted row background so 1890
   reads as the keystone among the cluster rows. */
.surname-chronology tr.konzen-keystone > td,
.surname-chronology tr.konzen-keystone > th {
  background: rgba(74, 102, 138, 0.10) !important;
}
:root:not(.theme-light) .surname-chronology tr.konzen-keystone > td,
:root:not(.theme-light) .surname-chronology tr.konzen-keystone > th,
:root.theme-dark       .surname-chronology tr.konzen-keystone > td,
:root.theme-dark       .surname-chronology tr.konzen-keystone > th {
  background: rgba(96, 131, 176, 0.18) !important;
}
.surname-chronology tr.konzen-keystone td.surname.cluster,
.surname-chronology tr.konzen-keystone td.surname.cluster strong,
.surname-chronology tr.konzen-keystone td.surname.cluster em,
.surname-chronology tr.konzen-keystone td.surname.cluster a {
  color: #1c375a !important;
  font-weight: 800 !important;
}
:root:not(.theme-light) .surname-chronology tr.konzen-keystone td.surname.cluster,
:root:not(.theme-light) .surname-chronology tr.konzen-keystone td.surname.cluster strong,
:root:not(.theme-light) .surname-chronology tr.konzen-keystone td.surname.cluster em,
:root:not(.theme-light) .surname-chronology tr.konzen-keystone td.surname.cluster a,
:root.theme-dark       .surname-chronology tr.konzen-keystone td.surname.cluster,
:root.theme-dark       .surname-chronology tr.konzen-keystone td.surname.cluster strong,
:root.theme-dark       .surname-chronology tr.konzen-keystone td.surname.cluster em,
:root.theme-dark       .surname-chronology tr.konzen-keystone td.surname.cluster a {
  color: #cad4e2 !important;
  font-weight: 800 !important;
}

/* And keep .speaker-flag (the Charles-speaker flag pill) green in dark mode */
:root:not(.theme-light) .surname-chronology .speaker-flag,
:root.theme-dark .surname-chronology .speaker-flag {
  background: rgba(96, 131, 176, 0.22) !important;
  color: #a4bee0 !important;
}
/* ============================================================
   _shared.css class-selectors comprehensive override (17 May 2026 night)
   ============================================================
   Catches class rules in the 10 section _shared.css files
   (immigration, germany, people, sources, charles_america,
   civilwar, towns, children, research_logs, family_pages).
   These weren't reached by the earlier sweep because that
   only scanned inline <style> blocks in HTML pages.
   ------------------------------------------------------------ */

:root:not(.theme-light) .archion-path,
:root.theme-dark .archion-path,
:root:not(.theme-light) .badge.active,
:root.theme-dark .badge.active,
:root:not(.theme-light) .badge.battery,
:root.theme-dark .badge.battery,
:root:not(.theme-light) .badge.open,
:root.theme-dark .badge.open,
:root:not(.theme-light) .baptism-thumb,
:root.theme-dark .baptism-thumb,
:root:not(.theme-light) .card,
:root.theme-dark .card,
:root:not(.theme-light) .card.battery,
:root.theme-dark .card.battery,
:root:not(.theme-light) .chart-full.pdf .pdf-card,
:root.theme-dark .chart-full.pdf .pdf-card,
:root:not(.theme-light) .charts-section,
:root.theme-dark .charts-section,
:root:not(.theme-light) .cite-table thead,
:root.theme-dark .cite-table thead,
:root:not(.theme-light) .embed-controls button.active,
:root.theme-dark .embed-controls button.active,
:root:not(.theme-light) .embed-wrap .embed-frame,
:root.theme-dark .embed-wrap .embed-frame,
:root:not(.theme-light) .embed-wrap::-webkit-scrollbar-thumb,
:root.theme-dark .embed-wrap::-webkit-scrollbar-thumb,
:root:not(.theme-light) .evidence-card,
:root.theme-dark .evidence-card,
:root:not(.theme-light) .ff-section,
:root.theme-dark .ff-section,
:root:not(.theme-light) .fs-tree,
:root.theme-dark .fs-tree,
:root:not(.theme-light) .fs-tree p.fs-tree-summary,
:root.theme-dark .fs-tree p.fs-tree-summary,
:root:not(.theme-light) .ft-couple-card,
:root.theme-dark .ft-couple-card,
:root:not(.theme-light) .ft-couple-card .ft-marriage-bar,
:root.theme-dark .ft-couple-card .ft-marriage-bar,
:root:not(.theme-light) .ft-marriage-branch-fs,
:root.theme-dark .ft-marriage-branch-fs,
:root:not(.theme-light) .ft-person-card,
:root.theme-dark .ft-person-card,
:root:not(.theme-light) .ft-person-card.ft-died-young,
:root.theme-dark .ft-person-card.ft-died-young,
:root:not(.theme-light) .ft-person-card.ft-female,
:root.theme-dark .ft-person-card.ft-female,
:root:not(.theme-light) .ft-person-card.ft-subject,
:root.theme-dark .ft-person-card.ft-subject,
:root:not(.theme-light) .kfs-branch,
:root.theme-dark .kfs-branch,
:root:not(.theme-light) .kfs-card,
:root.theme-dark .kfs-card,
:root:not(.theme-light) .kfs-card.female,
:root.theme-dark .kfs-card.female,
:root:not(.theme-light) .kfs-card.subject,
:root.theme-dark .kfs-card.subject,
:root:not(.theme-light) .kfs-grand,
:root.theme-dark .kfs-grand,
:root:not(.theme-light) .kv,
:root.theme-dark .kv,
:root:not(.theme-light) .kv td:first-child,
:root.theme-dark .kv td:first-child,
:root:not(.theme-light) .kv th,
:root.theme-dark .kv th,
:root:not(.theme-light) .no-chart,
:root.theme-dark .no-chart,
:root:not(.theme-light) .page-block,
:root.theme-dark .page-block,
:root:not(.theme-light) .page-block .page-body .body-text,
:root.theme-dark .page-block .page-body .body-text,
:root:not(.theme-light) .page-block > summary,
:root.theme-dark .page-block > summary,
:root:not(.theme-light) .page-toolbar,
:root.theme-dark .page-toolbar,
:root:not(.theme-light) .page-toolbar a,
:root.theme-dark .page-toolbar a,
:root:not(.theme-light) .pdf-icon-big,
:root.theme-dark .pdf-icon-big,
:root:not(.theme-light) .person-card,
:root.theme-dark .person-card,
:root:not(.theme-light) .pull,
:root.theme-dark .pull,
:root:not(.theme-light) .related,
:root.theme-dark .related,
:root:not(.theme-light) .research-log,
:root.theme-dark .research-log,
:root:not(.theme-light) .research-log > summary,
:root.theme-dark .research-log > summary,
:root:not(.theme-light) .resource-card,
:root.theme-dark .resource-card,
:root:not(.theme-light) .section,
:root.theme-dark .section,
:root:not(.theme-light) .section.limited-record-note,
:root.theme-dark .section.limited-record-note,
:root:not(.theme-light) .sponsors li,
:root.theme-dark .sponsors li,
:root:not(.theme-light) .src-hero .pill.primary,
:root.theme-dark .src-hero .pill.primary,
:root:not(.theme-light) .summary-card,
:root.theme-dark .summary-card,
:root:not(.theme-light) .summary-card .card-pill.active,
:root.theme-dark .summary-card .card-pill.active,
:root:not(.theme-light) .summary-card .card-pill.open,
:root.theme-dark .summary-card .card-pill.open,
:root:not(.theme-light) .summary-card .qf,
:root.theme-dark .summary-card .qf,
:root:not(.theme-light) .summary-card, .card, table.kv,
:root.theme-dark .summary-card, .card, table.kv,
:root:not(.theme-light) .summary-card.active,
:root.theme-dark .summary-card.active,
:root:not(.theme-light) .summary-card.eliminated,
:root.theme-dark .summary-card.eliminated,
:root:not(.theme-light) .summary-card.open,
:root.theme-dark .summary-card.open,
:root:not(.theme-light) .surname-pill,
:root.theme-dark .surname-pill,
:root:not(.theme-light) .tl-event,
:root.theme-dark .tl-event,
:root:not(.theme-light) .town-hero .pill.primary,
:root.theme-dark .town-hero .pill.primary,
:root:not(.theme-light) .transcription,
:root.theme-dark .transcription,
:root:not(.theme-light) .transcription pre,
:root.theme-dark .transcription pre,
:root:not(.theme-light) .update-callout,
:root.theme-dark .update-callout,
:root:not(.theme-light) .update-callout table thead,
:root.theme-dark .update-callout table thead,
:root:not(.theme-light) .update-callout.amber,
:root.theme-dark .update-callout.amber,
:root:not(.theme-light) .update-callout.green,
:root.theme-dark .update-callout.green {
  background: var(--bg-card, #24201a) !important;
  background-image: none !important;
  border-color: var(--border-medium, #6a5a40) !important;
  color: var(--text-body, #e8dfc8) !important;
}

:root:not(.theme-light) .archion-path em,
:root.theme-dark .archion-path em,
:root:not(.theme-light) .archion-path strong,
:root.theme-dark .archion-path strong,
:root:not(.theme-light) .back-nav a,
:root.theme-dark .back-nav a,
:root:not(.theme-light) .baptism-thumb figcaption,
:root.theme-dark .baptism-thumb figcaption,
:root:not(.theme-light) .baptism-thumb figcaption .baptism-cite,
:root.theme-dark .baptism-thumb figcaption .baptism-cite,
:root:not(.theme-light) .baptism-thumb figcaption .baptism-date,
:root.theme-dark .baptism-thumb figcaption .baptism-date,
:root:not(.theme-light) .callout.confirmed,
:root.theme-dark .callout.confirmed,
:root:not(.theme-light) .callout.contested,
:root.theme-dark .callout.contested,
:root:not(.theme-light) .callout.open,
:root.theme-dark .callout.open,
:root:not(.theme-light) .callout.warning,
:root.theme-dark .callout.warning,
:root:not(.theme-light) .chart-full figcaption,
:root.theme-dark .chart-full figcaption,
:root:not(.theme-light) .embed-controls .label,
:root.theme-dark .embed-controls .label,
:root:not(.theme-light) .embed-controls .zoom-readout,
:root.theme-dark .embed-controls .zoom-readout,
:root:not(.theme-light) .family-tree .ft-bd, .family-tree .ft-dd,
:root.theme-dark .family-tree .ft-bd, .family-tree .ft-dd,
:root:not(.theme-light) .family-tree .ft-detail,
:root.theme-dark .family-tree .ft-detail,
:root:not(.theme-light) .family-tree .ft-name,
:root.theme-dark .family-tree .ft-name,
:root:not(.theme-light) .family-tree .ft-pid,
:root.theme-dark .family-tree .ft-pid,
:root:not(.theme-light) .ff-section > h5,
:root.theme-dark .ff-section > h5,
:root:not(.theme-light) .fs-tree > h2,
:root.theme-dark .fs-tree > h2,
:root:not(.theme-light) .fs-tree > p,
:root.theme-dark .fs-tree > p,
:root:not(.theme-light) .fs-tree h3.gen-label,
:root.theme-dark .fs-tree h3.gen-label,
:root:not(.theme-light) .fs-tree h3.gen-label-spaced,
:root.theme-dark .fs-tree h3.gen-label-spaced,
:root:not(.theme-light) .fsn,
:root.theme-dark .fsn,
:root:not(.theme-light) .ft-bd, .ft-dd,
:root.theme-dark .ft-bd, .ft-dd,
:root:not(.theme-light) .ft-couple-card a.ft-person,
:root.theme-dark .ft-couple-card a.ft-person,
:root:not(.theme-light) .ft-couple-card a.ft-person.ft-female .ft-pid,
:root.theme-dark .ft-couple-card a.ft-person.ft-female .ft-pid,
:root:not(.theme-light) .ft-dates,
:root.theme-dark .ft-dates,
:root:not(.theme-light) .ft-detail,
:root.theme-dark .ft-detail,
:root:not(.theme-light) .ft-gen-label,
:root.theme-dark .ft-gen-label,
:root:not(.theme-light) .ft-marriage-branch-fs > h4,
:root.theme-dark .ft-marriage-branch-fs > h4,
:root:not(.theme-light) .ft-name,
:root.theme-dark .ft-name,
:root:not(.theme-light) .ft-person-card.ft-female .ft-pid,
:root.theme-dark .ft-person-card.ft-female .ft-pid,
:root:not(.theme-light) .ft-pid,
:root.theme-dark .ft-pid,
:root:not(.theme-light) .kfs-card.female .kfs-pid,
:root.theme-dark .kfs-card.female .kfs-pid,
:root:not(.theme-light) .kfs-dates,
:root.theme-dark .kfs-dates,
:root:not(.theme-light) .kfs-detail,
:root.theme-dark .kfs-detail,
:root:not(.theme-light) .kfs-down,
:root.theme-dark .kfs-down,
:root:not(.theme-light) .kfs-marriage,
:root.theme-dark .kfs-marriage,
:root:not(.theme-light) .kfs-name,
:root.theme-dark .kfs-name,
:root:not(.theme-light) .kfs-pid,
:root.theme-dark .kfs-pid,
:root:not(.theme-light) .kfs-section-label,
:root.theme-dark .kfs-section-label,
:root:not(.theme-light) .page-block .page-body .editor-note,
:root.theme-dark .page-block .page-body .editor-note,
:root:not(.theme-light) .page-block .page-body .uncertain, .page-block .page-body em.unc,
:root.theme-dark .page-block .page-body .uncertain, .page-block .page-body em.unc,
:root:not(.theme-light) .page-block .page-body dl.page-meta dd,
:root.theme-dark .page-block .page-body dl.page-meta dd,
:root:not(.theme-light) .page-block .page-body dl.page-meta dt,
:root.theme-dark .page-block .page-body dl.page-meta dt,
:root:not(.theme-light) .page-block > summary .page-type,
:root.theme-dark .page-block > summary .page-type,
:root:not(.theme-light) .page-toolbar strong,
:root.theme-dark .page-toolbar strong,
:root:not(.theme-light) .person-card .meta,
:root.theme-dark .person-card .meta,
:root:not(.theme-light) .person-card .role,
:root.theme-dark .person-card .role,
:root:not(.theme-light) .person-card .summary,
:root.theme-dark .person-card .summary,
:root:not(.theme-light) .pull strong,
:root.theme-dark .pull strong,
:root:not(.theme-light) .research-log > summary .log-meta,
:root.theme-dark .research-log > summary .log-meta,
:root:not(.theme-light) .resource-card .source-label,
:root.theme-dark .resource-card .source-label,
:root:not(.theme-light) .resource-card .source-label.archion,
:root.theme-dark .resource-card .source-label.archion,
:root:not(.theme-light) .resource-card .source-label.cemetery,
:root.theme-dark .resource-card .source-label.cemetery,
:root:not(.theme-light) .resource-card .source-label.census,
:root.theme-dark .resource-card .source-label.census,
:root:not(.theme-light) .resource-card .source-label.civil,
:root.theme-dark .resource-card .source-label.civil,
:root:not(.theme-light) .resource-card .source-label.newspaper,
:root.theme-dark .resource-card .source-label.newspaper,
:root:not(.theme-light) .resource-card h4,
:root.theme-dark .resource-card h4,
:root:not(.theme-light) .resource-card p,
:root.theme-dark .resource-card p,
:root:not(.theme-light) .resource-card.archion,
:root.theme-dark .resource-card.archion,
:root:not(.theme-light) .resource-card.cemetery,
:root.theme-dark .resource-card.cemetery,
:root:not(.theme-light) .resource-card.census,
:root.theme-dark .resource-card.census,
:root:not(.theme-light) .resource-card.civil,
:root.theme-dark .resource-card.civil,
:root:not(.theme-light) .resource-card.newspaper,
:root.theme-dark .resource-card.newspaper,
:root:not(.theme-light) .section .small,
:root.theme-dark .section .small,
:root:not(.theme-light) .section h2,
:root.theme-dark .section h2,
:root:not(.theme-light) .section h3,
:root.theme-dark .section h3,
:root:not(.theme-light) .sponsors li strong,
:root.theme-dark .sponsors li strong,
:root:not(.theme-light) .subhead,
:root.theme-dark .subhead,
:root:not(.theme-light) .subhead-amber,
:root.theme-dark .subhead-amber,
:root:not(.theme-light) .subhead-large,
:root.theme-dark .subhead-large,
:root:not(.theme-light) .summary-card .bottom-line,
:root.theme-dark .summary-card .bottom-line,
:root:not(.theme-light) .summary-card .bottom-line strong,
:root.theme-dark .summary-card .bottom-line strong,
:root:not(.theme-light) .summary-card .charles-link,
:root.theme-dark .summary-card .charles-link,
:root:not(.theme-light) .summary-card .charles-link strong,
:root.theme-dark .summary-card .charles-link strong,
:root:not(.theme-light) .summary-card .qf .qf-label,
:root.theme-dark .summary-card .qf .qf-label,
:root:not(.theme-light) .summary-card .qf .qf-value,
:root.theme-dark .summary-card .qf .qf-value,
:root:not(.theme-light) .summary-card.active .charles-link strong,
:root.theme-dark .summary-card.active .charles-link strong,
:root:not(.theme-light) .summary-card.active h2,
:root.theme-dark .summary-card.active h2,
:root:not(.theme-light) .summary-card.eliminated .charles-link strong,
:root.theme-dark .summary-card.eliminated .charles-link strong,
:root:not(.theme-light) .summary-card.eliminated h2,
:root.theme-dark .summary-card.eliminated h2,
:root:not(.theme-light) .tl-event .src,
:root.theme-dark .tl-event .src,
:root:not(.theme-light) .tl-event .what,
:root.theme-dark .tl-event .what,
:root:not(.theme-light) .tl-event .when,
:root.theme-dark .tl-event .when,
:root:not(.theme-light) .tree .sib a,
:root.theme-dark .tree .sib a,
:root:not(.theme-light) .update-callout h5,
:root.theme-dark .update-callout h5,
:root:not(.theme-light) .update-callout.amber h5,
:root.theme-dark .update-callout.amber h5,
:root:not(.theme-light) .update-callout.green h5,
:root.theme-dark .update-callout.green h5,
:root:not(.theme-light) .verdict,
:root.theme-dark .verdict {
  color: var(--text-body, #e8dfc8) !important;
}

/* ============================================================
   FINAL — Konzen-keystone restore (re-re-appended after _shared.css sweep)
   ============================================================ */
:root:not(.theme-light) .surname-chronology td.surname.cluster,
:root.theme-dark .surname-chronology td.surname.cluster {
  color: #a4bee0 !important;
}
:root.theme-light .surname-chronology td.surname.cluster {
  color: #2a466a !important;
}
.surname-chronology tr.konzen-keystone td {
  background: rgba(74, 102, 138, 0.10) !important;
}
:root:not(.theme-light) .surname-chronology tr.konzen-keystone td,
:root.theme-dark .surname-chronology tr.konzen-keystone td {
  background: rgba(96, 131, 176, 0.18) !important;
}
.surname-chronology tr.konzen-keystone td.surname.cluster {
  color: #1c375a !important;
  font-weight: 800 !important;
}
:root:not(.theme-light) .surname-chronology tr.konzen-keystone td.surname.cluster,
:root.theme-dark .surname-chronology tr.konzen-keystone td.surname.cluster {
  color: #cad4e2 !important;
  font-weight: 800 !important;
}
:root:not(.theme-light) .surname-chronology .speaker-flag,
:root.theme-dark .surname-chronology .speaker-flag {
  background: rgba(96, 131, 176, 0.22) !important;
  color: #a4bee0 !important;
}

/* ============================================================
   PROTECT — pills with dark-on-gold/orange backgrounds (working,
   star, confirmed-yellow chips, etc.) need to KEEP their dark
   text color in dark mode. Otherwise the aggressive text-flip
   sweep turns them cream-on-gold (terrible contrast).
   17 May 2026 night.
   ============================================================ */
:root:not(.theme-light) [style*="background:#d4a017"],
:root.theme-dark [style*="background:#d4a017"],
:root:not(.theme-light) [style*="background: #d4a017"],
:root.theme-dark [style*="background: #d4a017"],
:root:not(.theme-light) [style*="background:#d8b366"],
:root.theme-dark [style*="background:#d8b366"],
:root:not(.theme-light) [style*="background: #d8b366"],
:root.theme-dark [style*="background: #d8b366"],
:root:not(.theme-light) [style*="background:#c08400"],
:root.theme-dark [style*="background:#c08400"],
:root:not(.theme-light) [style*="background:#8a6420"],
:root.theme-dark [style*="background:#8a6420"],
:root:not(.theme-light) [style*="background:#5a3a08"],
:root.theme-dark [style*="background:#5a3a08"],
:root:not(.theme-light) [style*="background:#75543a"],
:root.theme-dark [style*="background:#75543a"],
:root:not(.theme-light) [style*="background:#7c5d43"],
:root.theme-dark [style*="background:#7c5d43"],
:root:not(.theme-light) [style*="background:#4a668a"],
:root.theme-dark [style*="background:#4a668a"] {
  /* Gold / brown / oxblood / forest-green chip — keep its
     intentional dark text + saturated background in both modes. */
  background: inherit;
  color: #1f2e45 !important;
}

/* For chips where the intentional text color was white-on-dark,
   the sweep should leave them alone — those use color:#fff already
   which doesn't match my dark-color regex. Specifically: the
   .conf-pill.confirmed/.open/.eliminated pills, the surname-pill,
   etc. They render correctly. */

/* Saturated-color pills with style-attribute white text — preserve. */
:root:not(.theme-light) [style*="color:#fff"],
:root.theme-dark [style*="color:#fff"],
:root:not(.theme-light) [style*="color: #fff"],
:root.theme-dark [style*="color: #fff"] {
  color: #fff !important;
}

/* ============================================================
   Civil War service-arc SVG — dark-mode fills/strokes.
   The inline <style> in civil-war.html and #civilwar in index.html
   uses CSS-var fallbacks for SVG fills (#5c432e oxblood, #1f1a14
   near-black, #3a2f1e dark-sepia, #5a4a32 muted). In dark mode
   those fallbacks render as dark-on-dark — unreadable. Override
   the fills/strokes with brighter palette values.
   ============================================================ */
:root:not(.theme-light) #civilwar .st-eyr,
:root.theme-dark #civilwar .st-eyr {
  fill: #f0a880 !important;   /* warm coral oxblood — readable on dark card */
}
:root:not(.theme-light) #civilwar .st-label,
:root.theme-dark #civilwar .st-label {
  fill: #e8dfc8 !important;   /* cream body text */
}
:root:not(.theme-light) #civilwar .st-phase-label,
:root.theme-dark #civilwar .st-phase-label {
  fill: #c8b896 !important;   /* muted cream */
}
:root:not(.theme-light) #civilwar .st-axis,
:root.theme-dark #civilwar .st-axis {
  stroke: #8a7a5a !important; /* muted khaki */
}
:root:not(.theme-light) #civilwar .st-stem,
:root.theme-dark #civilwar .st-stem {
  stroke: #f0a880 !important; /* match year-text color */
}
:root:not(.theme-light) #civilwar .st-dot,
:root.theme-dark #civilwar .st-dot {
  stroke: #131d2b !important; /* card bg ring */
}

/* ============================================================
   COMPREHENSIVE WORKING-BADGE FIX (final cascade winner)
   ============================================================
   The "Working" status badge — and its sibling pills (Confirmed,
   Open, Eliminated, Active, Structure, Major) — are visually
   communicated by a SATURATED background color + intentionally
   contrasting text. The Working badge uses gold (#d4a017 / #d8b366
   / var(--brand)) + DARK text (#1f1a14 / #2c2620). It MUST stay
   dark-on-gold in both themes for legibility — light-on-gold is
   unreadable.

   The two big aggressive sweeps earlier in this file
   (lines ~3481-3469 background-sweep, lines ~3481+ text-sweep,
   and the 4404+ second background-sweep) include `.conf.working`,
   `.conf-pill.working`, `.cl-pill.working` in their selector lists
   and force them to var(--text-body) cream. That kills the
   dark-on-gold contrast.

   This block is placed at end-of-file so cascade-order wins.
   ============================================================ */

/* --- Working badge: every class variant, force dark-on-gold. --- */
:root:not(.theme-light) .conf.working,
:root.theme-dark       .conf.working,
:root:not(.theme-light) .conf-pill.working,
:root.theme-dark       .conf-pill.working,
:root:not(.theme-light) .cl-pill.working,
:root.theme-dark       .cl-pill.working,
:root:not(.theme-light) .ss-pill.working,
:root.theme-dark       .ss-pill.working,
:root:not(.theme-light) .pill.working,
:root.theme-dark       .pill.working,
:root:not(.theme-light) .badge.working,
:root.theme-dark       .badge.working,
:root:not(.theme-light) .tag.working,
:root.theme-dark       .tag.working,
:root:not(.theme-light) .status.working,
:root.theme-dark       .status.working,
:root:not(.theme-light) .working-pill,
:root.theme-dark       .working-pill {
  background: #d8b366 !important;   /* keep the gold */
  background-image: none !important;
  color: #162132 !important;        /* dark text — readable */
  border-color: #b89018 !important;
}

/* Inline-style Working badges (abstract.html, open-questions, etc.) */
:root:not(.theme-light) [style*="background:#d4a017"],
:root.theme-dark       [style*="background:#d4a017"],
:root:not(.theme-light) [style*="background: #d4a017"],
:root.theme-dark       [style*="background: #d4a017"],
:root:not(.theme-light) [style*="background:#d8b366"],
:root.theme-dark       [style*="background:#d8b366"],
:root:not(.theme-light) [style*="background: #d8b366"],
:root.theme-dark       [style*="background: #d8b366"],
:root:not(.theme-light) [style*="background:#c89020"],
:root.theme-dark       [style*="background:#c89020"],
:root:not(.theme-light) [style*="background: #c89020"],
:root.theme-dark       [style*="background: #c89020"],
:root:not(.theme-light) [style*="background:#c08400"],
:root.theme-dark       [style*="background:#c08400"],
:root:not(.theme-light) [style*="background: #c08400"],
:root.theme-dark       [style*="background: #c08400"],
:root:not(.theme-light) [style*="background:#b89018"],
:root.theme-dark       [style*="background:#b89018"],
:root:not(.theme-light) [style*="background: #b89018"],
:root.theme-dark       [style*="background: #b89018"],
:root:not(.theme-light) [style*="background:#b6912b"],
:root.theme-dark       [style*="background:#b6912b"],
:root:not(.theme-light) [style*="background: #b6912b"],
:root.theme-dark       [style*="background: #b6912b"],
:root:not(.theme-light) [style*="background:#a07820"],
:root.theme-dark       [style*="background:#a07820"],
:root:not(.theme-light) [style*="background: #a07820"],
:root.theme-dark       [style*="background: #a07820"] {
  background-image: none !important;
  color: #162132 !important;
}

/* Descendant text/strong/em inside the Working badge stays dark too. */
:root:not(.theme-light) .conf.working *,
:root.theme-dark       .conf.working *,
:root:not(.theme-light) .conf-pill.working *,
:root.theme-dark       .conf-pill.working *,
:root:not(.theme-light) .cl-pill.working *,
:root.theme-dark       .cl-pill.working *,
:root:not(.theme-light) .ss-pill.working *,
:root.theme-dark       .ss-pill.working *,
:root:not(.theme-light) .pill.working *,
:root.theme-dark       .pill.working *,
:root:not(.theme-light) .badge.working *,
:root.theme-dark       .badge.working *,
:root:not(.theme-light) .working-pill * {
  color: #162132 !important;
}

/* Reference: the corresponding "Confirmed" green pill, "Open" copper,
   and "Eliminated" oxblood pills use color:#fff (already protected by
   the [style*="color:#fff"] preserve-block earlier). Their class-based
   variants (.conf.confirmed / .conf.open / .conf.eliminated) need the
   same kind of explicit re-assertion so the aggressive sweep doesn't
   bleach their saturated backgrounds to walnut-card. */
:root:not(.theme-light) .conf.confirmed,
:root.theme-dark       .conf.confirmed,
:root:not(.theme-light) .conf-pill.confirmed,
:root.theme-dark       .conf-pill.confirmed,
:root:not(.theme-light) .cl-pill.confirmed,
:root.theme-dark       .cl-pill.confirmed,
:root:not(.theme-light) .ss-pill.confirmed,
:root.theme-dark       .ss-pill.confirmed,
:root:not(.theme-light) .pill.confirmed,
:root.theme-dark       .pill.confirmed,
:root:not(.theme-light) .badge.confirmed,
:root.theme-dark       .badge.confirmed {
  background: #2f496b !important;
  background-image: none !important;
  color: #fff !important;
}
:root:not(.theme-light) .conf.open,
:root.theme-dark       .conf.open,
:root:not(.theme-light) .conf-pill.open,
:root.theme-dark       .conf-pill.open,
:root:not(.theme-light) .cl-pill.open,
:root.theme-dark       .cl-pill.open,
:root:not(.theme-light) .pill.open,
:root.theme-dark       .pill.open,
:root:not(.theme-light) .badge.open,
:root.theme-dark       .badge.open {
  background: #c87a30 !important;
  background-image: none !important;
  color: #fff !important;
}
:root:not(.theme-light) .conf.eliminated,
:root.theme-dark       .conf.eliminated,
:root:not(.theme-light) .conf-pill.eliminated,
:root.theme-dark       .conf-pill.eliminated,
:root:not(.theme-light) .cl-pill.eliminated,
:root.theme-dark       .cl-pill.eliminated,
:root:not(.theme-light) .pill.eliminated,
:root.theme-dark       .pill.eliminated,
:root:not(.theme-light) .badge.eliminated,
:root.theme-dark       .badge.eliminated {
  background: #805c3f !important;
  background-image: none !important;
  color: #fff !important;
}
:root:not(.theme-light) .cl-pill.structure,
:root.theme-dark       .cl-pill.structure {
  background: #33507a !important;
  background-image: none !important;
  color: #fff !important;
}
:root:not(.theme-light) .cl-pill.major,
:root.theme-dark       .cl-pill.major {
  background: #805c3f !important;
  background-image: none !important;
  color: #fff !important;
}

/* ============================================================
   COMPREHENSIVE DARK-RED / OXBLOOD / RUST TEXT FIX
   ============================================================
   Inline `style="color:#XYZ"` and CSS class rules that use a dark
   red / oxblood / rust hex stay dark in dark mode and read as
   dark-on-dark walnut — unreadable. The earlier sweep caught
   #75543a / #76553a / #906747 but missed:
     #5c432e (Civil War oxblood — 34 inline-style hits)
     #5c432e, #5d432e, #5f4834, #58402c, #5a3a08, #74603e
     #674a32, #7a3416, #74420f
     #674a32, #705137, #7c5d43, #8a5418, #8a5a14
     #884420, #7d5a3e, #825e40, #a85820, #a06030
   Plus dark gold / dark sepia close to unreadable on dark walnut:
     #8a6420 (372 inline hits!), #6a5024, #74420f, #5a3a08
   This block flips all of those to coral / cream variants.

   Placed at end of file so cascade-order wins.
   ============================================================ */

/* Dark RED / OXBLOOD / RUST family → warm coral. */
:root:not(.theme-light) [style*="color:#5c432e"],
:root.theme-dark       [style*="color:#5c432e"],
:root:not(.theme-light) [style*="color: #5c432e"],
:root.theme-dark       [style*="color: #5c432e"],
:root:not(.theme-light) [style*="color:#5c432e"],
:root.theme-dark       [style*="color:#5c432e"],
:root:not(.theme-light) [style*="color: #5c432e"],
:root.theme-dark       [style*="color: #5c432e"],
:root:not(.theme-light) [style*="color:#5d432e"],
:root.theme-dark       [style*="color:#5d432e"],
:root:not(.theme-light) [style*="color: #5d432e"],
:root.theme-dark       [style*="color: #5d432e"],
:root:not(.theme-light) [style*="color:#5f4834"],
:root.theme-dark       [style*="color:#5f4834"],
:root:not(.theme-light) [style*="color: #5f4834"],
:root.theme-dark       [style*="color: #5f4834"],
:root:not(.theme-light) [style*="color:#58402c"],
:root.theme-dark       [style*="color:#58402c"],
:root:not(.theme-light) [style*="color: #58402c"],
:root.theme-dark       [style*="color: #58402c"],
:root:not(.theme-light) [style*="color:#674a32"],
:root.theme-dark       [style*="color:#674a32"],
:root:not(.theme-light) [style*="color: #674a32"],
:root.theme-dark       [style*="color: #674a32"],
:root:not(.theme-light) [style*="color:#7a3416"],
:root.theme-dark       [style*="color:#7a3416"],
:root:not(.theme-light) [style*="color: #7a3416"],
:root.theme-dark       [style*="color: #7a3416"],
:root:not(.theme-light) [style*="color:#674a32"],
:root.theme-dark       [style*="color:#674a32"],
:root:not(.theme-light) [style*="color: #674a32"],
:root.theme-dark       [style*="color: #674a32"],
:root:not(.theme-light) [style*="color:#705137"],
:root.theme-dark       [style*="color:#705137"],
:root:not(.theme-light) [style*="color: #705137"],
:root.theme-dark       [style*="color: #705137"],
:root:not(.theme-light) [style*="color:#7c5d43"],
:root.theme-dark       [style*="color:#7c5d43"],
:root:not(.theme-light) [style*="color: #7c5d43"],
:root.theme-dark       [style*="color: #7c5d43"],
:root:not(.theme-light) [style*="color:#884420"],
:root.theme-dark       [style*="color:#884420"],
:root:not(.theme-light) [style*="color: #884420"],
:root.theme-dark       [style*="color: #884420"],
:root:not(.theme-light) [style*="color:#7d5a3e"],
:root.theme-dark       [style*="color:#7d5a3e"],
:root:not(.theme-light) [style*="color: #7d5a3e"],
:root.theme-dark       [style*="color: #7d5a3e"],
:root:not(.theme-light) [style*="color:#825e40"],
:root.theme-dark       [style*="color:#825e40"],
:root:not(.theme-light) [style*="color: #825e40"],
:root.theme-dark       [style*="color: #825e40"],
:root:not(.theme-light) [style*="color:#a85820"],
:root.theme-dark       [style*="color:#a85820"],
:root:not(.theme-light) [style*="color: #a85820"],
:root.theme-dark       [style*="color: #a85820"],
:root:not(.theme-light) [style*="color:#a06030"],
:root.theme-dark       [style*="color:#a06030"],
:root:not(.theme-light) [style*="color: #a06030"],
:root.theme-dark       [style*="color: #a06030"],
:root:not(.theme-light) [style*="color:#5d432e"],
:root.theme-dark       [style*="color:#5d432e"],
:root:not(.theme-light) [style*="color: #5d432e"],
:root.theme-dark       [style*="color: #5d432e"] {
  color: #d9c4b3 !important;  /* warm coral — readable on dark walnut */
}

/* Dark GOLD / SEPIA family → cream gold. */
:root:not(.theme-light) [style*="color:#5a3a08"],
:root.theme-dark       [style*="color:#5a3a08"],
:root:not(.theme-light) [style*="color: #5a3a08"],
:root.theme-dark       [style*="color: #5a3a08"],
:root:not(.theme-light) [style*="color:#74420f"],
:root.theme-dark       [style*="color:#74420f"],
:root:not(.theme-light) [style*="color: #74420f"],
:root.theme-dark       [style*="color: #74420f"],
:root:not(.theme-light) [style*="color:#8a5418"],
:root.theme-dark       [style*="color:#8a5418"],
:root:not(.theme-light) [style*="color: #8a5418"],
:root.theme-dark       [style*="color: #8a5418"],
:root:not(.theme-light) [style*="color:#8a5a14"],
:root.theme-dark       [style*="color:#8a5a14"],
:root:not(.theme-light) [style*="color: #8a5a14"],
:root.theme-dark       [style*="color: #8a5a14"],
:root:not(.theme-light) [style*="color:#6a5024"],
:root.theme-dark       [style*="color:#6a5024"],
:root:not(.theme-light) [style*="color: #6a5024"],
:root.theme-dark       [style*="color: #6a5024"],
:root:not(.theme-light) [style*="color:#6a5a2a"],
:root.theme-dark       [style*="color:#6a5a2a"],
:root:not(.theme-light) [style*="color: #6a5a2a"],
:root.theme-dark       [style*="color: #6a5a2a"],
:root:not(.theme-light) [style*="color:#7a5a2a"],
:root.theme-dark       [style*="color:#7a5a2a"],
:root:not(.theme-light) [style*="color: #7a5a2a"],
:root.theme-dark       [style*="color: #7a5a2a"] {
  color: #f1cf85 !important;  /* warm cream gold */
}

/* CSS class rules (NOT inline-style) that set color to oxblood family
   via CSS-var fallback or direct hex — flip in dark mode. The cinematic
   .cw-tile-title rule uses var(--brand-dark) which is already gold in
   dark mode, but its :hover variants use #76553a / #74603e / #2a466a
   hardcoded. Those hover colors are fine — they're brief states.
   The more pressing fixes are the section accent helpers below. */
:root:not(.theme-light) .cw-tile-eyebrow,
:root.theme-dark       .cw-tile-eyebrow,
:root:not(.theme-light) #civilwar .cw-tile-eyebrow,
:root.theme-dark       #civilwar .cw-tile-eyebrow {
  color: #d9c4b3 !important;
}
:root:not(.theme-light) #civilwar .eyebrow,
:root.theme-dark       #civilwar .eyebrow,
:root:not(.theme-light) #civilwar h2,
:root.theme-dark       #civilwar h2,
:root:not(.theme-light) #civilwar h3,
:root.theme-dark       #civilwar h3 {
  color: var(--text-strong, #f6f1e7) !important;
}

/* Reassert the brand-dark gold for tile titles in dark mode — the
   class rule in cinematic-spa.css writes `color: var(--brand-dark)`,
   which dark-mode.css overrides to gold #d8b366 at :root, so the
   inherited value should already be readable. Lock it in anyway. */
:root:not(.theme-light) .cw-tile-title,
:root.theme-dark       .cw-tile-title,
:root:not(.theme-light) .tile.primary .cw-tile-title,
:root.theme-dark       .tile.primary .cw-tile-title,
:root:not(.theme-light) .tile.mystery .cw-tile-title,
:root.theme-dark       .tile.mystery .cw-tile-title,
:root:not(.theme-light) .tile.theme .cw-tile-title,
:root.theme-dark       .tile.theme .cw-tile-title,
:root:not(.theme-light) .tile.profile .cw-tile-title,
:root.theme-dark       .tile.profile .cw-tile-title {
  color: #f1cf85 !important; /* cream gold — readable on dark card */
}

/* ============================================================
   IMMIGRATION COST + TIME BAR — restore category colors
   ============================================================
   The "What it cost" and "How long it took" segmented bars on
   immigration-journey.html used pastel pales (#9ab8e0 light-blue
   for barge, #c8b896 cream for lodging/Bremen-wait, #d8b366 gold
   for US onward) plus a saturated steerage/atlantic blue (#4a76c8
   with white text). In dark mode the earlier aggressive sweep
   matched .im-cost-bar-segment.* and .im-time-bar-segment.* and
   flipped them to walnut #24201a — so only the steerage / Atlantic
   segments retained their color, and the other three boxes read as
   dark-on-dark "missing" tiles. Restore saturated dark-mode-readable
   versions of each category color, with appropriate text contrast.
   Same applies to the small key/legend swatches.
   ============================================================ */

/* ---- COST BAR segments ---- */
:root:not(.theme-light) .im-cost-bar-segment.steerage,
:root.theme-dark       .im-cost-bar-segment.steerage {
  background: #4a76c8 !important;   /* keep saturated blue */
  color: #fff !important;
}
:root:not(.theme-light) .im-cost-bar-segment.barge,
:root.theme-dark       .im-cost-bar-segment.barge {
  background: #6a96d0 !important;   /* deeper river-blue */
  color: #131d2b !important;
}
:root:not(.theme-light) .im-cost-bar-segment.lodging,
:root.theme-dark       .im-cost-bar-segment.lodging {
  background: #b89868 !important;   /* Bremen-tan, saturated for dark */
  color: #131d2b !important;
}
:root:not(.theme-light) .im-cost-bar-segment.onward,
:root.theme-dark       .im-cost-bar-segment.onward {
  background: #d8b366 !important;   /* keep saturated gold */
  color: #131d2b !important;
}

/* ---- TIME BAR segments ---- */
:root:not(.theme-light) .im-time-bar-segment.barge,
:root.theme-dark       .im-time-bar-segment.barge {
  background: #6a96d0 !important;
  color: #131d2b !important;
}
:root:not(.theme-light) .im-time-bar-segment.wait,
:root.theme-dark       .im-time-bar-segment.wait {
  background: #b89868 !important;
  color: #131d2b !important;
}
:root:not(.theme-light) .im-time-bar-segment.atlantic,
:root.theme-dark       .im-time-bar-segment.atlantic {
  background: #33507a !important;
  color: #fff !important;
}
:root:not(.theme-light) .im-time-bar-segment.onward,
:root.theme-dark       .im-time-bar-segment.onward {
  background: #d8b366 !important;
  color: #131d2b !important;
}

/* ---- COST BAR key/legend swatches ---- */
:root:not(.theme-light) .im-cost-bar-key .swatch.steerage,
:root.theme-dark       .im-cost-bar-key .swatch.steerage {
  background: #4a76c8 !important;
}
:root:not(.theme-light) .im-cost-bar-key .swatch.barge,
:root.theme-dark       .im-cost-bar-key .swatch.barge {
  background: #6a96d0 !important;
}
:root:not(.theme-light) .im-cost-bar-key .swatch.lodging,
:root.theme-dark       .im-cost-bar-key .swatch.lodging {
  background: #b89868 !important;
}
:root:not(.theme-light) .im-cost-bar-key .swatch.onward,
:root.theme-dark       .im-cost-bar-key .swatch.onward {
  background: #d8b366 !important;
}

/* ---- TIME BAR key/legend swatches ---- */
:root:not(.theme-light) .im-time-bar-key .swatch.barge,
:root.theme-dark       .im-time-bar-key .swatch.barge {
  background: #6a96d0 !important;
}
:root:not(.theme-light) .im-time-bar-key .swatch.wait,
:root.theme-dark       .im-time-bar-key .swatch.wait {
  background: #b89868 !important;
}
:root:not(.theme-light) .im-time-bar-key .swatch.atlantic,
:root.theme-dark       .im-time-bar-key .swatch.atlantic {
  background: #4a76c8 !important;
}
:root:not(.theme-light) .im-time-bar-key .swatch.onward,
:root.theme-dark       .im-time-bar-key .swatch.onward {
  background: #d8b366 !important;
}

/* ---- Bar tracks — keep dark walnut frame so segments pop ---- */
:root:not(.theme-light) .im-cost-bar-track,
:root.theme-dark       .im-cost-bar-track,
:root:not(.theme-light) .im-time-bar-track,
:root.theme-dark       .im-time-bar-track {
  background: #1e2c43 !important;
  border-color: #33496b !important;
}

/* ============================================================
   MAP-LEGEND SWATCHES — restore pin-matching colors
   ============================================================
   The earlier aggressive sweep (lines ~4396–4897) included a
   block of specific map-legend swatches in its selector list and
   flipped their backgrounds to walnut #24201a. Result: legend
   circles no longer match their corresponding map pin colors.
   The im-* swatches were already restored above; the remaining
   legend swatches are restored here. Each is set to the same hex
   used by the actual map marker / divIcon so the legend reads
   correctly in both light and dark mode.

   Added 18 May 2026.
   ============================================================ */

/* Civil War map — "Detached duty" pin (cw-map-legend) */
:root:not(.theme-light) .cw-map-legend .swatch.detached,
:root.theme-dark       .cw-map-legend .swatch.detached {
  background: #c8754a !important;
  background-image: none !important;
  border-color: #fffaf0 !important;
}

/* Immigration map — "Destination" pin (im-map-legend) */
:root:not(.theme-light) .im-map-legend .swatch.dest,
:root.theme-dark       .im-map-legend .swatch.dest {
  background: #d8b366 !important;
  background-image: none !important;
  border-color: #fffaf0 !important;
}

/* Family-tree legend overlay (legend-overlay .lswatch) */
:root:not(.theme-light) .legend-overlay .lswatch.charles,
:root.theme-dark       .legend-overlay .lswatch.charles {
  background: #c87a30 !important;
  background-image: none !important;
  border-color: #fff !important;
}
:root:not(.theme-light) .legend-overlay .lswatch.child,
:root.theme-dark       .legend-overlay .lswatch.child {
  background: #d8b366 !important;
  background-image: none !important;
  border-color: #fff !important;
}
:root:not(.theme-light) .legend-overlay .lswatch.unknown,
:root.theme-dark       .legend-overlay .lswatch.unknown {
  background: #fff !important;
  background-image: none !important;
  border: 1px dashed #8a4a4a !important;
  box-shadow: none !important;
}

/* St. Louis residences static map (.map-legend) */
:root:not(.theme-light) .map-legend .swatch.house,
:root.theme-dark       .map-legend .swatch.house {
  background: #d8b366 !important;
  background-image: none !important;
  border-color: #fffaf0 !important;
}
:root:not(.theme-light) .map-legend .swatch.approx,
:root.theme-dark       .map-legend .swatch.approx {
  background: #c8b896 !important;
  background-image: none !important;
  border: 2px dashed #fffaf0 !important;
}

/* Towns map (towns-legend) — the "reference" point swatch */
:root:not(.theme-light) .towns-legend .swatch.reference,
:root.theme-dark       .towns-legend .swatch.reference {
  background: #a8a08a !important;
  background-image: none !important;
  border-color: #fffaf0 !important;
}

/* Parish-map / STL-map legend dots (.legend-dot.charles / .working /
   .friend) — the bulk background sweep at line 3275–3469 includes
   these in its selector list and forces them to walnut, breaking
   colour parity with the actual Leaflet pins. Restore to the source
   palette in both light and dark mode. */
:root:not(.theme-light) .legend-dot.charles,
:root.theme-dark       .legend-dot.charles {
  background: #c87a30 !important;
  background-image: none !important;
  border-color: #fff !important;
}
:root:not(.theme-light) .legend-dot.working,
:root.theme-dark       .legend-dot.working {
  background: #d8b366 !important;
  background-image: none !important;
  border-color: #fff !important;
}
:root:not(.theme-light) .legend-dot.confirmed,
:root.theme-dark       .legend-dot.confirmed {
  background: #4a6e34 !important;
  background-image: none !important;
  border-color: #fff !important;
}
:root:not(.theme-light) .legend-dot.eliminated,
:root.theme-dark       .legend-dot.eliminated {
  background: #8a4a4a !important;
  background-image: none !important;
  border-color: #fff !important;
}
:root:not(.theme-light) .legend-dot.open,
:root.theme-dark       .legend-dot.open {
  background: #4a76c8 !important;
  background-image: none !important;
  border-color: #fff !important;
}
:root:not(.theme-light) .legend-dot.friend,
:root.theme-dark       .legend-dot.friend {
  background: #a88a4a !important;
  background-image: none !important;
  border-color: #fff !important;
}

/* ============================================================
   LEAFLET MAP PIN COLORS — restore inline-style backgrounds
   ============================================================
   The aggressive inline-background dark-flip (lines 2920–2991)
   catches any element whose inline style starts with one of the
   "light cream" prefixes (#fff, #fef, #f4e, #e8c, #e8d, etc.)
   and forces it to walnut. The site's Leaflet divIcon map pins
   are built as <div style="background:#XXXXXX; …"> and any pin
   whose color matches one of those prefixes gets bleached.

   The single color presently affected is #e8c878 (the Charles
   map "1865 first residence" pin), but we list every pin color
   used in the JS COLORS objects across the site so the fix is
   robust against future flip-prefix expansions. The override is
   scoped to .leaflet-marker-icon descendants so the broader
   dark-flip behaviour is preserved everywhere else.

   Added 18 May 2026.
   ============================================================ */
:root:not(.theme-light) .leaflet-marker-icon > div[style*="background:#e8c878"],
:root.theme-dark       .leaflet-marker-icon > div[style*="background:#e8c878"],
:root:not(.theme-light) .leaflet-marker-icon > div[style*="background: #e8c878"],
:root.theme-dark       .leaflet-marker-icon > div[style*="background: #e8c878"] {
  background: #e8c878 !important;
  background-image: none !important;
}
:root:not(.theme-light) .leaflet-marker-icon > div[style*="background:#c89640"],
:root.theme-dark       .leaflet-marker-icon > div[style*="background:#c89640"] {
  background: #c89640 !important;
  background-image: none !important;
}
:root:not(.theme-light) .leaflet-marker-icon > div[style*="background:#a04020"],
:root.theme-dark       .leaflet-marker-icon > div[style*="background:#a04020"] {
  background: #a04020 !important;
  background-image: none !important;
}
:root:not(.theme-light) .leaflet-marker-icon > div[style*="background:#5a4a8a"],
:root.theme-dark       .leaflet-marker-icon > div[style*="background:#5a4a8a"] {
  background: #5a4a8a !important;
  background-image: none !important;
}
:root:not(.theme-light) .leaflet-marker-icon > div[style*="background:#3a4a3a"],
:root.theme-dark       .leaflet-marker-icon > div[style*="background:#3a4a3a"] {
  background: #3a4a3a !important;
  background-image: none !important;
}
:root:not(.theme-light) .leaflet-marker-icon > div[style*="background:#c84a4a"],
:root.theme-dark       .leaflet-marker-icon > div[style*="background:#c84a4a"] {
  background: #c84a4a !important;
  background-image: none !important;
}
:root:not(.theme-light) .leaflet-marker-icon > div[style*="background:#c8754a"],
:root.theme-dark       .leaflet-marker-icon > div[style*="background:#c8754a"] {
  background: #c8754a !important;
  background-image: none !important;
}
:root:not(.theme-light) .leaflet-marker-icon > div[style*="background:#8a3a3a"],
:root.theme-dark       .leaflet-marker-icon > div[style*="background:#8a3a3a"] {
  background: #8a3a3a !important;
  background-image: none !important;
}
:root:not(.theme-light) .leaflet-marker-icon > div[style*="background:#3a5878"],
:root.theme-dark       .leaflet-marker-icon > div[style*="background:#3a5878"] {
  background: #3a5878 !important;
  background-image: none !important;
}
:root:not(.theme-light) .leaflet-marker-icon > div[style*="background:#4a76c8"],
:root.theme-dark       .leaflet-marker-icon > div[style*="background:#4a76c8"] {
  background: #4a76c8 !important;
  background-image: none !important;
}
:root:not(.theme-light) .leaflet-marker-icon > div[style*="background:#d8b366"],
:root.theme-dark       .leaflet-marker-icon > div[style*="background:#d8b366"] {
  background: #d8b366 !important;
  background-image: none !important;
}
:root:not(.theme-light) .leaflet-marker-icon > div[style*="background:#5a8a4a"],
:root.theme-dark       .leaflet-marker-icon > div[style*="background:#5a8a4a"] {
  background: #5a8a4a !important;
  background-image: none !important;
}
:root:not(.theme-light) .leaflet-marker-icon > div[style*="background:#8a6a14"],
:root.theme-dark       .leaflet-marker-icon > div[style*="background:#8a6a14"] {
  background: #8a6a14 !important;
  background-image: none !important;
}
:root:not(.theme-light) .leaflet-marker-icon > div[style*="background:#c87a30"],
:root.theme-dark       .leaflet-marker-icon > div[style*="background:#c87a30"] {
  background: #c87a30 !important;
  background-image: none !important;
}
:root:not(.theme-light) .leaflet-marker-icon > div[style*="background:#4a6e34"],
:root.theme-dark       .leaflet-marker-icon > div[style*="background:#4a6e34"] {
  background: #4a6e34 !important;
  background-image: none !important;
}
:root:not(.theme-light) .leaflet-marker-icon > div[style*="background:#8a4a4a"],
:root.theme-dark       .leaflet-marker-icon > div[style*="background:#8a4a4a"] {
  background: #8a4a4a !important;
  background-image: none !important;
}
:root:not(.theme-light) .leaflet-marker-icon > div[style*="background:#4a8a4a"],
:root.theme-dark       .leaflet-marker-icon > div[style*="background:#4a8a4a"] {
  background: #4a8a4a !important;
  background-image: none !important;
}
:root:not(.theme-light) .leaflet-marker-icon > div[style*="background:#c8581a"],
:root.theme-dark       .leaflet-marker-icon > div[style*="background:#c8581a"] {
  background: #c8581a !important;
  background-image: none !important;
}
:root:not(.theme-light) .leaflet-marker-icon > div[style*="background:#8a6420"],
:root.theme-dark       .leaflet-marker-icon > div[style*="background:#8a6420"] {
  background: #8a6420 !important;
  background-image: none !important;
}
:root:not(.theme-light) .leaflet-marker-icon > div[style*="background:#7a6a52"],
:root.theme-dark       .leaflet-marker-icon > div[style*="background:#7a6a52"] {
  background: #7a6a52 !important;
  background-image: none !important;
}
:root:not(.theme-light) .leaflet-marker-icon > div[style*="background:#5a7aa8"],
:root.theme-dark       .leaflet-marker-icon > div[style*="background:#5a7aa8"] {
  background: #5a7aa8 !important;
  background-image: none !important;
}
:root:not(.theme-light) .leaflet-marker-icon > div[style*="background:#a8a08a"],
:root.theme-dark       .leaflet-marker-icon > div[style*="background:#a8a08a"] {
  background: #a8a08a !important;
  background-image: none !important;
}
:root:not(.theme-light) .leaflet-marker-icon > div[style*="background:#3a6090"],
:root.theme-dark       .leaflet-marker-icon > div[style*="background:#3a6090"] {
  background: #3a6090 !important;
  background-image: none !important;
}
:root:not(.theme-light) .leaflet-marker-icon > div[style*="background:#a76a30"],
:root.theme-dark       .leaflet-marker-icon > div[style*="background:#a76a30"] {
  background: #a76a30 !important;
  background-image: none !important;
}
:root:not(.theme-light) .leaflet-marker-icon > div[style*="background:#7a3a8a"],
:root.theme-dark       .leaflet-marker-icon > div[style*="background:#7a3a8a"] {
  background: #7a3a8a !important;
  background-image: none !important;
}
:root:not(.theme-light) .leaflet-marker-icon > div[style*="background:#c8b896"],
:root.theme-dark       .leaflet-marker-icon > div[style*="background:#c8b896"] {
  background: #c8b896 !important;
  background-image: none !important;
}
:root:not(.theme-light) .leaflet-marker-icon > div[style*="background:#b06820"],
:root.theme-dark       .leaflet-marker-icon > div[style*="background:#b06820"] {
  background: #b06820 !important;
  background-image: none !important;
}
:root:not(.theme-light) .leaflet-marker-icon > div[style*="background:#a88a4a"],
:root.theme-dark       .leaflet-marker-icon > div[style*="background:#a88a4a"] {
  background: #a88a4a !important;
  background-image: none !important;
}
:root:not(.theme-light) .leaflet-marker-icon > div[style*="background:#2c2620"],
:root.theme-dark       .leaflet-marker-icon > div[style*="background:#2c2620"] {
  background: #1f2e45 !important;
  background-image: none !important;
}

/* ============================================================
   STAT-DETAIL PANEL — readable text in dark mode
   ============================================================
   .stat-detail is the panel that opens when a user clicks one of
   the "By the numbers" stat buttons (78+ Research Sessions, 7 Hesse
   Parishes Searched, etc.) on overview.html. The earlier sweep
   correctly flipped the panel BACKGROUND to dark walnut, but the
   panel's heading colors (.h4 #8a6420 dark gold, .h5 #6a5a42 dark
   sepia) and the parish-grid cell text (.pcell strong #8a6420,
   .pcell .src #8a7858, .archion-nav text #3a5a8a / #2c4068)
   remained as their light-mode dark-on-light values — rendering
   dark-on-dark and unreadable.
   ============================================================ */
:root:not(.theme-light) .stat-detail h4,
:root.theme-dark       .stat-detail h4 {
  color: #fadea0 !important;       /* warm pale gold heading */
  border-bottom-color: #5a4a32 !important;
}
:root:not(.theme-light) .stat-detail h5,
:root.theme-dark       .stat-detail h5 {
  color: #c8b896 !important;       /* muted cream eyebrow */
}
:root:not(.theme-light) .stat-detail p,
:root.theme-dark       .stat-detail p,
:root:not(.theme-light) .stat-detail ul,
:root.theme-dark       .stat-detail ul,
:root:not(.theme-light) .stat-detail ol,
:root.theme-dark       .stat-detail ol,
:root:not(.theme-light) .stat-detail li,
:root.theme-dark       .stat-detail li {
  color: #e8dfc8 !important;       /* cream body */
}
:root:not(.theme-light) .stat-detail a,
:root.theme-dark       .stat-detail a {
  color: #f1cf85 !important;       /* gold link */
}
:root:not(.theme-light) .stat-detail .parish-grid .pcell,
:root.theme-dark       .stat-detail .parish-grid .pcell {
  background: #1e2c43 !important;
  border-left-color: #d8b366 !important;
}
:root:not(.theme-light) .stat-detail .parish-grid .pcell strong,
:root.theme-dark       .stat-detail .parish-grid .pcell strong {
  color: #fadea0 !important;       /* pale gold parish name */
}
:root:not(.theme-light) .stat-detail .parish-grid .pcell .src,
:root.theme-dark       .stat-detail .parish-grid .pcell .src {
  color: #c8b896 !important;       /* muted cream source line */
}
:root:not(.theme-light) .stat-detail .parish-grid .pcell .src a,
:root.theme-dark       .stat-detail .parish-grid .pcell .src a {
  color: #f1cf85 !important;
}
:root:not(.theme-light) .stat-detail .parish-grid .pcell .src.archion-nav,
:root.theme-dark       .stat-detail .parish-grid .pcell .src.archion-nav {
  background: rgba(74,118,200,0.18) !important;
  border-left-color: #6a96d0 !important;
  color: #b8d4ff !important;       /* pale-sky Archion-blue */
}
:root:not(.theme-light) .stat-detail .parish-grid .pcell .src.archion-nav strong,
:root.theme-dark       .stat-detail .parish-grid .pcell .src.archion-nav strong {
  color: #b8d4ff !important;
}
:root:not(.theme-light) .stat-detail .parish-grid .pcell .src.archion-nav em,
:root.theme-dark       .stat-detail .parish-grid .pcell .src.archion-nav em {
  color: #d8e8ff !important;
}
:root:not(.theme-light) .stat-detail .parish-grid .pcell .src.archion-nav a,
:root.theme-dark       .stat-detail .parish-grid .pcell .src.archion-nav a {
  color: #d8e8ff !important;
  text-decoration: underline !important;
}
:root:not(.theme-light) .stat-detail .archion-breadcrumb,
:root.theme-dark       .stat-detail .archion-breadcrumb {
  background: rgba(74,118,200,0.18) !important;
  border-left-color: #6a96d0 !important;
  color: #b8d4ff !important;
}
:root:not(.theme-light) .stat-detail .archion-breadcrumb a,
:root.theme-dark       .stat-detail .archion-breadcrumb a {
  color: #d8e8ff !important;
}

/* Same treatment for the .stat buttons themselves so the click
   target reads clearly in dark mode. */
:root:not(.theme-light) .stat,
:root.theme-dark       .stat {
  color: #e8dfc8 !important;
  background: #1e2c43 !important;
  border-color: #33496b !important;
}
:root:not(.theme-light) .stat .num,
:root.theme-dark       .stat .num {
  color: #fadea0 !important;
}
:root:not(.theme-light) .stat .lab,
:root.theme-dark       .stat .lab {
  color: #c8b896 !important;
}
:root:not(.theme-light) .stat[aria-expanded="true"],
:root.theme-dark       .stat[aria-expanded="true"] {
  background: #33507a !important;
  border-color: #d8b366 !important;
}

/* ============================================================
   FINAL WORKING-BADGE FIX (cascade winner, site-wide)
   ============================================================
   The "★ Working" inline-style badge — used in the kv tables on
   index.html / charles-in-america / overview / germany / etc. —
   was rendering with cream text on gold because an earlier
   aggressive sweep targets `section.page [style*="color:#2c2620"]`
   and `section.page [style*="color:#1f1a14"]` (specificity 0,3,1)
   and forces those to var(--text-body) cream. That sweep beat the
   prior working-badge protect block (specificity 0,2,1).

   This block raises specificity to 0,3,2 by using `span[style*=]`,
   and it also comes later in the cascade. It covers every gold /
   amber inline-background hex used by Working badges across the
   site, both `#hex` and ` #hex` variants, with and without
   surrounding whitespace. Always: gold background, dark text.

   Added 18 May 2026.
   ============================================================ */
:root:not(.theme-light) span[style*="background:#d4a017"],
:root.theme-dark       span[style*="background:#d4a017"],
:root:not(.theme-light) span[style*="background: #d4a017"],
:root.theme-dark       span[style*="background: #d4a017"],
:root:not(.theme-light) span[style*="background:#d8b366"],
:root.theme-dark       span[style*="background:#d8b366"],
:root:not(.theme-light) span[style*="background: #d8b366"],
:root.theme-dark       span[style*="background: #d8b366"],
:root:not(.theme-light) span[style*="background:#c89020"],
:root.theme-dark       span[style*="background:#c89020"],
:root:not(.theme-light) span[style*="background: #c89020"],
:root.theme-dark       span[style*="background: #c89020"],
:root:not(.theme-light) span[style*="background:#c08400"],
:root.theme-dark       span[style*="background:#c08400"],
:root:not(.theme-light) span[style*="background: #c08400"],
:root.theme-dark       span[style*="background: #c08400"],
:root:not(.theme-light) span[style*="background:#b89018"],
:root.theme-dark       span[style*="background:#b89018"],
:root:not(.theme-light) span[style*="background: #b89018"],
:root.theme-dark       span[style*="background: #b89018"],
:root:not(.theme-light) span[style*="background:#b6912b"],
:root.theme-dark       span[style*="background:#b6912b"],
:root:not(.theme-light) span[style*="background: #b6912b"],
:root.theme-dark       span[style*="background: #b6912b"],
:root:not(.theme-light) span[style*="background:#a07820"],
:root.theme-dark       span[style*="background:#a07820"],
:root:not(.theme-light) span[style*="background: #a07820"],
:root.theme-dark       span[style*="background: #a07820"],
:root:not(.theme-light) span[style*="background:#c8a040"],
:root.theme-dark       span[style*="background:#c8a040"],
:root:not(.theme-light) span[style*="background: #c8a040"],
:root.theme-dark       span[style*="background: #c8a040"],
:root:not(.theme-light) span[style*="background:#d0a040"],
:root.theme-dark       span[style*="background:#d0a040"],
:root:not(.theme-light) span[style*="background: #d0a040"],
:root.theme-dark       span[style*="background: #d0a040"],
:root:not(.theme-light) span[style*="background:#e6c47a"],
:root.theme-dark       span[style*="background:#e6c47a"],
:root:not(.theme-light) span[style*="background: #e6c47a"],
:root.theme-dark       span[style*="background: #e6c47a"] {
  color: #162132 !important;          /* dark walnut text — readable */
  background-image: none !important;
  -webkit-text-fill-color: #162132 !important;
}

/* Mirror coverage for any non-span elements (div/a/strong/em variants). */
:root:not(.theme-light) section.page [style*="background:#d4a017"],
:root.theme-dark       section.page [style*="background:#d4a017"],
:root:not(.theme-light) section.page [style*="background: #d4a017"],
:root.theme-dark       section.page [style*="background: #d4a017"],
:root:not(.theme-light) section.page [style*="background:#d8b366"],
:root.theme-dark       section.page [style*="background:#d8b366"],
:root:not(.theme-light) section.page [style*="background: #d8b366"],
:root.theme-dark       section.page [style*="background: #d8b366"],
:root:not(.theme-light) section.page [style*="background:#c89020"],
:root.theme-dark       section.page [style*="background:#c89020"],
:root:not(.theme-light) section.page [style*="background: #c89020"],
:root.theme-dark       section.page [style*="background: #c89020"],
:root:not(.theme-light) section.page [style*="background:#c08400"],
:root.theme-dark       section.page [style*="background:#c08400"],
:root:not(.theme-light) section.page [style*="background: #c08400"],
:root.theme-dark       section.page [style*="background: #c08400"],
:root:not(.theme-light) section.page [style*="background:#b89018"],
:root.theme-dark       section.page [style*="background:#b89018"],
:root:not(.theme-light) section.page [style*="background: #b89018"],
:root.theme-dark       section.page [style*="background: #b89018"],
:root:not(.theme-light) section.page [style*="background:#b6912b"],
:root.theme-dark       section.page [style*="background:#b6912b"],
:root:not(.theme-light) section.page [style*="background: #b6912b"],
:root.theme-dark       section.page [style*="background: #b6912b"],
:root:not(.theme-light) section.page [style*="background:#a07820"],
:root.theme-dark       section.page [style*="background:#a07820"],
:root:not(.theme-light) section.page [style*="background: #a07820"],
:root.theme-dark       section.page [style*="background: #a07820"],
:root:not(.theme-light) section.page [style*="background:#c8a040"],
:root.theme-dark       section.page [style*="background:#c8a040"],
:root:not(.theme-light) section.page [style*="background: #c8a040"],
:root.theme-dark       section.page [style*="background: #c8a040"],
:root:not(.theme-light) section.page [style*="background:#d0a040"],
:root.theme-dark       section.page [style*="background:#d0a040"],
:root:not(.theme-light) section.page [style*="background: #d0a040"],
:root.theme-dark       section.page [style*="background: #d0a040"],
:root:not(.theme-light) section.page [style*="background:#e6c47a"],
:root.theme-dark       section.page [style*="background:#e6c47a"],
:root:not(.theme-light) section.page [style*="background: #e6c47a"],
:root.theme-dark       section.page [style*="background: #e6c47a"] {
  color: #162132 !important;
  background-image: none !important;
  -webkit-text-fill-color: #162132 !important;
}

/* All descendants of the gold inline-style badges inherit the dark text too,
   so any nested <strong>/<em>/<span> stay readable. */
:root:not(.theme-light) [style*="background:#d4a017"] *,
:root.theme-dark       [style*="background:#d4a017"] *,
:root:not(.theme-light) [style*="background: #d4a017"] *,
:root.theme-dark       [style*="background: #d4a017"] *,
:root:not(.theme-light) [style*="background:#d8b366"] *,
:root.theme-dark       [style*="background:#d8b366"] *,
:root:not(.theme-light) [style*="background: #d8b366"] *,
:root.theme-dark       [style*="background: #d8b366"] *,
:root:not(.theme-light) [style*="background:#c89020"] *,
:root.theme-dark       [style*="background:#c89020"] *,
:root:not(.theme-light) [style*="background: #c89020"] *,
:root.theme-dark       [style*="background: #c89020"] *,
:root:not(.theme-light) [style*="background:#c08400"] *,
:root.theme-dark       [style*="background:#c08400"] *,
:root:not(.theme-light) [style*="background: #c08400"] *,
:root.theme-dark       [style*="background: #c08400"] *,
:root:not(.theme-light) [style*="background:#b89018"] *,
:root.theme-dark       [style*="background:#b89018"] *,
:root:not(.theme-light) [style*="background: #b89018"] *,
:root.theme-dark       [style*="background: #b89018"] *,
:root:not(.theme-light) [style*="background:#b6912b"] *,
:root.theme-dark       [style*="background:#b6912b"] *,
:root:not(.theme-light) [style*="background: #b6912b"] *,
:root.theme-dark       [style*="background: #b6912b"] *,
:root:not(.theme-light) [style*="background:#a07820"] *,
:root.theme-dark       [style*="background:#a07820"] *,
:root:not(.theme-light) [style*="background: #a07820"] *,
:root.theme-dark       [style*="background: #a07820"] *,
:root:not(.theme-light) [style*="background:#e6c47a"] *,
:root.theme-dark       [style*="background:#e6c47a"] * {
  color: #162132 !important;
  -webkit-text-fill-color: #162132 !important;
}

/* Also harden the class-based Working pills with section.page-equal
   specificity so the same aggressive sweep never beats them again. */
:root:not(.theme-light) section.page .conf.working,
:root.theme-dark       section.page .conf.working,
:root:not(.theme-light) section.page .conf-pill.working,
:root.theme-dark       section.page .conf-pill.working,
:root:not(.theme-light) section.page .cl-pill.working,
:root.theme-dark       section.page .cl-pill.working,
:root:not(.theme-light) section.page .ss-pill.working,
:root.theme-dark       section.page .ss-pill.working,
:root:not(.theme-light) section.page .pill.working,
:root.theme-dark       section.page .pill.working,
:root:not(.theme-light) section.page .badge.working,
:root.theme-dark       section.page .badge.working,
:root:not(.theme-light) .conf.working,
:root.theme-dark       .conf.working,
:root:not(.theme-light) .conf-pill.working,
:root.theme-dark       .conf-pill.working,
:root:not(.theme-light) .cl-pill.working,
:root.theme-dark       .cl-pill.working,
:root:not(.theme-light) .ss-pill.working,
:root.theme-dark       .ss-pill.working,
:root:not(.theme-light) .pill.working,
:root.theme-dark       .pill.working,
:root:not(.theme-light) .badge.working,
:root.theme-dark       .badge.working {
  background: #d8b366 !important;
  background-image: none !important;
  color: #162132 !important;
  -webkit-text-fill-color: #162132 !important;
  border-color: #b89018 !important;
}
:root:not(.theme-light) section.page .conf.working *,
:root.theme-dark       section.page .conf.working *,
:root:not(.theme-light) section.page .conf-pill.working *,
:root.theme-dark       section.page .conf-pill.working *,
:root:not(.theme-light) section.page .cl-pill.working *,
:root.theme-dark       section.page .cl-pill.working *,
:root:not(.theme-light) section.page .pill.working *,
:root.theme-dark       section.page .pill.working * {
  color: #162132 !important;
  -webkit-text-fill-color: #162132 !important;
}


/* ============================================================
   Always-dark hero banners — keep subtitle text light in LIGHT mode
   (29 May 2026 contrast fix)
   ------------------------------------------------------------
   The cinematic hero banner (header.cinema-section-hero) draws its
   dark background from a theme-independent ::before gradient, so it
   stays dark in BOTH themes. The big auto-generated "dark-text sweep"
   above accidentally included `header.<x>-hero .sub` selectors WITHOUT
   a `:root:not(.theme-light)` prefix, so in LIGHT mode it forced the
   subtitle to var(--text-body) (a dark colour) — invisible on the dark
   banner (measured contrast ~1.26:1). The h1 kept its prefix and was
   unaffected. Restore a light subtitle colour in light mode; specificity
   (0,3,1) + !important beats the sweep's (0,2,1) !important.
   ============================================================ */
:root.theme-light header.cinema-section-hero .sub,
:root.theme-light header.cinema-section-hero .csh__sub,
:root.theme-light header.cinema-section-hero .lifespan {
  color: var(--text-on-dark-d, #c8b896) !important;
}
:root.theme-light header.cinema-section-hero .crumbs {
  color: var(--text-on-dark-d, #c8b896) !important;
}

/* ============================================================
   Hero breadcrumb LINK visibility in LIGHT mode (fix, May 2026).
   Many per-hero dark-mode selector groups applied
   `color: var(--text-body) !important` to `header.<x>-hero .crumbs a`
   without a theme prefix (only the first selector in each comma-group
   was scoped to :root:not(.theme-light)). That dark colour leaked into
   light mode and hid the "Charles Gannsen Research" crumb link on the
   dark hero banner — which is dark in BOTH themes. Re-assert the gilt
   link treatment in light mode for every hero. The generic
   `:root.theme-light header .crumbs a` selector (0,0,3,2) outranks the
   leaked `header.<x>-hero .crumbs a` rules (0,0,2,2).
   ============================================================ */
:root.theme-light header .crumbs a,
:root.theme-light header.cinema-section-hero .crumbs a {
  color: var(--gilt, #d8b366) !important;
  border-bottom: none !important;
}
:root.theme-light header .crumbs a:hover,
:root.theme-light header.cinema-section-hero .crumbs a:hover {
  color: var(--gilt-bright, #f1cf85) !important;
}
/* Safety: keep the non-link crumb text light on every dark hero banner
   in light mode, not just cinema-section-hero ones. */
:root.theme-light header .crumbs {
  color: var(--text-on-dark-d, #c8b896) !important;
}

/* ============================================================
   LIGHT-MODE CORRECTION — document/transcription "form" blocks
   (St. Louis pension paperwork, NARA & Fold3 service records,
   and any page-by-page register viewers).
   The :root:not(.theme-light) rules earlier in this file force
   these blocks dark even in AUTO mode on a LIGHT OS, producing
   dark forms on an otherwise light page. Restore the light
   parchment palette for explicit light mode and for auto+light
   OS; real dark mode (.theme-dark / prefers dark) is untouched.
   ============================================================ */
:root.theme-light .page-block { background:#fffaf0; border-color:#d8c8a8; }
:root.theme-light .page-block > summary { background:linear-gradient(140deg,#f6ebd2,#f6ebd2); color:#3a2f1e; }
:root.theme-light .page-block[open] > summary { border-bottom-color:#d8c8a8; }
:root.theme-light .page-block .page-body .body-text { background:#f6ebd2; color:#2c2620; border-left-color:#d8b366; }
:root.theme-light .page-block .page-body dl.page-meta dd { color:#2c2620; }
:root.theme-light .page-toolbar { background:#f6ebd2; border-color:#d8c8a8; }

@media (prefers-color-scheme: light) {
  :root:not(.theme-dark) .page-block { background:#fffaf0; border-color:#d8c8a8; }
  :root:not(.theme-dark) .page-block > summary { background:linear-gradient(140deg,#f6ebd2,#ede4d0); color:#263855; }
  :root:not(.theme-dark) .page-block[open] > summary { border-bottom-color:#d8c8a8; }
  :root:not(.theme-dark) .page-block .page-body .body-text { background:#f6ebd2; color:#1f2e45; border-left-color:#c9a76a; }
  :root:not(.theme-dark) .page-block .page-body dl.page-meta dd { color:#1f2e45; }
  :root:not(.theme-dark) .page-toolbar { background:#ede4d0; border-color:#d8c8a8; }
}

/* ============================================================
   6 June 2026 — back-nav footer ("↩ Back to … on the main site")
   light-mode contrast fix. The shared rule forces .back-nav a to
   the light cream --text-body in the default/dark theme; pages
   default to dark unless localStorage.theme==="light", and the
   bar had no explicit light-mode styling, so in light mode the
   link could render low-contrast / the bar looked dark. Force a
   transparent bar and a readable dark brand link in light mode.
   Applies site-wide (every page loads dark-mode.css). Scoped to
   :root.theme-light so it never touches the dark theme.
   ============================================================ */
:root.theme-light footer.back-nav,
:root.theme-light .back-nav {
  background: transparent !important;
  border-top: 1px solid var(--border-light, #d8c8a8) !important;
}
:root.theme-light .back-nav a {
  background: transparent !important;
  color: var(--brand-dark, #8a5a1a) !important;
  border-color: var(--brand-dark, #8a6420) !important;
}
:root.theme-light .back-nav a:hover {
  background: var(--brand-dark, #8a5a12) !important;
  color: #fff !important;
}

/* ============================================================
   Evidence-analysis term colour standard (sitewide) + dark-mode
   polish — added 19 June 2026. Defined at TOP LEVEL (outside the
   prefers-color-scheme block) so the BASE colours apply in light
   mode, with .theme-dark overrides for both OS-default and
   user-toggled dark mode. Authoritative copy.
     Source      — original (green)  / derivative (amber)
     Information — primary (blue)     / secondary (indigo)
     Evidence    — direct (violet) / indirect (mauve) / negative (red)
   ============================================================ */
.ev-original   { color: #224777; font-weight: 700; }
.ev-derivative { color: #9a6510; font-weight: 700; }
.ev-primary    { color: #1f5e9e; font-weight: 700; }
.ev-secondary  { color: #4a4f86; font-weight: 700; }
.ev-direct     { color: #866935; font-weight: 700; }
.ev-indirect   { color: #816a42; font-weight: 700; }
.ev-negative   { color: #835f41; font-weight: 700; }
.ev-swatch { display: inline-block; width: 0.78em; height: 0.78em; border-radius: 2px; margin-right: 0.35em; vertical-align: -0.06em; }
.ev-swatch.ev-original   { background: #1f7a3a; }
.ev-swatch.ev-derivative { background: #9a6510; }
.ev-swatch.ev-primary    { background: #1f5e9e; }
.ev-swatch.ev-secondary  { background: #4a4f86; }
.ev-swatch.ev-direct     { background: #6a3fa0; }
.ev-swatch.ev-indirect   { background: #9a4f8e; }
.ev-swatch.ev-negative   { background: #a83a32; }

:root.theme-dark .ev-original   { color: #7fa1ce; }
:root.theme-dark .ev-derivative { color: #e0b96a; }
:root.theme-dark .ev-primary    { color: #82b4e8; }
:root.theme-dark .ev-secondary  { color: #a8acd8; }
:root.theme-dark .ev-direct     { color: #e6cca0; }
:root.theme-dark .ev-indirect   { color: #d9c39c; }
:root.theme-dark .ev-negative   { color: #d3bba7; }
:root.theme-dark .ev-swatch.ev-original   { background: #7fce95; }
:root.theme-dark .ev-swatch.ev-derivative { background: #e0b96a; }
:root.theme-dark .ev-swatch.ev-primary    { background: #82b4e8; }
:root.theme-dark .ev-swatch.ev-secondary  { background: #a8acd8; }
:root.theme-dark .ev-swatch.ev-direct     { background: #bda0e6; }
:root.theme-dark .ev-swatch.ev-indirect   { background: #d99ccb; }
:root.theme-dark .ev-swatch.ev-negative   { background: #e89a92; }

/* Calmer links + muted Low/Moderate pills, for user-toggled dark mode
   (the @media(prefers-color-scheme:dark) block above covers OS-dark). */
:root.theme-dark a         { color: #e6cd96; }
:root.theme-dark a:hover   { color: #f3dfae; }
:root.theme-dark .pill.low { background: #1c2a3f; color: #f2e7cd; }
:root.theme-dark .pill.mod { background: #8a5a12; color: #f8efd1; }
