/* Yeas & Nays — site styles. Colors come only from tokens.css.
   Mobile first; one breakpoint at 760px. Rules, not boxes: no rounded
   cards, shadows or gray panels; controls have square corners. */

*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--surface);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.45;
  -webkit-text-size-adjust: 100%;
}

/* Links: ink text with an aubergine underline. Never purple text, so links
   don't read as already visited, and visited links look the same. */
a, a:visited {
  color: var(--ink);
  text-decoration-line: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 0.2em;
}
a:hover { text-decoration-thickness: 2.5px; }

/* Headline-style links (vote titles, member names): ink, no underline at
   rest, underline on hover. On a block link, only its title (.t / .n) is
   underlined. */
.headline-link, .headline-link:visited { color: var(--ink); text-decoration-line: none; }
.headline-link:hover { text-decoration-line: underline; }
.headline-link:has(.t, .n):hover { text-decoration-line: none; }
.headline-link:hover :is(.t, .n) {
  text-decoration-line: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 2.5px;
  text-underline-offset: 0.2em;
}

:is(a, button, input, select, summary, .area-line):focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

h1, h2, h3, p, ul, ol { margin: 0; }

.wrap { max-width: 1180px; margin: 0 auto; padding-left: 16px; padding-right: 16px; }

.serif { font-family: var(--font-display); }
.nums { font-variant-numeric: tabular-nums lining-nums; }
.kicker {
  font-family: var(--font-sans);
  font-size: 12px;
  line-height: 16px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.soft { color: var(--ink-soft); }
.muted { color: var(--ink-muted); }
.small { font-size: 14px; line-height: 20px; }
.intro { font-size: 18px; line-height: 28px; }
.visually-hidden {
  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: -9999px; }
.skip:focus { left: 16px; top: 8px; background: var(--surface); padding: 8px; z-index: 1; }

/* ---- Masthead ---------------------------------------------------------- */

.topstrip { border-bottom: 1px solid var(--line); }
.topstrip .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0 16px; }
.dateline { font-family: var(--font-display); font-style: italic; font-size: 15px; color: var(--ink-soft); padding: 12px 0; }
.mainnav { display: flex; flex-wrap: wrap; gap: 0 20px; font-size: 14px; font-weight: 500; }
.mainnav a {
  display: inline-flex; align-items: center; min-height: 44px;
  text-decoration: none; border-bottom: 2px solid transparent;
}
.mainnav a[aria-current="page"] { border-bottom-color: var(--accent); }
/* Up to 559px, where the seven links don't fit on one row: two rows of four
   and three, so none is left alone on a second line. */
@media (max-width: 559.98px) { .mainnav { display: grid; grid-template-columns: repeat(4, auto); justify-content: start; justify-items: start; } }
@media (max-width: 420px) { .mainnav { gap: 0 12px; font-size: 13px; } }
/* Masthead search: its own full-width row on phones, beside the nav on desktop. */
.sitesearch { display: flex; gap: 8px; flex: 1 1 100%; padding-bottom: 12px; }
.sitesearch .field { height: 40px; font-size: 15px; min-width: 0; }
.sitesearch .button { height: 40px; padding: 0 14px; font-size: 14px; }
/* A search box in a page's own content (the 404 page), not the masthead. */
.sitesearch.inpage { flex: none; padding: 0; max-width: 480px; }
/* Pagefind's results UI on /search/, in the site's colors and type. */
.sitesearch-results {
  --pagefind-ui-scale: 0.9;
  --pagefind-ui-primary: var(--accent);
  --pagefind-ui-text: var(--ink);
  --pagefind-ui-background: var(--surface);
  --pagefind-ui-border: var(--ink);
  --pagefind-ui-tag: var(--surface-alt);
  --pagefind-ui-border-width: 1px;
  --pagefind-ui-border-radius: 0;
  --pagefind-ui-font: var(--font-sans);
  margin-top: 8px;
}
.sitesearch-results input { color: var(--ink); }
.sitesearch-results fieldset { border: 0; margin: 0; padding: 0; }
.sitesearch-results .pagefind-ui__search-clear { border: 0; }
.sitesearch-results .pagefind-ui__result-link { font-family: var(--font-display); }
.sitesearch-results .pagefind-ui__result-excerpt { color: var(--ink-soft); }
.sitesearch-results mark { background: none; color: inherit; font-weight: 600; box-shadow: inset 0 -2px var(--accent); }

.mast { display: flex; flex-direction: column; align-items: center; gap: 10px; padding-top: 16px; padding-bottom: 12px; text-align: center; }
.mast a { display: block; max-width: 100%; }
.mast img { display: block; width: auto; max-width: 100%; height: 36px; }
.mast.large { padding-top: 22px; padding-bottom: 14px; }
.mast.large img { height: 54px; }

.rule-double { border-top: 3px solid var(--ink); border-bottom: 1px solid var(--ink); height: 3px; }
.rule-double.foot { border-top-width: 1px; border-bottom-width: 3px; }
.rule-ink { border-top: 1px solid var(--ink); }
.rule-line { border-top: 1px solid var(--line); }

.session-line { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 18px; padding-top: 8px; padding-bottom: 8px; font-size: 13px; color: var(--ink-soft); text-align: center; }

/* ---- Controls ---------------------------------------------------------- */

.field {
  height: 44px; width: 100%;
  font: inherit; font-size: 16px; color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--ink); border-radius: 0;
  padding: 0 12px;
}
select.field { padding: 0 8px; }
.button {
  display: inline-flex; align-items: center; justify-content: center;
  height: 44px; padding: 0 18px;
  font: inherit; font-size: 15px; font-weight: 600;
  background: var(--ink); color: var(--surface);
  border: 0; border-radius: 0; cursor: pointer; text-decoration: none;
}
/* A link styled as a button keeps its text color once visited; a:visited
   alone would turn it the same ink as its background. */
.button:visited { color: var(--surface); }
.button:hover { color: var(--surface); background: var(--ink-soft); }

/* Share button (_includes/share.html, share.js): an outline, quieter than
   .button. .js-only makes it display: flex, which would otherwise stretch it
   across its column; fit-content keeps it the width of its label. */
.share {
  width: fit-content; align-self: flex-start; align-items: center;
  height: 36px; padding: 0 14px;
  font: inherit; font-size: 14px; font-weight: 600;
  color: var(--ink-soft); background: none;
  border: 1px solid var(--line); border-radius: 0; cursor: pointer;
}
.share:hover { color: var(--ink); border-color: var(--ink-soft); }

/* Link styled like the share button: an outline pill (About page contact). */
.pill {
  display: inline-flex; align-items: center;
  height: 36px; padding: 0 14px;
  font-size: 14px; font-weight: 600; text-decoration: none;
  border: 1px solid var(--line);
}
.pill, .pill:visited { color: var(--ink-soft); }
.pill:hover { color: var(--ink); border-color: var(--ink-soft); }

