/* ============================================================
   The Influenced Index — Design System
   Single source of truth. Loaded LAST so it wins the cascade.
   ============================================================ */

:root {
  /* surfaces */
  --bg-parchment: #f4f2ee;
  --bg-card: #faf8f5;
  --bg-section: rgba(44, 24, 16, 0.03);
  --bg-nav: #2c1810;
  --bg-input: #ffffff;

  /* text — all body text is ink; tier badges and score numbers use tier colors */
  --text-primary: #2c1810;
  --text-secondary: #2c1810;
  --text-caption: #2c1810;
  --text-on-dark: #f4f2ee;

  /* borders */
  --border-light: rgba(44, 24, 16, 0.12);
  --border-medium: rgba(44, 24, 16, 0.25);
  --border-strong: rgba(44, 24, 16, 0.45);

  /* tier colors — canonical */
  --tier-captured: #a01818;
  --tier-influenced: #c89010;
  --tier-transactional: #9a8a6a;
  --tier-independent: #2e7a3e;

  /* tier tinted backgrounds for borders/badges */
  --tier-captured-bg: rgba(160, 24, 24, 0.08);
  --tier-influenced-bg: rgba(200, 144, 16, 0.08);
  --tier-transactional-bg: rgba(154, 138, 106, 0.08);
  --tier-independent-bg: rgba(46, 122, 62, 0.08);

  /* accent — crimson for links/CTAs (no navy, no bright blue) */
  --accent: #a01818;
  --accent-hover: #7a1212;

  /* party — warm only */
  --party-d: #5a4a8a;     /* warm muted purple instead of navy */
  --party-r: #a01818;     /* crimson */
  --party-i: #5a3a8a;

  /* fonts */
  --font-display: 'IM Fell English', Georgia, serif;
  --font-body: 'IBM Plex Sans', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, Menlo, monospace;

  /* font sizing — 14px is the readability floor */
  --font-size-body: 16px;
  --font-size-small: 14px;
  --font-size-caption: 14px;
  --font-size-h1: 2.25rem;
  --font-size-h2: 1.625rem;
  --font-size-h3: 1.3rem;
  --font-size-h4: 1.05rem;

  /* font weights — readability floor 500 (IBM Plex Sans static, no 450 axis) */
  --font-weight-body: 500;
  --font-weight-medium: 500;
  --font-weight-bold: 600;
  --font-weight-heavy: 700;

  /* spacing */
  --spacing-xs: 0.5rem;
  --spacing-sm: 1rem;
  --spacing-md: 1.5rem;
  --spacing-lg: 2.5rem;
  --spacing-xl: 4rem;

  /* layout */
  --max-width: 1100px;
  --max-width-prose: 720px;
  --radius: 4px;
  --nav-height: 56px;

  /* shadow */
  --shadow-card: 0 1px 3px rgba(44, 24, 16, 0.06), 0 4px 14px rgba(44, 24, 16, 0.04);

  /* legacy aliases — keep existing pages working */
  --parchment: var(--bg-parchment);
  --ink: var(--text-primary);
  --ink-mid: var(--text-secondary);
  --ink-light: var(--text-secondary);
  --ink-soft: var(--text-secondary);
  --ink-faint: var(--text-caption);
  --crimson: var(--tier-captured);
  --gold: var(--tier-influenced);
  --gray-warm: var(--tier-transactional);
  --forest: var(--tier-independent);
  --green-dark: var(--tier-independent);
  --warm-gray: var(--border-light);
  --mid-gray: var(--text-caption);
  --light-gray: var(--bg-section);
  --steel: var(--tier-transactional);
  --navy: var(--accent);
  --serif: var(--font-display);
  --sans: var(--font-body);
  --mono: var(--font-mono);
  --rule: var(--border-light);
  --rule-strong: var(--border-medium);
}

/* ============================================================
   RESET + BASE
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
}

html { font-size: 16px; }

body {
  background: var(--bg-parchment);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: var(--font-size-body);
  font-weight: var(--font-weight-body);
  line-height: 1.65;
  /* font-smoothing: auto — antialiased/grayscale make text THINNER on macOS */
  -webkit-font-smoothing: auto;
  -moz-osx-font-smoothing: auto;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  color: var(--text-primary);
  font-weight: 500;
  line-height: 1.2;
  margin: 0 0 0.6em;
  letter-spacing: 0.02em;
}

