/* ==========================================================================
   Congressional Transparency Portal — public frontend
   ========================================================================== */

:root {
  --ink: #14213d;
  --ink-deep: #0d1730;
  --ink-soft: #243758;
  --paper: #f4f0e7;
  --paper-deep: #ebe5d9;
  --surface: #fffdf8;
  --surface-soft: #faf6ee;
  --line: #ded5c5;
  --line-soft: #eee8dc;
  --line-strong: #c9bda9;
  --text: #202a3c;
  --muted: #4f5867;
  --muted-soft: #626a79;
  --blue: #1d4f7d;
  --blue-soft: #e7eef6;
  --accent: #ad3a31;
  --accent-dark: #8e2b24;
  --accent-soft: #f6e8e4;
  --green: #246348;
  --green-soft: #e5f1e9;
  --amber: #8a5a11;
  --amber-soft: #f8eed8;
  --error: #9b2c25;
  --error-soft: #fbeae7;
  --gold: #e7c47a;
  --gold-soft: #f0d293;
  --plum: #6b3a5e;
  --teal: #256a72;
  --teal-soft: #e8f2f3;
  --teal-line: #a9cbce;
  --slate: #55617a;

  --sans: "Segoe UI Variable Text", "Segoe UI", "Helvetica Neue", Arial, system-ui, -apple-system, sans-serif;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --mono: "Cascadia Mono", "SFMono-Regular", Consolas, "Liberation Mono", monospace;

  --fs-2xs: 0.75rem;
  --fs-xs: 0.8125rem;
  --fs-sm: 0.875rem;
  --fs-base: 0.9375rem;
  --fs-md: 1rem;
  --fs-lg: 1.125rem;
  --fs-xl: 1.25rem;
  --fs-2xl: 1.375rem;
  --fs-3xl: 1.5rem;
  --fs-4xl: 1.75rem;
  --fs-5xl: 2rem;
  --fs-6xl: 2.25rem;
  --fs-7xl: 2.5rem;

  --shell: min(1360px, calc(100% - 48px));
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 20px;
  --shadow-soft: 0 16px 44px rgba(20, 33, 61, 0.07);
  --shadow-card: 0 7px 20px rgba(20, 33, 61, 0.06);
  --focus: 0 0 0 3px rgba(29, 79, 125, 0.28);

  /* Measured from the live sticky tab bar in app.js so anchor targets and the
     skip link always clear the chrome at every breakpoint. */
  --sticky-offset: 72px;
  /* Space kept below page content for the fixed assistant launcher. */
  --launcher-reserve: 96px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  /* Single source of truth for scroll targets. The value is updated at runtime
     to the measured height of the sticky section nav, so the skip link, hash
     links, and scrollIntoView calls never land under the chrome. */
  scroll-padding-top: var(--sticky-offset);
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  font-variant-numeric: tabular-nums;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.drawer-open {
  overflow: hidden;
}

[hidden] {
  display: none !important;
}

::selection {
  background: rgba(173, 58, 49, 0.24);
}

a {
  color: var(--blue);
  text-underline-offset: 0.15em;
}

button,
input,
select,
textarea {
  font: inherit;
}

/* Placeholder text is the only visible label on several light inputs, so it
   must meet WCAG AA (4.5:1) against the #fffdf8 paper surface. #6b7280
   measures ~4.8:1 there. Dark surfaces override this below. */
input::placeholder,
textarea::placeholder {
  color: #6b7280;
  opacity: 1;
}

button {
  color: inherit;
}

strong,
b {
  font-weight: 600;
}

svg {
  display: block;
}

.icon {
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
}

.shell {
  width: var(--shell);
  margin-inline: auto;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 200;
  transform: translateY(-180%);
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--ink);
  font-weight: 500;
  box-shadow: var(--shadow-card);
  transition: transform 160ms ease;
}

.skip-link:focus {
  transform: translateY(0);
}

/* The skip link targets the dataset area after the sticky nav; moving the
   viewport is the visual cue, so do not paint a focus ring around the whole
   region. */
#content-start:focus {
  outline: none;
}

:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
}

.assistant :is(button, textarea, select, a):focus-visible {
  outline-color: var(--gold);
}

.disclaimer-modal :is(button, a):focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}

.zip-member-card[role="option"]:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}

/* --------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */

.site-header {
  position: relative;
  overflow: hidden;
  border-bottom: 4px solid var(--accent);
  background: var(--ink-deep);
  color: #f7f2e7;
}

.header-inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 24px;
  min-height: 76px;
  padding-block: 12px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  color: inherit;
  text-decoration: none;
  min-width: 0;
}

.brand-mark {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 52px;
  height: 52px;
  border: 1px solid rgba(231, 196, 122, 0.58);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  color: var(--gold);
  box-shadow: inset 0 0 0 4px rgba(255, 255, 255, 0.035);
}

.brand-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.brand-title {
  font-family: var(--serif);
  font-size: clamp(1.125rem, 2vw, 1.375rem);
  font-weight: 600;
  line-height: 1.16;
}

.brand-subtitle {
  color: #b9c5d8;
  font-size: var(--fs-2xs);
  font-weight: 500;
}

.header-status {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 12px 20px;
  flex: 0 1 auto;
}

.header-congress {
  display: flex;
  align-items: center;
  gap: 8px;
}

.congress-picker {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
}

.congress-picker > span {
  color: #9faec5;
  font-size: var(--fs-2xs);
  font-weight: 500;
  white-space: nowrap;
}

.congress-picker select {
  max-width: 240px;
  min-height: 30px;
  padding: 4px 28px 4px 8px;
  border: 1px solid rgba(255, 255, 255, 0.21);
  border-radius: 7px;
  outline: 0;
  background-color: rgba(4, 11, 25, 0.36);
  color: #f4efe4;
  cursor: pointer;
  font-size: var(--fs-2xs);
  text-overflow: ellipsis;
}

.congress-picker select:focus-visible {
  border-color: var(--gold);
  outline: 2px solid rgba(231, 196, 122, 0.4);
  outline-offset: 1px;
}

.congress-picker select:disabled {
  cursor: wait;
  opacity: 0.7;
}

.congress-picker option {
  background: #fffdf8;
  color: var(--ink);
}

.congress-badge {
  display: inline-flex;
  align-items: center;
  align-self: center;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: var(--fs-2xs);
  font-weight: 500;
  line-height: 1.2;
  white-space: nowrap;
}

.congress-badge.is-live {
  background: rgba(117, 199, 149, 0.16);
  color: #a9e6bf;
}

.congress-badge.is-archive {
  background: rgba(231, 196, 122, 0.15);
  color: var(--gold-soft);
}

.congress-badge.is-all {
  background: rgba(138, 180, 230, 0.16);
  color: #c7dcff;
}

.sync-line {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #c6d0e0;
  font-size: var(--fs-2xs);
  font-weight: 500;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #8996ac;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.12);
}

.status-dot.is-live {
  background: #75c795;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.14);
}

.status-dot.is-error {
  background: #e58a80;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.12);
}

.status-stats {
  display: flex;
  align-items: stretch;
  gap: 0;
  padding: 4px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 11px;
  background: rgba(6, 14, 30, 0.2);
}

.status-stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 64px;
  padding: 0 12px;
  border-right: 1px solid rgba(255, 255, 255, 0.12);
  text-align: left;
}

.status-stat:last-child {
  border-right: 0;
}

.status-stat strong {
  overflow: hidden;
  color: #fff9ec;
  font-family: var(--serif);
  font-size: var(--fs-md);
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.status-stat span {
  color: #9faec5;
  font-size: var(--fs-2xs);
  font-weight: 500;
}

.status-stat--wide {
  min-width: 108px;
}

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.75fr) minmax(280px, 0.65fr);
  align-items: center;
  gap: 32px;
  padding-block: 36px 28px;
}

.eyebrow,
.kicker {
  margin: 0 0 8px;
  color: var(--accent);
  font-size: var(--fs-2xs);
  font-weight: 500;
}

.kicker {
  margin-bottom: 4px;
  font-size: var(--fs-2xs);
}

.kicker--light {
  color: var(--gold);
}

.hero h1 {
  max-width: 28ch;
  margin: 0;
  color: var(--ink);
  font-family: var(--serif);
  font-size: clamp(2.5rem, 4.4vw, 3.5rem);
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1.04;
}

.hero-lede {
  max-width: 62ch;
  margin: 16px 0 0;
  color: var(--muted);
  font-size: clamp(1.125rem, 1.4vw, 1.25rem);
  line-height: 1.55;
}

.hero-note {
  padding: 20px;
  border: 1px solid var(--line);
  border-top: 3px solid var(--accent);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-card);
  color: var(--muted);
  font-size: var(--fs-sm);
  line-height: 1.55;
}

.hero-note-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px 12px;
}

.hero-note p {
  margin: 0;
}

.hero-note-title {
  color: var(--ink);
  font-family: var(--serif);
  font-size: var(--fs-md);
  font-weight: 500;
}

.hero-note-tag {
  color: var(--muted-soft);
  font-family: var(--mono);
  font-size: var(--fs-2xs);
}

.hero-trail {
  display: grid;
  gap: 0;
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
}

.hero-trail-step {
  position: relative;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 12px;
  padding-bottom: 16px;
}

.hero-trail-step:last-child {
  padding-bottom: 0;
}

.hero-trail-step:not(:last-child)::before {
  content: "";
  position: absolute;
  top: 30px;
  bottom: 2px;
  left: 14px;
  border-left: 1px dashed var(--line-strong);
}

.hero-trail-icon {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  color: var(--blue);
}

.hero-trail-copy {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
  padding-top: 3px;
}

.hero-trail-copy strong {
  color: var(--ink);
  font-size: var(--fs-sm);
  font-weight: 500;
  line-height: 1.35;
}

.hero-trail-copy span {
  color: var(--muted);
  font-size: var(--fs-2xs);
  line-height: 1.4;
}

.hero-note .hero-note-foot {
  margin: 16px 0 0;
  padding-top: 12px;
  border-top: 1px solid var(--line-soft);
  color: var(--muted);
  font-size: var(--fs-2xs);
  line-height: 1.5;
}

/* --------------------------------------------------------------------------
   ZIP code representative lookup
   -------------------------------------------------------------------------- */

.zip-lookup-panel {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(320px, 1.2fr);
  gap: 20px 28px;
  align-items: start;
  margin: 0 0 24px;
  padding: 20px 24px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: var(--shadow-soft, 0 10px 28px rgba(20, 30, 45, 0.05));
}

.zip-lookup-copy {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.zip-lookup-copy h2 {
  margin: 0 0 8px;
  color: var(--ink);
  font-family: var(--serif);
  font-size: clamp(1.375rem, 2.2vw, 1.75rem);
  line-height: 1.15;
}

.zip-lookup-copy > p:last-of-type {
  margin: 0;
  color: var(--muted);
  font-size: var(--fs-sm);
  line-height: 1.55;
}

.lookup-forms {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}

.zip-lookup-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.lookup-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  color: var(--muted);
  font-size: var(--fs-2xs);
  font-weight: 500;
}

.lookup-divider::before,
.lookup-divider::after {
  content: "";
  flex: 1 1 auto;
  border-top: 1px solid var(--line);
}

.zip-lookup-shell {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 6px 6px 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface);
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.zip-lookup-shell:focus-within {
  border-color: var(--blue);
  box-shadow: var(--focus);
}

.zip-lookup-shell input {
  flex: 1 1 auto;
  min-width: 0;
  padding: 10px 2px;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font-size: var(--fs-md);
}

.zip-lookup-shell input::placeholder {
  color: #6b7280;
}

/* A clear control appears only once the ZIP field has a value, so a second
   lookup does not require selecting and deleting the five digits by hand. */
.zip-lookup-clear {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: background-color 140ms ease, border-color 140ms ease, color 140ms ease;
}

.zip-lookup-clear:hover {
  border-color: var(--line);
  background: var(--surface-soft);
  color: var(--ink);
}

.zip-lookup-clear:focus-visible {
  border-color: var(--blue);
  box-shadow: var(--focus);
  outline: none;
}

.zip-lookup-clear svg {
  display: block;
}

@media (max-width: 760px) {
  /* Touch targets stay at 44px even though the icon is visual-only. */
  .zip-lookup-clear {
    width: 44px;
    height: 44px;
  }
}

/* The forms column is taller than the intro copy, so the intro carries a short
   "what you'll see" note instead of leaving a dead zone on desktop. */
.zip-lookup-preview-note {
  margin-top: 18px;
  padding: 12px 0 0;
  border-top: 1px solid var(--line);
}

.zip-lookup-preview-title {
  margin: 0 0 6px;
  color: var(--ink-soft);
  font-size: var(--fs-2xs);
  font-weight: 600;
}

.zip-lookup-preview-list {
  display: grid;
  gap: 4px;
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  font-size: var(--fs-2xs);
  line-height: 1.45;
}

.zip-lookup-help,
.zip-lookup-status {
  margin: 0;
  font-size: var(--fs-2xs);
  line-height: 1.45;
}

.zip-lookup-help {
  color: var(--muted);
}

.bioid-explainer,
.keyboard-shortcuts {
  margin: 2px 0 0;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--muted);
  font-size: var(--fs-2xs);
  line-height: 1.5;
}

.bioid-explainer summary,
.keyboard-shortcuts summary {
  color: var(--ink-soft);
  font-weight: 500;
  cursor: pointer;
}

.bioid-explainer-list,
.keyboard-shortcuts-list {
  display: grid;
  gap: 4px;
  margin: 8px 0 0;
  padding-left: 18px;
}

.keyboard-shortcuts kbd {
  padding: 0 4px;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  background: var(--surface-soft);
  color: var(--ink-soft);
  font-family: var(--mono);
  font-size: 0.95em;
}

.bioid-explainer code {
  color: var(--ink-soft);
  font-family: var(--mono);
}

.zip-lookup-status {
  min-height: 1.05rem;
  color: var(--muted);
}

.zip-lookup-results {
  display: flex;
  flex-direction: column;
  gap: 20px;
  grid-column: 1 / -1;
}

.zip-results-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.zip-results-heading {
  margin: 0;
  color: var(--ink);
  font-family: var(--serif);
  font-size: var(--fs-md);
}

.zip-member-grid {
  display: grid;
  /* auto-fill (not auto-fit) keeps empty tracks, so a single House card after
     two Senate cards stays the same width instead of stretching full-width. */
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
  gap: 10px;
}

.member-name-results {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-height: 520px;
  padding: 2px;
  overflow-y: auto;
}

.member-name-results[hidden] {
  display: none;
}

.member-name-empty {
  grid-column: 1 / -1;
  margin: 0;
  padding: 12px 16px;
  border: 1px dashed var(--line-strong);
  border-radius: 10px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: var(--fs-2xs);
  line-height: 1.5;
}

.search-all-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.search-all-filters[hidden] {
  display: none;
}

.search-all-filter {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--muted);
  font-family: inherit;
  font-size: var(--fs-2xs);
  font-weight: 500;
  cursor: pointer;
  transition: border-color 160ms ease, color 160ms ease, box-shadow 160ms ease;
}

.search-all-filter[hidden] {
  display: none;
}

.search-all-filter:hover:not(:disabled) {
  border-color: var(--line-strong);
  color: var(--ink);
}

.search-all-filter:focus-visible {
  outline: none;
  border-color: var(--blue);
  box-shadow: var(--focus);
}

.search-all-filter.is-active {
  border-color: var(--blue);
  color: var(--ink);
  box-shadow: var(--focus);
}

.search-all-filter-count {
  padding: 1px 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.search-all-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.search-all-group--lookup .search-all-group-items {
  grid-template-columns: minmax(0, 1fr);
}

.search-all-group--lookup .search-all-result {
  border-color: var(--line-strong);
  background: var(--surface);
}

.search-all-group-heading {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 0;
  color: var(--ink);
  font-family: var(--serif);
  font-size: var(--fs-md);
}

.search-all-group-count {
  color: var(--muted);
  font-family: var(--sans, inherit);
  font-size: var(--fs-2xs);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.search-all-group-items {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(245px, 1fr));
  gap: 10px;
}

.search-all-result {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-soft);
  cursor: pointer;
}

.search-all-result:hover {
  border-color: var(--line-strong);
}

.search-all-result:focus-visible,
.search-all-result.is-active {
  outline: none;
  border-color: var(--blue);
  box-shadow: var(--focus);
}

.search-all-result-kicker {
  margin: 0;
  color: var(--accent);
  font-size: var(--fs-2xs);
  font-weight: 500;
}

.search-all-result-title {
  margin: 0;
  color: var(--ink);
  font-family: var(--serif);
  font-size: var(--fs-md);
  line-height: 1.25;
}

.search-all-result-meta {
  margin: 0;
  color: var(--muted);
  font-size: var(--fs-2xs);
  line-height: 1.45;
}

.search-all-result-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: auto;
  padding-top: 4px;
}

.search-all-result-badge {
  max-width: 100%;
  padding: 3px 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font-size: var(--fs-2xs);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}

.search-all-result-footer .button {
  margin-left: auto;
}

.zip-member-card[role="option"] {
  cursor: pointer;
}

.zip-member-card[role="option"]:focus-visible,
.zip-member-card.is-active {
  border-color: var(--blue);
  box-shadow: var(--focus);
}

.zip-member-card {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-soft);
}

.zip-member-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.zip-member-role {
  margin: 0 0 2px;
  color: var(--accent);
  font-size: var(--fs-2xs);
  font-weight: 500;
}

.zip-member-name {
  margin: 0;
  color: var(--ink);
  font-family: var(--serif);
  font-size: var(--fs-md);
  line-height: 1.2;
}

.zip-member-meta {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: var(--fs-2xs);
}

.zip-member-bioguide {
  margin: 2px 0 0;
  color: var(--muted);
  font-family: var(--mono);
  font-size: var(--fs-2xs);
}

.zip-member-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  margin-top: 12px;
}

.zip-member-funding {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 6px;
  width: 100%;
}

.zip-member-stat {
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font-size: var(--fs-2xs);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  line-height: 1.35;
  white-space: normal;
}

.zip-member-stat--memo {
  flex: 1 1 100%;
  border-radius: 8px;
  color: var(--ink-soft);
}

.zip-member-alignment {
  flex: 1 1 100%;
  color: var(--muted);
  font-size: var(--fs-2xs);
  line-height: 1.4;
}

.zip-member-alignment-gloss {
  color: var(--muted-soft);
}

.zip-member-footer .button {
  margin-left: auto;
}

@media (max-width: 820px) {
  .zip-lookup-panel {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* --------------------------------------------------------------------------
   Primary section tabs
   -------------------------------------------------------------------------- */

.primary-nav {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 16px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
  background: var(--paper);
}

.primary-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  width: fit-content;
  max-width: 100%;
  margin: 0;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface-soft);
}

.primary-nav-export {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--muted);
  font-size: var(--fs-sm);
  font-weight: 500;
  cursor: pointer;
  transition: color 140ms ease, border-color 140ms ease,
    background-color 140ms ease;
}

.primary-nav-export:hover {
  border-color: var(--line-strong);
  background: var(--surface-soft);
  color: var(--ink);
}

.primary-nav-export:focus-visible {
  outline: 3px solid rgba(29, 79, 125, 0.3);
  outline-offset: 2px;
}

.primary-tab {
  display: flex;
  flex: 0 1 auto;
  flex-direction: row;
  align-items: baseline;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 12px 16px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  text-align: left;
  transition: background-color 140ms ease, border-color 140ms ease, color 140ms ease,
    box-shadow 140ms ease;
}

.primary-tab:hover {
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink);
}

.primary-tab[aria-selected="true"] {
  border-color: var(--line-strong);
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-card);
}

.primary-tab:focus-visible {
  outline: 3px solid rgba(29, 79, 125, 0.3);
  outline-offset: 2px;
}

.primary-tab-kicker {
  color: var(--accent);
  font-size: var(--fs-2xs);
  font-weight: 500;
  white-space: nowrap;
}

.primary-tab[aria-selected="true"] .primary-tab-kicker {
  color: var(--accent-dark);
}

.primary-tab-label {
  font-family: var(--sans);
  font-size: var(--fs-md);
  font-weight: 500;
  line-height: 1.2;
  white-space: nowrap;
}

.primary-tab-label-short {
  display: none;
}

/* --------------------------------------------------------------------------
   Workspace panels
   -------------------------------------------------------------------------- */

.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
  gap: 24px;
  padding-bottom: calc(var(--launcher-reserve) + 24px);
}

.primary-tabviews {
  min-width: 0;
}

.primary-tabviews > .primary-tabpanel[hidden] {
  display: none;
}

