/* VeraPolitica public archive — dark theme with a warm orange accent. */
:root {
  --bg: #0b0b0c;
  --surface: #151517;
  --surface-2: #1c1c1f;
  --surface-3: #242428;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.14);
  --ink: #f4f1ec;
  --muted: #a19b93;
  --faint: #6f6a64;
  --accent: #ff6b1a;
  --accent-strong: #ff8a3d;
  --accent-soft: rgba(255, 107, 26, 0.14);
  --accent-line: rgba(255, 107, 26, 0.35);
  --error: #ff8f8f;
  --error-soft: rgba(248, 113, 113, 0.12);
  --kept: #3ddc97;
  --partial: #f5b942;
  --partial-ink: #140a03;
  --broken: #ff6b6b;
  --progress: #6aa8ff;
  --stalled: #0e0e10;
  --stalled-ink: #f4f1ec;
  --unrated: #a8a29e;
  --radius-lg: 26px;
  --radius-md: 18px;
  --radius-sm: 12px;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
  /* legacy aliases kept for older markup */
  --card: var(--surface);
  --navy: var(--ink);
  --teal: var(--accent);
  --teal-dark: var(--accent-strong);
  --teal-soft: var(--accent-soft);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; background: var(--bg); scroll-padding-top: var(--profile-scroll-pad, 5.5rem); }

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 88% -6%, rgba(255, 107, 26, 0.32), transparent 34rem),
    radial-gradient(circle at 0% 40%, rgba(255, 107, 26, 0.06), transparent 28rem),
    var(--bg);
  background-attachment: fixed;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }
img { max-width: 100%; }
::selection { background: var(--accent); color: #140a03; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 8px; }

/* Header ------------------------------------------------------------------ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid var(--line);
  background: rgba(11, 11, 12, 0.72);
  backdrop-filter: blur(18px) saturate(1.2);
}
.header-inner { width: min(1180px, 92vw); min-height: 74px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 22px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand-mark {
  width: 40px; height: 40px; display: grid; place-items: center; color: #140a03;
  background: linear-gradient(140deg, var(--accent-strong), var(--accent));
  border-radius: 50%; font-weight: 800; font-size: .86rem; letter-spacing: -.02em;
  box-shadow: 0 0 0 4px var(--accent-soft), 0 8px 24px rgba(255, 107, 26, .35);
}
.brand strong, .brand small { display: block; }
.brand strong { font-size: 1.05rem; font-weight: 700; letter-spacing: -.02em; }
.brand small { color: var(--muted); font-size: .7rem; }
.institutional-note { color: var(--muted); font-size: .78rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); border: 0; }

.site-search, .search-panel { display: flex; gap: 8px; align-items: center; }
.site-search input, .search-panel input, .search-panel select {
  min-width: 0; padding: 10px 14px; border: 1px solid var(--line-strong); border-radius: 999px;
  background: var(--surface-2); color: var(--ink); font: inherit; font-size: .84rem;
}
.site-search input::placeholder, .search-panel input::placeholder { color: var(--faint); }
.site-search input { width: min(260px, 26vw); }
.search-panel { flex-wrap: wrap; margin-bottom: 28px; }
.search-panel input { flex: 1 1 240px; }
.search-panel select { min-width: 190px; }
.site-search button, .search-panel button {
  padding: 10px 16px; border: 0; border-radius: 999px; background: var(--accent); color: #140a03;
  font-size: .78rem; font-weight: 800; cursor: pointer;
}
.public-nav { display: flex; flex-wrap: wrap; gap: 4px; margin-left: auto; max-width: 100%; }
.public-nav a { padding: 7px 11px; color: var(--muted); border-radius: 999px; font-size: .78rem; font-weight: 700; text-decoration: none; white-space: nowrap; flex: 0 0 auto; }

/* Layout & type ----------------------------------------------------------- */
main { width: min(1180px, 92vw); min-height: calc(100vh - 190px); margin: 0 auto; padding: 64px 0 80px; }
.hero { max-width: 900px; margin-bottom: 64px; }
.compact-hero { margin-bottom: 40px; }
.eyebrow { margin: 0 0 8px; color: var(--accent); font-size: .7rem; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
h1, h2, h3, h4, p { margin-top: 0; }
h1 { margin-bottom: 22px; font-size: clamp(2.6rem, 6.4vw, 5.2rem); font-weight: 700; line-height: .98; letter-spacing: -.05em; }
h1 em { color: var(--accent); font-style: normal; }
h2 { margin-bottom: 0; font-size: clamp(1.5rem, 3vw, 2.1rem); font-weight: 700; line-height: 1.15; letter-spacing: -.03em; }
h3 { font-weight: 700; letter-spacing: -.02em; }
.hero-copy { max-width: 680px; color: var(--muted); font-size: 1.06rem; }
.trust-line { max-width: 680px; display: flex; align-items: center; gap: 12px; margin-top: 28px; padding: 13px 16px; border: 1px solid var(--accent-line); border-radius: var(--radius-md); background: var(--accent-soft); }
.trust-line > span { width: 28px; height: 28px; display: grid; place-items: center; flex: 0 0 auto; color: #140a03; background: var(--accent); border-radius: 50%; font-weight: 800; }
.trust-line p { margin: 0; color: var(--ink); font-size: .84rem; }
.trust-line strong { color: var(--accent-strong); }

.archive-heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 22px; }
.count-pill, .verified-badge {
  display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px; border-radius: 999px;
  font-size: .72rem; font-weight: 800; white-space: nowrap;
}
.count-pill { color: var(--muted); background: var(--surface-2); border: 1px solid var(--line); }
.verified-badge { color: var(--accent-strong); background: var(--accent-soft); }
.verified-badge::before { content: "✓"; display: grid; place-items: center; width: 16px; height: 16px; color: #140a03; background: var(--accent); border-radius: 50%; font-size: .62rem; }

/* Politician cards -------------------------------------------------------- */
.politician-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); gap: 18px; }
.politician-card {
  position: relative; display: flex; flex-direction: column; overflow: hidden; padding: 22px;
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
  border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow);
  transition: transform 200ms var(--ease-out), border-color 200ms ease;
}
.politician-card .portrait { width: 58px; height: 58px; min-height: 0; border-radius: 50%; font-size: 1.1rem; box-shadow: 0 0 0 3px var(--surface), 0 0 0 4px var(--line-strong); }
.portrait {
  position: relative; width: 100%; height: 100%; min-height: 255px; display: grid; place-items: center; overflow: hidden;
  color: #140a03; background: radial-gradient(circle at 30% 20%, var(--accent-strong), var(--accent) 45%, #7a2c05);
  font-weight: 800; font-size: 2rem; letter-spacing: -.03em;
}
.portrait img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; color: transparent; font-size: 0; }
.card-content { display: flex; flex-direction: column; align-items: flex-start; flex: 1; padding-top: 16px; }
.card-content h3 { margin: 12px 0 4px; font-size: 1.4rem; line-height: 1.1; }
.mandate { margin: 0; color: var(--ink); font-size: .86rem; font-weight: 600; }
.area { margin: 2px 0 14px; color: var(--muted); font-size: .8rem; }
.source-count { margin: 12px 0 14px; color: var(--faint); font-size: .74rem; }
.profile-link { display: inline-flex; align-items: center; gap: 6px; color: var(--accent-strong); font-size: .82rem; font-weight: 800; text-decoration: none; }
.card-record { width: 100%; margin-top: auto; padding: 14px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: rgba(0, 0, 0, .25); }
.card-record-caption, .card-record-empty { margin: 8px 0 0; color: var(--muted); font-size: .75rem; }
.card-record-empty { margin: 0; color: var(--faint); }
.card-record-caption strong { color: var(--ink); }

