/* ══════════════════════════════════════════════════════════════════
   WHAT THE NEWS — Data-forward, clean, no-nonsense.
   Inter for UI, JetBrains Mono for numbers.
   ══════════════════════════════════════════════════════════════════ */

:root {
  --bg: #0f1117;
  --surface: #1a1d27;
  --surface-hover: #22263a;
  --border: #2a2e3f;
  --text: #e4e5e9;
  --text-muted: #8b8fa3;
  --accent: #6c8aff;
  --accent-hover: #8ba3ff;
  --green: #34d399;
  --red: #f87171;
  --yellow: #fbbf24;
  --font: 'Inter', -apple-system, system-ui, sans-serif;
  --mono: 'JetBrains Mono', 'Fira Code', monospace;
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.6;
  font-size: 15px;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
}


/* ── HEADER ─────────────────────────────────────────────────── */

.site-header {
  border-bottom: 1px solid var(--border);
  padding: 0.75rem 0;
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.site-logo {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.02em;
}

.site-logo:hover { color: var(--accent); }

.site-nav { display: flex; gap: 1.25rem; }

.site-nav a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
}

.site-nav a:hover { color: var(--text); }


/* ── HERO ───────────────────────────────────────────────────── */

.hero {
  padding: 3rem 0 2rem;
  max-width: 700px;
}

.hero h1 {
  font-size: 2.2rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-bottom: 0.75rem;
}

.hero-sub {
  font-size: 1.05rem;
  color: var(--text-muted);
  line-height: 1.7;
}


/* ── SECTIONS ───────────────────────────────────────────────── */

.section {
  padding: 2rem 0;
  border-top: 1px solid var(--border);
}

.section-heading {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  letter-spacing: -0.01em;
}

.section-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
}


/* ── STATS GRID ─────────────────────────────────────────────── */

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1rem;
  text-align: center;
}

.stat-value {
  font-family: var(--mono);
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.2;
}

.stat-label {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-top: 0.25rem;
}

.tone-fav { color: var(--green); }
.tone-crit { color: var(--red); }


/* ── TONE SCALE EXPLAINER ──────────────────────────────────── */

.tone-scale {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.5rem;
  margin: 1.5rem 0;
}

.tone-scale-title {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
}

.tone-scale-intro {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 1.25rem;
}

.tone-scale-bar {
  margin-bottom: 1.25rem;
}

.tone-scale-gradient {
  height: 8px;
  border-radius: 4px;
  background: linear-gradient(to right,
    #991b1b 0%,
    #dc2626 20%,
    #4b5563 45%,
    #4b5563 55%,
    #16a34a 80%,
    #166534 100%
  );
}

.tone-scale-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 0.35rem;
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--text-muted);
}

.tone-scale-examples {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-bottom: 1rem;
}

.tone-example {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  padding: 0.65rem 0.75rem;
  border-radius: 6px;
  background: var(--bg);
  border-left: 3px solid var(--border);
}

