/* The public record. One stylesheet, no scripts, no fonts to download:
   it has to open fast on a phone with one bar of signal and print cleanly. */

:root {
  --paper: #fbfaf7;
  --ink: #1c1b19;
  --quiet: #5c5a55;
  --line: #dcd8cf;
  --card: #ffffff;
  --link: #0b4f6c;
  --accent: #0b4f6c;
  --high: #8c2f1b;
  --high-bg: #f8e4de;
  --medium: #7a5200;
  --medium-bg: #f7ecd2;
  --low: #3f5b46;
  --low-bg: #e4efe6;
  --doubt-bg: #fff4d6;
  --mark: #fde9a8;
  /* Chart colors. The two series colors are checked as a pair, on each paper, for readers with
     color-blindness and for contrast; change them together and check again. */
  --band: #0b4f6c;
  --band-ink: #f3f8fa;
  --series-a: #1b7fb0;
  --series-b: #d2622a;
  --peer: #8d8a83;
  --measure: 44rem;
  font-family: Charter, "Bitstream Charter", "Iowan Old Style", Georgia, serif;
  font-size: 106.25%;
  line-height: 1.55;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #161614;
    --ink: #ecebe6;
    --quiet: #a8a59d;
    --line: #3a3833;
    --card: #1f1e1b;
    --link: #8fc7de;
    --accent: #8fc7de;
    --high: #f0a898;
    --high-bg: #43201a;
    --medium: #ecc777;
    --medium-bg: #3d3012;
    --low: #a9cdb1;
    --low-bg: #1f3225;
    --doubt-bg: #3a3010;
    --mark: #5c4a0c;
    --band: #10323f;
    --band-ink: #d6e8ef;
    --series-a: #3f95c6;
    --series-b: #d9692f;
    --peer: #8f8c85;
  }
}

* { box-sizing: border-box; }
html { background: var(--paper); color: var(--ink); -webkit-text-size-adjust: 100%; }
body { margin: 0; }
.wrap { max-width: 62rem; margin: 0 auto; padding: 0 1rem; }
main.wrap { padding-top: 1.5rem; padding-bottom: 3rem; }
main > p, main > section > p, main > ul, main > section > ul, .lead, .defs, .generated > p, .generated > ul { max-width: var(--measure); }

a { color: var(--link); text-underline-offset: 0.15em; }
a:hover { text-decoration-thickness: 2px; }
a:focus-visible, summary:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 2px; }

h1, h2, h3, h4 { font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif; line-height: 1.2; text-wrap: balance; }
h1 { font-size: 2rem; margin: 0.5rem 0 0.75rem; letter-spacing: -0.01em; }
h2 { font-size: 1.35rem; margin: 2.5rem 0 0.75rem; padding-top: 1rem; border-top: 1px solid var(--line); }
h3 { font-size: 1.08rem; margin: 0 0 0.35rem; }
h4 { font-size: 1rem; margin: 0 0 0.35rem; }
p { margin: 0 0 0.9rem; }
.quiet { color: var(--quiet); font-size: 0.9em; }
.big { font-size: 1.5rem; font-family: ui-sans-serif, system-ui, sans-serif; margin-bottom: 0.4rem; }
.lead__text { font-size: 1.2rem; color: var(--ink); }
.crumb { font-family: ui-sans-serif, system-ui, sans-serif; font-size: 0.85rem; margin: 0; color: var(--quiet); }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: -999rem; }
.skip:focus { left: 1rem; top: 0.5rem; background: var(--card); padding: 0.4rem 0.6rem; z-index: 2; }

/* Masthead */
.stage { margin: 0; padding: 0.4rem 1rem; text-align: center; font: 600 0.85rem/1.4 ui-sans-serif, system-ui, sans-serif; background: var(--medium-bg); color: var(--medium); }
/* The band above the masthead: what this site is not, and how fresh its data is. */
.band { background: var(--band); color: var(--band-ink); font: 0.8rem/1.4 ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif; }
.band .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0 1.5rem; padding-top: 0.35rem; padding-bottom: 0.35rem; }
.band p { margin: 0; }
.band a { color: inherit; text-decoration-color: color-mix(in srgb, currentColor 45%, transparent); }
.band a:focus-visible { outline-color: var(--band-ink); }

/* The masthead: the name at the left, the record's sections beside it, the pages about the site at the right.
   The line under the section a reader is in sits on the masthead's own bottom edge. */