.panel {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.panel-head {
  padding: 24px 28px 0;
}

.panel-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.panel h2 {
  margin: 0;
  color: var(--ink);
  font-family: var(--serif);
  font-size: clamp(1.375rem, 2.2vw, 1.625rem);
  line-height: 1.16;
}

.panel-badge {
  flex: 0 0 auto;
  margin-top: 4px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--muted-soft);
  font-family: var(--mono);
  font-size: var(--fs-2xs);
  font-weight: 500;
}

.congress-strip {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-top: 20px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-soft);
}

.congress-picker--light > span {
  color: var(--muted);
}

.congress-picker--light select {
  min-width: 260px;
  border-color: var(--line-strong);
  background-color: var(--surface);
  color: var(--ink);
}

.congress-picker--light select:focus-visible {
  border-color: var(--blue);
  outline: 2px solid rgba(29, 79, 125, 0.26);
  outline-offset: 1px;
}

.congress-strip .congress-badge.is-live {
  background: var(--green-soft);
  color: var(--green);
}

.congress-strip .congress-badge.is-archive {
  background: var(--amber-soft);
  color: var(--amber);
}

.congress-strip .congress-badge.is-all {
  background: var(--blue-soft);
  color: var(--blue);
}

.search-form {
  margin-top: 20px;
}

.search-shell {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 6px 6px 16px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface);
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.search-shell:focus-within {
  border-color: var(--blue);
  box-shadow: var(--focus);
}

.search-icon {
  flex: 0 0 auto;
  color: var(--muted-soft);
}

.search-shell input {
  flex: 1 1 auto;
  min-width: 0;
  padding: 10px 2px;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font-size: var(--fs-base);
}

.search-shell input::placeholder {
  color: #6b7280;
}

.search-shell input::-webkit-search-cancel-button {
  cursor: pointer;
}

/* Buttons */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex: 0 0 auto;
  min-height: 40px;
  padding: 8px 16px;
  border: 1px solid transparent;
  border-radius: 9px;
  background: transparent;
  cursor: pointer;
  font-size: var(--fs-xs);
  font-weight: 500;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  transition: background-color 150ms ease, border-color 150ms ease, color 150ms ease, box-shadow 150ms ease;
}

.button:hover:not(:disabled) {
  box-shadow: 0 5px 14px rgba(20, 33, 61, 0.14);
}

.button:active:not(:disabled) {
  box-shadow: none;
}

.button:disabled {
  cursor: not-allowed;
  opacity: 0.52;
  box-shadow: none;
}

.button--primary {
  background: var(--accent);
  color: #fff;
}

.button--primary:hover:not(:disabled) {
  background: var(--accent-dark);
}

.button--dark {
  background: var(--ink);
  color: #fffaf0;
}

.button--dark:hover:not(:disabled) {
  background: var(--ink-soft);
}

.button--ghost {
  border-color: var(--line-strong);
  background: transparent;
  color: var(--ink);
}

.button--ghost:hover:not(:disabled) {
  border-color: var(--ink);
  background: var(--surface-soft);
}

.button--small {
  min-height: 32px;
  padding: 6px 12px;
  font-size: var(--fs-2xs);
}

.button--accent {
  background: var(--gold);
  color: var(--ink-deep);
}

.button--accent:hover:not(:disabled) {
  background: var(--gold-soft);
}

/* Filter tabs */

.filter-row {
  display: flex;
  gap: 4px;
  margin-top: 20px;
  overflow-x: auto;
  border-bottom: 1px solid var(--line);
  scrollbar-width: thin;
}

.filter-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  padding: 12px 16px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: var(--fs-xs);
  font-weight: 500;
  transition: color 140ms ease, border-color 140ms ease, background-color 140ms ease;
}

.filter-tab:hover {
  color: var(--ink);
  background: var(--surface-soft);
}

.filter-tab[aria-pressed="true"] {
  border-bottom-color: var(--accent);
  color: var(--ink);
}

.filter-count {
  min-width: 0;
  padding: 0;
  border-radius: 0;
  background: transparent;
  color: var(--muted-soft);
  font-family: var(--mono);
  font-size: var(--fs-2xs);
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.filter-tab[aria-pressed="true"] .filter-count {
  background: transparent;
  color: var(--accent-dark);
}

.member-filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;
  margin-top: 16px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-soft);
}

.member-chamber-pills {
  display: flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface);
}

.member-chamber-pill {
  padding: 4px 10px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: var(--fs-2xs);
  font-weight: 500;
  line-height: 1.2;
}

.member-chamber-pill:hover {
  color: var(--ink);
  background: var(--surface-soft);
}

.member-chamber-pill[aria-pressed="true"] {
  background: var(--ink);
  color: #fffaf0;
}

.member-state-control {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: var(--fs-2xs);
  font-weight: 500;
}

.member-state-control select {
  min-height: 32px;
  max-width: 220px;
  padding: 4px 24px 4px 8px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  font-size: var(--fs-2xs);
  font-weight: 500;
}

.member-state-control select:focus-visible {
  border-color: var(--blue);
  outline: 2px solid rgba(29, 79, 125, 0.26);
  outline-offset: 1px;
}

.member-filter-count {
  margin-left: auto;
  color: var(--muted);
  font-size: var(--fs-2xs);
  font-variant-numeric: tabular-nums;
}

.member-filter-count.is-error {
  color: var(--error);
}

.member-filter-count.is-notice {
  color: var(--amber);
}

.load-more-row {
  display: flex;
  justify-content: center;
  margin-top: 20px;
}

.result-load-more {
  flex: 0 0 auto;
  margin-top: 2px;
}

/* Results */

.results-wrap {
  padding: 0 28px 28px;
}

.results-meta {
  min-height: 20px;
  margin: 16px 0 12px;
  color: var(--muted);
  font-size: var(--fs-2xs);
  line-height: 1.45;
}

.results-meta.is-error {
  color: var(--error);
}

.results-meta.is-notice {
  color: var(--amber);
}

.results {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.result-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.result-group-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin: 0;
  padding-top: 4px;
  color: var(--muted);
  font-size: var(--fs-2xs);
  font-weight: 500;
}

.result-group-heading span {
  color: var(--muted-soft);
  font-size: var(--fs-2xs);
  font-weight: 500;
}

/* Bills list: long plain-English and CRS summaries sit in a bounded window so
   a large result set cannot push the filters or load controls off screen. */
.result-scroll {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: clamp(340px, 60vh, 660px);
  margin: -2px -8px -2px -3px;
  padding: 2px 8px 2px 3px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-color: var(--line-strong) transparent;
  scrollbar-gutter: stable;
  scrollbar-width: thin;
}

.result-scroll:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
  border-radius: 6px;
}

.result-scroll .record {
  padding: 13px 15px 12px;
}

.result-scroll .record-top {
  gap: 6px;
}

.result-scroll .record-title {
  margin: 6px 0 3px;
}

.result-scroll .record-policy {
  gap: 6px;
  margin-top: 6px;
}

.result-scroll .summary-preview {
  margin-top: 8px;
  padding: 8px 10px 9px;
}

.result-scroll .summary-preview--crs {
  margin-top: 6px;
}

.result-scroll .summary-preview-text {
  -webkit-line-clamp: 2;
}

.result-scroll .summary-preview.is-empty .summary-preview-text {
  -webkit-line-clamp: unset;
}

.result-scroll .record--vote .record-subtitle {
  margin-top: 2px;
  line-height: 1.45;
}

.result-scroll .record-footer {
  gap: 8px 12px;
  margin-top: 10px;
  padding-top: 9px;
}

.result-scroll .record-links {
  gap: 10px;
}

.result-scroll .member-card {
  gap: 10px;
  padding: 10px 13px;
}

.result-scroll .member-avatar {
  width: 34px;
  height: 34px;
  font-size: var(--fs-2xs);
}

.result-scroll .member-card-copy {
  gap: 1px;
}

.result-scroll .member-card-meta {
  line-height: 1.35;
}

.record {
  position: relative;
  padding: 16px 20px 16px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--blue);
  border-radius: var(--radius);
  background: var(--surface);
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.record:hover {
  border-color: var(--line-strong);
  border-left-color: var(--blue);
  box-shadow: var(--shadow-card);
}

.record--vote {
  border-left-color: var(--accent);
  cursor: pointer;
}

.record--vote:hover {
  border-left-color: var(--accent);
}

.record-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.chip {
  display: inline-block;
  max-width: 100%;
  overflow: hidden;
  padding: 4px 8px;
  border-radius: 5px;
  background: var(--blue-soft);
  color: var(--blue);
  font-family: var(--mono);
  font-size: var(--fs-2xs);
  font-weight: 500;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chip--vote {
  background: var(--accent-soft);
  color: var(--accent-dark);
}

.chip--neutral {
  background: var(--paper-deep);
  color: var(--muted);
}

.chip--member {
  background: var(--green-soft);
  color: var(--green);
}

.chip--congress {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--muted);
  font-family: var(--sans);
  font-weight: 500;
}

.chip--policy {
  background: var(--amber-soft);
  color: var(--amber);
  font-family: var(--sans);
}

.chip--subject,
.chip--issue {
  background: var(--paper-deep);
  color: var(--muted);
  font-family: var(--sans);
  font-weight: 500;
}

.record-policy {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}

.record-policy-label {
  color: var(--muted-soft);
  font-size: var(--fs-2xs);
  font-weight: 500;
}

.record-policy-subjects {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.record-date {
  color: var(--muted-soft);
  font-size: var(--fs-2xs);
  font-weight: 500;
}

.record-title {
  margin: 8px 0 4px;
  color: var(--ink);
  font-family: var(--serif);
  font-size: var(--fs-lg);
  line-height: 1.32;
}

.record-subtitle {
  margin: 0;
  color: var(--muted);
  font-size: var(--fs-xs);
  line-height: 1.52;
}

.record-subtitle--action {
  margin-top: 8px;
  color: var(--muted-soft);
  font-size: var(--fs-2xs);
}

.summary-preview {
  margin-top: 12px;
  padding: 10px 12px 12px;
  border-left: 3px solid var(--blue);
  border-radius: 0 8px 8px 0;
  background: var(--blue-soft);
  color: var(--ink-soft);
  font-size: var(--fs-xs);
  line-height: 1.58;
}

.summary-preview.is-empty {
  border-left-color: var(--line-strong);
  background: var(--surface-soft);
  color: var(--muted);
}

.summary-preview-label {
  display: block;
  margin-bottom: 4px;
  color: var(--blue);
  font-size: var(--fs-2xs);
  font-weight: 500;
}

.summary-preview.is-empty .summary-preview-label {
  color: var(--muted-soft);
}

.summary-preview-text {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.summary-preview.is-empty .summary-preview-text {
  display: block;
  -webkit-line-clamp: unset;
}

.summary-preview--crs {
  border-left-color: var(--line-strong);
  background: var(--surface-soft);
}

.summary-preview-provenance,
.summary-provenance {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: var(--fs-2xs);
}

.summary-provenance:empty {
  display: none;
}

/* Member search results */

.member-card {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--green);
  border-radius: var(--radius);
  background: var(--surface);
  color: inherit;
  cursor: pointer;
  font: inherit;
  text-align: left;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.member-card:hover {
  border-color: var(--line-strong);
  border-left-color: var(--green);
  box-shadow: var(--shadow-card);
}

.member-avatar {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--paper-deep);
  color: var(--ink);
  font-family: var(--serif);
  font-size: var(--fs-xs);
  font-weight: 500;
}

.member-avatar--d {
  background: var(--blue-soft);
  color: var(--blue);
}

.member-avatar--r {
  background: var(--accent-soft);
  color: var(--accent-dark);
}

.member-avatar--i {
  background: var(--amber-soft);
  color: var(--amber);
}

.member-card-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1 1 auto;
  min-width: 0;
}

.member-card-name {
  overflow: hidden;
  color: var(--ink);
  font-family: var(--serif);
  font-size: var(--fs-md);
  font-weight: 500;
  line-height: 1.3;
  text-overflow: ellipsis;
}

.member-card-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px 6px;
  color: var(--muted);
  font-size: var(--fs-2xs);
  line-height: 1.4;
}

.member-card-bioid {
  overflow: hidden;
  color: var(--muted);
  font-family: var(--mono);
  font-size: var(--fs-2xs);
  line-height: 1.3;
  text-overflow: ellipsis;
}

.member-meta-item {
  min-width: 0;
  overflow-wrap: anywhere;
}

.member-meta-item--party {
  color: var(--ink-soft);
  font-weight: 500;
}

.member-meta-item--d {
  color: var(--blue);
}

.member-meta-item--r {
  color: var(--accent-dark);
}

.member-meta-item--i {
  color: var(--amber);
}

.member-meta-sep {
  color: var(--muted-soft);
}

.member-card-arrow {
  display: inline-flex;
  flex: 0 0 auto;
  color: var(--muted-soft);
}

.member-card-shell {
  display: flex;
  align-items: stretch;
  gap: 8px;
  min-width: 0;
}

.member-card-shell .member-card {
  flex: 1 1 auto;
  width: auto;
  min-width: 0;
}

.member-card-actions {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  flex: 0 0 auto;
}

.member-card-export {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: stretch;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--blue);
  font: inherit;
  font-size: var(--fs-2xs);
  font-weight: 500;
  line-height: 1.2;
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
}

.member-card-export:hover,
.member-card-export:focus-visible {
  border-color: var(--blue);
  color: var(--blue);
  text-decoration: none;
}

.member-card-export:disabled {
  border-color: var(--line);
  color: var(--muted-soft);
  cursor: default;
}

.member-card-add,
.member-bioid-add {
  flex: 0 0 auto;
  align-self: center;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font: inherit;
  font-size: var(--fs-2xs);
  line-height: 1.2;
  cursor: pointer;
  white-space: nowrap;
}

.member-card-add:hover,
.member-card-add:focus-visible,
.member-bioid-add:hover,
.member-bioid-add:focus-visible {
  border-color: var(--blue);
  color: var(--blue);
}

.member-card-add.is-staged,
.member-bioid-add.is-staged {
  border-color: var(--green);
  background: var(--green-soft);
  color: var(--green);
}

@media (max-width: 560px) {
  .member-card-shell {
    flex-wrap: wrap;
  }

  .member-card-shell .member-card {
    flex-basis: 100%;
  }

  .member-card-actions {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: flex-start;
    width: 100%;
  }

  .member-card-actions > * {
    flex: 1 1 auto;
    width: auto;
  }
}

.record-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line-soft);
}

.record-words {
  color: var(--muted-soft);
  font-size: var(--fs-2xs);
  font-variant-numeric: tabular-nums;
}

.record-links {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
}

.external-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--blue);
  font-size: var(--fs-2xs);
  font-weight: 500;
  text-decoration: none;
}

.external-link:hover {
  color: var(--accent-dark);
  text-decoration: underline;
}

.result {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: var(--fs-2xs);
  font-weight: 500;
  line-height: 1.4;
}

.result--pass {
  background: var(--green-soft);
  color: var(--green);
}

.result--fail {
  background: var(--error-soft);
  color: var(--error);
}

.result--neutral {
  background: var(--amber-soft);
  color: var(--amber);
}

.vote-measure {
  color: var(--muted);
  font-size: var(--fs-2xs);
}

/* Empty, loading, and error states */

.empty-state,
.error-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 40px 20px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface-soft);
  color: var(--muted);
  text-align: center;
}

.error-state {
  border-color: #e7bdb6;
  background: var(--error-soft);
  color: var(--error);
}

.error-state--notice {
  border-color: #e6cc9d;
  background: var(--amber-soft);
  color: var(--amber);
}

.error-state--notice .error-title {
  color: var(--amber);
}

.empty-title,
.error-title {
  margin: 0;
  color: var(--ink);
  font-family: var(--serif);
  font-size: var(--fs-md);
  font-weight: 500;
}

.error-title {
  color: var(--error);
}

.empty-copy,
.error-copy {
  max-width: 44ch;
  margin: 0;
  font-size: var(--fs-xs);
  line-height: 1.55;
}

.empty-state .button,
.error-state .button {
  margin-top: 4px;
}

.skeleton-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.skeleton-card {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.skeleton-line {
  height: 10px;
  margin-bottom: 8px;
  border-radius: 3px;
  background: var(--paper-deep);
}

.skeleton-line:nth-child(2) {
  width: 74%;
}

.skeleton-line:nth-child(3) {
  width: 48%;
  margin-bottom: 0;
}

.skeleton-line--short {
  width: 32%;
}

/* --------------------------------------------------------------------------
   Assistant
   -------------------------------------------------------------------------- */

.assistant-launcher {
  position: fixed;
  right: clamp(12px, 2.5vw, 28px);
  bottom: clamp(12px, 2.5vw, 28px);
  z-index: 45;
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: calc(100vw - 24px);
  min-height: 58px;
  padding: 8px 18px 8px 8px;
  border: 1px solid rgba(231, 196, 122, 0.4);
  border-radius: 999px;
  background: var(--ink);
  color: #fffaf0;
  text-align: left;
  box-shadow: 0 18px 44px rgba(13, 23, 48, 0.32);
  cursor: pointer;
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    box-shadow 160ms ease,
    opacity 160ms ease,
    visibility 160ms ease;
}

/* Detail drawers float above the page at z-index 70 while the launcher sits
   at 45, so the two fixed surfaces would otherwise collide at the bottom
   right. Tuck the launcher away for as long as a drawer is open; it returns
   automatically when the drawer closes. The assistant-open class covers the
   expanded assistant panel the same way. */
body.drawer-open .assistant-launcher,
body.assistant-open .assistant-launcher,
body.lookup-active .assistant-launcher,
body.launcher-obstructed .assistant-launcher {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(10px) scale(0.98);
}

.assistant-launcher:hover {
  transform: translateY(-2px);
  border-color: var(--gold);
  box-shadow: 0 22px 52px rgba(13, 23, 48, 0.38);
}

.assistant-launcher:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

.assistant-launcher-avatar {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(231, 196, 122, 0.45);
  border-radius: 50%;
  background: rgba(231, 196, 122, 0.1);
  color: var(--gold);
  font-family: var(--mono);
  font-size: var(--fs-2xs);
  font-weight: 500;
}

.assistant-launcher-copy {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.assistant-launcher-title {
  font-family: var(--serif);
  font-size: var(--fs-lg);
  font-weight: 500;
  line-height: 1.2;
}

.assistant-launcher-context {
  overflow: hidden;
  color: #96a6be;
  font-size: var(--fs-2xs);
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.assistant-launcher-icon {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  margin-left: 4px;
  border-radius: 50%;
  background: rgba(231, 196, 122, 0.12);
  color: var(--gold);
}

.assistant {
  position: fixed;
  right: clamp(12px, 2.5vw, 28px);
  bottom: clamp(12px, 2.5vw, 28px);
  z-index: 45;
  display: flex;
  flex-direction: column;
  width: min(440px, calc(100vw - 24px));
  height: min(740px, calc(100dvh - 24px));
  min-height: 0;
  border-color: var(--ink-soft);
  background: var(--ink);
  color: #f5f0e5;
  box-shadow: 0 32px 80px rgba(13, 23, 48, 0.34);
  transform-origin: bottom right;
  animation: assistant-panel-in 180ms ease-out;
}

@keyframes assistant-panel-in {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.assistant-head-actions {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  flex: 1 1 auto;
  justify-content: flex-end;
}

.assistant-minimize {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.21);
  border-radius: 50%;
  background: rgba(4, 11, 25, 0.36);
  color: #f4efe4;
  cursor: pointer;
  transition: border-color 150ms ease, background-color 150ms ease, color 150ms ease;
}

.assistant-minimize:hover {
  border-color: var(--gold);
  background: rgba(231, 196, 122, 0.12);
  color: var(--gold);
}

.assistant-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px 16px;
  padding: 24px 24px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.11);
}

.assistant-title {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1 1 240px;
  min-width: 0;
}

.assistant-avatar {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(231, 196, 122, 0.45);
  border-radius: 50%;
  background: rgba(231, 196, 122, 0.1);
  color: var(--gold);
  font-family: var(--mono);
  font-size: var(--fs-2xs);
  font-weight: 500;
}

.assistant .kicker {
  margin-bottom: 2px;
}

.assistant-context {
  margin: 3px 0 0;
  color: #96a6be;
  font-size: var(--fs-2xs);
  line-height: 1.4;
}

.assistant h2 {
  color: #fffaf0;
  font-size: clamp(1.25rem, 1.7vw, 1.375rem);
}

.model-picker {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1 1 160px;
  width: auto;
  min-width: 0;
  max-width: 100%;
}

.model-picker > span {
  color: #96a6be;
  font-size: var(--fs-2xs);
  font-weight: 500;
}

.model-picker select {
  width: 100%;
  min-height: 32px;
  padding: 4px 24px 4px 8px;
  border: 1px solid rgba(255, 255, 255, 0.21);
  border-radius: 7px;
  outline: 0;
  background-color: rgba(4, 11, 25, 0.36);
  color: #f4efe4;
  font-size: var(--fs-2xs);
  text-overflow: clip;
  cursor: pointer;
}

.model-picker select:focus-visible {
  border-color: var(--gold);
  outline: 2px solid rgba(231, 196, 122, 0.4);
  outline-offset: 1px;
}

.model-picker select:disabled {
  cursor: wait;
  opacity: 0.7;
}

.model-picker option {
  background: #fffdf8;
  color: var(--ink);
}

.chat-log {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 16px;
  min-height: 0;
  overflow-y: auto;
  padding: 20px 20px 16px;
  scrollbar-color: rgba(255, 255, 255, 0.22) transparent;
  scrollbar-width: thin;
}

.message {
  display: flex;
  flex-direction: column;
  max-width: 93%;
  animation: message-in 160ms ease;
}

.message--assistant {
  align-self: flex-start;
}

.message--user {
  align-self: flex-end;
  align-items: flex-end;
}

@keyframes message-in {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.message-label {
  margin: 0 0 4px;
  color: #99a9c0;
  font-size: var(--fs-2xs);
  font-weight: 500;
}

.message-bubble {
  padding: 12px 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 4px 13px 13px 13px;
  background: rgba(255, 255, 255, 0.07);
  color: #eee8db;
  font-size: var(--fs-sm);
  line-height: 1.6;
  overflow-wrap: anywhere;
}

.message--user .message-bubble {
  border-color: rgba(118, 162, 210, 0.3);
  border-radius: 13px 4px 13px 13px;
  background: #27588b;
  color: #fff;
  white-space: pre-wrap;
}

.message-bubble p {
  margin: 0 0 0.65em;
}

.message-bubble p:last-child {
  margin-bottom: 0;
}

.message-bubble h4 {
  margin: 0.9em 0 0.35em;
  color: #fffaf0;
  font-family: var(--serif);
  font-size: var(--fs-md);
  line-height: 1.3;
}

.message-bubble h4:first-child {
  margin-top: 0;
}

.message-bubble ul,
.message-bubble ol {
  margin: 0.3em 0 0.7em;
  padding-left: 1.25em;
}

.message-bubble li {
  margin-bottom: 0.3em;
}

.message-bubble li:last-child {
  margin-bottom: 0;
}

.message-bubble strong {
  color: #fffaf0;
  font-weight: 500;
}

.message-bubble code {
  padding: 0.1em 0.32em;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.24);
  font-family: var(--mono);
  font-size: 0.86em;
}

.message--error .message-bubble {
  border-color: rgba(238, 145, 132, 0.42);
  background: rgba(126, 36, 29, 0.34);
  color: #ffded8;
}

.message--error .message-label {
  color: #f2a69b;
}

.message--notice .message-bubble {
  border-color: rgba(231, 196, 122, 0.42);
  background: rgba(138, 90, 17, 0.22);
  color: #f6e3bd;
}

.message--notice .message-label {
  color: var(--gold);
}

.message-meta {
  margin: 6px 2px 0;
  color: #8fa0b8;
  font-size: var(--fs-2xs);
  line-height: 1.4;
}

.assistant-freshness {
  margin-top: 10px;
  padding: 8px 10px;
  border: 1px solid rgba(231, 196, 122, 0.38);
  border-radius: 10px;
  background: rgba(138, 90, 17, 0.16);
  color: #f6e3bd;
  font-size: var(--fs-2xs);
  line-height: 1.45;
}

.assistant-freshness-title {
  margin: 0 0 4px;
  color: var(--gold);
  font-weight: 600;
}

.assistant-freshness-list {
  margin: 0;
  padding-left: 18px;
}

.assistant-freshness-list li + li {
  margin-top: 3px;
}

.sources-block {
  margin-top: 12px;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.13);
}

