/* ---------- Dark mode, calmer (Dec 2, her note: "dark mode is kinda ugly right now") ----------
   What was off: the bright candy pink for links, the active nav item sitting in a pink box (light mode has none),
   highlights drawn as muddy olive boxes, a brown cast on every surface, navy and red logos lost on the dark,
   white bill pages glaring, and a hard step from Music into the night section.
   The fix, in one place and loaded last so it wins over the older dark rules in style.css and the feature files:
     1. One night palette: near-black with a little warmth (not brown), cards one step lighter, cream text.
     2. Things you press: a muted rose, garnet's dark-mode twin, instead of the bright pink.
     3. Highlights: the key fact in soft gold, no box behind it.
     4. Logos that are dark ink turn light. Paper pages and the Substack screenshot are dimmed a little.
   Light mode is untouched. */

/* 1 and 2. the palette. The section ids repeat style.css's per-section accent rule so this one wins. */
[data-theme="dark"],
[data-theme="dark"] :is(#about, #now, #building, #pantheon, #gun-policy, #civics, #debate, #research, #music, #after-hours) {
  --page: #121110; --page-2: #191816; --sheet: #1B1A18;
  --ink: #EEE9E1; --ink-2: #D0C9BF; --muted: #9C958B;
  --line: rgba(238, 233, 225, 0.12);
  --acc: #D8A19D; --red: #D8A19D;
  --dk-gold: #E3C58A;
  --acc-soft: rgba(227, 197, 138, 0.55); --marker: rgba(227, 197, 138, 0.55);
}
[data-theme="dark"] body,
[data-theme="dark"] main > .sec,
[data-theme="dark"] #civics, [data-theme="dark"] #research { background-color: var(--page); }
[data-theme="dark"] .hero-collage { background: #0C0B0A; }

/* the bar: plain, and the current section in ink and heavier, like light mode (no pink box) */
[data-theme="dark"] .nav { background: color-mix(in srgb, var(--page) 94%, transparent); }
[data-theme="dark"] .nav ul a[aria-current="true"] { background: none; color: var(--ink); font-weight: 650; }

/* 3. highlights: the key fact in soft gold, no box. (Of three tries, an underline read as a link and a faint band
   still looked muddy; plain gold words were the cleanest.) Light mode keeps its drawn-in marker. */
[data-theme="dark"] main mark, [data-theme="dark"] .wr-track b {
  color: var(--dk-gold); background: none; padding: 0; margin: 0; border-radius: 0;
}
[data-theme="dark"] main .dash li mark, [data-theme="dark"] main .meta mark, [data-theme="dark"] #debate .rr-track mark { color: var(--dk-gold); }
/* the small result labels and pill tags that were filled with the marker: plain gold words too */
[data-theme="dark"] #debate .rc-result, [data-theme="dark"] #music .mu-tag { background: none; padding-left: 0; padding-right: 0; color: var(--dk-gold); }

/* links and small presses that had the old pink written in */
[data-theme="dark"] .vw-more,
[data-theme="dark"] .footer .mail-link:hover, [data-theme="dark"] .footer .mail-link:focus-visible,
[data-theme="dark"] .footer .ft-links a:hover, [data-theme="dark"] .footer .ft-links a:focus-visible { color: var(--acc); }
[data-theme="dark"] .vp-cc[aria-pressed="true"]::after { background: var(--acc); }

/* cards: one step up from the page, no outline */
[data-theme="dark"] .tile, [data-theme="dark"] .bill2, [data-theme="dark"] .teams li, [data-theme="dark"] .peek-card { background: var(--sheet); }
[data-theme="dark"] .flow { background: var(--page-2); }

/* 4. logos in dark ink turn light: the results list (Kentucky "UK", Yale, Emory, Stanford) */
[data-theme="dark"] #debate .rr-track img:is([src*="toc-icon"], [src*="yale"], [src*="emory"], [src*="stanford"]) { filter: brightness(0) invert(0.92) sepia(0.06); }

/* paper and screenshots: a little dimmer, so a white page doesn't glare on the night */
[data-theme="dark"] main img:is([src*="images/bill-"], [src*="images/docs/"], [src*="loaded-home"]) { filter: brightness(0.9); }

/* Music runs into the night section with a soft fall into the dark, not a hard step */
[data-theme="dark"] main > #after-hours.uv-night { background: linear-gradient(to bottom, var(--page) 0, #0C0B0A min(240px, 30%)); }
[data-theme="dark"] .footer { background: #0C0B0A; }