.masthead { border-bottom: 1px solid var(--line); background: var(--card); font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif; }
.masthead .wrap { display: flex; flex-wrap: wrap; align-items: stretch; gap: 0 2.25rem; }
.masthead__name { display: inline-flex; align-items: center; gap: 0.6rem; padding: 0.7rem 0; color: var(--ink); text-decoration: none; }
.masthead__words { display: flex; flex-direction: column; }
.masthead__title { font-weight: 750; font-size: 1.3rem; line-height: 1.1; letter-spacing: -0.015em; }
.masthead__sub { font-weight: 600; font-size: 0.66rem; line-height: 1.4; letter-spacing: 0.085em; text-transform: uppercase; color: var(--quiet); }
.mark { color: var(--accent); flex: none; width: 30px; height: 30px; }
.masthead__nav { display: flex; flex: 1 1 auto; flex-wrap: wrap; align-items: stretch; justify-content: space-between; gap: 0 2rem; margin-bottom: -1px; }
.nav { display: flex; align-items: stretch; gap: 0 1.5rem; list-style: none; margin: 0; padding: 0; }
.nav li { display: flex; }
.nav a { display: flex; align-items: center; padding: 0.55rem 0 calc(0.55rem - 3px); border-bottom: 3px solid transparent; text-decoration: none; }
.nav--record a { color: var(--ink); font-weight: 600; font-size: 1rem; }
.nav--site a { color: var(--quiet); font-size: 0.9rem; }
.nav a:hover { color: var(--ink); border-bottom-color: var(--line); }
.nav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--accent); }
.nav--site a[aria-current="page"] { font-weight: 600; }

/* The pages of a section with more than one, under the masthead. */
.subnav { border-bottom: 1px solid var(--line); font: 0.9rem/1.4 ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif; }
.subnav ul { display: flex; flex-wrap: wrap; gap: 0 1.5rem; list-style: none; margin: 0 0 -1px; padding: 0; }
.subnav a { display: block; padding: 0.5rem 0 calc(0.5rem - 2px); border-bottom: 2px solid transparent; text-decoration: none; }
.subnav a:hover { border-bottom-color: var(--line); }
.subnav a[aria-current="page"] { color: var(--ink); font-weight: 600; border-bottom-color: var(--ink); }
.kicker { font: 600 0.78rem/1.4 ui-sans-serif, system-ui, sans-serif; letter-spacing: 0.08em; text-transform: uppercase; color: var(--quiet); margin: 0.5rem 0 0; }
.kicker + h1 { margin-top: 0.15rem; }
.lead--home h1 { font-size: 2.6rem; letter-spacing: -0.02em; }
.ref { font: 600 0.72em/1 ui-sans-serif, system-ui, sans-serif; margin-left: 0.1em; }
.ref a { text-decoration: none; padding: 0 0.1em; }
main > section > ol { max-width: var(--measure); }
.sources { font-size: 0.92rem; padding-left: 1.4rem; max-width: var(--measure); }
.sources li { margin: 0 0 0.45rem; }
.sources li:target { background: var(--mark); }
.foot { border-top: 1px solid var(--line); padding: 1.75rem 0 2rem; font-size: 0.9rem; color: var(--quiet); background: var(--card); }
.foot p { max-width: var(--measure); }
.foot__grid { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 1rem 3.5rem; }
.foot__nav { display: flex; gap: 0 3rem; font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif; }
.foot__head { font-weight: 600; font-size: 0.72rem; letter-spacing: 0.085em; text-transform: uppercase; margin: 0 0 0.4rem; }
.foot__nav ul { list-style: none; margin: 0; padding: 0; }
.foot__nav li { padding: 0.12rem 0; }
.foot__nav a { text-decoration: none; }
.foot__nav a:hover { text-decoration: underline; }
.foot__top { margin: 1.25rem 0 0; font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif; }

/* Headline numbers */
.numbers { display: grid; grid-template-columns: repeat(auto-fit, minmax(10.5rem, 1fr)); gap: 0.75rem; margin: 0 0 1rem; }
.numbers > div { background: var(--card); border: 1px solid var(--line); border-radius: 6px; padding: 0.7rem 0.9rem; }
.numbers dt { font: 600 0.8rem/1.3 ui-sans-serif, system-ui, sans-serif; color: var(--quiet); }
.numbers dd { margin: 0; }
.numbers dd:first-of-type { font: 700 1.6rem/1.25 ui-sans-serif, system-ui, sans-serif; font-variant-numeric: tabular-nums; }

