:root {
  --navy: #14284b;
  --navy-light: #2b3a5c;
  --accent: #b22a22;
  --accent-light: #cf4a40;
  --cream: #ffffff;
  --paper: #ffffff;
  --ink: #151515;
  --ink-soft: #4d4d4d;
  --border: #c9c9c9;
  /* Dark surfaces (header, menu bar, table heads, footer) stay dark in both themes. */
  --chrome: #14284b;
  --chrome-deep: #121a2b;
  /* Navy as a fill (active pills and tabs); --navy itself is used for headings. */
  --fill-strong: #14284b;
  --tint: rgba(178, 42, 34, 0.05);
  --good: #1e6b3d;
  --error-bg: #fbeeea;
  --error-border: #d9a893;
  --error-ink: #6b2e1f;
  --flash: #f3e3c4;
  --shadow: rgba(26, 36, 56, 0.18);
  --shadow-soft: rgba(26, 36, 56, 0.08);
  --selection: rgba(178, 42, 34, 0.2);
  --g-presidents: #8f3a2b;
  --g-senate: #1a2438;
  --g-1976: #b07d2b;
  --g-reagan: #3f6b8f;
  --g-civil-rights: #2f6b3f;
  --g-pa: #6b4a8f;
  --font-serif: "IBM Plex Serif", Georgia, "Times New Roman", Times, serif;
  --font-sans: "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-sans);
  line-height: 1.55;
}

.wrap {
  max-width: 980px;
  margin: 0 auto;
  padding: 0 24px;
}

a { color: var(--accent); }

/* Header / hero */
.site-header {
  background: var(--chrome);
  color: #fff;
  padding: 56px 0 40px;
  border-bottom: 3px solid var(--accent);
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.72rem;
  color: #c9a98f;
  margin: 0 0 14px;
  font-weight: 600;
}

.site-header h1 {
  font-family: var(--font-serif);
  font-size: 2.75rem;
  margin: 0 0 6px;
  font-weight: 400;
  letter-spacing: -0.01em;
}

.hero-rule {
  width: 64px;
  height: 2px;
  background: var(--accent);
  border: none;
  margin: 18px 0 18px;
}

.subtitle {
  margin: 0;
  max-width: 640px;
  color: #cfd4e0;
  font-size: 1.02rem;
  font-family: var(--font-serif);
  font-style: italic;
}

.profile-header {
  display: flex;
  align-items: flex-start;
  gap: 36px;
}

.portrait {
  width: 220px;
  height: 264px;
  border-radius: 2px;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.25);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.3);
  flex-shrink: 0;
  background: var(--chrome);
}

.profile-header picture { display: block; flex-shrink: 0; line-height: 0; }

@media (max-width: 760px) {
  .portrait { width: 140px; height: 168px; }
}

.profile-years {
  list-style: none;
  margin: 18px 0 0;
  padding: 16px 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  font-size: 0.88rem;
  color: #b7bfd2;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
}

@media (max-width: 600px) {
  .profile-header { flex-direction: column; align-items: flex-start; text-align: left; }
}

/* Header search */
.header-search {
  position: relative;
  margin: 20px 0 4px;
  max-width: 420px;
}

