@import url("/fonts.css");
:root {
  --bg: #f4f5f2;
  --paper: #fff;
  --ink: #152f39;
  --muted: #6c7a7c;
  --line: #e1e6e1;
  --green: #286b56;
  --soft: #e8f1eb;
  --a: #a84252;
  --b: #356b9d;
  --amber: #956a20;
  --radius: 13px;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Segoe UI", Arial, sans-serif;
  font-size: 14px;
  line-height: 1.5;
}
button,
input,
select {
  font: inherit;
}
button,
a,
input,
select {
  outline-offset: 5px;
}
a {
  color: inherit;
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}
button {
  cursor: pointer;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid #50a681;
}
.skip {
  position: absolute;
  left: 16px;
  top: -80px;
  background: var(--ink);
  color: #fff;
  padding: 12px;
  z-index: 100;
}
.skip:focus {
  top: 8px;
}
.header {
  height: 90px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 max(5.5vw, 24px);
  background: rgba(255, 255, 255, 0.95);
  border-bottom: 1px solid var(--line);
  gap: 25px;
}
.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  font-size: 15px;
  letter-spacing: 2px;
  line-height: 1.3;
}
.brand:hover {
  text-decoration: none;
}
.brand strong {
  font-weight: 750;
}
.brand small {
  display: block;
  font-size: 9px;
  letter-spacing: 3px;
  margin-top: 4px;
  color: var(--muted);
}
.brand-mark {
  font-size: 43px;
  color: var(--green);
  line-height: 1;
}
.header nav {
  display: flex;
  gap: 29px;
  align-self: stretch;
  align-items: stretch;
}
.nav {
  border: 0;
  background: none;
  padding: 3px 0 0;
  color: var(--muted);
  border-bottom: 3px solid transparent;
  font-size: 13px;
  font-weight: 600;
}
.nav.active {
  color: var(--ink);
  border-color: var(--green);
}
.connection {
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}
.dot {
  height: 7px;
  width: 7px;
  background: #97a5a0;
  border-radius: 50%;
  display: inline-block;
}
.connection.healthy .dot {
  background: #399375;
  box-shadow: 0 0 0 4px #edf5ee;
}
.connection.error .dot {
  background: #b76b36;
  box-shadow: 0 0 0 4px #f6eee5;
}
main {
  max-width: 1470px;
  padding: 43px 5.5vw 35px;
  margin: 0 auto;
}
.page-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 30px;
  margin-bottom: 28px;
}
.eyebrow {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.9px;
  color: var(--muted);
  margin: 0 0 11px;
}
h1 {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 400;
  font-size: 49px;
  letter-spacing: -2px;
  line-height: 1.1;
  margin: 0 0 14px;
}
h2 {
  font-size: 15px;
  font-weight: 650;
  margin: 0;
}
h3 {
  margin: 0;
}
.subtitle {
  font-size: 14px;
  color: var(--muted);
  max-width: 700px;
  margin: 0;
}
.update {
  text-align: right;
  min-width: 220px;
}
.update > span {
  font-size: 9px;
  letter-spacing: 1.4px;
  color: var(--muted);
}
.update strong {
  display: block;
  font-size: 22px;
  letter-spacing: -0.5px;
  margin: 4px 0;
}
.update small {
  color: var(--muted);
  font-size: 10px;
}
.notice {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 19px;
  background: #ecf2ed;
  border: 1px solid #d6e4d9;
  border-radius: 9px;
  margin-bottom: 24px;
}
.notice-icon {
  height: 23px;
  min-width: 23px;
  border-radius: 50%;
  border: 1px solid #79a28b;
  color: var(--green);
  display: grid;
  place-items: center;
  font-family: Georgia, serif;
  font-size: 15px;
}
.notice strong {
  font-size: 12px;
  font-weight: 650;
}
.notice p {
  font-size: 11px;
  line-height: 1.55;
  color: #5e7667;
  margin: 3px 0 0;
}
.notice .tag {
  margin-left: auto;
  font-size: 8px;
  letter-spacing: 1px;
  background: #dbe9de;
  color: #456c53;
  padding: 5px 8px;
  border-radius: 3px;
  white-space: nowrap;
}
.notice.warning {
  background: #f7f1e6;
  border-color: #eadfc8;
}
.notice.warning p {
  color: #827049;
}
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.95fr) minmax(270px, 1fr);
  gap: 20px;
}
.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 25px;
  margin-bottom: 20px;
}
.card-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}
.card-heading > div > .muted {
  margin: 5px 0 0;
}
.card-heading > a {
  font-size: 11px;
  color: var(--muted);
}
.small-label {
  font-size: 8px;
  letter-spacing: 1.2px;
  color: var(--muted);
  font-weight: 650;
  white-space: nowrap;
}
.forecast-card {
  padding: 25px 30px 19px;
}
.candidates {
  display: grid;
  grid-template-columns: 1fr 60px 1fr;
  align-items: center;
  padding: 8px 0 18px;
}
.candidate-b {
  text-align: right;
}
.party {
  display: inline-block;
  font-size: 9px;
  letter-spacing: 0.8px;
  font-weight: 650;
  padding: 3px 7px;
  border-radius: 4px;
  background: #f8edef;
  color: var(--a);
}
.candidate-b .party {
  background: #edf2f8;
  color: var(--b);
}
.candidate h3 {
  font-size: 17px;
  letter-spacing: -0.3px;
  font-weight: 650;
  margin: 11px 0 5px;
}
.candidate-value {
  font-size: 61px;
  font-weight: 350;
  line-height: 1.1;
  letter-spacing: -3px;
  color: var(--a);
  font-variant-numeric: tabular-nums;
}
.candidate-b .candidate-value {
  color: var(--b);
}
.candidate-value > span {
  font-size: 27px;
  letter-spacing: -1px;
  margin-left: 3px;
  font-weight: 300;
}
.candidate p {
  margin: 8px 0 0;
  font-size: 10px;
  color: var(--muted);
}
.versus {
  text-align: center;
  margin-top: 15px;
}
.versus > span {
  font-size: 25px;
  font-weight: 200;
  color: #b7c0bf;
}
.versus small {
  display: block;
  font-size: 7px;
  letter-spacing: 1.1px;
  color: #95a19e;
  margin-top: 10px;
  line-height: 1.7;
}
.share-track {
  height: 9px;
  border-radius: 4px;
  background: #edf0ee;
  display: flex;
  overflow: hidden;
  gap: 3px;
}
.share-track > div:first-child {
  background: var(--a);
  width: 0;
}
.share-track > div:last-child {
  background: var(--b);
  width: 0;
}
.forecast-foot {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 8px;
  color: var(--muted);
  margin-top: 13px;
}
.legend-line {
  display: inline-block;
  width: 13px;
  height: 4px;
  background: #dce8e0;
  margin-right: 3px;
  vertical-align: middle;
}
.count-card .card-heading {
  margin-bottom: 18px;
}
.count-percent {
  font-size: 43px;
  line-height: 1.1;
  letter-spacing: -2px;
  font-weight: 400;
}
.count-percent > span {
  font-size: 21px;
  margin-left: 3px;
}
.muted {
  color: var(--muted);
  font-size: 11px;
}
.count-card > .muted {
  margin: 6px 0 19px;
}
.count-card progress {
  width: 100%;
  height: 6px;
  border: 0;
  border-radius: 4px;
  background: #edf1ed;
  display: block;
}
.count-card progress::-webkit-progress-bar {
  background: #edf1ed;
  border-radius: 4px;
}
.count-card progress::-webkit-progress-value {
  background: var(--green);
  border-radius: 4px;
}
.count-card progress::-moz-progress-bar {
  background: var(--green);
}
.count-stats {
  margin: 18px 0 0;
}
.count-stats > div {
  display: flex;
  justify-content: space-between;
  padding: 7px 0;
  font-size: 10px;
}
.count-stats dt {
  color: var(--muted);
}
.count-stats dd {
  margin: 0;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.micro {
  font-size: 9px;
  line-height: 1.6;
  color: #87928e;
  margin: 12px 0 0;
}
.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}
.metric {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 18px 20px;
}
.metric > span {
  font-size: 8px;
  letter-spacing: 1.2px;
  color: var(--muted);
  display: block;
  font-weight: 650;
}
.metric strong {
  display: block;
  font-size: 27px;
  letter-spacing: -0.8px;
  font-weight: 500;
  margin: 7px 0 4px;
}
.metric small {
  font-size: 9px;
  color: var(--muted);
}
.lower-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.95fr) minmax(270px, 1fr);
  gap: 20px;
}
.map-card {
  padding-bottom: 15px;
}
.map-card .card-heading {
  margin-bottom: 5px;
}
.map-layout {
  display: grid;
  grid-template-columns: 1.55fr 1fr;
  gap: 20px;
  align-items: center;
}
#brazil-map {
  display: block;
  width: 100%;
  max-height: 295px;
}
.state-shape {
  fill: #e4e9e5;
  stroke: #fff;
  stroke-width: 1.5;
  cursor: pointer;
  transition:
    fill 0.2s,
    opacity 0.2s;
}
.state-shape:hover,
.state-shape:focus {
  stroke: var(--ink);
  stroke-width: 2.5;
  outline: none;
  filter: brightness(0.95);
}
.state-label {
  fill: #465a59;
  font-size: 9px;
  font-weight: 600;
  pointer-events: none;
  paint-order: stroke;
  stroke: #ffffff90;
  stroke-width: 2px;
}
.state-insight {
  padding-right: 10px;
}
.state-insight h3 {
  font-family: Georgia, serif;
  font-size: 27px;
  font-weight: 400;
  line-height: 1.2;
  margin: 10px 0;
}
.state-insight > p {
  font-size: 10px;
  color: var(--muted);
}
.state-insight .eyebrow {
  font-size: 9px;
}
.map-legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 4px;
  margin: 21px 0 0;
  font-size: 7px;
  color: var(--muted);
}
.map-legend > div {
  order: 3;
  flex-basis: 100%;
  height: 5px;
  background: linear-gradient(90deg, #a84252, #f0efee, #356b9d);
  border-radius: 4px;
}
.health-list {
  list-style: none;
  margin: 0 0 17px;
  padding: 0;
}
.health-list > li {
  display: flex;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid #f0f2ef;
}
.health-list > li:first-child {
  padding-top: 2px;
}
.health-list > li:last-child {
  border: 0;
}
.check {
  height: 21px;
  min-width: 21px;
  border-radius: 50%;
  color: #39775e;
  background: #edf4ee;
  display: grid;
  place-items: center;
  font-size: 11px;
}
.health-list strong {
  font-size: 11px;
  font-weight: 600;
  display: block;
}
.health-list small {
  font-size: 9px;
  color: var(--muted);
  display: block;
  margin-top: 3px;
}
.text-link {
  font-size: 10px;
  color: var(--green);
  font-weight: 600;
}
.timeline-card {
  margin-top: 0;
}
.chart-wrap {
  min-height: 210px;
  display: grid;
  align-items: center;
}
.chart-wrap svg {
  width: 100%;
  height: auto;
  max-height: 380px;
  overflow: visible;
}
.empty-state {
  color: #91a098;
  font-size: 12px;
  text-align: center;
  border: 1px dashed #dfe6df;
  border-radius: 8px;
  padding: 60px 20px;
}
.chart-axis {
  fill: #7d8a85;
  font-size: 10px;
}
.chart-grid {
  stroke: #edf0ec;
  stroke-width: 1;
}
.chart-model {
  stroke: var(--green);
  stroke-width: 2.8;
  fill: none;
}
.chart-raw {
  stroke: #b59666;
  stroke-width: 2;
  stroke-dasharray: 5 4;
  fill: none;
}
.chart-actual {
  stroke: #657982;
  stroke-width: 1.5;
  stroke-dasharray: 3 4;
  fill: none;
}
.chart-band {
  fill: #d9e9df;
  opacity: 0.75;
}
.chart-cursor {
  stroke: #9caaa0;
  stroke-dasharray: 3 4;
}
.chart-dot {
  fill: var(--green);
  stroke: #fff;
  stroke-width: 2;
}
.chart-legend {
  display: flex;
  gap: 22px;
  justify-content: center;
  font-size: 10px;
  color: var(--muted);
  margin: 15px 0 24px;
  flex-wrap: wrap;
}
.chart-legend span {
  display: flex;
  align-items: center;
  gap: 6px;
}
.chart-legend i {
  display: block;
  width: 18px;
  height: 3px;
  background: var(--green);
}
.chart-legend .legend-raw {
  background: #b59666;
}
.chart-legend .legend-actual {
  background: #657982;
}
.chart-legend .legend-band {
  height: 8px;
  background: #d9e9df;
}
.controls {
  display: flex;
  gap: 12px;
  align-items: end;
}
.controls label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 9px;
  color: var(--muted);
}
select,
input[type="search"] {
  border: 1px solid #dfe5dd;
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  font-size: 11px;
  padding: 9px 12px;
  max-width: 100%;
}
.button-secondary {
  font-size: 11px;
  padding: 10px 14px;
  border: 1px solid #d6dfd7;
  border-radius: 6px;
  background: #fff;
}
.slider-label {
  font-size: 11px;
  display: block;
  color: var(--muted);
}
.slider-label strong {
  color: var(--ink);
}
input[type="range"] {
  width: 100%;
  accent-color: var(--green);
  margin: 13px 0 20px;
  cursor: pointer;
}
.replay-detail {
  display: flex;
  gap: 30px;
  background: #f4f7f3;
  padding: 15px 20px;
  border-radius: 7px;
  flex-wrap: wrap;
}
.replay-detail strong {
  display: block;
  font-size: 20px;
  font-weight: 500;
  margin-top: 5px;
}
.replay-detail span {
  font-size: 9px;
  color: var(--muted);
}
.limitations ul {
  font-size: 12px;
  line-height: 1.9;
  color: var(--muted);
  padding-left: 20px;
}
.table-scroll {
  overflow: auto;
  max-height: 650px;
}
table {
  border-collapse: collapse;
  width: 100%;
  font-size: 10px;
  text-align: left;
}
thead {
  position: sticky;
  top: 0;
  background: #f4f7f2;
  z-index: 1;
}
th {
  font-size: 9px;
  font-weight: 650;
  padding: 12px 10px;
  white-space: nowrap;
  color: #586c62;
}
td {
  padding: 12px 10px;
  border-bottom: 1px solid #edf1eb;
  vertical-align: top;
}
td strong {
  font-weight: 600;
  display: block;
}
td small {
  display: block;
  color: var(--muted);
  margin-top: 3px;
  font-size: 8px;
}
td a {
  color: var(--green);
}
.method-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 20px;
}
.method-grid .card {
  padding: 28px;
}
.step {
  font-family: Georgia, serif;
  font-size: 29px;
  color: #9eb9a8;
  display: block;
  margin-bottom: 20px;
}
.method-grid p,
.method-equation > p:last-child,
#method-panel > .card p {
  font-size: 12px;
  line-height: 1.85;
  color: var(--muted);
}
.method-equation {
  text-align: center;
  background: #edf3ed;
  border-color: #d6e2d6;
  padding: 35px;
}
.equation {
  font-family: Georgia, serif;
  font-size: 23px;
  line-height: 1.8;
}
.equation > span {
  font-size: 17px;
}
.source-links {
  display: flex;
  gap: 25px;
  font-size: 11px;
  color: var(--green);
  margin-top: 20px;
  flex-wrap: wrap;
}
footer {
  max-width: 1470px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 5.5vw 30px;
  margin: auto;
  gap: 20px;
  color: #86918a;
  font-size: 8px;
  border-top: 1px solid var(--line);
}
footer > span {
  white-space: nowrap;
  font-size: 8px;
  letter-spacing: 0.7px;
}
footer > p {
  font-size: 8px;
  text-align: center;
}
.footer-dot {
  padding: 0 5px;
}
.hidden,
[hidden] {
  display: none !important;
}
#toast {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: #173b31;
  color: white;
  border-radius: 7px;
  padding: 12px 20px;
  font-size: 12px;
  box-shadow: 0 4px 20px #0002;
}
@media (min-width: 1600px) {
  main,
  .header,
  footer {
    padding-left: 70px;
    padding-right: 70px;
  }
}
@media (max-width: 1050px) {
  .header {
    padding: 0 25px;
  }
  .header nav {
    gap: 18px;
  }
  main {
    padding: 30px 25px;
  }
  .hero-grid,
  .lower-grid {
    grid-template-columns: minmax(0, 1.6fr) minmax(260px, 1fr);
  }
  .candidate-value {
    font-size: 49px;
  }
  .candidate h3 {
    font-size: 14px;
  }
  .forecast-card {
    padding: 23px;
  }
  .forecast-foot {
    font-size: 7px;
  }
  .metric {
    padding: 16px 13px;
  }
  .metric > span {
    font-size: 7px;
  }
  .metric small {
    font-size: 8px;
  }
  .map-layout {
    grid-template-columns: 1.3fr 1fr;
    gap: 8px;
  }
  .replay-heading {
    align-items: start;
    flex-direction: column;
  }
  .controls {
    width: 100%;
  }
  .state-insight h3 {
    font-size: 24px;
  }
  .small-label {
    font-size: 7px;
  }
}
@media (max-width: 760px) {
  .header {
    height: auto;
    min-height: 100px;
    flex-wrap: wrap;
    padding: 15px 20px 0;
    gap: 7px;
  }
  .brand {
    font-size: 12px;
  }
  .brand-mark {
    font-size: 35px;
  }
  .header nav {
    order: 3;
    width: 100%;
    justify-content: space-between;
    gap: 16px;
    height: 39px;
  }
  .nav {
    font-size: 11px;
  }
  .connection {
    font-size: 9px;
  }
  .page-heading {
    align-items: start;
    flex-direction: column;
    gap: 17px;
  }
  .update {
    text-align: left;
    display: flex;
    gap: 10px;
    align-items: center;
    min-width: 0;
    flex-wrap: wrap;
  }
  .update > span {
    font-size: 8px;
  }
  .update strong {
    font-size: 15px;
    margin: 0;
  }
  .update small {
    font-size: 8px;
    flex-basis: 100%;
  }
  h1 {
    font-size: 39px;
  }
  .eyebrow {
    font-size: 8px;
  }
  .subtitle {
    font-size: 12px;
    line-height: 1.7;
  }
  .notice {
    padding: 13px;
    align-items: start;
    gap: 10px;
  }
  .notice p {
    font-size: 10px;
  }
  .notice .tag {
    font-size: 6px;
    padding: 4px;
  }
  .notice strong {
    font-size: 11px;
  }
  .hero-grid,
  .lower-grid {
    grid-template-columns: 1fr;
  }
  .card {
    padding: 20px;
  }
  .candidate h3 {
    font-size: 17px;
  }
  .candidate-value {
    font-size: 57px;
  }
  .count-card {
    padding: 20px;
  }
  .count-card .card-heading {
    margin-bottom: 10px;
  }
  .count-stats > div {
    font-size: 11px;
  }
  .metric-grid {
    grid-template-columns: 1fr 1fr;
    gap: 11px;
  }
  .metric {
    padding: 16px;
  }
  .metric > span {
    font-size: 7px;
  }
  .metric strong {
    font-size: 25px;
  }
  .metric small {
    font-size: 8px;
  }
  .forecast-foot {
    font-size: 8px;
  }
  .map-layout {
    grid-template-columns: 1.4fr 1fr;
    gap: 15px;
  }
  #brazil-map {
    max-height: 330px;
  }
  .map-card .card-heading > .small-label {
    display: none;
  }
  .health-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
  }
  .health-list > li {
    padding: 0;
    border: 0;
  }
  .health-list strong {
    font-size: 10px;
  }
  .health-list small {
    font-size: 8px;
  }
  .health-card .card-heading {
    margin-bottom: 20px;
  }
  .controls {
    flex-wrap: wrap;
  }
  .controls label {
    flex: 1;
    min-width: 140px;
  }
  .replay-detail {
    gap: 20px;
  }
  .chart-legend {
    gap: 12px;
    font-size: 9px;
  }
  .method-grid {
    grid-template-columns: 1fr;
  }
  .equation {
    font-size: 18px;
  }
  .equation > span {
    font-size: 13px;
  }
  .table-scroll {
    margin: 0 -10px;
  }
  td,
  th {
    padding-left: 8px;
    padding-right: 8px;
  }
  footer {
    padding: 15px 20px 25px;
    align-items: start;
    flex-wrap: wrap;
    gap: 0;
  }
  footer > p {
    order: 3;
    flex-basis: 100%;
    text-align: left;
    line-height: 1.7;
  }
  footer > span:last-child {
    margin-left: auto;
  }
  main {
    padding: 27px 17px;
  }
  .card-heading > h2 {
    font-size: 14px;
  }
  .map-legend {
    font-size: 6px;
  }
  .forecast-card .card-heading .small-label {
    max-width: 120px;
    white-space: normal;
    text-align: right;
    line-height: 1.5;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