/* Chips */
.chip { display: inline-block; font: 600 0.75rem/1.5 ui-sans-serif, system-ui, sans-serif; padding: 0 0.5rem; border-radius: 999px; border: 1px solid var(--line); color: var(--quiet); }
.chip--high { background: var(--high-bg); color: var(--high); border-color: transparent; }
.chip--medium { background: var(--medium-bg); color: var(--medium); border-color: transparent; }
.chip--low { background: var(--low-bg); color: var(--low); border-color: transparent; }
.chip--new { background: var(--mark); color: var(--ink); border-color: transparent; }

.jump { display: flex; flex-wrap: wrap; gap: 0.3rem 1rem; font: 0.92rem/1.6 ui-sans-serif, system-ui, sans-serif; margin: 0 0 1rem; }
.jump a[aria-current="page"] { color: var(--ink); font-weight: 700; text-decoration: none; }
.more { font: 600 0.95rem/1.5 ui-sans-serif, system-ui, sans-serif; }

/* Findings */
.finding { background: var(--card); border: 1px solid var(--line); border-radius: 6px; padding: 1rem 1.1rem 0.4rem; margin: 0 0 1rem; max-width: 50rem; }
.finding__tags { margin: 0 0 0.5rem; display: flex; flex-wrap: wrap; gap: 0.3rem; }
.finding__title a { color: var(--ink); text-decoration: none; }
.finding__title a:hover { text-decoration: underline; }
.finding:target { outline: 3px solid var(--accent); outline-offset: 2px; }
.figures { border-collapse: collapse; margin: 0 0 0.9rem; font-variant-numeric: tabular-nums; }
.figures th { text-align: left; font-weight: 400; padding: 0.15rem 1.5rem 0.15rem 0; }
.figures td { text-align: right; padding: 0.15rem 0; font-family: ui-sans-serif, system-ui, sans-serif; }
.drivers { margin: 0 0 0.9rem; padding-left: 1.2rem; }
.rule { font-size: 0.93rem; }
.source { font: 0.9rem/1.5 ui-sans-serif, system-ui, sans-serif; }
.board { border-top: 1px solid var(--line); padding: 0.6rem 0; }
.board > summary { cursor: pointer; font: 600 0.95rem/1.5 ui-sans-serif, system-ui, sans-serif; color: var(--link); }
.passages { list-style: none; padding: 0; margin: 0.6rem 0 0; }
.passages li { border-left: 3px solid var(--line); padding-left: 0.8rem; margin-bottom: 0.8rem; }
mark { background: var(--mark); color: inherit; padding: 0 0.1em; }

/* Motions */
.motions { list-style: none; padding: 0; margin: 0 0 1rem; max-width: 50rem; }
.motion { border-top: 1px solid var(--line); padding: 0.9rem 0 0.3rem; }
.motion:target { background: var(--card); outline: 3px solid var(--accent); outline-offset: 4px; }
.motion__facts { font: 0.9rem/1.5 ui-sans-serif, system-ui, sans-serif; color: var(--quiet); margin-bottom: 0.4rem; }
.motion__text { font-size: 0.95rem; }
.outcome { font-weight: 600; color: var(--ink); }
.tally { font-variant-numeric: tabular-nums; font-weight: 600; color: var(--ink); }
.tally--split { background: var(--medium-bg); color: var(--medium); padding: 0 0.35rem; border-radius: 3px; }
.roll { margin: 0 0 0.6rem; font-size: 0.93rem; }
.roll > div { display: grid; grid-template-columns: 5.5rem 1fr; gap: 0.5rem; }
.roll dt { font: 600 0.82rem/1.75 ui-sans-serif, system-ui, sans-serif; color: var(--quiet); }
.roll dd { margin: 0; }
.matched { font-size: 0.88rem; color: var(--quiet); }
.quote { margin: 0 0 0.4rem; border-left: 3px solid var(--line); padding-left: 0.8rem; font-size: 0.95rem; }
.quote p { margin: 0; }
.doubt { background: var(--doubt-bg); border-radius: 4px; padding: 0.5rem 0.7rem; font-size: 0.93rem; }