.header-search input[type="search"] {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 2px;
  font-size: 0.95rem;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.header-search input[type="search"]::placeholder { color: #9aa3ba; }

.header-search input[type="search"]:focus {
  outline: 2px solid var(--accent-light);
  outline-offset: 1px;
  background: rgba(255, 255, 255, 0.12);
}

.search-results {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  max-width: 560px;
  max-height: 70vh;
  overflow-y: auto;
  background: var(--paper);
  color: var(--ink);
  border: 1px solid var(--border);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
  z-index: 20;
  font-size: 0.9rem;
}

.search-results .group-label {
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-soft);
  font-weight: 700;
  padding: 10px 14px 4px;
}

.search-results .result-item {
  display: block;
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  border-bottom: 1px solid var(--border);
  padding: 9px 14px;
  cursor: pointer;
  font-family: inherit;
  color: var(--ink);
}

.search-results .result-item:hover,
.search-results .result-item:focus {
  background: var(--cream);
}

.search-results .result-item .label { font-weight: 600; }
.search-results .result-item .sub { color: var(--ink-soft); font-size: 0.82rem; margin-top: 2px; }

.search-results .empty,
.search-results .hint {
  padding: 12px 14px;
  color: var(--ink-soft);
  font-style: italic;
}

.search-flash {
  animation: search-flash-fade 1.6s ease-out;
}

@keyframes search-flash-fade {
  from { background: var(--flash); }
  to { background: transparent; }
}

[hidden] { display: none !important; }

/* Top bar: his name, the five grouped menus, and search. It sticks to the top of the
   screen; the full banner above it appears only on the home page. */
/* Inner pages hide the banner visually but keep its heading for screen readers. */
html[data-page]:not([data-page="overview"]) .site-header {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  padding: 0;
  border: 0;
}

.topbar {
  background: var(--chrome);
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 30;
  border-bottom: 3px solid var(--accent);
}

.topbar-inner {
  display: flex;
  align-items: center;
  gap: 18px;
  min-height: 56px;
}

.wordmark {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  color: #fff;
  text-decoration: none;
  white-space: nowrap;
}
.wordmark:hover { color: #fff; text-decoration: underline; }

.site-nav { display: flex; gap: 2px; flex: 1; }
.nav-group { position: relative; }

.nav-group-btn {
  background: none;
  border: none;
  color: #d6dbe8;
  font: 600 0.86rem var(--font-sans);
  padding: 18px 10px 17px;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: inset 0 -3px 0 transparent;
}
.nav-group-btn::after { content: " ▾"; font-size: 0.7em; opacity: 0.7; }
.nav-group-btn:hover,
.nav-group-btn[aria-expanded="true"] { color: #fff; }
.nav-group.is-current .nav-group-btn { color: #fff; box-shadow: inset 0 -3px 0 #c9a77c; }

.nav-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 260px;
  background: var(--paper);
  border: 1px solid var(--border);
  box-shadow: 0 12px 28px var(--shadow);
  padding: 6px 0;
  z-index: 40;
}
.nav-group-btn[aria-expanded="true"] + .nav-menu { display: grid; }

.nav-link {
  display: grid;
  gap: 1px;
  padding: 9px 16px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.92rem;
}
.nav-link small { font-weight: 400; font-size: 0.78rem; color: var(--ink-soft); }
.nav-link:hover { background: var(--cream); color: var(--accent); }
.nav-link[aria-current="page"] { box-shadow: inset 3px 0 0 var(--accent); color: var(--accent); }

.menu-toggle {
  display: none;
  margin-left: auto;
  background: none;
  border: 1px solid rgba(255, 255, 255, 0.35);
  color: #fff;
  font: 600 0.85rem var(--font-sans);
  padding: 8px 14px;
  border-radius: 2px;
  cursor: pointer;
}
.menu-toggle::after { content: " ☰"; }
.menu-toggle[aria-expanded="true"]::after { content: " ✕"; }

.topbar .header-search { margin: 0; width: 230px; flex-shrink: 0; }
.topbar .header-search input[type="search"] { padding: 8px 12px; font-size: 0.88rem; }
.topbar .search-results { left: auto; right: 0; width: min(520px, 92vw); max-width: none; }

@media (max-width: 1080px) {
  .topbar-inner { flex-wrap: wrap; gap: 0 14px; }
  .topbar .header-search { order: 3; width: 100%; padding-bottom: 10px; }
}

@media (max-width: 820px) {
  .topbar-inner { padding-block: 8px; min-height: 0; }
  .menu-toggle { display: inline-block; }
  .site-nav {
    display: none;
    order: 4;
    flex-basis: 100%;
    flex-direction: column;
    background: var(--paper);
    margin: 8px calc(-1 * max(16px, env(safe-area-inset-left, 0px))) 0;
    padding: 8px 0 12px;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
  }
  .menu-toggle[aria-expanded="true"] ~ .site-nav { display: flex; }
  .nav-group-btn {
    color: var(--accent);
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 12px 20px 4px;
    pointer-events: none;
    box-shadow: none !important;
  }
  .nav-group-btn::after { content: none; }
  .nav-group.is-current .nav-group-btn { color: var(--accent); }
  .nav-menu { display: grid; position: static; box-shadow: none; border: none; padding: 0; min-width: 0; background: none; }
  .nav-link { padding: 8px 20px; }
  .topbar .header-search { order: 2; width: 100%; padding: 8px 0 2px; }
}

/* Page intro: where you are, what the page holds, and where it comes from. */
.page-intro { display: grid; gap: 6px; margin-bottom: 22px; max-width: 75ch; }
.page-intro h2 { margin: 0; }
.crumb { margin: 0; font-size: 0.78rem; color: var(--ink-soft); }
.crumb a { color: var(--ink-soft); }
.page-dek { margin: 0; font-family: var(--font-serif); font-size: 1.12rem; color: var(--ink); line-height: 1.45; }
.page-source { margin: 2px 0 0; justify-self: start; font-size: 0.78rem; color: var(--ink-soft); border: 1px solid var(--border); background: var(--paper); padding: 2px 8px; border-radius: 2px; }

/* Main content */
main.wrap {
  padding-top: 40px;
  padding-bottom: 64px;
  min-height: 50vh;
}

.tab-panel { display: none; }
.tab-panel.is-active { display: block; }

h2 {
  font-family: var(--font-serif);
  font-size: 1.7rem;
  font-weight: 400;
  margin: 0 0 4px;
  color: var(--navy);
}

h3 { font-weight: 600; }

.section-note {
  color: var(--ink-soft);
  max-width: 720px;
  margin: 0 0 20px;
  font-size: 0.95rem;
}

/* Sub-tabs (Legislation: Sponsored / Cosponsored) */
.subtabs {
  display: flex;
  gap: 4px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

.subtab-btn {
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  padding: 8px 4px;
  margin-right: 20px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--ink-soft);
  cursor: pointer;
}

.subtab-btn.is-active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.subtab-panel { display: none; }
.subtab-panel.is-active { display: block; }

/* Policy tab's outer Congress/HHS toggle -- deliberately a bolder, boxed segmented
   control rather than the underline style above, so it reads as the bigger structural
   choice (which source) that the underline tabs (which view within that source) sit
   inside of, not a second instance of the same control. */
.policy-subtabs {
  border-bottom: none;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 8px;
}

.policy-subtab-btn {
  background: none;
  border: 1px solid var(--border);
  padding: 8px 18px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
  border-radius: 2px;
  display: inline-block;
  text-decoration: none;
}

.policy-subtab-btn:hover { border-color: var(--accent); color: var(--accent); }
.policy-subtab-btn.is-active { background: var(--fill-strong); border-color: var(--fill-strong); color: #fff; }

.policy-subtab-panel { display: none; }
.policy-subtab-panel.is-active { display: block; }

/* Expandable bill cards (Legislation) */
.bill-list { display: flex; flex-direction: column; }

.bill-card {
  border-bottom: 1px solid var(--border);
}
.bill-card:first-child { border-top: 1px solid var(--border); }

.bill-card-summary {
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  padding: 13px 4px;
  cursor: pointer;
  display: grid;
  grid-template-columns: 90px 90px 1fr auto;
  gap: 12px;
  align-items: baseline;
  font: inherit;
  color: var(--ink);
}

.bill-card-summary:hover { background: var(--tint); }

.bill-card-summary .bill-date { color: var(--ink-soft); font-size: 0.85rem; }
.bill-card-summary .bill-number { font-weight: 700; color: var(--navy); }
.bill-card-summary .bill-title { font-size: 0.92rem; }
.bill-card-summary .bill-caret { color: var(--ink-soft); font-size: 0.8rem; }

.bill-card-detail {
  display: none;
  padding: 2px 4px 16px 4px;
  font-size: 0.88rem;
  color: var(--ink-soft);
}

.bill-card.is-open .bill-card-detail { display: block; }
.bill-card.is-open .bill-card-summary .bill-caret::before { content: "\2212"; }
.bill-card-summary .bill-caret::before { content: "\002B"; }

.bill-card-detail dl {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 6px 12px;
  margin: 10px 0;
}

.bill-card-detail dt { font-weight: 600; color: var(--ink); }
.bill-card-detail dd { margin: 0; }

@media (max-width: 700px) {
  .bill-card-summary { grid-template-columns: 1fr; gap: 4px; }
}

.milestone--election.bill-card { border: none; }
.election-row-summary {
  grid-template-columns: 1fr auto;
  align-items: start;
  padding: 0;
}
.election-row-summary .meta { display: block; color: var(--ink-soft); font-size: 0.85rem; }
.election-row-summary .result { display: block; font-weight: 600; margin-top: 2px; }
.election-row-summary .detail { display: block; font-size: 0.88rem; margin-top: 2px; }
.election-row-summary .note { display: block; font-size: 0.85rem; color: var(--ink-soft); margin-top: 2px; font-style: italic; }

/* Generic archival record row (elections, video, committees) */
.record-row {
  border-top: 1px solid var(--border);
  padding: 16px 0;
}
.record-list { border-bottom: 1px solid var(--border); }

.record-row .kicker {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  color: var(--navy);
  font-weight: 700;
}
.record-row .meta { color: var(--ink-soft); font-size: 0.85rem; margin: 2px 0 6px; }
.record-row .result { font-weight: 600; }
.record-row .detail { font-size: 0.9rem; margin-top: 3px; }
.record-row .note { font-size: 0.85rem; color: var(--ink-soft); margin-top: 4px; }
.record-row p { font-size: 0.9rem; margin: 0 0 6px; }
.record-row a { font-weight: 600; font-size: 0.88rem; }

/* Filter bar (sort toggle + year select), used above searchable tables */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  margin-bottom: 12px;
}

.sort-toggle {
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: 2px;
  padding: 8px 14px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
}

.sort-toggle:hover { border-color: var(--accent); color: var(--accent); }

.filter-bar select {
  max-width: 100%;
  min-width: 0;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 2px;
  background: var(--paper);
  font-size: 0.85rem;
  color: var(--ink);
}

/* Table controls */
.table-controls {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 12px;
}

.table-controls input[type="search"] {
  flex: 1;
  max-width: 360px;
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: 2px;
  font-size: 0.95rem;
  background: var(--paper);
}

.table-controls input[type="search"]:focus {
  outline: 2px solid var(--accent-light);
  outline-offset: 1px;
}

.result-count {
  color: var(--ink-soft);
  font-size: 0.88rem;
}

/* Tables */
.table-scroll {
  overflow-x: auto;
  border: 1px solid var(--border);
  background: var(--paper);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

thead th {
  position: sticky;
  top: 0;
  background: var(--chrome);
  color: #fff;
  text-align: left;
  padding: 10px 12px;
  font-weight: 600;
  white-space: nowrap;
  font-size: 0.82rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

tbody td {
  padding: 10px 12px;
  border-top: 1px solid var(--border);
  vertical-align: top;
}

tbody tr:hover { background: var(--tint); }

.snippet {
  color: var(--ink-soft);
  font-style: italic;
  font-size: 0.87rem;
  margin-top: 4px;
}

.vote-yea { color: var(--good); font-weight: 600; }
.vote-nay { color: var(--accent); font-weight: 600; }
.vote-other { color: var(--ink-soft); }

.link-btn {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  color: var(--accent);
  text-decoration: underline;
  cursor: pointer;
}

.fulltext-toggle {
  display: block;
  margin-top: 6px;
  font-size: 0.85rem;
}

.fulltext-row td { padding-top: 0; }

.fulltext-block {
  max-height: 420px;
  overflow-y: auto;
  background: var(--cream);
  border: 1px solid var(--border);
  padding: 14px 16px;
  font-size: 0.88rem;
  line-height: 1.55;
  white-space: pre-wrap;
  color: var(--ink);
}

.source-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--ink-soft);
  border: 1px solid var(--border);
  border-radius: 2px;
  padding: 1px 6px;
  margin-left: 6px;
  vertical-align: middle;
}

.law-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--accent);
  border: 1px solid currentColor;
  border-radius: 2px;
  padding: 1px 6px;
  margin-left: 6px;
  vertical-align: middle;
  white-space: nowrap;
}
.law-filter { display: inline-flex; align-items: center; gap: 6px; font-size: 0.9rem; color: var(--ink); cursor: pointer; }
.law-filter input { width: 16px; height: 16px; margin: 0; accent-color: var(--accent); }

.loading { color: var(--ink-soft); font-style: italic; padding: 20px 0; }
.error-box {
  background: var(--error-bg);
  border: 1px solid var(--error-border);
  color: var(--error-ink);
  padding: 14px 16px;
  border-radius: 2px;
}

/* Biography */
.bio-summary { max-width: 700px; font-size: 1.02rem; }

.positions-list { list-style: none; margin: 24px 0; padding: 0; border-top: 1px solid var(--border); }

.positions-list li {
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}

.positions-list .role { font-weight: 700; color: var(--navy); font-family: var(--font-serif); font-size: 1.05rem; }
.positions-list .dates { color: var(--ink-soft); font-size: 0.88rem; }
.positions-list .note { color: var(--ink-soft); font-size: 0.88rem; margin-top: 4px; font-style: italic; }

.sources-list {
  font-size: 0.85rem;
  color: var(--ink-soft);
  margin-top: 24px;
}

.archive-heading {
  font-family: var(--font-serif);
  font-weight: 400;
  color: var(--navy);
  font-size: 1.2rem;
  margin: 32px 0 4px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
  scroll-margin-top: 76px;
}

.archive-card {
  border-left: 2px solid var(--accent);
  padding: 4px 0 4px 16px;
  margin-top: 16px;
}

/* Deep Dives (featured essays) */
.feature-essay {
  background: var(--paper);
  border: 1px solid var(--border);
  border-top: 3px solid var(--accent);
  padding: 28px 32px 20px;
  margin-bottom: 32px;
  scroll-margin-top: 76px;
}

.feature-kicker {
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 700;
  margin: 0 0 6px;
}

.feature-essay h3 {
  font-family: var(--font-serif);
  color: var(--navy);
  font-size: 1.6rem;
  margin: 0 0 10px;
}

.feature-dek {
  font-size: 1.05rem;
  color: var(--ink-soft);
  max-width: 700px;
  margin: 0 0 4px;
}

.essay-toggle {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.essay-body {
  margin-top: 16px;
}

.feature-essay h4 {
  font-family: var(--font-serif);
  color: var(--navy);
  font-size: 1.1rem;
  margin: 22px 0 8px;
}

.feature-essay p { max-width: 700px; }

.essay-note {
  font-size: 0.82rem;
  color: var(--ink-soft);
  font-style: italic;
  margin: 10px 0 0;
}

.archive-card .name { font-weight: 700; color: var(--navy); font-family: var(--font-serif); font-size: 1.05rem; }
.archive-card .call-number { font-weight: 400; color: var(--ink-soft); font-size: 0.88rem; font-family: var(--font-sans); }
.archive-card .repository { font-size: 0.85rem; color: var(--ink-soft); margin: 2px 0 8px; }
.archive-card p { font-size: 0.92rem; margin: 0 0 10px; }
.archive-card a { font-weight: 600; font-size: 0.9rem; }

/* Committees */
.committee-group h3 {
  font-family: var(--font-serif);
  font-weight: 400;
  color: var(--navy);
  font-size: 1.15rem;
  margin: 28px 0 4px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border);
}

/* Milestone Timeline */
.milestone-timeline {
  list-style: none;
  margin: 8px 0;
  padding: 0;
  position: relative;
}

.milestone-timeline::before {
  content: "";
  position: absolute;
  left: 84px;
  top: 6px;
  bottom: 6px;
  width: 1px;
  background: var(--border);
}

.milestone {
  display: grid;
  grid-template-columns: 72px 24px 1fr;
  gap: 0 16px;
  padding: 20px 0;
}

.milestone .year {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  color: var(--navy);
  text-align: right;
  padding-top: 1px;
}
.milestone .ms-day {
  display: block;
  font-family: var(--font-sans, inherit);
  font-size: 0.74rem;
  color: var(--ink-soft);
  white-space: nowrap;
}

.milestone .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--paper);
  border: 2px solid var(--accent);
  margin-top: 6px;
  justify-self: center;
  position: relative;
  z-index: 1;
}