/* States ------------------------------------------------------------------ */
.state-card { min-height: 140px; display: flex; align-items: center; justify-content: center; gap: 15px; padding: 28px; color: var(--muted); text-align: left; border: 1px dashed var(--line-strong); border-radius: var(--radius-md); background: rgba(21, 21, 23, .7); }
.state-card strong, .state-card small { display: block; }
.state-card strong { color: var(--ink); }
.state-card small { margin-top: 3px; }
.state-card.is-error { color: var(--error); border-color: rgba(248, 113, 113, .35); background: var(--error-soft); }
.state-card.is-error strong { color: var(--error); }
.loading-mark { width: 24px; height: 24px; border: 3px solid var(--surface-3); border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; }

/* Profile ----------------------------------------------------------------- */
.back-link { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 24px; padding: 8px 14px; color: var(--ink); background: var(--surface-2); border: 1px solid var(--line); border-radius: 999px; font-size: .8rem; font-weight: 700; text-decoration: none; }
.profile-hero { position: relative; display: grid; grid-template-columns: 280px 1fr; overflow: hidden; background: var(--surface); border: 1px solid var(--line); border-radius: 30px; box-shadow: var(--shadow); }
.profile-hero::after { content: ""; position: absolute; right: -120px; top: -120px; width: 360px; height: 360px; background: radial-gradient(circle, rgba(255, 107, 26, .28), transparent 65%); pointer-events: none; }
.profile-hero .portrait { font-size: 3.4rem; }
.profile-intro { position: relative; z-index: 1; padding: clamp(26px, 4.5vw, 46px); }
.profile-intro h1 { margin: 16px 0 6px; font-size: clamp(2.3rem, 5vw, 4rem); }
.profile-intro .lead { margin-bottom: 0; color: var(--muted); font-size: 1rem; }
.publication-meta { margin: 22px 0 0; color: var(--faint); font-size: .74rem; }

.stat-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 24px; }
.stat-tile { display: flex; flex-direction: column; gap: 2px; padding: 16px; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-md); }
.stat-tile strong { font-size: 1.7rem; font-weight: 700; letter-spacing: -.04em; line-height: 1.1; }
.stat-tile strong.is-muted { color: var(--faint); }
.stat-tile span { color: var(--muted); font-size: .72rem; font-weight: 600; }
.stat-tile.is-accent { background: linear-gradient(160deg, rgba(255, 107, 26, .24), rgba(255, 107, 26, .06)); border-color: var(--accent-line); }
.stat-tile.is-accent strong { color: var(--accent-strong); }

.topic-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.topic-chip { display: inline-flex; align-items: center; gap: 7px; padding: 7px 13px; color: var(--ink); background: var(--surface-2); border: 1px solid var(--line-strong); border-radius: 999px; font-size: .76rem; font-weight: 600; }
.topic-chip small { color: var(--faint); font-weight: 700; }
.topic-chip.is-small { padding: 4px 10px; font-size: .68rem; }
.topic-chip.is-muted { color: var(--muted); border-style: dashed; }

