/* No Hakeem: charts.css  ("roll-call board" look)
 * Scoped to .nh-root. Text outside the board follows the host theme via --fg / --bg
 * (fallbacks below). The board itself is a fixed dark display in both themes, like the
 * chamber's electronic voting board, so lamp contrast does not depend on the page theme.
 * Lamps (on #0f1417): yea #3ddc84 10.4:1, nay #ff5d62 6.2:1, present #ffc43a 11.7:1;
 * lamp text #07100c on each >= 6.4:1. Words (YEA/NAY/PRES) + a star marker back up color.
 * Money series (validated with the dataviz validator, light + dark): #4a90e2 #ad8a24 #c25fd0,
 * each also carries a texture (solid / dots / hatch) and a direct label.
 */
.nh-root {
  --nh-ink: var(--fg, #14181b);
  --nh-bg: var(--bg, #f6f7f5);
  --nh-muted: color-mix(in srgb, var(--nh-ink) 70%, var(--nh-bg));
  --nh-line: color-mix(in srgb, var(--nh-ink) 18%, var(--nh-bg));
  --nh-card: color-mix(in srgb, var(--nh-ink) 5%, var(--nh-bg));
  --nh-focus: var(--accent, #1f6feb);
  --b-bg: #0f1417; --b-panel: #171e22; --b-ink: #eaf0f2; --b-mut: #a4b0b6; --b-line: #2b363b;
  --yea: #3ddc84; --nay: #ff5d62; --pres: #ffc43a; --lamp-ink: #07100c;
  --c-ind: #4a90e2; --c-tr: #ad8a24; --c-pac: #c25fd0; --c-rem: #98a4aa;
  --nh-mono: ui-monospace, "SF Mono", "Cascadia Mono", Menlo, Consolas, monospace;
  --nh-cond: Bahnschrift, "DIN Condensed", "Arial Narrow", "Roboto Condensed", system-ui, sans-serif;
  position: relative;
  color: var(--nh-ink);
  font-size: 1rem; line-height: 1.5;
  max-width: 100%; min-width: 0; box-sizing: border-box;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .nh-root { --nh-ink: var(--fg, #e9eef0); --nh-bg: var(--bg, #0d1114); --nh-focus: var(--accent, #6aa7ff); }
}
:root[data-theme="dark"] .nh-root { --nh-ink: var(--fg, #e9eef0); --nh-bg: var(--bg, #0d1114); --nh-focus: var(--accent, #6aa7ff); }
.nh-root *, .nh-root *::before, .nh-root *::after { box-sizing: border-box; }
/* visually hidden, pinned inside .nh-root (position:relative; overflow clipped) so it can never widen the page */
.nh-root .nh-vh { position: absolute; left: 0; top: 0; width: 1px; height: 1px; margin: -1px; padding: 0; border: 0; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }

.nh-root .nh-figure { margin: 0; min-width: 0; }
.nh-root .nh-title { margin: 0 0 .4rem; font: 800 clamp(1.7rem, 1.2rem + 2.2vw, 2.6rem)/1.05 var(--nh-cond); text-transform: uppercase; letter-spacing: .01em; }
.nh-root .nh-caption { margin: 0 0 1rem; max-width: 64ch; color: var(--nh-muted); }
.nh-root .nh-caption strong { color: var(--nh-ink); }
.nh-root a.nh-src { color: inherit; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 2px; font-size: .8125rem; overflow-wrap: anywhere; }
.nh-root a.nh-src:hover { text-decoration-thickness: 2px; }
.nh-root :focus-visible { outline: 3px solid var(--nh-focus); outline-offset: 2px; border-radius: 3px; }
.nh-root .nh-board :focus-visible { outline-color: #fff; box-shadow: 0 0 0 5px #000; }

/* ---- legend ---- */
.nh-root .nh-legend { list-style: none; margin: 0 0 1rem; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem 1.1rem; font-size: .8125rem; color: var(--nh-muted); }
.nh-root .nh-legend li { display: flex; align-items: center; gap: .45rem; min-width: 0; }
.nh-root .nh-sw { flex: none; display: inline-block; width: 1rem; height: 1rem; border-radius: 3px; border: 1.5px solid currentColor; }
.nh-root .sw-ind, .nh-root .sg-ind { color: var(--c-ind); background: var(--c-ind); }
.nh-root .sw-tr, .nh-root .sg-tr { color: var(--c-tr); background: radial-gradient(#0f1417 1.1px, transparent 1.4px) 0 0 / 6px 6px, var(--c-tr); }
.nh-root .sw-pac, .nh-root .sg-pac { color: var(--c-pac); background: repeating-linear-gradient(135deg, var(--c-pac) 0 4px, color-mix(in srgb, var(--c-pac) 45%, #0f1417) 4px 6px); }
.nh-root .sw-rem, .nh-root .sg-rem { color: var(--c-rem); background: repeating-linear-gradient(-45deg, transparent 0 4px, var(--c-rem) 4px 5.5px); }
.nh-root .nh-tag { display: inline-block; margin-left: .45rem; font: 600 .6875rem/1.2 var(--nh-mono); text-transform: uppercase; letter-spacing: .04em; padding: .1rem .4rem; border: 1px solid currentColor; border-radius: 3px; color: var(--b-mut); vertical-align: 1px; white-space: nowrap; }
.nh-root .nh-legend .nh-tag, .nh-root .nh-notshown .nh-tag { color: var(--nh-muted); }

/* ---- lamps ---- */
.nh-root .nh-lamp { display: inline-flex; align-items: center; justify-content: center; min-width: 3.4rem; padding: .3rem .5rem; border-radius: 4px; font: 800 1.05rem/1 var(--nh-cond); letter-spacing: .08em; color: var(--lamp-ink); }
.nh-root .nh-lamp.sm { min-width: 2.7rem; padding: .18rem .35rem; font-size: .8125rem; }
.nh-root .lamp-yea { background: var(--yea); box-shadow: 0 0 14px color-mix(in srgb, var(--yea) 55%, transparent); }
.nh-root .lamp-nay { background: var(--nay); box-shadow: 0 0 14px color-mix(in srgb, var(--nay) 55%, transparent); }
.nh-root .lamp-pres { background: var(--pres); box-shadow: 0 0 14px color-mix(in srgb, var(--pres) 55%, transparent); }
.nh-root .nh-legend .nh-lamp { box-shadow: none; }
.nh-root .nh-star { fill: currentColor; display: block; }
.nh-root .nh-starkey { display: inline-grid; place-items: center; width: 1.4rem; height: 1.4rem; background: var(--b-bg); color: #fff; border-radius: 4px; }

/* ---- filters ---- */
.nh-root .nh-filters { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: .9rem; }
.nh-root .nh-chip { font: inherit; font-size: .875rem; line-height: 1.2; min-height: 44px; max-width: 100%; padding: .4rem .85rem; border-radius: 6px; border: 2px solid var(--nh-ink); background: var(--nh-bg); color: var(--nh-ink); cursor: pointer; display: inline-flex; align-items: center; gap: .45rem; text-align: left; }
.nh-root .nh-chip[aria-pressed="true"] { background: var(--nh-ink); color: var(--nh-bg); }
.nh-root .nh-chip[aria-pressed="false"] { border-style: dashed; border-color: var(--nh-line); color: var(--nh-muted); }
.nh-root .nh-chip:hover { border-color: var(--nh-ink); }
.nh-root .nh-chip .nh-star { width: 14px; height: 14px; flex: none; }
.nh-root .nh-count { font-variant-numeric: tabular-nums; opacity: .8; }
.nh-root .nh-reset { border-style: solid; border-color: var(--nh-line); color: var(--nh-muted); }
.nh-root .nh-status { margin: .75rem 0 1rem; font-size: .8125rem; color: var(--nh-muted); }

/* ---- the board (shared) ---- */
.nh-root .nh-board { background: var(--b-bg); color: var(--b-ink); border-radius: 10px; border: 1px solid var(--b-line); box-shadow: inset 0 0 0 4px var(--b-bg), inset 0 0 0 5px var(--b-line); padding: 1.1rem; margin: 0 0 1rem; min-width: 0; }
@media (min-width: 720px) { .nh-root .nh-board { padding: 1.6rem; } }
.nh-root .nh-board a.nh-src { color: var(--b-ink); }
.nh-root .nh-sub-h { margin: 1.25rem 0 .4rem; font: 800 1.05rem/1.2 var(--nh-cond); text-transform: uppercase; letter-spacing: .03em; }
.nh-root .nh-note { margin: .5rem 0; font-size: .875rem; color: var(--nh-muted); max-width: 70ch; }
.nh-root .nh-note b { color: var(--nh-ink); }

/* ---- money ---- */
.nh-root .nh-cycle + .nh-cycle { margin-top: 1.6rem; padding-top: 1.4rem; border-top: 1px dashed var(--b-line); }
.nh-root .nh-cy-h { margin: 0 0 .3rem; display: flex; flex-wrap: wrap; align-items: baseline; gap: .1rem .8rem; font-weight: 400; }
.nh-root .nh-cy-year { font: 800 1.6rem/1 var(--nh-cond); text-transform: uppercase; letter-spacing: .03em; }
.nh-root .nh-cy-cover { font: 500 .75rem/1.4 var(--nh-mono); color: var(--b-mut); }
.nh-root .nh-partial { margin: .2rem 0 .5rem; padding: .45rem .65rem; border: 1px solid var(--pres); border-left-width: 5px; border-radius: 4px; font-size: .875rem; }
.nh-root .nh-partial b { color: var(--pres); }
.nh-root .nh-total { margin: 0 0 .5rem; color: var(--b-mut); }
.nh-root .nh-total b { color: var(--b-ink); font: 700 clamp(1.5rem, 1.1rem + 2vw, 2.2rem)/1 var(--nh-mono); font-variant-numeric: tabular-nums; letter-spacing: -.02em; margin-right: .3rem; word-break: break-word; }
.nh-root .nh-track { width: 100%; }
.nh-root .nh-bar { display: flex; gap: 2px; height: 2.4rem; min-width: 8px; transform-origin: left; }
.nh-root .nh-seg { display: block; min-width: 3px; border: 0; border-radius: 0 4px 4px 0; }
.nh-root .nh-seg:first-child { border-radius: 4px 0 0 4px; }
.nh-root .nh-seg + .nh-seg { border-radius: 0; }
.nh-root .nh-seg:last-child { border-radius: 0 4px 4px 0; }
.nh-root .nh-seg { border: 0; }
.nh-root .nh-rows { list-style: none; margin: .9rem 0 0; padding: 0; display: grid; gap: .55rem; }
.nh-root .nh-row { display: grid; grid-template-columns: auto 1fr; gap: .1rem .6rem; align-items: start; font-size: .9rem; }
.nh-root .nh-row .nh-sw { margin-top: .2rem; }
.nh-root .nh-row-l { min-width: 0; color: var(--b-mut); }
.nh-root .nh-row-v { grid-column: 2; font: 600 .95rem/1.3 var(--nh-mono); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.nh-root .nh-pct { font-weight: 400; color: var(--b-mut); }
@media (min-width: 720px) {
  .nh-root .nh-row { grid-template-columns: auto 1fr 16rem; align-items: center; }
  .nh-root .nh-row .nh-sw { margin-top: 0; }
  .nh-root .nh-row-v { grid-column: auto; text-align: right; }
}
.nh-root .nh-srcline { margin: .8rem 0 0; font-size: .8125rem; color: var(--b-mut); }
.nh-root .nh-sharelist { list-style: none; margin: 0; padding: 0; display: grid; gap: .4rem; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); }
.nh-root .nh-sharelist li { padding: .6rem .8rem; border: 2px solid var(--nh-ink); border-radius: 6px; font-size: .875rem; color: var(--nh-muted); }
.nh-root .nh-sharelist b { display: block; font: 700 1.9rem/1.1 var(--nh-mono); color: var(--nh-ink); }
.nh-root .nh-notshown { border: 2px dashed var(--nh-ink); border-radius: 8px; padding: .25rem 1rem 1rem; margin: 1.25rem 0; }
.nh-root .nh-notshown ul { margin: 0 0 .5rem; padding-left: 1.2rem; font-size: .9rem; max-width: 70ch; }
.nh-root .nh-notshown li { margin: .3rem 0; }
.nh-root .nh-foot { border-top: 1px solid var(--nh-line); padding-top: .9rem; font-size: .875rem; color: var(--nh-muted); max-width: 72ch; }
.nh-root .nh-foot p { margin: 0 0 .5rem; }
.nh-root .nh-foot b { color: var(--nh-ink); }

/* ---- votes ---- */
.nh-root .nh-bhead { display: grid; gap: .9rem; align-items: center; margin-bottom: 1.1rem; padding-bottom: 1rem; border-bottom: 1px solid var(--b-line); }
@media (min-width: 720px) { .nh-root .nh-bhead { grid-template-columns: minmax(0, 22rem) 1fr; gap: 1.6rem; } }
.nh-root .nh-seats { width: 100%; max-width: 22rem; height: auto; display: block; }
.nh-root .nh-seats circle { fill: #26323a; }
.nh-root .nh-seats .jeff { fill: #fff; stroke: #fff; stroke-width: 1; }
.nh-root .nh-seats[data-v="yea"] .jeff { fill: var(--yea); stroke: var(--yea); }
.nh-root .nh-seats[data-v="nay"] .jeff { fill: var(--nay); stroke: var(--nay); }
.nh-root .nh-seats[data-v="pres"] .jeff { fill: var(--pres); stroke: var(--pres); }
.nh-root .nh-seats .jeff { filter: drop-shadow(0 0 4px currentColor); }
.nh-root .nh-seatnote { margin: 0 0 .6rem; font-size: .875rem; color: var(--b-mut); }
.nh-root .nh-boardtot { margin: 0; display: grid; gap: .25rem; }
.nh-root .nh-boardtot .tot-l { font: 600 .6875rem/1.3 var(--nh-mono); text-transform: uppercase; letter-spacing: .05em; color: var(--b-mut); }
.nh-root .nh-boardtot .tot-v { display: flex; flex-wrap: wrap; gap: .3rem 1.2rem; font: 800 1.5rem/1.1 var(--nh-mono); font-variant-numeric: tabular-nums; }
.nh-root .tv-yea { color: var(--yea); } .nh-root .tv-nay { color: var(--nay); } .nh-root .tv-pres { color: var(--pres); }

.nh-root .nh-lane { padding: .9rem 0 .4rem; border-bottom: 1px solid var(--b-line); }
.nh-root .nh-lane:last-child { border-bottom: 0; }
.nh-root .nh-lane[hidden], .nh-root .nh-cellwrap[hidden] { display: none; }
.nh-root .nh-lane-h { margin: 0 0 .6rem; display: flex; flex-wrap: wrap; align-items: baseline; gap: .1rem .8rem; font: 800 1.1rem/1.2 var(--nh-cond); text-transform: uppercase; letter-spacing: .04em; }
.nh-root .nh-ours { font: 500 .6875rem/1.2 var(--nh-mono); text-transform: uppercase; letter-spacing: .04em; color: var(--b-mut); border: 1px solid var(--b-line); border-radius: 3px; padding: .1rem .35rem; }
.nh-root .nh-cells { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(6.4rem, 1fr)); gap: .5rem; }
.nh-root .nh-cellwrap { min-width: 0; }
.nh-root .nh-cell { position: relative; width: 100%; min-height: 4.6rem; padding: .6rem .5rem .45rem; display: grid; justify-items: center; align-content: space-between; gap: .4rem; font: inherit; color: var(--b-ink); background: var(--b-panel); border: 2px solid var(--b-line); border-radius: 6px; cursor: pointer; }
.nh-root .nh-cell:hover { border-color: var(--b-mut); }
.nh-root .nh-cell[aria-expanded="true"] { border-color: #fff; background: #1f292f; }
.nh-root .nh-cell.is-counter { border-style: dashed; border-color: #cfd8dc; }
.nh-root .nh-cmeta { display: grid; justify-items: center; font: 500 .6875rem/1.3 var(--nh-mono); color: var(--b-mut); }
.nh-root .nh-cstar { position: absolute; top: .2rem; right: .25rem; width: 14px; height: 14px; color: #fff; }
.nh-root .nh-cstar .nh-star { width: 14px; height: 14px; }
.nh-root .nh-cell .nh-lamp { min-width: 0; width: 100%; }

.nh-root .nh-readouts { min-width: 0; }
.nh-root .nh-detail { margin: .6rem 0 .5rem; padding: .8rem 1rem 1rem; background: var(--b-panel); border: 1px solid var(--b-line); border-left: 5px solid #fff; border-radius: 6px; min-width: 0; }
.nh-root .nh-detail[hidden] { display: none; }
.nh-root .nh-detail dl { margin: 0; display: grid; grid-template-columns: minmax(0, 1fr); font-size: .9rem; }
.nh-root .nh-detail dt { font: 600 .6875rem/1.4 var(--nh-mono); text-transform: uppercase; letter-spacing: .05em; color: var(--b-mut); margin-top: .65rem; }
.nh-root .nh-detail dd { margin: 0; max-width: 66ch; min-width: 0; overflow-wrap: anywhere; }
.nh-root .nh-detail dd .nh-lamp { vertical-align: 1px; }
@media (min-width: 720px) {
  .nh-root .nh-detail dl { grid-template-columns: 12rem minmax(0, 1fr); gap: .35rem .9rem; }
  .nh-root .nh-detail dt { margin-top: .25rem; }
}
.nh-root .nh-tl { display: block; margin-bottom: .45rem; }
.nh-root .nh-tally { display: flex; gap: 2px; height: .7rem; margin-top: .3rem; max-width: 22rem; }
.nh-root .tseg { display: block; min-width: 3px; }
.nh-root .tseg-yea { background: var(--yea); } .nh-root .tseg-nay { background: var(--nay); } .nh-root .tseg-pres { background: var(--pres); }
.nh-root .tseg:first-child { border-radius: 3px 0 0 3px; } .nh-root .tseg:last-child { border-radius: 0 3px 3px 0; } .nh-root .tseg:only-child { border-radius: 3px; }

/* ---- table alternative ---- */
.nh-root .nh-details { margin-top: 1rem; border: 2px solid var(--nh-ink); border-radius: 8px; padding: .25rem .9rem; min-width: 0; }
.nh-root .nh-details summary { cursor: pointer; font-weight: 700; padding: .55rem 0; min-height: 44px; display: flex; align-items: center; }
.nh-root .nh-tablewrap { position: relative; overflow-x: auto; margin: 0 0 .75rem; max-width: 100%; border: 1px solid var(--nh-line); border-radius: 6px; }
.nh-root .nh-table { border-collapse: collapse; width: 100%; min-width: 640px; font-size: .8125rem; }
.nh-root .nh-table th, .nh-root .nh-table td { text-align: left; vertical-align: top; padding: .45rem .6rem; border-bottom: 1px solid var(--nh-line); }
.nh-root .nh-table th { background: var(--nh-card); font-weight: 700; }
.nh-root .nh-votes .nh-table { min-width: 1500px; }

/* ---- motion: lanes light up in sequence; off for reduced motion ---- */
@media (prefers-reduced-motion: no-preference) {
  .nh-root.nh-anim .nh-lane:not(.lit) .nh-cell { opacity: 0; transform: translateY(8px) scale(.96); }
  .nh-root.nh-anim .nh-lane.lit .nh-cell { animation: nh-on .45s cubic-bezier(.2,.8,.2,1) both; }
  .nh-root.nh-anim .nh-lane.lit .nh-cellwrap:nth-child(2n) .nh-cell { animation-delay: .06s; }
  .nh-root.nh-anim .nh-lane.lit .nh-cellwrap:nth-child(3n) .nh-cell { animation-delay: .12s; }
  .nh-root.nh-anim .nh-lane.lit .nh-cellwrap:nth-child(4n) .nh-cell { animation-delay: .18s; }
  @keyframes nh-on { from { opacity: 0; transform: translateY(8px) scale(.96); } 60% { opacity: 1; filter: brightness(1.5); } to { opacity: 1; transform: none; filter: none; } }
  .nh-root .nh-cell, .nh-root .nh-chip { transition: border-color .15s ease, background-color .15s ease, transform .15s ease; }
  .nh-root .nh-cell:hover { transform: translateY(-2px); }
  .nh-root .nh-bar { animation: nh-grow .7s cubic-bezier(.2,.8,.2,1) both; }
  @keyframes nh-grow { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
  .nh-root .nh-seats .jeff { animation: nh-pulse 2.4s ease-in-out infinite; }
  @keyframes nh-pulse { 50% { r: 5.6; } }
}
@media (forced-colors: active) {
  .nh-root .nh-seg, .nh-root .nh-lamp, .nh-root .tseg, .nh-root .nh-sw { forced-color-adjust: none; }
  .nh-root .nh-chip[aria-pressed="true"] { border-width: 4px; }
}
@media print {
  .nh-root .nh-detail[hidden] { display: block; }
  .nh-root .nh-details:not([open]) > * { display: block; }
}
