/* Political Maps page (Robert, 2026-10-27). Tabs styled as the Statbook tabs; grid uses the water grid classes;
   the map is the landing map in one-chamber mode. */
.pm-tabs{display:flex;gap:4px;margin:18px 0 4px;border-bottom:2px solid var(--rule-strong,#1b3a2c)}
.pm-tabs button,.pm-tabs select{padding:8px 18px;border:1px solid #9fb3a7;border-bottom:0;background:#eef3f0;color:#1f5138;font:800 14px var(--font-body);border-radius:4px 4px 0 0;cursor:pointer}
.pm-tabs button:hover,.pm-tabs select:hover{background:#e2ece6}
.pm-tabs button.active{background:var(--forest,#1f5138);border-color:var(--forest,#1f5138);color:#fff}
.pm-scroll{max-height:420px}
.pm-grid td.pm-counties{white-space:normal;text-align:left;min-width:18em}
.pm-grid td,.pm-grid th{text-align:left}
.pm-grid td.num,.pm-grid th.num{text-align:right;font-variant-numeric:tabular-nums}
/* Map: frame at a fixed width with room on the right for the close-up tile. */
.pm-map{position:relative;margin:24px 0 0;max-width:880px}
.pm-map .lm-frame{width:100%;margin:0;padding-top:10px}
.pm-map .lm-frame .landing7-map{width:100%;margin:0}
@media (max-width:1300px){.pm-map{max-width:calc(100% - 340px)}}
@media (max-width:999px){.pm-map{max-width:none}}
.pm-grid td.pm-counties{min-width:12em;white-space:normal}
.pm-grid table{table-layout:auto}
/* 10 rows a page, so no fixed box height; Total row with the heavy footer line (Robert, 2026-10-27). */
.pm-scroll{max-height:none}
.pm-grid tfoot td{border-top:2px solid var(--rule-strong,#1b3a2c);font-weight:700;white-space:normal;background:transparent}
/* Totals boxes above the grid (Robert, 2026-10-27). */
.pm-totals{grid-template-columns:110px 200px 160px 1fr 110px}
.pm-totals dd{font-size:17px}
@media (max-width:900px){.pm-totals{grid-template-columns:repeat(auto-fill,minmax(160px,1fr))}}
/* Party 2 column kept narrow; lines wrap (Robert, 2026-10-27). */
.pm-grid td.pm-party2{white-space:normal;width:8.5em;max-width:8.5em}
/* Sort arrows easier to see (Robert, 2026-10-27). */
.pm-grid .wv-sort i{color:var(--blue);font-size:13px;font-weight:700}
.pm-grid .water-grid-tools input[type=search]{width:250px;border-radius:6px}
.pm-grid .water-grid-tools select{border-radius:6px}
/* Title row (title + download), light line, then the filter row (Robert, 2026-10-27). */
.pm-grid>header{align-items:center;margin-top:-6px}
.pm-filters{padding:10px 0;border-bottom:1px solid var(--rule,#c6d0c7);margin-bottom:6px}
.pm-summary{margin:28px 0 0}
.pm-summary h2{margin:0;color:var(--title-navy,#082946);font:700 20px var(--font-title)}
/* Filters easier to see (Robert, 2026-10-27): blue outline, bold text. */
.pm-filters input[type=search],.pm-filters select{height:36px;border:2px solid var(--blue,#0b69c7);color:var(--title-navy,#082946);font:700 13px var(--font-body);background:#fff;border-radius:6px;padding:0 10px}
.pm-filters input[type=search]::placeholder{color:#4d6473;font-weight:700}
/* County type-ahead and the small number boxes (Robert, 2026-10-27). */
.pm-filters input.pm-county{width:170px}
.pm-filters input.pm-num{width:120px}
/* Rows top-aligned with the first line of Counties; very light gray row lines (Robert, 2026-10-27). */
.pm-grid tbody td,.pm-grid tbody th{vertical-align:top;border-bottom:1px solid #eceeec}
/* S badge at the right end of the tab row (Robert, 2026-10-27). */
.pm-tabs{align-items:flex-end}
.pm-tabs-badge{margin-left:auto;align-self:center;padding-bottom:4px}
/* Picked rows yellow (water grid style); the row the map is pointing at gets a light blue (Robert, 2026-10-27). */
.pm-grid tbody tr.pm-shown{background:#e3eefb}
.pm-grid tbody tr.picked.pm-shown{background:#ffe066}
.pm-filters .secondary-button{height:36px}
.pm-filters .secondary-button:disabled{opacity:.45;cursor:default}
/* Filters under their own column headers (Robert, 2026-10-27). */
.pm-grid thead tr.pm-filter-row th{position:static;background:#f7f9f7;padding:4px 6px 8px;text-transform:none;letter-spacing:0}
.pm-filter-row select,.pm-filter-row input{width:100%;min-width:56px;box-sizing:border-box;height:30px;border:2px solid var(--blue,#0b69c7);border-radius:6px;background:#fff;color:var(--title-navy,#082946);font:700 12px var(--font-body);padding:0 6px}
.pm-filter-row th:last-child input{max-width:220px}
/* Grid box with a scroll bar that always shows (Robert, 2026-10-27); header and filter rows stay in view. */
.pm-scroll{max-height:460px;overflow-y:scroll}
.pm-grid thead tr.pm-filter-row th{position:sticky;top:33px;z-index:2}
.pm-grid thead tr:first-child th{z-index:3}
/* Map and frame centered on the page, room kept on the right for the close-up tile (Robert, 2026-10-27). */
.pm-map{margin:24px auto 0;max-width:min(880px,calc(100% - 660px))}
@media (max-width:1300px){.pm-map{margin-left:0;max-width:calc(100% - 340px)}}
@media (max-width:999px){.pm-map{max-width:none}}
/* Filter row on top, column labels under it; both stay in view while the grid scrolls (Robert, 2026-10-27). */
.pm-grid thead tr.pm-filter-row th{position:sticky;top:0;z-index:3;padding:6px 6px 4px}
.pm-grid thead tr.pm-label-row th{position:sticky;top:42px;z-index:2}
/* Clear Search: dark fill, white label (Robert, 2026-10-27). */
.pm-filters .pm-clear{height:36px;background:var(--forest,#1f5138);border-color:var(--forest,#1f5138);color:#fff}
.pm-filters .pm-clear:disabled{opacity:.5;cursor:default}
/* Column filters on the smart search row, each over its column; no filter band inside the grid (Robert, 2026-10-27). */
.pm-filters{position:relative;min-height:36px;flex-wrap:nowrap}
.pm-filters .pm-colfilter{position:absolute;top:10px}
.pm-colfilter select,.pm-colfilter input{width:100%;box-sizing:border-box;height:36px;border:2px solid var(--blue,#0b69c7);border-radius:6px;background:#fff;color:var(--title-navy,#082946);font:700 12px var(--font-body);padding:0 6px}
.pm-filters>input[type=search]{width:min(300px,30%)}
.pm-grid thead tr.pm-label-row th{top:0}
/* The S badge sits bare on the tab row, no tab box around it (Robert, 2026-10-27). */
.pm-tabs .search-badge,.pm-tabs .search-badge:hover{padding:0;border:0;background:none;border-radius:0}
/* Softer yellow for picked rows (Robert, 2026-10-27). */
.pm-grid tbody tr.picked{background:#fff6cc;box-shadow:inset 4px 0 #e0b23a}
.pm-grid tbody tr.picked.pm-shown{background:#ffefa8}
/* Fainter gray placeholder text in the search and filter boxes (Robert, 2026-10-27). */
.pm-filters input::placeholder,.pm-colfilter input::placeholder{color:#a3aea8;font-weight:400}
/* Clear Search beside Download on the title row; smart search sized to the District and Area columns (Robert, 2026-10-27). */
.pm-head-tools{display:flex;align-items:center;gap:10px}
.pm-head-tools .pm-clear{height:36px;background:var(--forest,#1f5138);border-color:var(--forest,#1f5138);color:#fff}
.pm-head-tools .pm-clear:disabled{opacity:.5;cursor:default}
.pm-filters>input.pm-smart{position:absolute;left:4px;top:10px;height:36px;border:2px solid var(--blue,#0b69c7);border-radius:6px;background:#fff;color:var(--title-navy,#082946);font:700 12px var(--font-body);padding:0 8px;box-sizing:border-box;min-width:150px}
.pm-filters{min-height:56px;padding:0}
/* Column filter boxes take their column's width (an older 250px rule for search boxes was overriding them). */
.pm-grid .water-grid-tools.pm-filters .pm-colfilter input[type=search],.pm-grid .water-grid-tools.pm-filters .pm-colfilter select{width:100%;min-width:0}
/* Clear Search at the left of the search band, smart search right after it (Robert, 2026-10-27). */
.pm-filters>.pm-clear{position:absolute;left:4px;top:10px;width:110px;padding:0 6px;height:36px;background:var(--forest,#1f5138);border-color:var(--forest,#1f5138);color:#fff;font-size:12px}
.pm-filters>.pm-clear:disabled{opacity:.5;cursor:default}
.pm-filters>input.pm-smart{left:122px}
/* Download at the right end of the search band (Robert, 2026-10-27). */
.pm-filters>.pm-band-download{position:absolute;right:4px;top:10px}
/* Locked column widths (Robert, 2026-10-27). */
.pm-grid table.pm-locked{table-layout:fixed;width:100%}
.pm-grid table.pm-locked td,.pm-grid table.pm-locked th{overflow-wrap:anywhere;white-space:normal}
.pm-grid td.pm-party2{width:auto;max-width:none}
/* Scroll bar always drawn (Mac hides scroll bars until you scroll; Robert, 2026-10-27). */
.pm-scroll{overflow-y:scroll;scrollbar-width:auto;scrollbar-color:#8aa596 #eef3f0}
.pm-scroll::-webkit-scrollbar{width:12px;height:12px;-webkit-appearance:none}
.pm-scroll::-webkit-scrollbar-track{background:#eef3f0;border-left:1px solid #d5ddd8}
.pm-scroll::-webkit-scrollbar-thumb{background:#8aa596;border-radius:6px;border:2px solid #eef3f0}
.pm-scroll::-webkit-scrollbar-thumb:hover{background:#5f8070}
.pm-scroll{max-height:420px}
/* Side by side (Robert, 2026-10-27): grid left, map right, both from the left edge, tops aligned. */
.pm-side{display:grid;grid-template-columns:minmax(0,56fr) minmax(0,44fr);gap:24px;align-items:start}
.pm-side .pm-grid{margin-top:0}
.pm-side .pm-map{margin:0;max-width:none}
@media (max-width:1300px){.pm-side{grid-template-columns:1fr}.pm-side .pm-map{max-width:760px}}
/* Search band in two lines (Robert, 2026-10-27): Clear Search, smart search, Download on top; column filters under. */
.pm-filters{min-height:104px}
.pm-filters .pm-colfilter{top:58px}
.pm-filters>input.pm-smart{left:122px;top:10px;width:min(320px,calc(100% - 340px))}
.pm-filters>.pm-band-download{top:10px}
/* Area header on one line. */
.pm-grid .pm-label-row th .wv-sort{white-space:nowrap}
/* Right end of the top line: Clear Search, then the download icon (Robert, 2026-10-27). */
.pm-filters>.pm-band-download{display:flex;align-items:center;gap:10px}
.pm-band-download .pm-clear{position:static;width:auto;padding:0 14px;height:36px;background:var(--forest,#1f5138);border-color:var(--forest,#1f5138);color:#fff;font-size:12px}
.pm-band-download .pm-clear:disabled{opacity:.5;cursor:default}
.pm-band-download .download-icon-button,.pm-band-download button[aria-label^="Download"]{position:static}
.pm-filters>input.pm-smart{left:4px;width:min(340px,calc(100% - 260px))}
.pm-band-download .download-icon-button{display:flex;align-items:center;justify-content:center;width:36px;height:36px;padding:0;border:1px solid var(--blue,#0b69c7);border-radius:6px;background:var(--blue,#0b69c7);color:#fff;cursor:pointer}
.pm-band-download .download-icon-button:hover{filter:brightness(.92)}
.pm-band-download .download-icon-button svg{width:18px;height:18px}
/* No frame around the map on this page; a separating line under the party totals (Robert, 2026-10-27). */
.pm-map .lm-frame{border:0;padding:0}
.pm-map .lm-party-table{border-bottom:2px solid var(--rule-strong,#1b3a2c);padding-bottom:6px;margin-bottom:8px}
/* Smart search on the filter line, over District and Area, left of Member; all boxes on one line (Robert, 2026-10-27). */
.pm-filters>input.pm-smart{top:58px;left:4px}
.pm-filters{min-height:104px}
/* Party totals under the map: centered and raised; summary centered under the map. */
.pm-map .lm-party-table{margin:-28px auto 8px}
.pm-map .pm-summary{margin:18px auto 0;text-align:center}
.pm-map .pm-summary .pm-totals{grid-template-columns:repeat(auto-fit,minmax(110px,auto));justify-content:center;text-align:left}
.pm-map .pm-summary h2{text-align:center}
/* Map lowered so its top lines up with the search fields above the grid (Robert, 2026-10-27). */
.pm-side .pm-map{margin-top:46px}
@media (max-width:1300px){.pm-side .pm-map{margin-top:16px}}
/* Summary as a table matching the party table (Robert, 2026-10-27). */
.pm-map .pm-summary{text-align:left}
.pm-map .pm-summary .pm-summary-table{margin:0 auto;border-bottom:0}
/* Party totals and summary tables the same width, one above the other (Robert, 2026-10-27). */
.pm-map .lm-party-table,.pm-map .pm-summary .pm-summary-table{width:400px;max-width:100%}
/* 20 rows a page; taller grid box to hold them (Robert, 2026-10-27). */
.pm-scroll{max-height:820px}
/* Upstate % column (Robert, 2026-10-29): both grids a touch wider, growing to the left (right edge stays put). */
.pm-map .lm-party-table,.pm-map .pm-summary .pm-summary-table{width:470px;position:relative;left:-35px}
.pm-pct-note{width:470px;max-width:100%;margin:4px auto 0;position:relative;left:-35px;color:var(--muted);font:12px var(--font-body)}
.lm-party-table th sup.statbook-fn{color:var(--blue);font-weight:700}
/* Picked districts pinned at the top of the grid, a heavy line under the last one (Robert, 2026-10-29). */
.pm-scroll tr.pm-pinned-last td{border-bottom:2px solid var(--rule-strong)}
/* Map shading buttons and key (Robert, 2026-10-29): map-view button look (blue outline, selected gold). */
.pm-shade{display:flex;align-items:center;gap:6px;flex-wrap:wrap;margin:0 0 6px;font:400 13px var(--font-body);color:var(--ink)}
.pm-shade-label{font-weight:700;margin-right:2px}
.pm-shade button{height:28px;padding:0 12px;border:1px solid var(--blue);border-radius:6px;background:#fff;color:var(--blue);font:600 13px var(--font-body);cursor:pointer}
.pm-shade button.on{background:#d4a83a;border-color:#b88d24;color:#1b3144}
.pm-shade-key{display:inline-flex;gap:12px;margin-left:12px}
.pm-shade-key span{display:inline-flex;align-items:center;gap:5px}
.pm-shade-key i{display:inline-block;width:12px;height:12px;border-radius:2px}
.pm-key-D{background:#2166ac}.pm-key-R{background:#c0392b}.pm-key-O{background:#8a8f94}
.pm-shade-note{margin:0 0 6px;color:var(--muted);font:400 12px var(--font-body)}
/* Map Shading as radios (Robert, 2026-10-29). */
.pm-shade label{display:inline-flex;align-items:center;gap:4px;margin-right:8px;cursor:pointer}
/* Grid box shorter than 20 rows so it scrolls inside with its scroll bar (Robert, 2026-11-02; was 820px). */
.pm-scroll{max-height:680px;overflow-y:scroll}
/* District close-up 20% smaller so it covers less of the map (Robert, 2026-11-02: "its obstructive ... shrink 20%"). */
.lm-frame .lm-cut-panel.lm-cut-in{width:min(32%,240px);font-size:80%;padding:5px 8px 6px}
.lm-frame .lm-cut-panel.lm-cut-in svg{max-height:160px}
/* Column labels may stack on two lines in a taller label band; counties on one line (Robert, 2026-11-03). */
.pm-grid .pm-label-row th{vertical-align:bottom;padding-top:6px;padding-bottom:6px}
.pm-grid .pm-label-row th .wv-sort{white-space:normal;line-height:1.15;text-align:inherit}
.pm-grid td.pm-counties{min-width:0;white-space:nowrap}
.pm-grid table.pm-locked .pm-label-row th,.pm-grid table.pm-locked .pm-label-row th .wv-sort{overflow-wrap:normal;word-break:normal;hyphens:none}
/* Wrap only at spaces between words or numbers, never inside one (Robert, 2026-11-03). */
.pm-grid table.pm-locked td,.pm-grid table.pm-locked th{overflow-wrap:normal;word-break:normal;hyphens:none}
/* Grid defaults (Robert, 2026-11-03: "how about applying grid defaults"; docs/SITE_DEFAULTS.md, Grids): body font 13px in
   the table color, thin rules between rows, 11px bold capital labels on #f7f9f7 with the heavy rule under them, no row
   shading. Download stays the icon (Robert, 2026-10-27). */
.pm-grid table.pm-locked{font:13px var(--font-body);color:var(--ink)}
.pm-grid table.pm-locked tbody td,.pm-grid table.pm-locked tbody th{border-bottom:1px solid var(--rule);background:transparent}
.pm-grid table.pm-locked thead tr.pm-label-row th{background:#f7f9f7;border-bottom:2px solid var(--rule-strong);font:700 11px var(--font-body);text-transform:uppercase;letter-spacing:.04em;color:var(--ink)}
.pm-grid table.pm-locked .pm-label-row .wv-sort{font:inherit;letter-spacing:inherit;text-transform:inherit;color:inherit}
/* 15 rows fit, so the grid box no longer scrolls inside: no empty scroll bar, and the mouse wheel scrolls the page
   (Robert, 2026-11-03: scroll bars "won't read", "mouseover won't acquire the grid"). Counties wrap at word breaks
   rather than push the grid sideways. */
.pm-scroll{max-height:none;overflow-y:visible;overflow-x:auto}
.pm-grid td.pm-counties{white-space:normal}
/* Scroll bars back on every tab's grid (Robert, 2026-11-03: "there should be scroll bars on the grids"): the box is
   shorter than a 15-row page, so it scrolls inside with its visible bar; no sideways bar. */
.pm-scroll{max-height:480px;overflow-y:scroll;overflow-x:hidden}

/* Totals tables under the map: column header band as tall as the left grid's header band (Robert, 2026-11-05). */
.pm-map .lm-party-table thead th{height:41px;box-sizing:border-box}
/* "This page doesn't report election results" line under the description (Robert, 2026-11-12): instruction text, medium blue and bold. */
.political-maps .water-hero p.pm-not-results{margin:6px 0 0;color:var(--blue);font-weight:700}
.political-maps .water-hero p.pm-not-results a{color:var(--blue);text-decoration:underline}
