:root {
  color-scheme: light;
  color: var(--text);
  background: var(--field);
  font: 100%/1.55 Inter, "Source Sans 3", Arial, sans-serif;
  --field: #eff5f4;
  --finder: #f7fbfa;
  --surface: #fff;
  --soft: #eaf2f2;
  --selected: #e0eeed;
  --text: #174252;
  --muted: #405c65;
  --strong: #022e40;
  --link: #16586c;
  --line: #c4d5d7;
  --control-border: #66848c;
  --focus: #13647b;
  --chart-track: #dce8e9;
  --chart-fill: #2b5b6a;
  --party-republican: #a5413d;
  --party-democratic: #205991;
  --party-libertarian: #856100;
  --party-green: #326c4d;
  --party-other: #704e92;
  --header: #022e40;
  --header-text: #edf6f6;
  --header-muted: #c1d4d9;
  --header-border: #8eaab5;
  --heading-font: "Futura PT", Futura, "Trebuchet MS", Arial, sans-serif;
  --label-font: "Rigid Square", "Arial Narrow", Arial, sans-serif;
  --data-font: "IBM Plex Mono", "JetBrains Mono", Menlo, Consolas, monospace;
}

@supports (color: light-dark(white, black)) {
  :root {
    color-scheme: light dark;
    --field: light-dark(#eff5f4, #173e4c);
    --finder: light-dark(#f7fbfa, #1e4b59);
    --surface: light-dark(#fff, #275565);
    --soft: light-dark(#eaf2f2, #214b59);
    --selected: light-dark(#e0eeed, #315f6c);
    --text: light-dark(#174252, #d6e8eb);
    --muted: light-dark(#405c65, #c4d9df);
    --strong: light-dark(#022e40, #eef8f8);
    --link: light-dark(#16586c, #ecf8f8);
    --line: light-dark(#c4d5d7, #63828a);
    --control-border: light-dark(#66848c, #a4c1ca);
    --focus: light-dark(#13647b, #e1f2f4);
    --chart-track: light-dark(#dce8e9, #496c78);
    --chart-fill: light-dark(#2b5b6a, #d2e7e9);
    --party-republican: light-dark(#a5413d, #ffb1ad);
    --party-democratic: light-dark(#205991, #a2ceff);
    --party-libertarian: light-dark(#856100, #f2ce70);
    --party-green: light-dark(#326c4d, #a2ddb3);
    --party-other: light-dark(#704e92, #dcbcf2);
  }

  :root[data-theme="light"] {
    color-scheme: light;
  }

  :root[data-theme="dark"] {
    color-scheme: dark;
  }
}

* {
  box-sizing: border-box;
}

body,
h1,
h2,
h3,
p {
  margin: 0;
}

a {
  color: var(--link);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 4px;
}

.skip-link {
  position: absolute;
  inset: .75rem auto auto 1rem;
  z-index: 1;
  padding: .75rem;
  border: 1px solid var(--control-border);
  background: var(--field);
  transform: translateY(-160%);
}

.skip-link:focus {
  transform: none;
}

.site-header {
  color: var(--header-text);
  background: var(--header);
}

.site-header-inner,
.shell {
  width: min(100% - 3rem, 70rem);
  margin-inline: auto;
}

.site-header-inner {
  min-height: 3.75rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .5rem 1rem;
  padding-block: .7rem;
  font-family: var(--label-font);
  letter-spacing: .07em;
  text-transform: uppercase;
}

.identity {
  display: flex;
  align-items: center;
  gap: .65rem;
  font-size: .875rem;
  font-weight: 700;
}

.identity-text {
  display: grid;
  gap: .08rem;
  line-height: 1.3;
}

.identity-mark {
  width: 1.55rem;
  height: 1.55rem;
  display: inline-flex;
  align-items: flex-end;
  gap: 3px;
  padding: 4px;
  border: 1px solid var(--header-border);
  border-radius: .2rem;
}

.identity-mark i {
  flex: 1;
  height: 47%;
  background: var(--header-muted);
}

.identity-mark i:nth-child(2) {
  height: 75%;
}

.identity-mark i:nth-child(3) {
  height: 100%;
}

.prototype-label {
  color: var(--header-muted);
  font-size: .6875rem;
  font-weight: 400;
}

.theme-control {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .4rem;
  font-size: .75rem;
}

.theme-select {
  position: relative;
}

.theme-select::after {
  position: absolute;
  inset-block-start: 50%;
  inset-inline-end: .65rem;
  width: .42rem;
  height: .42rem;
  border-inline-end: 2px solid currentColor;
  border-block-end: 2px solid currentColor;
  transform: translateY(-75%) rotate(45deg);
  pointer-events: none;
  content: "";
}

.theme-control select {
  min-width: 5.5rem;
  min-height: 44px;
  padding-inline: .5rem 1.65rem;
  border: 1px solid var(--header-border);
  border-radius: .3rem;
  color-scheme: dark;
  color: var(--header-text);
  background: var(--header);
  font: inherit;
  font-size: .875rem;
  appearance: none;
}

.theme-control select:focus-visible {
  outline-color: var(--header-text);
}

@supports not (color: light-dark(white, black)) {
  .theme-control {
    display: none;
  }
}

.shell {
  padding-block: clamp(1.5rem, 5vw, 4rem);
}

h1,
.result-heading,
.finder h2 {
  color: var(--strong);
  font-family: var(--heading-font);
  font-weight: 700;
  overflow-wrap: anywhere;
  text-wrap: balance;
}

h1 {
  max-width: 43rem;
  font-size: clamp(1.95rem, 5vw, 3.9rem);
  line-height: 1;
  letter-spacing: -.038em;
}

.election {
  margin-block-start: .85rem;
  color: var(--muted);
  font-family: var(--label-font);
  letter-spacing: .03em;
}

.layout {
  display: grid;
  grid-template-columns: minmax(15rem, .85fr) minmax(0, 2fr);
  align-items: start;
  gap: clamp(1rem, 3vw, 2rem);
  margin-block-start: clamp(1.5rem, 4vw, 2.75rem);
}

.finder,
.result {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: .5rem;
}

.finder {
  padding: clamp(.875rem, 2vw, 1.25rem);
  background: var(--finder);
}

.finder h2 {
  margin-block-end: .85rem;
  font-size: 1.2rem;
  letter-spacing: -.02em;
}

.search-label,
.search-status,
.catalog-meta {
  color: var(--muted);
  font-size: .875rem;
}

.search-label {
  display: block;
  margin-block-end: .35rem;
}

.search-box {
  position: relative;
}

.search-box input {
  width: 100%;
  min-height: 3rem;
  padding: .6rem .625rem .6rem 2.35rem;
  border: 1px solid var(--control-border);
  border-radius: .3rem;
  color: var(--strong);
  background: var(--surface);
  font: inherit;
  font-size: 1rem;
}

.search-box input::placeholder {
  color: var(--muted);
}

.search-icon {
  position: absolute;
  top: 50%;
  left: .85rem;
  width: .85rem;
  height: .85rem;
  border: 2px solid var(--muted);
  border-radius: 50%;
  transform: translateY(-61%);
  pointer-events: none;
}

.search-icon::after {
  position: absolute;
  inset: .62rem auto auto .53rem;
  width: .42rem;
  height: 2px;
  background: var(--muted);
  transform: rotate(45deg);
  content: "";
}

.search-status {
  margin-block: 1rem .55rem;
  font-family: var(--data-font);
  font-size: .75rem;
}

.contest-list {
  display: grid;
  gap: .4rem;
  padding: 0;
  margin: 0;
  list-style: none;
}

.contest-link {
  display: block;
  min-height: 2.75rem;
  padding: .65rem .7rem;
  border: 1px solid var(--line);
  border-radius: .3rem;
  color: var(--strong);
  font-size: .95rem;
  font-weight: 650;
  overflow-wrap: anywhere;
  text-decoration: none;
}

.contest-link[aria-current] {
  border-color: var(--control-border);
  box-shadow: inset 3px 0 0 var(--text);
  background: var(--selected);
}

.catalog-meta {
  display: block;
  margin-block-start: .16rem;
  font-size: .8125rem;
  font-weight: 400;
}

.result {
  overflow: hidden;
  background: var(--surface);
  scroll-margin-block-start: .75rem;
}

.result-main {
  padding: clamp(1rem, 4vw, 2.15rem);
}

.result-heading {
  font-size: clamp(1.5rem, 3.5vw, 2.35rem);
  line-height: 1.1;
  letter-spacing: -.028em;
}

.result-heading:focus {
  outline-offset: 3px;
  border-radius: .15rem;
}

.result-status {
  color: var(--strong);
  font: 700 .78rem/1.4 var(--label-font);
  letter-spacing: .07em;
  text-transform: uppercase;
}

.result-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0 .75rem;
  margin-block-end: .5rem;
}

.result-action {
  min-width: 44px;
  min-height: 44px;
  padding-inline: .7rem;
  border: 1px solid var(--control-border);
  border-radius: .3rem;
  color: var(--strong);
  background: var(--field);
  font: inherit;
  font-size: .875rem;
  font-weight: 650;
  cursor: pointer;
}

.finder-action {
  padding-inline: 0;
  border-color: transparent;
  background: transparent;
  text-decoration: underline;
  text-underline-offset: .2em;
}

.retry-action {
  margin-block-start: .75rem;
}

.result-meta + h2 {
  margin-block-end: .5rem;
}

.result-scope,
.result-summary,
.reconciliation,
.availability {
  color: var(--muted);
}

.result-summary {
  margin-block-start: 1.15rem;
}

.choices {
  display: grid;
  gap: .9rem;
  padding: 0;
  margin: 1.05rem 0 0;
  list-style: none;
}

.choice-header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: .15rem 1rem;
}

.choice-name {
  font-weight: 700;
}

.choice-candidate {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0 .5rem;
  min-width: 0;
  overflow-wrap: anywhere;
}

.choice-party {
  color: var(--muted);
  font-size: .875rem;
}

.choice-value {
  color: var(--muted);
  font-family: var(--data-font);
  font-size: .875rem;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}

.choice-value strong {
  color: var(--strong);
}

.bar-track {
  overflow: hidden;
  height: .5rem;
  margin-block-start: .4rem;
  border-radius: .125rem;
  background: var(--chart-track);
}

.bar-fill {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--party-fill, var(--chart-fill));
}

.choice[data-party="republican"] {
  --party-fill: var(--party-republican);
}

.choice[data-party="democratic"] {
  --party-fill: var(--party-democratic);
}

.choice[data-party="libertarian"] {
  --party-fill: var(--party-libertarian);
}

.choice[data-party="green"] {
  --party-fill: var(--party-green);
}

.choice[data-party="other"] {
  --party-fill: var(--party-other);
}

.choice-meaning,
.ballot-context,
.reconciliation {
  max-width: 60ch;
  color: var(--muted);
  font-size: .875rem;
  line-height: 1.6;
}

.choice-meaning {
  margin-block-start: .35rem;
}

.ballot-context,
.reconciliation {
  margin-block-start: 1.15rem;
}

.ballot-context a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

.result-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .25rem 1rem;
  padding: .75rem clamp(1rem, 4vw, 2.15rem);
  border-block-start: 1px solid var(--line);
  background: var(--soft);
}

.source-link {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  font-weight: 650;
  overflow-wrap: anywhere;
  text-underline-offset: .2em;
}

.verified {
  color: var(--muted);
  font: .75rem/1.5 var(--data-font);
}

.availability {
  margin-block-start: .65rem;
}

.shell > .result {
  margin-block-start: 1.5rem;
}

dt {
  font-weight: 700;
}

dd {
  margin: 0 0 .75rem;
  color: var(--muted);
}

@media (hover: hover) and (pointer: fine) {
  .contest-link:hover {
    text-decoration: underline;
    text-underline-offset: .16em;
  }
}

@media (max-width: 49rem) {
  .layout {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 30rem) {
  .site-header-inner,
  .shell {
    width: calc(100% - 1.5rem);
  }
}
