:root {
  --ods-paper: #f4f1ea;
  --ods-ink: #191c1a;
  --ods-muted: #626760;
  --ods-wine: #8f1538;
  --ods-wine-deep: #64102a;
  --ods-yellow: #f6e82d;
  --ods-line: rgba(25, 28, 26, .16);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0 !important;
  padding: 0 0 70px !important;
  overflow-x: auto;
  background:
    radial-gradient(circle at 8% 22%, rgba(246,232,45,.13), transparent 25rem),
    linear-gradient(135deg, rgba(143,21,56,.045), transparent 38%),
    var(--ods-paper) !important;
  color: var(--ods-ink) !important;
  font-family: Arial, Helvetica, sans-serif !important;
  line-height: 1.45;
}
body > *:not(.ods-header):not(.ods-hero):not(.ods-footer) { position: relative; }
font { color: inherit !important; font-family: inherit !important; }
a { color: var(--ods-wine) !important; font-weight: 700; text-decoration: none; }
a:hover { color: var(--ods-wine-deep) !important; text-decoration: underline; text-underline-offset: 4px; }

.ods-header {
  position: sticky;
  z-index: 9999;
  top: 0;
  min-height: 82px;
  padding: 12px clamp(18px, 4.5vw, 72px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  background: rgba(100, 16, 42, .97);
  border-bottom: 1px solid rgba(255, 255, 255, .18);
  box-shadow: 0 8px 30px rgba(49, 8, 20, .18);
  color: white;
}
.ods-brand { display: flex; align-items: center; gap: 12px; color: white !important; text-decoration: none !important; }
.ods-brand img { width: 48px; height: 48px; }
.ods-brand span { display: grid; gap: 3px; }
.ods-brand strong { color: #fff !important; font-size: 1.2rem; line-height: 1; letter-spacing: -.03em; }
.ods-brand small { color: rgba(255,255,255,.7); font-size: .56rem; letter-spacing: .15em; text-transform: uppercase; }
.ods-nav { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 8px; }
.ods-nav a { padding: 9px 12px; border-radius: 999px; color: rgba(255,255,255,.86) !important; font-size: .78rem; text-decoration: none !important; }
.ods-nav a:hover, .ods-nav a:focus { background: var(--ods-yellow); color: var(--ods-wine-deep) !important; }
.ods-nav .ods-main-site { margin-left: 5px; border: 1px solid rgba(255,255,255,.45); }

.ods-hero {
  width: 100%;
  margin: 0 0 34px;
  padding: 32px clamp(18px, 5vw, 80px) 36px;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 28px;
  background: linear-gradient(120deg, var(--ods-wine), var(--ods-wine-deep));
  color: white;
}
.ods-hero img {
  width: 78px;
  height: 106px;
  object-fit: contain;
  padding: 0;
  border-radius: 0;
  filter: drop-shadow(0 10px 20px rgba(0,0,0,.16));
}
.ods-hero-copy { display: grid; gap: 4px; }
.ods-hero-copy span { color: var(--ods-yellow); font-size: .67rem; font-weight: 800; letter-spacing: .17em; text-transform: uppercase; }
.ods-hero-copy strong { font-family: Georgia, "Times New Roman", serif; font-size: clamp(2rem, 4vw, 4.5rem); font-weight: 400; line-height: 1; letter-spacing: -.045em; }
.ods-hero-copy small { color: rgba(255,255,255,.72); font-size: .9rem; }
.ods-election-dates { display: block; margin: 7px 0 2px; color: rgba(255,255,255,.92); font-size: .88rem; }
.ods-election-dates b { color: var(--ods-yellow); font-size: .68rem; letter-spacing: .1em; text-transform: uppercase; }
.ods-election-dates i { padding: 0 .65em; color: rgba(255,255,255,.45); font-style: normal; }

body > table, body > div, body > p, body > h1, body > h2, body > h3, body > h4 {
  max-width: 1320px;
  margin-left: auto !important;
  margin-right: auto !important;
}
body > div { width: min(94%, 1320px); }
table {
  color: var(--ods-ink) !important;
  border-collapse: separate !important;
  border-spacing: 0 !important;
  border: 1px solid var(--ods-line) !important;
  background: rgba(255,255,255,.76);
  box-shadow: 0 14px 38px rgba(51,16,27,.09);
  overflow: hidden;
}
table table { box-shadow: none; }
td, th { padding: 10px 12px !important; border-color: var(--ods-line) !important; }
tr:first-child td, th { font-weight: 700; }
tr:nth-child(even) > td { background: rgba(143,21,56,.055); }
body:not(.ods-page-home) tr:hover > td:not(.ods-symbol-cell) { background: rgba(246,232,45,.12) !important; }
[bgcolor] { background: rgba(246,232,45,.22) !important; }
img { max-width: 100%; }
td img { border-radius: 7px; }
hr { height: 1px; border: 0; background: var(--ods-line); }
h1, h2, h3, h4 { color: var(--ods-ink); }

.ods-footer {
  width: 100%;
  margin-top: 42px;
  padding: 20px clamp(18px, 5vw, 80px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  background: #202421;
  color: rgba(255,255,255,.7);
  font-size: .78rem;
}
.ods-footer strong { color: white; }
.ods-footer a { color: var(--ods-yellow) !important; }
.ods-separator { padding: 0 .35em; color: var(--ods-yellow); }

/* Homepage: more rhythm and less empty white space. */
.ods-page-home > div:not(.ods-header):not(.ods-hero):not(.ods-footer) {
  padding: clamp(18px, 3vw, 38px);
  border: 1px solid rgba(100,16,42,.12);
  background: rgba(255,255,255,.54);
  box-shadow: 0 18px 50px rgba(51,16,27,.08);
}
.ods-page-home table { border-radius: 10px; }

/* Party symbols always retain their original square proportions. */
.ods-list-symbol {
  display: inline-block !important;
  width: 100px !important;
  height: 100px !important;
  max-width: none !important;
  object-fit: contain !important;
  border-radius: 10px !important;
  background: #fff;
}
.ods-page-home .ods-list-symbol {
  width: 30px !important;
  height: 30px !important;
  min-width: 30px !important;
  border-radius: 4px !important;
}
.ods-page-home .ods-home-list-summary .ods-list-symbol {
  width: 100px !important;
  height: 100px !important;
  min-width: 100px !important;
  border-radius: 10px !important;
}
td:has(.ods-list-symbol),
.ods-symbol-cell { background: #fff !important; }
body.ods-page-lists td.ods-symbol-cell,
body.ods-page-lists tr:hover > td.ods-symbol-cell { background: #fff !important; }
.ods-page-lists .ods-list-symbol {
  width: 48px !important;
  height: 48px !important;
  min-width: 48px !important;
  aspect-ratio: 1 / 1;
}
.ods-page-lists td:has(.ods-list-symbol) {
  width: 58px !important;
  min-width: 58px !important;
  padding: 5px !important;
  text-align: center;
}

/* Candidate portraits: equal dimensions, correct aspect ratio, no stretching. */
.ods-candidate-photo {
  display: block !important;
  width: 107px !important;
  height: 123px !important;
  min-width: 107px;
  object-fit: cover !important;
  object-position: center top;
  margin: 0 auto;
  border-radius: 10px !important;
  box-shadow: 0 6px 18px rgba(25,28,26,.13);
}

/* Long result tables remain legible and scroll horizontally when necessary. */
.ods-page-lists > div,
.ods-page-mayors > div,
.ods-page-results > div { overflow-x: auto; padding: 4px 2px 24px; }
.ods-page-lists table { min-width: 0; width: 100%; }
.ods-page-lists .ods-list-results-table { table-layout: fixed; }
.ods-page-lists .ods-group-results-table { width: min(100%, 980px); margin-top: 0 !important; }
.ods-groups-title {
  margin: 38px auto 14px !important;
  color: var(--ods-wine);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.45rem, 2.4vw, 2.15rem);
  font-weight: 400;
  text-align: center;
}
.ods-turnout-title {
  margin: 8px auto 22px !important;
  color: var(--ods-wine);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.8rem, 3vw, 3rem);
  font-weight: 400;
  letter-spacing: -.025em;
  text-align: center;
}
.ods-page-title {
  margin: 8px auto 22px !important;
  color: var(--ods-wine) !important;
  font-family: Georgia, "Times New Roman", serif !important;
  font-size: clamp(1.8rem, 3vw, 3rem) !important;
  font-weight: 400 !important;
  line-height: 1.15 !important;
  letter-spacing: -.025em !important;
  text-align: center;
}
.ods-page-title,
.ods-page-title font,
.ods-page-title strong,
.ods-page-title a {
  color: var(--ods-wine) !important;
  font-family: Georgia, "Times New Roman", serif !important;
  font-size: inherit !important;
  font-weight: 400 !important;
  line-height: inherit !important;
  letter-spacing: inherit !important;
}
.ods-page-home .ods-preference-summary {
  width: 90% !important;
  margin: 16px auto 24px !important;
}
.ods-page-mayors table { min-width: 1040px; border-radius: 12px; }
.ods-page-lists table > tbody > tr:first-child > td,
.ods-page-mayors table > tbody > tr:first-child > td {
  background: rgba(100,16,42,.075) !important;
}

@media (max-width: 900px) {
  .ods-header { position: relative; align-items: flex-start; flex-direction: column; gap: 12px; }
  .ods-nav { justify-content: flex-start; }
  .ods-hero { margin-bottom: 22px; padding-block: 24px 28px; }
  .ods-hero img { width: 58px; }
  table { font-size: .78rem; }
  td, th { padding: 7px !important; }
  .ods-list-symbol { width: 82px !important; height: 82px !important; }
}

@media (max-width: 560px) {
  .ods-brand small { display: none; }
  .ods-nav { gap: 3px; }
  .ods-nav a { padding: 7px 8px; font-size: .7rem; }
  .ods-hero { grid-template-columns: 1fr; gap: 12px; }
  .ods-hero img { width: 52px; }
  .ods-footer { align-items: flex-start; flex-direction: column; }
}