h1 { font-size: 2.5rem; font-weight: 500; }
h2 {
  font-size: 1.75rem;
  border-bottom: 1px solid rgba(44, 24, 16, 0.15);
  padding-bottom: 0.4rem;
  margin-bottom: 1rem;
  font-weight: 500;
}
h3 {
  font-family: var(--font-body);
  font-size: 1.1rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-secondary);
}
h4 { font-size: var(--font-size-h4); font-weight: 600; }

p { margin: 0 0 1.2em; }

a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 120ms;
}
a:hover { border-bottom-color: var(--accent); }
a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

strong, b { font-weight: var(--font-weight-bold); }

::selection { background: rgba(160, 24, 24, 0.18); }

/* ============================================================
   LAYOUT
   ============================================================ */

.wrap, .container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--spacing-md);
}
.wrap.narrow { max-width: var(--max-width-prose); }

main { min-height: 60vh; }

/* ============================================================
   PERSISTENT NAV (sticky parchment, dark text)
   ============================================================ */

.site-header {
  background: #f4f2ee;
  border-bottom: 2px solid #2c1810;
  position: sticky;
  top: 0;
  z-index: 1000;
  margin: 0;
  padding: 0;
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--spacing-md);
  min-height: var(--nav-height);
  padding: 12px 24px;
  max-width: var(--max-width);
  margin: 0 auto;
}

.site-header .masthead {
  display: flex;
  align-items: baseline;
  margin: 0;
  padding: 0;
}
.site-header .masthead a {
  display: inline-flex;
  align-items: baseline;
  color: #2c1810;
  border: none;
  text-decoration: none;
}
.site-header .masthead a:hover { border: none; }
.site-header .masthead-title {
  font-family: 'IBM Plex Sans', system-ui, sans-serif;
  font-weight: 700;
  font-size: 20px;
  letter-spacing: 0.03em;
  color: #2c1810;
  margin: 0;
  line-height: 1;
}
.site-header .masthead-tagline { display: none; }

.nav-toggle {
  font-family: 'IBM Plex Sans', system-ui, sans-serif;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #2c1810;
  border: 2px solid #2c1810;
  padding: 7px 20px;
  border-radius: 2px;
  background: transparent;
  cursor: pointer;
  display: block;
}
.nav-toggle:hover {
  background: rgba(44, 24, 16, 0.06);
}

/* Nav dropdown — hidden by default, shown on .open toggle */
.site-nav {
  display: none;
  position: absolute;
  top: 100%;
  right: 24px;
  background: #faf8f5;
  border: 1px solid rgba(44, 24, 16, 0.12);
  box-shadow: 0 4px 16px rgba(44, 24, 16, 0.1);
  border-radius: 3px;
  padding: 8px 0;
  z-index: 1001;
  min-width: 240px;
}
.site-nav.open { display: block; }
.site-nav a {
  display: block;
  padding: 10px 24px;
  color: #2c1810;
  font-family: 'IBM Plex Sans', system-ui, sans-serif;
  font-weight: 500;
  font-size: 15px;
  text-decoration: none;
  border: none;
  cursor: pointer;
  position: relative;
  transition: color 0.15s, background 0.15s, padding-left 0.15s;
}
.site-nav a::before {
  content: '›';
  position: absolute;
  left: 10px;
  color: #8B1A1A;
  opacity: 0;
  transform: translateX(-4px);
  transition: opacity 0.15s, transform 0.15s;
}
.site-nav a:hover {
  background: rgba(139, 26, 26, 0.06);
  color: #8B1A1A;
  text-decoration: underline;
  text-underline-offset: 3px;
  padding-left: 30px;
  border: none;
}
.site-nav a:hover::before {
  opacity: 1;
  transform: translateX(0);
}
.site-nav a.active,
.site-nav a[aria-current="page"] {
  font-weight: 700;
  border-left: 3px solid #a01818;
  padding-left: 21px;
}

/* Breadcrumbs */
.breadcrumbs {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  padding: 0.9rem 0 0.5rem;
  font-family: var(--font-body);
}
.breadcrumbs a {
  color: var(--text-secondary);
  border: none;
}
.breadcrumbs a:hover {
  color: var(--accent);
  border: none;
}
.breadcrumbs .sep {
  margin: 0 0.4rem;
  color: var(--text-secondary);
}
.breadcrumbs .current {
  color: var(--text-primary);
  font-weight: 600;
}

/* Chamber / party cross-link banner */
.cross-link-bar {
  background: var(--bg-section);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 0.7rem 1rem;
  margin: 0.5rem 0 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  font-size: var(--font-size-small);
}
.cross-link-bar { font-size: 14px; font-weight: 500; }
.cross-link-bar .label { color: var(--text-secondary); font-weight: 500; }
.cross-link-bar a {
  font-weight: 600;
  color: var(--accent);
  border: none;
}
.cross-link-bar a:hover { text-decoration: underline; border: none; }

