:root {
  color-scheme: light;
  color-scheme: only light;
  --ink: #10233d;
  --navy: #09182c;
  --navy-soft: #152b47;
  --paper: #f4f7fa;
  --white: #ffffff;
  --line: #bdcbd9;
  --muted: #46596f;
  --chart-track: #e3eaf1;
  --chart-blue: #1d527c;
  --chart-green: #14624f;
  --yellow: #f4c95d;
  --yellow-soft: #fff5d6;
  --blue-soft: #eaf1f8;
  --green: #15735e;
  --green-soft: #e6f4ef;
  --radius: 12px;
  --shadow: 0 16px 44px rgba(9, 24, 44, .08);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; background: var(--paper); color: var(--ink); font-size: 16px; line-height: 1.5; }
[hidden] { display: none !important; }
button, input, select { font: inherit; }
a { color: inherit; }

.skip-link { position: fixed; left: 1rem; top: -4rem; z-index: 20; background: var(--yellow); color: var(--navy); padding: .65rem 1rem; border-radius: 8px; font-weight: 750; }
.skip-link:focus { top: 1rem; }

.topbar { min-height: 66px; display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; padding: .75rem clamp(1rem, 4vw, 4rem); color: white; background: var(--navy); border-bottom: 3px solid var(--yellow); }
.brand { display: inline-flex; align-items: center; flex: 0 1 230px; max-width: 100%; color: white; text-decoration: none; }
.brand-logo { display: block; width: 230px; max-width: 100%; height: auto; }
.product-logo { display: block; width: 310px; max-width: 100%; height: auto; margin: 0 0 1rem; }
.source-status { color: #cdd8e5; font-size: .82rem; text-align: right; }

.app-shell { width: min(1540px, 100%); margin: 0 auto; padding: 1.6rem clamp(1rem, 3.2vw, 3rem) 3rem; }
.control-bar { display: flex; align-items: end; justify-content: space-between; gap: 2rem; margin-bottom: 1.4rem; }
.eyebrow { margin: 0 0 .25rem; color: #56687d; font-size: .8rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
h1 { margin: 0; max-width: 780px; color: var(--navy); font-family: var(--font-sans); font-size: clamp(1.9rem, 3.4vw, 3rem); line-height: 1.06; letter-spacing: -.035em; }
.scope-pills { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .45rem; }
.scope-pills span { padding: .38rem .7rem; border: 1px solid #c7d2de; border-radius: 999px; background: rgba(255,255,255,.55); color: #42556b; font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.view-switch { display: inline-flex; gap: .2rem; margin: 0 0 1rem; padding: .24rem; border: 1px solid #cbd6e1; border-radius: 9px; background: #eaf0f5; }
.view-switch button { padding: .55rem .9rem; border: 0; border-radius: 7px; background: transparent; color: #55677d; font-size: .82rem; font-weight: 800; cursor: pointer; }
.view-switch button[aria-pressed="true"] { background: var(--navy); color: var(--yellow); box-shadow: 0 3px 10px rgba(9,24,44,.16); }

.home-view { display: grid; gap: 1rem; }
.home-hero { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(260px, .45fr); gap: clamp(1.5rem, 4vw, 4rem); align-items: center; padding: clamp(1.5rem, 4vw, 3.5rem); border-radius: 16px; background: linear-gradient(135deg, #09182c 0%, #163c63 100%); color: white; box-shadow: var(--shadow); }
.home-hero h2 { max-width: 850px; color: white; font-size: clamp(2rem, 4.2vw, 4.2rem); }
.home-hero > div > p:not(.eyebrow) { max-width: 780px; margin: 1rem 0 0; color: #d3deea; font-size: clamp(.94rem, 1.2vw, 1.08rem); }
.home-hero .eyebrow { color: var(--yellow); }
.home-hero aside { padding: 1.25rem; border: 1px solid rgba(255,255,255,.24); border-radius: 12px; background: rgba(255,255,255,.08); }
.home-hero aside span { color: #d3deea; font-size: .74rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.home-hero aside strong { display: block; margin: .3rem 0; color: var(--yellow); font-family: var(--font-sans); font-size: clamp(2.1rem, 4vw, 3.5rem); line-height: 1; }
.home-hero aside p { margin: .5rem 0 0; color: #d6e0ea; font-size: .78rem; }
.home-actions { display: flex; flex-wrap: wrap; gap: .65rem; margin-top: 1.25rem; }
.home-actions button { padding: .72rem 1rem; border: 1px solid var(--yellow); border-radius: 8px; background: var(--yellow); color: var(--navy); font-size: .8rem; font-weight: 850; cursor: pointer; }
.home-actions button + button { border-color: #8da2b8; background: transparent; color: white; }
.home-section { padding: clamp(1.25rem, 3vw, 2rem); border: 1px solid var(--line); border-radius: 14px; background: white; box-shadow: 0 5px 18px rgba(9,24,44,.035); }
.home-section > header { max-width: 900px; margin-bottom: 1.2rem; }
.home-section > header h2 { font-size: clamp(1.55rem, 2.4vw, 2.35rem); }
.home-section > header > p:not(.eyebrow) { margin: .55rem 0 0; color: var(--muted); }
.election-flow { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: .65rem; }
.election-flow article { position: relative; min-height: 210px; padding: 1rem; overflow: hidden; border-radius: 10px; background: var(--navy); color: white; }
.election-flow article::after { content: ''; position: absolute; right: -26px; bottom: -34px; width: 90px; height: 90px; border: 16px solid rgba(244,201,93,.13); border-radius: 50%; }
.flow-scope { display: inline-block; padding: .2rem .42rem; border-radius: 999px; background: rgba(244,201,93,.16); color: var(--yellow); font-size: .66rem; font-weight: 850; letter-spacing: .06em; text-transform: uppercase; }
.election-flow strong, .election-flow b { position: relative; z-index: 1; display: block; }
.election-flow strong { margin-top: .8rem; font-family: var(--font-sans); font-size: 1.13rem; }
.election-flow b { margin-top: .25rem; color: var(--yellow); font-size: .75rem; }
.election-flow p { position: relative; z-index: 1; margin: .8rem 0 0; color: #cdd9e5; font-size: .74rem; line-height: 1.5; }
.system-explainer { display: grid; grid-template-columns: repeat(3, 1fr); gap: .65rem; margin-top: .8rem; }
.system-explainer article { display: flex; gap: .75rem; padding: .9rem; border-radius: 9px; background: var(--blue-soft); }
.system-explainer article > span { flex: 0 0 auto; color: #7890a8; font-family: var(--font-sans); font-size: 1.3rem; font-weight: 800; }
.system-explainer strong { color: var(--navy); font-size: .8rem; }
.system-explainer p { margin: .18rem 0 0; color: #52677e; font-size: .72rem; }
.home-source-line { margin: 1rem 0 0; color: var(--muted); font-size: .72rem; }
.home-source-line a { color: #315c87; font-weight: 750; }
.process-flow { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; margin: 0; padding: 0; list-style: none; }
.process-flow li { position: relative; padding: .75rem 1rem; border-top: 3px solid #dce5ee; }
.process-flow li::after { content: '→'; position: absolute; top: -.9rem; right: -.4rem; display: grid; place-items: center; width: 1.7rem; height: 1.7rem; border-radius: 50%; background: var(--yellow); color: var(--navy); font-weight: 900; }
.process-flow li:last-child::after { display: none; }
.process-flow span { color: #71859b; font-size: .7rem; font-weight: 850; }
.process-flow strong { display: block; color: var(--navy); font-family: var(--font-sans); font-size: 1.05rem; }
.process-flow p { margin: .18rem 0 0; color: var(--muted); font-size: .72rem; }
.disclaimer-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: .65rem; }
.disclaimer-grid article { padding: 1rem; border-left: 4px solid var(--yellow); border-radius: 9px; background: #fffaf0; }
.disclaimer-grid strong { color: var(--navy); font-size: .78rem; }
.disclaimer-grid p { margin: .35rem 0 0; color: #675d43; font-size: .72rem; }

.filters { display: grid; grid-template-columns: minmax(220px, 1.5fr) repeat(4, minmax(125px, .65fr)) minmax(190px, .8fr); align-items: end; gap: .8rem; padding: 1rem; margin-bottom: 1rem; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 5px 18px rgba(9,24,44,.035); }
.filters label { display: grid; gap: .35rem; color: #43536a; font-size: .78rem; font-weight: 750; letter-spacing: .03em; }
.search-control { position: relative; display: block; }
.search-control svg { position: absolute; left: .8rem; top: 50%; width: 19px; fill: none; stroke: #718096; stroke-width: 1.8; transform: translateY(-50%); }
input[type="search"], select { width: 100%; min-height: 44px; border: 1px solid #bdc9d5; border-radius: 8px; background: white; color: var(--ink); outline: none; }
input[type="search"] { padding: .65rem .8rem .65rem 2.65rem; }
select { padding: .65rem 2.2rem .65rem .8rem; }
input:focus, select:focus, button:focus-visible, a:focus-visible { outline: 3px solid rgba(244,201,93,.65); outline-offset: 2px; border-color: #8c7537; }
.check-filter { min-height: 44px; grid-template-columns: 20px 1fr !important; align-items: center; gap: .6rem !important; padding: .55rem .7rem; border: 1px solid #d1dae3; border-radius: 8px; }
.check-filter input { width: 18px; height: 18px; accent-color: var(--navy-soft); }

.workspace { display: grid; grid-template-columns: minmax(260px, 340px) minmax(0, 1fr); min-height: 690px; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.candidate-panel { display: flex; flex-direction: column; min-width: 0; background: #f8fafc; border-right: 1px solid var(--line); }
.panel-heading { display: grid; gap: .1rem; padding: 1rem 1.1rem; border-bottom: 1px solid var(--line); }
.panel-heading strong { color: var(--navy); font-size: .94rem; }
.panel-heading span { color: var(--muted); font-size: .76rem; }
.candidate-list { overflow: auto; max-height: 760px; overscroll-behavior: contain; }
.candidate-card { width: 100%; display: grid; gap: .28rem; padding: .95rem 1.05rem; border: 0; border-bottom: 1px solid #e3e9ef; background: transparent; color: inherit; text-align: left; cursor: pointer; transition: background .15s ease, box-shadow .15s ease; }
.candidate-card:hover { background: var(--blue-soft); }
.candidate-card[aria-selected="true"] { background: var(--white); box-shadow: inset 4px 0 var(--yellow); }
.candidate-name { color: var(--navy); font-size: .92rem; font-weight: 780; line-height: 1.25; }
.candidate-meta { display: flex; align-items: center; justify-content: space-between; gap: .6rem; color: var(--muted); font-size: .74rem; }
.party-tag { color: #223b5b; font-weight: 800; }
.history-tag { display: inline-flex; align-items: center; gap: .3rem; }
.history-tag::before { content: ""; width: 6px; height: 6px; background: var(--green); border-radius: 50%; }
.list-limit { padding: 1rem; color: var(--muted); font-size: .78rem; text-align: center; }
.empty-list { padding: 2rem 1rem; color: var(--muted); text-align: center; }

.candidate-detail { min-width: 0; padding: clamp(1.3rem, 3vw, 2.5rem); background: white; }
.detail-head { display: grid; grid-template-columns: 1fr auto; gap: 1.5rem; align-items: start; padding-bottom: 1.5rem; border-bottom: 1px solid var(--line); }
.candidate-identity { display: flex; align-items: center; gap: 1rem; min-width: 0; }
.candidate-photo, .candidate-initial { flex: 0 0 auto; width: 68px; height: 68px; border-radius: 50%; border: 3px solid white; box-shadow: 0 0 0 1px #cbd6e1; object-fit: cover; }
.candidate-initial { display: grid; place-items: center; background: var(--navy-soft); color: var(--yellow); font-family: var(--font-sans); font-size: 1.8rem; font-weight: 800; }
.detail-kicker { margin: 0 0 .35rem; color: var(--muted); font-size: .78rem; font-weight: 760; text-transform: uppercase; letter-spacing: .08em; }
h2 { margin: 0; color: var(--navy); font-family: var(--font-sans); font-size: clamp(1.7rem, 3vw, 2.7rem); line-height: 1.04; letter-spacing: -.035em; }
.ballot-name { margin: .45rem 0 0; color: #526277; font-size: .92rem; }
.current-badge { display: grid; justify-items: end; gap: .35rem; }
.current-badge strong { display: inline-block; padding: .42rem .7rem; border-radius: 6px; background: var(--yellow-soft); color: #6d5207; font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; }
.current-badge span { color: var(--muted); font-size: .74rem; }

.metric-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: .8rem; margin: 1.25rem 0; }
.metric { min-height: 108px; padding: 1rem; border: 1px solid var(--line); border-radius: 10px; background: #fbfcfd; }
.metric span { display: block; color: var(--muted); font-size: .76rem; font-weight: 700; }
.metric strong { display: block; margin-top: .18rem; color: var(--navy); font-family: var(--font-sans); font-size: clamp(1.15rem, 1.7vw, 1.55rem); }
.metric small { display: block; margin-top: .1rem; color: #6d7b8d; font-size: .72rem; }

.detail-grid { display: grid; grid-template-columns: minmax(0, .9fr) minmax(360px, 1.25fr); gap: clamp(1.5rem, 4vw, 3.5rem); }
.section-title { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin: 1rem 0 .8rem; }
.section-title h3 { margin: 0; color: var(--navy); font-size: 1rem; letter-spacing: -.01em; }
.section-title span { color: var(--muted); font-size: .74rem; }
.facts { margin: 0; }
.facts div { display: grid; grid-template-columns: minmax(120px, .85fr) 1.2fr; gap: 1rem; padding: .72rem 0; border-bottom: 1px solid #edf1f4; }
.facts dt { color: var(--muted); font-size: .8rem; }
.facts dd { margin: 0; color: #263c58; font-size: .84rem; font-weight: 680; text-align: right; }
.identity-note { display: flex; gap: .65rem; margin-top: 1rem; padding: .8rem; border-radius: 8px; background: var(--blue-soft); color: #34506e; font-size: .76rem; }
.identity-note svg { flex: 0 0 auto; width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2; }
.candidate-source-panel { margin-top: 1rem; padding: 1rem; border: 1px solid var(--line); border-radius: 10px; background: #f8fafc; }
.candidate-source-panel > .section-title { margin-top: 0; }
.candidate-source-links { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .65rem; }
.candidate-source-links > a, .candidate-source-links > div { display: grid; gap: .25rem; min-height: 92px; padding: .85rem; border: 1px solid #d6e0e9; border-radius: 8px; background: white; text-decoration: none; }
.candidate-source-links > a:hover { border-color: #829bb4; background: var(--blue-soft); }
.candidate-source-links strong { color: var(--navy); font-size: .78rem; }
.candidate-source-links span { color: #5a6c80; font-size: .72rem; line-height: 1.45; }

.timeline { position: relative; display: grid; gap: .72rem; margin: 0; padding: 0; list-style: none; }
.timeline::before { content: ""; position: absolute; left: 35px; top: 10px; bottom: 20px; width: 1px; background: #ccd7e2; }
.timeline-item { position: relative; display: grid; grid-template-columns: 70px 1fr; gap: .8rem; }
.timeline-year { position: relative; z-index: 1; align-self: start; padding-top: .8rem; background: white; color: var(--navy); font-size: .8rem; font-weight: 850; }
.timeline-year::after { content: ""; position: absolute; right: 0; top: 1.08rem; width: 7px; height: 7px; border: 2px solid white; border-radius: 50%; background: #8090a3; box-shadow: 0 0 0 1px #8090a3; }
.timeline-item.elected .timeline-year::after { background: var(--green); box-shadow: 0 0 0 1px var(--green); }
.timeline-card { padding: .8rem .9rem; border: 1px solid #dce3ea; border-radius: 9px; }
.timeline-card strong { display: block; color: #1d3552; font-size: .88rem; }
.timeline-card p { margin: .2rem 0 .55rem; color: var(--muted); font-size: .76rem; }
.timeline-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem; align-items: center; }
.result-badge { padding: .24rem .45rem; border-radius: 4px; background: #eef2f6; color: #536377; font-size: .69rem; font-weight: 780; text-transform: uppercase; }
.result-badge.elected { background: var(--green-soft); color: var(--green); }
.source-link { color: #365f8b; font-size: .72rem; font-weight: 700; text-underline-offset: 2px; }
.method-note { margin-top: 1rem; padding: .75rem .85rem; border-left: 3px solid var(--yellow); background: #fffaf0; color: #65572e; font-size: .75rem; }

.detail-tabs { display: flex; gap: .2rem; margin: .25rem 0 1rem; border-bottom: 1px solid var(--line); overflow-x: auto; }
.detail-tabs button { flex: 0 0 auto; padding: .72rem .85rem; border: 0; border-bottom: 3px solid transparent; background: transparent; color: #66758a; font-size: .8rem; font-weight: 760; cursor: pointer; }
.detail-tabs button[aria-selected="true"] { color: var(--navy); border-bottom-color: var(--yellow); }
.tab-panel[hidden] { display: none; }
.campaign-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .85rem; }
.data-card { min-width: 0; padding: 1rem; border: 1px solid var(--line); border-radius: 10px; background: #fbfcfd; }
.money-row { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; padding: .42rem 0; color: var(--muted); font-size: .78rem; }
.money-row strong { color: var(--navy); font-size: .9rem; }
.bar { height: 12px; margin: .15rem 0 .3rem; overflow: hidden; border-radius: 99px; background: var(--chart-track); }
.bar i { display: block; height: 100%; border-radius: inherit; background: var(--navy-soft); }
.bar.payment i { background: var(--chart-green); }
.bar-label { margin: 0 0 .7rem; color: var(--muted); font-size: .7rem; }
.inspect-button { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-top: .75rem; padding: .62rem .72rem; border: 1px solid #b9c8d7; border-radius: 7px; background: white; color: #24486e; font-size: .78rem; font-weight: 800; cursor: pointer; }
.inspect-button:hover { background: var(--blue-soft); border-color: #8fa7bf; }
.category-card { align-content: start; }
.category-bars { display: grid; gap: .7rem; margin-top: .7rem; }
.category-row { display: grid; gap: .22rem; }
.category-row > div:first-child { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; }
.category-row span { color: #46596f; font-size: .76rem; font-weight: 700; }
.category-row strong { color: var(--navy); font-size: .78rem; white-space: nowrap; }
.category-row small { color: var(--muted); font-size: .68rem; }
.category-track { height: 12px; overflow: hidden; border-radius: 999px; background: var(--chart-track); }
.category-track i { display: block; height: 100%; border-radius: inherit; background: var(--chart-blue); }
.money-total { margin: -.2rem 0 .8rem; color: var(--navy); font-family: var(--font-sans); font-size: 1.8rem; font-weight: 800; }
.asset-comparison { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; margin: 0 0 .85rem; }
.asset-comparison div { display: grid; align-content: start; gap: .12rem; padding: .72rem; border-radius: 8px; background: var(--blue-soft); }
.asset-comparison span { color: #52667d; font-size: .72rem; }
.asset-comparison strong { color: var(--navy); font-size: .9rem; }
.asset-comparison small { color: #61758b; font-size: .72rem; }
.comparison-note { margin: .75rem 0 0; color: var(--muted); font-size: .74rem; line-height: 1.45; }
.asset-list, .external-role-list { display: grid; gap: .55rem; margin: 0; padding: 0; list-style: none; }
.asset-list li { display: grid; grid-template-columns: 1fr auto; gap: .1rem .8rem; padding-top: .55rem; border-top: 1px solid #e5ebf0; }
.asset-list span { color: #3f5269; font-size: .75rem; font-weight: 700; }
.asset-list strong { color: var(--navy); font-size: .78rem; }
.asset-list small { grid-column: 1 / -1; color: var(--muted); font-size: .68rem; line-height: 1.35; }
.social-links { display: flex; flex-wrap: wrap; gap: .5rem; }
.social-links a { padding: .45rem .65rem; border: 1px solid #cdd8e3; border-radius: 6px; color: #345d88; font-size: .74rem; font-weight: 700; text-decoration: none; }
.social-links a:hover { background: var(--blue-soft); }
.empty-inline { color: var(--muted); font-size: .78rem; }
.role-list { display: grid; gap: .75rem; margin-bottom: .85rem; }
.role-card { display: flex; justify-content: space-between; gap: 1rem; padding: 1rem; border-radius: 10px; background: var(--navy); color: white; }
.institution-label { color: var(--yellow); font-size: .7rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.role-card h3 { margin: .2rem 0; font-family: var(--font-sans); font-size: 1.2rem; }
.role-card p { margin: 0; color: #cbd6e3; font-size: .74rem; }
.role-status { display: grid; justify-items: end; align-content: start; gap: .5rem; text-align: right; }
.role-status strong { color: #d8e3ef; font-size: .72rem; text-transform: uppercase; }
.role-status a { color: var(--yellow); font-size: .72rem; font-weight: 750; }
.performance-section { margin: 1rem 0; padding: 1rem; border: 1px solid var(--line); border-radius: 10px; background: #fbfcfd; }
.performance-section > .section-title { margin-top: 0; }
.performance-metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(145px, 1fr)); gap: .6rem; }
.performance-metrics div { min-width: 0; padding: .75rem; border-radius: 8px; background: var(--navy); color: white; }
.performance-metrics span { display: block; min-height: 2.7em; color: #cbd6e3; font-size: .72rem; line-height: 1.35; }
.performance-metrics strong { display: block; margin-top: .2rem; color: var(--yellow); font-family: var(--font-sans); font-size: 1.35rem; }
.plain-summary-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .65rem; margin-top: .75rem; }
.plain-summary-grid article { padding: .8rem; border-left: 4px solid var(--yellow); border-radius: 7px; background: #f1f5f8; }
.plain-summary-grid span { color: #34516e; font-size: .68rem; font-weight: 850; letter-spacing: .06em; text-transform: uppercase; }
.plain-summary-grid p { margin: .3rem 0 0; color: #3f5269; font-size: .75rem; line-height: 1.5; }
.performance-details { display: grid; grid-template-columns: 1fr 1fr; gap: .65rem; margin-top: .75rem; }
.performance-details details { min-width: 0; border: 1px solid #d9e2eb; border-radius: 8px; background: white; overflow: hidden; }
.performance-details summary { display: flex; justify-content: space-between; gap: .75rem; padding: .72rem; color: #294766; font-size: .78rem; font-weight: 800; cursor: pointer; }
.performance-details summary span { color: var(--muted); font-size: .7rem; font-weight: 650; }
.performance-details ul { max-height: 360px; display: grid; gap: 0; margin: 0; padding: 0 .75rem .75rem; overflow: auto; list-style: none; }
.performance-details li { padding: .65rem 0; border-top: 1px solid #e7ecf1; }
.performance-details li div { display: flex; justify-content: space-between; gap: .5rem; }
.performance-details li strong { color: var(--navy); font-size: .76rem; }
.performance-details li span { color: var(--muted); font-size: .68rem; text-align: right; }
.performance-details li p { margin: .25rem 0; color: #526377; font-size: .72rem; line-height: 1.4; }
.performance-details li a { color: #345d88; font-size: .7rem; font-weight: 750; }
.detail-action { margin: 0 .75rem .75rem; width: calc(100% - 1.5rem); }
.vote-action { margin-top: .75rem; }
.presence-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .65rem; margin-top: .75rem; }
.presence-card { padding: .8rem; border: 1px solid #d9e2eb; border-radius: 8px; background: white; }
.presence-card-head { display: flex; align-items: end; justify-content: space-between; gap: 1rem; padding-bottom: .6rem; border-bottom: 1px solid #e5ebf0; }
.presence-card-head span { color: var(--muted); font-size: .68rem; font-weight: 700; text-transform: uppercase; }
.presence-card-head h4 { margin: .15rem 0 0; color: var(--navy); font-family: var(--font-sans); font-size: 1.05rem; }
.presence-card-head > strong { color: var(--green); font-family: var(--font-sans); font-size: 1.35rem; }
.presence-breakdown { display: grid; grid-template-columns: repeat(3, 1fr); gap: .4rem; margin: .65rem 0; }
.presence-breakdown div { display: grid; gap: .08rem; padding: .5rem; border-radius: 6px; background: #f2f5f8; }
.presence-breakdown span { min-height: 2.4em; color: #526377; font-size: .66rem; line-height: 1.25; }
.presence-breakdown strong { color: var(--navy); font-size: 1.05rem; }
.presence-breakdown small { color: var(--muted); font-size: .63rem; }
.presence-breakdown .absence-alert { background: #fff1ef; }
.presence-breakdown .absence-alert strong { color: #9a352c; }
.public-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .85rem; }
.budget-amendment-card { grid-column: 1 / -1; }
.amendment-stage-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .55rem; }
.amendment-stage-grid > div { padding: .75rem; border-radius: 8px; background: var(--blue-soft); }
.amendment-stage-grid span, .amendment-stage-grid small { display: block; color: #53677e; font-size: .8rem; }
.amendment-stage-grid strong { display: block; margin: .2rem 0; color: var(--navy); font-size: .9rem; overflow-wrap: anywhere; }
.amendment-progress { display: grid; gap: .55rem; margin-top: .85rem; }
.amendment-progress > div { display: grid; grid-template-columns: 90px minmax(0, 1fr) auto; align-items: center; gap: .6rem; color: #42586e; font-size: .8rem; }
.amendment-progress i { height: 12px; overflow: hidden; border-radius: 999px; background: var(--chart-track); }
.amendment-progress b { display: block; height: 100%; border-radius: inherit; background: var(--chart-blue); }
.amendment-progress > div:last-child b { background: var(--chart-green); }
.amendment-destination-title { margin-top: 1.2rem; }
.amendment-records { margin-top: .9rem; border: 1px solid #d7e0e9; border-radius: 8px; background: white; }
.amendment-records summary { display: flex; justify-content: space-between; gap: 1rem; padding: .75rem; color: #294766; font-size: .875rem; font-weight: 800; cursor: pointer; }
.amendment-records > div { max-height: 430px; padding: 0 .75rem .75rem; overflow: auto; }
.amendment-records article { padding: .65rem 0; border-top: 1px solid #e6ebf0; }
.amendment-records article > div { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem; }
.amendment-records article strong, .amendment-records article span { color: var(--navy); font-size: .875rem; }
.amendment-records article p { margin: .35rem 0; color: #43586e; font-size: .875rem; }
.amendment-records article small { color: #53677e; font-size: .8rem; }
.amendment-source { display: inline-block; margin-top: .75rem; }
.expense-years { display: grid; gap: .5rem; }
.expense-years div { display: grid; grid-template-columns: 1fr auto; padding: .55rem 0; border-top: 1px solid #e5ebf0; }
.expense-years span { color: var(--muted); font-size: .74rem; }
.expense-years strong { color: var(--navy); font-size: .85rem; }
.expense-years small { color: var(--muted); font-size: .68rem; }
.external-role-list li { display: grid; gap: .15rem; padding: .55rem 0; border-top: 1px solid #e5ebf0; }
.external-role-list strong { color: var(--navy); font-size: .8rem; }
.external-role-list span { color: var(--muted); font-size: .72rem; }
.empty-public { padding: 2.5rem 1rem; border: 1px dashed #ccd7e2; border-radius: 10px; color: var(--muted); text-align: center; }
.empty-public strong { color: var(--navy); }
.empty-public p { max-width: 580px; margin: .35rem auto 0; font-size: .78rem; }

.record-dialog { width: min(980px, calc(100vw - 2rem)); max-height: min(82vh, 760px); padding: 0; border: 0; border-radius: 12px; box-shadow: 0 28px 90px rgba(9,24,44,.35); color: var(--ink); }
.record-dialog::backdrop { background: rgba(5, 15, 28, .62); backdrop-filter: blur(2px); }
.dialog-head { position: sticky; top: 0; z-index: 2; display: flex; align-items: start; justify-content: space-between; gap: 1rem; padding: 1rem 1.1rem; border-bottom: 1px solid var(--line); background: white; }
.dialog-head h3 { margin: 0; color: var(--navy); font-family: var(--font-sans); font-size: 1.4rem; }
.dialog-head p:not(.eyebrow) { margin: .25rem 0 0; color: var(--muted); font-size: .76rem; }
.dialog-head button { padding: .45rem .7rem; border: 1px solid #becad6; border-radius: 6px; background: white; color: var(--navy); font-size: .76rem; font-weight: 800; cursor: pointer; }
.dialog-filters { display: flex; flex-wrap: wrap; gap: .65rem; padding: .75rem 1.1rem; border-bottom: 1px solid var(--line); background: #f8fafc; }
.dialog-filters label { display: grid; gap: .25rem; min-width: min(280px, 100%); color: #536377; font-size: .7rem; font-weight: 800; }
.dialog-filters select, .dialog-filters input { min-height: 38px; padding: .45rem .55rem; border: 1px solid #bdc9d6; border-radius: 6px; background: white; color: var(--navy); font: inherit; }
.dialog-table-wrap { max-height: 62vh; overflow: auto; }
.record-dialog table { width: 100%; border-collapse: collapse; font-size: .76rem; }
.record-dialog th { position: sticky; top: 0; z-index: 1; padding: .65rem .75rem; background: #edf2f7; color: #40536a; text-align: left; }
.record-dialog td { padding: .65rem .75rem; border-top: 1px solid #e3e9ef; vertical-align: top; }
.record-dialog td:nth-child(1), .record-dialog td:nth-child(3), .record-dialog td:nth-child(4) { white-space: nowrap; }
.legislative-dialog td:nth-child(3) { white-space: normal; }
.record-dialog td strong, .record-dialog td small { display: block; }
.record-dialog td small { max-width: 460px; margin-top: .15rem; color: var(--muted); font-size: .7rem; }
.record-dialog td a { color: #345d88; font-weight: 750; }
.dialog-more { display: block; width: calc(100% - 2rem); margin: .8rem 1rem 1rem; padding: .65rem; border: 1px solid #b9c8d7; border-radius: 7px; background: white; color: #24486e; font-size: .78rem; font-weight: 800; cursor: pointer; }
.dialog-more[hidden] { display: none; }

.party-view { display: grid; gap: 1rem; }
.party-filters { display: grid; grid-template-columns: repeat(6, minmax(135px, 1fr)) auto; align-items: end; gap: .65rem; padding: 1rem; border: 1px solid var(--line); border-radius: var(--radius); background: white; box-shadow: 0 5px 18px rgba(9,24,44,.035); }
.candidate-filters { grid-template-columns: repeat(4, minmax(150px, 1fr)) auto; margin-bottom: 1rem; }
.multi-filter { position: relative; display: grid; gap: .35rem; min-width: 0; color: #43536a; font-size: .76rem; font-weight: 750; }
.multi-filter > span { padding-left: .1rem; }
.multi-filter details { position: relative; }
.multi-filter summary { min-height: 44px; display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: .62rem .72rem; overflow: hidden; border: 1px solid #bdc9d5; border-radius: 8px; background: white; color: var(--navy); cursor: pointer; list-style: none; white-space: nowrap; text-overflow: ellipsis; }
.multi-filter summary::-webkit-details-marker { display: none; }
.multi-filter summary::after { content: '⌄'; color: #60758c; }
.multi-filter details[open] summary { border-color: #6f8ba8; box-shadow: 0 0 0 2px rgba(49,92,135,.12); }
.multi-filter-options { position: absolute; z-index: 20; top: calc(100% + .35rem); left: 0; width: max(100%, 210px); max-height: 320px; padding: .45rem; overflow: auto; border: 1px solid #bdc9d5; border-radius: 8px; background: white; box-shadow: 0 16px 38px rgba(9,24,44,.2); }
.multi-filter-options label { display: flex; align-items: flex-start; gap: .5rem; padding: .48rem .42rem; border-radius: 5px; color: #344a62; font-size: .72rem; line-height: 1.25; cursor: pointer; }
.multi-filter-options label:hover { background: var(--blue-soft); }
.multi-filter-options input { margin-top: .08rem; accent-color: var(--navy); }
.candidate-multi-filter .multi-filter-options { width: min(420px, 88vw); max-height: 360px; }
.multi-filter-search { position: absolute; z-index: 21; top: calc(100% + .35rem); left: 0; width: min(420px, 88vw); min-height: 42px; padding: .55rem .7rem; border: 1px solid #bdc9d5; border-radius: 8px 8px 0 0; color: var(--ink); }
.candidate-multi-filter .multi-filter-options { top: calc(100% + 42px); border-radius: 0 0 8px 8px; }
.candidate-multi-filter [data-filter-hint] { position: absolute; z-index: 22; top: calc(100% + 405px); left: 0; width: min(420px, 88vw); padding: .45rem .6rem; border: 1px solid #bdc9d5; border-top: 0; border-radius: 0 0 8px 8px; background: #f5f8fb; color: var(--muted); font-size: .66rem; }
.clear-party-filters { min-height: 44px; padding: .62rem .75rem; border: 1px solid #aebdcb; border-radius: 8px; background: white; color: #24486e; font-size: .72rem; font-weight: 800; cursor: pointer; white-space: nowrap; }
.clear-party-filters:hover { background: var(--blue-soft); }
.party-dashboard { display: grid; gap: 1rem; }
.party-dashboard-head { display: flex; align-items: end; justify-content: space-between; gap: 1rem; padding: 1.25rem 1.35rem; border-radius: var(--radius); background: var(--navy); color: white; box-shadow: var(--shadow); }
.party-dashboard-head h2 { color: white; }
.party-dashboard-head p:not(.eyebrow) { margin: .35rem 0 0; color: #cbd6e3; font-size: .86rem; }
.party-dashboard-head > span { color: var(--yellow); font-size: .76rem; font-weight: 750; }
.party-metrics { display: grid; grid-template-columns: repeat(7, minmax(120px, 1fr)); gap: .7rem; }
.party-metrics > div { min-width: 0; padding: .85rem; border: 1px solid var(--line); border-radius: 9px; background: white; }
.party-metrics span { display: block; min-height: 2.5em; color: var(--muted); font-size: .72rem; font-weight: 700; line-height: 1.25; }
.party-metrics strong { display: block; margin-top: .2rem; color: var(--navy); font-family: var(--font-sans); font-size: 1.35rem; }
.party-metrics small { display: block; margin-top: .1rem; color: #6b7a8c; font-size: .68rem; }
.party-chart-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .85rem; }
.party-card { min-width: 0; padding: 1rem; border: 1px solid var(--line); border-radius: 10px; background: white; box-shadow: 0 5px 18px rgba(9,24,44,.035); }
.party-card > .section-title { margin-top: 0; }
.dashboard-bars { display: grid; gap: .55rem; }
.dashboard-bars-scroll { max-height: 360px; padding-right: .35rem; overflow-y: auto; scrollbar-gutter: stable; }
.dashboard-bar { display: grid; gap: .2rem; }
.dashboard-bar > div { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; }
.dashboard-bar span { color: #43566d; font-size: .74rem; font-weight: 700; }
.dashboard-bar strong { color: var(--navy); font-size: .76rem; }
.dashboard-bar > i { display: block; height: 12px; overflow: hidden; border-radius: 999px; background: var(--chart-track); }
.dashboard-bar b { display: block; height: 100%; border-radius: inherit; background: var(--chart-blue); }
.consolidated-presence { display: grid; gap: .65rem; }
.consolidated-presence > div { display: grid; grid-template-columns: 1fr auto; gap: .05rem 1rem; padding: .75rem; border-radius: 8px; background: #f2f6f9; }
.consolidated-presence span { color: #42576f; font-size: .76rem; font-weight: 800; }
.consolidated-presence strong { color: var(--green); font-family: var(--font-sans); font-size: 1.25rem; }
.consolidated-presence small { grid-column: 1 / -1; color: var(--muted); font-size: .68rem; }
.finance-highlights { display: grid; grid-template-columns: repeat(2, 1fr); gap: .55rem; }
.finance-highlights > div { padding: .75rem; border-radius: 8px; background: var(--blue-soft); }
.finance-highlights span { display: block; color: #53677e; font-size: .7rem; }
.finance-highlights strong { display: block; margin-top: .15rem; color: var(--navy); font-size: .86rem; }
.party-candidate-table { padding: 1rem; border: 1px solid var(--line); border-radius: 10px; background: white; box-shadow: 0 5px 18px rgba(9,24,44,.035); }
.party-candidate-table > .section-title { margin-top: 0; }
.party-table-wrap { max-height: 680px; overflow: auto; border: 1px solid #e1e7ed; border-radius: 8px; }
.party-candidate-table table { width: 100%; border-collapse: collapse; font-size: .76rem; }
.party-candidate-table th { position: sticky; top: 0; z-index: 1; padding: .7rem; background: #edf2f7; color: #40536a; text-align: left; }
.party-candidate-table td { padding: .7rem; border-top: 1px solid #e4eaf0; vertical-align: top; }
.party-candidate-table td strong, .party-candidate-table td small { display: block; }
.party-candidate-table td strong { color: var(--navy); }
.party-candidate-table td small { margin-top: .12rem; color: var(--muted); font-size: .68rem; }
.party-candidate-table button { padding: .42rem .62rem; border: 1px solid #aebdcb; border-radius: 6px; background: white; color: #24486e; font-size: .72rem; font-weight: 800; white-space: nowrap; cursor: pointer; }
.party-candidate-table button:hover { background: var(--blue-soft); }
.party-candidate-table .sort-button { padding: 0; border: 0; background: transparent; color: #324b65; font: inherit; font-weight: 850; text-align: left; }
.party-candidate-table .sort-button:hover { background: transparent; color: #0e3156; text-decoration: underline; }
.party-comparison-table .party-table-wrap { max-height: 520px; }
.party-state-matrix { max-height: 560px; overflow: auto; border: 1px solid #e1e7ed; border-radius: 8px; }
.party-state-matrix table { width: max(100%, 1260px); border-collapse: separate; border-spacing: 3px; font-size: .7rem; }
.party-state-matrix th, .party-state-matrix td { min-width: 38px; padding: .42rem; text-align: center; }
.party-state-matrix thead th { position: sticky; top: 0; z-index: 2; background: #e8eef4; color: #40536a; }
.party-state-matrix tbody th { position: sticky; left: 0; z-index: 1; min-width: 86px; background: white; color: var(--navy); text-align: left; }
.party-state-matrix td { border-radius: 4px; background: color-mix(in srgb, #315c87 calc(var(--cell-intensity) * 72%), #f3f6f9); color: var(--navy); }
.party-state-matrix td strong { color: var(--navy); }
.party-detail-dialog { width: min(1120px, calc(100vw - 2rem)); }
.party-detail-metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: .65rem; padding: 1rem 1.1rem; }
.party-detail-metrics div { padding: .8rem; border-radius: 8px; background: var(--blue-soft); }
.party-detail-metrics span { display: block; color: #53677e; font-size: .7rem; }
.party-detail-metrics strong { display: block; margin-top: .15rem; color: var(--navy); font-size: .9rem; }
.party-detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .8rem; padding: 0 1.1rem 1rem; }
.party-detail-grid > section { min-width: 0; padding: .85rem; border: 1px solid var(--line); border-radius: 8px; }
.party-detail-grid .section-title { margin-top: 0; }
.party-detail-months { margin: 0 1.1rem 1rem; padding: .85rem; border: 1px solid var(--line); border-radius: 8px; }
.party-detail-months .section-title { margin-top: 0; }
.party-detail-months table { width: 100%; border-collapse: collapse; font-size: .76rem; }
.party-detail-months th, .party-detail-months td { padding: .65rem .7rem; border-top: 1px solid #e3e9ef; text-align: left; }
.party-detail-months th { background: #edf2f7; color: #40536a; }
.party-detail-note { padding: 0 1.1rem 1rem; }
.glossary-view { display: grid; gap: 1rem; }
.glossary-head { display: flex; align-items: end; justify-content: space-between; gap: 1.5rem; padding: 1.25rem 1.35rem; border-radius: var(--radius); background: var(--navy); color: white; box-shadow: var(--shadow); }
.glossary-head h2 { margin: 0; color: white; }
.glossary-head p:not(.eyebrow) { max-width: 720px; margin: .35rem 0 0; color: #cad7e5; font-size: .86rem; }
.glossary-head label { display: grid; gap: .3rem; min-width: min(360px, 100%); color: #dae4ee; font-size: .72rem; font-weight: 800; }
.glossary-head input { min-height: 42px; padding: .55rem .7rem; border: 1px solid #71859a; border-radius: 8px; background: white; color: var(--ink); font: inherit; }
.glossary-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .75rem; }
.glossary-list article { padding: 1rem; border: 1px solid var(--line); border-radius: 9px; background: white; box-shadow: 0 4px 14px rgba(9,24,44,.03); }
.glossary-list h3 { margin: 0; color: var(--navy); font-family: var(--font-sans); font-size: 1rem; }
.glossary-list p { margin: .45rem 0 0; color: #52657a; font-size: .78rem; line-height: 1.55; }
.coverage-note { padding: 1rem; border: 1px solid var(--line); border-radius: 10px; background: white; }
.coverage-note h3 { margin: 0 0 .75rem; color: var(--navy); font-family: var(--font-sans); }
.coverage-note > div { display: grid; grid-template-columns: repeat(3, 1fr); gap: .75rem; }
.coverage-note article { padding: .85rem; border-radius: 8px; background: var(--blue-soft); }
.coverage-note strong { color: var(--navy); font-size: .78rem; }
.coverage-note p { margin: .35rem 0 0; color: #53677e; font-size: .74rem; line-height: 1.5; }
.table-status { display: inline-block; padding: .23rem .4rem; border-radius: 4px; background: #eef2f6; color: #5d6d80; font-size: .68rem; font-weight: 800; }
.table-status.confirmed { background: var(--green-soft); color: var(--green); }

.loading-state { padding: 3rem 1rem; color: var(--muted); }
.party-loading { min-height: 280px; }
.load-warning { display: flex; gap: .55rem; align-items: baseline; margin-bottom: 1rem; padding: .8rem 1rem; border: 1px solid #e4c46a; border-radius: 8px; background: #fff8df; color: #654d12; font-size: .78rem; line-height: 1.45; }
.load-warning strong { color: #4f3b0a; }
.loading-bar { width: min(480px, 80%); height: 24px; margin: .6rem 0; border-radius: 4px; background: linear-gradient(90deg,#edf1f5,#f7f9fb,#edf1f5); background-size: 200% 100%; animation: shimmer 1.5s infinite; }
.loading-bar.short { width: min(270px, 55%); height: 14px; }
.error-state { max-width: 560px; margin: 4rem auto; padding: 1.4rem; border: 1px solid #e5c4c4; border-radius: 10px; background: #fff7f7; color: #762f2f; }
footer { display: flex; justify-content: space-between; gap: 1rem; width: min(1540px, 100%); margin: 0 auto; padding: 1.3rem clamp(1rem, 3.2vw, 3rem) 2.5rem; color: #6a7788; font-size: .76rem; }
footer p { margin: 0; }
footer a { color: #345d88; font-weight: 700; }
footer nav { display: flex; gap: .9rem; white-space: nowrap; }

@keyframes shimmer { to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; animation-duration: .01ms !important; } }

@media (max-width: 980px) {
  .election-flow { grid-template-columns: repeat(2, 1fr); }
  .election-flow article:last-child { grid-column: span 2; min-height: 170px; }
  .disclaimer-grid { grid-template-columns: repeat(2, 1fr); }
  .filters { grid-template-columns: repeat(3, 1fr); }
  .search-field { grid-column: span 2; }
  .check-filter { grid-column: 1 / -1; }
  .workspace { grid-template-columns: minmax(240px, 300px) 1fr; }
  .detail-grid { grid-template-columns: 1fr; gap: 1rem; }
  .metric-grid { grid-template-columns: repeat(2, 1fr); }
  .party-metrics { grid-template-columns: repeat(4, 1fr); }
  .party-filters { grid-template-columns: repeat(3, minmax(150px, 1fr)); }
  .candidate-filters { grid-template-columns: repeat(3, minmax(150px, 1fr)); }
  .glossary-list { grid-template-columns: repeat(2, 1fr); }
  .coverage-note > div { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .topbar { align-items: center; flex-wrap: wrap; gap: .5rem 1.25rem; padding: .85rem 1rem; }
  .brand { flex-basis: 210px; }
  .source-status { max-width: 100%; flex: 1 1 160px; text-align: left; }
  .product-logo { width: 280px; }
  .app-shell { padding-top: 1.1rem; }
  .control-bar { display: grid; gap: 1rem; }
  .scope-pills { justify-content: flex-start; }
  .view-switch { display: flex; width: 100%; overflow-x: auto; }
  .view-switch button { flex: 0 0 auto; }
  .home-hero { grid-template-columns: 1fr; }
  .election-flow, .system-explainer, .process-flow, .disclaimer-grid { grid-template-columns: 1fr; }
  .election-flow article:last-child { grid-column: auto; }
  .process-flow { gap: .65rem; }
  .process-flow li { border-top: 0; border-left: 3px solid #dce5ee; }
  .process-flow li::after { content: '↓'; top: auto; right: auto; left: -.9rem; bottom: -.85rem; }
  .filters { grid-template-columns: 1fr; }
  .party-filters { grid-template-columns: 1fr; }
  .candidate-filters { grid-template-columns: 1fr; }
  .search-field { grid-column: auto; }
  .check-filter { grid-column: auto; }
  .workspace { display: block; min-height: 0; overflow: visible; background: transparent; border: 0; box-shadow: none; }
  .candidate-panel { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
  .candidate-list { display: flex; max-height: none; overflow-x: auto; scroll-snap-type: x proximity; }
  .candidate-card { flex: 0 0 78vw; min-width: 230px; border-right: 1px solid #e3e9ef; border-bottom: 0; scroll-snap-align: start; }
  .candidate-card[aria-selected="true"] { box-shadow: inset 0 -4px var(--yellow); }
  .list-limit { display: none; }
  .candidate-detail { margin-top: 1rem; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
  .detail-head { grid-template-columns: 1fr; }
  .current-badge { justify-items: start; }
  .metric-grid { grid-template-columns: 1fr; }
  .metric { min-height: auto; }
  footer { display: grid; }
  .campaign-grid, .public-grid { grid-template-columns: 1fr; }
  .amendment-stage-grid { grid-template-columns: 1fr; }
  .amendment-progress > div { grid-template-columns: 80px 1fr; }
  .amendment-progress strong { grid-column: 2; }
  .asset-comparison, .performance-details, .presence-grid, .plain-summary-grid { grid-template-columns: 1fr; }
  .candidate-source-links { grid-template-columns: 1fr; }
  .performance-metrics { grid-template-columns: repeat(2, 1fr); }
  .role-card { display: grid; }
  .role-status { justify-items: start; text-align: left; }
  .record-dialog { width: calc(100vw - 1rem); }
  #expense-dialog th:nth-child(1), #expense-dialog td:nth-child(1), #vote-dialog th:nth-child(1), #vote-dialog td:nth-child(1) { display: none; }
  .presence-breakdown { grid-template-columns: 1fr; }
  .presence-breakdown span { min-height: 0; }
  .party-dashboard-head { display: grid; align-items: start; }
  .party-metrics, .party-chart-grid { grid-template-columns: 1fr; }
  .party-detail-metrics, .party-detail-grid { grid-template-columns: 1fr; }
  .glossary-head { display: grid; align-items: start; }
  .glossary-list { grid-template-columns: 1fr; }
  .party-table-wrap { max-height: none; }
}
/* One continuous monthly interval, matching the granularity of finance totals. */
.data-coverage { padding: .8rem 1rem; border-left: 3px solid #5a7b9d; background: #eef3f8; color: #3c5268; font-size: .875rem; line-height: 1.6; }
.data-coverage strong { font-weight: 700; }
.research-guide p, .research-guide small { margin: .4rem 0; font-size: .875rem; line-height: 1.55; color: #566677; }
.research-guide a { font-size: .9375rem; font-weight: 650; color: #225c94; }
.candidate-source-links .research-guide strong { font-size: 1rem; }
.candidate-source-links .research-guide > span { font-size: .875rem; }
.party-coverage { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .6rem; }
.party-coverage p { margin: 0; }
.coverage-subtitle { margin: 1.25rem 0 .4rem; font-size: 1rem; }
.metric strong, .party-metrics strong { overflow-wrap: anywhere; }
@media (max-width: 850px) { .party-coverage { grid-template-columns: 1fr; } }
.seat-process { list-style: none; padding: 0; margin: 1.5rem 0; display: grid; gap: 1.2rem; }
.seat-process > li { display: grid; grid-template-columns: 2.5rem minmax(0, 1fr); gap: 1rem; position: relative; }
.seat-process > li:not(:last-child)::before { content: ''; position: absolute; left: 1.2rem; top: 2.6rem; bottom: -1.2rem; width: 2px; background: #d4deeb; }
.step-number { display: grid; place-items: center; width: 2.5rem; height: 2.5rem; border-radius: 50%; background: #15334f; color: #fff; font-weight: 750; }
.seat-process h3 { margin: .2rem 0 .55rem; font-size: 1.15rem; color: #15334f; }
.seat-process p { font-size: 1rem; line-height: 1.65; max-width: 74ch; }
.seat-process small { display: block; margin-top: .7rem; font-size: .875rem; line-height: 1.5; color: #566677; }
.seat-landmarks, .election-formula, .remainder-comparison { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; margin: 1rem 0; }
.seat-landmarks > span, .election-formula > span { display: grid; gap: .3rem; min-width: 7rem; padding: .9rem 1.1rem; border-radius: .65rem; background: #edf3f9; font-size: .875rem; }
.seat-landmarks b, .election-formula strong { font-size: 1.75rem; color: #15334f; }
.example-vote-bars { display: grid; gap: .7rem; margin: 1rem 0; }
.example-vote-bars > div { display: grid; grid-template-columns: minmax(12rem, 1.5fr) minmax(7rem, 1fr) minmax(8rem, .7fr); align-items: center; gap: .8rem; font-size: .875rem; }
.example-vote-bars i { display: block; width: 100%; height: .8rem; border-radius: .2rem; background: #e7edf3; overflow: hidden; }
.example-vote-bars i::before { content: ''; display: block; height: 100%; width: var(--vote-width); background: var(--vote-color); }
.remainder-comparison > span { display: grid; gap: .3rem; padding: .8rem; border: 1px solid #d4deeb; border-radius: .5rem; font-size: .875rem; }
.remainder-comparison .winning-average { border-color: #225c94; background: #edf3f9; }
.election-rules { padding: .8rem 1rem; border-left: 3px solid #cfaa53; background: #faf7ed; }
.election-rules summary { cursor: pointer; font-size: .9375rem; font-weight: 650; }
.elected-seats { display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); max-width: 36rem; gap: .4rem; margin-top: 1rem; }
.elected-seats span { display: grid; place-items: center; min-height: 2.8rem; border-radius: .4rem .4rem .15rem .15rem; font-weight: 750; color: #fff; }
.seat-a { background: #225c94; } .seat-b { background: #665080; } .seat-c { background: #8a5510; }
@media (max-width: 700px) { .example-vote-bars > div { grid-template-columns: 1fr; gap: .3rem; } .seat-process > li { gap: .65rem; } .elected-seats { gap: .2rem; } .election-formula { gap: .4rem; } .election-formula > span { min-width: 0; padding: .65rem; } .election-formula strong { font-size: 1.3rem; } }
.period-range { grid-column: span 2; min-width: 0; margin: 0; padding: 0; border: 0; }
.period-range legend { margin-bottom: .45rem; color: var(--muted, #5b6575); font-size: .875rem; font-weight: 650; }
.period-range > div { display: flex; align-items: end; gap: .55rem; flex-wrap: wrap; }
.period-range label { flex: 1 1 8rem; display: grid; gap: .25rem; font-size: .875rem; }
.period-range input { min-width: 0; width: 100%; min-height: 2.6rem; padding: .5rem; border: 1px solid #cbd3dd; border-radius: .5rem; background: #fff; color: #14283e; font: inherit; }
.period-range input[aria-invalid="true"] { border-color: #b43535; }
.period-range button { min-height: 2.6rem; padding: .55rem .75rem; background: #15334f; color: #fff; border: 0; border-radius: .5rem; font: inherit; font-size: .875rem; cursor: pointer; }
.period-range small { display: block; margin-top: .5rem; font-size: .8125rem; line-height: 1.45; color: #566677; }
@media (max-width: 720px) { .period-range { grid-column: 1 / -1; } }