.profile-tabs { position: sticky; top: 74px; z-index: 5; display: flex; gap: 6px; margin: 22px 0 0; padding: 6px; overflow-x: auto; background: rgba(21, 21, 23, .85); backdrop-filter: blur(14px); border: 1px solid var(--line); border-radius: 999px; scrollbar-width: none; }
.profile-tabs::-webkit-scrollbar { display: none; }
.profile-tab { flex: 1 0 auto; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 11px 18px; color: var(--muted); background: transparent; border: 0; border-radius: 999px; font: inherit; font-size: .86rem; font-weight: 700; cursor: pointer; }
.profile-tab small { padding: 1px 7px; color: var(--muted); background: var(--surface-3); border-radius: 999px; font-size: .68rem; }
.profile-tab.is-active { color: #140a03; background: var(--accent); box-shadow: 0 8px 22px rgba(255, 107, 26, .3); }
.profile-tab.is-active small { color: #140a03; background: rgba(0, 0, 0, .14); }

.profile-section-nav {
  position: sticky; top: var(--profile-nav-top, 74px); z-index: 5; display: flex;
  flex-wrap: wrap; gap: 6px; margin: 22px 0 8px; padding: 8px; max-width: 100%;
  background: rgba(21, 21, 23, .85); backdrop-filter: blur(14px);
  border: 1px solid var(--line); border-radius: 18px;
}
.profile-section-nav a {
  flex: 0 1 auto; display: inline-flex; align-items: center; padding: 9px 14px;
  color: var(--muted); border-radius: 999px; font-size: .82rem; font-weight: 700;
  text-decoration: none; white-space: nowrap; max-width: 100%;
  box-shadow: inset 0 -2px 0 transparent;
}
.profile-section-nav a.is-active,
.profile-section-nav a[aria-current="location"] {
  color: var(--ink);
  background: var(--surface-3);
  box-shadow: inset 0 -2px 0 var(--accent);
}
.profile-office { margin: 0 0 4px; color: var(--ink); font-size: 1.12rem; font-weight: 650; }
.profile-party { margin: 0; color: var(--muted); font-size: .95rem; font-weight: 600; }
.header-facts { margin-top: 18px; }
.header-facts .fact { grid-template-columns: auto 1fr; gap: 8px 16px; padding: 8px 0; }
.who-copy { max-width: 42rem; color: var(--ink); font-size: 1.02rem; }
.position-list, .proceeding-list { display: grid; gap: 16px; }
.position-card, .proceeding-card {
  padding: 18px 18px 16px; background: var(--surface-2);
  border: 1px solid var(--line); border-radius: var(--radius-md);
}
.position-card h3, .proceeding-card h3 { margin: 0 0 12px; font-size: 1.08rem; }
.proceeding-meta { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 12px; }
.proceeding-type, .proceeding-outcome {
  display: inline-flex; padding: 4px 10px; border-radius: 999px;
  font-size: .68rem; font-weight: 800; color: var(--ink); background: var(--surface-3);
}
.source-card-list { display: grid; gap: 10px; margin-top: 16px; }
.career-timeline {
  position: relative; display: grid; gap: 0; margin: 8px 0 0; padding: 0;
  list-style: none;
}
.career-timeline::before {
  content: ""; position: absolute; top: 6px; bottom: 10px; left: calc(7.5rem + 16px + 6px);
  width: 1px; background: var(--line-strong);
}
.career-entry {
  display: grid; grid-template-columns: 7.5rem 12px minmax(0, 1fr);
  column-gap: 16px; align-items: start; padding: 0 0 26px;
}
.career-entry:last-child { padding-bottom: 4px; }
.career-entry time {
  grid-column: 1; color: var(--faint); font-size: .82rem; font-weight: 800;
  letter-spacing: .02em; padding-top: 2px;
}
.career-marker {
  grid-column: 2; width: 12px; height: 12px; margin-top: 5px;
  background: var(--surface-3); border: 2px solid var(--accent-line); border-radius: 50%;
  box-shadow: 0 0 0 4px var(--bg);
}
.career-entry.is-current .career-marker {
  background: var(--accent); border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}
.career-body { grid-column: 3; min-width: 0; overflow-wrap: anywhere; }
.career-current {
  display: inline-flex; margin-bottom: 6px; padding: 3px 8px; color: #140a03;
  background: var(--accent); border-radius: 999px; font-size: .66rem;
  font-weight: 800; letter-spacing: .08em; text-transform: uppercase;
}
.career-timeline strong { display: block; font-size: 1.04rem; }
.career-timeline p { margin: 5px 0 10px; color: var(--muted); font-size: .84rem; }
.career-subhead { margin: 28px 0 10px; font-size: 1.05rem; color: var(--muted); }
.profile-block { margin-top: 28px; }
.detail-card.profile-block { padding: clamp(24px, 3.4vw, 36px); }
.profile-block h2 {
  margin: 0 0 20px; padding-bottom: 14px; border-bottom: 1px solid var(--line);
  font-size: clamp(1.42rem, 2.5vw, 1.72rem); letter-spacing: -.02em;
}
.profile-career, .commitments-card, .profile-proceedings {
  background: color-mix(in srgb, var(--surface) 88%, #000);
}
.profile-ask { display: grid; gap: 10px; margin-top: 20px; justify-items: start; }
.profile-ask-cta {
  display: inline-flex; align-items: center; padding: 11px 16px; color: #140a03;
  background: var(--accent); border-radius: 999px; font-size: .84rem; font-weight: 800;
  text-decoration: none; box-shadow: 0 8px 22px rgba(255, 107, 26, .28);
}
.ask-suggestions { display: flex; flex-wrap: wrap; gap: 8px; max-width: 100%; }
.ask-suggestion {
  display: inline-flex; max-width: 100%; padding: 8px 12px; color: var(--muted);
  background: var(--surface-2); border: 1px solid var(--line); border-radius: 999px;
  font-size: .76rem; font-weight: 650; text-decoration: none; overflow-wrap: anywhere; white-space: normal;
}
.source-card {
  display: grid; gap: 6px; justify-items: start; padding: 16px 17px;
  background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-md);
}
.source-card-kind { margin: 0; color: var(--accent-strong); font-size: .68rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.source-card h3 { margin: 0; font-size: 1.02rem; overflow-wrap: anywhere; }
.source-card-title, .source-card-date, .source-card-count { margin: 0; color: var(--muted); font-size: .8rem; }
.pledge-origin { margin: 0; color: var(--faint); font-size: .74rem; font-weight: 650; }
.evidence-quote { margin: 0; color: var(--muted); font-size: .82rem; }
.profile-trust p { max-width: 42rem; color: var(--muted); }

.detail-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: 18px; margin-top: 18px; }
.detail-card { margin-top: 18px; padding: clamp(22px, 3vw, 30px); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); }
.detail-grid .detail-card { margin-top: 0; }
.detail-card h2 { margin-bottom: 20px; font-size: 1.5rem; }
.facts { display: grid; gap: 0; margin: 0; }
.fact { display: grid; grid-template-columns: 150px 1fr; gap: 18px; padding: 14px 0; border-top: 1px solid var(--line); }
.fact:first-child { border-top: 0; padding-top: 0; }
.fact dt { color: var(--faint); font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.fact dd { margin: 0; font-size: .9rem; font-weight: 500; }
.fact a { color: var(--accent-strong); overflow-wrap: anywhere; }
.mandate-block, .group-membership, .party-affiliation, .territorial-office, .linked-proposals article, .source-block {
  padding: 17px; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-md);
}
.mandate-block + .mandate-block { margin-top: 10px; }
.mandate-block strong { display: block; font-size: 1.02rem; font-weight: 700; }
.mandate-block p { margin: 5px 0 0; color: var(--muted); font-size: .82rem; }

.groups-card, .parties-card { margin-top: 18px; }
.group-disclaimer, .empty-note, .party-disclaimer, .proposal-disclaimer, .territorial-disclaimer { color: var(--muted); font-size: .84rem; }
.group-list, .party-list, .territorial-offices, .linked-proposals, .source-list { display: grid; gap: 10px; }
.group-membership, .party-affiliation { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.group-membership strong, .party-affiliation strong { font-size: 1.02rem; font-weight: 700; }
.party-affiliation strong a { color: inherit; }
.group-membership p, .party-affiliation p { margin: 5px 0 1px; color: var(--muted); font-size: .82rem; }
.group-membership small { color: var(--faint); }
.group-role, .party-affiliation-type { display: inline-flex; margin-left: 8px; padding: 3px 8px; color: var(--accent-strong); background: var(--accent-soft); border-radius: 999px; font-size: .66rem; font-weight: 800; }
.previous-groups-title, .previous-parties-title { margin: 24px 0 10px; font-size: 1rem; color: var(--muted); }

/* Proposals --------------------------------------------------------------- */
.proposal-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.proposal-card { padding: 22px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); }
.proposal-card h3 { margin: 14px 0 12px; font-size: 1.28rem; line-height: 1.2; overflow-wrap: anywhere; }
.proposal-card > p { color: var(--muted); font-size: .82rem; }
.proposal-card-top, .proposal-card-links { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.proposal-type, .status-chip { display: inline-flex; padding: 5px 10px; border-radius: 999px; font-size: .68rem; font-weight: 800; max-width: 100%; overflow-wrap: anywhere; }
.proposal-type { color: var(--accent-strong); background: var(--accent-soft); }
.status-chip { color: var(--ink); background: var(--surface-3); }
.proposal-actors { display: flex; flex-wrap: wrap; gap: 8px; }
.proposal-actor { display: inline-flex; flex-direction: column; padding: 7px 11px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface-2); font-size: .8rem; }
.proposal-actor a { color: var(--accent-strong); font-weight: 700; }
.proposal-actor small { margin-top: 2px; color: var(--faint); font-size: .65rem; }
.proposal-detail-hero { padding: clamp(26px, 5vw, 48px); background: var(--surface); border: 1px solid var(--line); border-radius: 30px; }
.proposal-detail-hero h1 { margin: 16px 0; font-size: clamp(2rem, 5vw, 3.6rem); overflow-wrap: anywhere; line-height: 1.08; }
.proposal-detail-hero blockquote, .pledge-quote { margin: 18px 0 0; padding: 4px 0 4px 18px; color: var(--ink); border-left: 3px solid var(--accent); font-size: 1.02rem; }
.proposal-timeline-card, .proposals-card { margin-top: 18px; }
.proposal-timeline { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; }
.proposal-timeline li { display: grid; grid-template-columns: 150px 1fr; gap: 20px; padding: 16px 0; border-top: 1px solid var(--line); }
.proposal-timeline li:first-child { border-top: 0; }
.proposal-timeline time { color: var(--faint); font-size: .78rem; font-weight: 800; }
.proposal-timeline p { margin: 4px 0 8px; color: var(--muted); font-size: .82rem; }
.linked-proposals h3 { margin: 8px 0 4px; font-size: 1.02rem; overflow-wrap: anywhere; }
.linked-proposals h3 a { color: inherit; text-decoration: none; }
.linked-proposals p { color: var(--muted); font-size: .82rem; margin: 0; }
.territorial-office { display: flex; justify-content: space-between; gap: 20px; }
.territorial-office h3 { margin: 8px 0 4px; font-size: 1.02rem; }
.territorial-office h3 a { color: inherit; }
.territorial-office p { color: var(--muted); font-size: .82rem; }
.territory-pagination { display: flex; justify-content: space-between; gap: 16px; margin: 24px 0 8px; color: var(--muted); font-size: .82rem; font-weight: 700; }
.territory-pagination a { color: var(--accent-strong); text-decoration: none; }

/* Sources ----------------------------------------------------------------- */
.sources-card { margin-top: 18px; }
.sources-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; margin-bottom: 20px; }
.sources-summary { color: var(--muted); font-size: .78rem; text-align: right; }
.sources-summary strong { color: var(--ink); }
.source-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.source-top h3 { margin: 0 0 3px; font-size: 1.04rem; overflow-wrap: anywhere; }
.source-top small { color: var(--faint); }
.source-block h3 { font-size: 1.04rem; }
.source-link {
  flex: 0 0 auto; display: inline-flex; align-items: center; padding: 7px 13px; border: 1px solid var(--accent-line);
  border-radius: 999px; color: var(--accent-strong); background: var(--accent-soft); font-size: .76rem; font-weight: 800; text-decoration: none;
}
.supports-label { margin: 16px 0 7px; color: var(--faint); font-size: .68rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.supports { display: flex; flex-wrap: wrap; gap: 7px; margin: 0; padding: 0; list-style: none; }
.supports li { padding: 5px 10px; color: var(--ink); background: var(--surface-3); border-radius: 999px; font-size: .74rem; }

/* Commitment record ------------------------------------------------------- */
.tone-kept { --tone: var(--kept); }
.tone-partial { --tone: var(--partial); }
.tone-broken { --tone: var(--broken); }
.tone-progress { --tone: var(--progress); }
.tone-stalled { --tone: var(--stalled); }
.tone-unrated { --tone: var(--unrated); }

.scorecard { display: grid; gap: 18px; }
.method-note { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 16px 18px; color: var(--muted); background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-md); font-size: .84rem; }
.method-note p { margin: 0; max-width: 720px; }
.mandate-progress { display: grid; gap: 8px; padding: 16px 18px; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-md); }
.mandate-progress > div:first-child { display: flex; justify-content: space-between; align-items: baseline; color: var(--muted); font-size: .8rem; font-weight: 600; }
.mandate-progress strong { color: var(--ink); font-size: 1.05rem; }
.mandate-progress small { color: var(--faint); font-size: .72rem; }
.progress-track, .interval-track { position: relative; height: 8px; overflow: hidden; background: var(--surface-3); border-radius: 999px; }
.progress-track span { position: absolute; inset: 0 auto 0 0; background: linear-gradient(90deg, var(--accent), var(--accent-strong)); border-radius: 999px; }

