:root {
  --bg: #fdfdfc;
  --fg: #1b1f24;
  --muted: #57606a;
  --accent: #1f4e79;
  --accent-soft: #e8eff6;
  --border: #d8dde3;
  --stripe: #f4f6f8;
  --card: #ffffff;
  --accent-on: #ffffff;      /* text on an --accent fill: 8.66:1 */
  --control-border: #868f99; /* control boundary: 3.22:1 vs --bg */
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #101418;
    --fg: #e6e9ec;
    --muted: #9aa4af;
    --accent: #7ab3e0;
    --accent-soft: #1a2733;
    --border: #2c343c;
    --stripe: #171d23;
    --card: #151a20;
    /* white on the dark accent measured 2.25:1 — the worst number on the
       site, and it carried the "which filters are on" signal. 8.46:1. */
    --accent-on: #0b1116;
    --control-border: #646f7a;   /* 3.61:1 vs --bg */
  }
}
* { box-sizing: border-box; }
/* Visually hidden but present for assistive technology: the one utility
   several accessibility fixes share. clip-path rather than clip, and a
   1px box rather than display:none, so the text stays in the
   accessibility tree and inside inline layout. */
.vh {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  line-height: 1.6;
  font-size: 1rem;
}
.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 10;
  padding: 0.5rem 0.9rem;
  background: var(--card); color: var(--accent);
  border: 2px solid var(--accent); border-radius: 0 0 6px 0;
  font-size: 0.95rem; text-decoration: none;
}
.skip-link:focus { left: 0; }
.site-header {
  border-bottom: 1px solid var(--border);
  background: var(--accent-soft);
}
.site-header nav {
  max-width: 46rem;
  margin: 0 auto;
  padding: 0.6rem 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  align-items: baseline;
  justify-content: space-between;
}
.brand {
  font-weight: 700;
  text-decoration: none;
  color: var(--accent);
  letter-spacing: 0.01em;
}
/* The acronym is always expanded in the header (branding rule). Lighter
   weight so the mark still reads as the mark, and it wraps rather than
   pushing the nav off a narrow screen. */
.brand-full { font-weight: 400; font-size: 0.92em; }
.nav-links {
  display: inline-flex; flex-wrap: wrap; gap: 0.15rem 0;
  font-size: 0.85rem;
}
.nav-links a {
  color: var(--muted);
  text-decoration: none;
  margin-left: 0.9rem;
  white-space: nowrap;   /* multi-word labels never break mid-name */
}
.nav-links a:hover, .brand:hover { text-decoration: underline; }
main {
  max-width: 46rem;
  margin: 0 auto;
  padding: 1.2rem 1rem 3rem;
}
h1 { font-size: 1.65rem; line-height: 1.25; margin: 1.2rem 0 0.8rem; }
h2 {
  font-size: 1.25rem;
  margin: 2rem 0 0.7rem;
  padding-bottom: 0.25rem;
  border-bottom: 2px solid var(--accent-soft);
  color: var(--accent);
}
h3 { font-size: 1.08rem; margin: 1.4rem 0 0.5rem; }
h4 {
  font-size: 0.92rem;
  margin: 1.2rem 0 0.4rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
}
a { color: var(--accent); }
hr { border: 0; border-top: 1px solid var(--border); margin: 2rem 0; }
em { color: var(--muted); }
code {
  background: var(--stripe);
  padding: 0.1em 0.35em;
  border-radius: 4px;
  font-size: 0.9em;
}
ul { padding-left: 1.3rem; }
li { margin: 0.35rem 0; }
li > ul { margin-top: 0.15rem; }
li li { font-size: 0.95rem; }
/* `display: block` on a <table> strips the table, row, and cell roles
   from the accessibility tree, so a counts table is announced as a flat
   run of numbers with no headers. The horizontal-scroll job moves to a
   wrapper element, which is also focusable so it can be scrolled from
   the keyboard (A11Y-03). */