.sources-title {
  margin: 0 0 6px;
  color: #a9b7ca;
  font-size: var(--fs-2xs);
  font-weight: 500;
}

.source-list {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.source-link,
.source-text {
  max-width: 100%;
  overflow-wrap: anywhere;
  padding: 4px 8px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  color: #d9e8ff;
  font-size: var(--fs-2xs);
  line-height: 1.45;
  text-decoration: none;
}

.source-text {
  display: inline-block;
}

.source-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.icon-label {
  min-width: 0;
}

.source-link:hover {
  border-color: rgba(231, 196, 122, 0.55);
  background: rgba(231, 196, 122, 0.1);
  color: #fff6dd;
  text-decoration: underline;
}

.source-text {
  color: #aebbd0;
}

.source-chip {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  overflow-wrap: anywhere;
  padding: 4px 8px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  color: #d9e8ff;
  cursor: pointer;
  font: inherit;
  font-size: var(--fs-2xs);
  line-height: 1.45;
  text-align: left;
  appearance: none;
  transition: border-color 150ms ease, background-color 150ms ease, color 150ms ease, box-shadow 150ms ease;
}

.source-chip:hover {
  border-color: rgba(231, 196, 122, 0.55);
  background: rgba(231, 196, 122, 0.1);
  color: #fff6dd;
}

.source-chip:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

.source-chip--member {
  border-color: rgba(117, 199, 149, 0.36);
  color: #c9f0d8;
}

.source-chip--member:hover {
  border-color: rgba(117, 199, 149, 0.7);
  background: rgba(117, 199, 149, 0.12);
}

.source-chip--vote {
  border-color: rgba(231, 196, 122, 0.36);
  color: #f3dfb0;
}

.source-chip--vote:hover {
  border-color: rgba(231, 196, 122, 0.7);
  background: rgba(231, 196, 122, 0.12);
}

.source-chip--finance {
  border-color: rgba(126, 173, 224, 0.4);
  color: #d4e6fb;
}

.source-chip--finance:hover {
  border-color: rgba(126, 173, 224, 0.75);
  background: rgba(126, 173, 224, 0.14);
}

.source-chip--stock {
  border-color: rgba(126, 214, 201, 0.4);
  color: #c9f5ee;
  text-decoration: none;
}

.source-chip--stock:hover {
  border-color: rgba(126, 214, 201, 0.75);
  background: rgba(126, 214, 201, 0.14);
  color: #f0fffc;
}

.typing-indicator {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 4px;
}

.typing-indicator span {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--gold);
  opacity: 0.55;
}

.chat-form {
  flex: 0 0 auto;
  padding: 12px 20px 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.11);
  background: rgba(4, 11, 25, 0.28);
}

.chat-field {
  padding: 8px 8px 8px 12px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.055);
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

.chat-field:focus-within {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.12);
}

.chat-field textarea {
  display: block;
  width: 100%;
  min-height: 40px;
  max-height: 116px;
  padding: 2px 2px 6px;
  border: 0;
  outline: 0;
  background: transparent;
  color: #fffaf0;
  font-size: var(--fs-sm);
  line-height: 1.5;
  resize: vertical;
}

.chat-field textarea::placeholder {
  color: #98a6ba;
}

.chat-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.char-count {
  color: #8e9eb5;
  font-size: var(--fs-2xs);
  font-variant-numeric: tabular-nums;
}

.char-count.is-near-limit {
  color: #f0bd8e;
}

.chat-hint {
  margin: 8px 2px 0;
  color: #8797ad;
  font-size: var(--fs-2xs);
  line-height: 1.4;
}

/* --------------------------------------------------------------------------
   Drawer
   -------------------------------------------------------------------------- */

.drawer-scrim {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(9, 17, 33, 0.52);
  opacity: 0;
  visibility: hidden;
  backdrop-filter: blur(3px);
  transition: opacity 260ms ease, visibility 260ms ease;
}

.drawer-scrim.is-open {
  opacity: 1;
  visibility: visible;
}

.drawer {
  --drawer-inset: clamp(12px, 2.2vw, 28px);
  --drawer-radius: clamp(16px, 1.5vw, 22px);
  position: fixed;
  top: var(--drawer-inset);
  right: var(--drawer-inset);
  bottom: var(--drawer-inset);
  left: auto;
  z-index: 70;
  display: flex;
  flex-direction: column;
  width: min(860px, calc(100vw - var(--drawer-inset) - var(--drawer-inset)));
  height: auto;
  max-height: calc(100dvh - var(--drawer-inset) - var(--drawer-inset));
  border: 1px solid var(--line-strong);
  border-radius: var(--drawer-radius);
  background: var(--surface);
  max-width: calc(100vw - var(--drawer-inset) - var(--drawer-inset));
  box-shadow:
    0 40px 90px -30px rgba(9, 17, 33, 0.48),
    0 18px 40px -22px rgba(9, 17, 33, 0.34),
    0 2px 8px rgba(9, 17, 33, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.65);
  overflow: hidden;
  overflow: clip;
  opacity: 0;
  transform: translate3d(
      calc(100% + var(--drawer-inset) + 24px),
      12px,
      0
    )
    scale(0.985);
  visibility: hidden;
  transition:
    transform 320ms cubic-bezier(0.22, 0.7, 0.24, 1),
    opacity 220ms ease,
    visibility 0s linear 320ms;
}

.drawer.is-open {
  opacity: 1;
  transform: translate3d(0, 0, 0) scale(1);
  visibility: visible;
  transition:
    transform 320ms cubic-bezier(0.22, 0.7, 0.24, 1),
    opacity 200ms ease 30ms,
    visibility 0s linear 0s;
}

.drawer-head {
  position: relative;
  z-index: 4;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex: 0 0 auto;
  padding: 24px 28px 16px;
  border-bottom: 1px solid var(--line);
  border-radius: calc(var(--drawer-radius) - 1px)
    calc(var(--drawer-radius) - 1px) 0 0;
  background: var(--surface);
}

.drawer-close {
  border-radius: 999px;
  background: var(--surface);
  box-shadow: 0 1px 3px rgba(20, 33, 61, 0.08);
}

.drawer-close:hover:not(:disabled) {
  border-color: var(--ink);
  background: var(--surface);
}

.drawer-heading {
  min-width: 0;
}

.drawer-heading h2 {
  margin: 8px 0 0;
  color: var(--ink);
  font-family: var(--serif);
  font-size: clamp(1.375rem, 2.6vw, 1.625rem);
  line-height: 1.22;
  overflow-wrap: anywhere;
}

.drawer-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: 24px 28px 40px;
  overscroll-behavior: contain;
  scroll-padding-block: 16px;
  scrollbar-color: var(--line-strong) transparent;
  scrollbar-width: thin;
}

.drawer-content {
  min-width: 0;
}

.drawer-state {
  padding: 40px 20px;
  color: var(--muted);
  font-size: var(--fs-sm);
  text-align: center;
}

.drawer-state.is-error {
  color: var(--error);
}

.drawer-state.is-notice {
  color: var(--amber);
}

.drawer-state .button {
  margin-top: 12px;
}

.drawer-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: var(--fs-2xs);
}

.drawer-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.drawer-meta-item strong {
  color: var(--ink);
  font-weight: 500;
}

.member-bioid {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.member-bioid-value {
  font-family: var(--mono);
}

.member-bioid-copy {
  padding: 1px 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font: inherit;
  cursor: pointer;
}

.member-bioid-copy:hover,
.member-bioid-copy:focus-visible {
  border-color: var(--line-strong);
  color: var(--ink);
}

.drawer-meta-item--subjects {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
}

.drawer-meta-label {
  color: var(--muted);
  font-weight: 500;
}

.drawer-section {
  scroll-margin-top: 16px;
}

.drawer-section + .drawer-section {
  margin-top: 32px;
}

.section-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.section-heading h3 {
  margin: 0;
  color: var(--ink);
  font-family: var(--serif);
  font-size: var(--fs-lg);
  line-height: 1.3;
}

.tag {
  padding: 4px 8px;
  border-radius: 999px;
  font-size: var(--fs-2xs);
  font-weight: 500;
}

.tag--ai {
  background: var(--blue-soft);
  color: var(--blue);
}

.tag--crs {
  background: var(--surface-soft);
  color: var(--muted);
}

.summary-box {
  padding: 16px 16px;
  border-left: 3px solid var(--blue);
  border-radius: 0 10px 10px 0;
  background: var(--blue-soft);
  color: #26374e;
  font-size: var(--fs-sm);
  line-height: 1.68;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.summary-box.is-empty {
  border-left-color: var(--line-strong);
  background: var(--surface-soft);
  color: var(--muted);
}

.bill-text {
  max-height: 56vh;
  margin: 0;
  overflow: auto;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
  color: var(--text);
  font-family: var(--sans);
  font-size: var(--fs-xs);
  line-height: 1.72;
  tab-size: 4;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  scrollbar-color: var(--line-strong) transparent;
  scrollbar-width: thin;
}

.drawer-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex: 0 0 auto;
  padding: 16px 28px;
  border-top: 1px solid var(--line);
  border-radius: 0 0 calc(var(--drawer-radius) - 1px)
    calc(var(--drawer-radius) - 1px);
  background: var(--surface-soft);
}

.drawer-link-slot {
  min-width: 0;
}

.vote-drawer-foot-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.drawer-link-slot .external-link {
  font-size: var(--fs-xs);
}

.section-note {
  margin: 8px 0 0;
  color: var(--muted-soft);
  font-size: var(--fs-2xs);
  line-height: 1.5;
}

.section-count {
  color: var(--muted);
  font-size: var(--fs-2xs);
  font-variant-numeric: tabular-nums;
  font-weight: 500;
  white-space: nowrap;
}

/* Company 360 sections */

.company-subsection + .company-subsection {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--line-soft);
}

.company-subhead {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.company-subhead h4 {
  margin: 0;
  color: var(--ink);
  font-family: var(--serif);
  font-size: var(--fs-md);
  font-weight: 500;
  line-height: 1.3;
}

.company-match-provenance {
  margin: 0 0 24px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-soft);
}

.company-match-provenance .company-subhead {
  margin-bottom: 10px;
}

.company-match-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.company-match-chip {
  border: 1px solid transparent;
  font-family: var(--sans);
  font-weight: 500;
  white-space: normal;
}

.chip--match-exact {
  border-color: var(--green);
  background: var(--green-soft);
  color: var(--green);
}

.chip--match-name {
  border-color: var(--amber);
  background: var(--amber-soft);
  color: var(--amber);
}

.chip--match-manual {
  border-color: var(--blue);
  background: var(--blue-soft);
  color: var(--blue);
}

.company-match-empty {
  color: var(--muted);
  font-size: var(--fs-2xs);
  line-height: 1.5;
}

.company-empty {
  padding: 16px;
  border: 1px dashed var(--line-strong);
  border-radius: 12px;
  background: var(--surface-soft);
}

.company-empty.is-unavailable {
  border-style: solid;
  border-color: var(--amber);
  background: var(--amber-soft);
}

.company-empty-title {
  margin: 0;
  color: var(--ink);
  font-size: var(--fs-sm);
  font-weight: 500;
  line-height: 1.4;
}

.company-empty.is-unavailable .company-empty-title {
  color: var(--amber);
}

.company-empty-note {
  margin: 4px 0 0;
  color: var(--muted-soft);
  font-size: var(--fs-2xs);
  line-height: 1.5;
}

.company-framing-note {
  margin-top: 32px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.drawer-filter {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  padding: 8px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--surface);
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

.drawer-filter:focus-within {
  border-color: var(--blue);
  box-shadow: var(--focus);
}

.drawer-filter svg {
  flex: 0 0 auto;
  color: var(--muted-soft);
}

.drawer-filter input {
  flex: 1 1 auto;
  min-width: 0;
  padding: 4px 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font-size: var(--fs-xs);
}

.drawer-filter input::placeholder {
  color: #6b7280;
}

@media (max-width: 640px) {
  .drawer {
    --drawer-inset: 10px;
    right: var(--drawer-inset);
    bottom: max(var(--drawer-inset), env(safe-area-inset-bottom, 0px));
    left: var(--drawer-inset);
    width: auto;
    max-height: calc(
      100dvh - var(--drawer-inset) -
        max(var(--drawer-inset), env(safe-area-inset-bottom, 0px))
    );
    border-radius: 16px;
    transform: translate3d(0, calc(100% + 24px), 0) scale(0.985);
  }

  .drawer-head {
    padding: 16px 16px 12px;
    border-radius: 15px 15px 0 0;
  }

  .drawer-foot {
    padding-bottom: max(16px, env(safe-area-inset-bottom, 0px));
  }
}

@media (prefers-reduced-motion: reduce) {
  .drawer,
  .drawer.is-open,
  .drawer-scrim,
  .drawer-scrim.is-open {
    transition-duration: 1ms;
    transition-delay: 0s;
  }
}

/* Party breakdown */

.party-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  overscroll-behavior-x: contain;
  scrollbar-color: var(--line-strong) transparent;
  scrollbar-width: thin;
}

.party-table {
  width: 100%;
  min-width: 500px;
  border-collapse: collapse;
  font-size: var(--fs-xs);
  font-variant-numeric: tabular-nums;
}

.party-table caption {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: var(--fs-2xs);
  text-align: left;
}

.party-table th,
.party-table td {
  padding: 8px 12px;
  border-bottom: 1px solid var(--line-soft);
  text-align: right;
}

.party-table th:first-child,
.party-table td:first-child {
  text-align: left;
}

.party-table thead th {
  background: var(--surface-soft);
  color: var(--muted);
  font-size: var(--fs-2xs);
  font-weight: 500;
}

.party-table tbody tr:last-child td {
  border-bottom: 0;
}

.party-table tfoot td {
  border-top: 2px solid var(--line);
  border-bottom: 0;
  background: var(--surface-soft);
  color: var(--ink);
  font-weight: 500;
}

.party-table .tally-yea {
  color: var(--green);
  font-weight: 500;
}

.party-table .tally-nay {
  color: var(--error);
  font-weight: 500;
}

.party-table .tally-muted {
  color: var(--muted-soft);
}

.party-name {
  color: var(--ink);
  font-weight: 500;
}

/* Individual member vote table */

.vote-member-scroll {
  overflow-x: auto;
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  overscroll-behavior-x: contain;
  scrollbar-color: var(--line-strong) transparent;
  scrollbar-width: thin;
}

.vote-member-table {
  width: 100%;
  min-width: 500px;
  border-collapse: collapse;
  font-size: var(--fs-2xs);
}

.vote-member-table th,
.vote-member-table td {
  padding: 8px 12px;
  border-bottom: 1px solid var(--line-soft);
  text-align: left;
  vertical-align: middle;
}

.vote-member-table thead th {
  background: var(--surface-soft);
  color: var(--muted);
  font-size: var(--fs-2xs);
  font-weight: 500;
}

.vote-member-table tbody tr:last-child td {
  border-bottom: 0;
}

.vote-member-table tbody tr:hover {
  background: var(--surface-soft);
}

.member-link-button {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--blue);
  cursor: pointer;
  font: inherit;
  font-weight: 500;
  text-align: left;
}

.member-link-button:hover {
  color: var(--accent-dark);
  text-decoration: underline;
}

.vote-member-empty {
  padding: 24px 16px;
  color: var(--muted);
  font-size: var(--fs-xs);
  text-align: center;
}

/* Vote position badges */

.position {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: var(--fs-2xs);
  font-weight: 500;
  line-height: 1.45;
  white-space: nowrap;
}

.position--yea {
  background: var(--green-soft);
  color: var(--green);
}

.position--nay {
  background: var(--error-soft);
  color: var(--error);
}

.position--present {
  background: var(--amber-soft);
  color: var(--amber);
}

.position--not-voting {
  background: var(--paper-deep);
  color: var(--muted);
}

.position--other {
  background: var(--surface-soft);
  color: var(--muted);
}

.member-summary {
  white-space: normal;
}

/* Member voting history */

.history-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 14px;
}

/* Voting history: long vote lists scroll inside a bounded window so the
   section heading, counts, and Key/All filters stay visible while readers
   move past the section. */
.history-list--scroll {
  max-height: clamp(280px, 46vh, 560px);
  padding-right: 8px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-color: var(--line-strong) transparent;
  scrollbar-gutter: stable;
  scrollbar-width: thin;
}

.history-list--scroll:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
  border-radius: 10px;
}

@media (prefers-reduced-motion: no-preference) {
  .history-list--scroll {
    scroll-behavior: smooth;
  }
}

.history-item {
  padding: 16px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--green);
  border-radius: 12px;
  background: var(--surface);
}

.history-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 8px;
}

.history-date {
  margin-left: auto;
  color: var(--muted-soft);
  font-size: var(--fs-2xs);
  font-weight: 500;
}

.history-title {
  margin: 10px 0 4px;
  color: var(--ink);
  font-family: var(--serif);
  font-size: var(--fs-md);
  line-height: 1.35;
}

.history-question {
  margin: 0;
  color: var(--muted);
  font-size: var(--fs-2xs);
  line-height: 1.5;
}