.strata { display: grid; gap: 14px; }
.stratum-card { display: grid; gap: 16px; padding: 20px; background: linear-gradient(180deg, var(--surface-2), var(--surface)); border: 1px solid var(--line); border-radius: var(--radius-lg); }
.stratum-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.stratum-head h3 { margin: 0; font-size: 1.2rem; }
.stratum-card .topic-chips { margin-top: 0; }

.composition { display: grid; gap: 10px; }
.composition-bar { display: flex; gap: 3px; height: 14px; overflow: hidden; border-radius: 999px; }
.composition.is-compact .composition-bar { height: 8px; gap: 2px; }
.composition-segment { flex-basis: 0; min-width: 6px; background: var(--tone); }
.composition-segment:first-child { border-radius: 999px 0 0 999px; }
.composition-segment:last-child { border-radius: 0 999px 999px 0; }
.composition-segment:only-child { border-radius: 999px; }
.composition-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 0; padding: 0; list-style: none; color: var(--muted); font-size: .76rem; }
.composition-legend li { display: inline-flex; align-items: center; gap: 7px; }
.composition-legend strong { color: var(--ink); }
.legend-dot { width: 9px; height: 9px; background: var(--tone); border-radius: 50%; }
.legend-dot.tone-stalled, .composition-segment.tone-stalled {
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.45);
}
.verdict-legend {
  display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none;
}
.verdict-legend li { display: inline-flex; }

