@font-face {
  font-family: "Newsreader";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/fonts/newsreader-latin-ext-500-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Newsreader";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/fonts/newsreader-latin-500-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Newsreader";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/fonts/newsreader-latin-ext-600-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Newsreader";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/fonts/newsreader-latin-600-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Public Sans";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/public-sans-latin-ext-400-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Public Sans";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/public-sans-latin-400-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Public Sans";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/fonts/public-sans-latin-ext-500-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Public Sans";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/fonts/public-sans-latin-500-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Public Sans";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/fonts/public-sans-latin-ext-600-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Public Sans";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/fonts/public-sans-latin-600-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root,
html[data-theme="light"] {
  color-scheme: light;
  --bg: #f4efe6;
  --bg-2: #fffdf8;
  --ink: #1a1814;
  --muted: #4a453c;
  --faint: #5c564c;
  --line: rgba(26, 24, 20, 0.12);
  --rule: rgba(26, 24, 20, 0.55);
  --alert: #6f2a1c;
  --alert-ink: #fff8f5;
  --alert-bg: #6f2a1c;
  --warn: #6d5314;
  --warn-ink: #fffaf0;
  --neutral: #6f685e;
  --track: rgba(26, 24, 20, 0.1);
  --serif: "Newsreader", "Iowan Old Style", Palatino, "Palatino Linotype", Georgia, serif;
  --sans: "Public Sans", "Avenir Next", "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--ink);
}

html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #10151c;
  --bg-2: #171d26;
  --ink: #f6f1e7;
  --muted: #d2c9bb;
  --faint: #b7aea0;
  --line: rgba(246, 241, 231, 0.14);
  --rule: rgba(246, 241, 231, 0.48);
  --alert: #ffc7b8;
  --alert-ink: #2a120e;
  --alert-bg: #ffc7b8;
  --warn: #f6e0b0;
  --warn-ink: #2a220f;
  --neutral: #9a9388;
  --track: rgba(246, 241, 231, 0.12);
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.45;
  background:
    radial-gradient(1200px 500px at 10% -10%, rgba(26, 24, 20, 0.04), transparent 50%),
    var(--bg);
  min-height: 100%;
}
body::before {
  content: "";
  display: block;
  height: 4px;
  background: linear-gradient(90deg, var(--ink) 0 72%, #c4a46a 72% 100%);
}
img, svg { max-width: 100%; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}
.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.skip {
  position: absolute;
  left: 12px;
  top: -48px;
  background: var(--ink);
  color: var(--bg);
  padding: 8px 12px;
  z-index: 5;
}
.skip:focus { top: 12px; }

.wrap {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 72px;
}
.mast {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 28px 40px;
  align-items: end;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--rule);
}
.kicker {
  margin: 0;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}
h1 {
  margin: 6px 0 10px;
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(3.5rem, 8vw, 6.5rem);
  line-height: 0.88;
  letter-spacing: -0.035em;
}
.deck {
  margin: 0;
  max-width: 40rem;
  color: var(--muted);
  font-size: 1.05rem;
}
.mast-side { text-align: right; }
.mast-side p { margin: 0; }
.lockup {
  font-family: var(--serif);
  font-size: 1.35rem;
  line-height: 1.2;
}
.controls {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 16px;
}
button, select, .field input {
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 0;
  min-height: 44px;
  padding: 0 12px;
}
button[aria-pressed="true"] {
  background: var(--ink);
  color: var(--bg);
  border-color: var(--ink);
}

.banner {
  margin: 18px 0 0;
  padding: 14px 16px;
  background: var(--alert-bg);
  color: var(--alert-ink);
}
.banner strong { font-weight: 600; }
.banner.warn {
  background: transparent;
  color: var(--warn);
  border: 1px solid var(--warn);
  padding: 12px 14px;
}
html[data-theme="dark"] body {
  background:
    radial-gradient(1200px 500px at 10% -10%, rgba(246, 241, 231, 0.05), transparent 50%),
    var(--bg);
}
html[data-theme="light"] .banner.warn { color: var(--warn); }
.banner p { margin: 0; }
.fixture {
  background: #c4a46a;
  color: #1a1408;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.fresh {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px 28px;
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
}
.fresh li { min-width: 0; }
.fresh .label, .eyebrow {
  display: block;
  margin: 0 0 4px;
  color: var(--faint);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.fresh .value, .fine {
  margin: 0;
  font-variant-numeric: tabular-nums lining-nums;
}
.fresh .note { margin: 6px 0 0; color: var(--muted); font-size: 0.92rem; }

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 20px 56px;
  align-items: end;
  padding: 36px 0 12px;
}
.hero-grid .lede { max-width: 36rem; }
.hero-grid .lede + .lede { margin-top: 12px; }
.figure {
  margin: 0;
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(3.4rem, 14vw, 7.6rem);
  line-height: 0.88;
  letter-spacing: -0.045em;
  font-variant-numeric: tabular-nums lining-nums;
  max-width: 100%;
}
.figure.words { font-size: clamp(3rem, 12vw, 5.4rem); letter-spacing: -0.04em; }
.figure .unit { font-size: 0.42em; margin-left: 0.08em; }
.lede {
  margin: 10px 0 0;
  max-width: 36rem;
  font-size: 1.08rem;
}
.meter {
  margin-top: 18px;
  height: 4px;
  background: var(--track);
  max-width: 280px;
}
.meter > span {
  display: block;
  height: 100%;
  background: var(--ink);
  width: 0;
}
@media (prefers-reduced-motion: no-preference) {
  .meter > span, .fill { transition: width 420ms ease; }
}