/* ============================================================
   FOOTER
   ============================================================ */

.site-footer {
  background: var(--bg-nav);
  color: #f4f2ee;
  margin-top: var(--spacing-xl);
  padding: var(--spacing-md) 0;
  font-size: 14px;
  font-weight: 500;
  text-align: center;
  border-top: 1px solid rgba(244, 242, 238, 0.08);
}
.site-footer a { color: #f4f2ee; border: none; font-weight: 500; }
.site-footer a:hover { border-bottom: 1px solid var(--tier-influenced); }
.site-footer .sep { padding: 0 0.4rem; color: rgba(244, 242, 238, 0.55); }
.site-footer .footer-copyright {
  margin: 0.7rem auto 0;
  max-width: 64ch;
  font-size: 0.72rem;
  line-height: 1.55;
  font-weight: 400;
  color: rgba(244, 242, 238, 0.5);
}

/* ============================================================
   PAGE THESIS BAR
   ============================================================ */

.page-thesis {
  border-bottom: 1px solid var(--border-light);
  padding: var(--spacing-md) 0;
}
.page-thesis h1 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.5rem;
  line-height: 1.3;
  margin: 0;
}

/* ============================================================
   TIER BADGES + COLORS
   ============================================================ */

.tier-badge {
  display: inline-block;
  padding: 0.25rem 0.6rem;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: 1px solid;
  border-radius: 2px;
  white-space: nowrap;
}
.tier-badge.tier-captured     { color: var(--tier-captured);     border-color: var(--tier-captured);     background: var(--tier-captured-bg); }
.tier-badge.tier-influenced   { color: var(--tier-influenced);   border-color: var(--tier-influenced);   background: var(--tier-influenced-bg); }
.tier-badge.tier-transactional { color: var(--tier-transactional); border-color: var(--tier-transactional); background: var(--tier-transactional-bg); }
.tier-badge.tier-independent  { color: var(--tier-independent);  border-color: var(--tier-independent);  background: var(--tier-independent-bg); }

.tier-text { font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; font-size: 14px; }
.tier-text.tier-captured     { color: var(--tier-captured); }
.tier-text.tier-influenced   { color: var(--tier-influenced); }
.tier-text.tier-transactional { color: var(--tier-transactional); }
.tier-text.tier-independent  { color: var(--tier-independent); }

/* ============================================================
   TABLES (readable, not cramped)
   ============================================================ */

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
}
th {
  font-family: var(--font-body);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 14px;
  text-align: left;
  padding: 0.75rem 1rem;
  border-bottom: 2px solid var(--border-medium);
  color: var(--text-secondary);
  background: var(--bg-section);
}
td {
  padding: 0.65rem 1rem;
  border-bottom: 1px solid var(--border-light);
  color: var(--text-primary);
  font-weight: 500;
  vertical-align: top;
}
tr:last-child td { border-bottom: none; }
tbody tr:hover td { background: rgba(44, 24, 16, 0.035); }
.num, td.num, th.num { font-family: var(--font-mono); text-align: right; }

.table-wrap { overflow-x: auto; }

/* ============================================================
   CARDS
   ============================================================ */

.card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: var(--spacing-md);
}
.card-grid {
  display: grid;
  gap: var(--spacing-sm);
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}

/* Tier-bordered cards */
.card.tier-captured     { border-left: 3px solid var(--tier-captured); }
.card.tier-influenced   { border-left: 3px solid var(--tier-influenced); }
.card.tier-transactional { border-left: 3px solid var(--tier-transactional); }
.card.tier-independent  { border-left: 3px solid var(--tier-independent); }

/* ============================================================
   FORMS / BUTTONS
   ============================================================ */

input[type="text"], input[type="search"], select, textarea {
  font-family: var(--font-body);
  font-size: var(--font-size-body);
  color: var(--text-primary);
  background: var(--bg-input);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius);
  padding: 0.6rem 0.75rem;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(160, 24, 24, 0.12);
}

button, .btn {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.04em;
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius);
  padding: 0.55rem 1.1rem;
  cursor: pointer;
  transition: background 120ms, border-color 120ms, color 120ms;
}
button:hover, .btn:hover {
  background: var(--text-primary);
  color: var(--text-on-dark);
  border-color: var(--text-primary);
}
.btn.primary {
  background: var(--accent);
  color: var(--text-on-dark);
  border-color: var(--accent);
}
.btn.primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
}

/* ============================================================
   EMPTY STATES
   ============================================================ */

