/* Shared layout and components for all reports. No build step required. */

:root {
  --ink: #16324f;
  --muted: #5b6b7b;
  --line: #e3e8ee;
  --bg: #f4f7fa;
  --card: #fff;
  --green: #1e8e5a;
  --green-soft: #e7f4ee;
  --red: #c0392b;
  --red-soft: #faecea;
  --amber: #8a6116;
  --amber-soft: #fdf6e7;
  --blue: #3b82c4;
  --gold: #966017;
  --radius: 12px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui,-apple-system,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.55;
  font-size: 16px;
}

main {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 18px 60px;
}

header.top {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(244,247,250,.92);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
}

header.top .bar {
  max-width: 960px;
  margin: 0 auto;
  padding: 10px 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.brand {
  font-weight: 700;
  font-size: 14px;
  letter-spacing: .2px;
}

a.home {
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink);
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 13px;
  text-decoration: none;
}

a.home:hover {
  border-color: var(--ink);
}

.langs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.langs button {
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink);
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 13px;
  cursor: pointer;
}

.langs button[aria-pressed="true"] {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}

.hero {
  background: linear-gradient(160deg,#16324f,#1d4468);
  color: #fff;
  border-radius: 0 0 var(--radius) var(--radius);
  padding: 44px 24px 40px;
  margin: 0 -18px;
}

.hero-inner {
  max-width: 860px;
  margin: 0 auto;
}

.kicker {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 1.4px;
  color: #9fc3e2;
  font-weight: 600;
}

.verdict {
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.22);
  border-radius: var(--radius);
  padding: 18px 20px;
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.verdict .check {
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--green);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  color: #fff;
  margin-top: 2px;
}

.verdict h2 {
  margin: 0 0 6px;
  font-size: clamp(18px,3vw,23px);
}

.verdict p {
  margin: 0;
  color: #dce8f2;
  font-size: 15px;
}

h3.sect {
  font-size: clamp(19px,3vw,25px);
  margin: 0 0 6px;
  font-weight: 800;
}

p.sect-sub {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 15px;
}

.res-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 22px 16px;
  border-left: 5px solid var(--green);
}

.res-card h4 {
  margin: 0 0 2px;
  font-size: 16.5px;
}

.res-card .sub {
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 14px;
}

.p-row {
  display: grid;
  grid-template-columns: 74px 1fr 62px;
  gap: 10px;
  align-items: center;
  margin: 8px 0;
  font-size: 14px;
}

.p-name {
  font-weight: 700;
  text-align: right;
  white-space: nowrap;
}

.p-track {
  height: 14px;
  border-radius: 7px;
  background: #edf1f5;
  overflow: hidden;
}

.p-fill {
  height: 100%;
  background: var(--blue);
  border-radius: 7px;
}

.p-row.rest .p-fill {
  background: #b8c4cf;
}

.p-row.rest .p-name {
  font-weight: 600;
  color: var(--muted);
}