.tone-example-crit      { border-left-color: #dc2626; }
.tone-example-mild-crit { border-left-color: #b45454; }
.tone-example-neutral   { border-left-color: #6b7280; }
.tone-example-mild-fav  { border-left-color: #5bb77a; }
.tone-example-fav       { border-left-color: #16a34a; }

.tone-example-score {
  font-size: 0.85rem;
  font-weight: 700;
  min-width: 2.8rem;
  flex-shrink: 0;
  padding-top: 0.15rem;
}

.tone-example-label {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}

.tone-example-text {
  font-size: 0.82rem;
  line-height: 1.55;
  color: var(--text);
  margin: 0.2rem 0;
}

.tone-example-who {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-style: italic;
}

.tone-scale-note {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.6;
  border-top: 1px solid var(--border);
  padding-top: 0.75rem;
}

@media (max-width: 768px) {
  .tone-scale { padding: 1rem; }
  .tone-example { flex-direction: column; gap: 0.3rem; }
  .tone-example-score { min-width: auto; }
}


/* ── STANCE BAR ─────────────────────────────────────────────── */

.stance-bar {
  display: flex;
  height: 32px;
  border-radius: 6px;
  overflow: hidden;
  margin-bottom: 1.5rem;
}

.stance-bar > div {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 600;
  color: #fff;
  min-width: 28px;
}

.sb-fav  { background: #166534; }
.sb-neu  { background: #4b5563; }
.sb-crit { background: #991b1b; }


/* ── DATA TABLE ─────────────────────────────────────────────── */

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.data-table th {
  text-align: left;
  padding: 0.5rem 0.75rem;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  border-bottom: 2px solid var(--border);
  font-weight: 600;
}

.data-table td {
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid var(--border);
}

.data-table tr:hover td { background: var(--surface-hover); }

.mono { font-family: var(--mono); font-size: 0.82rem; }


/* ── TAGS / BADGES ──────────────────────────────────────────── */

.tag {
  font-size: 0.65rem;
  font-weight: 600;
  padding: 0.15rem 0.45rem;
  border-radius: 3px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.tag-outlet { background: #1e3a5f; color: #93c5fd; }
.tag-role   { background: #3f3f46; color: #a1a1aa; }
.tag-type   { background: #4c1d95; color: #c4b5fd; }
.tag-major  { background: #1e3a5f; color: #93c5fd; }

.stance-badge {
  font-size: 0.65rem;
  font-weight: 700;
  padding: 0.15rem 0.4rem;
  border-radius: 3px;
  text-transform: uppercase;
}

.stance-favorable, .stance-fav { background: #052e16; color: var(--green); }
.stance-neutral               { background: #27272a; color: #a1a1aa; }
.stance-critical, .stance-crit { background: #450a0a; color: var(--red); }


/* ── PUBLICATION PROFILE LOGO ──────────────────────────────── */

.pub-profile-logo {
  width: 80px;
  height: 80px;
  border-radius: 12px;
  object-fit: contain;
  flex-shrink: 0;
  background: #fff;
  padding: 8px;
  border: 2px solid var(--border);
}

.pub-profile-logo-placeholder {
  width: 80px;
  height: 80px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 2rem;
  color: var(--text-muted);
  background: var(--surface-hover);
  border: 2px solid var(--border);
  flex-shrink: 0;
}


/* ── PERSONALITY GRID ───────────────────────────────────────── */

.personality-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 0.75rem;
}

.personality-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.85rem 1rem;
  text-decoration: none;
  color: var(--text);
  transition: border-color 0.12s;
}

.personality-card:hover { border-color: var(--accent); }

.personality-card-top {
  display: flex;
  gap: 0.65rem;
  align-items: center;
}

.personality-photo {
  width: 40px;
  height: 40px;
  border-radius: 6px;
  object-fit: cover;
  flex-shrink: 0;
}

.personality-avatar {
  width: 40px;
  height: 40px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1rem;
  color: #fff;
  flex-shrink: 0;
}

.personality-thumb {
  position: relative;
  flex-shrink: 0;
}

.thumb-salary {
  position: absolute;
  bottom: -4px;
  left: 50%;
  transform: translateX(-50%);
  background: #92400e;
  color: var(--yellow);
  font-family: var(--mono);
  font-size: 0.58rem;
  font-weight: 700;
  padding: 0.08rem 0.35rem;
  border-radius: 3px;
  white-space: nowrap;
  letter-spacing: -0.02em;
  line-height: 1.3;
}

.personality-name {
  font-weight: 700;
  font-size: 0.88rem;
  margin-bottom: 0.1rem;
}

.personality-tenure {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-bottom: 0.2rem;
  line-height: 1.3;
}

.personality-meta {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}


/* ── TREND GRID ─────────────────────────────────────────────── */

.trend-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 0.75rem;
}

.trend-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1rem 1.25rem;
  border-left: 3px solid var(--border);
}

.trend-narrative_alignment { border-left-color: var(--yellow); }
.trend-coverage_gap        { border-left-color: var(--red); }
.trend-talking_point       { border-left-color: var(--accent); }
.trend-contradiction       { border-left-color: #f472b6; }
.trend-source_concentration { border-left-color: #fb923c; }
.trend-narrative_push       { border-left-color: #e11d48; }

.trend-type {
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  display: block;
  margin-bottom: 0.3rem;
}

.trend-title {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 0.3rem;
}

.trend-desc {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.trend-meta {
  display: flex;
  gap: 1rem;
  margin-top: 0.5rem;
  font-size: 0.72rem;
  color: var(--text-muted);
}

.trend-score { font-family: var(--mono); }


/* ── STATEMENTS ─────────────────────────────────────────────── */

.statement-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.statement-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1rem 1.25rem;
  border-left: 3px solid var(--border);
}

.stance-border-favorable { border-left-color: var(--green); }
.stance-border-critical  { border-left-color: var(--red); }
.stance-border-neutral   { border-left-color: var(--border); }

.statement-speaker {
  font-weight: 700;
  font-size: 0.88rem;
  margin-bottom: 0.4rem;
}

.speaker-outlet {
  font-weight: 400;
  color: var(--text-muted);
  font-size: 0.8rem;
  margin-left: 0.4rem;
}

.speaker-topic {
  display: inline-block;
  font-weight: 400;
  color: var(--accent);
  font-size: 0.75rem;
  margin-left: 0.5rem;
  text-decoration: none;
}
.speaker-topic:hover { text-decoration: underline; }

.statement-text {
  font-size: 0.92rem;
  line-height: 1.65;
  color: var(--text);
  border: none;
  padding: 0;
  margin: 0 0 0.5rem;
  font-style: normal;
}

.statement-meta {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  flex-wrap: wrap;
  font-size: 0.75rem;
}

.statement-stance {
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 0.65rem;
  padding: 0.1rem 0.4rem;
  border-radius: 3px;
}

.statement-tone {
  font-family: var(--mono);
  color: var(--text-muted);
}

.statement-topic {
  color: var(--text-muted);
  font-style: italic;
}

.statement-cite {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
}

.statement-cite:hover { text-decoration: underline; }

.statement-date { color: var(--text-muted); }


/* ── PUBLICATIONS ──────────────────────────────────────────── */

.pub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 0.75rem;
  margin-top: 1rem;
}

.pub-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1rem 1.25rem;
  text-decoration: none;
  color: var(--text);
  transition: border-color 0.12s;
}

.pub-card:hover { border-color: var(--accent); }

.pub-card-top {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  margin-bottom: 0.4rem;
}

.pub-logo {
  width: 36px;
  height: 36px;
  border-radius: 6px;
  object-fit: contain;
  flex-shrink: 0;
  background: #fff;
  padding: 3px;
}

.pub-logo-placeholder {
  width: 36px;
  height: 36px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1rem;
  color: var(--text-muted);
  background: var(--surface-hover);
  border: 1px solid var(--border);
  flex-shrink: 0;
}

.pub-card-header {
  flex: 1;
  min-width: 0;
}

.pub-card-name {
  font-size: 0.95rem;
  font-weight: 700;
}

.pub-card-tags {
  display: flex;
  gap: 0.3rem;
  flex-shrink: 0;
}

.pub-card-parent {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 0.3rem;
}

.pub-card-desc {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.pub-details {
  display: flex;
  gap: 1.5rem;
  margin-top: 0.75rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.pub-detail strong {
  color: var(--text);
  font-weight: 600;
}


/* ── OWNERSHIP TAGS ────────────────────────────────────────── */

.tag-ownership-corporate   { background: #1e293b; color: #94a3b8; }
.tag-ownership-independent { background: #1c1917; color: #fb923c; }
.tag-ownership-nonprofit   { background: #052e16; color: #86efac; }
.tag-ownership-public      { background: #172554; color: #93c5fd; }


/* ── OWNERSHIP BAR ─────────────────────────────────────────── */

.ownership-bar {
  display: flex;
  height: 32px;
  border-radius: 6px;
  overflow: hidden;
  margin-bottom: 0.5rem;
}

.own-seg {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 600;
  color: #fff;
  min-width: 28px;
}

.own-corporate   { background: #334155; }
.own-independent  { background: #92400e; }
.own-nonprofit    { background: #166534; }
.own-public       { background: #1e40af; }

.ownership-legend {
  display: flex;
  gap: 1rem;
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.legend-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 2px;
  margin-right: 0.25rem;
  vertical-align: middle;
}

.own-corporate-dot   { background: #334155; }
.own-independent-dot { background: #92400e; }
.own-nonprofit-dot   { background: #166534; }
.own-public-dot      { background: #1e40af; }


/* ── FILTER BAR ────────────────────────────────────────────── */

.filter-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 0.75rem;
}

.filter-label {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}

.filter-btn {
  font-size: 0.75rem;
  padding: 0.25rem 0.6rem;
  border-radius: 4px;
  text-decoration: none;
  color: var(--text-muted);
  background: var(--surface);
  border: 1px solid var(--border);
  transition: all 0.12s;
}

.filter-btn:hover { color: var(--text); border-color: var(--accent); }
.filter-btn.active { color: var(--text); background: var(--accent); border-color: var(--accent); }


/* ── PAGE HEADER ───────────────────────────────────────────── */

.page-header { padding: 2rem 0 0.5rem; }
.page-header h1 {
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 0.3rem;
}


/* ── SECTION MORE ──────────────────────────────────────────── */

.section-more {
  margin-top: 1rem;
  text-align: center;
}

.btn-secondary {
  background: var(--surface);
  color: var(--text-muted);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  color: var(--text);
  border-color: var(--accent);
}


/* ── APPEARANCES ───────────────────────────────────────────── */

.appearances-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.appearance-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1rem 1.25rem;
  border-left: 3px solid var(--accent);
}

.appearance-interview   { border-left-color: var(--accent); }
.appearance-panel       { border-left-color: var(--yellow); }
.appearance-monologue   { border-left-color: #a78bfa; }
.appearance-debate      { border-left-color: var(--red); }
.appearance-hearing     { border-left-color: var(--green); }
.appearance-commentary  { border-left-color: #fb923c; }

.appearance-header {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.4rem;
}

.appearance-title {
  font-size: 0.95rem;
  font-weight: 600;
}

.appearance-title a {
  color: var(--text);
  text-decoration: none;
}

.appearance-title a:hover { color: var(--accent); }

.appearance-meta {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  flex-wrap: wrap;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.appearance-channel { font-weight: 500; }

.appearance-desc {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 0.4rem;
  line-height: 1.5;
}


/* ── PROFILE ────────────────────────────────────────────────── */

.profile-header {
  padding: 2rem 0;
}

.profile-header h1 {
  font-size: 1.8rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
}

.profile-meta { display: flex; gap: 0.5rem; margin-bottom: 0.75rem; }

.profile-bio {
  color: var(--text-muted);
  font-size: 0.92rem;
  max-width: 600px;
}

.salary-disclosure {
  margin-top: 0.75rem;
  padding: 0.6rem 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 0.85rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.salary-label {
  color: var(--text-muted);
  font-weight: 500;
}

.salary-amount {
  font-family: var(--mono);
  font-weight: 700;
  color: var(--yellow);
  font-size: 0.95rem;
}

.salary-meta {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.topic-header { padding: 2rem 0; }
.topic-header h1 {
  font-size: 1.6rem;
  font-weight: 800;
  margin-bottom: 0.3rem;
}
.topic-bill { color: var(--text-muted); font-family: var(--mono); font-size: 0.85rem; }


/* ── ABOUT BLOCK ────────────────────────────────────────────── */

.about-block {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.5rem 2rem;
}

.about-block h2 { font-size: 1rem; margin-bottom: 0.5rem; }

.about-block p {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.7;
}

.about-block a { color: var(--accent); text-decoration: none; }
.about-block a:hover { text-decoration: underline; }


/* ── SEARCH ─────────────────────────────────────────────────── */

.search-form {
  display: flex;
  gap: 0.5rem;
  margin: 1.5rem 0;
}

.search-input {
  flex: 1;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 0.65rem 1rem;
  border-radius: 6px;
  font-family: var(--font);
  font-size: 0.9rem;
}

.search-input:focus {
  outline: none;
  border-color: var(--accent);
}

.search-meta {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-bottom: 1rem;
}


/* ── BUTTONS ────────────────────────────────────────────────── */

.btn {
  display: inline-block;
  padding: 0.55rem 1.25rem;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  border: none;
  cursor: pointer;
  font-family: var(--font);
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-primary:hover { background: var(--accent-hover); }


/* ── ADMIN PANELS ───────────────────────────────────────────── */

.admin-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 1.25rem;
}

.admin-panel h2 {
  font-size: 1rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}

.admin-form { display: flex; flex-direction: column; gap: 0.75rem; }

.form-row label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.25rem;
}

.form-row input,
.form-row select,
.form-row textarea {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 0.5rem 0.75rem;
  border-radius: 4px;
  font-family: var(--font);
  font-size: 0.88rem;
}

.form-row input:focus,
.form-row select:focus,
.form-row textarea:focus {
  outline: none;
  border-color: var(--accent);
}


/* ── FLASH ──────────────────────────────────────────────────── */

.flash {
  padding: 0.65rem 1rem;
  border-radius: 6px;
  margin: 1rem 0;
  font-size: 0.85rem;
}

.flash-success { background: #052e16; color: var(--green); border: 1px solid #166534; }
.flash-error   { background: #450a0a; color: var(--red); border: 1px solid #991b1b; }


/* ── MISC ───────────────────────────────────────────────────── */

.empty-state {
  color: var(--text-muted);
  font-size: 0.9rem;
  padding: 2rem;
  text-align: center;
  font-style: italic;
}

.empty-state-box {
  background: var(--surface);
  border: 1px dashed var(--border);
  border-radius: 8px;
  padding: 1.75rem 2rem;
  text-align: center;
  max-width: 600px;
  margin: 0 auto;
}

.empty-state-icon {
  font-size: 1.8rem;
  margin-bottom: 0.5rem;
  opacity: 0.5;
}

.empty-state-box h3 {
  font-size: 0.92rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
  color: var(--text);
}

.empty-state-box p {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.timestamp {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 0.75rem;
}

.login-box {
  max-width: 320px;
  margin: 4rem auto;
  text-align: center;
}

.login-box h1 { margin-bottom: 1rem; }
.login-box form { display: flex; flex-direction: column; gap: 0.75rem; }


/* ── FOOTER ─────────────────────────────────────────────────── */

/* ── SKIP LINK (accessibility) ─────────────────────────────── */

.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  padding: 0.5rem 1rem;
  background: var(--accent);
  color: #fff;
  border-radius: 0 0 6px 6px;
  font-size: 0.85rem;
  font-weight: 600;
  z-index: 9999;
  text-decoration: none;
  transition: top 0.15s;
}

.skip-link:focus {
  top: 0;
}


/* ── FOOTER ───────────────────────────────────────────────── */

.site-footer {
  border-top: 1px solid var(--border);
  padding: 2rem 0 1.5rem;
  margin-top: 3rem;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.footer-inner { }

.footer-nav {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-bottom: 1.5rem;
}

.footer-col {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.footer-col-title {
  font-weight: 600;
  color: var(--text);
  font-size: 0.8rem;
  margin-bottom: 0.25rem;
}

.footer-bottom {
  text-align: center;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.site-footer a {
  color: var(--accent);
  text-decoration: none;
}

.site-footer a:hover { text-decoration: underline; }

@media (max-width: 600px) {
  .footer-nav {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }
}


/* ── MONEY VALUES ──────────────────────────────────────────── */

.money-value {
  font-family: var(--mono);
  color: var(--yellow);
}


/* ── AVATARS (initial-based) ──────────────────────────────── */

.avatar {
  width: 40px;
  height: 40px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1rem;
  color: #fff;
  flex-shrink: 0;
}

.avatar-0 { background: #6366f1; }
.avatar-1 { background: #ec4899; }
.avatar-2 { background: #f97316; }
.avatar-3 { background: #14b8a6; }
.avatar-4 { background: #8b5cf6; }
.avatar-5 { background: #ef4444; }
.avatar-6 { background: #06b6d4; }
.avatar-7 { background: #84cc16; }


/* ── ENHANCED PROFILE HEADER ──────────────────────────────── */

.profile-header-enhanced {
  padding: 2.5rem 0 0.5rem;
}

.profile-top {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
  margin-bottom: 1.5rem;
}

.profile-photo {
  width: 96px;
  height: 96px;
  border-radius: 12px;
  object-fit: cover;
  flex-shrink: 0;
  border: 2px solid var(--border);
}

.profile-avatar {
  width: 96px;
  height: 96px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 2.2rem;
  color: #fff;
  flex-shrink: 0;
}

.profile-avatar.avatar-0 { background: #6366f1; }
.profile-avatar.avatar-1 { background: #ec4899; }
.profile-avatar.avatar-2 { background: #f97316; }
.profile-avatar.avatar-3 { background: #14b8a6; }
.profile-avatar.avatar-4 { background: #8b5cf6; }
.profile-avatar.avatar-5 { background: #ef4444; }
.profile-avatar.avatar-6 { background: #06b6d4; }
.profile-avatar.avatar-7 { background: #84cc16; }

.profile-photo-wrap {
  position: relative;
  flex-shrink: 0;
}

.profile-pay-badge {
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  background: #92400e;
  color: var(--yellow);
  font-family: var(--mono);
  padding: 0.15rem 0.55rem;
  border-radius: 4px;
  white-space: nowrap;
  display: flex;
  align-items: baseline;
  gap: 0.15rem;
  box-shadow: 0 2px 6px rgba(0,0,0,0.4);
  line-height: 1;
}

.profile-pay-amount {
  font-weight: 800;
  font-size: 0.85rem;
  letter-spacing: -0.02em;
}

.profile-pay-label {
  font-size: 0.6rem;
  font-weight: 600;
  opacity: 0.85;
}

.profile-tenure {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 0.35rem;
  line-height: 1.4;
}

.profile-tenure strong {
  color: var(--text);
}

.profile-identity { flex: 1; min-width: 0; }

.profile-identity h1 {
  font-size: 1.8rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 0.25rem;
  line-height: 1.15;
}

.profile-title {
  display: flex;
  align-items: baseline;
  gap: 0.4rem;
  flex-wrap: wrap;
  margin-bottom: 0.5rem;
  font-size: 0.92rem;
}

.profile-role {
  color: var(--text-muted);
}

.profile-outlet {
  color: var(--text-muted);
}

.profile-outlet::before {
  content: "at ";
}

.profile-outlet a {
  color: var(--accent);
  text-decoration: none;
}

.profile-outlet a:hover {
  text-decoration: underline;
}

.profile-tags {
  display: flex;
  gap: 0.4rem;
  margin-bottom: 0.6rem;
}


/* ── VIDEO GRID ───────────────────────────────────────────── */

.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}

.video-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  text-decoration: none;
  color: var(--text);
  transition: border-color 0.15s, transform 0.15s;
}

.video-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.video-thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  overflow: hidden;
}

.video-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  opacity: 0.9;
  transition: opacity 0.15s;
}

.video-card:hover .video-thumb img {
  opacity: 1;
}

.video-duration {
  position: absolute;
  bottom: 6px;
  right: 6px;
  background: rgba(0, 0, 0, 0.8);
  color: #fff;
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.1rem 0.4rem;
  border-radius: 3px;
}

.video-play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 48px;
  height: 48px;
  background: rgba(0, 0, 0, 0.6);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: #fff;
  opacity: 0;
  transition: opacity 0.15s;
}

.video-card:hover .video-play {
  opacity: 1;
}

.video-info {
  padding: 0.75rem 0.85rem;
}

.video-title {
  font-size: 0.85rem;
  font-weight: 600;
  line-height: 1.35;
  margin-bottom: 0.35rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.video-meta {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-wrap: wrap;
  font-size: 0.72rem;
  color: var(--text-muted);
}

.video-channel {
  font-weight: 500;
}

.video-views::before,
.video-date::before {
  content: "\00b7 ";
}


/* ── PROFILE FACTS GRID ───────────────────────────────────── */

.profile-facts {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.profile-fact {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.85rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.profile-fact-label {
  font-size: 0.62rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

.profile-fact-value {
  font-family: var(--mono);
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.3;
}

.profile-fact-meta {
  font-size: 0.72rem;
  color: var(--text-muted);
}


/* ── STANCE LEGEND ────────────────────────────────────────── */

.profile-stance-section {
  margin-bottom: 1.5rem;
}

.profile-stance-section .stance-bar {
  margin-bottom: 0.5rem;
}

.stance-legend {
  display: flex;
  gap: 1rem;
  font-size: 0.72rem;
  color: var(--text-muted);
}


/* ── CONTROVERSIAL HIGHLIGHT ──────────────────────────────── */

.controversial-highlight {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--red);
  border-radius: 8px;
  padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
}

.controversial-label {
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--red);
  display: block;
  margin-bottom: 0.5rem;
}

.controversial-quote {
  font-size: 0.92rem;
  line-height: 1.65;
  color: var(--text);
  border: none;
  padding: 0;
  margin: 0 0 0.5rem;
  font-style: normal;
}

.controversial-meta {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  font-size: 0.75rem;
}


/* ── FOLLOW THE MONEY — PARENT BARS ──────────────────────── */

.parent-bars {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.parent-bar-row {
  display: grid;
  grid-template-columns: 220px 1fr;
  align-items: center;
  gap: 0.75rem;
}

.parent-bar-label {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 0;
}

.parent-bar-name {
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.parent-bar-count {
  font-size: 0.68rem;
  color: var(--text-muted);
}

.parent-bar-track {
  position: relative;
  height: 28px;
  background: var(--surface);
  border-radius: 4px;
  overflow: hidden;
}

.parent-bar-fill {
  height: 100%;
  border-radius: 4px;
  min-width: 4px;
  transition: width 0.3s ease;
}

.parent-bar-fill.own-corporate   { background: #334155; }
.parent-bar-fill.own-independent { background: #92400e; }
.parent-bar-fill.own-nonprofit   { background: #166534; }
.parent-bar-fill.own-public      { background: #1e40af; }

.parent-bar-amount {
  position: absolute;
  right: 0.5rem;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text);
}


/* ── FOLLOW THE MONEY — OWNERSHIP COMPARISON ─────────────── */

.ownership-comparison {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.75rem;
}

.ownership-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.15rem 1.25rem;
  border-left: 3px solid var(--border);
}

.own-border-corporate   { border-left-color: #334155; }
.own-border-independent { border-left-color: #92400e; }
.own-border-nonprofit   { border-left-color: #166534; }
.own-border-public      { border-left-color: #1e40af; }

.ownership-card-type {
  margin-bottom: 0.5rem;
}

.ownership-card-total {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.ownership-card-meta {
  font-size: 0.75rem;
  color: var(--text-muted);
}


/* ── FOLLOW THE MONEY — SALARY RANKINGS ──────────────────── */

.salary-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.salary-card {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  text-decoration: none;
  color: var(--text);
  transition: border-color 0.12s;
}

.salary-card:hover {
  border-color: var(--accent);
}

.salary-rank {
  font-family: var(--mono);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  min-width: 2rem;
  text-align: center;
}

.salary-card-info {
  flex: 1;
  min-width: 0;
}

.salary-card-name {
  font-weight: 700;
  font-size: 0.9rem;
}

.salary-card-role {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.salary-card-outlet {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.2rem;
}

.salary-card-parent {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.salary-card-photo {
  width: 40px;
  height: 40px;
  border-radius: 6px;
  object-fit: cover;
  flex-shrink: 0;
}

.salary-card-pay {
  text-align: right;
  flex-shrink: 0;
}

.salary-card-amount {
  font-family: var(--mono);
  font-weight: 700;
  font-size: 1rem;
  color: var(--yellow);
}

.salary-card-year {
  font-size: 0.68rem;
  color: var(--text-muted);
}


/* ── LEGAL CASES & CONTRADICTIONS ──────────────────────────── */

.case-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.case-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.25rem;
  text-decoration: none;
  color: var(--text);
  transition: border-color 0.2s, transform 0.15s;
}

.case-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.case-card-header {
  display: flex;
  gap: 0.4rem;
  margin-bottom: 0.6rem;
}

.case-card-name {
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 0.4rem;
}

.case-card-meta {
  display: flex;
  gap: 0.75rem;
  font-size: 0.72rem;
  color: var(--text-muted);
  font-family: var(--mono);
  margin-bottom: 0.5rem;
}

.case-card-summary {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.case-meta-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  align-items: center;
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}

.contradiction-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-top: 1rem;
}

.contradiction-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.5rem;
  border-left: 3px solid var(--red);
}

.contradiction-header {
  margin-bottom: 1.25rem;
}

.contradiction-person {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--text);
}

.contradiction-person:hover .contradiction-name {
  color: var(--accent);
}

.contradiction-photo {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
}

.contradiction-name {
  font-weight: 700;
  font-size: 0.95rem;
  transition: color 0.2s;
}

.contradiction-role {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.contradiction-salary {
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 600;
}

.contradiction-columns {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 1rem;
  align-items: start;
}

.contradiction-vs {
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--red);
  align-self: center;
  padding-top: 1.5rem;
}

.contradiction-side {
  padding: 1rem;
  border-radius: 8px;
}

.contradiction-public {
  background: rgba(99, 102, 241, 0.06);
  border: 1px solid rgba(99, 102, 241, 0.15);
}

.contradiction-private {
  background: rgba(248, 113, 113, 0.06);
  border: 1px solid rgba(248, 113, 113, 0.15);
}

.contradiction-label {
  font-family: var(--mono);
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.5rem;
}

.on-air-label {
  color: var(--accent);
}

.under-oath-label {
  color: var(--red);
}

.contradiction-quote {
  font-size: 0.85rem;
  line-height: 1.6;
  font-style: italic;
  margin-bottom: 0.5rem;
  color: var(--text);
}

.contradiction-cite {
  font-size: 0.68rem;
  color: var(--text-muted);
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem 0.6rem;
}

.contradiction-source {
  font-size: 0.65rem;
  color: var(--text-muted);
  font-family: var(--mono);
  margin-top: 0.4rem;
  opacity: 0.8;
}

.contradiction-summary {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-top: 1rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
}

.contradiction-case-link {
  margin-top: 0.75rem;
}

.contradiction-case-link .tag {
  font-size: 0.65rem;
  text-decoration: none;
}


/* ── BILL LIST (History index) ─────────────────────────────── */

.bill-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 1rem;
}

.bill-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1rem 1.25rem;
  text-decoration: none;
  color: var(--text);
  transition: border-color 0.12s;
  display: block;
}

.bill-card:hover { border-color: var(--accent); }

.bill-card-header {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.bill-card-id {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--accent);
  flex-shrink: 0;
}

.bill-card-title {
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.3;
}

.bill-card-stats {
  display: flex;
  gap: 1.25rem;
  margin-bottom: 0.35rem;
}

.bill-stat {
  display: flex;
  align-items: baseline;
  gap: 0.3rem;
}

.bill-stat-value {
  font-size: 0.88rem;
  font-weight: 700;
}

.bill-stat-label {
  font-size: 0.65rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.bill-card-dates {
  font-size: 0.72rem;
  color: var(--text-muted);
}


/* ── BILL TIMELINE ────────────────────────────────────────── */

.bill-timeline {
  position: relative;
  padding-left: 2rem;
}

.bill-timeline::before {
  content: '';
  position: absolute;
  left: 0.6rem;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--border);
}

.tl-item {
  position: relative;
  margin-bottom: 1.25rem;
}

.tl-marker {
  position: absolute;
  left: -2rem;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  top: 0.35rem;
  z-index: 1;
}

.tl-marker-event {
  background: var(--accent);
  border: 2px solid var(--bg);
  box-shadow: 0 0 0 2px var(--accent);
}

.tl-marker-statement {
  width: 10px;
  height: 10px;
  top: 0.5rem;
  left: calc(-2rem + 2px);
  border: 2px solid var(--bg);
}

.tl-marker-favorable { background: var(--green); box-shadow: 0 0 0 2px var(--green); }
.tl-marker-critical  { background: var(--red); box-shadow: 0 0 0 2px var(--red); }
.tl-marker-neutral   { background: var(--text-muted); box-shadow: 0 0 0 2px var(--text-muted); }

.tl-content {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.85rem 1rem;
}

.tl-event .tl-content {
  border-left: 3px solid var(--accent);
  background: rgba(108, 138, 255, 0.04);
}

.tl-event-signed_into_law .tl-content {
  border-left-color: var(--green);
}

.tl-event-house_passed .tl-content,
.tl-event-senate_passed .tl-content {
  border-left-color: var(--yellow);
}

.tl-event-vetoed .tl-content {
  border-left-color: var(--red);
}

.tl-statement .tl-content {
  border-left: 3px solid var(--border);
}

.tl-stance-favorable .tl-content { border-left-color: var(--green); }
.tl-stance-critical .tl-content  { border-left-color: var(--red); }

.tl-event-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.35rem;
}

.tl-event-type {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent);
}

.tl-event-signed_into_law .tl-event-type { color: var(--green); }
.tl-event-house_passed .tl-event-type,
.tl-event-senate_passed .tl-event-type { color: var(--yellow); }

.tl-date {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.tl-event-desc {
  font-size: 0.85rem;
  color: var(--text);
  line-height: 1.55;
  margin-bottom: 0.35rem;
}

.tl-vote {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--yellow);
  background: rgba(251, 191, 36, 0.1);
  padding: 0.15rem 0.5rem;
  border-radius: 3px;
  margin-right: 0.5rem;
}

.tl-source {
  font-size: 0.72rem;
  color: var(--accent);
  text-decoration: none;
}

.tl-source:hover { text-decoration: underline; }

.tl-statement-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.4rem;
  flex-wrap: wrap;
}

.tl-person {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  text-decoration: none;
  color: var(--text);
}

.tl-person:hover .tl-person-name { color: var(--accent); }

.tl-person-photo {
  width: 24px;
  height: 24px;
  border-radius: 4px;
  object-fit: cover;
}

.tl-person-name {
  font-weight: 700;
  font-size: 0.85rem;
  transition: color 0.12s;
}

.tl-outlet {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.tl-quote {
  font-size: 0.88rem;
  line-height: 1.6;
  color: var(--text);
  border: none;
  padding: 0;
  margin: 0 0 0.4rem;
  font-style: normal;
}

.tl-statement-meta {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  flex-wrap: wrap;
  font-size: 0.75rem;
}


/* ── OWNERSHIP TREE ────────────────────────────────────────── */

.ownership-section {
  margin-top: 1.25rem;
}

.ownership-toggle {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.6rem 1rem;
  color: var(--text);
  font-family: var(--font);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  width: 100%;
  text-align: left;
  transition: border-color 0.15s, background 0.15s;
}

.ownership-toggle:hover {
  border-color: var(--accent);
  background: var(--surface-hover);
}

.ownership-toggle-icon {
  font-size: 0.65rem;
  transition: transform 0.2s;
  flex-shrink: 0;
  color: var(--text-muted);
}

.ownership-section.open .ownership-toggle-icon {
  transform: rotate(90deg);
}

.ownership-toggle-hint {
  margin-left: auto;
  font-weight: 400;
  font-size: 0.72rem;
  color: var(--text-muted);
}

.ownership-tree-container {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease;
}

.ownership-section.open .ownership-tree-container {
  max-height: 2000px;
}

.ownership-tree-inner {
  border: 1px solid var(--border);
  border-top: none;
  border-radius: 0 0 6px 6px;
  padding: 1.25rem;
  background: var(--surface);
}

/* Tree nodes */
.tree-controller {
  margin-bottom: 0.75rem;
}

.tree-node {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.6rem 0.85rem;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--bg);
}

.tree-node-root {
  border-left: 3px solid var(--accent);
  background: rgba(108, 138, 255, 0.06);
}

.tree-node-branch {
  border-left: 3px solid #94a3b8;
}

.tree-node-child {
  border-left: 3px solid #64748b;
}

.tree-node-leaf {
  border-left: 3px solid #475569;
}

.tree-node-label {
  font-weight: 700;
  font-size: 0.88rem;
}

.tree-node-type {
  font-size: 0.6rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

.tree-node-note {
  font-size: 0.72rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.tree-node-desc {
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.4;
}

/* Tree structure connectors */
.tree-branches {
  padding-left: 1.5rem;
  position: relative;
}

.tree-branches::before {
  content: '';
  position: absolute;
  left: 0.75rem;
  top: 0;
  bottom: 0.75rem;
  width: 1px;
  background: var(--border);
}

.tree-branch {
  position: relative;
  margin-top: 0.5rem;
}

.tree-connector {
  position: absolute;
  left: -0.75rem;
  top: 1rem;
  width: 0.75rem;
  height: 1px;
  background: var(--border);
}

.tree-children {
  padding-left: 1.5rem;
  position: relative;
  margin-top: 0.25rem;
}

.tree-children::before {
  content: '';
  position: absolute;
  left: 0.75rem;
  top: 0;
  bottom: 0.75rem;
  width: 1px;
  background: var(--border);
}

.tree-child {
  position: relative;
  margin-top: 0.5rem;
}

/* Outlet tags inside tree nodes */
.tree-outlets {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
  margin-top: 0.3rem;
}

.tree-outlet {
  font-size: 0.68rem;
  font-weight: 600;
  padding: 0.15rem 0.5rem;
  border-radius: 3px;
  background: var(--surface-hover);
  color: var(--text-muted);
  text-decoration: none;
  border: 1px solid var(--border);
  transition: border-color 0.12s, color 0.12s;
}

.tree-outlet:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.tree-outlet-current {
  background: rgba(108, 138, 255, 0.12);
  color: var(--accent);
  border-color: var(--accent);
}

/* Related outlets / siblings */
.tree-related,
.tree-siblings {
  margin-top: 1rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
}

.tree-related-label,
.tree-siblings-label {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
  display: block;
  margin-bottom: 0.4rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.tree-related-list,
.tree-siblings-list {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
}

/* Ownership timeline */
.tree-history {
  margin-top: 1rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
}

.tree-history-label {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
  display: block;
  margin-bottom: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.tree-timeline {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  position: relative;
  padding-left: 1rem;
}

.tree-timeline::before {
  content: '';
  position: absolute;
  left: 0.25rem;
  top: 0.45rem;
  bottom: 0.45rem;
  width: 1px;
  background: var(--border);
}

.tree-timeline-item {
  display: flex;
  gap: 0.75rem;
  align-items: baseline;
  position: relative;
  font-size: 0.78rem;
  line-height: 1.45;
}

.tree-timeline-item::before {
  content: '';
  position: absolute;
  left: -0.85rem;
  top: 0.45rem;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--text-muted);
  flex-shrink: 0;
}

.tree-timeline-year {
  font-family: var(--mono);
  font-weight: 700;
  font-size: 0.72rem;
  color: var(--accent);
  flex-shrink: 0;
  min-width: 2.5rem;
}

.tree-timeline-event {
  color: var(--text-muted);
}


/* ── NAV TOGGLE (hidden on desktop) ─────────────────────────── */

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  z-index: 101;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.2s ease;
}

/* Animate hamburger to X when open */
.nav-open .nav-toggle span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav-open .nav-toggle span:nth-child(2) {
  opacity: 0;
}
.nav-open .nav-toggle span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}


/* ── SECTION COLLAPSIBLE (desktop: always open) ────────────── */

.section-expand {
  display: none; /* hidden on desktop */
}

.section-body {
  /* no special behavior on desktop */
}


/* ── RESPONSIVE ─────────────────────────────────────────────── */

@media (max-width: 768px) {

  /* ── General polish ────────────────────────────────────── */
  .container { padding: 0 1rem; }

  .hero { padding: 2rem 0 1.25rem; }
  .hero h1 { font-size: 1.6rem; }
  .hero-sub { font-size: 0.95rem; }

  .page-header h1 { font-size: 1.3rem; }

  .section-heading {
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border);
  }

  body { font-size: 14px; }

  /* ── Hamburger nav ─────────────────────────────────────── */
  .nav-toggle {
    display: flex;
  }

  .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    padding: 0.5rem 0;
    z-index: 100;
  }

  .site-header {
    position: relative;
  }

  .nav-open .site-nav {
    display: flex;
  }

  .site-nav a {
    padding: 0.75rem 1.5rem;
    font-size: 0.95rem;
    min-height: 44px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid var(--border);
  }

  .site-nav a:last-child {
    border-bottom: none;
  }

  /* ── Collapsible sections ──────────────────────────────── */
  .section-expand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    width: 100%;
    background: none;
    border: none;
    color: var(--text-muted);
    font-family: var(--font);
    font-size: 0.78rem;
    font-weight: 500;
    padding: 0.6rem 0;
    cursor: pointer;
    letter-spacing: 0.02em;
    -webkit-tap-highlight-color: transparent;
  }

  .section-expand:hover,
  .section-expand:focus-visible {
    color: var(--accent);
    outline: none;
  }

  .section-expand-icon {
    display: inline-block;
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 5px solid currentColor;
    transition: transform 0.25s ease;
  }

  .section-collapsible .section-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
  }

  .section-collapsible.section-open .section-body {
    max-height: none;
    overflow: visible;
  }

  .section-collapsible.section-open .section-expand-icon {
    transform: rotate(180deg);
  }

  /* ── Data table to card layout ─────────────────────────── */
  .data-table thead {
    display: none;
  }

  .data-table,
  .data-table tbody,
  .data-table tr,
  .data-table td {
    display: block;
  }

  .data-table tr {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.75rem;
    margin-bottom: 0.5rem;
  }

  .data-table td {
    padding: 0.25rem 0;
    border-bottom: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
  }

  .data-table td::before {
    content: attr(data-label);
    font-size: 0.68rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    flex-shrink: 0;
    min-width: 6rem;
  }

  /* ── Touch targets ─────────────────────────────────────── */
  .pub-card,
  .bill-card,
  .personality-card {
    min-height: 44px;
  }

  /* ── Timeline mobile ───────────────────────────────────── */
  .bill-timeline { padding-left: 1.5rem; }
  .tl-marker { left: -1.5rem; }
  .tl-marker-statement { left: calc(-1.5rem + 2px); }

  .tl-marker {
    width: 10px;
    height: 10px;
  }
  .tl-marker-event {
    width: 12px;
    height: 12px;
  }

  .tl-content {
    width: 100%;
  }

  .tl-statement-header {
    flex-wrap: wrap;
    gap: 0.3rem;
  }

  .tl-person,
  .tl-outlet,
  .tl-date {
    display: block;
    width: auto;
  }

  .tl-quote {
    font-size: 0.85rem;
    padding: 0.5rem 0.75rem;
  }

  /* ── Filter bar scroll ─────────────────────────────────── */
  .filter-bar {
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    gap: 0.3rem;
    scrollbar-width: none;
  }
  .filter-bar::-webkit-scrollbar { display: none; }

  /* ── Existing mobile overrides (preserved) ─────────────── */
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .personality-grid { grid-template-columns: 1fr; }
  .trend-grid { grid-template-columns: 1fr; }
  .pub-grid { grid-template-columns: 1fr; }
  .search-form { flex-direction: column; }
  .pub-details { flex-direction: column; gap: 0.3rem; }
  .profile-top { flex-direction: column; align-items: center; text-align: center; }
  .profile-photo-wrap { margin-bottom: 0.5rem; }
  .profile-meta { justify-content: center; }
  .profile-title { justify-content: center; }
  .profile-tags { justify-content: center; }
  .profile-facts { grid-template-columns: 1fr; }
  .video-grid { grid-template-columns: 1fr; }
  .parent-bar-row { grid-template-columns: 1fr; gap: 0.25rem; }
  .ownership-comparison { grid-template-columns: 1fr; }
  .salary-card { flex-wrap: wrap; }
  .salary-card-pay { width: 100%; text-align: left; margin-top: 0.25rem; }
  .stance-legend { flex-direction: column; gap: 0.25rem; }
  .contradiction-columns { grid-template-columns: 1fr; }
  .contradiction-vs { padding: 0; text-align: center; }
  .case-grid { grid-template-columns: 1fr; }
  .case-meta-bar { flex-direction: column; gap: 0.3rem; }
  .tree-branches { padding-left: 1rem; }
  .tree-children { padding-left: 1rem; }
  .tree-timeline-item { flex-direction: column; gap: 0.1rem; }
  .bill-card-stats { flex-wrap: wrap; gap: 0.75rem; }
}


/* ── Small screens (<480px): stats 2-col ─────────────────── */

@media (max-width: 480px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
}


/* ── Very small screens (<360px): stats 1-col ────────────── */

@media (max-width: 360px) {
  .stats-grid { grid-template-columns: 1fr; }
}


/* ══════════════════════════════════════════════════════════════
   COMPARE PAGES
   ══════════════════════════════════════════════════════════════ */

.compare-vs {
  font-weight: 400;
  color: var(--text-muted);
  font-size: 0.75em;
}

/* ── Profile cards ──────────────────────────────────────── */
.compare-profiles {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 1.5rem;
  align-items: center;
  margin-bottom: 2rem;
}
.compare-profile {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
  text-align: center;
}
.compare-profile-link {
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}
.compare-photo {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border);
}
.compare-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  font-weight: 700;
  background: var(--surface-hover);
  color: var(--accent);
}
.compare-name {
  font-size: 1.15rem;
  font-weight: 700;
  margin: 0;
}
.compare-role {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-bottom: 0.25rem;
}
.compare-salary {
  font-size: 1.25rem;
  font-weight: 700;
  margin-top: 0.75rem;
}
.compare-salary-yr {
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--text-muted);
}
.compare-divider {
  display: flex;
  align-items: center;
  justify-content: center;
}
.compare-vs-badge {
  background: var(--accent);
  color: var(--bg);
  font-weight: 800;
  font-size: 0.75rem;
  padding: 0.35rem 0.65rem;
  border-radius: 6px;
  letter-spacing: 0.05em;
}

/* ── Stats table ──────────────────────────────────────── */
.compare-table-wrap {
  overflow-x: auto;
}
.compare-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}
.compare-table th,
.compare-table td {
  padding: 0.65rem 1rem;
  border-bottom: 1px solid var(--border);
  text-align: left;
}
.compare-table th {
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.compare-col-a { text-align: center; }
.compare-col-b { text-align: center; }
.compare-higher {
  font-weight: 700;
  color: var(--accent);
}
.compare-count {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-left: 0.25rem;
}

/* ── Stance breakdown ──────────────────────────────────── */
.compare-stances {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}
.compare-stance-row {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.compare-stance-label {
  width: 100px;
  font-weight: 600;
  font-size: 0.85rem;
  text-align: right;
  flex-shrink: 0;
}

/* ── Salary bars ──────────────────────────────────────── */
.compare-salary-context { margin-bottom: 1rem; }
.compare-salary-bars {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 1rem;
}
.compare-salary-bar-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.compare-salary-bar-name {
  width: 90px;
  font-weight: 600;
  font-size: 0.85rem;
  text-align: right;
  flex-shrink: 0;
}
.compare-salary-bar-track {
  flex: 1;
  height: 28px;
  background: var(--surface);
  border-radius: 6px;
  position: relative;
  overflow: hidden;
}
.compare-salary-bar-fill {
  height: 100%;
  border-radius: 6px;
  transition: width 0.5s ease;
}
.compare-fill-a { background: var(--accent); opacity: 0.8; }
.compare-fill-b { background: var(--green); opacity: 0.8; }
.compare-salary-bar-amount {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--mono);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text);
}
.compare-salary-sources {
  display: flex;
  gap: 2rem;
  margin-top: 0.5rem;
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* ── Ownership cards ──────────────────────────────────── */
.compare-ownership {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
.compare-ownership-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1rem;
}
.compare-pub-link {
  text-decoration: none;
  color: inherit;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.compare-pub-logo {
  width: 48px;
  height: 48px;
  object-fit: contain;
  border-radius: 6px;
}
.compare-pub-meta {
  margin-top: 0.25rem;
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
}
.compare-pub-parent {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.15rem;
}

/* ── Compare CTA ──────────────────────────────────────── */
.compare-cta {
  text-align: center;
  padding: 1rem 0;
}

/* ── Compare index (picker form) ─────────────────────── */
.compare-form {
  margin-bottom: 2rem;
}
.compare-pickers {
  display: flex;
  align-items: flex-end;
  gap: 1rem;
  margin-bottom: 1rem;
}
.compare-picker {
  flex: 1;
}
.compare-picker label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.35rem;
}
.compare-select {
  width: 100%;
  padding: 0.65rem 0.75rem;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-family: var(--font);
  font-size: 0.9rem;
  cursor: pointer;
}
.compare-select:focus {
  outline: none;
  border-color: var(--accent);
}
.compare-picker-vs {
  font-weight: 700;
  color: var(--text-muted);
  padding-bottom: 0.65rem;
  font-size: 0.9rem;
}
.compare-go-btn {
  display: block;
  width: 100%;
  max-width: 280px;
  margin: 0 auto;
}

/* ── Suggestion cards ─────────────────────────────────── */
.compare-suggestions {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem;
}
.compare-suggestion-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1rem 1.25rem;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s, background 0.15s;
}
.compare-suggestion-card:hover {
  border-color: var(--accent);
  background: var(--surface-hover);
}
.compare-suggestion-title {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
  color: var(--accent);
}
.compare-suggestion-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ── Compare responsive ───────────────────────────────── */
@media (max-width: 768px) {
  .compare-profiles {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }
  .compare-divider { padding: 0.25rem 0; }
  .compare-ownership { grid-template-columns: 1fr; }
  .compare-pickers { flex-direction: column; gap: 0.5rem; }
  .compare-picker-vs { text-align: center; padding: 0; }
  .compare-salary-sources { flex-direction: column; gap: 0.25rem; }
  .compare-stance-label { width: 70px; font-size: 0.8rem; }
}