.section-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: baseline;
  margin: 36px 0 8px;
}
.section-head h2 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  letter-spacing: -0.03em;
}
.legend { margin: 0; color: var(--muted); font-size: 0.92rem; text-align: right; }

.seat-bar {
  display: flex;
  height: 14px;
  margin: 8px 0 18px;
  background: var(--track);
}
.seat-bar span { display: block; height: 100%; min-width: 2px; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.25); }
.seat-key { display: flex; flex-wrap: wrap; gap: 8px 16px; margin: 0 0 8px; padding: 0; list-style: none; color: var(--muted); font-size: 0.92rem; }
.seat-key i { display: inline-block; width: 9px; height: 9px; margin-right: 6px; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.3); }

.cols, .party {
  display: grid;
  grid-template-columns: 12px minmax(0, 1.4fr) minmax(72px, 1fr) 5.2rem 6.4rem 9.2rem;
  column-gap: 12px;
  align-items: center;
}
.cols {
  padding: 8px 0;
  color: var(--faint);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.cols span:nth-child(n + 4), .num, .seats { text-align: right; }
.party {
  min-height: 54px;
  padding: 8px 0;
  border-top: 1px solid var(--line);
}
.pip {
  width: 4px;
  height: 22px;
  background: var(--mark, var(--neutral));
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.28);
  justify-self: center;
}
.party-name { min-width: 0; }
.party-name .abbrev {
  display: block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
}
.party-name .full { display: block; }
.track { height: 8px; background: var(--track); }
.fill {
  display: block;
  height: 100%;
  width: 0;
  background: var(--mark, var(--neutral));
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.28);
}
.num { font-variant-numeric: tabular-nums lining-nums; font-weight: 600; }
.seats {
  font-variant-numeric: tabular-nums lining-nums;
  font-weight: 600;
  text-align: right;
  white-space: nowrap;
}
.stamp, .stamp-when { display: block; }
.stamp { white-space: nowrap; }
.directory {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 32px;
}
.directory li {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 46px;
  border-top: 1px solid var(--line);
}
.directory .abbrev { margin-left: auto; color: var(--faint); font-size: 12px; letter-spacing: 0.08em; font-weight: 600; }

.tools {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: end;
  margin: 12px 0 4px;
}
.field { display: grid; gap: 4px; font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--faint); font-weight: 600; }
.field input, .field select { text-transform: none; letter-spacing: 0; font-weight: 500; color: var(--ink); min-width: 0; }
#q { width: min(280px, 100%); font-size: 16px; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; }
.race-head, .race {
  display: grid;
  grid-template-columns: 44px minmax(140px, 1.25fr) minmax(160px, 1.5fr) 88px 120px minmax(110px, 0.8fr);
  column-gap: 12px;
  align-items: baseline;
}
.race-head {
  padding: 10px 0;
  color: var(--faint);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.race {
  padding: 13px 0;
  border-top: 1px solid var(--line);
}
.race h3 { margin: 0; font-size: 1.05rem; font-weight: 600; }
.race .sub { margin: 2px 0 0; color: var(--muted); font-size: 0.92rem; }
.star {
  width: 44px;
  height: 44px;
  border: 0;
  background: transparent;
  font-size: 1.1rem;
  padding: 0;
}
.detail { grid-column: 1 / -1; padding: 4px 0 8px 56px; color: var(--muted); }
.detail ul { margin: 6px 0 0; padding: 0; list-style: none; }
.detail li { display: flex; justify-content: space-between; gap: 12px; border-top: 1px solid var(--line); padding: 4px 0; font-variant-numeric: tabular-nums; }
.linkish { border: 0; background: none; padding: 0; min-height: 0; text-decoration: underline; text-underline-offset: 3px; }

.watch-list { list-style: none; margin: 0; padding: 0; }
.watch-list li {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) auto;
  gap: 12px;
  align-items: baseline;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}
.other { margin-top: 18px; }
.other summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; }
.other dl { display: grid; grid-template-columns: 1fr auto; gap: 6px 16px; margin: 8px 0 0; }
.other dt { color: var(--muted); }
.other dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; }

.colophon {
  margin-top: 48px;
  padding-top: 18px;
  border-top: 1px solid var(--rule);
  color: var(--muted);
  font-size: 0.95rem;
}
.colophon nav { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-bottom: 12px; }
.colophon a { color: inherit; }
.failures { margin: 8px 0 0; padding-left: 18px; }