.p-pct {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.p-note {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.args {
  display: grid;
  grid-template-columns: repeat(auto-fit,minmax(min(100%, 270px), 1fr));
  gap: 14px;
}

.arg {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 20px;
}

.arg .num {
  display: inline-flex;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--green);
  color: #fff;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 15px;
  margin-bottom: 10px;
}

.arg h4 {
  margin: 0 0 8px;
  font-size: 16.5px;
}

.arg p {
  margin: 0;
  font-size: 14.5px;
  color: #2c4358;
}

figure {
  margin: 0;
}

.fig {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
}

.fig img {
  width: 100%;
  height: auto;
  border-radius: 8px;
  display: block;
}

.fig figcaption {
  font-size: 13.5px;
  color: var(--muted);
  margin-top: 10px;
}

.figs {
  display: grid;
  gap: 14px;
}

.m-list {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
}

.m {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0;
  display: block;
}

.m summary {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 14px 16px;
  cursor: pointer;
  list-style: none;
  border-radius: var(--radius);
}

.m summary::-webkit-details-marker {
  display: none;
}

.m summary:hover {
  background: #f6f9fc;
}

.m .m-head {
  flex: 1;
  min-width: 0;
}

.m h5 {
  margin: 0 0 3px;
  font-size: 15px;
}

.m p {
  margin: 0;
  font-size: 14px;
  color: #2c4358;
}

.m-details {
  padding: 2px 16px 16px;
  border-top: 1px solid var(--line);
}

.m-details p {
  margin: 12px 0 0;
  font-size: 14px;
  color: #2c4358;
}

.m-figs {
  display: grid;
  grid-template-columns: repeat(auto-fit,minmax(min(100%, 320px), 1fr));
  gap: 12px;
  margin-top: 10px;
}

.m-figs .fig figcaption {
  font-size: 12.5px;
  margin-top: 8px;
}

.m-figs .fig.wide {
  grid-column: 1/-1;
}

.data {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 22px;
}

.data a {
  color: var(--blue);
}

section[id] {
  scroll-margin-top: 70px;
}

.note {
  background: #e9f2fa;
  border: 1px solid #cfe2f1;
  border-radius: var(--radius);
  padding: 14px 18px;
  margin-top: 16px;
  font-size: 14.5px;
  color: #1f3c55;
}

.px-sub {
  font-size: 17.5px;
  font-weight: 800;
  margin: 30px 0 6px;
}

.verdict + .verdict {
  margin-top: 14px;
}

.verdict .check.warn {
  background: #c9962f;
}

.flip-head {
  margin: 0 0 8px;
  font-size: 12.5px;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: #ecd9a8;
  font-weight: 700;
}

.v-line {
  margin: 0;
  color: #f0ead9;
  font-size: 15.5px;
  line-height: 1.5;
}

.v-line + .v-line {
  margin-top: 8px;
}

.v-line b {
  color: #fff;
}

.arg .num.px {
  background: var(--blue);
}

table.splits {
  width: 100%;
  border-collapse: collapse;
  margin-top: 18px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  font-size: 14px;
  display: block;
  overflow-x: auto;
}

table.splits th,table.splits td {
  padding: 9px 12px;
  text-align: left;
  border-bottom: 1px solid var(--line);
}

table.splits th {
  background: #eef2f7;
  font-size: 13px;
}

table.splits tr:last-child td {
  border-bottom: none;
}

table.splits .rev {
  font-weight: 800;
  color: var(--red);
}

table.splits .nat {
  font-weight: 700;
}

footer a {
  color: var(--blue);
}

.cards2 {
  display: grid;
  grid-template-columns: repeat(auto-fit,minmax(min(100%, 280px), 1fr));
  gap: 14px;
}

.bar-row {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  font-weight: 600;
  margin: 8px 0 3px;
}

.track {
  height: 10px;
  border-radius: 6px;
  background: #edf1f5;
  overflow: hidden;
  display: flex;
}

.track .bolsonaro {
  background: var(--blue);
}

.track .lula {
  background: var(--red);
}

.plain-rows {
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
  font-size: 14px;
  color: #2c4358;
}

.plain-rows li {
  display: flex;
  justify-content: space-between;
  padding: 3px 0;
  border-bottom: 1px dashed var(--line);
}

.plain-rows li:last-child {
  border-bottom: 0;
}

.outcome {
  margin-top: 12px;
  font-size: 13.5px;
  font-weight: 700;
  border-radius: 8px;
  padding: 6px 10px;
  display: inline-block;
  background: #eef2f6;
  color: #3d5266;
}

.outcome.hot {
  background: var(--red-soft);
  color: var(--red);
}

.m summary:hover h5 {
  color: var(--blue);
}

.m-head {
  flex: 1;
  min-width: 0;
}

.m-details>p {
  margin: 12px 0 0;
}

.res-card.rejected {
  border-left-color: var(--red);
}

.track .za {
  background: var(--green);
}

.track .proti {
  background: var(--red);
}

.outcome.approved {
  background: var(--green-soft);
  color: var(--green);
}

.outcome.rejected {
  background: var(--red-soft);
  color: var(--red);
}

.hero p.lead {
  margin: 0;
  color: #dce8f2;
  font-size: 16.5px;
  max-width: 640px;
}

a.card {
  display: block;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 22px;
  text-decoration: none;
  color: inherit;
  border-left: 5px solid var(--green);
  transition: box-shadow .15s;
}

a.card:hover {
  box-shadow: 0 4px 14px rgba(22,50,79,.12);
}

a.card h4 {
  margin: 0 0 6px;
  font-size: 18px;
  color: var(--ink);
}

a.card p {
  margin: 0 0 12px;
  font-size: 14.5px;
  color: #2c4358;
}

a.card .open {
  font-weight: 700;
  font-size: 14.5px;
  color: var(--green);
}

.soon {
  margin-top: 14px;
  color: var(--muted);
  font-size: 14px;
}

a {
  color: #22669d;
  text-underline-offset: 3px;
}

a:focus-visible, button:focus-visible, summary:focus-visible {
  outline: 3px solid #b7791f;
  outline-offset: 4px;
  border-radius: 3px;
}

.jump {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  padding-top: 20px;
  font-size: 14px;
}

.hero a {
  color: #dce8f2;
}

.sub {
  color: var(--muted);
  margin: 0 0 20px;
}

.cards {
  display: grid;
  grid-template-columns: repeat(3,minmax(0,1fr));
  gap: 14px;
}

.card {
  padding: 18px;
}

.card p {
  font-size: 14px;
  margin: 0;
}

.num {
  display: inline-block;
  font-weight: 800;
  font-size: 13px;
  color: var(--gold);
  margin-bottom: 10px;
}

.note p {
  margin: 0;
}

.methods {
  display: grid;
  gap: 12px;
}

details summary {
  padding: 16px 18px;
  cursor: pointer;
  font-weight: 700;
}

.inside {
  padding: 0 18px 18px;
}

.inside p {
  margin: 0 0 14px;
  font-size: 15px;
}

.inside figure {
  margin-top: 14px;
}

.pair {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 14px;
}

.pair .fig {
  padding: 10px;
}

.table-wrap {
  overflow-x: auto;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-top: 20px;
}

table {
  border-collapse: collapse;
  width: 100%;
  font-size: 14px;
}

caption {
  text-align: left;
  padding: 14px 16px;
  font-weight: 700;
}

th,td {
  padding: 11px 16px;
  text-align: left;
  border-top: 1px solid var(--line);
}

th {
  background: #edf3f8;
}

td.number,th.number {
  text-align: right;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.m-figs a {
  display: block;
}

.brand .flag {
  display: inline-block;
  width: 20px;
  height: 13px;
  border-radius: 2px;
  margin-right: 8px;
  vertical-align: -1px;
}

.page-portugal-2025 .flag {
  background: linear-gradient(90deg, #046a38 40%, #da291c 40%);
}

.page-brazil-oct-2026-round-1 .flag,
.page-brazil-oct-2026-round-2 .flag {
  background: linear-gradient(#009739 20%, #fedd00 20% 80%, #009739 80%);
}

.page-sloveniya-referendum-2026 .flag {
  background: linear-gradient(#fff 33%, #005da4 33% 66%, #ed1c24 66%);
}

.page-slovakia-oct-2026 .flag {
  background: linear-gradient(#fff 33%, #0b4ea2 33% 66%, #ee1c25 66%);
}

.page-india-2024 .flag {
  background: linear-gradient(#ff9933 33%, #fff 33% 66%, #138808 66%);
}

.verdict > div {
  min-width: 0;
}

.m summary::after {
  content: "";
  flex: none;
  width: 8px;
  height: 8px;
  margin-top: 7px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(45deg);
}

.m[open] summary::after {
  transform: rotate(225deg);
}

.m .chev {
  display: none;
}

.cards .card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.m h3 {
  margin: 0 0 3px;
  font-size: 15px;
}

.m summary p {
  font-weight: 400;
}

section > h2, .res-card > h2 {
  font-size: clamp(19px, 3vw, 25px);
  margin: 0 0 10px;
}

.page-usa-2024 h3 {
  font-size: 16.5px;
}

.page-usa-2024 .m h3 {
  font-size: 15px;
}

.page-usa-2024 figure {
  margin-top: 18px;
}

.page-usa-2024 .m-figs figure {
  margin: 0;
}

a.card + a.card {
  margin-top: 14px;
}

section[id], details[id] {
  scroll-margin-top: 100px;
}

img {
  max-width: 100%;
}

.data, .inside {
  overflow-wrap: anywhere;
}

.bar .right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.verdict.flip {
  background: rgba(201, 150, 47, .14);
  border-color: rgba(201, 150, 47, .42);
}

.data ul {
  margin: 10px 0 0;
  padding-left: 20px;
}

.data li {
  margin-bottom: 9px;
  font-size: 14.5px;
  color: #2c4358;
}

footer {
  margin-top: 46px;
  border-top: 1px solid var(--line);
  padding-top: 18px;
  color: var(--muted);
  font-size: 13px;
}

h1 {
  font-size: clamp(24px,4.6vw,38px);
  line-height: 1.18;
  margin: 10px 0 22px;
  font-weight: 800;
}

section {
  margin-top: 44px;
}

.m-figs .fig {
  padding: 10px;
}

.m .badge {
  flex: none;
  margin-top: 2px;
  background: var(--green-soft);
  color: var(--green);
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  font-size: 15px;
  line-height: 1;
  border-radius: 50%;
}

.m .badge.warn {
  background: var(--amber-soft);
  color: var(--amber);
}

.m .badge.neutral {
  background: #edf3f8;
  color: var(--muted);
}

.context-facts {
  padding-left: 20px;
  margin: 14px 0;
  font-size: 14px;
  color: #2c4358;
}

details {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
}

@media (min-width: 760px) {
  .figs .fig.half {
    display: grid;
    grid-template-columns: 1.6fr 1fr;
    align-items: center;
  }
}

@media (max-width: 650px) {
  .cards, .pair {
    grid-template-columns: 1fr;
  }
  .hero {
    padding: 32px 20px;
  }
  .verdict {
    padding: 14px;
    gap: 10px;
  }
  .verdict .check {
    width: 32px;
    height: 32px;
    font-size: 20px;
  }
  .m .badge {
    white-space: normal;
  }
  .p-row {
    grid-template-columns: 68px 1fr 52px;
    gap: 6px;
  }
  header.top {
    position: static;
  }
}


.page-usa-2024 details.m {
  margin-top: 12px;
}

.page-usa-2024 .methods .m {
  margin-top: 0;
}

.page-usa-2024 .methods {
  margin-top: 12px;
}

.page-usa-2024 #ohio .res-card {
  border-left-color: var(--amber);
}

.page-usa-2024 #ohio .tag {
  color: var(--amber);
}


.page-serbia-oct-2026 .flag {
  background: linear-gradient(#c6363c 33%, #0c4076 33% 66%, #fff 66%);
}

.page-bulgaria-oct-2026 .flag,
.page-bulgaria-oct-2026-round-2 .flag {
  background: linear-gradient(#fff 33%, #00966e 33% 66%, #d62612 66%);
}

.page-bulgaria-oct-2026 .p-row,
.page-bulgaria-oct-2026-round-2 .p-row {
  grid-template-columns: minmax(90px, 150px) 1fr 62px;
}

.page-bulgaria-oct-2026 .p-name,
.page-bulgaria-oct-2026-round-2 .p-name {
  white-space: normal;
}

.page-bulgaria-oct-2026 .m-details > .res-card,
.page-bulgaria-oct-2026 .m-details > .args,
.page-bulgaria-oct-2026-round-2 .m-details > .res-card,
.page-bulgaria-oct-2026-round-2 .m-details > .args {
  margin-top: 16px;
}

.page-bulgaria-oct-2026 code,
.page-bulgaria-oct-2026-round-2 code {
  overflow-wrap: anywhere;
}

.page-serbia-oct-2026 .right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.page-serbia-oct-2026 .p-row {
  grid-template-columns: minmax(90px, 130px) 1fr 62px;
}

.page-serbia-oct-2026 .p-name {
  white-space: normal;
}

.page-serbia-oct-2026 .m-details > .res-card,
.page-serbia-oct-2026 .m-details > .args {
  margin-top: 16px;
}

.page-serbia-oct-2026 code {
  overflow-wrap: anywhere;
}

.page-usa-2024 .flag {
  background: repeating-linear-gradient(#b22234 0 1px, #fff 1px 2px);
  position: relative;
}

.page-usa-2024 .flag::before {
  content: "";
  position: absolute;
  inset: 0 50% 46% 0;
  background: #3c3b6e;
}