.rate-block { display: grid; gap: 8px; padding: 18px; background: rgba(0, 0, 0, .28); border: 1px solid var(--line); border-radius: var(--radius-md); }
.rate-label { color: var(--muted); font-size: .72rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.rate-value { font-size: clamp(2.4rem, 6vw, 3.4rem); font-weight: 700; line-height: 1; letter-spacing: -.05em; color: var(--accent-strong); }
.rate-block.is-withheld .rate-value { font-size: 1.8rem; color: var(--muted); }
.rate-note, .rate-range { margin: 0; color: var(--muted); font-size: .78rem; }
.interval-track { height: 10px; overflow: visible; margin: 6px 0 2px; }
.interval-range { position: absolute; top: 0; bottom: 0; background: rgba(255, 107, 26, .35); border-radius: 999px; }
.interval-point { position: absolute; top: 50%; width: 16px; height: 16px; background: var(--accent); border: 3px solid var(--bg); border-radius: 50%; transform: translate(-50%, -50%); box-shadow: 0 0 0 4px var(--accent-soft); }

.pledge-board { display: grid; gap: 16px; }
.pledge-list-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-top: 6px; }
.pledge-list-head h3 { margin: 0; font-size: 1.2rem; }
.pledge-status-summary { display: grid; gap: 12px; }
.pledge-summary-total { margin: 0; color: var(--muted); font-size: .95rem; font-weight: 650; }
.pledge-summary-total strong { color: var(--ink); font-size: clamp(1.6rem, 4vw, 2.1rem); font-weight: 750; letter-spacing: -.03em; margin-right: 6px; }
.pledge-summary-grid {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px;
  margin: 0; padding: 0; list-style: none;
}
.pledge-summary-item {
  display: grid; grid-template-columns: 8px minmax(0, 1fr); grid-template-rows: auto auto;
  column-gap: 10px; align-items: start; padding: 10px 12px;
  background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-sm);
}
.pledge-summary-item.is-zero { opacity: .58; }
.pledge-summary-swatch {
  grid-row: 1 / span 2; width: 8px; min-height: 100%; align-self: stretch;
  background: var(--tone); border-radius: 999px;
}
.pledge-summary-item.tone-stalled .pledge-summary-swatch,
.pledge-item.tone-stalled {
  box-shadow: inset 3px 0 0 0 var(--stalled-ink);
}
.pledge-summary-item.tone-stalled .pledge-summary-swatch {
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.45);
}
.pledge-summary-count { font-size: 1.2rem; line-height: 1.1; letter-spacing: -.02em; }
.pledge-summary-label { color: var(--muted); font-size: .74rem; font-weight: 700; overflow-wrap: anywhere; }
.pledge-distribution { display: grid; gap: 8px; }
.pledge-distribution-caption { margin: 0; color: var(--faint); font-size: .76rem; }
.pledge-distribution .composition-bar { height: 12px; }

.filter-pills { display: flex; flex-wrap: wrap; gap: 6px; }
.filter-pills::-webkit-scrollbar { display: none; }
.filter-pill { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; color: var(--muted); background: var(--surface-2); border: 1px solid var(--line); border-radius: 999px; font: inherit; font-size: .78rem; font-weight: 700; white-space: nowrap; cursor: pointer; }
.filter-pill.is-zero { opacity: .62; }
.filter-pill.is-active { color: var(--ink); background: transparent; border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); opacity: 1; }