.history-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--line-soft);
}

.text-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--blue);
  cursor: pointer;
  font: inherit;
  font-size: var(--fs-2xs);
  font-weight: 500;
}

.text-button:hover {
  color: var(--accent-dark);
  text-decoration: underline;
}

/* Campaign finance */

.finance-panel {
  margin: 0 0 48px;
  /* scroll-padding-top on html owns the sticky-nav offset; keep this at zero
     so the target is not pushed down twice. */
  scroll-margin-top: 0;
  container: finance-metrics / inline-size;
}

.finance-panel .panel-head {
  padding-bottom: 0;
}

.finance-intro {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: var(--fs-xs);
  line-height: 1.5;
}

.finance-intro.is-error {
  color: var(--error);
}

.finance-intro.is-notice {
  color: var(--amber);
}

.finance-body {
  padding: 20px 28px 28px;
}

.finance-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.finance-metric {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
}

.finance-metric-label {
  display: block;
  color: var(--muted-soft);
  font-size: var(--fs-2xs);
  font-weight: 500;
  line-height: 1.35;
}

.finance-metric-value {
  display: block;
  color: var(--ink);
  font-family: var(--serif);
  font-size: var(--fs-xl);
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
  white-space: nowrap;
  overflow-wrap: normal;
  word-break: normal;
}

.finance-metric-detail {
  display: block;
  color: var(--muted-soft);
  font-size: var(--fs-2xs);
  font-variant-numeric: tabular-nums;
  line-height: 1.4;
}

/* The summary sits in a narrow main column beside the sticky assistant.
   Size the grid by the panel's own width so large dollar totals keep their
   own line instead of splitting mid-number. */
@container finance-metrics (max-width: 759px) {
  .finance-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .finance-metric-value {
    font-size: var(--fs-lg);
  }
}

@container finance-metrics (max-width: 519px) {
  .finance-metrics {
    grid-template-columns: minmax(0, 1fr);
  }
}

.finance-columns {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
  gap: 16px;
  margin-top: 20px;
}

.finance-subpanel {
  min-width: 0;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
}

.finance-columns > .finance-subpanel {
  padding: 18px;
}

.finance-subhead {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.finance-subhead h3 {
  margin: 0;
  color: var(--ink);
  font-family: var(--serif);
  font-size: var(--fs-md);
  line-height: 1.3;
}

.finance-table-stack {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.finance-table-block {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

/* The labelled mobile sort control replaces the tiny header buttons on small
   screens. It stays hidden on desktop, where the real th buttons are large
   enough and remain the correct affordance. */
.finance-mobile-sort {
  display: none;
}

.finance-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  overscroll-behavior-x: contain;
  scrollbar-color: var(--line-strong) transparent;
  scrollbar-width: thin;
}

.finance-table {
  width: 100%;
  min-width: 460px;
  border-collapse: collapse;
  font-size: var(--fs-2xs);
  font-variant-numeric: tabular-nums;
}

.finance-table th,
.finance-table td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--line-soft);
  text-align: left;
  vertical-align: top;
}

.finance-committee-table {
  table-layout: fixed;
  min-width: 320px;
}

.finance-committee-table th,
.finance-committee-table td {
  padding: 7px 8px;
}

.finance-committee-table th:nth-child(1) {
  width: 36%;
}

.finance-committee-table th:nth-child(2) {
  width: 21%;
}

/* "Member recipients" is two words, so let the header wrap instead of forcing
   a nowrap label wider than its column. */
.finance-committee-table th:nth-child(3) {
  width: 21%;
  white-space: normal;
  line-height: 1.25;
}

.finance-committee-table th:nth-child(4) {
  width: 22%;
  white-space: normal;
  line-height: 1.25;
}

.finance-table thead th {
  background: var(--surface-soft);
  color: var(--muted);
  font-size: var(--fs-2xs);
  font-weight: 500;
}

.finance-table tbody tr:last-child td {
  border-bottom: 0;
}

.finance-table tbody tr:hover {
  background: var(--surface-soft);
}

.finance-table th:nth-child(3),
.finance-table th:last-child,
.finance-table td:nth-child(3),
.finance-table td:last-child {
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.finance-committee-table th:nth-child(3),
.finance-committee-table th:last-child {
  letter-spacing: 0.01em;
}

.finance-sort-button {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  margin: -2px -4px;
  padding: 2px 4px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  letter-spacing: inherit;
  text-align: inherit;
  cursor: pointer;
}

.finance-sort-button:hover {
  background: var(--surface);
  color: var(--ink);
}

.finance-sort-button:focus-visible {
  outline-offset: 1px;
}

.finance-sort-button.is-active {
  color: var(--ink);
}

.finance-sort-indicator {
  display: inline-block;
  min-width: 0.75em;
  color: var(--muted-soft);
  font-size: 0.9em;
  line-height: 1;
  text-align: center;
}

.finance-sort-button.is-active .finance-sort-indicator {
  color: var(--ink);
}

.finance-committee-table th[aria-sort="ascending"],
.finance-committee-table th[aria-sort="descending"] {
  color: var(--ink);
}

.finance-committee-cell {
  min-width: 0;
}

.finance-committee-name {
  display: block;
  overflow-wrap: anywhere;
  color: var(--ink);
  font-weight: 500;
  line-height: 1.3;
}

.finance-committee-id {
  display: block;
  margin-top: 1px;
  color: var(--muted-soft);
  font-family: var(--mono);
  font-size: var(--fs-2xs);
}

.finance-committee-table .sector-badge {
  padding: 1px 6px;
  white-space: normal;
}

.finance-number {
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  font-weight: 500;
  white-space: nowrap;
}

.finance-members-unit {
  display: none;
  color: var(--muted);
  font-weight: 400;
}

/* Stock disclosures */

.stock-panel {
  margin: 0 0 48px;
  /* scroll-padding-top on html owns the sticky-nav offset. */
  scroll-margin-top: 0;
}

.stock-panel .panel-head {
  padding-bottom: 0;
}

.finance-metrics.stock-metrics {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.stock-filter-form {
  margin-top: 20px;
}

.stock-filter-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
}

.stock-type-control select {
  min-width: 150px;
}

.stock-activity-panel {
  margin-top: 20px;
  padding: 18px;
}

.stock-activity-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 12px;
}

.stock-activity-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}

.stock-activity-head {
  min-width: 0;
}

.stock-activity-member {
  display: flex;
  flex-direction: column;
  gap: 3px;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font: inherit;
  text-align: left;
}

.stock-activity-member:hover:not(:disabled) .stock-activity-name {
  color: var(--blue);
  text-decoration: underline;
}

.stock-activity-member:disabled {
  cursor: default;
}

.stock-activity-name {
  color: var(--ink);
  font-size: var(--fs-sm);
  font-weight: 600;
  line-height: 1.3;
}

.stock-activity-meta {
  color: var(--muted-soft);
  font-size: var(--fs-2xs);
  line-height: 1.4;
}

.stock-activity-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px;
}

.stock-activity-count {
  color: var(--ink);
  font-size: 1.55rem;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.stock-activity-count-label {
  color: var(--muted);
  font-size: var(--fs-xs);
}

.stock-activity-latest {
  margin: 0;
  color: var(--muted);
  font-size: var(--fs-2xs);
  line-height: 1.5;
}

.stock-activity-latest-filed {
  color: var(--muted-soft);
}

.stock-activity-types {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.stock-activity-volume {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.stock-activity-volume-label {
  color: var(--muted-soft);
  font-size: var(--fs-2xs);
}

.stock-activity-volume-value {
  color: var(--ink);
  font-size: var(--fs-sm);
  font-variant-numeric: tabular-nums;
  line-height: 1.35;
}

.stock-activity-tickers {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.stock-activity-tickers-label {
  margin-right: 2px;
  color: var(--muted-soft);
  font-size: var(--fs-2xs);
}

.stock-activity-ticker {
  margin-right: 0;
}

.stock-activity-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  margin-top: auto;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}

.stock-activity-action:disabled {
  color: var(--muted-soft);
  cursor: default;
  text-decoration: none;
}

.stock-activity-note {
  margin: 14px 0 0;
  color: var(--muted-soft);
  font-size: var(--fs-2xs);
  line-height: 1.55;
}

.stock-results-panel {
  margin-top: 20px;
  padding: 18px;
}

.stock-table-wrap {
  max-height: clamp(320px, 58vh, 620px);
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  overscroll-behavior: contain;
  scrollbar-color: var(--line-strong) transparent;
  scrollbar-width: thin;
}

.stock-table-wrap:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}

.stock-table {
  min-width: 960px;
}

.stock-load-more-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
}

.stock-load-more-status {
  color: var(--muted);
  font-size: var(--fs-xs);
}

.stock-table th,
.stock-table td {
  padding: 6px 9px;
  vertical-align: top;
}

.stock-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--surface-soft);
  box-shadow: inset 0 -1px 0 var(--line);
  white-space: nowrap;
}

.stock-table th:nth-child(5),
.stock-table td:nth-child(5) {
  min-width: 156px;
  white-space: nowrap;
}

.stock-table th:nth-child(3),
.stock-table th:last-child,
.stock-table td:nth-child(3),
.stock-table td:last-child {
  text-align: left;
}

.stock-date {
  display: block;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  font-weight: 500;
  white-space: nowrap;
}

.stock-date-detail {
  display: block;
  margin-top: 1px;
  color: var(--muted-soft);
  font-size: var(--fs-2xs);
  line-height: 1.3;
}

.stock-member-button {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font: inherit;
  text-align: left;
}

.stock-member-button:hover:not(:disabled) .stock-member-name {
  color: var(--blue);
  text-decoration: underline;
}

.stock-member-button:disabled {
  cursor: default;
}

.stock-member-name {
  color: var(--ink);
  font-weight: 500;
  line-height: 1.3;
}

.stock-member-meta {
  color: var(--muted-soft);
  font-size: var(--fs-2xs);
  line-height: 1.35;
}

.stock-asset-cell {
  min-width: 160px;
}

.stock-asset-ticker {
  display: inline-block;
  margin-right: 6px;
  padding: 1px 6px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--surface-soft);
  color: var(--ink);
  font-family: var(--mono);
  font-size: var(--fs-2xs);
  font-weight: 500;
  letter-spacing: 0.02em;
}

.stock-company-link {
  appearance: none;
  cursor: pointer;
  text-align: left;
}

.stock-company-link:hover,
.stock-company-link:focus-visible {
  border-color: var(--accent);
  color: var(--accent);
}

.stock-sec-overlap,
.stock-sec-overlap-link {
  display: inline-block;
  margin-top: 4px;
  margin-right: 6px;
  padding: 1px 6px;
  border: 1px dashed var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: var(--fs-2xs);
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
}

.stock-sec-overlap-link:hover,
.stock-sec-overlap-link:focus-visible {
  border-color: var(--accent);
  color: var(--accent);
}

.stock-context-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: var(--fs-xs);
  line-height: 1.3;
  cursor: pointer;
}

.stock-context-toggle input {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--accent);
}

.stock-context-note {
  margin: 12px 0 0;
  padding: 10px 12px;
  border-left: 2px solid var(--line-strong);
  color: var(--muted);
  font-size: var(--fs-2xs);
  line-height: 1.55;
}

.stock-price-context {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  max-width: 280px;
}

.stock-context-chip {
  display: inline-flex;
  align-items: center;
  padding: 2px 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font-size: var(--fs-2xs);
  font-weight: 500;
  line-height: 1.35;
  white-space: nowrap;
}

.stock-context-chip--muted {
  border-style: dashed;
  color: var(--muted-soft);
}

.stock-context-chip--window {
  border-color: var(--line-strong);
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.stock-context-chip--stat,
.stock-context-chip--event,
.stock-context-chip--committee {
  border-color: var(--line-strong);
  color: var(--muted);
}

.trade-record-context {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 6px;
  max-width: 340px;
}

.trade-context-details {
  flex: 1 1 100%;
  margin-top: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.trade-context-summary {
  padding: 5px 9px;
  color: var(--muted);
  font-size: var(--fs-2xs);
  font-weight: 500;
  line-height: 1.35;
  cursor: pointer;
}

.trade-context-summary:hover,
.trade-context-summary:focus-visible {
  color: var(--ink);
}

.trade-context-body {
  padding: 0 9px 9px;
}

.trade-context-group {
  margin-top: 8px;
}

.trade-context-group-title {
  margin: 0 0 4px;
  color: var(--ink);
  font-size: var(--fs-2xs);
  font-weight: 600;
  line-height: 1.35;
}

.trade-context-note,
.trade-context-empty,
.trade-context-disclaimer,
.trade-context-source-note {
  margin: 0 0 6px;
  color: var(--muted);
  font-size: var(--fs-2xs);
  line-height: 1.5;
}

.trade-context-disclaimer {
  margin-top: 8px;
  padding-top: 6px;
  border-top: 1px dashed var(--line);
  color: var(--muted-soft);
}

.trade-context-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 6px;
}

.trade-context-item {
  padding: 6px 7px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-soft);
}

.trade-context-item-title {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 8px;
  color: var(--ink);
  font-size: var(--fs-2xs);
  line-height: 1.4;
}

.trade-context-item-name {
  font-weight: 600;
}

.trade-context-item-sub,
.trade-context-role,
.trade-context-event-type {
  color: var(--muted);
  font-size: var(--fs-2xs);
}

.trade-context-role {
  padding: 1px 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
}

.trade-context-event-date {
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}

.trade-context-item-meta,
.trade-context-event-committee,
.trade-context-event-description,
.trade-context-match-keywords {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: var(--fs-2xs);
  line-height: 1.45;
}

.trade-context-event-description {
  color: var(--ink);
}

.trade-context-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
  margin-top: 4px;
}

.trade-context-tag {
  padding: 1px 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font-size: var(--fs-2xs);
  line-height: 1.35;
}

.trade-context-source {
  display: inline-flex;
  margin-top: 5px;
  font-size: var(--fs-2xs);
}

.trade-context-export {
  margin-top: 8px;
}

.member-stock-price-context .trade-record-context,
.member-stock-price-context .trade-context-details {
  max-width: none;
}

.tag--unknown {
  border-style: dashed;
  color: var(--muted);
}

.tag--plan {
  padding: 4px 8px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: var(--fs-2xs);
  font-weight: 500;
  white-space: nowrap;
}

.tag--plan-yes {
  background: var(--blue-soft);
  color: var(--blue);
}

.tag--plan-no {
  border-color: var(--line-strong);
  background: var(--surface);
  color: var(--muted);
}

.tag--plan-unknown {
  background: var(--amber-soft);
  color: var(--amber);
}

.stock-asset-name {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: var(--fs-2xs);
  line-height: 1.35;
}

.stock-type {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: var(--fs-2xs);
  font-weight: 500;
  white-space: nowrap;
}

.stock-type--purchase {
  background: var(--blue-soft);
  color: var(--blue);
}

.stock-type--sale {
  background: var(--accent-soft);
  color: var(--accent-dark);
}

.stock-type--exchange {
  background: var(--amber-soft);
  color: var(--amber);
}

.stock-amount {
  display: block;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  font-weight: 500;
  white-space: nowrap;
}

.stock-amount-detail {
  display: block;
  margin-top: 2px;
  color: var(--muted-soft);
  font-size: var(--fs-2xs);
  line-height: 1.3;
}

.stock-filed {
  display: block;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.stock-amendment {
  display: inline-block;
  margin-top: 4px;
  padding: 1px 6px;
  border-radius: 999px;
  background: var(--amber-soft);
  color: var(--amber);
  font-size: var(--fs-2xs);
  font-weight: 500;
}

.stock-source-cell {
  white-space: nowrap;
}

.stock-source-link {
  font-size: var(--fs-2xs);
}

.stock-source-note {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: var(--fs-2xs);
  line-height: 1.55;
}

.stock-source-note a {
  color: var(--blue);
  text-underline-offset: 0.15em;
}

.stock-method {
  margin-top: 18px;
}

.tag--stock {
  background: var(--blue-soft);
  color: var(--blue);
}

.tag--company {
  background: var(--blue-soft);
  color: var(--blue);
}

.tag--net-worth {
  background: var(--amber-soft);
  color: var(--amber);
}

.tag--net-worth.is-complete {
  background: var(--green-soft);
  color: var(--green);
}

.tag--net-worth.is-partial {
  background: var(--amber-soft);
  color: var(--amber);
}

.tag--net-worth.is-unbounded {
  background: var(--error-soft);
  color: var(--accent);
}

.tag--net-worth.is-empty {
  background: var(--blue-soft);
  color: var(--muted);
}

.member-net-worth-block {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.member-net-worth-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.member-net-worth-stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-soft);
}

.member-net-worth-stat-label {
  color: var(--muted);
  font-size: var(--fs-2xs);
  font-weight: 500;
}

.member-net-worth-stat-year {
  color: var(--muted-soft);
  font-size: var(--fs-2xs);
}

.member-net-worth-stat-value {
  color: var(--ink);
  font-size: var(--fs-lg);
  line-height: 1.25;
}

.member-net-worth-stat-value.is-negative {
  color: var(--accent);
}

.member-net-worth-stat-status {
  color: var(--muted);
  font-size: var(--fs-2xs);
}

.member-net-worth-stat-status.is-complete {
  color: var(--green);
}

.member-net-worth-stat-status.is-partial {
  color: var(--amber);
}

.member-net-worth-stat-status.is-unbounded {
  color: var(--accent);
}

.member-net-worth-meta {
  margin: 0;
  color: var(--muted);
  font-size: var(--fs-2xs);
}

.member-net-worth-warning {
  margin: 0;
  padding: 8px 10px;
  border-radius: 8px;
  background: var(--amber-soft);
  color: var(--amber);
  font-size: var(--fs-2xs);
  line-height: 1.45;
}

.member-net-worth-warning--negative {
  background: var(--error-soft);
  color: var(--accent);
}

.member-net-worth-caveats {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 0;
  padding-left: 16px;
  color: var(--muted);
  font-size: var(--fs-2xs);
  line-height: 1.5;
}

@media (max-width: 640px) {
  .member-net-worth-stats {
    grid-template-columns: 1fr;
  }
}

.member-stock-block {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.member-stock-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.member-stock-item {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-soft);
}

.member-stock-item-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px 8px;
}

.stock-future-flag {
  display: inline-flex;
  align-items: center;
  margin-top: 4px;
  padding: 2px 8px;
  border: 1px solid var(--amber);
  border-radius: 999px;
  background: var(--amber-soft);
  color: var(--amber);
  font-size: var(--fs-2xs);
  font-weight: 500;
  white-space: nowrap;
}

.member-stock-item-date {
  color: var(--ink);
  font-size: var(--fs-2xs);
  font-variant-numeric: tabular-nums;
  font-weight: 500;
}

.member-stock-item-asset {
  margin: 8px 0 0;
}

.member-stock-item-meta {
  margin: 4px 0 0;
  color: var(--muted-soft);
  font-size: var(--fs-2xs);
  line-height: 1.45;
}

.member-stock-price-context {
  max-width: none;
  margin-top: 8px;
}

.member-stock-link {
  display: inline-flex;
  margin-top: 8px;
  font-size: var(--fs-2xs);
}

.member-stock-overlap {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 8px;
  margin-top: 8px;
  padding: 8px;
  border-left: 2px solid var(--blue);
  border-radius: 8px;
  background: var(--blue-soft);
}

.member-stock-overlap-label {
  color: var(--blue);
  font-size: var(--fs-2xs);
  font-weight: 600;
}

.member-stock-overlap-detail {
  color: var(--muted);
  font-size: var(--fs-2xs);
  line-height: 1.4;
}

.member-stock-jurisdiction {
  border-left-color: var(--accent);
}

.member-stock-overlap-note {
  margin-top: 8px;
}

.member-stock-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.member-company-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

.member-company-chip {
  display: inline-flex;
  flex-direction: column;
  gap: 2px;
  max-width: 260px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-soft);
  color: inherit;
  font: inherit;
  text-align: left;
}

.member-company-chip--link {
  cursor: pointer;
}

.member-company-chip--link:hover,
.member-company-chip--link:focus-visible {
  border-color: var(--blue);
  background: var(--blue-soft);
}

.member-company-chip--static {
  border-style: dashed;
  background: transparent;
}

.member-company-ticker {
  color: var(--ink);
  font-size: var(--fs-2xs);
  font-weight: 600;
  letter-spacing: 0.02em;
}

.member-company-name {
  color: var(--muted);
  font-size: var(--fs-2xs);
  line-height: 1.35;
}

.member-company-count {
  color: var(--muted-soft);
  font-size: var(--fs-2xs);
  font-variant-numeric: tabular-nums;
}