/* Tables */
.scroll { overflow-x: auto; margin: 0 0 1rem; }
.grid { border-collapse: collapse; width: 100%; font: 0.9rem/1.4 ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif; font-variant-numeric: tabular-nums; }
.grid caption { text-align: left; color: var(--quiet); font-size: 0.85rem; padding-bottom: 0.4rem; }
.grid th, .grid td { padding: 0.45rem 0.7rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.grid thead th { text-align: right; font-weight: 600; color: var(--quiet); border-bottom: 2px solid var(--line); white-space: nowrap; }
.grid thead th:first-child, .grid thead th.left, .grid tbody th { text-align: left; }
.grid tbody th { font-weight: 600; min-width: 11rem; }
.grid td { text-align: right; white-space: nowrap; }
.grid td.quiet { text-align: left; white-space: normal; }
.grid--matrix td { text-align: center; }
/* How Smyth compares: counties across, lines down. The line names stay in view while the counties scroll. */
.grid--compare tbody th, .grid--compare thead th:first-child { position: sticky; left: 0; background: var(--paper); z-index: 1; }
.grid--compare tbody th { min-width: 9.5rem; max-width: 13rem; white-space: normal; }
.grid--compare .home { background: var(--card); font-weight: 600; }
.grid--compare tr.total th, .grid--compare tr.total td { border-top: 2px solid var(--line); font-weight: 600; }
.cell-ref { display: block; font-weight: 400; font-size: 0.78rem; color: var(--quiet); }
.hash { font-size: 0.8rem; overflow-wrap: anywhere; }
.neg { color: var(--high); }
.trend { text-align: left; padding-top: 0.3rem; padding-bottom: 0.1rem; }
/* How often two supervisors voted the same way: more often, darker. The share is always printed. */
.heat { background: color-mix(in srgb, var(--series-a) calc(var(--t) * 42%), transparent); }
sup { font-size: 0.7em; color: var(--quiet); }

/* Charts. Drawn when the site is built, as markup: no scripts. Each sits beside the table it is drawn from. */
.figure { margin: 0 0 1.2rem; max-width: 31rem; }
.figure--rows { max-width: none; }
.figure figcaption { font: 600 0.95rem/1.4 ui-sans-serif, system-ui, sans-serif; margin-bottom: 0.3rem; }
.figure > .quiet { margin: 0.3rem 0 0; }
.pair { display: grid; grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr)); gap: 0.5rem 2rem; max-width: 62rem; }
.pair .figure { margin-bottom: 0.4rem; }
.chart { display: block; width: 100%; height: auto; overflow: visible; }
.chart text, .chart__tick { font: 13px ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif; fill: var(--quiet); font-variant-numeric: tabular-nums; }
.chart__rule { stroke: var(--line); stroke-width: 1; }
.chart__rule--zero { stroke: var(--quiet); }
.chart__hit { fill: transparent; }
.chart__series--a { --series: var(--series-a); }
.chart__series--b { --series: var(--series-b); }
.chart__line { fill: none; stroke: var(--series, var(--series-a)); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.chart__line--soft { stroke-dasharray: 2 5; }
.chart__dot { fill: var(--series, var(--series-a)); stroke: var(--paper); stroke-width: 2; }
.chart__dot--open { fill: var(--paper); stroke: var(--series, var(--series-a)); }
.chart__bar { fill: var(--series-a); }
.chart__bar--soft { fill-opacity: 0.4; }
.spark { display: block; overflow: visible; }
.spark__line { fill: none; stroke: var(--peer); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.spark .chart__dot { stroke-width: 1.5; }
.spark .chart__rule--zero { stroke: var(--line); }

.legend { list-style: none; display: flex; flex-wrap: wrap; gap: 0.2rem 1.1rem; margin: 0 0 0.5rem; padding: 0; font: 0.85rem/1.5 ui-sans-serif, system-ui, sans-serif; color: var(--quiet); }
.legend li { display: inline-flex; align-items: center; gap: 0.4rem; }
.key { flex: none; width: 0.7rem; height: 0.7rem; border-radius: 50%; background: var(--series-a); print-color-adjust: exact; -webkit-print-color-adjust: exact; }
.key--b { background: var(--series-b); }
.key--pale { opacity: 0.4; }
.key--open { background: var(--paper); border: 2px solid var(--quiet); }
.key--home { background: var(--accent); }
.key--peer { background: var(--peer); }
.key--tick, .key--mark { width: 2px; height: 0.95rem; border-radius: 0; background: var(--ink); margin: 0 0.3rem; }
.key--bar { width: 1.1rem; height: 0.5rem; border-radius: 2px; }

/* Rows that share a scale: a name, a track, and the numbers in words. */
.strips { border-top: 1px solid var(--line); }
.strip { display: grid; grid-template-columns: 13rem minmax(7rem, 1fr) 25rem; gap: 0 1rem; align-items: center; padding: 0.3rem 0; border-bottom: 1px solid var(--line); font: 0.9rem/1.4 ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif; }
.strip--total { font-weight: 600; }
.strip__track { padding: 0 7px; line-height: 0; }
.strip__track svg { display: block; overflow: visible; }
.strip__say { font-variant-numeric: tabular-nums; }
.strip__say .quiet { font-weight: 400; }
.strip__peer { fill: var(--peer); stroke: var(--paper); stroke-width: 2; }
.strip__home { fill: var(--accent); stroke: var(--paper); stroke-width: 2; }
.strip__every { stroke: var(--ink); stroke-width: 2; }
.rowbar__mark { stroke: var(--ink); stroke-width: 1.5; }
.rowbar { display: block; overflow: visible; }
.figures td { white-space: nowrap; }
.figures--drawn { width: 100%; max-width: 34rem; }
.figures--drawn th { white-space: nowrap; }
.figures__bar { width: 99%; min-width: 3rem; padding-left: 1rem !important; vertical-align: middle; }

.columns { list-style: none; padding: 0; margin: 0 0 1rem; columns: 3 16rem; column-gap: 2rem; font: 0.9rem/1.5 ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif; }
.columns li { break-inside: avoid; padding: 0.12rem 0; }
.when { list-style: none; padding: 0; margin: 0 0 0.9rem; font-family: ui-sans-serif, system-ui, sans-serif; }
.when li { padding: 0.15rem 0; }
blockquote { margin: 0 0 0.9rem; padding-left: 1rem; border-left: 3px solid var(--line); max-width: var(--measure); }

/* Meetings */
.docs { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 0.3rem 1.2rem; font: 0.95rem/1.5 ui-sans-serif, system-ui, sans-serif; }
.agenda { max-width: var(--measure); }
.meetings { list-style: none; padding: 0; max-width: var(--measure); }
.meetings li { border-top: 1px solid var(--line); padding: 0.9rem 0 0.2rem; }
.meetings h2 { font-size: 1.1rem; margin: 0 0 0.2rem; padding: 0; border: 0; }
.generated { border-left: 3px solid var(--line); padding-left: 1rem; }
.generated h2 { border: 0; padding-top: 0; }
.generated__note { font: 0.85rem/1.5 ui-sans-serif, system-ui, sans-serif; color: var(--quiet); }

/* Methods */
.defs dt { font: 600 1rem/1.4 ui-sans-serif, system-ui, sans-serif; margin-top: 0.9rem; }
.defs dd { margin: 0.15rem 0 0; }
.gaps { padding-left: 1.2rem; }
.gaps p { margin-bottom: 0.3rem; }
.gaps details { font-size: 0.9rem; margin-bottom: 0.8rem; }

@media (max-width: 60rem) {
  /* The sections drop under the name and keep the masthead's width. */
  .masthead__nav { flex-basis: 100%; border-top: 1px solid var(--line); }
  .masthead__name { padding-bottom: 0.6rem; }
  .foot__grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 34rem) {
  :root { font-size: 100%; }
  /* A phone gets the one sentence that matters; the rest is in the footer. */
  .band__more { display: none; }
  .masthead__nav { flex-direction: column; }
  .nav { justify-content: space-between; gap: 0 0.5rem; }
  .nav--record a { padding-top: 0.5rem; padding-bottom: calc(0.5rem - 3px); }
  .nav--site { border-top: 1px solid var(--line); }
  .nav--site a { font-size: 0.86rem; padding-top: 0.4rem; padding-bottom: calc(0.4rem - 3px); }
  .subnav { font-size: 0.86rem; }
  .subnav ul { gap: 0 1rem; flex-wrap: nowrap; overflow-x: auto; white-space: nowrap; }
  h1 { font-size: 1.65rem; }
  .roll > div { grid-template-columns: 4.6rem 1fr; }
  .grid tbody th { min-width: 8.5rem; }
  .strip { grid-template-columns: 1fr; padding: 0.45rem 0; }
  .strip__track { padding-top: 0.15rem; padding-bottom: 0.15rem; }
  .figures--drawn th { white-space: normal; padding-right: 0.7rem; }
  .figures__bar { padding-left: 0.6rem !important; }
}
@media (min-width: 34.01rem) and (max-width: 58rem) {
  .strip { grid-template-columns: 11rem minmax(6rem, 1fr); }
  .strip__say { grid-column: 1 / -1; }
}

@media print {
  :root { --paper: #fff; --card: #fff; --ink: #000; --link: #000; font-size: 11pt; }
  .masthead nav, .band, .subnav, .foot__nav, .foot__top, .stage, .skip, .jump, .more { display: none; }
  .foot { background: none; }
  .finding, .motion, .figure, .strip { break-inside: avoid; }
  .heat { print-color-adjust: exact; -webkit-print-color-adjust: exact; }
  details.board > *:not(summary) { display: block; }
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 0.8em; word-break: break-all; }
  .scroll { overflow: visible; }
  .grid--compare a::after { content: none; }
}