.pledge-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.pledge-item { display: flex; flex-direction: column; gap: 10px; padding: 18px; background: var(--surface-2); border: 1px solid var(--line); border-left: 3px solid var(--tone, var(--line)); border-radius: var(--radius-md); }
.pledge-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.pledge-tags { display: inline-flex; gap: 6px; flex-wrap: wrap; }
.pledge-item h4 { margin: 0; font-size: 1.04rem; line-height: 1.3; letter-spacing: -.01em; }
.pledge-item h4 a { color: inherit; text-decoration: none; }
.pledge-quote { margin: 0; font-size: .88rem; color: var(--muted); }
.pledge-details { margin: 2px 0 0; }
.pledge-details summary {
  cursor: pointer; color: var(--muted); font-size: .78rem; font-weight: 750;
  list-style: none;
}
.pledge-details summary::-webkit-details-marker { display: none; }
.pledge-details summary::after { content: " +"; color: var(--faint); font-weight: 800; }
.pledge-details[open] summary::after { content: " −"; }
.pledge-details[open] { display: grid; gap: 10px; }
.pledge-details:focus-visible, .pledge-details summary:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 8px;
}
.verdict-chip { display: inline-flex; align-items: center; gap: 7px; padding: 5px 11px; color: var(--tone); background: color-mix(in srgb, var(--tone) 14%, transparent); border: 1px solid color-mix(in srgb, var(--tone) 40%, transparent); border-radius: 999px; font-size: .72rem; font-weight: 800; }
.pledge-item .verdict-chip { padding: 7px 13px; font-size: .8rem; letter-spacing: .01em; }
.verdict-chip::before { content: ""; width: 7px; height: 7px; background: var(--tone); border-radius: 50%; }
.verdict-chip.tone-partial { color: var(--partial-ink); background: var(--partial); border-color: color-mix(in srgb, var(--partial) 55%, #000); }
.verdict-chip.tone-partial::before { background: var(--partial-ink); }
.verdict-chip.tone-stalled { color: var(--stalled-ink); background: var(--stalled); border-color: rgba(255, 255, 255, 0.42); }
.verdict-chip.tone-stalled::before { background: var(--stalled-ink); }
.pledge-evidence { display: grid; gap: 6px; margin-top: auto; padding: 13px 14px; background: rgba(0, 0, 0, .25); border: 1px solid var(--line); border-left: 3px solid var(--tone); border-radius: var(--radius-sm); }
.evidence-label { margin: 0; color: var(--faint); font-size: .66rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.evidence-text { margin: 0; color: var(--ink); font-size: .84rem; }
.evidence-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; color: var(--muted); font-size: .74rem; }
.explain-pledge {
  align-self: flex-start; margin-top: 4px; padding: 7px 13px; color: var(--accent-strong);
  background: var(--accent-soft); border: 1px solid var(--accent-line); border-radius: 999px;
  font: inherit; font-size: .76rem; font-weight: 800; cursor: pointer;
}
.explain-pledge:disabled { opacity: .55; cursor: wait; }
.pledge-explanation { display: grid; gap: 8px; padding: 13px 14px; background: rgba(0, 0, 0, .22); border: 1px solid var(--line); border-radius: var(--radius-sm); }
.pledge-explanation.is-error { border-color: color-mix(in srgb, var(--error) 40%, transparent); }
.explanation-text { margin: 0; color: var(--ink); font-size: .88rem; }
.explanation-sources { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.explanation-note { margin: 0; color: var(--faint); font-size: .72rem; }

/* Misc views -------------------------------------------------------------- */
.ask-form { display: grid; gap: 12px; margin: 0 0 14px; }
.ask-form textarea {
  width: 100%; min-height: 92px; padding: 14px 16px; resize: vertical;
  color: var(--ink); background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-sm); font: inherit;
}
.ask-form button {
  justify-self: start; padding: 10px 16px; color: var(--ink);
  background: var(--accent); border: 0; border-radius: 999px;
  font: inherit; font-weight: 800; cursor: pointer;
}
.ask-form button:disabled { opacity: .55; cursor: wait; }
.ask-disclaimer { margin: 0 0 18px; color: var(--muted); font-size: .86rem; }
.ask-result { display: grid; gap: 14px; padding: 22px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-md); }
.ask-answer { margin: 0; color: var(--ink); font-size: 1rem; line-height: 1.5; }
.ask-cards { display: grid; gap: 10px; }
.ask-card { display: grid; gap: 8px; padding: 14px 16px; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-sm); }
.ask-card h3 { margin: 0; font-size: 1.02rem; }
.ask-card h3 a { color: inherit; text-decoration: none; }
.search-grid { display: grid; gap: 14px; }
.search-card { padding: 20px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-md); }
.search-card h3 { margin: 8px 0 6px; font-size: 1.24rem; line-height: 1.15; }
.search-card h3 a { color: inherit; text-decoration: none; }
.search-card p { margin: 0; color: var(--muted); font-size: .84rem; }
.search-type { display: inline-flex; padding: 4px 9px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-strong); font-size: .66rem; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; }
mark.search-hit { padding: 0 2px; background: rgba(255, 107, 26, .3); color: var(--ink); border-radius: 3px; }
.glossary-list { display: grid; gap: 14px; }
.glossary-card, .guide-section { padding: 20px 22px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-md); }
.guide-section { margin-bottom: 14px; }
.guide-section h2 { margin: 0 0 8px; font-size: 1.1rem; }
.glossary-card p, .guide-section p { color: var(--muted); }

footer { width: min(1180px, 92vw); margin: 0 auto; padding: 28px 0 38px; display: flex; justify-content: space-between; gap: 24px; color: var(--faint); border-top: 1px solid var(--line); font-size: .76rem; }
footer strong { color: var(--ink); font-size: .95rem; }
footer p { max-width: 590px; margin: 4px 0 0; color: var(--muted); }

/* Interaction & platform layer ---------------------------------------------
   Motion follows a strict budget: press feedback ~140ms, reveals ~200ms,
   custom ease-out, transform/opacity only. Hover styles exist only for
   pointers that can hover, so taps never leave a stuck hover state. */
:root {
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
}

html {
  -webkit-tap-highlight-color: transparent;
  -webkit-text-size-adjust: 100%;
}

/* Controls: immediate taps, no text selection on long-press. Content stays selectable. */
button, .profile-tab, .filter-pill, .public-nav a, .back-link, .source-link, .profile-link {
  touch-action: manipulation;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}

/* Press feedback on every pressable, for touch and mouse alike. */
.site-search button, .search-panel button, .profile-tab, .filter-pill, .back-link, .source-link {
  transition: transform 140ms var(--ease-out), background-color 140ms ease, color 140ms ease, border-color 140ms ease;
}
@media (prefers-reduced-motion: no-preference) {
  .site-search button:active, .search-panel button:active, .profile-tab:active,
  .filter-pill:active, .back-link:active, .source-link:active { transform: scale(0.97); }
}