.member-company-state {
  color: var(--muted-soft);
  font-size: var(--fs-2xs);
  font-style: italic;
  line-height: 1.35;
}

.member-company-limit-note {
  flex-basis: 100%;
}

.finance-member-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  align-content: start;
  align-items: start;
  gap: 8px;
  padding-right: 2px;
}

/* Expansion controls keep the 200-member cohort out of a fixed-height scroll
   trap while still letting a reader load the full list on demand. */
.finance-member-more {
  display: flex;
  grid-column: 1 / -1;
  justify-content: center;
  margin-top: 12px;
}

.finance-member-more-button {
  min-height: 44px;
  padding: 10px 18px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--surface);
  color: var(--ink-soft);
  font: inherit;
  font-size: var(--fs-xs);
  font-weight: 500;
  cursor: pointer;
}

.finance-member-more-button:hover {
  border-color: var(--blue);
  color: var(--ink);
}

.finance-member-more-button:focus-visible {
  border-color: var(--blue);
  box-shadow: var(--focus);
  outline: none;
}

.finance-member-row {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  align-items: start;
  gap: 10px;
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: inherit;
  cursor: pointer;
  font: inherit;
  font-variant-numeric: tabular-nums;
  text-align: left;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

.finance-member-row:hover:not(:disabled) {
  border-color: var(--line-strong);
  box-shadow: var(--shadow-card);
}

.finance-member-row:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

.finance-member-avatar {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--paper-deep);
  color: var(--ink);
  font-family: var(--serif);
  font-size: var(--fs-xs);
  font-weight: 500;
}

.finance-member-avatar--d {
  background: var(--blue-soft);
  color: var(--blue);
}

.finance-member-avatar--r {
  background: var(--accent-soft);
  color: var(--accent-dark);
}

.finance-member-avatar--i {
  background: var(--amber-soft);
  color: var(--amber);
}

.finance-member-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.finance-member-name {
  overflow: hidden;
  color: var(--ink);
  font-family: var(--serif);
  font-size: var(--fs-base);
  font-weight: 500;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.finance-member-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1px 6px;
  color: var(--muted);
  font-size: var(--fs-2xs);
  line-height: 1.3;
}

.finance-member-meta .member-meta-item {
  overflow-wrap: normal;
  white-space: nowrap;
}

.finance-member-figures {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  column-gap: 8px;
  row-gap: 2px;
  margin-top: 1px;
  color: var(--muted-soft);
  font-size: var(--fs-2xs);
  line-height: 1.3;
}

.finance-figure {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 3px;
  min-width: 0;
  max-width: 100%;
  white-space: normal;
}

.finance-figure-label {
  color: var(--muted-soft);
  font-weight: 400;
}

.finance-figure-value {
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  font-weight: 500;
}

.finance-figure--direct {
  padding: 0 6px;
  border-radius: 999px;
  background: var(--blue-soft);
}

.finance-figure--direct .finance-figure-label,
.finance-figure--direct .finance-figure-value {
  color: var(--blue);
}

.finance-member-conduit-note {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 1px 4px;
  width: fit-content;
  max-width: 100%;
  margin-top: 2px;
  padding: 2px 7px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: var(--amber-soft);
  color: var(--amber);
  font-size: var(--fs-2xs);
  font-variant-numeric: tabular-nums;
  font-weight: 500;
  line-height: 1.3;
  white-space: normal;
}

@container finance-metrics (max-width: 739px) {
  .finance-columns > .finance-subpanel {
    padding: 16px;
  }
}

.finance-member-score {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: flex-end;
  gap: 2px;
  min-width: 0;
  text-align: right;
}

.finance-member-score-value {
  color: var(--ink);
  font-family: var(--serif);
  font-size: var(--fs-md);
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}

.finance-member-score-unit {
  color: var(--muted-soft);
  font-size: var(--fs-2xs);
}

.finance-member-score .finance-meter {
  flex-basis: 100%;
  margin-top: 4px;
}

.finance-meter {
  position: relative;
  display: block;
  width: 100%;
  height: 6px;
  overflow: hidden;
  border-radius: 3px;
  background: var(--paper-deep);
}

.finance-meter-bar {
  display: block;
  height: 100%;
  border-radius: 2px;
  background: var(--blue);
}

.finance-meter--low .finance-meter-bar {
  background: var(--blue);
}

.finance-meter--mid .finance-meter-bar {
  background: var(--amber);
}

.finance-meter--high .finance-meter-bar {
  background: var(--accent);
}

.finance-score-card {
  padding: 16px 16px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--blue);
  border-radius: 12px;
  background: var(--surface);
}

.finance-score-card--mid {
  border-left-color: var(--amber);
}

.finance-score-card--high {
  border-left-color: var(--accent);
}

.finance-score-kicker {
  margin: 0;
  color: var(--muted-soft);
  font-size: var(--fs-2xs);
  font-weight: 500;
}

.finance-score-value {
  margin: 4px 0 8px;
  color: var(--ink);
  font-family: var(--serif);
  font-size: var(--fs-5xl);
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}

.finance-score-caption {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: var(--fs-2xs);
  font-variant-numeric: tabular-nums;
  line-height: 1.5;
}

.finance-score-badges {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
}

.finance-badge {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  max-width: 100%;
  padding: 3px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: var(--fs-2xs);
  font-variant-numeric: tabular-nums;
  font-weight: 500;
  line-height: 1.4;
}

.finance-badge-label {
  color: inherit;
  font-weight: 400;
}

.finance-badge-value {
  color: var(--ink);
  font-weight: 500;
  white-space: nowrap;
}

.finance-badge--direct {
  border-color: transparent;
  background: var(--blue-soft);
  color: var(--blue);
}

.finance-badge--direct .finance-badge-value {
  color: var(--blue);
}

.finance-badge--pass {
  border-color: transparent;
  background: var(--amber-soft);
  color: var(--amber);
}

.finance-badge--pass .finance-badge-value {
  color: var(--amber);
}

.finance-formula-note {
  margin: 6px 0 0;
  padding-top: 6px;
  border-top: 1px dashed var(--line);
  color: var(--muted-soft);
  font-size: var(--fs-2xs);
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.finance-conduit-caveat {
  margin-top: 10px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--amber);
  border-radius: 8px;
  background: var(--surface-soft);
}

.finance-conduit-caveat-title {
  margin: 0 0 4px;
  color: var(--ink);
  font-size: var(--fs-2xs);
  font-weight: 500;
}

.finance-conduit-caveat-copy,
.finance-conduit-adjusted {
  margin: 0;
  color: var(--muted);
  font-size: var(--fs-2xs);
  line-height: 1.5;
}

.finance-conduit-adjusted {
  margin-top: 4px;
  color: var(--ink);
  font-weight: 500;
}

.finance-breakdown {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 16px 0 0;
}

.finance-breakdown-item {
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface-soft);
}

.finance-breakdown dt {
  color: var(--muted-soft);
  font-size: var(--fs-2xs);
  font-weight: 500;
  line-height: 1.3;
}

.finance-breakdown dd {
  margin: 4px 0 0;
  overflow-wrap: anywhere;
  color: var(--ink);
  font-family: var(--mono);
  font-size: var(--fs-sm);
  font-variant-numeric: tabular-nums;
  font-weight: 500;
}

.finance-donors {
  margin-top: 20px;
}

.finance-donors-title {
  margin: 0 0 8px;
  color: var(--ink);
  font-family: var(--serif);
  font-size: var(--fs-md);
  line-height: 1.3;
}

.finance-donor-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.finance-donor-item {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 10px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface-soft);
}

.finance-donor-main {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  flex: 1 1 100%;
  min-width: 0;
}

.finance-donor-tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 8px;
  flex: 1 1 100%;
  min-width: 0;
}

.finance-donor-name {
  flex: 1 1 auto;
  min-width: 0;
  overflow-wrap: anywhere;
  color: var(--ink);
  font-size: var(--fs-xs);
  font-weight: 500;
  line-height: 1.4;
}

.finance-donor-amount {
  flex: 0 0 auto;
  color: var(--accent-dark);
  font-family: var(--mono);
  font-size: var(--fs-2xs);
  font-variant-numeric: tabular-nums;
  font-weight: 500;
  white-space: nowrap;
}

.finance-donor-meta {
  color: var(--muted-soft);
  font-size: var(--fs-2xs);
  line-height: 1.4;
}

.finance-outside-spending {
  margin-top: 20px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface-soft);
}

.finance-outside-title {
  margin: 0 0 8px;
  color: var(--ink);
  font-family: var(--serif);
  font-size: var(--fs-md);
  line-height: 1.3;
}

.finance-outside-note,
.finance-outside-caption {
  margin: 0;
  color: var(--muted);
  font-size: var(--fs-2xs);
  line-height: 1.5;
}

.finance-outside-caption {
  margin-top: 8px;
  font-size: var(--fs-2xs);
}

.finance-outside-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 12px 0 0;
}

.finance-outside-metric {
  min-width: 0;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface);
}

.finance-outside-label {
  color: var(--muted-soft);
  font-size: var(--fs-2xs);
  font-weight: 500;
  line-height: 1.3;
}

.finance-outside-value {
  margin: 4px 0 0;
  overflow-wrap: anywhere;
  color: var(--ink);
  font-family: var(--mono);
  font-size: var(--fs-sm);
  font-variant-numeric: tabular-nums;
  font-weight: 500;
}

.finance-outside-committees-title {
  margin: 16px 0 8px;
  color: var(--ink);
  font-size: var(--fs-2xs);
  font-weight: 500;
}

.finance-outside-committee-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.finance-outside-committee {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface);
}

.finance-outside-committee-main {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
}

.finance-outside-committee-name {
  flex: 1 1 auto;
  min-width: 0;
  overflow-wrap: anywhere;
  color: var(--ink);
  font-size: var(--fs-2xs);
  font-weight: 500;
  line-height: 1.4;
}

.finance-outside-committee-total {
  flex: 0 0 auto;
  color: var(--accent-dark);
  font-family: var(--mono);
  font-size: var(--fs-2xs);
  font-variant-numeric: tabular-nums;
  font-weight: 500;
  white-space: nowrap;
}

.finance-outside-committee-meta {
  color: var(--muted-soft);
  font-size: var(--fs-2xs);
  font-variant-numeric: tabular-nums;
  line-height: 1.4;
}

.finance-geography {
  margin-top: 20px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface-soft);
}

.finance-geography-title {
  margin: 0 0 8px;
  color: var(--ink);
  font-family: var(--serif);
  font-size: var(--fs-md);
  line-height: 1.3;
}

.finance-geography-note,
.finance-geography-caption {
  margin: 0;
  color: var(--muted);
  font-size: var(--fs-2xs);
  line-height: 1.5;
}

.finance-geography-caption {
  margin-top: 10px;
  font-size: var(--fs-2xs);
}

.finance-geography-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 12px 0 0;
}

.finance-geography-metric {
  min-width: 0;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface);
}

.finance-geography-label {
  color: var(--muted-soft);
  font-size: var(--fs-2xs);
  font-weight: 500;
  line-height: 1.3;
}

.finance-geography-value {
  margin: 4px 0 0;
  overflow-wrap: anywhere;
  color: var(--ink);
  font-family: var(--mono);
  font-size: var(--fs-sm);
  font-variant-numeric: tabular-nums;
  font-weight: 500;
}

.finance-geography-states-title {
  margin: 16px 0 8px;
  color: var(--ink);
  font-size: var(--fs-2xs);
  font-weight: 500;
}

.finance-geography-state-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.finance-geography-state {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface);
}

.finance-geography-state-name {
  color: var(--ink);
  font-size: var(--fs-2xs);
  font-weight: 500;
}

.finance-geography-state-amount {
  color: var(--accent-dark);
  font-family: var(--mono);
  font-size: var(--fs-2xs);
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.finance-itemized {
  margin-top: 20px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface-soft);
}

.finance-itemized-title {
  margin: 0 0 8px;
  color: var(--ink);
  font-family: var(--serif);
  font-size: var(--fs-md);
  line-height: 1.3;
}

.finance-itemized-note,
.finance-itemized-employer-note,
.finance-itemized-passthrough-note,
.finance-itemized-caption {
  margin: 0;
  color: var(--muted);
  font-size: var(--fs-2xs);
  line-height: 1.5;
}

.finance-itemized-caption {
  margin-top: 10px;
  font-size: var(--fs-2xs);
}

.finance-itemized-subtitle {
  margin: 16px 0 8px;
  color: var(--ink);
  font-size: var(--fs-2xs);
  font-weight: 500;
}

.finance-itemized-tier-list,
.finance-itemized-employer-list,
.finance-itemized-passthrough-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.finance-itemized-tier,
.finance-itemized-employer,
.finance-itemized-passthrough-conduit,
.finance-itemized-passthrough-receipt {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px 10px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface);
}

.finance-itemized-tier-main,
.finance-itemized-employer-main {
  display: flex;
  flex: 1 1 auto;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
}

.finance-itemized-tier-label,
.finance-itemized-employer-name,
.finance-itemized-passthrough-conduit-name,
.finance-itemized-passthrough-receipt-name {
  color: var(--ink);
  font-size: var(--fs-2xs);
  font-weight: 500;
  overflow-wrap: anywhere;
}

.finance-itemized-tier-amount,
.finance-itemized-employer-amount,
.finance-itemized-passthrough-conduit-amount,
.finance-itemized-passthrough-receipt-amount {
  flex: 0 0 auto;
  color: var(--accent-dark);
  font-family: var(--mono);
  font-size: var(--fs-2xs);
  font-variant-numeric: tabular-nums;
  font-weight: 500;
  white-space: nowrap;
}

.finance-itemized-tier-meta,
.finance-itemized-employer-meta,
.finance-itemized-occupations,
.finance-itemized-role-badges,
.finance-itemized-split-meta {
  color: var(--muted-soft);
  font-size: var(--fs-2xs);
  line-height: 1.4;
}

.finance-itemized-role-badges {
  color: var(--accent-dark);
  font-weight: 500;
}

.finance-itemized-split,
.finance-itemized-passthrough {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
}

.finance-itemized-split-item,
.finance-itemized-passthrough-item {
  min-width: 0;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface);
}

.finance-itemized-split-label,
.finance-itemized-passthrough-label {
  color: var(--muted-soft);
  font-size: var(--fs-2xs);
  font-weight: 500;
  line-height: 1.3;
}

.finance-itemized-split-value,
.finance-itemized-passthrough-value {
  margin: 4px 0 0;
  overflow-wrap: anywhere;
  color: var(--ink);
  font-family: var(--mono);
  font-size: var(--fs-sm);
  font-variant-numeric: tabular-nums;
  font-weight: 500;
}

.sector-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: var(--fs-2xs);
  font-weight: 500;
  line-height: 1.4;
  white-space: nowrap;
}

.sector-badge--conduit {
  background: var(--paper-deep);
  color: var(--muted);
}

.sector-badge--corporate {
  background: var(--blue-soft);
  color: var(--blue);
}

.sector-badge--labor {
  background: var(--green-soft);
  color: var(--green);
}

.sector-badge--leadership {
  background: var(--amber-soft);
  color: var(--amber);
}

.sector-badge--ideological {
  background: var(--accent-soft);
  color: var(--accent-dark);
}

.sector-badge--other {
  background: var(--paper-deep);
  color: var(--muted);
}

.finance-empty,
.finance-fallback {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 20px;
  border: 1px dashed var(--line-strong);
  border-radius: 10px;
  background: var(--surface);
  color: var(--muted);
  text-align: center;
}

.finance-empty-title,
.finance-fallback-title {
  margin: 0;
  color: var(--ink);
  font-family: var(--serif);
  font-size: var(--fs-md);
  line-height: 1.3;
}

.finance-empty-copy,
.finance-fallback-copy {
  max-width: 52ch;
  margin: 0;
  font-size: var(--fs-2xs);
  line-height: 1.5;
}

.finance-empty .button,
.finance-fallback .button {
  margin-top: 4px;
}

.finance-sync-note {
  margin: 16px 0 0;
  color: var(--muted-soft);
  font-size: var(--fs-2xs);
  line-height: 1.45;
}

.member-finance-block {
  display: flex;
  flex-direction: column;
}

.tag--finance {
  background: var(--green-soft);
  color: var(--green);
}

/* --------------------------------------------------------------------------
   Footer and misc
   -------------------------------------------------------------------------- */

.site-footer {
  border-top: 1px solid var(--line);
  background: var(--paper-deep);
  padding-block: 24px;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  color: var(--muted);
  font-size: var(--fs-2xs);
  line-height: 1.5;
}

.footer-copy {
  display: grid;
  gap: 6px;
}

.footer-inner p {
  margin: 0;
}

.footer-credit {
  color: var(--muted);
}

.footer-note {
  color: var(--muted-soft);
  text-align: left;
}

.footer-link {
  margin-left: 4px;
  padding: 0;
  border: 0;
  border-radius: 2px;
  background: transparent;
  color: var(--blue);
  font: inherit;
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 0.15em;
  cursor: pointer;
}

.footer-link:hover {
  color: var(--accent-dark);
}

.footer-link:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}

.member-export-link {
  white-space: nowrap;
}

/* Disclaimers & methodology dialog */

.disclaimer-modal {
  width: min(680px, calc(100% - 32px));
  max-height: min(84dvh, 760px);
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 28px 80px rgba(9, 17, 33, 0.3);
  overflow: hidden;
}

.disclaimer-modal[open] {
  display: flex;
  flex-direction: column;
}

.disclaimer-modal::backdrop {
  background: rgba(9, 17, 33, 0.58);
  backdrop-filter: blur(2px);
}

.disclaimer-modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  flex: 0 0 auto;
  padding: 24px 24px 16px;
  border-bottom: 1px solid var(--line);
}

.disclaimer-modal-head .kicker {
  margin-bottom: 4px;
}

.disclaimer-modal-head h2 {
  margin: 0;
  color: var(--ink);
  font-family: var(--serif);
  font-size: var(--fs-2xl);
  line-height: 1.2;
}

.disclaimer-modal-body {
  overflow-y: auto;
  padding: 20px 24px 28px;
}

.disclaimer-lede {
  margin: 0 0 20px;
  color: var(--muted);
  font-size: var(--fs-sm);
}

.disclaimer-list {
  display: grid;
  gap: 16px;
}

.disclaimer-item h3 {
  margin: 0 0 4px;
  color: var(--ink);
  font-family: var(--serif);
  font-size: var(--fs-md);
  line-height: 1.3;
}

.disclaimer-item p {
  margin: 0;
  color: var(--muted);
  font-size: var(--fs-xs);
  line-height: 1.6;
}

/* Research data export dialog */

.export-modal {
  width: min(760px, calc(100% - 32px));
}

.export-form {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

.export-body {
  display: grid;
  gap: 16px;
  min-height: 0;
  min-width: 0;
}

.export-bioid-explainer {
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: 10px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: var(--fs-2xs);
  line-height: 1.55;
}

.export-bioid-explainer h3 {
  margin: 0 0 6px;
  color: var(--ink);
  font-family: var(--serif);
  font-size: var(--fs-sm);
  line-height: 1.3;
}

.export-bioid-list {
  display: grid;
  gap: 5px;
  margin: 0;
  padding-left: 18px;
}

.export-bioid-list code {
  color: var(--ink-soft);
  font-family: var(--mono);
  font-size: 0.95em;
}

.export-field {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.export-field label {
  color: var(--ink);
  font-size: var(--fs-xs);
  font-weight: 600;
}

.export-field select,
.export-field input {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  padding: 9px 11px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: var(--fs-sm);
}

.export-field select:focus-visible,
.export-field input:focus-visible {
  border-color: var(--blue);
  outline: none;
  box-shadow: var(--focus);
}

.export-input-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.export-input-row input {
  flex: 1 1 160px;
}

.export-input-row .button {
  flex: 0 0 auto;
  white-space: nowrap;
}

.export-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  min-width: 0;
}

.export-dataset-note {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: var(--fs-2xs);
  line-height: 1.5;
}

.export-check {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  color: var(--muted);
  font-size: var(--fs-xs);
  line-height: 1.45;
}

.export-check input {
  margin-top: 2px;
}

.export-field-note {
  margin: -2px 0 0;
  color: var(--muted-soft);
  font-size: var(--fs-2xs);
  line-height: 1.45;
}

.export-note {
  margin: 0;
  color: var(--muted-soft);
  font-size: var(--fs-2xs);
  line-height: 1.55;
}

.export-note code {
  color: var(--ink-soft);
  font-family: var(--mono);
  font-size: 0.95em;
}

.export-cart {
  display: grid;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--green);
  border-radius: 10px;
  background: var(--surface);
}

.export-cart-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px 12px;
}

.export-cart-head h3 {
  margin: 0;
  color: var(--ink);
  font-family: var(--serif);
  font-size: var(--fs-sm);
}