.milestone .milestone-title { font-weight: 700; color: var(--ink); margin-bottom: 4px; }
.milestone .milestone-desc { color: var(--ink-soft); font-size: 0.92rem; }
.milestone .milestone-link { font-size: 0.85rem; margin-top: 6px; display: inline-block; }

/* Visual weight scales with how consequential an entry is -- major turns (an
   election, an appointment, a defining piece of legislation) read larger than the
   supporting detail between them. */
.milestone--major .year { font-weight: 700; }
.milestone--major .milestone-title { font-size: 1.08rem; }

.milestone--minor { padding: 12px 0; }
.milestone--minor .year { font-size: 0.95rem; color: var(--ink-soft); }
.milestone--minor .dot { width: 7px; height: 7px; margin-top: 7px; }
.milestone--minor .milestone-title { font-size: 0.92rem; font-weight: 600; }
.milestone--minor .milestone-desc { font-size: 0.85rem; }

@media (max-width: 600px) {
  .milestone { grid-template-columns: 44px 20px 1fr; }
  .milestone-timeline::before { left: 54px; }
  .milestone .year { font-size: 0.95rem; }
}

/* Photographs: each image at its own proportions, with a full caption and credit. */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
  gap: 28px 24px;
  align-items: start;
  margin: 16px 0 8px;
}

.photo-card { margin: 0; display: grid; gap: 8px; }
.photo-card picture { display: block; background: var(--border); border: 1px solid var(--border); }
.photo-card img {
  width: 100%;
  height: auto;
  max-height: 420px;
  object-fit: contain;
  display: block;
  background: var(--paper);
}

.photo-card .caption { font-size: 0.84rem; color: var(--ink-soft); display: grid; gap: 4px; line-height: 1.45; }
.photo-card .caption strong { color: var(--ink); font-size: 0.92rem; }
.photo-date { color: var(--accent); font-weight: 600; font-size: 0.8rem; }
.photo-text { color: var(--ink); }
.photo-credit { font-size: 0.78rem; }

/* Issues */
.issue-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 8px 0 28px;
}

.issue-pill {
  background: none;
  border: 1px solid var(--border);
  padding: 7px 14px;
  font-size: 0.85rem;
  color: var(--ink);
  cursor: pointer;
  border-radius: 2px;
}

