:root {
  color-scheme: light dark;
  --brand: #800020;   /* burgundy */
  --link: #800020;
}
@media (prefers-color-scheme: dark) {
  /* Burgundy is unreadable on a dark background, so links get a light tint. */
  :root { --link: #e8899b; }
  body { color: #bbb; }
}
html { scroll-behavior: smooth; }
a { color: var(--link); }
body {
  font-family: sans-serif;
  font-size: 1rem;
  line-height: 1.5;
  max-width: 40rem;
  margin: 0 auto;
  padding: 0 1rem 1rem;
}
h1 { font-size: 1.5rem; }
h2 { scroll-margin-top: 3.5rem; }

/* Sticky top bar: jumps and reset on the left, language on the right.
   The shadow + clip-path pair paints the burgundy edge to edge. */
header.bar {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  gap: 0.25rem;
  align-items: center;
  padding: 0.5rem 0;
  background: var(--brand);
  box-shadow: 0 0 0 100vmax var(--brand);
  clip-path: inset(0 -100vmax);
}
header.bar a, header.bar button {
  font: inherit;
  font-size: 0.875rem;
  padding: 0.2rem 0.4rem;
  border: none;
  border-radius: 0.25rem;
  background: none;
  color: #fff;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}
header.bar #reset { margin-right: 1.5rem; }
header.bar .lang { margin-left: auto; }

/* Short flash on the reset button after the list is cleared. */
@keyframes flash {
  from { background: #fff; color: var(--brand); }
  to   { background: none; color: #fff; }
}
header.bar #reset.flash { animation: flash 0.6s ease-out; }

/* Checklist: checkbox in its own column so wrapped lines align. */
ul.check { list-style: none; padding: 0; }
ul.check > li { margin: 0 0 0.75rem; }
ul.check > li > label {
  display: grid;
  grid-template-columns: 1.3rem 1fr;
  gap: 0.6rem;
  align-items: start;
  cursor: pointer;
}
ul.check > li > label input { width: 1.3rem; height: 1.3rem; margin: 0.1rem 0 0; }
ul.check > li.done > label { opacity: 0.5; }

/* Turnout hours: fixed columns so the boxes line up in rows. */
.hours {
  display: grid;
  grid-template-columns: repeat(4, 3.5rem);
  gap: 0.4rem 0.5rem;
  margin: 0.4rem 0 0 1.9rem;
}
.hours label {
  display: grid;
  grid-template-columns: 1.2rem auto;
  gap: 0.3rem;
  align-items: center;
  cursor: pointer;
}
.hours input { width: 1.2rem; height: 1.2rem; margin: 0; }

.progress { font-weight: bold; }
details { margin: 0.75rem 0; }
summary { cursor: pointer; font-weight: bold; }
blockquote { margin: 0.5rem 0 0; padding-left: 0.75rem; border-left: 3px solid GrayText; }
/* Polling places: one collapsible block per place, stacked for narrow screens. */
.bm details { margin: 0 0 1rem; }
.bm p.addr { margin: 0.25rem 0 0; }
.bm ol { margin: 0.25rem 0 0; padding-left: 1.5rem; }
a.map { display: inline-flex; gap: 0.3rem; align-items: center; vertical-align: middle; padding: 0.15rem; text-decoration: none; }
a.map svg { width: 1.3em; height: 1.3em; }

.print { margin: 1.5rem 0 2rem; }
.print p { margin: 0 0 0.75rem; }

/* PDF download: full-width burgundy button. */
a.download {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  border-radius: 0.25rem;
  background: var(--brand);
  color: #fff;
  font-weight: bold;
  text-align: center;
  text-decoration: none;
}
a.download .icon { width: 1.6em; height: 1.6em; flex: none; }