@media (hover: hover) and (pointer: fine) {
  .site-search button:hover, .search-panel button:hover { background: var(--accent-strong); }
  .public-nav a:hover { color: var(--ink); background: var(--surface-2); }
  .politician-card:hover { transform: translateY(-3px); border-color: var(--accent-line); }
  .profile-link:hover { color: var(--accent); }
  .back-link:hover { border-color: var(--accent-line); }
  .profile-tab:not(.is-active):hover { color: var(--ink); }
  .profile-section-nav a:hover, .ask-suggestion:hover { color: var(--ink); background: var(--surface-3); }
  .filter-pill:not(.is-active):hover { color: var(--ink); border-color: var(--line-strong); }
  .source-link:hover { color: #140a03; background: var(--accent); }
  .linked-proposals h3 a:hover, .pledge-item h4 a:hover, .search-card h3 a:hover { color: var(--accent-strong); }
}
@media (prefers-reduced-motion: reduce) {
  .politician-card:hover { transform: none; }
}

/* Inputs: 16px on touch screens so iOS never zooms the page on focus. */
@media (pointer: coarse) {
  input, textarea, select { font-size: 16px; }
}

/* Notch and home-indicator safe areas (needs viewport-fit=cover). */
.site-header { padding-left: env(safe-area-inset-left, 0px); padding-right: env(safe-area-inset-right, 0px); padding-top: env(safe-area-inset-top, 0px); }
footer { padding-bottom: calc(38px + env(safe-area-inset-bottom, 0px)); }

/* Scrollable pill rows hint that they continue. */
.filter-pills, .profile-tabs {
  overscroll-behavior-x: contain;
  scroll-snap-type: x proximity;
}
.filter-pill, .profile-tab { scroll-snap-align: start; }
.profile-section-nav { overscroll-behavior-x: contain; }
@media (max-width: 640px) {
  .filter-pills {
    -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 32px), transparent);
    mask-image: linear-gradient(90deg, #000 calc(100% - 32px), transparent);
    padding-right: 28px;
  }
}

/* Worst-case data: long names, unbroken URLs, narrow screens. */
.scorecard > *, .stratum-card > *, .pledge-item, .pledge-list-head > * { min-width: 0; }
.pledge-list-head .filter-pills { max-width: 100%; }
.pledge-item h4, .pledge-quote, .evidence-text, .card-content h3,
.proposal-card h3, .linked-proposals h3, .search-card h3 { overflow-wrap: anywhere; }
.profile-intro h1 { overflow-wrap: break-word; font-size: clamp(1.9rem, 8.5vw, 4rem); }
.stratum-head { flex-wrap: wrap; }
.topic-chip { max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 420px) {
  .stat-row { gap: 6px; }
  .stat-tile { padding: 11px 10px; }
  .stat-tile strong { font-size: 1.15rem; }
  .stat-tile span { font-size: .64rem; }
}
.verdict-chip, .count-pill { flex-shrink: 0; white-space: nowrap; }
.stat-tile span { line-height: 1.3; }
.evidence-foot > span { min-width: 0; flex: 1 1 12rem; }

/* Reveals: content that appears on a tab switch fades in quickly instead of popping. */
.tab-panel { transition: opacity 200ms var(--ease-out); }
@starting-style { .tab-panel { opacity: 0; } }
.will-reveal { opacity: 1; transform: none; }
@media (prefers-reduced-motion: no-preference) {
  .tab-panel { transition: opacity 200ms var(--ease-out), transform 200ms var(--ease-out); }
  @starting-style { .tab-panel { transform: translateY(6px); } }
  /* The composition bar reads left to right once, the first time it is shown. */
  .composition-bar { clip-path: inset(0 0 0 0 round 999px); transition: clip-path 520ms var(--ease-out); }
  @starting-style { .composition-bar { clip-path: inset(0 100% 0 0 round 999px); } }
  .interval-point { transition: transform 200ms var(--ease-out); }
  .will-reveal:not(.is-revealed) { opacity: 0; transform: translateY(8px); }
  .will-reveal.is-revealed {
    opacity: 1; transform: none;
    transition: opacity 420ms var(--ease-out), transform 420ms var(--ease-out);
    transition-delay: var(--reveal-delay, 0ms);
  }
}

/* Liquid glass ------------------------------------------------------------
   One material for every surface that floats over imagery: translucent fill,
   heavy backdrop blur, a bright top edge where light catches it, and a soft
   inner glow. Every portrait gets the same warm grade so photos from
   different sources read as one set. */
:root {
  --glass-fill: rgba(28, 26, 30, 0.55);
  --glass-fill-strong: rgba(22, 20, 24, 0.72);
  --glass-edge: rgba(255, 255, 255, 0.16);
  --glass-edge-top: rgba(255, 255, 255, 0.32);
  --glass-blur: blur(22px) saturate(160%);
  --glass-shadow: 0 1px 0 rgba(255, 255, 255, 0.08) inset, 0 -1px 0 rgba(0, 0, 0, 0.35) inset, 0 18px 40px rgba(0, 0, 0, 0.45);
}

.glass, .stat-tile, .profile-tabs, .profile-section-nav, .card-record, .politician-card, .photo-credit, .hero-back {
  background: var(--glass-fill);
  border: 1px solid var(--glass-edge);
  border-top-color: var(--glass-edge-top);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  box-shadow: var(--glass-shadow);
}
.politician-card { background: linear-gradient(180deg, rgba(40, 36, 40, 0.62), rgba(20, 19, 22, 0.66)); }
.stat-tile.is-accent { background: linear-gradient(160deg, rgba(255, 107, 26, 0.32), rgba(255, 107, 26, 0.08)); border-color: rgba(255, 138, 61, 0.45); }