.export-cart-summary {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: var(--fs-2xs);
  line-height: 1.5;
}

.export-cart-empty {
  margin: 0;
  color: var(--muted-soft);
  font-size: var(--fs-2xs);
  line-height: 1.5;
}

.export-cart-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.export-cart-list[hidden],
.export-cart-empty[hidden] {
  display: none;
}

.export-cart-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 4px 3px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-soft);
}

.export-cart-chip-label {
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
  min-width: 0;
}

.export-cart-chip-id {
  color: var(--ink);
  font-family: var(--mono);
  font-size: var(--fs-2xs);
}

.export-cart-chip-name {
  max-width: 180px;
  overflow: hidden;
  color: var(--muted);
  font-size: var(--fs-2xs);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.export-cart-remove {
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  font: inherit;
  line-height: 1;
  cursor: pointer;
}

.export-cart-remove:hover,
.export-cart-remove:focus-visible {
  background: var(--accent-soft);
  color: var(--accent-dark);
}

.export-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.export-status {
  min-height: 1.2em;
  margin: 0;
  color: var(--green);
  font-size: var(--fs-xs);
}

.export-status.is-error {
  color: var(--error);
}

.export-preview-panel {
  display: grid;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--blue);
  border-radius: 10px;
  background: var(--surface);
}

.export-preview-panel[hidden] {
  display: none;
}

.export-preview-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px 12px;
}

.export-preview-head h3 {
  margin: 0;
  color: var(--ink);
  font-family: var(--serif);
  font-size: var(--fs-sm);
}

.export-preview-summary {
  margin: 0;
  color: var(--muted);
  font-size: var(--fs-2xs);
  line-height: 1.5;
}

.export-preview-heading {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.copy-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.copy-status {
  min-height: 1em;
  color: var(--green);
  font-size: var(--fs-2xs);
  line-height: 1.4;
}

.copy-help {
  margin: 0;
  color: var(--muted);
  font-size: var(--fs-2xs);
  line-height: 1.45;
}

.member-finance-copy {
  display: grid;
  gap: 3px;
  margin: 0 0 10px;
}

.member-finance-copy[hidden] {
  display: none;
}

.export-preview-actions-head {
  width: 1%;
}

.export-preview-table td.export-preview-actions-cell {
  max-width: none;
  overflow: visible;
}

.export-preview-row-actions {
  display: flex;
  gap: 4px;
  white-space: nowrap;
}

.export-preview-row-copy {
  padding: 1px 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font: inherit;
  font-size: var(--fs-2xs);
  cursor: pointer;
}

.export-preview-row-copy:hover:not(:disabled),
.export-preview-row-copy:focus-visible:not(:disabled) {
  border-color: var(--line-strong);
  color: var(--ink);
}

.export-preview-row-copy:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.export-preview-scope,
.export-preview-datasets,
.export-preview-columns,
.export-preview-samples {
  display: grid;
  gap: 6px;
}

.export-preview-scope:empty,
.export-preview-datasets:empty,
.export-preview-columns:empty,
.export-preview-samples:empty {
  display: none;
}

.export-preview-subhead {
  margin: 0;
  color: var(--ink-soft);
  font-size: var(--fs-2xs);
  font-weight: 600;
  line-height: 1.45;
}

.export-preview-scope-list {
  display: grid;
  gap: 4px;
  margin: 0;
}

.export-preview-scope-row {
  display: grid;
  grid-template-columns: 118px minmax(0, 1fr);
  gap: 8px;
  font-size: var(--fs-2xs);
  line-height: 1.5;
}

.export-preview-scope-row dt {
  margin: 0;
  color: var(--muted);
  font-weight: 600;
}

.export-preview-scope-row dd {
  margin: 0;
  color: var(--text);
  overflow-wrap: anywhere;
}

.export-preview-scope-row dd.is-error {
  color: var(--error);
}

.export-preview-dataset-list {
  display: grid;
  gap: 4px;
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  font-size: var(--fs-2xs);
  line-height: 1.5;
}

.export-preview-dataset-list li {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 2px 10px;
}

.export-preview-dataset-label {
  color: var(--ink-soft);
}

.export-preview-dataset-count {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.export-preview-column-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 6px;
}

.export-preview-column {
  padding: 1px 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--ink-soft);
  font-family: var(--mono);
  font-size: 0.7rem;
}

.export-preview-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.export-preview-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--fs-2xs);
}

.export-preview-table th,
.export-preview-table td {
  padding: 5px 8px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  white-space: nowrap;
}

.export-preview-table th {
  background: var(--surface);
  color: var(--ink);
  font-weight: 600;
}

.export-preview-table td {
  max-width: 220px;
  overflow: hidden;
  color: var(--muted);
  text-overflow: ellipsis;
}

.export-preview-table tr:last-child td {
  border-bottom: 0;
}

.export-preview-empty {
  color: var(--muted-soft);
}

.export-order-datasets {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-soft);
}

.export-order-datasets legend {
  padding: 0 4px;
  color: var(--ink);
  font-family: var(--serif);
  font-size: var(--fs-sm);
}

.export-order-hint {
  margin: 0;
  color: var(--muted);
  font-size: var(--fs-2xs);
  line-height: 1.55;
}

.export-order-hint code {
  color: var(--ink-soft);
  font-family: var(--mono);
  font-size: 0.95em;
}

.export-order-dataset-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px 14px;
}

.export-order-panel {
  display: grid;
  gap: 8px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: 10px;
  background: var(--surface);
}

.export-order-panel[hidden] {
  display: none;
}

.export-order-panel h3 {
  margin: 0;
  color: var(--ink);
  font-family: var(--serif);
  font-size: var(--fs-sm);
}

.export-order-status {
  margin: 0;
  color: var(--muted);
  font-size: var(--fs-xs);
  line-height: 1.5;
}

.export-order-status.is-error {
  color: var(--error);
}

.export-order-detail {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: var(--fs-2xs);
  line-height: 1.55;
}

.export-order-detail ul {
  display: grid;
  gap: 3px;
  margin: 0;
  padding-left: 18px;
}

.export-order-detail code {
  color: var(--ink-soft);
  font-family: var(--mono);
  font-size: 0.95em;
}

.export-order-detail .is-error {
  color: var(--error);
}

.export-order-download {
  justify-self: start;
}

.export-order-download[hidden] {
  display: none;
}

@media (max-width: 560px) {
  .export-modal {
    width: calc(100% - 20px);
  }

  .export-grid {
    grid-template-columns: 1fr;
  }

  .export-preview-scope-row {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .export-preview-dataset-list li {
    display: grid;
  }

  .export-order-dataset-grid {
    grid-template-columns: 1fr;
  }
}

/* Suggest a format or feature dialog */

.request-modal {
  width: min(560px, calc(100% - 32px));
}

.request-form {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

.request-body {
  display: grid;
  gap: 16px;
  min-height: 0;
}

.request-body textarea {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  min-height: 112px;
  padding: 9px 11px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: var(--fs-sm);
  line-height: 1.5;
  resize: vertical;
}

.request-body textarea:focus-visible {
  border-color: var(--blue);
  outline: none;
  box-shadow: var(--focus);
}

.request-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.request-limit-note {
  color: var(--muted-soft);
  font-size: var(--fs-2xs);
  line-height: 1.45;
}

.request-status {
  min-height: 1.2em;
  margin: 0;
  color: var(--muted);
  font-size: var(--fs-xs);
  line-height: 1.5;
}

.request-status[data-state="success"] {
  color: var(--green);
}

.request-status[data-state="error"] {
  color: var(--error);
}

.request-honeypot {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

@media (max-width: 560px) {
  .request-modal {
    width: calc(100% - 20px);
  }
}

.finance-score-note {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: var(--fs-2xs);
  line-height: 1.5;
}

@media (max-width: 560px) {
  .disclaimer-modal {
    width: calc(100% - 20px);
    max-height: 88dvh;
  }

  .disclaimer-modal-head,
  .disclaimer-modal-body {
    padding-inline: 20px;
  }

  .footer-link {
    display: inline-block;
    margin-left: 0;
  }
}

.noscript-note {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 100;
  max-width: 360px;
  padding: 12px 16px;
  border: 1px solid #e7bdb6;
  border-radius: var(--radius);
  background: var(--error-soft);
  color: var(--error);
  font-size: var(--fs-xs);
  box-shadow: var(--shadow-card);
}

/* --------------------------------------------------------------------------
   PAC cards and donor alignment
   -------------------------------------------------------------------------- */

.chip--pac {
  background: var(--blue-soft);
  color: var(--blue);
}

.drawer-head-actions {
  display: flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  min-width: 0;
}

.finance-table-row--clickable {
  cursor: pointer;
}

.finance-table-row--clickable:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: -2px;
  background: var(--blue-soft);
}

.finance-donor-item--clickable {
  cursor: pointer;
  transition: border-color 140ms ease, box-shadow 140ms ease, background-color 140ms ease;
}

.finance-donor-item--clickable:hover {
  border-color: var(--line-strong);
  background: var(--surface);
  box-shadow: var(--shadow-card);
}

.finance-donor-item--clickable:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}

.finance-donor-alignment {
  flex: 1 1 100%;
  color: var(--muted);
  font-size: var(--fs-2xs);
  line-height: 1.45;
}

.finance-score-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.finance-alignment-card {
  padding: 16px 16px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--green);
  border-radius: 12px;
  background: var(--surface);
}

.finance-alignment-card.is-empty {
  border-left-color: var(--line-strong);
  background: var(--surface-soft);
}

.finance-alignment-label {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: var(--fs-2xs);
  font-weight: 500;
}

.finance-alignment-value {
  margin: 2px 0 8px;
  color: var(--ink);
  font-family: var(--serif);
  font-size: var(--fs-3xl);
  font-variant-numeric: tabular-nums;
  line-height: 1.15;
}

.finance-alignment-overlap {
  margin: 8px 0 0;
  padding: 6px 8px;
  border-radius: 8px;
  background: var(--surface-soft);
  color: var(--ink);
  font-size: var(--fs-2xs);
  font-weight: 500;
  line-height: 1.45;
}

.finance-alignment-value--text {
  margin: 2px 0 8px;
  font-family: var(--sans);
  font-size: var(--fs-base);
  font-weight: 500;
  line-height: 1.35;
}

.finance-signal-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.finance-signal-block {
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.finance-signal-block:first-of-type {
  padding-top: 0;
  border-top: 0;
}

.finance-signal-source-name {
  margin: 2px 0 0;
  color: var(--ink);
  font-size: var(--fs-base);
  font-weight: 600;
  line-height: 1.35;
}

.finance-signal-source-amount {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: var(--fs-2xs);
  line-height: 1.45;
}

.finance-signal-source-list {
  display: grid;
  gap: 4px;
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
}

.finance-signal-source-item {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  font-size: var(--fs-2xs);
  line-height: 1.4;
}

.finance-signal-source-item-label {
  color: var(--muted);
  min-width: 0;
}

.finance-signal-source-item-value {
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.finance-signal-outside {
  margin: 0;
  padding: 8px 10px;
  border-radius: 8px;
  background: var(--surface-soft);
  color: var(--ink);
  font-size: var(--fs-2xs);
  line-height: 1.45;
}

.finance-signal-lobbying {
  padding-top: 12px;
}

.finance-signal-donor-breakdown {
  margin-top: 8px;
}

.finance-plain-summary {
  margin-top: 8px;
  padding: 16px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--blue);
  border-radius: 12px;
  background: var(--surface-soft);
}

.finance-plain-summary-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.finance-plain-summary-head .finance-score-kicker {
  margin: 0;
}

.finance-plain-summary-copy {
  margin: 8px 0 0;
  color: var(--ink);
  font-size: var(--fs-2xs);
  line-height: 1.58;
}

.pac-telemetry {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.pac-purpose-callout {
  padding: 16px 16px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--blue);
  border-radius: 10px;
  background: var(--surface-soft);
}

.pac-purpose-callout.is-conduit {
  border-left-color: var(--amber);
  background: var(--amber-soft);
}

.pac-purpose-title {
  margin: 0 0 4px;
  color: var(--ink);
  font-family: var(--serif);
  font-size: var(--fs-md);
  font-weight: 500;
  line-height: 1.3;
}

.pac-purpose-copy {
  margin: 0;
  color: var(--muted);
  font-size: var(--fs-2xs);
  line-height: 1.55;
}

.pac-purpose-subhead {
  margin: 12px 0 4px;
  color: var(--ink);
  font-size: var(--fs-2xs);
  font-weight: 500;
}

.pac-purpose-disclaimer {
  margin: 12px 0 0;
  color: var(--muted-soft);
  font-size: var(--fs-2xs);
  line-height: 1.45;
}

.pac-issue-areas {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  margin-top: 12px;
}

.pac-issue-areas-label {
  margin-right: 4px;
  color: var(--muted-soft);
  font-size: var(--fs-2xs);
  font-weight: 500;
}

.pac-bill-section + .pac-bill-section {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px dashed var(--line);
}

.pac-bill-section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.pac-bill-section-title {
  margin: 0;
  color: var(--ink);
  font-family: var(--serif);
  font-size: var(--fs-base);
  font-weight: 500;
}

.pac-bill-section-count {
  color: var(--muted-soft);
  font-size: var(--fs-2xs);
  font-weight: 500;
}

.pac-bill-section-note {
  margin: 4px 0 8px;
  color: var(--muted);
  font-size: var(--fs-2xs);
  line-height: 1.45;
}

.pac-bill-row--policy {
  border-left-color: var(--amber);
}

.pac-bill-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 2px;
}

.pac-bill-match {
  overflow-wrap: anywhere;
  color: var(--muted);
  font-size: var(--fs-2xs);
  line-height: 1.35;
}

.pac-bill-badge {
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--paper-deep);
  color: var(--muted);
  font-size: var(--fs-2xs);
  font-weight: 500;
  line-height: 1.3;
  text-align: right;
  white-space: normal;
}

.pac-bill-badge--direct {
  background: var(--blue-soft);
  color: var(--blue);
}

.pac-bill-badge--policy {
  background: var(--amber-soft);
  color: var(--amber);
}

.pac-bill-list,
.pac-recipient-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.pac-bill-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--blue);
  border-radius: 9px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  text-align: left;
  transition: border-color 140ms ease, box-shadow 140ms ease;
}

.pac-bill-row:hover:not(:disabled) {
  border-color: var(--line-strong);
  box-shadow: var(--shadow-card);
}

.pac-bill-row:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}

.pac-bill-row:disabled {
  cursor: default;
  opacity: 0.7;
}

.pac-bill-number {
  color: var(--ink);
  font-family: var(--mono);
  font-size: var(--fs-2xs);
  font-weight: 500;
  white-space: nowrap;
}

.pac-bill-title {
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: var(--fs-2xs);
  line-height: 1.4;
}

.pac-recipient-row {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  text-align: left;
  transition: border-color 140ms ease, box-shadow 140ms ease;
}

.pac-recipient-row:hover:not(:disabled) {
  border-color: var(--line-strong);
  box-shadow: var(--shadow-card);
}

.pac-recipient-row:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}

.pac-recipient-row:disabled {
  cursor: default;
  opacity: 0.65;
}

.pac-recipient-avatar {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--paper-deep);
  color: var(--ink);
  font-size: var(--fs-2xs);
  font-weight: 500;
}

.pac-recipient-avatar--d {
  background: var(--blue-soft);
  color: var(--blue);
}

.pac-recipient-avatar--r {
  background: var(--accent-soft);
  color: var(--accent-dark);
}

.pac-recipient-avatar--i {
  background: var(--amber-soft);
  color: var(--amber);
}

.pac-recipient-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.pac-recipient-name {
  color: var(--ink);
  font-size: var(--fs-xs);
  font-weight: 500;
  line-height: 1.35;
}

.pac-recipient-meta,
.pac-recipient-alignment {
  color: var(--muted);
  font-size: var(--fs-2xs);
  line-height: 1.4;
}

.pac-recipient-alignment {
  color: var(--muted-soft);
}

.pac-recipient-numbers {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  text-align: right;
}

.pac-recipient-amount {
  color: var(--accent-dark);
  font-family: var(--mono);
  font-size: var(--fs-2xs);
  font-variant-numeric: tabular-nums;
}

.pac-recipient-score {
  color: var(--muted-soft);
  font-size: var(--fs-2xs);
  white-space: nowrap;
}

.pac-recipient-pin {
  color: var(--blue);
  font-size: var(--fs-2xs);
  font-weight: 500;
  line-height: 1.35;
}

.pac-recipient-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0 0 6px;
}

.pac-recipient-filter {
  flex: 1 1 220px;
  min-width: 0;
  padding: 9px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: var(--fs-2xs);
}

.pac-recipient-filter:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}

.pac-recipient-filter-status {
  flex: 1 1 100%;
  color: var(--muted);
  font-size: var(--fs-2xs);
  line-height: 1.4;
}

.pac-recipient-filter-help {
  margin: 0 0 8px;
  color: var(--muted-soft);
  font-size: var(--fs-2xs);
  line-height: 1.45;
}

.pac-recipient-pin-note {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: var(--fs-2xs);
  line-height: 1.45;
}

.pac-global-search-row {
  margin: 0 0 10px;
}

.pac-global-search-link {
  color: var(--blue);
  font-size: var(--fs-2xs);
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.pac-global-search-link:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
  border-radius: 4px;
}

.member-pac-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0 0 6px;
}

.finance-donors .member-pac-tools {
  margin: 2px 0 6px;
}

.member-pac-filter {
  flex: 1 1 220px;
  min-width: 0;
  padding: 9px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: var(--fs-2xs);
}

.member-pac-filter:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}

.member-pac-filter-status {
  flex: 1 1 100%;
  color: var(--muted);
  font-size: var(--fs-2xs);
  line-height: 1.4;
}

.member-pac-filter-help {
  margin: 0 0 8px;
  color: var(--muted-soft);
  font-size: var(--fs-2xs);
  line-height: 1.45;
}

.finance-donor-link-hint {
  color: var(--blue);
  font-size: var(--fs-2xs);
  font-weight: 500;
  line-height: 1.35;
}

.pac-relationship {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.pac-relationship-context-copy {
  margin: 0;
  color: var(--muted);
  font-size: var(--fs-2xs);
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.pac-relationship-status {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.pac-relationship-metrics {
  margin: 0;
}

.pac-relationship-missing {
  margin: 0;
  padding: 8px 10px;
  border-left: 3px solid var(--amber);
  background: var(--amber-soft);
  color: var(--muted);
  font-size: var(--fs-2xs);
  line-height: 1.45;
}

.pac-relationship-overlaps,
.pac-relationship-votes {
  padding-top: 4px;
}

.pac-relationship-overlap-list,
.pac-relationship-vote-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.pac-relationship-overlap-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 10px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface-soft);
}

.pac-relationship-overlap-issue {
  color: var(--ink);
  font-size: var(--fs-xs);
  font-weight: 500;
}

.pac-relationship-overlap-committee {
  color: var(--ink-soft);
  font-size: var(--fs-2xs);
}

.pac-relationship-overlap-basis {
  flex: 1 1 100%;
  color: var(--muted-soft);
  font-size: var(--fs-2xs);
  line-height: 1.4;
}

.pac-relationship-vote-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px 12px;
  width: 100%;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface-soft);
  color: inherit;
  font: inherit;
  text-align: left;
}

button.pac-relationship-vote-row {
  cursor: pointer;
}

button.pac-relationship-vote-row:hover {
  border-color: var(--line-strong);
  background: var(--surface);
}

button.pac-relationship-vote-row:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}

.pac-relationship-vote-row--static {
  cursor: default;
}

.pac-relationship-vote-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1 1 220px;
  min-width: 0;
}

.pac-relationship-vote-title {
  color: var(--ink);
  font-size: var(--fs-xs);
  font-weight: 500;
  line-height: 1.35;
}

.pac-relationship-vote-meta,
.pac-relationship-vote-framing {
  color: var(--muted);
  font-size: var(--fs-2xs);
  line-height: 1.4;
}

.pac-relationship-vote-framing {
  color: var(--muted-soft);
}

.pac-relationship-vote-position {
  color: var(--ink-soft);
  font-size: var(--fs-2xs);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.pac-relationship-member-link {
  align-self: flex-start;
}

.pac-scroll--votes {
  max-height: 260px;
}

.pac-scroll--overlaps {
  max-height: 220px;
}

.pac-scroll {
  max-height: 320px;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: 6px;
  border-radius: 10px;
  scrollbar-color: var(--line-strong) transparent;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}

.pac-scroll:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}

.pac-scroll-more {
  margin: 10px 0 2px;
  padding: 0;
}

.pac-scroll--bills {
  max-height: 300px;
}

