:root {
  --green: #003f32;
  --green-deep: #00271f;
  --green-soft: #0b5b49;
  --orange: #ff4b1f;
  --cream: #f5efdf;
  --mint: #91d9c5;
  --white: #fffef8;
  --line: rgba(145, 217, 197, .25);
}

* { box-sizing: border-box; }

html { min-height: 100%; background: var(--green-deep); }

body {
  min-height: 100vh;
  margin: 0;
  color: var(--white);
  background:
    radial-gradient(circle at 80% 5%, rgba(14, 126, 96, .5), transparent 33%),
    linear-gradient(160deg, #004537 0%, var(--green-deep) 72%);
  font-family: Arial, Helvetica, sans-serif;
}

.background { position: fixed; inset: 0; overflow: hidden; pointer-events: none; }
.background::before {
  content: "70100";
  position: absolute;
  top: 80px;
  left: 50%;
  color: rgba(255,255,255,.022);
  font-size: min(29vw, 430px);
  font-weight: 1000;
  letter-spacing: -.1em;
  transform: translateX(-52%);
}
.background i { position: absolute; width: 3px; height: 3px; border-radius: 50%; background: rgba(145,217,197,.7); }
.background i:nth-child(1) { left: 8%; top: 18%; box-shadow: 76vw 12vh rgba(145,217,197,.45), 34vw 70vh rgba(145,217,197,.35); }
.background i:nth-child(2) { right: 13%; top: 51%; box-shadow: -69vw 27vh rgba(145,217,197,.3), -25vw -33vh rgba(145,217,197,.4); }
.background i:nth-child(3) { left: 19%; bottom: 8%; box-shadow: 55vw -5vh rgba(145,217,197,.5); }

.topbar {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(100% - 40px, 1120px);
  margin: 0 auto;
  padding: 24px 0;
  border-bottom: 1px solid var(--line);
}

.brand img { display: block; width: 155px; height: auto; }
.back-link { color: var(--mint); font-size: 12px; font-weight: 900; text-decoration: none; text-transform: uppercase; letter-spacing: .08em; }

.page { position: relative; z-index: 1; width: min(100% - 40px, 1120px); margin: 0 auto; padding: 55px 0 42px; }
.heading { max-width: 760px; }
.live-badge { display: inline-flex; align-items: center; gap: 9px; padding: 8px 12px; color: var(--mint); border: 1px solid var(--line); background: rgba(0,39,31,.55); font-size: 10px; letter-spacing: .12em; }
.live-badge span { width: 8px; height: 8px; border-radius: 50%; background: #d0a22f; box-shadow: 0 0 0 5px rgba(208,162,47,.12); }
.live-badge.is-live { color: var(--white); border-color: rgba(255,75,31,.65); background: rgba(255,75,31,.14); }
.live-badge.is-live span { background: var(--orange); box-shadow: 0 0 0 6px rgba(255,75,31,.15); animation: pulse 1.6s infinite; }
.live-badge.is-final span { background: var(--mint); box-shadow: 0 0 0 5px rgba(145,217,197,.14); }
.eyebrow { margin: 24px 0 8px; color: var(--mint); font-size: 11px; font-weight: 900; letter-spacing: .2em; }
h1 { margin: 0; font-size: clamp(42px, 7vw, 82px); line-height: .95; letter-spacing: -.06em; text-transform: uppercase; }
h1 em { color: var(--orange); font-style: normal; }
.lead { margin: 18px 0 0; color: rgba(255,254,248,.72); font-size: 17px; line-height: 1.5; }

.candidate-card {
  display: grid;
  grid-template-columns: 220px 1fr minmax(270px, .75fr);
  align-items: center;
  min-height: 300px;
  margin-top: 38px;
  border: 1px solid var(--line);
  background: rgba(0,39,31,.78);
  box-shadow: 0 25px 65px rgba(0,15,12,.28);
  overflow: hidden;
}
.portrait-wrap { position: relative; align-self: stretch; min-height: 300px; background: linear-gradient(145deg, var(--cream), #c8d5cc); overflow: hidden; }
.portrait-glow { position: absolute; width: 220px; height: 220px; top: 20px; left: 0; border-radius: 50%; background: rgba(255,75,31,.22); filter: blur(20px); }
.portrait { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 17%; image-rendering: auto; }
.party { position: absolute; left: 16px; bottom: 16px; padding: 8px 11px; color: var(--white); background: var(--orange); font-size: 10px; font-weight: 1000; letter-spacing: .14em; }
.candidate-copy { padding: 34px 38px; }
.office { margin: 0 0 8px; color: var(--mint); font-size: 11px; font-weight: 900; letter-spacing: .16em; }
.candidate-copy h2 { margin: 0; font-size: clamp(45px, 7vw, 74px); line-height: .9; letter-spacing: -.06em; }
.number { margin-top: 17px; color: var(--cream); font-size: 42px; font-weight: 1000; letter-spacing: -.06em; }
.number span { color: var(--orange); }
.status-pill { display: inline-block; margin-top: 20px; padding: 9px 12px; color: var(--mint); border: 1px solid var(--line); font-size: 11px; font-weight: 800; }
.status-pill.elected { color: var(--green-deep); border-color: var(--mint); background: var(--mint); }
.vote-block { display: flex; flex-direction: column; justify-content: center; min-height: 220px; padding: 35px 38px; border-left: 1px solid var(--line); }
.vote-block > span, .progress-head span, .stats span, .update-card span { color: var(--mint); font-size: 10px; font-weight: 900; letter-spacing: .13em; }
.vote-block strong { margin-top: 8px; color: var(--orange); font-size: clamp(58px, 9vw, 104px); line-height: .9; letter-spacing: -.06em; }
.vote-block small { margin-top: 13px; color: rgba(255,254,248,.64); font-size: 12px; }

.progress-card { margin-top: 16px; padding: 27px 30px; border: 1px solid var(--line); background: rgba(0,39,31,.55); }
.progress-head { display: flex; align-items: end; justify-content: space-between; gap: 20px; }
.progress-head div { display: grid; gap: 8px; }
.progress-head strong { font-size: 20px; }
.progress-head > b { color: var(--orange); font-size: 28px; }
.progress-track { height: 13px; margin-top: 20px; background: rgba(255,255,255,.08); overflow: hidden; }
.progress-track i { display: block; width: 0; height: 100%; background: linear-gradient(90deg, var(--orange), #ff8a36); transition: width .6s ease; }
.progress-card p { margin: 13px 0 0; color: rgba(255,254,248,.63); font-size: 12px; }

.stats { display: grid; grid-template-columns: repeat(3,1fr); gap: 16px; margin-top: 16px; }
.stats article { display: grid; gap: 9px; min-height: 145px; padding: 26px 28px; border: 1px solid var(--line); background: rgba(0,39,31,.55); }
.stats strong { align-self: end; color: var(--cream); font-size: 34px; letter-spacing: -.04em; }
.stats small { color: rgba(255,254,248,.54); font-size: 11px; line-height: 1.4; }

.cities-card { margin-top: 16px; padding: 30px; border: 1px solid var(--line); background: rgba(0,39,31,.68); }
.cities-heading { display: flex; align-items: start; justify-content: space-between; gap: 20px; }
.cities-heading .eyebrow { margin: 0 0 8px; }
.cities-heading h2 { margin: 0; font-size: clamp(30px, 5vw, 48px); line-height: .95; letter-spacing: -.045em; text-transform: uppercase; }
.cities-heading p:not(.eyebrow) { margin: 10px 0 0; color: rgba(255,254,248,.6); font-size: 13px; }
.ranking-label { flex: 0 0 auto; padding: 8px 10px; color: var(--orange); border: 1px solid rgba(255,75,31,.48); font-size: 9px; font-weight: 900; letter-spacing: .12em; }
.cities-coverage { margin-top: 24px; }
.cities-coverage > span { color: var(--mint); font-size: 10px; font-weight: 800; }
.coverage-track { height: 5px; margin-top: 9px; background: rgba(255,255,255,.08); overflow: hidden; }
.coverage-track i { display: block; width: 0; height: 100%; background: var(--mint); transition: width .5s ease; }
.cities-ranking { display: grid; gap: 8px; margin: 22px 0 0; padding: 0; list-style: none; }
.city-row { position: relative; display: grid; grid-template-columns: 42px minmax(0,1fr) auto; gap: 14px; align-items: center; min-height: 69px; padding: 12px 16px; border: 1px solid rgba(145,217,197,.16); background: rgba(0,31,25,.5); overflow: hidden; }
.city-row:first-child { border-color: rgba(255,75,31,.58); background: linear-gradient(90deg,rgba(255,75,31,.15),rgba(0,31,25,.55)); }
.city-position { position: relative; z-index: 1; color: var(--mint); font-size: 15px; font-weight: 1000; }
.city-row:first-child .city-position { color: var(--orange); }
.city-info { position: relative; z-index: 1; min-width: 0; }
.city-info strong { display: block; overflow: hidden; font-size: 15px; text-overflow: ellipsis; text-transform: uppercase; white-space: nowrap; }
.city-info small { display: block; margin-top: 5px; color: rgba(255,254,248,.52); font-size: 10px; }
.city-votes { position: relative; z-index: 1; text-align: right; }
.city-votes strong { display: block; color: var(--cream); font-size: 22px; }
.city-votes small { display: block; margin-top: 3px; color: var(--orange); font-size: 10px; font-weight: 800; }
.city-bar { position: absolute; inset: auto 0 0; height: 3px; background: linear-gradient(90deg,var(--orange),rgba(255,75,31,.08)); transform-origin: left; }
.cities-empty { padding: 28px 18px; color: rgba(255,254,248,.56); border: 1px dashed var(--line); font-size: 12px; text-align: center; }
.cities-note { margin: 15px 0 0; color: rgba(255,254,248,.4); font-size: 9px; line-height: 1.5; }

.update-card { display: grid; grid-template-columns: 48px 1fr auto; gap: 17px; align-items: center; margin-top: 16px; padding: 20px 24px; border: 1px solid var(--line); background: rgba(0,39,31,.55); }
.update-icon { display: grid; place-items: center; width: 45px; height: 45px; color: var(--orange); border: 1px solid rgba(255,75,31,.5); font-size: 23px; }
.update-card div:nth-child(2) { display: grid; gap: 5px; }
.update-card strong { font-size: 15px; }
.update-card small { color: rgba(255,254,248,.52); font-size: 11px; }
.update-card button, .actions a, .actions button { min-height: 48px; padding: 0 20px; border: 1px solid var(--line); color: var(--white); background: transparent; font: inherit; font-size: 11px; font-weight: 900; text-decoration: none; text-transform: uppercase; cursor: pointer; }
.update-card button:hover, .update-card button:focus-visible { border-color: var(--mint); outline: none; }
.update-card button:disabled { cursor: wait; opacity: .55; }

.actions { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 22px; }
.actions a, .actions button { display: flex; align-items: center; justify-content: center; min-height: 60px; }
.actions .share-button { justify-content: space-between; color: var(--green-deep); border-color: var(--orange); background: var(--orange); }
.actions .share-button span { font-size: 20px; }
.actions .tse-button { border-color: var(--mint); }
.disclaimer { margin: 22px auto 0; max-width: 900px; color: rgba(255,254,248,.48); font-size: 10px; line-height: 1.55; text-align: center; }

footer { position: relative; z-index: 1; display: flex; justify-content: space-between; gap: 20px; width: min(100% - 40px, 1120px); margin: 0 auto; padding: 24px 0 34px; color: rgba(145,217,197,.62); border-top: 1px solid var(--line); font-size: 10px; letter-spacing: .08em; }

@keyframes pulse { 50% { box-shadow: 0 0 0 10px rgba(255,75,31,0); } }

@media (max-width: 800px) {
  .candidate-card { grid-template-columns: 145px 1fr; }
  .portrait-wrap { min-height: 235px; }
  .candidate-copy { padding: 25px; }
  .vote-block { grid-column: 1 / -1; min-height: auto; padding: 26px; border-top: 1px solid var(--line); border-left: 0; text-align: center; }
  .stats { grid-template-columns: 1fr; }
  .stats article { min-height: 115px; }
}

@media (max-width: 540px) {
  .topbar, .page, footer { width: min(100% - 22px, 1120px); }
  .topbar { padding: 17px 0; }
  .brand img { width: 125px; }
  .back-link { font-size: 10px; }
  .page { padding-top: 35px; }
  .candidate-card { grid-template-columns: 125px 1fr; margin-top: 27px; }
  .portrait-wrap { min-height: 205px; }
  .candidate-copy { padding: 20px 16px; }
  .candidate-copy h2 { font-size: 42px; }
  .number { margin-top: 12px; font-size: 33px; }
  .status-pill { margin-top: 13px; padding: 7px 8px; font-size: 9px; }
  .vote-block strong { font-size: 70px; }
  .progress-card { padding: 22px 18px; }
  .progress-head > b { font-size: 23px; }
  .stats article { padding: 22px; }
  .cities-card { padding: 22px 16px; }
  .cities-heading { display: grid; }
  .ranking-label { justify-self: start; }
  .city-row { grid-template-columns: 32px minmax(0,1fr) auto; gap: 9px; padding: 11px 10px; }
  .city-info strong { font-size: 13px; }
  .city-votes strong { font-size: 18px; }
  .update-card { grid-template-columns: 42px 1fr; padding: 18px; }
  .update-card button { grid-column: 1 / -1; width: 100%; }
  .actions { grid-template-columns: 1fr; }
  footer { display: grid; text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
  .live-badge.is-live span { animation: none; }
  .progress-track i { transition: none; }

  .coverage-track i { transition: none; }
}
