:root {
  color-scheme: light;
  --ink: #182b45;
  --muted: #718096;
  --blue: #3478d4;
  --blue-dark: #184d91;
  --blue-pale: #eef5ff;
  --red: #c93845;
  --red-pale: #fff0f1;
  --line: #e4eaf1;
  --paper: #ffffff;
  --canvas: #f6f8fb;
  font-family: "Spectral", Georgia, "Times New Roman", serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--canvas); color: var(--ink); }
button, select { font: inherit; }
button, select, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
.page-shell { width: min(1440px, calc(100% - 64px)); margin: 0 auto; }
.site-header { height: 82px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; }
.brand-mark { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; background: var(--blue-dark); }
.brand-mark svg { width: 24px; height: 24px; overflow: visible; }
.ballot-paper { fill: #fff; stroke: #fff; stroke-width: 1.1; stroke-linejoin: round; }
.ballot-fold { fill: none; stroke: #a9c9f0; stroke-width: 1.25; stroke-linecap: round; stroke-linejoin: round; }
.ballot-check { fill: none; stroke: var(--red); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.brand-name { color: #34445b; font-size: 12px; font-weight: 700; letter-spacing: .11em; }
.brand-name b { color: var(--blue-dark); }
.header-contact { margin-left: auto; margin-right: 14px; color: #516b86; font-size: 10px; font-weight: 600; text-decoration: none; white-space: nowrap; }
.header-contact:hover { color: var(--blue-dark); text-decoration: underline; }
.header-tags { display: flex; gap: 8px; }
.header-tags span { padding: 7px 10px; border: 1px solid #e1eaf5; border-radius: 999px; background: white; color: #60758f; font-size: 9px; font-weight: 700; letter-spacing: .1em; }
.intro { padding: 45px 0 26px; }
.eyebrow { margin: 0; color: #8292a7; font-size: 10px; font-weight: 750; letter-spacing: .14em; }
.eyebrow-dot { display: inline-block; width: 7px; height: 7px; margin: 0 8px 1px 0; border-radius: 50%; background: var(--blue); }
h1 { margin: 12px 0 8px; font-size: clamp(30px, 4vw, 42px); line-height: 1.14; font-weight: 650; letter-spacing: -.045em; }
h1 span { color: var(--blue-dark); }
.intro-copy { margin: 0; color: var(--muted); font-size: 15px; }
.intro-note { display: grid; gap: 5px; max-width: 760px; margin-top: 12px; }
.intro-note p { margin: 0; line-height: 1.55; }
.intro-note-main { color: #171717; font-size: 13px; font-weight: 550; }
.intro-note-detail { color: #6b7280; font-size: 12px; }
.summary-strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: 25px; padding: 16px 20px; background: white; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 3px 12px #233d5a06; }
.summary-strip div { display: grid; gap: 6px; padding-left: 20px; border-left: 1px solid var(--line); }
.summary-strip div:first-child { padding-left: 0; border-left: 0; }
.summary-strip span { color: #8492a4; font-size: 9px; font-weight: 750; letter-spacing: .11em; }
.summary-strip strong { color: #253b57; font-size: 18px; font-variant-numeric: tabular-nums; font-weight: 650; }
.election-tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--line); }
.election-tab { display: flex; align-items: center; gap: 11px; padding: 15px 18px 14px; background: transparent; border: 0; border-bottom: 2px solid transparent; color: #7d8b9b; cursor: pointer; font-size: 13px; font-weight: 600; }
.election-tab.active { border-bottom-color: var(--blue); color: var(--blue-dark); }
.election-tab:hover { color: var(--blue-dark); }
.election-tab[data-election="intendencia"].active { border-bottom-color: var(--red); color: #9f2632; }
.election-tab[data-election="intendencia"].active .tab-state { background: var(--red-pale); color: var(--red); }
.tab-index { color: #aab6c4; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 10px; }
.tab-state { margin-left: 1px; padding: 4px 6px; background: #edf4ff; border-radius: 4px; color: var(--blue); font-size: 8px; font-weight: 750; letter-spacing: .07em; }
.election-tab:not(.active) .tab-state { background: #eff2f6; color: #98a3b1; }
.results-card { margin: 22px 0 52px; padding: 23px; background: var(--paper); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 5px 20px #20385408; }
.card-heading { display: flex; justify-content: space-between; align-items: center; gap: 20px; }
.crumb-separator { margin: 0 6px; color: #bdc7d2; }
h2 { margin: 7px 0 0; color: #203753; font-size: 21px; font-weight: 650; letter-spacing: -.025em; }
.data-stamp { display: inline-flex; align-items: center; gap: 8px; padding: 8px 10px; border: 1px solid #e0eaf6; border-radius: 7px; color: #56708f; font-size: 10px; font-weight: 650; white-space: nowrap; }
.data-stamp i { width: 7px; height: 7px; border-radius: 50%; background: #3ba584; box-shadow: 0 0 0 3px #e1f3ee; }
.filters { display: grid; grid-template-columns: 1fr 1fr 1.5fr auto; align-items: end; gap: 12px; margin: 22px 0 18px; padding: 14px; background: #f7f9fc; border: 1px solid #edf1f5; border-radius: 10px; }
.filter-control { display: grid; gap: 6px; min-width: 0; }
.filter-control > span { color: #78879b; font-size: 10px; font-weight: 700; }
.filter-control select { width: 100%; height: 38px; padding: 0 30px 0 11px; border: 1px solid #dce4ed; border-radius: 7px; outline: 0; background-color: white; color: #30445d; font-size: 12px; }
.filter-control select:focus { border-color: #75a5e0; box-shadow: 0 0 0 3px #3478d415; }
.filter-control select:disabled { color: #9aa6b2; background: #f2f4f7; }
.filters.is-disabled { opacity: .55; }
.filters button:disabled, .filters select:disabled { cursor: not-allowed; }
.reset-button { height: 38px; padding: 0 12px; border: 1px solid #dce4ed; border-radius: 7px; background: white; color: #5f728a; cursor: pointer; font-size: 11px; font-weight: 600; white-space: nowrap; }
.reset-button:hover { border-color: #a9c4e4; color: var(--blue-dark); }
.map-layout { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 18px; align-items: stretch; }
.map-column { min-width: 0; }
.map-wrap { position: relative; min-height: 640px; display: grid; place-items: center; overflow: hidden; border: 1px solid #e7edf4; border-radius: 10px; background: linear-gradient(180deg, #fbfcfe 0%, #f8fafd 100%); }
#paraguay-map { display: block; width: min(100%, 660px); height: 640px; overflow: visible; }
.district-shape { fill: #fff; stroke: #c9d5e2; stroke-width: .7; vector-effect: non-scaling-stroke; transition: fill .15s ease; }
.district-shape:hover { fill: #edf4fc; }
.district-shape.is-selected { fill: #e8f1ff; }
.department-outline { fill: none; stroke: #aeb8c4; stroke-width: 1.25; vector-effect: non-scaling-stroke; pointer-events: none; }
.department-label { fill: #000; font-size: 8px; font-weight: 700; letter-spacing: .08em; text-anchor: middle; pointer-events: none; paint-order: stroke; stroke: #fff; stroke-width: 2.4px; stroke-linejoin: round; }
#paraguay-map[data-zoom="department"] .department-label,
#paraguay-map[data-zoom="district"] .department-label { display: none; }
#paraguay-map[data-election="intendencia"] .district-shape.is-selected { fill: #fff0f1; }
.result-bubble { cursor: pointer; stroke: white; stroke-width: 1.2; fill-opacity: .87; vector-effect: non-scaling-stroke; transition: fill-opacity .12s ease, stroke-width .12s ease; }
.result-bubble:hover, .result-bubble:focus { fill-opacity: 1; stroke: #183d67; stroke-width: 2; outline: none; }
.result-bubble.special { stroke: #fff; }
.map-tooltip { position: absolute; z-index: 5; display: none; min-width: 145px; max-width: 220px; padding: 8px 10px; transform: translate(-50%, -100%); border: 1px solid #dce6f0; border-radius: 8px; background: white; box-shadow: 0 7px 22px #172d461c; pointer-events: none; text-align: center; }
.map-tooltip.visible { display: grid; gap: 3px; }
.map-tooltip strong { color: var(--blue-dark); font-size: 16px; font-variant-numeric: tabular-nums; line-height: 1.1; }
.map-tooltip span { overflow: hidden; color: #344b66; font-size: 10px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.map-tooltip small { color: #8693a4; font-size: 9px; }
.map-zoom-label { position: absolute; top: 12px; left: 13px; padding: 6px 8px; border: 1px solid #e2eaf3; border-radius: 5px; background: #ffffffed; color: #6d7e93; font-size: 8px; font-weight: 750; letter-spacing: .1em; }
.map-zoom-controls { position: absolute; z-index: 4; right: 12px; bottom: 12px; display: grid; gap: 6px; }
.map-zoom-controls button { width: 40px; height: 40px; display: grid; place-items: center; padding: 0; border: 1px solid #d8e2ec; border-radius: 11px; background: #fff; color: #294663; box-shadow: 0 3px 12px #1b385317; cursor: pointer; font: 600 22px/1 ui-sans-serif, system-ui, sans-serif; touch-action: manipulation; }
.map-zoom-controls button:hover, .map-zoom-controls button:focus-visible { border-color: #8bb4df; background: #f1f7ff; outline: 2px solid #3478d433; outline-offset: 1px; }
.map-zoom-controls button:last-child { font-size: 19px; }
.map-empty { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 9px; background: #ffffffd9; text-align: center; }
.map-empty[hidden] { display: none; }
.map-empty strong { color: #2d4766; font-size: 17px; }
.map-empty span:last-child { max-width: 270px; color: #738197; font-size: 12px; line-height: 1.5; }
.empty-icon { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; background: #eef5ff; color: var(--blue); font-size: 19px; }
.map-footer { display: flex; align-items: center; flex-wrap: wrap; gap: 15px; min-height: 42px; padding: 8px 4px 0; color: #718096; font-size: 10px; }
.map-footer > span { display: inline-flex; align-items: center; gap: 6px; }
.boundary-line { display: inline-block; width: 17px; height: 0; border-top: 1px solid #c9d5e2; }
.department-line { border-top: 2px solid #aeb8c4; }
.map-hint { margin-left: auto; color: #98a4b3; }
.party-panel { display: flex; flex-direction: column; min-height: 640px; padding: 16px 14px 12px; border: 1px solid #e7edf4; border-radius: 10px; background: #fbfcfe; }
.party-panel-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.party-panel-heading h3 { margin: 5px 0 0; font-size: 16px; font-weight: 650; }
.party-total { color: #4d6a8b; font-size: 11px; font-weight: 700; font-variant-numeric: tabular-nums; }
.party-panel-note { margin: 9px 0 12px; color: #8996a6; font-size: 10px; line-height: 1.45; }
.party-ranking { display: grid; gap: 2px; margin: 0; padding: 0; list-style: none; overflow: auto; }
.party-ranking li { min-width: 0; }
.party-row { width: 100%; display: grid; grid-template-columns: 9px minmax(0, 1fr) auto; align-items: center; gap: 7px; padding: 8px 5px; border: 0; border-radius: 6px; background: transparent; color: #394e68; cursor: pointer; text-align: left; }
.party-row:hover, .party-row.active { background: #edf4fc; }
.party-swatch { width: 8px; height: 8px; border-radius: 50%; box-shadow: 0 0 0 2px #ffffff; }
.party-row-name { overflow: hidden; font-size: 10px; font-weight: 600; line-height: 1.35; text-overflow: ellipsis; }
.party-row-value { color: #78889c; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 9px; font-variant-numeric: tabular-nums; }
.party-empty { padding: 10px 5px; color: #8996a6; font-size: 11px; }
.data-table-section { margin-top: 28px; }
.data-table-heading { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 12px; }
.data-table-heading h3 { margin: 5px 0 0; color: #203753; font-size: 17px; font-weight: 600; }
.table-row-count { color: #7b899a; font-size: 10px; font-variant-numeric: tabular-nums; }
.table-scroll { max-height: 560px; overflow: auto; border: 1px solid #e7edf4; border-radius: 9px; background: #fff; }
.results-table { width: 100%; min-width: 720px; border-collapse: separate; border-spacing: 0; font-size: 11px; }
.results-table th { position: sticky; top: 0; z-index: 1; padding: 11px 13px; border-bottom: 1px solid #e4eaf1; background: #f7f9fc; color: #6f7f93; font-size: 9px; font-weight: 750; letter-spacing: .08em; text-align: left; text-transform: uppercase; }
.results-table td { padding: 9px 13px; border-bottom: 1px solid #f0f2f5; color: #42546a; vertical-align: middle; }
.results-table tbody tr:hover { background: #fafbfd; }
.results-table tbody tr:last-child td { border-bottom: 0; }
.table-party-content { display: flex; align-items: center; gap: 8px; }
.table-party-swatch { flex: 0 0 8px; width: 8px; height: 8px; border-radius: 50%; }
.table-party-name { font-weight: 550; }
.table-list-number { margin-left: auto; color: #99a4b2; font-size: 9px; white-space: nowrap; }
.votes-column, .table-votes-cell { min-width: 190px; text-align: right !important; }
.table-vote-bar { display: inline-block; width: min(90px, 32%); height: 5px; margin-right: 10px; overflow: hidden; border-radius: 99px; background: #edf1f5; vertical-align: middle; }
.table-vote-bar::after { display: block; width: var(--bar-width); height: 100%; border-radius: inherit; background: var(--blue); content: ""; }
body[data-election="intendencia"] .table-vote-bar::after { background: var(--red); }
.table-votes-cell strong { display: inline-block; min-width: 58px; color: #2c4058; font-variant-numeric: tabular-nums; }
.bubble-key { margin-top: auto; padding-top: 16px; border-top: 1px solid var(--line); }
.bubble-samples { height: 39px; display: flex; align-items: end; gap: 24px; padding: 0 10px; }
.sample { display: block; border: 1px solid #7e9ec2; border-radius: 50%; background: #d6e5f8; }
.sample.small { width: 8px; height: 8px; }
.sample.medium { width: 17px; height: 17px; }
.sample.large { width: 29px; height: 29px; }
.bubble-labels { display: flex; justify-content: space-between; margin-top: 7px; color: #8794a5; font-size: 9px; }
.source-note { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 15px; padding-top: 13px; border-top: 1px solid #edf0f4; color: #8a96a5; font-size: 9px; }
.source-note b { color: #66788f; font-weight: 650; }
.source-note a { color: #6487b2; text-decoration: none; }
.source-note a:hover { color: var(--blue-dark); text-decoration: underline; }
.results-disclaimer { margin: 14px 0 0; padding: 11px 13px; border-left: 3px solid var(--red); border-radius: 0 6px 6px 0; background: #fff7f7; color: #8c5157; font-size: 10px; line-height: 1.5; }
.upcoming-section { display: flex; align-items: center; gap: 14px; margin: 26px 0 34px; padding: 18px 20px; border: 1px solid #e2e8f0; border-radius: 14px; background: #fff; }
.upcoming-mark { width: 38px; height: 38px; display: grid; flex: 0 0 auto; place-items: center; border-radius: 11px; background: #f1f5f9; color: #52657a; font-size: 20px; }
.upcoming-eyebrow { margin: 0 0 4px; color: #737f8c; font-size: 9px; font-weight: 750; letter-spacing: .14em; }
.upcoming-section h2 { margin: 0; color: #171717; font-size: 18px; font-weight: 650; }
.site-footer { display: flex; justify-content: space-between; padding: 0 0 26px; color: #98a3b1; font-size: 9px; letter-spacing: .1em; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }

/* Keep interface copy black while retaining blue title hierarchy. */
body, body * { color: #000; }
body h1, body h1 span, body h2, body h3,
body .party-panel-heading h3, body .data-table-heading h3 { color: var(--blue-dark); }

@media (max-width: 1000px) {
  .page-shell { width: min(100% - 36px, 900px); }
  .map-layout { grid-template-columns: minmax(0, 1fr) 240px; gap: 12px; }
  .map-wrap, .party-panel { min-height: 590px; }
  #paraguay-map { height: 590px; }
}
@media (max-width: 760px) {
  .page-shell { width: calc(100% - 28px); }
  .site-header { height: 68px; }
  .header-tags { gap: 5px; }
  .header-tags span { padding: 6px 7px; font-size: 7px; }
  .brand-name { font-size: 10px; }
  .brand-mark { width: 32px; height: 32px; }
  .header-tags { display: none; }
  .header-contact { margin-right: 0; font-size: 9px; }
  .intro { padding-top: 32px; }
  .summary-strip { grid-template-columns: repeat(2, 1fr); gap: 15px 0; }
  .summary-strip div:nth-child(3) { padding-left: 0; border-left: 0; }
  .election-tab { padding: 13px 8px; gap: 7px; font-size: 11px; }
  .tab-state { font-size: 7px; }
  .results-card { padding: 15px; }
  .filters { grid-template-columns: 1fr 1fr; }
  .party-filter { grid-column: 1 / -1; }
  .reset-button { grid-column: 1 / -1; }
  .map-layout { grid-template-columns: 1fr; }
  .map-wrap { min-height: 540px; }
  #paraguay-map { height: 540px; }
  .party-panel { min-height: auto; max-height: 430px; }
  .party-ranking { grid-template-columns: 1fr 1fr; }
  .bubble-key { margin-top: 12px; }
}
@media (max-width: 480px) {
  .site-header { height: auto; min-height: 68px; flex-wrap: wrap; gap: 6px 10px; padding: 8px 0; }
  .header-contact { font-size: 8px; letter-spacing: -.02em; }
  .card-heading { align-items: flex-start; }
  .data-stamp { padding: 6px 7px; font-size: 8px; }
  h2 { font-size: 17px; }
  .map-wrap { min-height: 430px; }
  #paraguay-map { height: 430px; }
  .map-zoom-controls { right: 9px; bottom: 9px; gap: 5px; }
  .map-zoom-controls button { width: 42px; height: 42px; border-radius: 12px; }
  .map-zoom-label { top: 9px; left: 9px; max-width: calc(100% - 70px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .map-hint { width: 100%; margin-left: 0; }
  .party-ranking { grid-template-columns: 1fr; }
  .site-footer { font-size: 8px; }
}

@media (max-width: 360px) {
  .header-contact { flex-basis: 100%; text-align: right; }
}

/* Larger type across the dashboard, while preserving a compact mobile header. */
.eyebrow { font-size: 12px; }
.header-contact { font-size: 12px; }
.intro-note-main { font-size: 16px; }
.intro-note-detail { font-size: 14px; }
.summary-strip span { font-size: 11px; }
.summary-strip strong { font-size: 25px; }
.election-tab { font-size: 15px; }
.filter-control > span { font-size: 13px; }
.filter-control select { font-size: 15px; }
.reset-button { font-size: 14px; }
.map-zoom-label { font-size: 11px; }
.map-footer { font-size: 13px; }
.map-tooltip strong { font-size: 19px; }
.map-tooltip span { font-size: 14px; }
.map-tooltip small { font-size: 13px; }
.party-panel-heading h3 { font-size: 19px; }
.party-total, .party-panel-note { font-size: 14px; }
.party-row-name { font-size: 13px; }
.party-row-value { min-width: 118px; font-size: 12px; }
.data-table-heading h3 { font-size: 20px; }
.table-row-count { font-size: 13px; }
.results-table { font-size: 14px; }
.results-table th { font-size: 12px; }
.results-table td { padding: 12px 14px; }
.table-list-number { font-size: 12px; }
.source-note, .results-disclaimer { font-size: 13px; }
.site-footer { font-size: 12px; }
.percentage-column, .table-percent-cell { min-width: 84px; text-align: right !important; font-variant-numeric: tabular-nums; }
.table-percent-cell { color: #52657b; font-weight: 700; }
.map-tooltip .tooltip-share { color: #52657b; font-weight: 700; }

@media (max-width: 760px) {
  .header-contact { font-size: 10px; }
  .election-tab { font-size: 14px; }
  .map-footer { font-size: 12px; }
  .party-row-value { min-width: 110px; }
}

/* Keep the ranking readable when the map's side panel gets narrow. */
.party-panel-heading > div { min-width: 0; }
.party-panel-heading .eyebrow { letter-spacing: .12em; line-height: 1.35; }
.party-total { flex: 0 0 auto; max-width: 46%; text-align: right; white-space: nowrap; }
.party-ranking { grid-template-columns: minmax(0, 1fr); gap: 4px; }
.party-row { grid-template-columns: 10px minmax(0, 1fr); align-items: start; column-gap: 8px; row-gap: 3px; padding: 9px 7px; }
.party-swatch { grid-column: 1; grid-row: 1; margin-top: 4px; }
.party-row-name { grid-column: 2; grid-row: 1; min-width: 0; overflow: visible; text-overflow: clip; white-space: normal; overflow-wrap: anywhere; font-size: 13px; line-height: 1.3; }
.party-row-value { grid-column: 2; grid-row: 2; min-width: 0; white-space: nowrap; font-size: 12px; }

/* Restore distinct tiles for the four summary metrics. */
.summary-strip { gap: 10px; }
.summary-strip div,
.summary-strip div:first-child { padding: 10px 18px; border: 0; border-radius: 11px; background: #f5f8fc; }
@media (max-width: 760px) {
  .summary-strip { gap: 8px; }
  .summary-strip div,
  .summary-strip div:first-child { padding: 9px 11px; }
}

/* Polished visual layer: editorial headings with crisp, compact data controls. */
body { background: #f3f6fb; }
.page-shell { width: min(1440px, calc(100% - 72px)); }
.site-header { height: 88px; border-bottom-color: #dce5ef; }
.brand-mark { border-radius: 12px; box-shadow: 0 5px 14px #184d9128; }
.header-tags span,
.summary-strip span,
.eyebrow,
.election-tab,
.filter-control,
.filter-control select,
.reset-button,
.map-footer,
.party-panel,
.results-table,
.data-stamp,
.source-note,
.results-disclaimer,
.site-footer { font-family: Inter, ui-sans-serif, system-ui, -apple-system, sans-serif; }
.header-tags span { background: #fff; border-color: #d9e5f2; transition: border-color .18s ease, transform .18s ease; }
.header-tags span:hover { border-color: #9bb9db; transform: translateY(-1px); }
.intro { padding: 52px 0 30px; }
.eyebrow { color: #000; }
h1 { margin-top: 14px; font-size: clamp(38px, 5vw, 54px); letter-spacing: -.055em; }
.summary-strip { gap: 10px; padding: 11px; border-color: #e0e8f1; border-radius: 16px; box-shadow: 0 10px 28px #1b3c6010; }
.summary-strip div { min-height: 72px; align-content: center; padding: 10px 18px; border: 0; border-radius: 11px; background: #fff; }
.summary-strip div:first-child { padding-left: 18px; }
.summary-strip strong { font-family: Inter, ui-sans-serif, system-ui, sans-serif; font-size: 22px; }
.election-tabs { gap: 9px; border-bottom-color: transparent; }
.election-tab { padding: 13px 17px; border: 1px solid transparent; border-radius: 10px 10px 0 0; transition: background .18s ease, border-color .18s ease; }
.election-tab.active { background: #fff; border-color: #dce6f1; border-bottom-color: #fff; box-shadow: 0 -3px 12px #1b3c6008; }
.election-tab[data-election="intendencia"].active { border-bottom-color: #fff; }
.results-card { margin-top: 0; padding: clamp(18px, 2.4vw, 30px); border-color: #e0e8f1; border-radius: 17px; box-shadow: 0 14px 38px #1b3c6010; }
h2 { font-size: clamp(20px, 2.3vw, 25px); }
.filters { padding: 16px; border-color: #e3eaf2; border-radius: 13px; background: #f5f8fc; }
.filter-control select { border-color: #d7e1ec; border-radius: 9px; }
.filter-control select:focus { border-color: #6e9ed7; box-shadow: 0 0 0 4px #3478d414; }
.reset-button { border-radius: 9px; transition: background .16s ease, border-color .16s ease; }
.reset-button:hover { background: #f5f9ff; }
.map-wrap { border-color: #e1e8f0; border-radius: 14px; background-color: #f8fbff; background-image: radial-gradient(#dce7f3 0.7px, transparent 0.7px); background-size: 16px 16px; }
.party-panel { border-color: #e1e8f0; border-radius: 14px; background: linear-gradient(150deg, #fbfdff, #f4f8fd); }
.party-row { border-radius: 8px; transition: background .15s ease, transform .15s ease; }
.party-row:hover { transform: translateX(2px); }
.party-swatch, .table-party-swatch { box-shadow: 0 0 0 3px #ffffff, 0 1px 4px #10243a26; }
.table-scroll { border-color: #e1e8f0; border-radius: 12px; }
.results-table th { background: #f3f7fc; }
.results-table tbody tr { transition: background .15s ease; }
.results-table tbody tr:hover { background: #f4f8fd; }
.source-note { color: #000; }
.results-disclaimer { border-left-width: 4px; border-radius: 0 9px 9px 0; }
.site-footer { padding-top: 4px; }

@media (max-width: 760px) {
  .page-shell { width: calc(100% - 28px); }
  .summary-strip { gap: 8px; }
  .summary-strip div { min-height: 64px; padding: 9px 11px; }
  .summary-strip div:first-child { padding-left: 11px; }
  .election-tab { border-radius: 9px 9px 0 0; }
}

/* Brighter canvas and a restrained, topographic map treatment. */
body { background: #fff; }
.map-wrap {
  background-color: #f0f7f8;
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='190' viewBox='0 0 240 190'%3E%3Cg fill='none' stroke='%239fc2c4' stroke-opacity='.25' stroke-width='1'%3E%3Cpath d='M-30 28C16 4 40 54 82 31s64-20 101 2 54 22 87-4'/%3E%3Cpath d='M-30 40C16 16 40 66 82 43s64-20 101 2 54 22 87-4'/%3E%3Cpath d='M-30 52C16 28 40 78 82 55s64-20 101 2 54 22 87-4'/%3E%3Cpath d='M-30 137c46-24 70 26 112 3s64-20 101 2 54 22 87-4'/%3E%3Cpath d='M-30 149c46-24 70 26 112 3s64-20 101 2 54 22 87-4'/%3E%3Cpath d='M-30 161c46-24 70 26 112 3s64-20 101 2 54 22 87-4'/%3E%3C/g%3E%3C/svg%3E"),
    radial-gradient(ellipse at 82% 18%, #e5f2f3 0, transparent 38%),
    linear-gradient(145deg, #f7fbf7, #edf5f6);
  background-size: 240px 190px, auto, auto;
}
.district-shape { fill: #f5f7ef; stroke: #c2d0c7; }
.district-shape:hover { fill: #eaf2e4; }
.district-shape.is-selected { fill: #e8f1ff; }
#paraguay-map[data-election="intendencia"] .district-shape.is-selected { fill: #fff0f1; }
.department-outline { stroke: #93aaa5; }
.department-line { border-top-color: #93aaa5; }
.map-wrap { background: #fff; }
.district-shape { fill: #fff; }
.district-shape:hover { fill: #f4f8fd; }

@media (max-width: 760px) {
  .site-header { height: 68px; }
  .header-tags { display: none; }
  .header-contact { margin-right: 0; font-size: 9px; }
}

@media (max-width: 480px) {
  .site-header { height: auto; min-height: 68px; flex-wrap: wrap; gap: 6px 10px; padding: 8px 0; }
  .header-contact { font-size: 8px; letter-spacing: -.02em; }
}

@media (max-width: 360px) {
  .header-contact { flex-basis: 100%; text-align: right; }
}