.pac-scroll--recipients {
  max-height: 380px;
}

.pac-scroll--related {
  max-height: 260px;
}

.pac-related-block + .pac-related-block {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px dashed var(--line);
}

.pac-related-block-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.pac-related-block-title {
  margin: 0;
  color: var(--ink);
  font-family: var(--serif);
  font-size: var(--fs-base);
  font-weight: 500;
}

.pac-status-badge {
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--paper-deep);
  color: var(--muted);
  font-size: var(--fs-2xs);
  font-weight: 500;
  line-height: 1.3;
  text-align: right;
  white-space: normal;
}

.pac-status-badge--complete {
  background: var(--blue-soft);
  color: var(--blue);
}

.pac-status-badge--partial {
  background: var(--amber-soft);
  color: var(--amber);
}

.pac-status-badge--unavailable {
  background: var(--paper-deep);
  color: var(--muted);
}

.pac-related-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 8px 0;
}

.pac-related-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.pac-related-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  text-align: left;
}

button.pac-related-row {
  cursor: pointer;
}

button.pac-related-row:hover {
  border-color: var(--line-strong);
  box-shadow: var(--shadow-card);
}

button.pac-related-row:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}

.pac-related-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 2px;
}

.pac-related-name {
  overflow-wrap: anywhere;
  color: var(--ink);
  font-size: var(--fs-2xs);
  font-weight: 500;
  line-height: 1.35;
}

.pac-related-meta {
  overflow-wrap: anywhere;
  color: var(--muted);
  font-size: var(--fs-2xs);
  line-height: 1.4;
}

.pac-related-badge {
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--paper-deep);
  color: var(--muted);
  font-size: var(--fs-2xs);
  font-weight: 500;
  line-height: 1.3;
  text-align: right;
  white-space: normal;
}

.pac-related-note {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: var(--fs-2xs);
  line-height: 1.45;
}

.pac-provenance {
  margin: 10px 0 0;
  padding-top: 10px;
  border-top: 1px dashed var(--line);
  color: var(--muted);
  font-size: var(--fs-2xs);
  line-height: 1.45;
}

.pac-provenance-flags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 6px;
}

.pac-provenance-flag {
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--paper-deep);
  color: var(--muted);
  font-size: var(--fs-2xs);
  font-weight: 500;
}

.pac-provenance-flag.is-complete {
  background: var(--blue-soft);
  color: var(--blue);
}

.pac-provenance-flag.is-partial {
  background: var(--amber-soft);
  color: var(--amber);
}

.pac-provenance-copy {
  margin: 0 0 4px;
}

.source-chip--pac {
  border-color: rgba(126, 173, 224, 0.5);
  color: #dcecff;
}

.source-chip--pac:hover {
  border-color: rgba(126, 173, 224, 0.85);
  background: rgba(126, 173, 224, 0.16);
}

@media (max-width: 1080px) {
  .pac-telemetry {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .drawer-head-actions {
    flex-wrap: wrap;
    justify-content: flex-end;
  }

  .finance-score-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .pac-bill-row {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .pac-bill-number {
    grid-column: 1 / -1;
  }

  .pac-recipient-row {
    grid-template-columns: 32px minmax(0, 1fr);
  }

  .pac-recipient-avatar {
    width: 32px;
    height: 32px;
  }

  .pac-recipient-numbers {
    grid-column: 2;
    align-items: flex-start;
    text-align: left;
  }

  .pac-related-metrics {
    grid-template-columns: minmax(0, 1fr);
  }

  .pac-scroll {
    max-height: 280px;
  }

  .pac-scroll--recipients {
    max-height: 320px;
  }
}

@media (max-width: 560px) {
  .pac-telemetry {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 1080px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 20px;
    padding-block: 32px 24px;
  }

  .hero-note {
    max-width: 520px;
    padding: 16px;
  }

  .workspace {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  :root {
    --shell: calc(100% - 28px);
    --launcher-reserve: 72px;
  }

  .header-inner {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    padding-block: 16px;
  }

  .header-status {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  .header-congress {
    align-items: stretch;
    justify-content: space-between;
    width: 100%;
  }

  .congress-picker {
    flex: 1 1 auto;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    min-width: 0;
  }

  .congress-picker select,
  .congress-picker--light select {
    width: 100%;
    max-width: none;
  }

  .congress-strip {
    align-items: center;
  }

  .status-stats {
    align-self: stretch;
  }

  .status-stat {
    flex: 1 1 0;
    min-width: 0;
    padding-inline: 12px;
  }

  .status-stat--wide {
    min-width: 0;
    flex-grow: 1.35;
  }

  .hero h1 {
    max-width: 100%;
  }

  .primary-tabs {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: 100%;
  }

  .primary-tab {
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    min-width: 0;
    min-height: 52px;
    padding: 10px 12px;
  }

  .primary-tab-label {
    font-size: var(--fs-md);
  }

  .panel-head {
    padding: 24px 20px 0;
  }

  .results-wrap {
    padding: 0 20px 24px;
  }

  .assistant {
    right: 12px;
    left: 12px;
    bottom: 12px;
    width: auto;
    height: min(86dvh, 720px);
  }

  /* Below 760px the launcher becomes an icon-only 56px circle. The visible
     label is removed but app.js keeps an aria-label with the current context,
     so the control still has a full accessible name. */
  .assistant-launcher {
    right: 12px;
    bottom: 12px;
    justify-content: center;
    gap: 0;
    width: 56px;
    min-width: 56px;
    height: 56px;
    min-height: 56px;
    padding: 0;
    border-radius: 50%;
  }

  .assistant-launcher-copy,
  .assistant-launcher-icon {
    display: none;
  }

  .assistant-launcher-avatar {
    width: 42px;
    height: 42px;
  }

  /* The assistant behaves like a modal sheet at this width, so its close and
     send controls must meet the 44px touch-target minimum. */
  .assistant-minimize {
    width: 44px;
    height: 44px;
  }

  .chat-actions .button {
    min-height: 44px;
  }

  .model-picker select {
    min-height: 44px;
  }

  .assistant-head {
    flex-wrap: wrap;
    padding: 20px 20px 16px;
  }

  .assistant-head-actions {
    width: 100%;
  }

  .model-picker {
    flex: 1 1 auto;
    width: auto;
  }

  .chat-log {
    padding-inline: 16px;
  }

  .chat-form {
    padding-inline: 16px;
  }

  .drawer-head,
  .drawer-scroll,
  .drawer-foot {
    padding-inline: 20px;
  }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .footer-note {
    text-align: left;
  }
}

@media (max-width: 768px) {
  .assistant {
    height: min(86dvh, 700px);
    min-height: 0;
  }

  .chat-log {
    flex: 1 1 auto;
    height: auto;
    min-height: 0;
  }

  .assistant-head {
    flex-wrap: wrap;
  }

  .disclaimer-modal-head {
    flex-wrap: wrap;
    gap: 12px;
  }

  .disclaimer-modal-head .button {
    flex: 0 0 auto;
  }

  .export-field select,
  .export-field input {
    min-height: 44px;
    font-size: 16px;
  }

  .export-actions {
    gap: 8px;
  }

  .finance-table {
    min-width: 440px;
  }

  .finance-table th,
  .finance-table td {
    padding: 8px 9px;
  }

  .finance-table-wrap {
    -webkit-overflow-scrolling: touch;
    scrollbar-gutter: stable;
  }

  .finance-member-row {
    padding: 10px 12px;
  }

  .finance-member-figures {
    column-gap: 8px;
  }

  .member-name-results {
    max-height: min(56vh, 420px);
  }

  .search-all-group-items {
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  }

  .search-all-filters {
    gap: 5px;
  }

  .search-all-filter {
    min-height: 32px;
    padding: 5px 9px;
  }

  .result-scroll {
    max-height: clamp(300px, 62vh, 560px);
    margin: -2px -4px -2px -2px;
    padding: 2px 4px 2px 2px;
  }

  .result-scroll .record {
    padding: 12px 13px 11px;
  }

  .result-scroll .member-card {
    gap: 9px;
    padding: 9px 11px;
  }
}

@media (max-width: 560px) {
  .brand-mark {
    width: 44px;
    height: 44px;
  }

  .brand-mark svg {
    width: 28px;
    height: 28px;
  }

  .brand-subtitle {
    font-size: var(--fs-2xs);
  }

  .status-stat strong {
    font-size: var(--fs-base);
  }

  .status-stat span {
    font-size: var(--fs-2xs);
  }

  .primary-tabs {
    gap: 4px;
    padding: 4px;
  }

  .primary-tab {
    min-height: 52px;
    padding: 10px 12px;
  }

  .primary-tab {
    padding-inline: 8px;
  }

  .primary-tab-kicker {
    font-size: var(--fs-2xs);
    white-space: normal;
  }

  .primary-tab-label {
    font-size: var(--fs-md);
    /* Narrow phones use the short visible label ("Finance") so the tab strip
       stays one row. The full name remains in the desktop label and in the
       kicker. */
    white-space: normal;
    overflow-wrap: break-word;
  }

  .primary-tab-label-full {
    display: none;
  }

  .primary-tab-label-short {
    display: inline;
  }

  .panel-heading {
    flex-direction: column;
    gap: 8px;
  }

  .panel-badge {
    margin-top: 0;
  }

  .search-shell {
    flex-wrap: wrap;
    padding: 8px 8px 8px 12px;
  }

  .search-shell input {
    flex-basis: calc(100% - 35px);
  }

  .search-shell .button {
    width: 100%;
    min-height: 44px;
  }

  .filter-tab {
    padding-inline: 10px;
  }

  .congress-strip {
    flex-wrap: wrap;
  }

  .member-filter-bar {
    align-items: flex-start;
  }

  .member-filter-count {
    flex-basis: 100%;
    margin-left: 0;
  }

  .member-state-control {
    flex: 1 1 auto;
  }

  .member-state-control select {
    flex: 1 1 auto;
    max-width: none;
  }

  .record {
    padding: 16px 16px 12px;
  }

  .record-links {
    width: 100%;
    margin-left: 0;
  }

  .assistant {
    right: 8px;
    left: 8px;
    bottom: 8px;
    height: min(88dvh, 680px);
    min-height: 0;
  }

  .assistant-launcher {
    right: 10px;
    bottom: 10px;
  }

  .chat-log {
    flex: 1 1 auto;
    height: auto;
    min-height: 0;
  }

  .assistant-head {
    padding-inline: 16px;
  }

  .assistant-title {
    gap: 8px;
  }

  .chat-actions {
    align-items: flex-end;
  }

  .drawer-head {
    padding-block: 20px 16px;
  }

  .drawer-scroll {
    padding-block: 16px 24px;
  }

  .bill-text {
    max-height: none;
  }

  .drawer-foot {
    flex-direction: column-reverse;
    align-items: stretch;
  }

  .drawer-foot .button {
    width: 100%;
  }
}

@media (max-width: 1080px) {
  .finance-metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .finance-columns {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 1080px) {
  .finance-metrics.stock-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .finance-body {
    padding: 20px 20px 24px;
  }

  .finance-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .finance-subpanel {
    padding: 16px;
  }

  .finance-columns > .finance-subpanel {
    padding: 16px;
  }

  .stock-table {
    min-width: 0;
  }

  .stock-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
  }

  .stock-table thead th {
    position: static;
    box-shadow: none;
  }

  .stock-table th:nth-child(5),
  .stock-table td:nth-child(5) {
    min-width: 0;
    white-space: normal;
  }

  .stock-table,
  .stock-table tbody,
  .stock-table tr,
  .stock-table td {
    display: block;
    width: 100%;
  }

  .stock-table tbody tr {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px 12px;
    padding: 12px;
    border-bottom: 1px solid var(--line-soft);
  }

  .stock-table tbody tr:last-child {
    border-bottom: 0;
  }

  .stock-table th,
  .stock-table td {
    padding: 0;
    border: 0;
  }

  .stock-date-cell {
    grid-column: 1;
  }

  .stock-type-cell {
    grid-column: 2;
    justify-self: end;
  }

  .stock-member-cell,
  .stock-asset-cell,
  .stock-amount-cell {
    grid-column: 1 / -1;
  }

  .stock-filed-cell {
    grid-column: 1;
  }

  .stock-source-cell {
    grid-column: 2;
    justify-self: end;
  }

  .stock-amount,
  .stock-filed {
    white-space: normal;
  }
}

@media (max-width: 560px) {
  .finance-panel,
  .stock-panel {
    margin-bottom: 36px;
  }

  .finance-metrics,
  .finance-metrics.stock-metrics {
    grid-template-columns: minmax(0, 1fr);
  }

  .finance-member-row {
    grid-template-columns: 32px minmax(0, 1fr);
  }

  .finance-member-avatar {
    width: 32px;
    height: 32px;
  }

  .finance-member-score {
    grid-column: 2;
    justify-content: flex-start;
    text-align: left;
  }

  .finance-breakdown {
    grid-template-columns: minmax(0, 1fr);
  }

  .finance-outside-metrics,
  .finance-geography-metrics,
  .finance-itemized-split,
  .finance-itemized-passthrough {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 480px) {
  /* Give the sync timestamp a full row instead of squeezing it into a third
     of the header, where the full time was being ellipsized. */
  .status-stats {
    flex-wrap: wrap;
  }

  .status-stat--wide {
    flex: 1 1 100%;
    margin-top: 4px;
    padding-top: 6px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    border-right: 0;
  }

  .status-stat--wide strong {
    white-space: normal;
  }

  .disclaimer-modal {
    width: calc(100% - 16px);
    max-height: 92dvh;
  }

  .disclaimer-modal-head {
    gap: 10px;
    padding: 18px 16px 12px;
  }

  .disclaimer-modal-head h2 {
    font-size: var(--fs-xl);
  }

  .disclaimer-modal-body {
    padding: 16px 16px 22px;
  }

  .disclaimer-lede {
    margin-bottom: 16px;
  }

  .export-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }

  .export-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .export-actions .button {
    width: 100%;
  }

  .export-check {
    font-size: var(--fs-2xs);
  }

  .member-name-form .zip-lookup-shell {
    flex-wrap: wrap;
    padding: 8px;
  }

  .member-name-form .zip-lookup-shell input {
    flex-basis: 100%;
    padding-inline: 4px;
  }

  .member-name-form .zip-lookup-shell .button {
    width: 100%;
  }

  .member-name-results {
    grid-template-columns: minmax(0, 1fr);
    max-height: 52vh;
  }

  .search-all-group-items {
    grid-template-columns: minmax(0, 1fr);
  }

  .search-all-filter {
    flex: 1 1 auto;
    justify-content: space-between;
  }

  .finance-subpanel {
    padding: 12px;
  }

  .finance-columns > .finance-subpanel {
    padding: 12px;
  }

  .finance-table tbody tr {
    gap: 6px 8px;
    padding: 10px 8px;
  }

  .finance-member-row {
    grid-template-columns: 32px minmax(0, 1fr);
    gap: 10px;
    padding: 9px 11px;
  }

  .finance-member-figures {
    column-gap: 8px;
  }

  .chat-actions {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  .chat-actions .button {
    width: 100%;
  }

  .chat-hint {
    font-size: var(--fs-2xs);
  }

  .result-scroll {
    max-height: 64vh;
    margin-inline: 0;
    padding-inline: 0;
  }

  .result-scroll .member-avatar {
    width: 32px;
    height: 32px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ---------------------------------------------------------------
   PAC -> LDA -> bill -> vote cross-reference surfaces
   --------------------------------------------------------------- */

.bill-lobbying {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.bill-funding-tier {
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--blue);
  border-radius: 10px;
  background: var(--surface-soft);
}

.bill-funding-tier--secondary {
  border-left-color: var(--amber);
  background: var(--amber-soft);
}

.bill-funding-tier-title {
  margin: 0 0 4px;
  color: var(--ink);
  font-family: var(--serif);
  font-size: var(--fs-base);
  font-weight: 500;
}

.bill-funding-tier-note {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: var(--fs-2xs);
  line-height: 1.5;
}

.bill-funding-vote {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed var(--line);
}

.bill-funding-vote:first-of-type {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.bill-funding-vote-head {
  color: var(--ink);
  font-size: var(--fs-2xs);
  font-weight: 500;
  line-height: 1.4;
}

.bill-funding-vote-result {
  margin: 2px 0 8px;
  color: var(--muted);
  font-size: var(--fs-2xs);
}

.bill-funding-split-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.bill-funding-split {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 8px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.bill-funding-split.is-total {
  margin-top: 10px;
  background: var(--blue-soft);
  border-color: transparent;
}

.bill-funding-split.is-secondary {
  background: var(--surface);
  border-color: var(--amber);
}

.bill-funding-split-label {
  flex-basis: 100%;
  color: var(--muted);
  font-size: var(--fs-2xs);
  font-weight: 500;
}

.bill-funding-split-amount {
  color: var(--ink);
  font-family: var(--mono);
  font-size: var(--fs-xs);
}

.bill-funding-split-count {
  color: var(--muted);
  font-size: var(--fs-2xs);
}

.bill-funding-split-divider {
  color: var(--muted-soft);
  font-size: var(--fs-2xs);
}

.bill-funding-split-other {
  flex-basis: 100%;
  color: var(--muted-soft);
  font-size: var(--fs-2xs);
}

.bill-funding-committee-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 8px;
}

.bill-funding-committee-chip {
  max-width: 100%;
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  font-size: var(--fs-2xs);
  font-weight: 500;
  text-align: left;
}

.bill-funding-committee-chip:hover {
  border-color: var(--blue);
}

.bill-lobbying-org-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.bill-lobbying-org {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface);
}

.bill-lobbying-org-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.bill-lobbying-org-name {
  color: var(--ink);
  font-size: var(--fs-2xs);
  font-weight: 500;
}

.bill-lobbying-org-split {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: var(--fs-2xs);
}

.bill-lobbying-activity-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.bill-lobbying-activity-item > a {
  align-self: flex-start;
  font-size: var(--fs-2xs);
}

.bill-lobbying-activity-meta {
  margin: 0;
  color: var(--muted);
  font-size: var(--fs-2xs);
  line-height: 1.5;
}

.bill-stance-badge {
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--paper-deep);
  color: var(--muted);
  font-size: var(--fs-2xs);
  font-weight: 500;
}

.bill-stance-badge--support {
  background: var(--blue-soft);
  color: var(--blue);
}

.bill-stance-badge--oppose {
  background: var(--amber-soft);
  color: var(--amber);
}

.bill-lobbying-snippet {
  margin: 8px 0 0;
  padding: 8px 8px;
  border-left: 3px solid var(--line-strong);
  background: var(--surface-soft);
  color: var(--muted);
  font-size: var(--fs-2xs);
  line-height: 1.45;
}

.bill-lobbying-filing-links {
  margin-top: 8px;
  font-size: var(--fs-2xs);
}

.pac-lda-client-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  margin-bottom: 8px;
}

.pac-lda-client-label {
  margin-right: 4px;
  color: var(--muted-soft);
  font-size: var(--fs-2xs);
  font-weight: 500;
}

.pac-lda-client-empty {
  margin: 0 0 8px;
  color: var(--muted-soft);
  font-size: var(--fs-2xs);
}

.pac-lda-client-chip {
  border: 1px solid transparent;
  cursor: pointer;
  font: inherit;
  font-size: var(--fs-2xs);
  text-align: left;
  white-space: normal;
}

.pac-lda-client-chip:hover {
  border-color: var(--line-strong);
  background: var(--surface-soft);
  color: var(--ink);
}

.pac-lda-client-chip:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}

.pac-lda-client-chip.is-unlinked {
  cursor: default;
  color: var(--muted-soft);
}

.pac-lda-client-chip.is-unlinked:hover {
  border-color: transparent;
  background: var(--paper-deep);
  color: var(--muted-soft);
}

.pac-lda-client-note {
  margin: 8px 0 0;
  color: var(--muted-soft);
  font-size: var(--fs-2xs);
  line-height: 1.45;
}

.company-cell-muted {
  color: var(--muted-soft);
  font-size: var(--fs-2xs);
}

.company-issue-chips {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px;
}

.company-top-issues,
.company-top-agencies {
  margin: 4px 0 12px;
}

.company-top-issues .section-note,
.company-top-agencies .section-note {
  margin: 0 0 6px;
}

.company-top-agencies .finance-metrics {
  margin: 0;
}

.company-coverage-note {
  margin: 8px 0;
  color: var(--muted);
  font-size: var(--fs-2xs);
  line-height: 1.5;
}

.company-filing-link {
  white-space: nowrap;
}

.company-profile-link {
  text-align: left;
}

.pac-bill-snippet {
  display: block;
  margin-top: 4px;
  color: var(--muted-soft);
  font-size: var(--fs-2xs);
  line-height: 1.4;
}

.finance-table-tier-title {
  margin: 12px 0 2px;
  color: var(--ink);
  font-family: var(--serif);
  font-size: var(--fs-sm);
  font-weight: 500;
}

.finance-table-tier-title:first-child {
  margin-top: 0;
}

/* The tier title and its "not PAC money" badge share one baseline so the
   forwarding caveat travels with the platform table at every width. */
.finance-table-tier-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 10px;
  margin: 12px 0 2px;
}

.finance-table-tier-head:first-child {
  margin-top: 0;
}

.finance-table-tier-head .finance-table-tier-title {
  margin: 0;
}

.finance-tier-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 9px;
  border: 1px solid var(--teal-line);
  border-radius: 999px;
  background: var(--teal-soft);
  color: var(--teal);
  font-size: var(--fs-2xs);
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: 0.01em;
}

.finance-tier-badge::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.finance-table-tier-note {
  margin: 0 0 8px;
  color: var(--muted-soft);
  font-size: var(--fs-2xs);
  line-height: 1.4;
}

/* Fundraising-platform rows are a memo view, not a second PAC tier. A distinct
   teal surface and border keep them from merging with the PAC table when the
   figures differ by an order of magnitude. */
.finance-table-block--conduit .finance-table-wrap {
  border-color: var(--teal-line);
  background: var(--teal-soft);
  box-shadow: inset 3px 0 0 var(--teal);
}

.finance-committee-table--conduit thead th {
  background: #dceced;
  color: var(--teal);
}

.finance-committee-table--conduit tbody tr {
  background: var(--teal-soft);
}

.finance-committee-table--conduit tbody tr:hover {
  background: #dceced;
}

.finance-table-block--conduit .finance-mobile-sort {
  border-color: var(--teal-line);
  background: var(--teal-soft);
  box-shadow: inset 3px 0 0 var(--teal), var(--shadow-card);
}

.finance-donor-alignment-heading {
  margin: 12px 0 4px;
  color: var(--ink);
  font-size: var(--fs-2xs);
  font-weight: 500;
}

.finance-donor-alignment-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.finance-donor-alignment-item {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px;
  padding: 4px 0;
  border-top: 1px dashed var(--line);
  font-size: var(--fs-2xs);
}

.finance-donor-alignment-name {
  min-width: 0;
  overflow-wrap: anywhere;
  color: var(--muted);
}

.finance-donor-alignment-value {
  color: var(--ink);
  font-weight: 500;
  white-space: nowrap;
}

/* --------------------------------------------------------------------------
   Voter-facing Rep Card and Scoreboard refinements
   -------------------------------------------------------------------------- */

.finance-method {
  margin-top: 8px;
  border-top: 1px dashed var(--line);
  padding-top: 8px;
}

.finance-method-summary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--blue);
  cursor: pointer;
  font-size: var(--fs-2xs);
  font-weight: 500;
  line-height: 1.4;
  list-style: none;
}