/* Portrait frame: glass ring, warm grade, monogram fallback in the same material. */
.glass-portrait {
  position: relative; overflow: hidden; isolation: isolate;
  color: var(--ink);
  background:
    radial-gradient(120% 90% at 30% 15%, rgba(255, 138, 61, 0.55), transparent 60%),
    radial-gradient(90% 80% at 80% 100%, rgba(255, 107, 26, 0.35), transparent 70%),
    linear-gradient(160deg, #2a2023, #141215);
}
.glass-portrait::after {
  /* Specular highlight + edge light, shared by photo and monogram. */
  content: ""; position: absolute; inset: 0; z-index: 2; pointer-events: none; border-radius: inherit;
  background: linear-gradient(155deg, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0) 38%),
              linear-gradient(0deg, rgba(255, 107, 26, 0.18), rgba(255, 107, 26, 0) 45%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}
.glass-portrait .monogram {
  position: absolute; inset: 0; display: grid; place-items: center;
  font-weight: 800; letter-spacing: -.04em; color: rgba(255, 244, 236, 0.92);
  text-shadow: 0 2px 18px rgba(255, 107, 26, 0.55);
}
.glass-portrait img {
  position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%;
  object-fit: cover; object-position: 50% 22%;
  filter: saturate(1.06) contrast(1.05) brightness(0.97);
}
.politician-card .glass-portrait { width: 64px; height: 64px; min-height: 0; border-radius: 50%; font-size: 1.15rem; box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.06), 0 10px 26px rgba(0, 0, 0, 0.45); }
.politician-card .glass-portrait .monogram { font-size: 1.15rem; }

/* Profile hero: photo first, like the mobile mockup; content floats on glass. */
.profile-hero { background: #0f0e10; }
.hero-media { position: relative; min-height: 380px; }
.hero-media .glass-portrait.is-hero { position: absolute; inset: 0; min-height: 0; border-radius: 0; font-size: clamp(3rem, 7vw, 5rem); }
.hero-media .glass-portrait.is-hero::before {
  /* Fade into the content column (right on desktop, bottom on mobile). */
  content: ""; position: absolute; inset: 0; z-index: 2; pointer-events: none;
  background: linear-gradient(90deg, rgba(15, 14, 16, 0) 55%, rgba(15, 14, 16, 0.92) 100%);
}
.photo-credit {
  position: absolute; left: 12px; bottom: 12px; z-index: 3; max-width: calc(100% - 24px);
  padding: 5px 10px; border-radius: 999px; color: rgba(255, 244, 236, 0.86);
  font-size: .64rem; font-weight: 600; line-height: 1.3; text-decoration: none;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
@media (hover: hover) and (pointer: fine) {
  .photo-credit:hover { color: #fff; border-color: rgba(255, 255, 255, 0.35); }
}

@media (max-width: 640px) {
  .profile-hero { grid-template-columns: 1fr; }
  .hero-media { min-height: 0; aspect-ratio: 4 / 4.2; max-height: 460px; }
  .hero-media .glass-portrait.is-hero::before {
    background: linear-gradient(180deg, rgba(15, 14, 16, 0) 52%, rgba(15, 14, 16, 0.96) 100%);
  }
  .profile-intro { margin-top: -64px; position: relative; z-index: 3; padding-top: 0; }
  .photo-credit { top: 12px; right: 12px; left: auto; bottom: auto; max-width: 70%; }
}

@media (prefers-reduced-transparency: reduce) {
  .glass, .stat-tile, .profile-tabs, .profile-section-nav, .card-record, .politician-card, .photo-credit, .hero-back {
    -webkit-backdrop-filter: none; backdrop-filter: none; background: var(--surface-2);
  }
}
@media (prefers-contrast: more) {
  .glass, .stat-tile, .profile-tabs, .profile-section-nav, .card-record, .politician-card { border-color: rgba(255, 255, 255, 0.5); }
}

@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: .01ms !important; }
  .will-reveal, .will-reveal:not(.is-revealed) { opacity: 1; transform: none; transition: none; }
}

@media (max-width: 900px) {
  .detail-grid, .proposal-grid, .pledge-list { grid-template-columns: 1fr; }
  .profile-hero { grid-template-columns: 200px 1fr; }
  .site-search input { width: min(200px, 30vw); }
  .pledge-summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
  .pledge-summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .filter-pills {
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
  }
  html { scroll-padding-top: var(--profile-scroll-pad, 11rem); }
  .header-inner { min-height: 0; padding: 12px 0; flex-wrap: wrap; gap: 12px; }
  .institutional-note { display: none; }
  .site-search { order: 2; width: 100%; }
  .site-search input { width: 100%; flex: 1; }
  .public-nav { order: 3; width: 100%; margin-left: 0; }
  main { width: calc(100vw - 32px); padding-top: 34px; }
  .hero { margin-bottom: 44px; }
  .archive-heading, .sources-heading, .method-note { align-items: flex-start; flex-direction: column; }
  .politician-grid { grid-template-columns: 1fr; }
  .profile-hero { grid-template-columns: 1fr; border-radius: var(--radius-lg); }
  .profile-tabs { position: static; }
  .profile-section-nav {
    flex-wrap: nowrap; gap: 4px; overflow-x: auto; scrollbar-width: none;
  }
  .profile-section-nav::-webkit-scrollbar { display: none; }
  .career-timeline::before { left: 6px; }
  .career-entry { grid-template-columns: 12px minmax(0, 1fr); column-gap: 12px; padding-bottom: 22px; }
  .career-entry time { grid-column: 2; grid-row: 1; }
  .career-marker { grid-column: 1; grid-row: 1 / span 2; }
  .career-body { grid-column: 2; grid-row: 2; }
  .header-facts .fact { grid-template-columns: 1fr; }
  .stat-row { gap: 8px; }
  .stat-tile { padding: 12px; }
  .stat-tile strong { font-size: 1.3rem; }
  .fact { grid-template-columns: 1fr; gap: 3px; }
  .source-top { flex-direction: column; gap: 10px; }
  .group-membership, .party-affiliation, .territorial-office { flex-direction: column; gap: 10px; }
  .proposal-timeline li { grid-template-columns: 1fr; gap: 6px; }
  .sources-summary { text-align: left; }
  footer { flex-direction: column; }
}