.empty-state {
  text-align: center;
  padding: var(--spacing-lg) var(--spacing-md);
  border: 1px dashed var(--border-medium);
  border-radius: var(--radius);
  color: var(--text-secondary);
  font-weight: 500;
  background: var(--bg-section);
}
.empty-state .empty-icon {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}
.empty-state .empty-title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--text-primary);
  margin-bottom: 0.3rem;
}

/* ============================================================
   LOADING SKELETON
   ============================================================ */

.skeleton {
  background: linear-gradient(90deg, var(--bg-section), rgba(44, 24, 16, 0.08), var(--bg-section));
  background-size: 200% 100%;
  animation: skel 1.4s infinite linear;
  border-radius: var(--radius);
  min-height: 1em;
}
@keyframes skel { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* ============================================================
   TYPOGRAPHY UTILITIES — semantic classes for prose & data
   Use these instead of inline font-size / font-family / color.
   ============================================================ */

.h1-display {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 2.5rem;
  line-height: 1.15;
  letter-spacing: 0.02em;
  color: var(--text-primary);
  margin: 0 0 0.6em;
}
.h2-section {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.75rem;
  line-height: 1.2;
  letter-spacing: 0.02em;
  color: var(--text-primary);
  margin: 1.8em 0 0.8em;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--border-light);
}
.h3-sub {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1.05rem;
  line-height: 1.3;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-secondary);
  margin: 1.4em 0 0.6em;
}
.body-text {
  font-family: var(--font-body);
  font-size: var(--font-size-body);
  font-weight: 500;
  line-height: 1.75;
  color: var(--text-primary);
}
.caption {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.5;
  color: var(--text-caption);
}
.data-value {
  font-family: var(--font-mono);
  font-feature-settings: "tnum" 1, "lnum" 1;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-primary);
}
.data-small {
  font-family: var(--font-mono);
  font-feature-settings: "tnum" 1, "lnum" 1;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
}

/* ============================================================
   TABLE COMPONENTS — variants on the base table
   ============================================================ */

.data-table th {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.08em;
}
.data-table td {
  font-size: 14px;
  font-weight: 500;
}
.data-table td.num,
.data-table td .data-value,
.data-table td .data-small {
  font-variant-numeric: tabular-nums;
}
.compact-table th,
.compact-table td {
  padding: 0.45rem 0.7rem;
  font-size: 14px;
}
.striped-table tbody tr:nth-child(even) td { background: rgba(44, 24, 16, 0.018); }
.table-caption {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  padding: 0 0 0.5rem;
  text-align: left;
}

/* ============================================================
   CARD COMPONENTS — patterns layered on .card
   ============================================================ */

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--spacing-sm);
  padding-bottom: var(--spacing-xs);
  margin-bottom: var(--spacing-sm);
  border-bottom: 1px solid var(--border-light);
}
.card-header .card-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  margin: 0;
  color: var(--text-primary);
}
.card-header .card-eyebrow {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-secondary);
}
.card-body { color: var(--text-primary); font-weight: 500; }
.card-footer {
  margin-top: var(--spacing-sm);
  padding-top: var(--spacing-xs);
  border-top: 1px solid var(--border-light);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--spacing-sm);
}
.card.compact { padding: var(--spacing-sm); }
.card.flush { padding: 0; }
.card.flush .card-header { padding: var(--spacing-sm) var(--spacing-md); margin-bottom: 0; }
.card.flush .card-body { padding: var(--spacing-sm) var(--spacing-md); }
.card.flush .card-footer { padding: var(--spacing-xs) var(--spacing-md); margin-top: 0; }

/* Stat card — single big number, label, optional context */
.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: var(--spacing-md);
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}
.stat-card .stat-label {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-secondary);
}
.stat-card .stat-value {
  font-family: var(--font-mono);
  font-feature-settings: "tnum" 1, "lnum" 1;
  font-size: 2rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.1;
}
.stat-card .stat-context {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
}

/* ============================================================
   UTILITIES
   ============================================================ */

.mono { font-family: var(--font-mono); }
.dim { color: var(--text-secondary); font-size: 14px; font-weight: 500; }
.text-secondary { color: var(--text-secondary); }
.scap { text-transform: uppercase; letter-spacing: 0.08em; font-size: 14px; font-family: var(--font-body); font-weight: 600; }
.sr-only { position: absolute; left: -9999px; top: auto; width: 1px; height: 1px; overflow: hidden; }