.finance-method-summary::-webkit-details-marker {
  display: none;
}

.finance-method-summary:hover {
  color: var(--accent-dark);
  text-decoration: underline;
}

.finance-method-icon {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
}

.finance-method-copy {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: var(--fs-2xs);
  line-height: 1.5;
}

.finance-method .finance-conduit-caveat {
  margin-top: 8px;
}

.finance-score-card .finance-method {
  margin-top: 12px;
}

.finance-method--compact {
  margin-top: 8px;
  padding-top: 8px;
}

.finance-method--compact .finance-method-summary {
  gap: 8px;
  color: var(--muted);
}

.finance-method--compact .finance-method-copy {
  margin-top: 8px;
}

.finance-pac-split {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px dashed var(--line);
}

.finance-pac-split-title {
  margin: 0 0 8px;
  color: var(--muted-soft);
  font-size: var(--fs-2xs);
  font-weight: 500;
}

.finance-pac-split-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.finance-pac-split-item {
  min-width: 0;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--blue);
  border-radius: 9px;
  background: var(--surface-soft);
}

.finance-pac-split-item.is-labor {
  border-left-color: var(--green);
}

.finance-pac-split-label {
  display: block;
  color: var(--muted);
  font-size: var(--fs-2xs);
  font-weight: 500;
  line-height: 1.35;
}

.finance-pac-split-value {
  display: block;
  margin-top: 2px;
  overflow-wrap: anywhere;
  color: var(--ink);
  font-family: var(--mono);
  font-size: var(--fs-sm);
  font-variant-numeric: tabular-nums;
}

.finance-pac-split-share {
  display: block;
  margin-top: 2px;
  color: var(--muted-soft);
  font-size: var(--fs-2xs);
  font-variant-numeric: tabular-nums;
}

.finance-pac-split-note {
  margin: 8px 0 0;
  color: var(--muted-soft);
  font-size: var(--fs-2xs);
  line-height: 1.45;
}

.finance-member-score-label {
  flex-basis: 100%;
  color: var(--muted-soft);
  font-size: var(--fs-2xs);
  font-weight: 500;
}

.money-mix {
  margin-bottom: 8px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}

.money-mix-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px 12px;
}

.money-mix-title {
  margin: 0;
  color: var(--ink);
  font-family: var(--serif);
  font-size: var(--fs-md);
  line-height: 1.3;
}

.money-mix-total {
  color: var(--muted);
  font-size: var(--fs-2xs);
  font-variant-numeric: tabular-nums;
  font-weight: 500;
}

.money-mix-bar {
  display: flex;
  width: 100%;
  height: 16px;
  overflow: hidden;
  margin-top: 12px;
  border-radius: 4px;
  background: var(--paper-deep);
}

.money-mix-segment {
  display: block;
  height: 100%;
  min-width: 2px;
}

.money-mix-segment + .money-mix-segment {
  border-left: 2px solid var(--surface);
}

.money-mix-segment--corporate {
  background: var(--blue);
}

.money-mix-segment--labor {
  background: var(--ink-soft);
}

.money-mix-segment--large {
  background: var(--muted);
}

.money-mix-segment--small {
  background: var(--slate);
}

.money-mix-segment--party {
  background: var(--ink);
}

.money-mix-segment--candidate {
  background: var(--muted-soft);
}

.money-mix-segment--transfer {
  background: var(--line-strong);
}

.money-mix-segment--loan {
  background: var(--slate);
}

.money-mix-segment--offset {
  background: var(--line-strong);
}

.money-mix-segment--other {
  background: var(--muted-soft);
}

.money-mix-legend {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(205px, 1fr));
  gap: 8px;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}

.money-mix-legend-item {
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr) auto;
  grid-template-rows: auto auto;
  gap: 4px 8px;
  align-items: center;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.money-mix-swatch {
  grid-row: 1 / 3;
  width: 12px;
  height: 12px;
  border-radius: 4px;
}

.money-mix-swatch--corporate {
  background: var(--blue);
}

.money-mix-swatch--labor {
  background: var(--ink-soft);
}

.money-mix-swatch--large {
  background: var(--muted);
}

.money-mix-swatch--small {
  background: var(--slate);
}

.money-mix-swatch--party {
  background: var(--ink);
}

.money-mix-swatch--candidate {
  background: var(--muted-soft);
}

.money-mix-swatch--transfer {
  background: var(--line-strong);
}

.money-mix-swatch--loan {
  background: var(--slate);
}

.money-mix-swatch--offset {
  background: var(--line-strong);
}

.money-mix-swatch--other {
  background: var(--muted-soft);
}

.money-mix-label {
  grid-column: 2;
  grid-row: 1 / 3;
  align-self: center;
  min-width: 0;
  color: var(--ink);
  font-size: var(--fs-2xs);
  font-weight: 500;
  line-height: 1.35;
}

.money-mix-amount {
  grid-column: 3;
  grid-row: 1;
  margin: 0;
  color: var(--ink);
  font-family: var(--mono);
  font-size: var(--fs-2xs);
  font-variant-numeric: tabular-nums;
  font-weight: 500;
  text-align: right;
  white-space: nowrap;
}

.money-mix-pct {
  grid-column: 3;
  grid-row: 2;
  color: var(--muted-soft);
  font-size: var(--fs-2xs);
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.finance-donors-note {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: var(--fs-2xs);
  line-height: 1.45;
}

.finance-donor-group {
  margin-top: 12px;
}

.finance-donor-group-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px 10px;
  margin-bottom: 6px;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--line);
}

.finance-donor-group-title {
  margin: 0;
  color: var(--ink);
  font-family: var(--serif);
  font-size: var(--fs-sm);
  line-height: 1.3;
}

.finance-donor-group-meta {
  color: var(--muted-soft);
  font-size: var(--fs-2xs);
  font-variant-numeric: tabular-nums;
}

.industry-tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: var(--fs-2xs);
  font-weight: 500;
  line-height: 1.4;
  white-space: nowrap;
}

.member-committees {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.member-committee {
  min-width: 0;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface-soft);
}

.member-committees > .section-note {
  grid-column: 1 / -1;
}

.member-committee-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 6px 10px;
}

.member-committee-heading {
  min-width: 0;
}

.member-committee-type {
  display: block;
  color: var(--muted-soft);
  font-size: var(--fs-2xs);
  font-weight: 500;
  line-height: 1.3;
}

.member-committee-name {
  margin: 2px 0 0;
  overflow-wrap: anywhere;
  color: var(--ink);
  font-size: var(--fs-xs);
  font-weight: 500;
  line-height: 1.35;
}

.member-committee-roles {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 4px;
}

.member-committee-role {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: var(--fs-2xs);
  font-weight: 500;
  line-height: 1.4;
  white-space: nowrap;
}

.member-committee-role--sub {
  padding: 0;
  background: none;
  color: var(--muted);
  text-align: right;
  white-space: normal;
}

.member-committee-subhead {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid var(--line-soft);
  color: var(--muted-soft);
  font-size: var(--fs-2xs);
  font-weight: 500;
  line-height: 1.3;
}

.member-committee-subhead-count {
  font-variant-numeric: tabular-nums;
}

.member-committee-subcommittee-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin: 4px 0 0;
  padding: 0;
  list-style: none;
}

.member-committee-subcommittee-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px 10px;
  padding: 3px 0;
}

.member-committee-subcommittee {
  min-width: 0;
  overflow-wrap: anywhere;
  color: var(--text);
  font-size: var(--fs-2xs);
  line-height: 1.4;
}

.vote-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.vote-filter-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  font-size: var(--fs-2xs);
  font-weight: 500;
  line-height: 1.3;
}

.vote-filter-button:hover {
  border-color: var(--blue);
  color: var(--blue);
}

.vote-filter-button.is-active {
  border-color: var(--ink);
  background: var(--ink);
  color: #fff;
}

.vote-filter-count {
  display: inline-block;
  min-width: 0;
  padding: 0;
  border-radius: 0;
  background: transparent;
  color: var(--muted-soft);
  font-family: var(--mono);
  font-size: var(--fs-2xs);
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.vote-filter-button.is-active .vote-filter-count {
  background: transparent;
  color: rgba(255, 255, 255, 0.72);
}

.vote-kind {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: var(--fs-2xs);
  font-weight: 500;
  line-height: 1.45;
  white-space: nowrap;
}

.vote-kind--substantive {
  background: var(--blue-soft);
  color: var(--blue);
}

.vote-kind--procedural {
  background: var(--paper-deep);
  color: var(--muted);
}

.vote-kind--other {
  background: var(--surface-soft);
  color: var(--muted-soft);
}

.vote-kind--absence {
  background: var(--amber-soft);
  color: var(--amber);
}

.history-item--substantive {
  border-left-color: var(--blue);
}

.history-item--procedural {
  border-left-color: var(--line-strong);
  background: var(--surface-soft);
}

.history-item--absence {
  border-left-color: var(--amber);
  background: #fffaf0;
}

.history-summary {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: var(--fs-2xs);
  line-height: 1.55;
}

.history-method {
  margin-top: 14px;
  padding-top: 8px;
  border-top: 1px dashed var(--line);
}

.history-method summary {
  color: var(--muted);
  cursor: pointer;
  font-size: var(--fs-2xs);
  font-weight: 500;
  line-height: 1.4;
}

.history-method summary:hover {
  color: var(--blue);
}

.history-method p {
  margin: 8px 0 0;
  color: var(--muted-soft);
  font-size: var(--fs-2xs);
  line-height: 1.5;
}

.history-topics {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  margin-top: 8px;
}

.history-topics-label {
  margin-right: 2px;
  color: var(--muted-soft);
  font-size: var(--fs-2xs);
  font-weight: 500;
}

.history-party {
  display: inline-block;
  margin: 8px 0 0;
  padding: 4px 8px;
  border-radius: 8px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: var(--fs-2xs);
  font-weight: 500;
  line-height: 1.4;
}

.history-party--with {
  background: var(--green-soft);
  color: var(--green);
}

.history-party--against {
  background: var(--accent-soft);
  color: var(--accent-dark);
}

.history-party--absent {
  background: var(--amber-soft);
  color: var(--amber);
}

.absence-details {
  margin-top: 8px;
}

.absence-details summary {
  color: var(--blue);
  cursor: pointer;
  font-size: var(--fs-2xs);
  font-weight: 500;
  line-height: 1.4;
}

.absence-note {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: var(--fs-2xs);
  line-height: 1.5;
}

.absence-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 6px 0 0;
  padding: 0;
  list-style: none;
}

.absence-vote {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 8px;
  padding: 4px 0;
  border-top: 1px dashed var(--line);
  font-size: var(--fs-2xs);
}

.absence-vote-date {
  color: var(--muted-soft);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.absence-vote-title {
  flex: 1 1 200px;
  min-width: 0;
  overflow-wrap: anywhere;
  color: var(--ink);
}

@media (max-width: 760px) {
  .finance-pac-split-grid,
  .money-mix-legend {
    grid-template-columns: minmax(0, 1fr);
  }

  .member-committees {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 560px) {
  .vote-filter {
    flex-direction: column;
  }

  .vote-filter-button {
    justify-content: space-between;
    width: 100%;
  }

  .money-mix {
    padding: 12px 12px;
  }

  .finance-table {
    min-width: 0;
    font-size: var(--fs-2xs);
  }

  .finance-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
  }

  .finance-table,
  .finance-table tbody,
  .finance-table tr,
  .finance-table td {
    display: block;
    width: 100%;
  }

  .finance-table tbody tr {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 4px 10px;
    padding: 8px 10px;
    border-bottom: 1px solid var(--line-soft);
  }

  .finance-table tbody tr:last-child {
    border-bottom: 0;
  }

  .finance-table th,
  .finance-table td {
    padding: 0;
    border: 0;
    text-align: left;
  }

  .finance-table td:nth-child(1) {
    grid-column: 1 / -1;
  }

  .finance-table td:nth-child(2) {
    grid-column: 1;
    align-self: center;
  }

  .finance-table td:nth-child(3) {
    grid-column: 2;
    align-self: center;
    text-align: right;
  }

  .finance-table td:nth-child(4) {
    grid-column: 1 / -1;
    text-align: right;
  }

  .finance-table td:nth-child(2)::before,
  .finance-table td:nth-child(3)::before,
  .finance-table td:nth-child(4)::before {
    color: var(--muted-soft);
    font-size: var(--fs-2xs);
    font-weight: 500;
  }

  .finance-table td:nth-child(2)::before,
  .finance-table td:nth-child(3)::before {
    content: none;
  }

  .finance-table td:nth-child(4)::before {
    content: "Total contributed: ";
  }

  .finance-table .sector-badge {
    white-space: normal;
  }

  .finance-table .finance-number {
    white-space: normal;
  }

  .finance-committee-name {
    overflow-wrap: anywhere;
  }

  /* The labelled sort control above each committee table replaces the old
     header strip on phones. Removing the strip also removes the duplicated
     inline "Sector:"/"Members:" prefixes. */
  .finance-committee-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
  }

  .finance-members-unit {
    display: inline;
  }

  .finance-panel {
    /* .panel normally clips its children, which would stop the sort control
       from sticking to the viewport. The finance panel has no overflowing
       decorative content, so it is safe to let it paint normally on phones. */
    overflow: visible;
  }

  .finance-mobile-sort {
    position: sticky;
    top: calc(var(--sticky-offset) + 4px);
    z-index: 8;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 8px;
    padding: 8px;
    border: 1px solid var(--line-strong);
    border-radius: 10px;
    background: var(--surface);
    box-shadow: var(--shadow-card);
  }

  .finance-mobile-sort-label {
    color: var(--muted);
    font-size: var(--fs-2xs);
    font-weight: 600;
    white-space: nowrap;
  }

  .finance-mobile-sort-select {
    flex: 1 1 120px;
    min-width: 0;
    min-height: 44px;
    padding: 8px 28px 8px 10px;
    border: 1px solid var(--line-strong);
    border-radius: 8px;
    background-color: var(--surface-soft);
    color: var(--ink);
    font-size: var(--fs-xs);
    text-overflow: ellipsis;
    cursor: pointer;
  }

  .finance-mobile-sort-select:focus-visible {
    border-color: var(--blue);
    box-shadow: var(--focus);
    outline: none;
  }

  .finance-mobile-sort-direction {
    flex: 0 0 auto;
    width: 44px;
    min-height: 44px;
    padding: 8px 0;
    border: 1px solid var(--line-strong);
    border-radius: 8px;
    background: var(--surface-soft);
    color: var(--ink-soft);
    font: inherit;
    font-size: var(--fs-md);
    font-weight: 500;
    line-height: 1;
    cursor: pointer;
  }

  .finance-mobile-sort-direction:hover {
    border-color: var(--blue);
    color: var(--ink);
  }

  .finance-mobile-sort-direction:focus-visible {
    border-color: var(--blue);
    box-shadow: var(--focus);
    outline: none;
  }
}

/* Type roles: serif is display only; mono carries key figures, codes, and record dates. */
.brand-title,
.hero h1,
.zip-lookup-copy h2,
.panel h2,
.assistant h2,
.drawer-heading h2,
.disclaimer-modal-head h2 {
  font-family: var(--serif);
}

.hero-note-title,
.zip-results-heading,
.zip-member-name,
.record-title,
.member-card-name,
.empty-title,
.error-title,
.message-bubble h4,
.section-heading h3,
.history-title,
.finance-subhead h3,
.finance-member-name,
.finance-donors-title,
.finance-outside-title,
.finance-geography-title,
.finance-itemized-title,
.finance-empty-title,
.finance-fallback-title,
.disclaimer-item h3,
.pac-purpose-title,
.pac-bill-section-title,
.bill-funding-tier-title,
.finance-table-tier-title,
.money-mix-title,
.finance-donor-group-title {
  font-family: var(--sans);
  font-weight: 500;
}

.member-avatar,
.finance-member-avatar,
.assistant-avatar {
  font-family: var(--sans);
  font-weight: 500;
}

.status-stat strong,
.finance-metric-value,
.finance-member-score-value,
.finance-score-value,
.finance-alignment-value {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
}

.record-date,
.history-date,
.absence-vote-date {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
}

.results-meta,
.drawer-meta,
.member-card-meta,
.zip-member-meta,
.vote-measure,
.vote-member-table,
.finance-table,
.history-question,
.history-summary,
.absence-note,
.member-committee-name,
.finance-conduit-caveat-copy,
.finance-plain-summary-copy,
.pac-purpose-copy,
.pac-bill-title,
.bill-lobbying-org-name,
.bill-lobbying-snippet,
.finance-method-copy,
.finance-pac-split-label,
.finance-donors-note,
.finance-outside-note,
.finance-itemized-note,
.finance-empty-copy,
.finance-fallback-copy,
.bill-funding-tier-note {
  font-size: var(--fs-xs);
}

.bill-text {
  font-size: var(--fs-sm);
}

/* Finance & banking lens ------------------------------------------------ */
.finance-lens-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 2px 0 10px;
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--ink);
  font-size: var(--fs-2xs);
  font-weight: 600;
  line-height: 1.35;
  cursor: pointer;
}

.finance-lens-toggle input {
  inline-size: 16px;
  block-size: 16px;
  margin: 0;
  accent-color: var(--teal);
}

.finance-lens-note {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: var(--fs-2xs);
  line-height: 1.5;
}

.company-finance-lens {
  margin: 0 0 24px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-soft);
}

.company-finance-lens .company-subhead {
  margin-bottom: 10px;
}

.company-finance-lens-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.finance-lens-chip,
.finance-lens-source-chip {
  border: 1px solid transparent;
  font-family: var(--sans);
  font-weight: 500;
  white-space: normal;
}

.finance-lens-chip--match {
  border-color: var(--teal-line);
  background: var(--teal-soft);
  color: var(--teal);
}

.finance-lens-chip--muted {
  border-color: var(--line);
  background: transparent;
  color: var(--muted);
}

.finance-sector-cell .finance-lens-chip {
  margin: 4px 0 0 6px;
}