.issue-pill:hover { border-color: var(--accent); color: var(--accent); }
.issue-pill.is-active { background: var(--fill-strong); border-color: var(--fill-strong); color: #fff; }

.issue-detail-group h3,
.issue-detail-group h4 {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: 1.05rem;
  color: var(--navy);
  margin: 24px 0 8px;
}

.issue-item { border-top: 1px solid var(--border); padding: 10px 0; font-size: 0.9rem; }
.issue-item .issue-item-meta { color: var(--ink-soft); font-size: 0.82rem; }

/* Footer: identity and signature, section links, a faded-signature band, then sources. */
.site-footer {
  background: var(--chrome);
  color: #b9c1d6;
  font-size: 0.9rem;
}

.site-footer a { color: #e3e7f0; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.site-footer .link-btn { color: #e3e7f0; text-decoration: none; }
.site-footer .link-btn:hover, .site-footer .link-btn:focus-visible { color: #fff; text-decoration: underline; }

.footer-top {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) 2.2fr;
  gap: 40px;
  padding-top: 48px;
  padding-bottom: 32px;
}

.footer-id { display: grid; gap: 6px; align-content: start; }
.footer-name { font-family: var(--font-serif); font-size: 1.5rem; color: #fff; margin: 0; }
.footer-years { margin: 0; font-size: 0.82rem; color: #b9c1d6; }
.footer-signature { display: block; width: 141px; height: auto; margin-top: 10px; }
.footer-sigcredit { margin: 0; font-size: 0.74rem; color: #8f99b3; }
.footer-disclosure { margin: 10px 0 0; font-size: 0.8rem; line-height: 1.45; color: #b9c1d6; max-width: 34ch; }
.footer-contact { margin: 6px 0 0; }

.footer-cols {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 24px;
}
.footer-cols div { display: flex; flex-direction: column; gap: 9px; min-width: 0; }
.footer-head {
  margin: 0 0 4px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #c9a77c;
}

.footer-band {
  height: 130px;
  background-image: url("/img/signature.webp");
  background-repeat: no-repeat;
  background-position: right 6% center;
  background-size: auto 100px;
  opacity: 0.09;
}

.footer-bottom { background: var(--chrome-deep); padding: 18px 0 22px; font-size: 0.82rem; }
.footer-bottom .wrap { display: grid; gap: 8px; }
.footer-about summary { cursor: pointer; color: #e3e7f0; padding-block: 5px; }
.footer-about p { margin: 8px 0 0; max-width: 90ch; line-height: 1.55; }
.footer-updated { margin: 0; color: #8f99b3; }
.footer-meta { display: flex; flex-wrap: wrap; gap: 10px 24px; align-items: center; justify-content: space-between; margin-top: 8px; }
.theme-switch { display: inline-flex; align-items: center; gap: 2px; }
.theme-switch-label { color: #8f99b3; margin-right: 8px; }
.theme-switch button { background: none; border: 1px solid rgba(255, 255, 255, 0.2); color: #e3e7f0; font: inherit; padding: 4px 10px; cursor: pointer; }
.theme-switch button + button { border-left: 0; }
.theme-switch button:hover { background: rgba(255, 255, 255, 0.08); }
.theme-switch button[aria-pressed="true"] { background: rgba(255, 255, 255, 0.16); color: #fff; }
.theme-switch button:focus-visible { outline: 2px solid #c9a77c; outline-offset: 2px; }
@media (max-width: 640px) { .theme-switch button { min-height: 44px; padding-inline: 14px; } }

@media (max-width: 900px) {
  .footer-top { grid-template-columns: 1fr; gap: 28px; }
  /* Newspaper columns, so a short group isn't padded out to match the longest one in its row. */
  .footer-cols { display: block; columns: 3; column-gap: 24px; }
  .footer-cols div { break-inside: avoid; margin-bottom: 22px; }
  .footer-cols a { padding-block: 3px; }
}
@media (max-width: 520px) {
  .footer-cols { columns: 2; }
  .footer-band { height: 96px; background-size: auto 70px; background-position: right 16px center; }
}

@media (max-width: 600px) {
  .site-header h1 { font-size: 2rem; }
  .table-controls { flex-direction: column; align-items: stretch; }
}

/* --- HHS records and paged lists ------------------------------------------ */

.method-note {
  max-width: 720px;
  margin: -8px 0 20px;
  font-size: 0.9rem;
  color: var(--ink-soft);
}
.method-note summary {
  cursor: pointer;
  color: var(--accent);
  font-weight: 600;
}
.method-note p { margin: 8px 0 0; }

.record-row .source-links { font-size: 0.85rem; }
.record-row .source-links a { font-weight: 600; }

td.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.show-more-row td,
div.show-more-row {
  text-align: center;
  padding: 14px 8px;
}

.tab-btn:focus-visible,
.policy-subtab-btn:focus-visible,
.subtab-btn:focus-visible,
.link-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
td.nowrap { white-space: nowrap; }

/* --- Accessibility -------------------------------------------------------- */

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* Off-screen until a keyboard user tabs to it, then the first thing on the page. */
.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--paper);
  color: var(--accent);
  font-weight: 700;
  border: 2px solid var(--accent);
  border-radius: 2px;
}
.skip-link:focus { top: 12px; }

/* Elements that receive focus programmatically (a tab's heading after navigation, the
   main region after the skip link) shouldn't show a focus ring the user never asked for. */
[tabindex="-1"]:focus { outline: none; }

.table-scroll:focus-visible,
.skip-link:focus-visible,
.result-item:focus-visible,
.issue-pill:focus-visible,
.sort-toggle:focus-visible,
.bill-card-summary:focus-visible,
select:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* On touch screens, give small inline links and text buttons a hit area of at least
   24px (WCAG 2.2 target size) without changing how lines of text are laid out. */
@media (pointer: coarse) {
  .link-btn,
  td a,
  .record-row a,
  .issue-item a,
  .sources-list a,
  .source-links a,
  .photo-card .caption a,
  .archive-card > a {
    display: inline-block;
    padding-block: 5px;
  }
  .method-note summary { padding-block: 4px; }
  .show-more-row .link-btn { padding: 10px 14px; }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

.news-excerpt {
  font-size: 0.9rem;
  color: var(--ink-soft);
  margin: 2px 0 6px;
  max-width: 70ch;
}

.news-passages {
  margin: 0 0 6px;
}

.news-passages summary {
  cursor: pointer;
  font-size: 0.85rem;
  color: var(--accent);
}

.news-passages-body {
  border-left: 2px solid var(--border);
  padding-left: 10px;
  margin-top: 4px;
}

/* Guide to the archive at the top of the Biography: one card per major section. */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 12px;
  margin: 0 0 40px;
}

.stat-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 18px 18px 16px;
  background: var(--paper);
  border: 1px solid var(--border);
  border-top: 3px solid var(--fill-strong);
  border-radius: 2px;
  color: var(--ink);
  text-decoration: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.stat-card:hover,
.stat-card:focus-visible {
  border-color: var(--accent);
  border-top-color: var(--accent);
  box-shadow: 0 4px 14px var(--shadow-soft);
}

.stat-number {
  font-family: var(--font-serif);
  font-size: 2rem;
  line-height: 1.1;
  color: var(--navy);
  font-variant-numeric: tabular-nums;
}

.stat-label {
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
}

.stat-desc {
  font-size: 0.88rem;
  color: var(--ink-soft);
  line-height: 1.4;
}

@media (max-width: 520px) {
  .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .stat-card { padding: 14px 12px 12px; }
  .stat-number { font-size: 1.6rem; }
  .stat-label { font-size: 0.7rem; }
}

/* Long tables become one card per row on phones; each cell shows its column name. */
@media (max-width: 640px) {
  .table-scroll { overflow: visible; }
  .table-scroll table, .table-scroll tbody, .table-scroll tr, .table-scroll td { display: block; width: 100%; }
  .table-scroll thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .table-scroll tr { border: 1px solid var(--border); background: var(--paper); padding: 10px 12px; margin-bottom: 10px; }
  .table-scroll td { border: none; padding: 3px 0; }
  .table-scroll td[data-label]::before {
    content: attr(data-label);
    display: block;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--ink-soft);
  }
  .table-scroll td.nowrap { white-space: normal; }
}

/* Connections */
.web-figure { margin: 8px 0 18px; }
.connections-web { width: 100%; max-width: 820px; height: auto; display: block; margin: 0 auto; }
.web-line { stroke: var(--border); stroke-linecap: round; }
.web-node circle { fill: var(--paper); stroke-width: 3; }
.web-node text { font: 600 13px var(--font-sans); fill: var(--ink); }
.web-node:hover text, .web-node:focus text { fill: var(--accent); text-decoration: underline; }
.web-center { fill: var(--fill-strong); }
.web-center-label { font: 15px var(--font-serif); fill: var(--navy); paint-order: stroke; stroke: var(--cream); stroke-width: 5px; stroke-linejoin: round; }
.web-node text { paint-order: stroke; stroke: var(--cream); stroke-width: 4px; stroke-linejoin: round; }
.web-presidents { --g: var(--g-presidents); }
.web-senate-colleagues { --g: var(--g-senate); }
.web-the-1976-campaign { --g: var(--g-1976); }
.web-the-reagan-administration { --g: var(--g-reagan); }
.web-civil-rights { --g: var(--g-civil-rights); }
.web-pennsylvania-races { --g: var(--g-pa); }
.web-line { stroke: var(--g); stroke-opacity: 0.45; }
.web-node circle { stroke: var(--g); }
.web-figure figcaption { display: flex; flex-wrap: wrap; gap: 6px 14px; justify-content: center; font-size: 0.8rem; color: var(--ink-soft); }
.web-key::before { content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--g); margin-right: 5px; vertical-align: -1px; }

.conn-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: 16px; align-items: start; }
.conn-card { background: var(--paper); border: 1px solid var(--border); border-top: 3px solid var(--g); padding: 16px 18px; display: grid; gap: 8px; scroll-margin-top: 90px; }
.conn-card h3 { margin: 0; font-family: var(--font-serif); font-weight: 400; font-size: 1.25rem; color: var(--navy); }
.conn-card p { margin: 0; font-size: 0.92rem; line-height: 1.55; }
.conn-role { color: var(--ink-soft); font-size: 0.84rem !important; }
.conn-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { font-size: 0.76rem; background: var(--cream); border: 1px solid var(--border); padding: 2px 8px; border-radius: 999px; color: var(--ink); }
.conn-record summary { cursor: pointer; font-size: 0.85rem; font-weight: 600; color: var(--accent); padding-block: 4px; }
.conn-record h4 { margin: 10px 0 4px; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--ink-soft); }
.conn-record ul, .conn-sources ul { margin: 0; padding-left: 18px; font-size: 0.85rem; display: grid; gap: 3px; }
.conn-sources { font-size: 0.82rem; }
@media (max-width: 640px) { .web-node text { font-size: 17px; } .web-center-label { font-size: 18px; } }

/* Cosponsors of one of his bills, folded under the count, with sign-on dates. */
.cosponsor-list { margin-top: 6px; }
.cosponsor-list summary { cursor: pointer; color: var(--accent); min-height: 24px; display: inline-flex; align-items: center; }
.cosponsor-list ul { margin: 6px 0; padding-left: 1.2em; display: grid; gap: 2px; }
.cosponsor-list .section-note { margin: 4px 0 0; font-size: 0.8rem; }
li .bill-date { color: var(--ink-soft); font-size: 0.85em; }

/* Connections: colleagues and allies, one line each until opened. */
.conn-colleagues { display: grid; gap: 8px; }
.conn-compact { background: var(--paper); border: 1px solid var(--border); border-left: 3px solid var(--g); scroll-margin-top: 90px; }
.conn-compact > summary { cursor: pointer; padding: 12px 16px; display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; min-height: 24px; }
.conn-compact > summary .conn-role { margin: 0; }
.conn-compact[open] > summary { border-bottom: 1px solid var(--border); }
.conn-compact .conn-card { border: 0; padding-top: 12px; }
.conn-compact > summary::-webkit-details-marker { display: none; }
.conn-compact > summary::after { content: "Show"; margin-left: auto; font-size: 0.8rem; font-weight: 600; color: var(--accent); }
.conn-compact[open] > summary::after { content: "Hide"; }

.essay-related { margin-top: 24px; padding: 12px 16px; border-left: 3px solid var(--accent); background: var(--tint); font-size: 0.92rem; }
.essay-related ul { margin: 6px 0 0; padding-left: 18px; }
.essay-related li { margin: 3px 0; }

.web-weight { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 8px; }
.web-weight-btn { font: inherit; font-size: 0.85rem; padding: 4px 10px; border: 1px solid var(--border); background: var(--paper); color: var(--ink); border-radius: 2px; cursor: pointer; }
.web-weight-btn.is-active { border-color: var(--accent); color: var(--accent); font-weight: 600; }
.web-weight-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.web-weight-label { font-size: 0.85rem; color: var(--ink-soft); }

/* Home page: the archive guide and the biography's collapsible chapters. */
.overview-heading {
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: 0 0 12px;
}
#overview .stat-grid { margin-bottom: 14px; }
.overview-also {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 8px;
  margin: 0 0 40px;
  font-size: 0.9rem;
}
.overview-also-label {
  grid-column: 1 / -1;
  margin: 6px 0 0;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.overview-also a {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 2px;
  background: var(--paper);
  color: var(--navy);
  font-weight: 600;
  text-decoration: none;
}
.overview-also a small { font-weight: 400; font-size: 0.76rem; color: var(--ink-soft); }
.overview-also a:hover, .overview-also a:focus-visible { border-color: var(--accent); color: var(--accent); }

.bio-chapters { margin: 28px 0 0; border-top: 1px solid var(--border); }
.bio-chapter { border-bottom: 1px solid var(--border); scroll-margin-top: 76px; }
.bio-chapter > summary {
  list-style: none;
  cursor: pointer;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2px 16px;
  padding: 14px 0;
}
.bio-chapter > summary::-webkit-details-marker { display: none; }
.bio-chapter > summary::after {
  content: "+";
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: center;
  font-size: 1.3rem;
  line-height: 1;
  color: var(--accent);
}
.bio-chapter[open] > summary::after { content: "\2212"; }
.bio-chapter-title { font-family: var(--font-serif); font-size: 1.2rem; color: var(--navy); }
.bio-chapter-teaser { grid-column: 1; max-width: 68ch; font-size: 0.9rem; color: var(--ink-soft); line-height: 1.45; }
.bio-chapter[open] .bio-chapter-teaser { display: none; }
.bio-chapter > summary:hover .bio-chapter-title { color: var(--accent); }
.bio-chapter > summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.bio-chapter-body { padding: 0 0 18px; }
.bio-chapter-body .sources-list { margin-top: 0; }

/* Phones: a compact hero, so the guide to the archive shows on the first screen. */
@media (max-width: 600px) {
  .site-header { padding: 22px 0 18px; }
  .profile-header { flex-direction: row; align-items: center; gap: 16px; }
  .portrait { width: 84px; height: 101px; }
  .site-header h1 { font-size: 1.7rem; }
  .eyebrow { margin-bottom: 6px; font-size: 0.64rem; }
  .hero-rule { margin: 10px 0; width: 40px; }
  .subtitle { font-size: 0.88rem; }
  .profile-years { display: none; }
  .overview-also { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Balance line lengths in running text (no single word stranded on a paragraph's last line). */
main p, main li { text-wrap: pretty; }

/* Source lists start closed; the summary line is the button. */
.sources-collapse > summary {
  cursor: pointer;
  list-style: none;
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  padding: 6px 0;
}
.sources-collapse > summary::-webkit-details-marker { display: none; }
.sources-collapse > summary::before { content: "+"; color: var(--accent); font-weight: 700; width: 1em; }
.sources-collapse[open] > summary::before { content: "\2212"; }
.sources-collapse > summary:hover strong { color: var(--accent); }
.sources-collapse > summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.sources-count { color: var(--ink-soft); }

/* Speeches: what kind of day it was for him, and the AI summary of his part in it. */
.speech-kind {
  display: inline-block;
  margin-right: 8px;
  padding: 1px 7px;
  border-radius: 2px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  vertical-align: 1px;
  border: 1px solid var(--border);
  color: var(--ink-soft);
}
.speech-kind-spoke { background: var(--fill-strong); border-color: var(--fill-strong); color: #fff; }
.speech-kind-remarks { border-color: var(--navy); color: var(--navy); }
.speech-kind-named { border-color: var(--accent); color: var(--accent); }
.speech-summary { margin: 6px 0 4px; max-width: 70ch; line-height: 1.5; }
.key-vote-tag { font-size: 0.72rem; letter-spacing: 0.04em; text-transform: uppercase; color: var(--accent); margin-right: 4px; }
.vote-desc-orig { color: var(--ink-soft); font-size: 0.82rem; line-height: 1.4; }
.speech-kind-rollcall ~ .speech-summary { color: var(--ink-soft); font-size: 0.88rem; }
.hearing-context { margin: 6px 0 4px; max-width: 70ch; line-height: 1.5; color: var(--ink-soft); font-size: 0.92rem; }
.hearing-context summary { cursor: pointer; }
.hearing-quote { margin: 8px 0; padding-left: 12px; border-left: 2px solid var(--border); max-width: 70ch; font-size: 0.92rem; line-height: 1.5; }
.hearing-quote a { white-space: nowrap; font-size: 0.82rem; }
.ai-tag {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-soft);
  border-bottom: 1px dotted var(--ink-soft);
  cursor: help;
  white-space: nowrap;
}

/* Footnotes in the biography. */
.fn-ref { font-size: 0.72em; line-height: 0; margin-left: 1px; }
.fn-ref a { text-decoration: none; padding: 0 2px; }
.fn-list { margin: 4px 0 0; padding: 12px 0 0 22px; border-top: 1px solid var(--border); font-size: 0.86rem; color: var(--ink-soft); max-width: 70ch; }
.fn-list li { scroll-margin-top: 90px; }
.fn-list .fn-link { text-decoration: none; }

/* Browser surfaces drawn from the palette rather than left at browser defaults. */
:root { color-scheme: light; accent-color: var(--accent); }

/* Dark theme. It follows the device setting unless the visitor picks one with the switch in
   the footer, which stamps data-theme on <html>. Only the tokens change here; every rule
   above draws from them. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --navy: #c9d3e6; --navy-light: #2b3a5c; --accent: #e2876b; --accent-light: #eba08a;
    --cream: #13171e; --paper: #1a2029; --ink: #e7e1d5; --ink-soft: #aba497; --border: #2f3643;
    --chrome: #0c111a; --chrome-deep: #070b12; --fill-strong: #34466b; --tint: rgba(226, 135, 107, 0.08);
    --good: #7cc697; --error-bg: #3a1f19; --error-border: #7a3b2c; --error-ink: #f2b8a6; --flash: #4a3b22;
    --shadow: rgba(0, 0, 0, 0.5); --shadow-soft: rgba(0, 0, 0, 0.35); --selection: rgba(226, 135, 107, 0.32);
    --g-presidents: #e2876b; --g-senate: #a9b8d4; --g-1976: #d9a74e; --g-reagan: #6fa3cc; --g-civil-rights: #72b585; --g-pa: #b59ad6;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --navy: #c9d3e6; --navy-light: #2b3a5c; --accent: #e2876b; --accent-light: #eba08a;
  --cream: #13171e; --paper: #1a2029; --ink: #e7e1d5; --ink-soft: #aba497; --border: #2f3643;
  --chrome: #0c111a; --chrome-deep: #070b12; --fill-strong: #34466b; --tint: rgba(226, 135, 107, 0.08);
  --good: #7cc697; --error-bg: #3a1f19; --error-border: #7a3b2c; --error-ink: #f2b8a6; --flash: #4a3b22;
  --shadow: rgba(0, 0, 0, 0.5); --shadow-soft: rgba(0, 0, 0, 0.35); --selection: rgba(226, 135, 107, 0.32);
  --g-presidents: #e2876b; --g-senate: #a9b8d4; --g-1976: #d9a74e; --g-reagan: #6fa3cc; --g-civil-rights: #72b585; --g-pa: #b59ad6;
  color-scheme: dark;
}
::selection { background: var(--selection); }
.site-header ::selection, .site-footer ::selection { background: rgba(201, 169, 143, 0.4); }
input, textarea { caret-color: var(--accent); }

/* Dates and counts line up in columns. */
table td:first-child, .bill-date, .stat-number { font-variant-numeric: tabular-nums; }

/* A long bill list only lays out the cards near the screen. */
.bill-card { content-visibility: auto; contain-intrinsic-size: auto 60px; }

/* On phones every control is at least 44px tall, the touch-target size both the WCAG
   enhanced criterion and Apple's and Google's guidelines use. */
@media (max-width: 640px) {
  .menu-toggle, .issue-pill, .sort-toggle, .web-weight-btn, select, input[type="search"] { min-height: 44px; }
  .link-btn { min-height: 44px; display: inline-flex; align-items: center; }
  .fulltext-toggle { display: flex; }
  summary { padding-block: 10px; }
}

/* Photographs inside Deep Dive sections */
.essay-figure { margin: 4px 0 18px; max-width: 640px; }
.essay-figure picture { display: block; background: var(--border); border: 1px solid var(--border); }
.essay-figure img { display: block; width: 100%; height: auto; }
.essay-figure figcaption { display: grid; gap: 3px; margin-top: 6px; font-size: 0.84rem; line-height: 1.45; color: var(--ink-soft); }
.essay-figure .photo-credit { font-size: 0.78rem; }

/* Career in charts */
.cc-block { margin: 0 0 34px; max-width: 760px; }
.cc-block > h3, .cc-block summary h3 { margin: 0 0 6px; font-family: var(--font-serif); color: var(--navy); }
.cc-block summary { cursor: pointer; }
.cc-block summary h3 { display: inline; }
.cc-chart { width: 100%; height: auto; display: block; margin-top: 10px; }
.cc-grid { stroke: var(--border); stroke-width: 1; }
.cc-tick { fill: var(--ink-soft); font: 11px var(--font-sans); }
.cc-line { fill: none; stroke-width: 2; }
.cc-line.cc-main { stroke-width: 3; }
.cc-dash { stroke-dasharray: 5 4; }
.cc-dot { stroke: var(--paper); stroke-width: 2; }
.cc-name { fill: var(--ink); font: 12px var(--font-sans); }
.cc-bars { list-style: none; margin: 10px 0 4px; padding: 0; display: grid; gap: 8px; }
.cc-bar-row { display: grid; grid-template-columns: 9rem 1fr 4.5rem; gap: 10px; align-items: center; font-size: 0.92rem; }
.cc-bar-track { height: 14px; background: var(--cream); border: 1px solid var(--border); border-radius: 0 3px 3px 0; overflow: hidden; }
.cc-bar-fill { display: block; height: 100%; background: var(--accent); }
.cc-bar-n { color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.cc-axis { font-size: 0.8rem; color: var(--ink-soft); margin: 0; }
.cc-legend { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 0.85rem; color: var(--ink-soft); margin: 8px 0 0; }
.cc-key i { display: inline-block; width: 11px; height: 11px; margin-right: 6px; border-radius: 2px; }
@media (max-width: 560px) { .cc-bar-row { grid-template-columns: 6.5rem 1fr 3.8rem; } }

/* In his own voice */
.aud-list { display: grid; gap: 22px; max-width: 760px; }
.aud-card { border: 1px solid var(--border); background: var(--paper); padding: 16px 18px; display: grid; gap: 10px; }
.aud-card h3 { margin: 0; font-family: var(--font-serif); color: var(--navy); }
.aud-card p { margin: 0; }
.aud-meta, .aud-src { font-size: 0.84rem; color: var(--ink-soft); }
.aud-card audio { width: 100%; }
.aud-excerpt { margin: 0; padding: 8px 14px; border-left: 3px solid var(--accent); background: var(--tint); display: grid; gap: 6px; }
.aud-label { font-size: 0.78rem; color: var(--ink-soft); text-transform: uppercase; letter-spacing: 0.04em; }
.aud-line { display: grid; grid-template-columns: 3rem 1fr; gap: 8px; font-size: 0.95rem; }
.aud-time { color: var(--ink-soft); font-variant-numeric: tabular-nums; font-size: 0.82rem; padding-top: 2px; }
.aud-card details { border-top: 1px solid var(--border); padding-top: 8px; }
.aud-card details summary { cursor: pointer; font-weight: 600; }

/* Design D ("Ledger" body with a campaign-print masthead). Chosen from research/design-variants.
   IBM Plex (Sans, Serif, Mono) is self-hosted. */
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 400 600; font-display: swap; src: url(/fonts/IBMPlexSans-400-600.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "IBM Plex Serif"; font-style: italic; font-weight: 400; font-display: swap; src: url(/fonts/IBMPlexSerif-400i.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "IBM Plex Serif"; font-style: normal; font-weight: 400; font-display: swap; src: url(/fonts/IBMPlexSerif-400.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "IBM Plex Serif"; font-style: normal; font-weight: 600; font-display: swap; src: url(/fonts/IBMPlexSerif-600.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 400; font-display: swap; src: url(/fonts/IBMPlexMono-400.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 500; font-display: swap; src: url(/fonts/IBMPlexMono-500.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
/* Variant D, "Ledger + Campaign masthead" (B's body with C's header). Based on B, "Ledger": an archive-finding-aid look. White ground, hard rules, tabular
   numerals, a single federal red. Dense but orderly for the data pages. */
.header-search input[type="search"] { background: #fff; color: var(--ink); border: 1px solid var(--ink); border-radius: 0; }
.header-search input[type="search"]::placeholder { color: #767676; }
.stat-grid { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 0; border-top: 2px solid var(--ink); border-left: 1px solid var(--border); }
.stat-card { border: 0; border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); border-radius: 0; padding: 14px 16px; background: var(--paper); }
.stat-card:hover, .stat-card:focus-visible { box-shadow: inset 0 -3px 0 var(--accent); }
.stat-number { font-family: "IBM Plex Mono", monospace; font-size: 1.9rem; font-weight: 500; color: var(--ink); }
table { font-family: var(--font-sans); font-size: .9rem; }
td { font-variant-numeric: tabular-nums; }
td:first-child, .bill-date, .vote-date { font-family: "IBM Plex Mono", monospace; font-size: .84rem; }
.feature-essay h3, h2, .page-intro h2 { font-family: var(--font-sans); font-weight: 600; letter-spacing: -.01em; }
.feature-essay p, .page-dek { font-family: var(--font-serif); }
/* Masthead from variant C: navy field, framed tilted portrait, red/white/blue stripe */
.site-header { background: var(--chrome); padding: 48px 0 40px; border-bottom: 0; position: relative; }
.site-header::after { content: ""; position: absolute; inset: auto 0 0 0; height: 18px; background: linear-gradient(#b22a22 0 6px, #fff 6px 12px, #14284b 12px 18px); }
.profile-header { align-items: flex-start; gap: 36px; }
.portrait { width: 220px; height: 264px; border: 6px solid #fff; border-radius: 2px; box-shadow: 0 10px 30px rgba(0,0,0,.35); transform: rotate(-1.2deg); }
.eyebrow { font-family: "IBM Plex Mono", monospace; color: #f0c9a6; letter-spacing: .12em; }
.site-header h1 { font-family: var(--font-serif); font-weight: 600; font-size: 3.1rem; }
.hero-rule { display: block; background: #b22a22; width: 88px; height: 4px; }
.subtitle { font-family: var(--font-serif); font-style: italic; color: #d9deea; }
.profile-years { color: #c4cbdc; border-top-color: rgba(255,255,255,.2); font-family: var(--font-sans); font-size: .86rem; }
.topbar { background: var(--chrome); color: #fff; border-bottom: 0; box-shadow: 0 3px 0 #b22a22; }
.wordmark { color: #fff; font-family: var(--font-serif); }
.wordmark:hover { color: #fff; }
.header-search input[type="search"] { background: rgba(255,255,255,.08); color: #fff; border: 1px solid rgba(255,255,255,.3); }
.header-search input[type="search"]::placeholder { color: #a9b3cc; }
.menu-toggle { color: #fff; border-color: rgba(255,255,255,.6); background: transparent; }
@media (max-width: 820px) {
  .site-header { padding: 24px 0 34px; }
  .profile-header { flex-direction: row; align-items: center; gap: 16px; }
  .portrait { width: 104px; height: 125px; border-width: 4px; }
  .site-header h1 { font-size: 2rem; }
  .subtitle { font-size: .9rem; }
  .profile-years { display: none; }
  .topbar-inner:not(:has(.menu-toggle[aria-expanded="true"])) .header-search { display: none; }
  .feature-essay { margin-inline: -16px; padding: 18px 16px; border-left: 0; border-right: 0; border-radius: 0; }
  .feature-essay p, .feature-dek { max-width: none; }
}

/* Career in charts: colleagues, attendance, cosponsors, subjects */
.cc-congs { display: grid; gap: 6px; margin-top: 14px; }
.cc-cong { border: 1px solid var(--border); background: var(--paper); padding: 8px 12px; }
.cc-cong summary { cursor: pointer; font-size: 0.92rem; line-height: 1.45; }
.cc-coll-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 8px 28px; margin-top: 10px; }
.cc-coll-cols h5 { margin: 0 0 4px; font-family: var(--font-sans); font-size: 0.74rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-soft); }
.cc-coll-cols ul { list-style: none; margin: 0; padding: 0; }
.cc-coll { display: grid; grid-template-columns: 1fr auto auto; gap: 10px; padding: 3px 0; border-top: 1px solid var(--border); font-size: 0.88rem; }
.cc-coll-meta { color: var(--ink-soft); font-size: 0.8rem; }
.cc-coll-pct { font-variant-numeric: tabular-nums; font-weight: 600; min-width: 3.5em; text-align: right; }
.cc-bars-wide .cc-bar-label { min-width: 11em; }
.cc-bars-wide .cc-bar-label small { color: var(--ink-soft); font-weight: 400; }
.cc-fill-d { background: #3b6fb6; }

/* Search page, By date, Cite */
.search-form, .bydate-form { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0 0 14px; }
.search-form input[type="search"] { flex: 1 1 320px; min-width: 0; padding: 10px 12px; font: inherit; border: 1px solid var(--border); background: var(--paper); color: var(--ink); }
.bydate-form label { display: inline-flex; gap: 6px; align-items: center; font-size: 0.9rem; }
.bydate-form input[type="month"] { padding: 8px 10px; font: inherit; border: 1px solid var(--border); background: var(--paper); color: var(--ink); }
.search-go { padding: 10px 16px; font: inherit; font-weight: 600; background: var(--navy); color: #fff; border: 1px solid var(--navy); cursor: pointer; }
.search-go:hover { background: var(--accent); border-color: var(--accent); }
.bydate-presets { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 0 0 18px; }
.bydate-presets .chip { cursor: pointer; font: inherit; font-size: 0.82rem; padding: 4px 10px; border: 1px solid var(--border); background: var(--paper); color: var(--ink); border-radius: 999px; }
.bydate-presets .chip:hover { border-color: var(--accent); color: var(--accent); }
.sr-group { margin: 22px 0; }
.sr-group h3 { font-family: var(--font-serif); color: var(--navy); font-size: 1.15rem; margin: 0 0 6px; padding-bottom: 6px; border-bottom: 1px solid var(--border); }
.sr-group .result-count { font-family: var(--font-sans); font-size: 0.78rem; color: var(--ink-soft); font-weight: 400; margin-left: 6px; }
.sr-list { list-style: none; margin: 0; padding: 0; }
.sr-item, .bd-item { padding: 8px 0; border-top: 1px solid var(--border); font-size: 0.92rem; line-height: 1.5; }
.sr-item:first-child, .bd-item:first-child { border-top: 0; }
.sr-date { font-family: var(--font-mono); font-size: 0.76rem; color: var(--ink-soft); margin-right: 6px; white-space: nowrap; }
.sr-title { font-weight: 600; }
.sr-snip { margin: 2px 0 0; color: var(--ink-soft); font-size: 0.88rem; }
.sr-more { margin: 8px 0 0; }
mark { background: #fde68a; color: inherit; padding: 0 1px; }
:root[data-theme="dark"] mark { background: #7c5a00; }
.bd-item { display: grid; grid-template-columns: 7.5em 1fr; gap: 8px; }
@media (max-width: 600px) { .bd-item { grid-template-columns: 1fr; gap: 2px; } }
.cite-dialog { border: 1px solid var(--border); background: var(--paper); color: var(--ink); max-width: 640px; width: calc(100% - 32px); padding: 22px 24px; }
.cite-dialog::backdrop { background: rgba(0, 0, 0, 0.45); }
.cite-dialog h2 { font-family: var(--font-serif); color: var(--navy); margin: 0 0 6px; font-size: 1.4rem; }
.cite-row { border-top: 1px solid var(--border); padding: 10px 0; }
.cite-row h3 { font-family: var(--font-sans); font-size: 0.74rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-soft); margin: 0 0 4px; }
.cite-text { margin: 0 0 4px; font-size: 0.92rem; line-height: 1.5; word-break: break-word; }
.cite-note { font-size: 0.82rem; color: var(--ink-soft); margin: 4px 0 10px; }
.cite-actions { margin: 10px 0 0; text-align: right; }
.essay-cite { font-size: 0.72rem; margin-left: 10px; letter-spacing: 0; text-transform: none; font-weight: 600; }

/* Front page: three doors in */
.doors { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin: 4px 0 10px; }
.doors-more { margin: 0 0 32px; font-size: 0.9rem; color: var(--ink-soft); }
.door { display: flex; flex-direction: column; gap: 6px; padding: 18px 20px 20px; background: var(--paper); border: 1px solid var(--border); border-top: 3px solid var(--navy); color: var(--ink); text-decoration: none; transition: border-color 0.15s ease, box-shadow 0.15s ease; }
.door:hover, .door:focus-visible { border-color: var(--accent); border-top-color: var(--accent); box-shadow: 0 4px 14px var(--shadow-soft); }
.door-kicker { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent); }
.door-title { font-family: var(--font-serif); font-size: 1.35rem; line-height: 1.2; color: var(--navy); }
.door-text { font-size: 0.9rem; line-height: 1.5; color: var(--ink-soft); }
.door-text a { color: var(--accent); }
#overview > h2 { font-family: var(--font-serif); color: var(--navy); font-size: 1.5rem; margin: 0 0 10px; }
#overview .overview-heading { margin-top: 36px; }
@media (max-width: 760px) { .doors { grid-template-columns: 1fr; gap: 10px; } .door { padding: 14px 16px; } }

/* Long-form typography */
.essay-body { font-size: 1.04rem; line-height: 1.65; }
.essay-body p { max-width: 66ch; }
.feature-dek { max-width: 66ch; font-size: 1.08rem; line-height: 1.5; }
.feature-essay h4 { font-size: 1.2rem; margin: 30px 0 10px; max-width: 66ch; }
.essay-pull { margin: 18px 0 20px; padding: 6px 0 6px 18px; border-left: 3px solid var(--accent); max-width: 60ch; }
.essay-pull p { margin: 0; font-family: var(--font-serif); font-size: 1.28rem; line-height: 1.4; color: var(--navy); }
.essay-pull cite { display: block; margin-top: 6px; font-style: normal; font-size: 0.82rem; color: var(--ink-soft); }
@media (min-width: 1100px) { .essay-pull { float: right; width: 300px; margin: 6px 0 14px 28px; border-left: 0; border-top: 3px solid var(--accent); padding: 10px 0 0; } .essay-body::after { content: ""; display: table; clear: both; } }
.essay-figure { max-width: 66ch; }
.essay-figure figcaption { font-size: 0.84rem; line-height: 1.45; color: var(--ink-soft); margin-top: 6px; }
.bio-summary { font-size: 1.04rem; line-height: 1.65; max-width: 66ch; }
.oh-list { display: grid; gap: 12px; margin: 10px 0 14px; }
.oh-item { background: var(--paper); border: 1px solid var(--border); padding: 14px 18px; }
.oh-kicker { margin: 0 0 2px; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent); }
.oh-item h4 { margin: 0 0 4px; font-family: var(--font-serif); font-size: 1.1rem; color: var(--navy); }
.oh-meta { margin: 0 0 8px; font-size: 0.84rem; color: var(--ink-soft); }
.oh-item p { max-width: 70ch; font-size: 0.95rem; }
.oh-quote { margin: 10px 0; padding: 4px 0 4px 14px; border-left: 3px solid var(--accent); font-family: var(--font-serif); font-size: 1.02rem; max-width: 62ch; }
.oh-quote cite { display: block; font-style: normal; font-size: 0.8rem; color: var(--ink-soft); margin-top: 4px; }
.oh-rights { font-size: 0.8rem; color: var(--ink-soft); }

/* Magazines (news page) */
.mag-item { padding: .8rem 0; border-top: 1px solid var(--border); }
.mag-snips summary { cursor: pointer; font-size: .9rem; }
.mag-snip { font-size: .9rem; color: var(--ink-soft); margin: .3rem 0; }

/* "Discussed in" line linking a data-page item to the Deep Dives that discuss it */
.discussed-in { margin: 0.4rem 0 0; font-size: 0.875rem; color: var(--ink-soft); }
.discussed-in a { font-weight: 600; }
.photo-card .discussed-in { display: block; }

/* ------------------------------------------------------------------
   Print. A printed page carries the reading text only: no menus,
   search, filters or buttons; black on white; an open Deep Dive
   prints alone, with its notes and sources expanded (app.js opens
   the collapsed sections on beforeprint) and web addresses spelled
   out after outside links in the source lists.
   ------------------------------------------------------------------ */
@media print {
  @page { margin: 0.75in 0.8in; }
  :root, :root:not([data-theme="light"]), :root[data-theme="dark"] {
    --paper: #fff; --cream: #fff; --tint: #fff; --ink: #000; --ink-soft: #333;
    --border: #999; --accent: #000; --navy: #000; --chrome: #fff;
  }
  :root { color-scheme: light !important; }
  html, body { background: #fff !important; color: #000 !important; }
  body { font-size: 11pt; line-height: 1.45; }

  .skip-link, .topbar, .site-header, .site-footer, .doors, .doors-more,
  .header-search, .search-results, .menu-toggle, .crumb,
  .table-controls, .filter-bar, .issue-pills, .subtabs, .policy-subtab-btn,
  .sort-toggle, .essay-toggle, .essay-cite, .milestone-link, .show-more-row,
  .fulltext-toggle, .cite-dialog, .theme-switch, audio { display: none !important; }

  main::before {
    content: "Richard S. Schweiker Digital Archive \00B7  richardschweiker.org";
    display: block; font-size: 9pt; color: #333;
    border-bottom: 0.5pt solid #999; padding-bottom: 4pt; margin-bottom: 14pt;
  }

  .tab-panel:not(.is-active) { display: none !important; }
  .essay-body[hidden] { display: none !important; }
  /* With one Deep Dive open, print only that one. */
  #essays-content:has(.essay-body:not([hidden])) .feature-essay:not(:has(.essay-body:not([hidden]))) { display: none !important; }
  .feature-essay { border: none !important; box-shadow: none !important; padding: 0 !important; }

  a { color: #000 !important; text-decoration: none; }
  .sources-list a[href^="http"]::after, .essay-related a::after {
    content: " (" attr(href) ")"; font-size: 8.5pt; word-break: break-all; color: #333;
  }
  .essay-related a[href^="/"]::after { content: " (richardschweiker.org" attr(href) ")"; }

  h2, h3, h4, .milestone-title { break-after: avoid; page-break-after: avoid; }
  p, li, blockquote { orphans: 3; widows: 3; }
  figure, .essay-figure, .photo-card, .record-row, tr, .essay-pull { break-inside: avoid; page-break-inside: avoid; }
  .essay-figure img, .photo-card img { max-height: 3.6in; width: auto; max-width: 100%; }
  .essay-figure, .essay-figure picture, .essay-figure img, .photo-card picture { background: none !important; box-shadow: none !important; }
  .essay-figure picture { display: inline-block !important; border: none !important; }
  .table-scroll { overflow: visible !important; }
  .ai-tag { border: 0.5pt solid #666; }
}