/* Prose container */
.prose, .prose-section {
  font-size: var(--font-size-body);
  font-weight: 500;
  line-height: 1.75;
}
.prose-section { padding: var(--spacing-lg) 0; }
.prose .narrow,
.prose-section .wrap.narrow { max-width: var(--max-width-prose); }
.prose p, .prose-section p { margin: 0 0 1em; }
.prose h2, .prose-section h2 { margin-top: 1.8em; }

/* ============================================================
   PRINT
   ============================================================ */

@media print {
  body { background: white; color: black; font-size: 11pt; }
  .site-header, .site-footer, .nav-toggle { display: none; }
  a { color: black; text-decoration: underline; }
  .card, table { border: 1px solid #888; box-shadow: none; }
  .breadcrumbs { display: none; }
}

/* ============================================================
   OVERRIDES — neutralize old hardcoded colors elsewhere
   These selectors are slightly more specific than the originals
   to guarantee the design system wins without !important.
   ============================================================ */

/* Old influence.css link color was navy — force crimson */
body a { color: var(--accent); }
body a:hover { color: var(--accent); border-bottom-color: var(--accent); }
/* Nav and footer text on dark — full opacity for AAA contrast */
body .site-nav a { color: #2c1810; font-weight: 500; font-size: 15px; }
body .site-nav a:hover { color: #2c1810; background: rgba(44, 24, 16, 0.04); }
body .site-footer { color: #f4f2ee; font-weight: 500; }
body .site-footer a { color: #f4f2ee; font-weight: 500; }

/* Old chamber_blueprint.css used bright blue (#2754c4) — kill it */
body .ch-title { color: var(--text-primary); font-family: var(--font-display); font-style: normal; }
body .ch-meta-note { color: var(--text-secondary); }
body .cap-caption-title { color: var(--text-primary); }

/* Chamber blueprint kraft frame — soften with warm border */
body .ch-floor { border-color: var(--tier-transactional); background: var(--bg-card); }
body .ch-floor-section { background: transparent; }
body .ch-floor-section::before { color: var(--text-primary); opacity: 0.04; }

/* Map party fills — strip bright blue/navy */
body .map-c-udp, body .map-party-d-color { color: var(--party-d); }
:root {
  --map-page-bg: var(--bg-parchment);
  --map-paper-bg: var(--bg-card);
  --map-tier-cap: var(--tier-captured);
  --map-tier-inf: var(--tier-influenced);
  --map-tier-tx: var(--tier-transactional);
  --map-tier-ind: var(--tier-independent);
  --map-party-d: var(--party-d);
  --map-party-r: var(--party-r);
  --map-party-i: var(--party-i);
}

/* Chamber v21 — kill bright-blue dem fill */
:root {
  --ch-ring-captured: var(--tier-captured);
  --ch-ring-influenced: var(--tier-influenced);
  --ch-ring-transactional: var(--tier-transactional);
  --ch-ring-independent: var(--tier-independent);
  --ch-fill-d: var(--party-d);
  --ch-fill-r: var(--party-r);
  --ch-fill-i: var(--party-i);
  --ch-warm-gray: var(--border-medium);
  --cv2-ring-captured: var(--tier-captured);
  --cv2-ring-influenced: var(--tier-influenced);
  --cv2-ring-independent: var(--tier-independent);
  --cv2-ring-transactional: var(--tier-transactional);
  --cv2-warm-gray: var(--border-medium);
}

/* Old `.party-card.party-d:hover` used navy — use party-d */
body .party-card.party-d:hover { border-bottom-color: var(--party-d); }
body .party-card.party-r:hover { border-bottom-color: var(--party-r); }

/* Fix old parchment.css cap-caption blue */
body .cap-caption-title { color: var(--text-primary) !important; }

/* ============================================================
   ACCESSIBILITY FLOOR — overrides every legacy stylesheet.
   Body text is 500 weight, 14px minimum, dark enough for AAA.
   ============================================================ */

body, body p, body li, body dd, body dt, body td, body th, body label, body span:not([style*="color"]) {
  font-weight: 500;
}
body p, body li { font-size: 16px; line-height: 1.65; }
body small, body .caption, body .scap, body .dim {
  font-size: 14px;
  font-weight: 500;
}
/* Kill any text-color values lighter than the WCAG floor on parchment */
body .ink-faint, body .ink-light, body .text-caption,
body [class*="-faint"], body [class*="-light"] {
  color: var(--text-secondary);
}
/* Mono numbers must stay readable */
body .mono, body .num, body td.num, body th.num {
  font-weight: 500;
}
/* Force dark text on parchment surfaces — never let opacity-faded text leak through */
body .lede { color: var(--text-primary); font-weight: 500; }