/* Back-to-top link, bottom right on long pages (totop.js shows it). Clear of
   the iPhone home indicator. .button sets display, so [hidden] needs its own
   rule. */
.totop {
  position: fixed; z-index: 5;
  right: max(16px, env(safe-area-inset-right));
  bottom: max(16px, env(safe-area-inset-bottom));
  width: 44px; padding: 0;
}
.totop, .totop:visited { color: var(--surface); }
.totop[hidden] { display: none; }
@media print { .totop { display: none; } }

.tabs { display: flex; gap: 18px; }
.tabs button {
  min-height: 44px; padding: 0 2px;
  font: inherit; font-size: 15px; font-weight: 600;
  background: transparent; color: var(--ink-soft);
  border: 0; border-bottom: 2px solid transparent; border-radius: 0;
  cursor: pointer;
}
.tabs button[aria-pressed="true"] { color: var(--ink); border-bottom-color: var(--accent); }
/* Tabs only work with JS; filters.js reveals them. */
.js-only { display: none; }
.has-js .js-only { display: flex; }
/* After .js-only, which would otherwise show it on paper. */
@media print { .has-js .share { display: none; } }
/* Panels tabs.js hides (Activity) all print, without their tab row. */
@media print {
  [data-panel][hidden] { display: block; }
  .has-js .act-tabs { display: none; }
}