table {
  border-collapse: collapse;
  margin: 1rem 0;
  font-size: 0.92rem;
}
.table-scroll { overflow-x: auto; margin: 1rem 0; }
.table-scroll:focus-visible {
  outline: 3px solid var(--accent); outline-offset: 2px;
}
/* The site's own focus indicator: the user-agent ring's contrast against
   --accent-soft and --card is not ours to control. --accent measures
   8.51:1 on --bg (light) and 8.24:1 (dark); :where() keeps specificity
   at zero so nothing existing is overridden. */
:where(a, button, summary, [tabindex]):focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
  border-radius: 2px;
}
th, td {
  border: 1px solid var(--border);
  padding: 0.4rem 0.7rem;
  text-align: left;
}
th { background: var(--accent-soft); }
tr:nth-child(even) td { background: var(--stripe); }
img {
  max-width: 100%;
  height: auto;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fff;
}
/* Digest structure layer: compact header, tag chips, collapsible sections
   (native details/summary — the site remains JS-free). */
.digest-meta {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.4rem 1rem;
  margin: 0.4rem 0 1.4rem; padding-bottom: 0.8rem;
  border-bottom: 1px solid var(--border);
}
.meta-generated { font-size: 0.8rem; color: var(--muted); }
.meta-more { font-size: 0.8rem; color: var(--muted); }
.meta-more summary { cursor: pointer; color: var(--accent); }
.meta-more dl { margin: 0.4rem 0 0; }
.meta-more dt { font-weight: 600; margin-top: 0.3rem; }
.meta-more dd { margin: 0; overflow-wrap: anywhere; }
.tags { margin: 0.35rem 0; line-height: 1.9; }
.tag {
  display: inline-block; padding: 0.05rem 0.55rem; margin-right: 0.3rem;
  border: 1px solid var(--border); border-radius: 999px;
  background: var(--stripe); color: var(--muted);
  font-size: 0.72rem; letter-spacing: 0.02em; white-space: nowrap;
}
.tag-model { border-style: dashed; font-style: italic; }
/* Filter chips are user interface components, so their boundary needs
   3:1 (1.4.11): --border measured 1.34:1. Also 2.5.8 Target Size — an
   entry chip computed 22.0 px tall, and the entry chips are the ones a
   reader taps while reading an item. 11.52 x 1.6 + 2 x 4.8 + 2 = 30.0 px.
   Placed BEFORE the branch block on purpose: equal specificity, so the
   branch rules' currentColor border must come later to win. */
.filter-chip, .chip-toggle {
  cursor: pointer; user-select: none;
  padding-top: 0.3rem; padding-bottom: 0.3rem;
  border-color: var(--control-border);
}
/* Branch colors — deliberately not the red/blue party palette. */
/* Light-theme hues darkened to clear 4.5:1 (measured 5.02-5.71:1); the
   hues themselves are unchanged, so branches stay off the party palette.
   currentColor borders also lift the 3:1 non-text contrast floor. */