.embed-body {
  background: var(--bg);
  color: var(--ink);
  color-scheme: light;
}
.embed {
  width: min(760px, 100%);
  margin: 0 auto;
  padding: 16px 16px 18px;
}
.embed h1 { font-size: clamp(2.1rem, 6vw, 2.8rem); margin: 4px 0 6px; }
.embed .deck { font-size: 0.95rem; }
.embed .hero-grid { padding-top: 18px; grid-template-columns: 1fr; gap: 8px; }
.embed .figure { font-size: clamp(3.4rem, 12vw, 4.6rem); }
.embed .section-head { margin-top: 18px; }
.embed .party { min-height: 0; padding: 6px 0; }
.embed .figure { font-size: clamp(3.2rem, 14vw, 4.4rem); }
.embed .colophon { margin-top: 18px; }
.predict-intro { max-width: 46rem; }
.predict-intro p { margin: 0 0 8px; }
.predict-group h3 {
  margin: 28px 0 0;
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.6rem;
}
.predict-row {
  display: grid;
  grid-template-columns: minmax(140px, 1.15fr) minmax(110px, 0.75fr) minmax(140px, 0.95fr) minmax(180px, 1.3fr) minmax(148px, 0.95fr);
  gap: 8px 14px;
  align-items: start;
  padding: 14px 0;
  border-top: 1px solid var(--line);
}
.predict-head {
  color: var(--faint);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  border-top: 0;
  padding-bottom: 0;
}
.predict-row h3 { margin: 0; font-size: 1.05rem; }
.predict-score { margin: 0; font-weight: 600; }
.predict-score .glyph { font-size: 1.15rem; line-height: 1; }
.mark-correct { color: #146c36; }
.mark-miss { color: #a32121; }
html[data-theme="dark"] .mark-correct { color: #8ed7a8; }
html[data-theme="dark"] .mark-miss { color: #ffb4b4; }
.predict-note { grid-column: 1 / -1; }
.predict-note summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; }
.more {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-top: 8px;
  color: var(--ink);
  font-weight: 600;
}

@media (max-width: 860px) {
  .mast, .fresh, .hero-grid { grid-template-columns: 1fr; align-items: start; }
  .mast-side, .legend { text-align: left; }
  .controls { justify-content: flex-start; }
  .directory { grid-template-columns: 1fr; }
}
@media (max-width: 719px) {
  .wrap { width: min(100% - 28px, 1120px); padding-top: 20px; }
  .predict-head { display: none; }
  .predict-row { grid-template-columns: 1fr; }
  .predict-note { grid-column: auto; }
  .cols { display: none; }
  .party {
    grid-template-columns: 12px minmax(0, 1fr) auto;
    grid-template-areas:
      "pip name pct"
      "pip track seats"
      "pip votes votes";
    row-gap: 6px;
    align-items: center;
  }
  .party .pip { grid-area: pip; }
  .party .party-name { grid-area: name; }
  .party .pct { grid-area: pct; }
  .party .track { grid-area: track; }
  .party .seats { grid-area: seats; }
  .party .votes { grid-area: votes; text-align: left; color: var(--muted); font-weight: 500; }
  .race-head { display: none; }
  .race {
    grid-template-columns: 44px minmax(0, 1fr);
    row-gap: 2px;
  }
  .race .leader, .race .votes, .race .margin, .race .places { grid-column: 2; }
  .race .margin, .race .places, .race .votes { color: var(--muted); }
  .detail { padding-left: 0; }
  .watch-list li { grid-template-columns: 1fr; gap: 2px; }
  h1 { font-size: 3.15rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
}

/* The embed stays a single ruled row at article width, and two lines on a phone. */
@media (max-width: 719px) {
  .embed-body .cols,
  .embed-body .party {
    display: grid;
    grid-template-columns: 10px minmax(0, 1.25fr) minmax(40px, 0.8fr) 4.4rem 5.5rem 8.6rem;
    grid-template-areas: none;
    row-gap: 0;
  }
  .embed-body .party .pip,
  .embed-body .party .party-name,
  .embed-body .party .track,
  .embed-body .party .pct,
  .embed-body .party .votes,
  .embed-body .party .seats {
    grid-area: auto;
  }
  .embed-body .party .votes { text-align: right; color: inherit; font-weight: 600; }
  .embed-body .cols { display: grid; }
}
@media (max-width: 520px) {
  .embed-body .cols { display: none; }
  .embed-body .party {
    grid-template-columns: 10px minmax(0, 1fr) auto;
    grid-template-areas:
      "pip name pct"
      "pip votes seats";
    row-gap: 2px;
    padding: 8px 0;
  }
  .embed-body .party .track { display: none; }
  .embed-body .party .pip { grid-area: pip; }
  .embed-body .party .party-name { grid-area: name; }
  .embed-body .party .pct { grid-area: pct; }
  .embed-body .party .votes { grid-area: votes; text-align: left; color: var(--muted); font-weight: 500; }
  .embed-body .party .seats { grid-area: seats; }
}