.filters { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.filters .q { grid-column: 1 / -1; }
.filters > div { display: flex; flex-direction: column; gap: 6px; }
.filters label { color: var(--ink-soft); }

/* Pinned filter bar (pinbar.js): fixed, not sticky, so it never moves the
   list. Up to 960px it shows the search, a Filters button and the count; from
   960px every control shows in one row. Scrolls within itself if the open
   panel is taller than the screen (a landscape phone, the keyboard up). */
.pinbar {
  position: fixed; z-index: 6; top: 0; left: 0; right: 0;
  max-height: 100vh; max-height: 100dvh; overflow-y: auto;
  background: var(--surface); border-bottom: 1px solid var(--ink);
  padding-top: env(safe-area-inset-top);
}
.pinbar-inner { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; padding-top: 6px; padding-bottom: 6px; }
.pinbar .field { height: 40px; }
.pinbar-q { flex: 1 1 0; min-width: 0; }
.pinbar-toggle {
  height: 40px; padding: 0 12px; flex: none;
  font: inherit; font-size: 15px; font-weight: 600;
  background: var(--surface); color: var(--ink);
  border: 1px solid var(--ink); border-radius: 0; cursor: pointer;
}
.pinbar-toggle[aria-expanded="true"] { background: var(--ink); color: var(--surface); }
.pinbar-more { display: none; }
.pinbar-more.is-open { flex: 1 1 100%; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 12px; padding: 6px 0; }
.pinbar-more .tabs { grid-column: 1 / -1; }
.pinbar-more .tabs button { min-height: 40px; }
.pinbar-more label { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.pinbar-more .kicker { color: var(--ink-soft); }
.pinbar-count { flex: 1 1 100%; margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media print { .pinbar { display: none; } }

.findrow { display: flex; flex-direction: column; gap: 8px; padding-top: 16px; padding-bottom: 16px; }
.findrow label, .findrow .findlabel { font-family: var(--font-display); font-size: 18px; font-weight: 600; white-space: nowrap; }
.findctl { display: flex; gap: 8px; min-width: 0; }
.findctl .field { flex: 1 1 auto; min-width: 0; }
.findlinks { flex-wrap: wrap; }
.findlinks .button { flex: 1 1 auto; }
/* Home page: the status board callout, one line under the find row. */
.boardrow { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: center; gap: 4px 14px; padding-top: 10px; padding-bottom: 10px; text-align: center; }

/* ---- Page frame -------------------------------------------------------- */

main.wrap { display: flex; flex-direction: column; gap: 36px; padding-top: 16px; padding-bottom: 48px; }
main.home { gap: 20px; padding-top: 20px; }

/* Home page floor band: live-floor.js marks a line .is-live from its convening
   time; a chamber tab hides a line with [hidden]. The band shows only while a
   line is both live and not hidden (never in a browser without :has()). */
.live-band { display: none; flex-direction: column; gap: 6px; padding: 8px 0; border-top: 1.5px solid var(--ink); border-bottom: 1px solid var(--line); }
.live-band:has(.live-line.is-live:not([hidden])) { display: flex; }
.live-line { display: none; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; margin: 0; }
.live-line.is-live:not([hidden]) { display: flex; }
/* Today's closed committee meetings, under the floor band: always shown. */
.closed-band { display: flex; flex-direction: column; gap: 6px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.live-band:has(.live-line.is-live:not([hidden])) + .closed-band { border-top: 0; }
.closed-band:first-child, .live-band + .closed-band { border-top: 1.5px solid var(--ink); }
.closed-line { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; margin: 0; }
.closed-line[hidden] { display: none; }
/* A chamber tab with no closed meetings that day hides every line: hide the band too. */
.closed-band:not(:has(.closed-line:not([hidden]))) { display: none; }
/* "In session" (convened, per the data) gets a pulsing accent dot; "Scheduled
   session" (past its scheduled time) a still one. The pulse stops for reduced motion. */
.live-flag { display: inline-flex; align-items: center; gap: 8px; color: var(--accent); }
.live-dot { position: relative; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.live-dot.pulse::after {
  content: ""; position: absolute; inset: 0; border-radius: 50%; background: var(--accent);
  animation: live-pulse 2s ease-out infinite;
}
@keyframes live-pulse { from { transform: scale(1); opacity: 0.6; } to { transform: scale(2.2); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .live-dot.pulse::after { animation: none; opacity: 0; } }

.back { font-size: 14px; line-height: 20px; padding: 12px 0; align-self: flex-start; margin-bottom: -24px; }
.section { display: flex; flex-direction: column; gap: 12px; border-top: 1.5px solid var(--ink); padding-top: 12px; }
.section-h { font-family: var(--font-display); font-size: 28px; line-height: 34px; font-weight: 600; }
.section-h.sm { font-size: 24px; line-height: 30px; }
.head-row { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 16px; }

.result {
  align-self: flex-start;
  font-size: 13px;
  border-top: 1.5px solid var(--ink); border-bottom: 1.5px solid var(--ink);
  padding: 3px 0; margin-top: 4px;
}
.tag {
  font-size: 11px;
  border-top: 1px solid var(--ink); border-bottom: 1px solid var(--ink);
  padding: 1px 0;
}

/* ---- Vote header ------------------------------------------------------- */

.procedure { max-width: 680px; display: flex; flex-direction: column; gap: 4px; font-size: 15px; line-height: 22px; color: var(--ink-soft); border-left: 1.5px solid var(--ink); padding-left: 12px; }
.procedure .kicker { margin-right: 6px; }
.procedure a { align-self: flex-start; padding: 4px 0; }

/* ---- Bill path (vote page) --------------------------------------------- */
/* Round pips, unlike the square position marks, so a step never reads as a vote.
   A list down the page on phones and tablets; a row across from 960px, where even a
   vetoed path's nine steps have room. */

.bill-path { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.bill-path .step { position: relative; display: flex; gap: 12px; padding-bottom: 14px; }
.bill-path .step:not(:last-child)::before {
  content: ""; position: absolute; left: 7px; top: 18px; bottom: 0; width: 1.5px; background: var(--line);
}
/* The reached part of the path is in the accent (brand, not a party or
   position color); steps not reached stay in line gray. */
.bill-path .step.done:not(:last-child)::before { background: var(--accent); width: 2.5px; left: 6.75px; }
.bill-path .pip {
  flex: none; width: 16px; height: 16px; margin-top: 2px; border-radius: var(--radius-full);
  border: 1.5px solid var(--ink); background: var(--surface); box-sizing: border-box;
}
.bill-path :is(.done, .in_progress, .failed) .pip { border-color: var(--accent); }
.bill-path .done .pip { background: var(--accent); }
.bill-path .in_progress .pip { background: linear-gradient(90deg, var(--accent) 50%, var(--surface) 50%); }
.bill-path .failed .pip {
  background: linear-gradient(135deg, var(--surface) calc(50% - 1px), var(--accent) calc(50% - 1px),
                              var(--accent) calc(50% + 1px), var(--surface) calc(50% + 1px));
}
.bill-path .skipped .pip { border-style: dotted; }
.bill-path .upcoming .pip { border-color: var(--line); }
.bill-path .upcoming .step-text, .bill-path .skipped .step-text { color: var(--ink-muted); }
.bill-path .current .pip { box-shadow: 0 0 0 3px var(--surface), 0 0 0 4.5px var(--accent); }
.bill-path .step-text { display: flex; flex-direction: column; gap: 2px; font-size: 15px; line-height: 20px; }
.bill-path .step-text .link { align-self: flex-start; }
.bill-path .current .kicker { color: var(--accent); }

@media (min-width: 960px) {
  .bill-path { flex-direction: row; }
  .bill-path .step { flex: 1 1 0; flex-direction: column; gap: 8px; padding-bottom: 0; padding-right: 8px; }
  .bill-path .step:not(:last-child)::before { left: 18px; right: 2px; top: 9px; bottom: auto; width: auto; height: 1.5px; }
  .bill-path .step.done:not(:last-child)::before { left: 18px; top: 8.75px; width: auto; height: 2.5px; }
}

/* Vote page top: heading, tally, By party in one column; side by side from 960px. */
.vote-top { display: grid; grid-template-columns: minmax(0, 1fr); gap: 36px; }
.vote-head { display: flex; flex-direction: column; gap: 12px; max-width: 860px; }
.vote-head .back { margin-bottom: -8px; }
.question { font-size: 16px; line-height: 22px; color: var(--ink-soft); }
.vote-h, .lead-h {
  font-family: var(--font-display); font-weight: 600;
  letter-spacing: -0.015em; text-wrap: balance;
  font-size: 30px; line-height: 35px;
}

/* ---- Tally (box score) ------------------------------------------------- */

.tally { display: flex; flex-direction: column; gap: 14px; }
.boxscore {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--ink); border-bottom: 1px solid var(--ink);
}
.boxscore > div { display: flex; flex-direction: column; gap: 6px; padding: 14px 12px 12px; }
.boxscore > div:nth-child(odd) { padding-left: 0; }
.boxscore > div:nth-child(even) { border-left: 1px solid var(--line); }
.boxscore > div:nth-child(n+3) { border-top: 1px solid var(--line); }
.fig { font-family: var(--font-display); font-weight: 500; font-size: 40px; line-height: 40px; }
.fig-label { display: flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 600; }

/* Legend marks: Yea solid ink, Nay diagonal stripes, Not Voting open box,
   Present a dashed box. Same in grayscale; never party or position colors. */
.mark { display: inline-block; flex: none; width: 11px; height: 11px; border: 1px solid var(--ink); background: var(--surface); }
.mark.yea { background: var(--ink); }
.mark.nay, .hatch { background: repeating-linear-gradient(135deg, var(--ink) 0 2px, var(--surface) 2px 5px); }
.mark.present { border-style: dashed; }
.pos { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }

/* Party grid: one square per member, drawn with the legend marks above. */
.grid-chart { display: flex; flex-direction: column; gap: 14px; }
.grid-party { display: flex; flex-direction: column; gap: 6px; }
.grid-label { font-size: 14px; line-height: 18px; }
.grid-party svg { display: block; max-width: 100%; height: auto; }
.dot rect { stroke: var(--ink); stroke-width: 1; }
.dot.yea rect { fill: var(--ink); }
.dot.present rect, .dot.nv rect { fill: var(--surface); }
.dot.present rect { stroke-dasharray: 3 2; }
.grid-chart pattern rect { fill: var(--ink); stroke: none; }

/* Vote page map: each district (House) or senator's side of a state filled
   with the legend marks; Present is dotted here, since a dashed edge would
   vanish on a small district. Drawn by vote-map.js. Centered in the
   column, with its caption and key under it. */
.vmap { flex-direction: column; align-items: center; gap: 8px; margin-bottom: 12px; text-align: center; }
.vmap svg { display: block; width: 100%; max-width: 720px; height: auto; aspect-ratio: 975 / 610; }
.vmap .shapes path { fill: var(--ink); stroke: var(--surface); stroke-width: 0.5px; vector-effect: non-scaling-stroke; }
/* Nay and Present shapes are filled with their own map's pattern by vote-map.js. */
.vmap .shapes path.nv { fill: var(--surface); stroke: var(--ink); }
.vmap .shapes path.none { fill: var(--no-record); stroke: var(--line); }
.vmap .seat.on path { stroke: var(--map-select); stroke-width: 2px; }
.vmap .states path { fill: none; stroke: var(--ink-muted); stroke-width: 1px; vector-effect: non-scaling-stroke; pointer-events: none; }
.vmap pattern rect, .vmap pattern circle { fill: var(--ink); }
.vmap pattern .bg { fill: var(--surface); }
/* Until the shapes load, a faint box holds the map's place. */
.vmap:not(.ready) svg { background: var(--surface-alt); }
/* Zoom (map-zoom.js): the buttons wait for the shapes. At the whole map a
   finger on it still scrolls the page; once zoomed in, it pans the map. */
.vmap-zoom { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.vmap-zoom .button { min-width: 40px; }
.vmap:not(.ready) .vmap-zoom { visibility: hidden; }
.vmap svg { user-select: none; }
.vmap svg.zoomed { touch-action: none; cursor: grab; }
.vmap svg.zoomed:active { cursor: grabbing; }
.vmap-caption { min-height: 1.5em; }
.vmap-key { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 16px; margin: 0; padding: 0; list-style: none; }
.vmap-key li { display: inline-flex; align-items: center; gap: 6px; }
.mark.dots { background: radial-gradient(circle, var(--ink) 1.2px, var(--surface) 1.5px) 0 0 / 4px 4px; }
.mark.none { background: var(--no-record); border-color: var(--line); }

/* Floor activity: roll calls per week, stacked by kind of vote. The SVG
   stretches across the width; axis labels are HTML so they keep their size. */
.vol-key { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 8px 0 16px; padding: 0; list-style: none; }
.vol-key li { display: inline-flex; align-items: center; gap: 6px; }
.vol-key .swatch { width: 12px; height: 12px; }
.swatch.k-passage, .vol .k-passage { background: var(--kind-passage); fill: var(--kind-passage); }
.swatch.k-amendment, .vol .k-amendment { background: var(--kind-amendment); fill: var(--kind-amendment); }
.swatch.k-nomination, .vol .k-nomination { background: var(--kind-nomination); fill: var(--kind-nomination); }
.swatch.k-procedural, .vol .k-procedural { background: var(--kind-procedural); fill: var(--kind-procedural); }
.vol-chamber { margin-bottom: 24px; }
.vol { margin: 8px 0 0; }
.vol-plot { position: relative; padding-left: 28px; }
.vol-plot svg { display: block; width: 100%; height: 200px; }
.vol-y span { position: absolute; left: 0; transform: translateY(-50%); font-size: 12px; line-height: 1; color: var(--ink-muted); }
.vol .grid { fill: var(--line); }
.vol .hit { fill: transparent; }
.has-js .vol .wk { cursor: pointer; }
.vol .wk:is(.hover, .on) .hit { fill: var(--surface-alt); }
/* An outline would stretch with the chart; a stroke on the week's column doesn't. */
.vol .wk:focus { outline: none; }
.vol .wk:focus-visible .hit { fill: var(--surface-alt); stroke: var(--accent); stroke-width: 2px; vector-effect: non-scaling-stroke; }
.vol-x { position: relative; height: 24px; margin-left: 28px; }
.vol-x span { position: absolute; top: 0; height: 6px; border-left: 1px solid var(--line); }
.vol-x span.lab { height: auto; padding: 4px 0 0 4px; white-space: nowrap; }
/* Hover box and the clicked bar's list of roll calls (activity.js). */
.vol-tip {
  position: fixed; z-index: 10; pointer-events: none; max-width: 260px;
  display: flex; flex-direction: column; gap: 2px; padding: 8px 10px;
  background: var(--surface); color: var(--ink); border: 1px solid var(--ink);
}
.vol-tip[hidden] { display: none; }
.tip-kind { display: flex; align-items: center; gap: 6px; }
.vol-tip .swatch, .vol-votes .swatch { display: inline-block; width: 10px; height: 10px; }
.vol-tip .k-passage, .vol-votes .k-passage { background: var(--kind-passage); }
.vol-tip .k-amendment, .vol-votes .k-amendment { background: var(--kind-amendment); }
.vol-tip .k-nomination, .vol-votes .k-nomination { background: var(--kind-nomination); }
.vol-tip .k-procedural, .vol-votes .k-procedural { background: var(--kind-procedural); }
.has-js .vol-list { margin-top: 6px; min-height: 1.5em; }
.vol-list-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 6px 0; }
.linkish {
  font: inherit; color: var(--ink); background: none; border: 0; padding: 0; cursor: pointer;
  text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 1.5px; text-underline-offset: 0.2em;
}
.vol-votes { max-height: 480px; overflow-y: auto; margin: 0; }
.vol-votes .vote-item a { padding: 12px 0; gap: 4px; }
.vol-votes .t { font-size: 16px; line-height: 22px; }

/* By policy area: a House and a Senate bar per area, stacked by kind of vote,
   with a 1px surface gap between segments. Label above the bars on phones,
   beside them from 760px. */
.areas { list-style: none; margin: 0 0 16px; padding: 0; border-top: 1px solid var(--line); }
.area-row { display: grid; gap: 4px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.area-name { font-size: 14px; line-height: 20px; font-weight: 600; }
.area-lines { display: flex; flex-direction: column; gap: 3px; }
.area-line { display: grid; grid-template-columns: 52px 1fr; align-items: center; gap: 8px; }
.area-ch { line-height: 1; }
.area-track { display: flex; align-items: center; gap: 6px; min-width: 0; }
.area-bar { display: flex; gap: 1px; height: 10px; margin: 0; }
.area-bar > span { display: block; height: 100%; min-width: 1px; }
.area-n { line-height: 1; color: var(--ink-soft); }
.has-js .area-line { cursor: pointer; }
.area-line:is(.hover, .on) .area-ch { color: var(--ink); font-weight: 600; }
.area-line.on .area-track { outline: 1px solid var(--ink); outline-offset: 2px; }
@media (min-width: 760px) {
  .area-row { grid-template-columns: 240px 1fr; align-items: center; gap: 16px; }
}

.bar { display: flex; height: 14px; border: 1px solid var(--ink); background: var(--surface); }
.bar .yea { background: var(--ink); }
.bar .nay { border-left: 2px solid var(--surface); }

/* ---- Tables ------------------------------------------------------------ */

.scroll { overflow-x: auto; }
table.roll { border-collapse: collapse; width: 100%; }
.roll th {
  text-align: left; font-size: 12px; line-height: 16px; font-weight: 600;
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-soft);
  padding: 10px 12px 10px 0; border-bottom: 1.5px solid var(--ink);
}
.roll td { padding: 12px 12px 12px 0; border-bottom: 1px solid var(--line); font-size: 15px; line-height: 20px; vertical-align: middle; }
.roll .r { text-align: right; }
.roll :is(th, td):last-child { padding-right: 0; }
.roll td a { font-weight: 600; }
.roll tbody th { white-space: nowrap; text-transform: none; letter-spacing: 0; font-size: 15px; line-height: 20px; color: var(--ink); padding: 12px 12px 12px 0; border-bottom: 1px solid var(--line); }
.party { font-weight: 600; }
/* Roll calls on a measure: this vote's row tinted; the chamber under the date;
   date and split on one line, the question wide enough to read on phones. */
.measure-votes tr.current td { background: var(--surface-alt); }
.measure-votes :is(.date, .split) { white-space: nowrap; }
.measure-votes :is(.kicker, .date span, .tie) { display: block; }
.measure-votes .question { min-width: 13em; }
/* Field tables on /data/: long field paths break anywhere so the table fits
   a phone; the description column gets the room. */
.fields { table-layout: fixed; }
.fields :is(th, td) { vertical-align: top; }
.fields :is(th, td):nth-child(1) { width: 34%; }
.fields :is(th, td):nth-child(2) { width: 18%; }
.fields code { overflow-wrap: anywhere; }

.mini { border-collapse: collapse; font-size: 14px; line-height: 20px; align-self: flex-start; min-width: 240px; }
.mini caption { text-align: left; color: var(--ink-muted); padding-bottom: 6px; }
.mini th { text-align: left; padding: 3px 24px 3px 0; font-weight: 600; }
.mini td { text-align: right; padding: 3px 0; }

/* ---- Ruled lists ------------------------------------------------------- */

.ruled { list-style: none; padding: 0; border-top: 1.5px solid var(--ink); }
.ruled > li { border-bottom: 1px solid var(--line); }
.ruled.thin { border-top: 1px solid var(--line); }

.against li, .corrections li { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 12px; padding: 12px 0; }
.against li a, .corrections li a, .corrections li .what { font-family: var(--font-display); font-weight: 600; font-size: 19px; padding: 4px 0; }
.against li a span, .corrections li a span { font-family: var(--font-sans); font-weight: 400; font-size: 15px; color: var(--ink-soft); }
.against strong, .corrections strong { color: var(--ink); }

.vote-item :is(a, .unlinked) { display: flex; flex-direction: column; gap: 6px; padding: 16px 0; text-decoration: none; }
.vote-item .t { font-family: var(--font-display); font-size: 19px; line-height: 25px; font-weight: 600; }

/* A committee hearing (_includes/hearing.html): title, committees, room, witnesses.
   A Senate action without a roll call (_includes/senate_action.html) is laid out the same. */
:is(.hearing-item, .senate-action) { display: flex; flex-direction: column; gap: 6px; padding: 16px 0; }
:is(.hearing-item, .senate-action) .t { font-family: var(--font-display); font-size: 19px; line-height: 25px; font-weight: 600; }
.hearing-item .witnesses summary { cursor: pointer; color: var(--ink-soft); }
.hearing-item .witnesses ul { list-style: none; padding: 6px 0 0; margin: 0; display: flex; flex-direction: column; gap: 4px; }

.empty { font-size: 15px; color: var(--ink-soft); }
[hidden] { display: none !important; }

/* CRS summary, as published. */
.crs-text { max-width: 720px; display: flex; flex-direction: column; gap: 12px; font-size: 17px; line-height: 27px; }
.crs-text :is(p, ul, ol) { margin: 0; }
.crs-text :is(ul, ol) { padding-left: 22px; }
.crs summary { cursor: pointer; font-weight: 600; color: var(--ink); display: list-item; padding: 12px 0; }
.crs[open] summary { margin-bottom: 8px; }

/* ---- Home -------------------------------------------------------------- */

.front { display: grid; grid-template-columns: minmax(0, 1fr); }
.lead { display: flex; flex-direction: column; gap: 14px; }
.side { display: flex; flex-direction: column; gap: 28px; border-top: 1.5px solid var(--ink); margin-top: 28px; padding-top: 4px; }
.more { font-weight: 600; font-size: 15px; padding: 10px 0; align-self: flex-start; }

/* Home modules: rows of columns under an ink rule; one column on phones,
   columns divided by thin rules from 760px. */
.modules { display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px; border-top: 1.5px solid var(--ink); padding-top: 12px; }
.modules > section, .week { display: flex; flex-direction: column; gap: 10px; }
/* Module headings in display type, a step above the 18px item titles. */
.module-h { font-family: var(--font-display); font-size: 22px; line-height: 28px; font-weight: 600; letter-spacing: -0.01em; color: var(--ink); }
/* Rules go between the modules shown: a chamber tab can hide any of them, or
   all of a row's. */
.modules:not(:has(> section:not([hidden]))) { display: none; }
.modules > section:not([hidden]) ~ section { border-top: 1.5px solid var(--ink); padding-top: 12px; }
.fig-sm { font-family: var(--font-display); font-size: 36px; line-height: 36px; font-weight: 600; }

.week-figs { display: flex; gap: 28px; }
.week-figs > div, .spark { display: flex; flex-direction: column; gap: 2px; }
.spark-bars { display: flex; align-items: flex-end; gap: 2px; height: 40px; border-bottom: 1px solid var(--ink); }
.spark-bars > span { flex: 1; background: var(--ink-muted); }
.spark-bars > .now { background: var(--accent); }
.spark-axis { display: flex; justify-content: space-between; }

.close-item, .against-item { padding: 12px 0; }
.close-item { display: flex; flex-direction: column; gap: 6px; }
:is(.close-item, .against-item) .headline-link { display: flex; flex-direction: column; gap: 4px; }
:is(.close-item, .against-item) .t { font-family: var(--font-display); font-size: 18px; line-height: 24px; font-weight: 600; }
/* Yeas filled from the left; the tick marks the Yeas needed. */
.close-bar { position: relative; height: 10px; border: 1px solid var(--ink); margin: 4px 0; }
.close-bar .yea { position: absolute; left: 0; top: 0; bottom: 0; background: var(--ink-muted); }
.close-bar .tick { position: absolute; top: -5px; bottom: -5px; width: 3px; margin-left: -1.5px; background: var(--accent); }

.against-item { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 12px; align-items: start; }
.against-n, .against-v { display: flex; flex-direction: column; gap: 4px; }
.against-n { align-items: flex-end; }

.area-top { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.area-top li { display: flex; flex-direction: column; gap: 4px; }
.area-top li > .small { display: flex; justify-content: space-between; gap: 12px; }
.area-top-bar { display: block; height: 8px; background: var(--surface-alt); }
.area-top-bar > span { display: block; height: 100%; background: var(--accent); }

.new-here { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; border-top: 3px solid var(--ink); padding-top: 16px; }
.new-here > div { display: flex; flex-direction: column; gap: 8px; }
.new-here li { display: flex; flex-direction: column; gap: 2px; padding: 10px 0; }

/* ---- Members ----------------------------------------------------------- */

.portrait {
  position: relative; flex-shrink: 0; overflow: hidden;
  width: 96px; height: 120px;
  background: var(--surface-alt); border: 1px solid var(--ink);
  display: flex; align-items: center; justify-content: center;
}
.portrait img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.portrait .initials { font-family: var(--font-display); font-size: 40px; font-weight: 600; color: var(--ink-soft); }
.portrait.sm { width: 56px; height: 70px; }
.portrait.sm .initials { font-size: 22px; }

.who { display: flex; gap: 16px; align-items: flex-start; }
.who > div { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.name-h { font-family: var(--font-display); font-weight: 600; letter-spacing: -0.02em; font-size: 34px; line-height: 38px; }
.who .meta { font-size: 17px; line-height: 24px; font-weight: 500; color: var(--ink-soft); }
.who .term { font-family: var(--font-display); font-style: italic; font-size: 16px; line-height: 22px; color: var(--ink-soft); }

.facts { display: flex; flex-direction: column; gap: 12px; }
.facts dl { margin: 0; border-top: 1px solid var(--line); }
.facts dl > div { display: flex; flex-direction: column; gap: 2px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 15px; line-height: 22px; }
.facts dt { font-weight: 600; }
.facts dd { margin: 0; color: var(--ink-soft); overflow-wrap: anywhere; }
/* 44px tap targets around 24px icons; the negative margin lines the first icon up with the text. */
.account-icons { display: flex; flex-wrap: wrap; margin: 0 0 0 -10px; padding: 0; list-style: none; }
.account-icons a { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; color: var(--ink-soft); }
.account-icons a:hover { color: var(--accent); }

.tiles { display: grid; grid-template-columns: minmax(0, 1fr); border-top: 1px solid var(--ink); border-bottom: 1px solid var(--ink); }
.tiles > div { display: flex; flex-direction: column; gap: 4px; padding-top: 14px; padding-bottom: 14px; }
.tiles > div + div { border-top: 1px solid var(--line); }
.tiles .fig { font-size: 36px; }
.tiles .what { font-size: 15px; font-weight: 600; }
.tiles .of { font-size: 13px; line-height: 18px; color: var(--ink-muted); }
.tiles .med { font-size: 13px; line-height: 18px; color: var(--ink-soft); font-weight: 600; margin-top: 2px; }

/* Roll calls by month: votes cast solid, missed votes an open box on top. */
.m-months { margin: 0; display: flex; flex-direction: column; gap: 6px; }
.m-months-plot { display: flex; align-items: flex-end; gap: 2px; height: 120px; border-bottom: 1px solid var(--ink); }
.m-month { flex: 1 1 0; min-width: 0; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; }
.m-month .cast { display: block; background: var(--accent); min-height: 1px; }
.m-month .missed { display: block; box-sizing: border-box; border: 1px solid var(--ink); border-bottom: 0; min-height: 2px; }
.m-months-x { display: flex; gap: 2px; }
.m-months-x > span { flex: 1 1 0; min-width: 0; text-align: center; overflow: visible; white-space: nowrap; }
.m-months-x b { font-weight: 600; }
/* Month initials only where columns are wide enough; phones show the years alone. */
.m-months-x .ini { display: none; }
.m-months-key { display: flex; flex-wrap: wrap; gap: 4px 16px; }
.m-months-key .sw { display: inline-block; width: 12px; height: 12px; margin-right: 6px; vertical-align: -1px; box-sizing: border-box; }
.m-months-key .sw.cast { background: var(--accent); }
.m-months-key .sw.missed { border: 1px solid var(--ink); }

/* A member's bills by policy area; with JS each bar filters the list below. */
.m-areas { display: flex; flex-direction: column; gap: 8px; padding: 12px 0; border-top: 1px solid var(--line); }
.m-area-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 2px 32px; }
.m-area-list .m-area {
  display: flex; flex-direction: column; gap: 4px; width: 100%; padding: 6px 0;
  font: inherit; color: var(--ink); text-align: left; background: none; border: 0; cursor: default;
}
.m-area-list .m-area > .small { display: flex; justify-content: space-between; gap: 12px; }
.has-js .m-area-list .m-area { cursor: pointer; }
.has-js .m-area-list .m-area:hover > .small > span:first-child { text-decoration: underline; text-decoration-color: var(--accent); }
.m-area-list .m-area[aria-pressed="true"] > .small { font-weight: 600; }
.m-area-list .m-area[aria-pressed="true"] .area-top-bar { outline: 2px solid var(--ink); outline-offset: 1px; }
.m-areas .linkish[aria-pressed="true"] { text-decoration: none; color: var(--ink-muted); cursor: default; }

.vrow { display: flex; flex-direction: column; gap: 6px; padding: 14px 0; text-decoration: none; }
.vrow .q { font-size: 14px; line-height: 20px; color: var(--ink-soft); }
.vrow .t { font-family: var(--font-display); font-size: 19px; line-height: 25px; font-weight: 600; }
.vrow .how { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-size: 14px; }
.vrow .stack { display: flex; flex-direction: column; gap: 2px; min-width: 0; }

.member-list { display: grid; grid-template-columns: minmax(0, 1fr); column-gap: 40px; list-style: none; padding: 0; border-top: 1.5px solid var(--ink); }
.member-list li { border-bottom: 1px solid var(--line); }
.member-list a, .member-list .row { display: flex; gap: 14px; align-items: center; padding: 12px 0; text-decoration: none; }

/* Committee pages (committee.html) and the profile's Committees section. */
.committee-side { display: flex; flex-direction: column; gap: 8px; }
.committee-side + .committee-side { margin-top: 16px; }
.committee-list { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--line); }
.committee-list > li { padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 15px; line-height: 22px; }
.committee-list ul { list-style: none; padding: 0 0 0 16px; margin: 6px 0 0; display: flex; flex-direction: column; gap: 4px; }
.member-list .n { font-family: var(--font-display); font-size: 19px; line-height: 24px; font-weight: 600; }
.member-list .d { font-size: 14px; color: var(--ink-soft); }

.find .findrow { padding: 0; }
/* ZIP code search above the map (district-map.js fills the note). */
.zipfind { flex-direction: column; gap: 12px; }
.zipnote { font-size: 15px; }
.zipseats { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }

/* District map (find/index.html, district-map.js): every district alike, no party colors. */
.dmap { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; align-items: start; }
.dmap-view { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.dmap svg { display: block; width: 100%; height: auto; border: 1px solid var(--line); border-radius: var(--radius-sm); touch-action: none; cursor: grab; user-select: none; }
.dmap svg:active { cursor: grabbing; }
.dmap .districts path { fill: var(--surface-alt); stroke: var(--ink-muted); stroke-opacity: 0.55; stroke-width: 0.6px; vector-effect: non-scaling-stroke; }
.dmap .districts a:hover path, .dmap .districts a.zip path { fill: var(--lilac); }
.dmap .districts a.on path { fill: var(--accent); }
.dmap .borders { fill: none; stroke: var(--ink); stroke-width: 1.2px; vector-effect: non-scaling-stroke; pointer-events: none; }
/* City labels: --u is map units per screen pixel (district-map.js); without JS
   only the largest cities show, at the whole-map size. */
.dmap .cities { pointer-events: none; }
.dmap .city { display: none; }
.dmap .city.t1, .dmap svg.z2 .city.t2, .dmap svg.z3 .city.t3 { display: inline; }
.dmap .city circle { r: calc(var(--u, 11) * 2px); fill: var(--ink); }
.dmap .city text {
  font-family: var(--font-sans); font-size: calc(var(--u, 11) * 11px); font-weight: 400; fill: var(--ink);
  stroke: var(--surface); stroke-opacity: 0.6; stroke-width: calc(var(--u, 11) * 2px); stroke-linejoin: round; paint-order: stroke;
  transform: translate(calc(var(--u, 11) * 4px), calc(var(--u, 11) * 4px));
}
/* Cities in the chosen district sit on its accent fill (district-map.js); a
   solid halo keeps a label readable where it runs past the district's edge. */
.dmap .city.in circle { fill: var(--on-accent); }
.dmap .city.in text { fill: var(--on-accent); stroke: var(--accent); stroke-opacity: 1; }
.dmap-zoom { gap: 8px; flex-wrap: wrap; align-items: center; }
.dmap-zoom .button { min-width: 40px; }
.dmap-card { flex-direction: column; gap: 12px; padding: 14px 0; border-top: 1.5px solid var(--ink); border-bottom: 1px solid var(--line); }
.dmap-card h2 { font-size: 13px; }
.dmap-row { display: flex; flex-direction: column; gap: 4px; }
.dmap-member { font-family: var(--font-display); font-size: 19px; font-weight: 600; }

/* ---- About ------------------------------------------------------------- */

.prose { max-width: 720px; display: flex; flex-direction: column; gap: 16px; font-size: 17px; line-height: 27px; }
.prose h2 { font-family: var(--font-display); font-size: 26px; line-height: 32px; font-weight: 600; border-top: 1.5px solid var(--ink); padding-top: 12px; margin-top: 16px; }
.prose section { display: flex; flex-direction: column; gap: 12px; scroll-margin-top: 16px; }
.prose ul { padding-left: 20px; display: flex; flex-direction: column; gap: 6px; }
.prose dl { margin: 0; border-top: 1px solid var(--line); }
.prose dt { font-weight: 600; padding-top: 12px; }
.prose dd { margin: 4px 0 0; padding-bottom: 12px; border-bottom: 1px solid var(--line); color: var(--ink-soft); }
/* /keep-up/: the status board's screens as a gallery of cards, one per
   screen: its picture on top, then its name and description. The picture
   is framed like a small display (a dark bezel, rounded corners, a soft
   shadow) so it reads as a picture of a screen, not part of the page.
   One card across on phones, two from 600px, three from 960px. The dd
   gives way (display: contents) so its picture and text sit in the card's
   own rows. */
.prose .board-shots { display: grid; gap: var(--space-9) var(--space-6); padding-top: var(--space-6); border-top: 0; }
@media (min-width: 600px) { .prose .board-shots { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 960px) { .prose .board-shots { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.shot-card { display: grid; align-content: start; gap: var(--space-2); }
/* With a picture, it goes on top; without one, the name and description stack as written. */
.shot-card:has(.board-shot) { grid-template-areas: "shot" "title" "text"; }
.prose .shot-card:has(.board-shot) dt { grid-area: title; }
.prose .shot-card:has(.board-shot) dd > p { grid-area: text; }
.prose .shot-card dt { padding: var(--space-2) 0 0; }
.prose .shot-card dd { display: contents; }
.prose .shot-card dd > p { margin: 0; font-size: 0.95em; color: var(--ink-soft); }
.prose .board-shot {
  grid-area: shot; display: block; width: 100%; height: auto; box-sizing: border-box;
  border: 6px solid var(--bezel); border-radius: var(--radius-md); outline: 1px solid var(--line);
  box-shadow: 0 10px 24px -8px color-mix(in srgb, var(--bezel) 35%, transparent), 0 2px 6px color-mix(in srgb, var(--bezel) 12%, transparent);
}
.prose.wide { max-width: none; }
.prose.wide section > p, .prose.wide dt, .prose.wide dd > p { max-width: 720px; }

/* ---- Contents ("On this page", _includes/toc.html) --------------------- */
/* Above the text on narrow screens. From 1024px, a sticky column at the
   right of the main column beside the 720px text, so wide screens aren't
   left with an empty band on the right. */
.toc { display: flex; flex-direction: column; gap: 6px; }
.toc ul { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 4px 20px; }
@media (max-width: 1023.98px) { .toc.wide-only { display: none; } }
@media (min-width: 1024px) {
  main.wrap:has(> .toc) {
    display: grid;
    grid-template-columns: minmax(0, 720px) minmax(200px, 280px);
    justify-content: space-between;
    grid-auto-flow: row dense;
    column-gap: 48px;
  }
  main.wrap:has(> .toc) > * { grid-column: 1 / -1; }
  main.wrap:has(> .toc) > .prose { grid-column: 1; }
  main.wrap:has(> .toc) > .toc {
    grid-column: 2; align-self: start; position: sticky; top: 16px;
    max-height: calc(100vh - 32px); overflow-y: auto;
    border-top: 1.5px solid var(--ink); padding-top: 12px; margin-top: 16px;
  }
  /* The list scrolls on its own, which would clip an outline drawn outside a link. */
  main.wrap:has(> .toc) > .toc a:focus-visible { outline-offset: -2px; }
  .toc ul { flex-direction: column; gap: 8px; }
  /* The dictionary's text starts with its list, not an h2 with a top margin. */
  main.wrap:has(> .toc) > .toc.wide-only { margin-top: 0; }
}
.prose code { font-family: var(--font-mono); font-size: 0.88em; padding: 1px 5px; border-radius: var(--radius-sm); background: var(--surface-alt); }

/* About: "Who built this" credit card, the maker's other projects. */
.credit { background: var(--surface-alt); border-radius: var(--radius-md); padding: 6px 20px 8px; }
.credit-h { padding: 10px 0 6px; font-size: 12px; line-height: 16px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-muted); }
.prose .credit ul { list-style: none; padding: 0; gap: 0; }
.credit li + li { border-top: 1px solid var(--line); }
.credit-row { display: flex; align-items: center; gap: 14px; min-height: 64px; padding: 10px 0; color: var(--ink); text-decoration: none; }
.credit-row:hover .credit-name { text-decoration: underline; text-decoration-color: var(--accent); }
.credit-mark { flex-shrink: 0; display: block; width: 40px; height: 40px; border-radius: 9px; }
.credit-text { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.credit-name { font-size: 16px; line-height: 22px; font-weight: 600; }
.credit-line { font-size: 14px; line-height: 20px; color: var(--ink-soft); }
.credit-arrow { flex-shrink: 0; color: var(--accent); }

/* ---- Floor schedule calendar ------------------------------------------ */
/* Phones: days stack, each with its Senate and House cells. Wider screens:
   a grid with a column per day and a row per chamber (see Desktop). */

.tabs.wraps { flex-wrap: wrap; column-gap: 18px; row-gap: 0; }
.cal-wrap, .cal-week { display: flex; flex-direction: column; gap: 12px; }
.cal-week { margin-top: 12px; }
.cal { border-top: 1.5px solid var(--ink); }
.cal-labels { display: none; }
.cal-day { display: flex; flex-direction: column; gap: 8px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.cal-date { display: flex; align-items: baseline; gap: 8px; margin: 0; font-size: 15px; font-weight: 600; }
.cal-cell { display: flex; flex-direction: column; gap: 4px; }
.cal-cell.blank { display: none; }
.cal-votes { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.cal-votes a { display: flex; flex-direction: column; }
.cal-votes .n { font-size: 15px; font-weight: 600; }
.cal-pending-h { margin: 12px 0 0; font-weight: 600; }

/* ---- Footer ------------------------------------------------------------ */

/* Room below the last line for the back-to-top link (16px + 44px + 16px), so
   it never covers a footer link at the end of the page. */
footer.wrap { padding-bottom: 76px; }
/* Browse, Floor, Learn, About. On phones the two short groups share a row
   and Learn, whose titles are long, takes a row of its own; from 760px two
   by two; from 960px one row, Learn's list in two columns. */
.footnav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 24px; padding: 20px 0; font-size: 14px; line-height: 20px; }
.footnav > :nth-child(3) { grid-column: 1 / -1; }
.footnav .kicker { margin-bottom: 4px; color: var(--ink-muted); }
.footnav ul { list-style: none; padding: 0; }
.footnav li a { display: inline-block; padding: 4px 0; }
.footnav li .social { display: inline-flex; align-items: center; gap: 6px; }
.footnav .social:hover { color: var(--accent); }
.footline { display: flex; flex-wrap: wrap; gap: 6px 20px; padding-top: 14px; border-top: 1px solid var(--line); font-size: 13px; line-height: 20px; color: var(--ink-muted); }

/* ---- Desktop ----------------------------------------------------------- */

@media (min-width: 760px) {
  .wrap { padding-left: 40px; padding-right: 40px; }
  .mast img { height: 48px; }
  .footnav > :nth-child(3) { grid-column: auto; }
  .footnav li { break-inside: avoid; }
  .footline { justify-content: space-between; }
  .mast.large img { height: 88px; }
  .sitesearch { flex: 0 1 300px; padding: 6px 0; }

  .vote-h, .lead-h { font-size: 44px; line-height: 48px; }
  .fig { font-size: 64px; line-height: 60px; }
  .boxscore.many .fig { font-size: 44px; line-height: 44px; }

  .boxscore { grid-template-columns: none; grid-auto-columns: minmax(0, 1fr); grid-auto-flow: column; }
  .boxscore > div:nth-child(n) { padding-left: 12px; }
  .boxscore > div:first-child { padding-left: 0; }
  .boxscore > div + div { border-left: 1px solid var(--line); }
  .boxscore > div:nth-child(n+3) { border-top: 0; }

  .filters { grid-template-columns: 2fr 1fr 1fr 1fr; }
  .filters .q { grid-column: auto; }

  .findrow { flex-direction: row; align-items: center; justify-content: center; gap: 12px; }
  .findctl { flex: 0 1 420px; }
  .findlinks { flex-basis: auto; }

  .front.has-side { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
  .has-side .lead { padding-right: 36px; border-right: 1px solid var(--ink); }
  .side { border-top: 0; margin-top: 0; padding-top: 0; padding-left: 28px; }
  .modules { gap: 0; }
  /* One column per module shown (a [hidden] module isn't a grid item), so a
     chamber tab that hides one leaves the other two sharing the row. */
  .modules.three { grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); }
  .modules.two { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
  .modules > section { padding: 0 24px; }
  .modules > section:not(:not([hidden]) ~ section) { padding-left: 0; }
  .modules > section:not(:has(~ section:not([hidden]))) { padding-right: 0; }
  .modules > section:not([hidden]) ~ section { border-top: 0; padding-top: 0; border-left: 1px solid var(--line); }
  .new-here { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 48px; }

  .who { gap: 28px; }
  .portrait { width: 160px; height: 200px; }
  .portrait .initials { font-size: 56px; }
  .name-h { font-size: 52px; line-height: 56px; }
  .facts dl > div { flex-direction: row; gap: 16px; }
  .facts dt { flex: 0 0 170px; }
  .tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .m-area-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .m-months-x .ini { display: inline; }
  .tiles .fig { font-size: 56px; line-height: 56px; }
  .tiles > div + div { border-top: 0; border-left: 1px solid var(--line); padding-left: 20px; }
  .vrow { display: grid; grid-template-columns: 170px minmax(0, 1fr) 260px; gap: 24px; align-items: baseline; }

  .member-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .find .findrow { justify-content: flex-start; }

  .cal { display: grid; grid-template-rows: auto auto auto; border-bottom: 1px solid var(--line); }
  .cal.days-5 { grid-template-columns: 72px repeat(5, minmax(0, 1fr)); }
  .cal.days-6 { grid-template-columns: 72px repeat(6, minmax(0, 1fr)); }
  .cal.days-7 { grid-template-columns: 72px repeat(7, minmax(0, 1fr)); }
  .cal-labels, .cal-day { display: grid; grid-row: span 3; grid-template-rows: subgrid; gap: 0; padding: 0; border-bottom: 0; }
  .cal-day { border-left: 1px solid var(--line); }
  .cal-labels > *, .cal-date, .cal-cell { padding: 10px; }
  .cal-labels > :first-child { padding: 0; }
  .cal-labels > * + *, .cal-cell { border-top: 1px solid var(--line); }
  .cal-cell { position: relative; }
  .cal-cell.blank { display: flex; }
  .cal-date { flex-wrap: wrap; column-gap: 6px; }
  .cal-day.today .cal-date { border-top: 3px solid var(--accent); padding-top: 7px; }
  /* The row labels name the chamber; keep it for screen readers only. */
  .cal-chamber {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
  }
}

/* Vote page: By party runs down the right beside the heading and tally; extra
   height goes below the tally rather than between it and the heading. From
   960px, so the tally's four figures have room beside it. */
@media (min-width: 960px) {
  .vote-top { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); grid-template-rows: auto 1fr; gap: 36px 0; }
  .vote-top > :not(.by-party) { grid-column: 1; align-self: start; padding-right: 36px; }
  .vote-top > .by-party { grid-column: 2; grid-row: 1 / span 2; padding-left: 28px; border-left: 1px solid var(--ink); }
}

/* Pinned filter bar: every control in one row. From 960px, since /members/
   (search, chamber tabs, three selects) leaves each select too narrow at 760. */
@media (min-width: 960px) {
  .pinbar-toggle { display: none; }
  .pinbar-q { flex: 2 1 0; }
  .pinbar-inner { align-items: flex-end; }
  .pinbar-more, .pinbar-more.is-open { display: flex; flex: 3 1 0; align-items: flex-end; gap: 12px; padding: 0; }
  .pinbar-more label { flex: 1 1 0; }
}

/* District map: the map on the left, the chosen district's members beside it. */
@media (min-width: 960px) {
  .dmap { grid-template-columns: minmax(0, 1fr) 280px; gap: 28px; }
  .dmap-card { position: sticky; top: 16px; }
}

/* Footer: the four groups in one row, Learn twice as wide with its list in
   two columns. */
@media (min-width: 960px) {
  .footnav { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 2fr) minmax(0, 1fr); }
  .footnav > :nth-child(3) ul { columns: 2; column-gap: 24px; }
}