.tag-branch-legislative {
  background: rgba(99, 102, 241, 0.14); color: #4448b8;
  border-color: currentColor;
}
.tag-branch-executive {
  background: rgba(13, 148, 136, 0.14); color: #0b6b62;
  border-color: currentColor;
}
.tag-branch-judicial {
  background: rgba(217, 119, 6, 0.14); color: #8a5206;
  border-color: currentColor;
}
.tag-branch-cross {
  background: rgba(107, 114, 128, 0.14);
  border-color: currentColor;
}
@media (prefers-color-scheme: dark) {
  .tag-branch-legislative { color: #9fa0f2; }
  .tag-branch-executive { color: #2dd4bf; }
  .tag-branch-judicial { color: #fbbf24; }
}
details.digest-section {
  border: 1px solid var(--border); border-radius: 8px;
  background: var(--card); margin: 0.7rem 0; padding: 0;
}
details.digest-section > summary {
  cursor: pointer; padding: 0.7rem 0.9rem; list-style: none;
  display: flex; flex-direction: column; gap: 0.25rem;
}
details.digest-section > summary::-webkit-details-marker { display: none; }
/* The section title IS the <summary>'s heading (A11Y-04): a closed
   <details> keeps its contents out of the accessibility tree, so a
   heading placed after the summary is invisible to heading navigation
   and the anchor id it carries scrolls to a collapsed section. Restated
   here so a real <h2> keeps the summary's compact look. */
h2.sec-title {
  font-size: 1.05rem; font-weight: 650;
  margin: 0; padding: 0; border: 0; color: inherit;
}
/* `/ ""` is CSS alternative text: the triangle stays visible and stops
   being announced as "black right-pointing small triangle" (A11Y-15). */
h2.sec-title::before { content: "\25B8\00a0" / ""; color: var(--accent);
  font-size: 0.85em; }
details.digest-section[open] h2.sec-title::before {
  content: "\25BE\00a0" / "";
}
summary .sec-blurb { font-size: 0.92rem; color: var(--fg); opacity: 0.85; }
details.digest-section > *:not(summary) { margin-left: 0.9rem; margin-right: 0.9rem; }
details.digest-section[open] > summary .sec-blurb,
details.digest-section[open] > summary .tags { display: none; }

/* Digest readability layer (derived presentation; canonical md unstyled).
   Plain-speak = interpretation register; rule/source = subtle metadata. */
.plain {
  background: var(--accent-soft);
  border-left: 3px solid var(--accent);
  border-radius: 0 4px 4px 0;
  padding: 0.35rem 0.6rem;
  margin: 0.3rem 0;
  list-style: none;
  font-size: 0.95rem;
}
.plain-label {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--accent);
  margin-right: 0.45rem;
}
.plain-label::after { content: ":" / ""; }
/* Type styles apply wherever these appear; several call sites emit
   <span class="rule-note">, which the old li-only selector never
   reached, so those notes rendered at body size in full contrast. */
.rule-note, .source-note {
  font-size: 0.78rem;
  color: var(--muted);
  margin: 0.1rem 0;
}
li.rule-note, li.source-note { list-style: none; }
li.source-note a { color: var(--muted); }
.rule-id {
  border-bottom: 1px dotted var(--muted);
  cursor: help;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.74rem;
}
.site-footer {
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.85rem;
}
.site-footer p { max-width: 46rem; margin: 0 auto; padding: 1rem; }
.digest-list { list-style: none; padding: 0; }
.digest-list li {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.9rem 1.1rem;
  margin: 0.8rem 0;
}
.digest-list a.date {
  font-weight: 700;
  font-size: 1.05rem;
  text-decoration: none;
}
.digest-list p.teaser {
  margin: 0.4rem 0 0;
  color: var(--muted);
  font-size: 0.95rem;
}
.tagline { color: var(--muted); }
/* Source directory (sources.html): the registry rendered as grouped cards.
   Chips reuse .tag; the record folds into a native details (still JS-free). */
.src-counts { font-size: 1.02rem; }
.status-key {
  display: grid; grid-template-columns: max-content 1fr;
  gap: 0.35rem 0.7rem; margin: 0.8rem 0 1.2rem;
}
.status-key dt { margin: 0; }
.status-key dd { margin: 0; font-size: 0.9rem; color: var(--muted); }
.src-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.8rem 1rem;
  margin: 0.8rem 0;
}
.src-card .src-name {
  margin: 0; font-size: 1.02rem;
  text-transform: none; letter-spacing: normal; color: var(--fg);
}
.src-name a { text-decoration: none; }
.src-name a:hover { text-decoration: underline; }
.src-sub { margin: 0.25rem 0 0; font-size: 0.8rem; color: var(--muted); }
.src-desc { margin: 0.45rem 0 0; font-size: 0.92rem; }
.src-links { margin: 0.35rem 0 0; font-size: 0.85rem; }
.src-more { margin-top: 0.45rem; font-size: 0.8rem; color: var(--muted); }
.src-more summary { cursor: pointer; color: var(--accent); }
.src-more dl { margin: 0.4rem 0 0; }
.src-more dt { font-weight: 600; margin-top: 0.3rem; }
.src-more dd { margin: 0; overflow-wrap: anywhere; }
.tag-status-active {
  background: var(--accent-soft); color: var(--accent);
  border-color: var(--accent);
}
.tag-status-unavailable { border-style: dashed; }
.tag-status-excluded { border-style: dotted; }
/* Source health indicators. State is ALWAYS carried by three signals at
   once — the word, a glyph, and the colour — because colour alone fails
   1.4.1, grayscale printing, and forced-colors mode. Contrast measured
   over the composited chip tint on both --card and --stripe, in both
   themes: worst case 4.93:1 (delivering on stripe, light). The tint hue
   stays constant across themes and only the text colour flips, the same
   pattern the branch chips use. Quiet and no-data keep the plain --muted
   chip and are distinguished by border style, because neither is an
   observation of trouble and neither should look like one. */
.tag-health-delivering {
  background: rgba(26, 107, 60, 0.14); color: #1a6b3c;
  border-color: currentColor;
}
.tag-health-degraded {
  background: rgba(138, 75, 0, 0.14); color: #8a4b00;
  border-color: currentColor;
}
.tag-health-no-response {
  background: rgba(154, 42, 30, 0.14); color: #9a2a1e;
  border-color: currentColor;
}
.tag-health-quiet { border-style: dashed; }
.tag-health-no-data { border-style: dotted; }
@media (prefers-color-scheme: dark) {
  .tag-health-delivering { color: #6ee7a5; }
  .tag-health-degraded { color: #fbbf24; }
  .tag-health-no-response { color: #f7a394; }
}
.health-glyph { margin-right: 0.25em; }
.src-stats {
  margin: 0.5rem 0 0; padding: 0.45rem 0.7rem;
  background: var(--stripe); border: 1px solid var(--border);
  border-radius: 6px; font-size: 0.82rem;
}
.src-stats p { margin: 0.12rem 0; }
.src-stat-label { color: var(--muted); }
.src-unmeasured { color: var(--muted); }
.health-lead { margin: 0.6rem 0; }
.health-note { font-size: 0.82rem; color: var(--muted); }
.today-disclosure {
  border: 1px solid var(--border); border-left: 3px solid var(--accent);
  padding: 0.6rem 0.85rem; font-size: 0.88rem; color: var(--muted);
  border-radius: 4px;
}
.today-meta { font-size: 0.85rem; color: var(--muted); }
.today-list { list-style: none; padding-left: 0; }
.today-item { margin: 0.55rem 0; }
.today-time {
  font-family: ui-monospace, monospace; font-size: 0.78rem;
  color: var(--muted); margin-right: 0.35rem;
}
/* Local time is appended client-side beside the server-rendered UTC
   stamp; with scripting off, the UTC stamp simply stands alone. */
.localtime { color: var(--muted); font-size: 0.78rem; }
.today-summary { margin: 0.2rem 0 0 2.4rem; font-size: 0.92rem; }
.today-opening { color: var(--muted); }
.today-chips { margin: 0.15rem 0 0.1rem; }
.today-chips .tag { margin-right: 0.25rem; }
.today-item-meta {
  margin-left: 2.4rem; font-size: 0.78rem; color: var(--muted);
  overflow-wrap: anywhere;
}
/* Keyword filter (pure CSS :target — the site stays JavaScript-free).
   The per-keyword rules are generated into today.html's own <style>. */
/* Visually hidden but focusable: keyboard users still reach every chip. */
.filter-cb {
  position: absolute; width: 1px; height: 1px;
  opacity: 0; pointer-events: none;
}
.filter-bar {
  border: 1px solid var(--border); border-radius: 6px;
  background: var(--stripe); padding: 0.6rem 0.75rem; margin: 1rem 0;
}
/* The lead is a real heading (A11Y-13) so the filter is reachable by
   heading navigation on a page that otherwise had exactly one heading;
   the h2 defaults are restated away so the bar looks unchanged. */
h2.filter-lead {
  margin: 0 0 0.45rem; padding: 0; border: 0;
  font-size: 0.85rem; font-weight: 600; color: inherit;
}
.filter-chip { cursor: pointer; text-decoration: none; }
/* opacity: 0.7 over a tinted chip measured 2.11–3.10:1 (light) — the
   count inherits the chip's own compliant color instead (A11Y-05). */
.filter-n {
  margin-left: 0.4rem; font-weight: 600;
  font-variant-numeric: tabular-nums;
}
/* Which keywords are active, in words. Pre-rendered and revealed by CSS
   so the page stays script-free; on an engine without :has() the readout
   is simply absent, which shows the day unfiltered. */
.filter-status { margin: 0.4rem 0 0; font-size: 0.8rem; color: var(--muted); }
.filter-status > span { display: none; }
.today-stream:not(:has(.filter-cb:checked)) .fs-none { display: inline; }
.today-stream:has(.filter-cb:checked) .fs-lead { display: inline; }
/* A CSS counter over the items still displayed: counters do not
   increment for display:none elements, and counter scope reaches an
   element's following siblings, so a paragraph after the list can state
   how many survived the filter. Generated content, so it is a visual
   readout only — screen readers treat it inconsistently. */
.today-list { counter-reset: shown 0; }
.today-list > .today-item { counter-increment: shown; }
.filter-count {
  margin: 0.5rem 0 0; font-size: 0.8rem; color: var(--muted);
}
.filter-count::after { content: counter(shown) " item(s) shown."; }
.filter-clear {
  display: none; margin-left: 0.6rem; font-size: 0.78rem; font-weight: 400;
  padding: 0.1rem 0.6rem; border: 1px solid var(--border); border-radius: 999px;
  background: var(--card); color: var(--accent); cursor: pointer;
  font-family: inherit;
}
.filter-row { margin-top: 0.35rem; line-height: 2.1; }
.filter-branches {
  padding-bottom: 0.4rem; margin-bottom: 0.1rem;
  border-bottom: 1px dashed var(--border);
}
.chip-toggle:hover { border-color: var(--accent); }
.filter-note {
  display: block; margin-top: 0.4rem; font-size: 0.75rem; color: var(--muted);
}
@media (forced-colors: active) {
  /* Author colors are replaced by the system palette here: every chip
     tint collapses to Canvas and the :checked accent fill is discarded,
     so the check glyph is what carries "this filter is on". Background-
     coloured shapes (.live-dot) and any border drawn in a custom token
     need a system colour to stay visible at all. */
  .tag { border: 1px solid CanvasText; }
  .filter-chip, .chip-toggle { border: 1px solid ButtonBorder; }
  .filter-cb:checked ~ .filter-bar label { border-width: 3px; }
  .live-dot { outline: 1px solid CanvasText; }
  .skip-link { border: 2px solid CanvasText; }
  .plain { border-left: 3px solid Highlight; }
  .today-disclosure { border: 1px solid CanvasText; }
  a:focus-visible, button:focus-visible, .table-scroll:focus-visible,
  summary:focus-visible { outline: 3px solid Highlight; outline-offset: 2px; }
}
@media print {
  /* never print a filtered subset that could read as the whole day */
  .today-item { display: list-item !important; }
  .filter-bar { display: none; }
}
.live-callout {
  border: 1px solid var(--border); border-left: 3px solid #0f9488;
  border-radius: 4px; background: var(--card);
  padding: 0.6rem 0.85rem; font-size: 0.92rem;
}
.live-callout a { font-weight: 650; text-decoration: none; }
.live-callout a:hover { text-decoration: underline; }
.live-dot {
  display: inline-block; width: 0.55em; height: 0.55em;
  border-radius: 50%; background: #0f9488; margin-right: 0.4em;
}
/* Blog (blog.html + blog-<slug>.html): commentary about the project, kept
   visually separate from digest content. Cards mirror the digest-list card
   shape rather than sharing its selector, so the two can diverge. */
.post-list { list-style: none; padding: 0; }
.post-list li {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.9rem 1.1rem;
  margin: 0.8rem 0;
}
.post-list a.post-title {
  font-weight: 700;
  font-size: 1.05rem;
  text-decoration: none;
}
.post-list .post-date {
  display: block;
  font-size: 0.8rem;
  color: var(--muted);
}
.post-list p.teaser {
  margin: 0.4rem 0 0;
  color: var(--muted);
  font-size: 0.95rem;
}
.post-meta {
  margin: 0.2rem 0 1.4rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--border);
  font-size: 0.85rem;
  color: var(--muted);
}
.post-back {
  margin-top: 2.4rem;
  padding-top: 0.8rem;
  border-top: 1px solid var(--border);
  font-size: 0.9rem;
}
