@font-face{font-family:'Public Sans';font-style:normal;font-weight:400 800;font-display:swap;src:url(/fonts/public-sans.woff2) format('woff2');unicode-range:U+0000-00FF,U+0100-017F,U+02BB-02BC,U+02C6-02C7,U+02D8-02DD,U+2000-206F,U+20AC,U+2122,U+2190-21FF,U+2200-22FF,U+FEFF,U+FFFD}
@font-face{font-family:'Public Sans';font-style:normal;font-weight:400 800;font-display:swap;src:url(/fonts/public-sans-ext.woff2) format('woff2');unicode-range:U+0180-02BA,U+02BD-02C5,U+02C8-02D7,U+02DE-036F,U+1E00-1EFF,U+2070-20AB,U+20AD-20CF,U+2100-2121,U+2123-218F,U+2C60-2C7F,U+A720-A7FF,U+AB30-AB6F}
/* Archivo, a grotesque with a width axis, sets the figures and labels a printed brief would: district numbers large and
   condensed, headline figures, section numbers and the wordmark wide. It has no ʻokina, so it is kept to digits, Latin
   letters and punctuation; any Hawaiian word falls back to Public Sans. */
@font-face{font-family:'Archivo';font-style:normal;font-weight:100 900;font-stretch:62% 125%;font-display:swap;src:url(/fonts/archivo.woff2) format('woff2');unicode-range:U+0020-007E,U+00A0-00FF,U+2010-2015,U+2018-201E,U+2022,U+2026,U+2032-2033,U+2212}

/* Tokens. Every color, size, radius, and spacing value below comes from here; only pure white (#fff) is written directly.
   Contrast on white: ink 16:1, muted 9.2:1 (8.0:1 on the gray page), house teal 8.3:1, senate purple 8.2:1, control borders 4.6:1, placeholder 5.7:1.
   tests/agent/test_web_palette.py checks these pairs, including under simulated color blindness, so keep it in step. */
:root{
  /* The look is an app on a light gray page: white panels with rounded corners and soft shadows, numbered sections,
     and each district's number set large in its chamber's color. */
  --sans:'Public Sans',system-ui,-apple-system,'Segoe UI',Roboto,Arial,sans-serif;
  --display:'Archivo','Public Sans',system-ui,-apple-system,'Segoe UI',Roboto,Arial,sans-serif;

  /* Neutral surfaces and text */
  --bg:#ffffff;--page:#ebf0f2;--surface:#eef2f3;--subtle:#f6f8f9;--line:#c9d2d4;
  --control:#6b787c;--placeholder:#5c696d;--ink:#172326;--muted:#3e4a4e;
  /* The band at the top of every page: House teal deepening to this at its right, under white text. */
  --band-end:#276b7c;

  /* Chambers. House is teal, Senate is purple. These never change. */
  --house:#1d5563;--house-dark:#143f4a;--house-soft:#d6e7eb;--house-soft-hover:#c3dde3;--house-land:#a8cfd9;--house-hover:#6aa6b6;--house-zip:#4f8a99;
  --senate:#5b3f8f;--senate-dark:#432d70;--senate-soft:#e6e0f3;--senate-soft-hover:#d8cfec;--senate-land:#cfc4e6;--senate-hover:#a994d2;--senate-zip:#8a74b8;

  /* The accent follows the chamber of the district on screen or the chat is asking about; it is House teal everywhere
     else. The letterhead, the bar across the top of every page, is always the dark House teal, a step darker than the
     band under it. */
  --accent:var(--house);--accent-dark:var(--house-dark);--accent-soft:var(--house-soft);--accent-soft-hover:var(--house-soft-hover);
  --chamber:var(--house);--letterhead:var(--house-dark);

  /* ʻIlima gold, the second accent: what to press and where you are. It fills the main buttons (ink text on it,
     8.7:1, with an edge 5.2:1 on white), marks the current tab and the rule over each page's title, and edges the
     home page's Ask panel. */
  --gold:#f2b33d;--gold-hover:#e5a023;--gold-edge:#946200;--gold-soft:#fdf3dc;--gold-line:#e6c27a;

  /* Map, charts, errors. District borders use the chamber color, 3:1 or more against the land and the sea.
     Comparison bars are 3:1 or more against the answer bubble and differ from both chamber colors in lightness.
     A district under the mouse gets a darker fill, still 3:1 from a picked district, and a dark outline drawn over its
     neighbors, 4:1 or more against every map color, so hover never depends on telling two tints apart. */
  --map-sea:#eef3f4;--map-dim:#e7ecee;--bar-other:#7a8689;

  /* A map shaded by a measure: five shades per chamber, from pale yellow for the lowest figures to a dark shade of the
     chamber color for the highest. Each shade is 15 or more darker in lightness than the one before and differs from it
     by delta E 15 or more with each color vision deficiency, so the five stay apart in grayscale too. Borders and
     stripes are ink on the three light shades and white on the two dark ones, 3:1 or more either way. */
  --house-q1:#f7f5d9;--house-q2:#a3cc94;--house-q3:#40a17f;--house-q4:#036f6e;--house-q5:#003f4d;
  --senate-q1:#fef1ea;--senate-q2:#f1b1a9;--senate-q3:#c37c8e;--senate-q4:#855378;--senate-q5:#413062;
  --error-bg:#fbeeea;--error-ink:#8a2f22;--error-line:#e3bfb4;

  /* Dark photo band and footer */
  --band-rgb:12 28 33;--band-bg:#1a2a2e;--on-dark:#e8eff1;--on-dark-muted:#c4d0d3;
  --on-dark-line:rgb(255 255 255 / .25);--on-dark-control:rgb(255 255 255 / .75);

  /* Type scale */
  --fs-xs:14px;--fs-sm:14px;--fs-base:16px;--fs-lead:17px;--fs-md:18px;--fs-lg:20px;--fs-xl:24px;--fs-num:32px;
  --fs-h2:clamp(22px,2.2vw,28px);--fs-h1:clamp(30px,3.4vw,40px);--fs-hero:clamp(32px,4.2vw,50px);

  /* Shape: flat panels with hairline borders and small corners. Only what floats over the page, the agent's panel,
     its button and the print dialog, casts a shadow. Switches and the bar's links stay round. */
  --r-sm:4px;--r-ctl:6px;--r-card:6px;--r-bubble:0px;--r-pill:999px;--control-h:48px;--letterhead-w:0px;
  --shadow-sm:none;--shadow-md:none;
  --shadow-lg:0 10px 28px rgb(23 35 38 / .2),0 2px 6px rgb(23 35 38 / .1);

  /* The light tint behind the agent's title, by chamber. */
  --house-tint:#eef5f7;--senate-tint:#f3f0f9;

  /* Site header: its height, and how much of it stays on screen as the page scrolls. The header rules set --stick. */
  --header-h:64px;--stick:0px;

  /* Spacing: one scale for every gap, padding and margin between blocks. Sections, cards and the space under a title
     all come from it, so every page keeps the same rhythm. */
  --s-1:4px;--s-2:8px;--s-3:12px;--s-4:16px;--s-5:24px;--s-6:32px;--s-7:48px;--s-8:64px;
  --gutter:clamp(var(--s-4),3vw,var(--s-6));--card-pad:clamp(var(--s-4),2.4vw,var(--s-5));--section-y:clamp(var(--s-6),4.5vw,var(--s-7));
  --head-gap:var(--s-4);--block-gap:var(--s-5);--measure:46rem;

  /* A district's page on wide screens. --header-h is the site header's height and --stick how much of it stays on screen
     as the page scrolls (none while the header scrolls away), so the chat beside the profile sticks just under it. */
  --header-h:64px;--stick:0px;--chat-w:clamp(30rem,36vw,32.5rem);--district-top:16px;

  /* Printed district summary: one US Letter page */
  --pt-xs:7.5pt;--pt-sm:8.5pt;--pt-base:9.5pt;--pt-md:11pt;--pt-title:20pt;--pt-gap:8pt;

  font-family:var(--sans);color:var(--ink);background:var(--bg);font-synthesis:none;line-height:1.55
}
*{box-sizing:border-box}
/* No smooth scrolling for the whole page: the band's button asks for it itself, and every other jump lands at once. */
html{scroll-behavior:auto}
body{margin:0;background:var(--page);font-size:var(--fs-base);overflow-wrap:break-word}
a{color:var(--accent);text-underline-offset:3px}
button,input,textarea,select{font:inherit}
button{cursor:pointer}
button:disabled,button[aria-disabled=true]{opacity:.62;cursor:wait}
:focus-visible{outline:3px solid var(--accent);outline-offset:3px}
[hidden]{display:none!important}
h1,h2,h3{text-wrap:balance;letter-spacing:-.01em;font-weight:700}
p,li{text-wrap:pretty}
h2{font-size:var(--fs-h2);line-height:1.2;margin:0 0 12px}
h3{font-size:var(--fs-lg);line-height:1.3;margin:0 0 8px}
.wrap{max-width:1440px;margin:0 auto;padding:0 var(--gutter)}
.visually-hidden{position:absolute;width:1px;height:1px;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
.muted{color:var(--muted)}
.skip{position:absolute;top:-100px;left:12px;background:#fff;color:var(--ink);padding:10px;border-radius:var(--r-ctl);z-index:40}
.skip:focus{top:12px}
/* Links that leave the site get a drawn arrow, so it looks the same on every system. */
a.ext::after{content:"";display:inline-block;width:.5em;height:.5em;margin-left:.35em;vertical-align:.12em;border-top:.13em solid currentColor;border-right:.13em solid currentColor;background:linear-gradient(to bottom right,transparent 42%,currentColor 42%,currentColor 58%,transparent 58%)}

/* Header: the same on every page (tests/agent/test_web_pages.py checks this): the wordmark, which leads home, and four
   tabs: Districts (home, the same as the wordmark), Compare, Rankings, and Data & methods. A solid bar in dark House
   teal on every page, a Senate district's too, with white text; the tab you are on is bold with a thick gold bar
   under it. When the screen is tall enough it stays at the top as the page scrolls: all of it on wide screens, and
   only its row of tabs on phones. --stick is how much of it stays, so whatever the page scrolls to stops below it. */
.site-header{position:relative;z-index:30;height:var(--header-h);padding:0 var(--gutter);display:flex;align-items:center;justify-content:space-between;gap:var(--s-5);background:var(--letterhead);color:#fff}
:root{--chamber-land:var(--house-land)}
body[data-chamber=senate]{--chamber:var(--senate);--chamber-land:var(--senate-land)}
/* A Senate district's page is purple throughout under the teal header: its links, the tinted district column, the
   outreach note, the buttons that open and explain, and the focus outline. */
html[data-page=district] body[data-chamber=senate] .stage{--accent:var(--senate);--accent-dark:var(--senate-dark);--accent-soft:var(--senate-soft);--accent-soft-hover:var(--senate-soft-hover)}
.site-header :focus-visible{outline-color:#fff}
.brand{display:inline-flex;align-items:center;gap:10px;color:#fff;text-decoration:none;white-space:nowrap;border-radius:var(--r-sm)}
.brand-logo{display:block;flex:none;width:38px;height:38px;padding:3px;border-radius:var(--r-ctl);background:#fff}
.brand-text{display:inline-flex;align-items:baseline;gap:12px}
.brand strong{font-family:var(--display);font-stretch:125%;font-size:var(--fs-lg);font-weight:800;letter-spacing:.12em}
.brand-sub{font-size:var(--fs-sm);color:var(--on-dark-muted)}
.site-header nav{align-self:stretch;font-size:var(--fs-base);font-weight:600}
.nav-links{display:flex;align-items:stretch;height:100%;gap:var(--s-1);margin:0;padding:0;list-style:none}
/* Block, not flex, so the space before a label's longer part stays. As tall as the bar, so the current tab's white
   bar sits on its bottom edge. */
.nav-links a{display:block;height:100%;padding:20px 14px;line-height:24px;color:var(--on-dark);text-decoration:none;white-space:nowrap}
/* The page you are on: bold and white, with a thick gold bar under it (6.1:1 on the bar). Screen readers hear
   "current page". */
.nav-links a[aria-current=page]{color:#fff;font-weight:800;box-shadow:inset 0 -4px 0 var(--gold)}
footer a[aria-current=page]{font-weight:700;text-decoration-thickness:3px}
@media(min-height:560px){
  :root{--stick:var(--header-h)}
  .site-header{position:sticky;top:0}
}
@media(max-width:1023px){.brand-sub{display:none}}
/* Phones: the logo on one row, and the tabs spread across the next in one row. Only the tabs stay as the page
   scrolls. */
@media(max-width:760px){
  .site-header{height:auto;flex-wrap:wrap;gap:0}
  .brand{height:52px}
  .site-header nav{flex:1 0 100%;border-top:1px solid rgb(255 255 255 / .2)}
  /* One row; with much wider text spacing, a second row rather than a page that scrolls sideways. */
  .nav-links{flex-wrap:wrap;justify-content:space-around;gap:0 var(--s-1)}
  .nav-links a{padding:10px 10px}
}
@media(max-width:760px) and (min-height:560px){:root{--stick:46px}.site-header{top:-52px}}
/* Shorter labels where the full ones do not fit: Data. */
@media(max-width:560px){.nav-long{display:none}}
@media(max-width:359px){.site-header nav{font-size:var(--fs-sm)}.nav-links a{padding-left:6px;padding-right:6px}}
@media print{.site-header{position:static}}

/* index.html is three views, and page.js marks which one the address shows before the page paints: Find (home), a
   district's page, or Compare. Each shows only its own parts. */
html[data-page=district] .hero,html[data-page=compare] .hero-find,html:not([data-page=compare]) .hero-compare,
html:is([data-page=district],[data-page=compare]) :is(.ask-teaser,.counts,.stage-find,#district-map .map-controls,#zip-status),
html[data-page=district] .stage-bar>.chamber-switch,html[data-page=compare]:not(.cmp-choosing) .stage-bar>.chamber-switch,
html:is([data-page=home],[data-page=compare]) :is(.district-bar,.district-head,.profile),
html:is([data-page=home],[data-page=district]) :is(.compare-head,.compare-view),
html[data-page=compare] .stage-map,
html[data-page=home] .share-bar{display:none!important}

/* The band across the top of every page: the page's title and a short lede over a faint drawing of the islands, short
   enough that what the page is for shows under it. */
.hero{position:relative;overflow:hidden;background:linear-gradient(115deg,var(--house) 0%,var(--house) 35%,var(--band-end) 100%);color:#fff}
/* The drawing of the islands, in white, faint over the teal. */
.hero-art{position:absolute;top:-2%;right:3%;height:104%;width:min(60%,54rem);object-fit:contain;object-position:right center;pointer-events:none;filter:brightness(0) invert(1);opacity:.4}
.hero-inner{position:relative;padding-top:var(--s-6);padding-bottom:var(--s-6)}
.hero h1{max-width:18ch;margin:0 0 var(--s-3);font-size:var(--fs-hero);line-height:1.05;letter-spacing:-.025em;color:#fff}
/* A short gold rule over the title. */
.hero h1::before{content:"";display:block;width:56px;height:5px;margin:0 0 var(--s-4);border-radius:3px;background:var(--gold)}
.hero h1:focus{outline:none}.hero h1:focus-visible{outline:3px solid var(--accent);outline-offset:3px}
.hero .lede{max-width:40rem;margin:0 0 var(--s-5);color:var(--on-dark);font-size:var(--fs-md)}
.hero a{color:#fff}.hero :focus-visible{outline-color:#fff}
.hero .lede:last-child{margin-bottom:0}
.lede{font-size:var(--fs-md);line-height:1.6;max-width:var(--measure);margin:0 0 var(--block-gap);color:var(--muted)}

/* The stage: each view's working parts on a grid. */
.stage{max-width:1440px;margin:0 auto;padding:var(--s-5) var(--gutter) var(--section-y);display:grid;gap:var(--s-5);align-items:start;scroll-margin-top:var(--stick)}
.stage>*{min-width:0}
.stage-bar{grid-area:bar;display:flex;flex-wrap:wrap;align-items:center;gap:var(--s-3) var(--s-4);min-height:44px}
/* Find: the map on the left, with the House or Senate switch at the top of its card, and the search and numbers in a
   narrower card on the right. */
html[data-page=home] .stage{grid-template-columns:minmax(0,1.5fr) minmax(0,1fr);grid-template-areas:"map find"}
html[data-page=home] .stage-bar{display:none}
.stage-map{grid-area:map}
.stage-find{grid-area:find}
.panel,.stage-find,.map-card{background:#fff;border:1px solid var(--line);border-radius:var(--r-card);box-shadow:var(--shadow-sm)}
.stage-find{padding:var(--card-pad)}
.find-title{margin:0 0 var(--s-4);font-size:var(--fs-lg)}
.find-title:focus{outline:none}.find-title:focus-visible{outline:3px solid var(--accent);outline-offset:3px}
.find .status:empty{margin:0;min-height:0}
#find-matches:not(:empty){margin-top:var(--s-3);padding-top:var(--s-3);border-top:1px solid var(--line)}
/* The / key's hint at the end of the search box, for mouse and keyboard users, until the box is in use. */
.key-hint{position:absolute;top:50%;right:12px;transform:translateY(-50%);min-width:24px;padding:1px 7px;border:1px solid var(--control);border-radius:var(--r-sm);background:var(--subtle);color:var(--muted);font:600 var(--fs-sm)/1.4 var(--sans);text-align:center;pointer-events:none}
.combo:focus-within .key-hint,#find-place:not(:placeholder-shown)~.key-hint{display:none}
@media(pointer:fine){#find-place{padding-right:44px}}
@media(pointer:coarse){.key-hint{display:none}}
/* Under the Find map, the way to the map colored by a measure. */
.map-more{margin:var(--s-3) 0 0;font-size:var(--fs-sm);font-weight:600}
html:not([data-page=home]) .map-more{display:none}

/* The House or Senate switch: two buttons in one pill, the chosen one filled in its chamber's color. */
.chamber-switch{display:inline-flex;padding:4px;gap:4px;background:#fff;border:1px solid var(--line);border-radius:var(--r-pill);box-shadow:var(--shadow-sm)}
.chamber-switch button{min-width:7.5rem;min-height:40px;padding:6px 20px;border:0;border-radius:var(--r-pill);background:transparent;font-size:var(--fs-base);font-weight:700}
.chamber-switch [data-chamber=house]{color:var(--house-dark)}.chamber-switch [data-chamber=senate]{color:var(--senate-dark)}
.chamber-switch [data-chamber=house][aria-pressed=true]{background:var(--house);color:#fff}
.chamber-switch [data-chamber=senate][aria-pressed=true]{background:var(--senate);color:#fff}
.chamber-switch button:focus-visible{outline-offset:1px}

/* Every district by number: a row of numbers for each island, for the chamber the switch shows, each number a link to
   its page. */
.seat-index{margin-top:var(--s-5)}
[data-seats=house] .seat-chamber.senate,[data-seats=senate] .seat-chamber.house{display:none}
.seat-title{margin:0 0 var(--s-3);font-size:var(--fs-base);font-weight:700;color:var(--ink)}
.seat-chamber-title{margin:0 0 var(--s-2);font-family:var(--display);font-size:var(--fs-sm);font-weight:700;color:var(--house)}
.seat-chamber.senate .seat-chamber-title{color:var(--senate)}
.seat-row{display:grid;grid-template-columns:6.75rem minmax(0,1fr);gap:4px var(--s-3);align-items:start}
.seat-row+.seat-row{margin-top:8px}
.seat-island{padding-top:6px;font-size:var(--fs-xs);line-height:1.3;color:var(--muted)}
.seat-nums{display:flex;flex-wrap:wrap;gap:6px}
.seat-nums a{display:grid;place-items:center;min-width:36px;height:32px;padding:0 4px;border:1px solid var(--house-soft-hover);border-radius:var(--r-sm);background:var(--house-soft);color:var(--house-dark);font-family:var(--display);font-size:var(--fs-sm);font-weight:700;font-variant-numeric:tabular-nums;text-decoration:none}
.seat-chamber.senate .seat-nums a{border-color:var(--senate-soft-hover);background:var(--senate-soft);color:var(--senate-dark)}
.seat-nums a:focus-visible{outline-offset:1px}

/* The question box under Find: it asks in the agent's panel. Starter questions by topic, in columns. */
.ask-teaser{padding:0 0 var(--section-y)}
/* A warm panel with a gold edge, so asking stands apart from finding. Text and links on it are 8:1 or more. */
.ask-teaser .ask-inner{padding:var(--card-pad);background:var(--gold-soft);border-color:var(--gold-line);border-left:6px solid var(--gold)}
.ask-teaser .topic-title{border-bottom-color:var(--gold-line)}
.ask-teaser .topic li+li .starter{border-top-color:var(--gold-line)}
.ask-teaser h2{margin:0 0 var(--s-3)}
.home-ask{max-width:52rem}
.home-ask label{font-size:var(--fs-base);font-weight:400;color:var(--muted)}
.ask-teaser .note{max-width:var(--measure);margin:var(--s-4) 0 0;font-size:var(--fs-xs);color:var(--muted)}
.topic-starters{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:var(--s-4) var(--s-5);margin-top:var(--s-5)}
.topic{min-width:0}
.topic-title{margin:0 0 4px;padding-bottom:4px;border-bottom:1px solid var(--line);font-size:var(--fs-sm);font-weight:700;color:var(--ink)}
.topic ul{margin:0;padding:0;list-style:none}
.topic .starter{display:block;width:100%;padding:6px 0;border:0;background:none;color:var(--accent-dark);font-size:var(--fs-sm);font-weight:600;line-height:1.4;text-align:left;text-decoration:underline;text-decoration-thickness:1px;text-underline-offset:3px;text-wrap:pretty}
.topic li+li .starter{border-top:1px solid var(--line)}

/* Whatever the page scrolls to stops below the part of the header that stays on screen: a section, a link's target, a
   new chat message, and whatever the keyboard moves focus to, so Shift+Tab back up the page never hides it. */
section,:target,#log>*{scroll-margin-top:calc(var(--stick) + 16px)}
a[href],button,input,select,textarea,summary,[tabindex]{scroll-margin-top:calc(var(--stick) + 8px)}

/* Sections and the blocks every page shares: white panels on the gray page, one border, one corner radius and one
   shadow; buttons share one look. */
.counts{padding:var(--s-5) 0}
.section-title{font-size:var(--fs-h2);margin:0 0 var(--head-gap)}
/* A section title with a link to more of the same on another page, at its right. */
.section-title-row{display:flex;flex-wrap:wrap;align-items:baseline;justify-content:space-between;gap:var(--s-2) var(--s-5);margin:0 0 var(--head-gap)}
.section-title-row .section-title{margin:0}
.section-more{font-weight:600}
.section-head{max-width:var(--measure);margin:0 0 var(--head-gap)}
.section-head h2{margin:0 0 var(--s-3)}
.section-head p{margin:0;color:var(--muted);font-size:var(--fs-lead);line-height:1.6}
.card{background:#fff;border:1px solid var(--line);border-radius:var(--r-card);box-shadow:var(--shadow-sm);min-width:0}
/* The main buttons, the ones that find, ask and print, are gold with ink text on every page, so what to press stands
   apart from the teal of links and figures. */
.button{display:inline-flex;align-items:center;justify-content:center;gap:var(--s-2);min-height:var(--control-h);padding:0 18px;background:var(--gold);color:var(--ink);border:1px solid var(--gold-edge);border-radius:var(--r-ctl);font-weight:700;text-decoration:none;white-space:nowrap}
.button:disabled{opacity:.45;cursor:not-allowed}
/* Rankings, Data and the statement: the band, then the page's content. */
.page{padding:0 0 var(--s-8);background:transparent}
.page-body{padding-top:var(--s-6)}

/* Forms. Text fields, selects, and buttons share one height. */
label,.small-label{display:block;color:var(--ink);font-weight:600;font-size:var(--fs-sm);margin-bottom:8px}
.small-label{color:var(--muted);font-weight:400;margin:0}
.inputrow,.question-row{display:flex;gap:8px}
/* Search suggestions: a list under the search box that follows typing (an ARIA combobox) */
.combo{position:relative;flex:1;min-width:0}
.suggestions{position:absolute;z-index:20;top:calc(100% + 4px);left:0;right:0;margin:0;padding:4px;list-style:none;background:#fff;border:1px solid var(--control);border-radius:var(--r-ctl);box-shadow:0 8px 24px rgb(0 0 0 / .18);max-height:min(24rem,60vh);overflow-y:auto}
.suggestions li{display:flex;flex-wrap:wrap;justify-content:space-between;align-items:baseline;gap:2px 12px;padding:10px 12px;border-radius:var(--r-sm);color:var(--ink);cursor:pointer}
.suggestion-label{font-weight:600}
.suggestion-detail{font-size:var(--fs-xs);color:var(--muted)}
.suggestions li[aria-selected=true]{background:var(--accent-soft);outline:2px solid var(--accent);outline-offset:-2px}
@media(hover:hover){.suggestions li:hover{background:var(--surface)}.suggestions li[aria-selected=true]:hover{background:var(--accent-soft)}}
input,textarea,select{width:100%;min-width:0;border:1px solid var(--control);border-radius:var(--r-ctl);background:#fff;color:var(--ink);outline:none}
input,select{height:var(--control-h);padding:0 14px}
textarea{padding:11px 14px;line-height:24px}
input::placeholder,textarea::placeholder{color:var(--placeholder)}
input:focus,textarea:focus,select:focus{border-color:var(--accent)}
input:focus-visible,textarea:focus-visible,select:focus-visible{outline-offset:1px}
.inputrow button,.question-row button{flex:none;min-height:var(--control-h);padding:0 18px;background:var(--gold);color:var(--ink);border:1px solid var(--gold-edge);border-radius:var(--r-ctl);font-weight:700}
.help{font-size:var(--fs-sm);color:var(--muted);margin:12px 0 0}
.help+.help{margin-top:4px}
.status{font-size:var(--fs-sm);font-weight:600;color:var(--accent);min-height:1.5em}
.status.is-error{padding:8px 12px;border:1px solid var(--error-line);border-radius:var(--r-sm);background:var(--error-bg);color:var(--error-ink)}
.textbutton{padding:8px 0;border:0;background:transparent;color:var(--accent);font-weight:600;text-decoration:underline;text-underline-offset:3px}

/* District search results: a House column and a Senate column per place */
.chips{display:grid;grid-template-columns:repeat(auto-fill,minmax(9rem,1fr));gap:8px}
.match{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:9px 12px;background:#fff;border:1px solid var(--control);border-radius:var(--r-ctl);color:var(--ink);font-size:var(--fs-sm);font-weight:600;text-align:left;white-space:nowrap}
.match .share{font-weight:400;color:var(--muted)}
.match-member{display:block;font-size:var(--fs-xs);font-weight:400;line-height:1.3;color:var(--muted);white-space:normal;overflow-wrap:anywhere}
.match.house{background:var(--house-soft);border-color:var(--house)}.match.senate{background:var(--senate-soft);border-color:var(--senate)}
.match-group+.match-group{margin-top:16px}
.match-title{margin:0 0 8px;color:var(--muted);font-size:var(--fs-xs);font-weight:600}
.match-title:has(+.match-note){margin-bottom:2px}
.match-note{margin:0 0 8px;color:var(--muted);font-size:var(--fs-xs)}
.match-summary{margin:0 0 8px;font-size:var(--fs-sm);color:var(--ink)}.match-summary a{font-weight:600}
.match-all{border-top:0;margin-top:0;padding-top:0}
.match-all summary{padding:8px 0;font-size:var(--fs-sm);font-weight:600;color:var(--accent);cursor:pointer}
.match-all[open] summary{margin-bottom:8px}
.chamber-cols{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px 16px}
.chamber-title{margin:0 0 8px;padding-bottom:4px;font-size:var(--fs-sm);font-weight:700;color:var(--ink);border-bottom:3px solid var(--house)}.chamber-title.senate{border-bottom-color:var(--senate)}
.chamber-col .chips{grid-template-columns:1fr}
.map-nudge{margin:16px 0 0;font-size:var(--fs-sm);color:var(--muted)}.map-nudge a{font-weight:600}.map-nudge:first-child{margin-top:0}
form:has(.map-nudge) .help:not(.privacy){display:none}

/* Ask: the agent, in a white panel. Beside a district or a comparison on wide screens it fills the right third and
   stays in view as the page scrolls; elsewhere it is a panel that the round button opens (see the end of this block).
   It reads like a text conversation: each question in a bubble at the right in the chamber's color, each answer in a
   gray bubble at the left with its text, figures and sources, and three dots while an answer is on its way. */
.chat-dock[data-chamber=senate]{--accent:var(--senate);--accent-dark:var(--senate-dark);--accent-soft:var(--senate-soft);--accent-soft-hover:var(--senate-soft-hover)}
#log [data-chamber=house]{--accent:var(--house);--accent-dark:var(--house-dark);--accent-soft:var(--house-soft)}#log [data-chamber=senate]{--accent:var(--senate);--accent-dark:var(--senate-dark);--accent-soft:var(--senate-soft)}
.chat-dock{grid-area:chat;min-width:0}
.chat-card{display:flex;flex-direction:column;min-width:0;height:100%;background:#fff;border:1px solid var(--line);border-radius:var(--r-card);box-shadow:var(--shadow-md);overflow:hidden}
.chat-card .inputrow button,.chat-card .question-row button{min-width:7rem}
.chat-head{flex:none;display:flex;align-items:center;justify-content:space-between;gap:var(--s-3);padding:var(--s-4) var(--card-pad) var(--s-2);border-bottom:1px solid var(--line)}
.chat-panel-title{margin:0;font-size:var(--fs-lg);line-height:1.3}
.chat-panel-title:focus{outline:none}.chat-panel-title:focus-visible{outline:3px solid var(--accent);outline-offset:3px}
.chat-min{flex:none;display:none;place-items:center;width:40px;height:40px;padding:0;border:1px solid var(--line);border-radius:50%;background:#fff;color:var(--ink)}
.chat-min .icon{width:20px;height:20px}
#messages{flex:1;min-height:0;position:relative;padding:var(--s-3) var(--card-pad) 8px}
/* Questions to try by topic, in the panel until the first question, when no district is chosen. */
.chat-starters{margin:var(--s-2) 0 var(--s-3)}
.chat-starters .topic-starters{grid-template-columns:minmax(0,1fr);gap:var(--s-3);margin-top:var(--s-2)}
.chat-card.started .chat-starters{display:none}
.welcome{width:fit-content;max-width:90%;margin:0 0 var(--s-3);padding:10px 14px;border-radius:18px 18px 18px 4px;background:var(--surface);font-size:var(--fs-sm);line-height:1.5;color:var(--ink)}
/* The question box as a message box: rounded, with a rounded button to send. */
#question-form textarea{border-radius:22px;padding:11px 16px}
#question-form #send{border-radius:22px}
.bot-msg,article,.pending,.error{margin:0 0 16px}
.bot-msg{max-width:min(100%,46rem)}
.bot-msg p{margin:0}
.sender{font-size:var(--fs-sm);font-weight:700;margin:0 0 4px}
.user{width:fit-content;max-width:85%;margin:20px 0 10px auto;scroll-margin-top:16px;padding:10px 14px;border-radius:18px 18px 4px 18px;background:var(--accent);color:#fff;font-weight:600;line-height:1.45;white-space:pre-wrap;overflow-wrap:anywhere}
#log>.user:first-child{margin-top:4px}
article{max-width:min(100%,46rem);padding:14px 16px;border-radius:18px 18px 18px 4px;background:var(--surface);font-size:var(--fs-base);line-height:1.5;white-space:pre-wrap;overflow-wrap:anywhere}
#messages article>:last-child{margin-bottom:0}
#messages article>p{white-space:pre-line}
article h3{display:flex;flex-wrap:wrap;align-items:baseline;gap:2px 0;font-size:var(--fs-sm);font-weight:700;letter-spacing:0;margin:0 0 8px}
.answer-for{margin-left:8px;font-size:var(--fs-sm);font-weight:400;color:var(--muted)}
/* The answer heading, with a badge that says whether the assistant or the basic lookup answered. */
.answer-head{display:flex;flex-wrap:wrap;justify-content:space-between;align-items:baseline;gap:4px 12px;margin:0 0 8px;white-space:normal}
article .answer-head h3{margin:0}
.mode-badge{margin:0;padding:1px 8px;border:1px solid var(--line);border-radius:var(--r-pill);background:#fff;color:var(--muted);font-size:var(--fs-xs);font-weight:600;line-height:1.5;white-space:nowrap}
/* Next questions under the newest answer, each written out in full. */
.followups{display:grid;gap:0;margin-top:20px;white-space:normal}
.followups-title{margin:0 0 4px;font-size:var(--fs-sm);font-weight:700;line-height:1.4;color:var(--ink)}
.switch-offer{margin:16px 0 0}
.followup{padding:8px 0;border:0;border-top:1px solid var(--line);border-radius:0;background:none;color:var(--accent-dark);font-size:var(--fs-sm);font-weight:600;line-height:1.4;text-align:left;text-decoration:underline;text-decoration-thickness:1px;text-underline-offset:3px;text-wrap:pretty}
.switch-offer .followup{padding:8px 14px;border:1px solid var(--accent);text-decoration:none}
details{white-space:normal;border-top:1px solid var(--line);margin-top:24px;padding-top:16px}
summary{font-weight:600;color:var(--accent);cursor:pointer}
.fact{border-top:1px solid var(--line);padding:16px 0}
.fact:first-of-type{margin-top:12px}
.fact b{display:block}
.fact p{font-size:var(--fs-lg);margin:4px 0}
.fact small,.fact a,.fact span{display:block;margin-top:4px;color:var(--muted);font-size:var(--fs-sm)}
.fact a{color:var(--accent)}
.switch{display:flex;align-items:center;gap:16px;margin:24px 0;color:var(--muted);font-size:var(--fs-xs);font-weight:600}
.switch span{text-align:center;text-wrap:balance}.switch:before,.switch:after{content:"";flex:1 0 20px;height:1px;background:var(--line)}
.pending{display:flex;flex-wrap:wrap;align-items:center;gap:8px 12px;width:fit-content;max-width:min(100%,46rem);padding:10px 14px;border-radius:18px 18px 18px 4px;background:var(--surface);color:var(--muted);font-size:var(--fs-sm);font-weight:600}
.pending p{flex:1 1 12rem;margin:0}
.elapsed{font-weight:400;font-variant-numeric:tabular-nums;white-space:nowrap}
.pending .cancel{padding:4px 14px;border:1px solid var(--control);border-radius:var(--r-ctl);background:#fff;color:var(--ink);font-size:var(--fs-sm);font-weight:600;line-height:1.4}
/* Three dots that rise in turn while an answer is on its way, as in a text conversation. */
.typing{flex:none;display:inline-flex;gap:4px;padding:4px 0}
.typing i{width:7px;height:7px;border-radius:50%;background:var(--control);animation:typing 1.2s ease-in-out infinite}
.typing i:nth-child(2){animation-delay:.15s}.typing i:nth-child(3){animation-delay:.3s}
@keyframes typing{0%,60%,100%{transform:none;opacity:.5}30%{transform:translateY(-4px);opacity:1}}
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}.typing i{animation:none}#map .district{transition:none}}
#question-form{padding:16px var(--card-pad) 0;border-top:1px solid var(--line)}
.question-row{align-items:flex-end}
.question-row textarea{display:block;resize:none;overflow-y:hidden;min-height:var(--control-h);max-height:192px}
/* Below the question box the card's own padding applies, so that gap matches the sides. A message adds a line above it. */
#chat-status{margin:0;padding:8px var(--card-pad) var(--card-pad);min-height:0}
#chat-status:empty{padding-top:0}
.error{width:fit-content;max-width:min(100%,46rem);padding:12px 16px;border-radius:18px 18px 18px 4px;background:var(--error-bg);color:var(--error-ink);border:1px solid var(--error-line)}
.error p{margin:0}
.retry{margin-top:10px;padding:6px 18px;border:1px solid var(--error-ink);border-radius:var(--r-ctl);background:#fff;color:var(--error-ink);font-size:var(--fs-sm);font-weight:600;line-height:1.4}
/* Two lines under the question box say where questions go; Privacy opens the rest under them. */
.chat-notes{margin:6px 0 0;font-size:var(--fs-xs);line-height:1.5;color:var(--muted)}
.chat-notes p{margin:0}
.privacy-toggle{display:inline-flex;align-items:center;gap:2px;padding:0;border:0;background:transparent;color:var(--accent);font-size:inherit;font-weight:600;line-height:inherit;text-decoration:underline;text-underline-offset:2px}
.privacy-toggle:after,.more-questions:after{content:"";width:.4em;height:.4em;margin:0 .2em 0 .35em;border:solid currentColor;border-width:0 1.5px 1.5px 0;transform:translateY(-.15em) rotate(45deg)}
.privacy-toggle[aria-expanded=true]:after,.more-questions[aria-expanded=true]:after{transform:translateY(.1em) rotate(-135deg)}
.privacy-more{margin-top:6px;padding:8px 12px;border-left:3px solid var(--line);color:var(--ink)}
.privacy-more p+p{margin-top:4px}
.privacy-more a{font-weight:600}
.examples{display:grid;gap:0}
.examples button{border:0;border-top:1px solid var(--line);border-radius:0;background:none;text-align:left;padding:8px 0;color:var(--accent-dark);font-size:var(--fs-sm);font-weight:600;line-height:1.4;text-decoration:underline;text-decoration-thickness:1px;text-underline-offset:3px;text-wrap:pretty}
.examples .off{display:none}
/* In the agent's panel, the questions to try and the next questions under an answer are chips: each a tinted button in
   the chamber's color, its dark text 6:1 or more on the tint, darker under the mouse. */
.chat-card :is(.examples button,.chat-starters .starter),#log .followups .followup{width:fit-content;max-width:100%;padding:7px 12px;border:1px solid var(--accent-soft-hover);border-radius:var(--r-ctl);background:var(--accent-soft);color:var(--accent-dark);text-decoration:none}
.chat-card .examples,#log .followups{display:flex;flex-direction:column;align-items:flex-start;gap:var(--s-2)}
.chat-card .examples{margin-top:var(--s-1)}
.chat-card .chat-starters .topic li+li{margin-top:var(--s-2)}
.chat-card .chat-starters .topic-title{margin-bottom:var(--s-2)}
/* A district's page: the bar with the way back to the search and on to Compare, and the share actions; the map, zoomed
   to the district, in the left third beside its name and where it is; its profile under them across two thirds; the
   agent in the right third. The profile is numbered as a printed brief is: 1 At a glance, with five headline figures
   that each say how they compare, then the sections, each a panel that opens and shuts. */
.bar-link{display:inline-flex;align-items:center;gap:8px;min-height:44px;padding:8px 16px;border:1px solid var(--line);border-radius:var(--r-pill);background:#fff;color:var(--ink);font-weight:700;text-decoration:none;box-shadow:var(--shadow-sm);white-space:nowrap}
.bar-link .icon{width:18px;height:18px;color:var(--accent)}
.bar-link.back{padding-left:12px}
.district-bar{display:flex;flex-wrap:wrap;gap:var(--s-2) var(--s-3)}
.compare-head{display:flex;flex-wrap:wrap;align-items:center;gap:var(--s-2) var(--s-4)}
.share-bar{display:flex;flex-wrap:wrap;align-items:center;gap:var(--s-1) var(--s-2);margin-left:auto}
.share-bar .action{display:inline-flex;align-items:center;gap:6px;min-height:40px;padding:6px 12px;border:0;border-radius:var(--r-pill);background:transparent;color:var(--accent-dark);font-size:var(--fs-sm);font-weight:700;line-height:1.3;text-decoration:none}
.share-bar .action .icon{width:18px;height:18px}
.share-status{flex-basis:100%;display:flex;align-items:center;justify-content:flex-end;gap:6px;margin:0;font-size:var(--fs-sm);font-weight:600;color:var(--accent-dark);overflow-wrap:anywhere}.share-status:empty{display:none}
.district-head{grid-area:head;min-width:0;align-self:stretch;display:flex;flex-direction:column;justify-content:center;padding:var(--card-pad);background:#fff;border:1px solid var(--line);border-radius:var(--r-card);box-shadow:var(--shadow-sm);scroll-margin-top:calc(var(--stick) + 16px)}
.district-id{min-width:0}
/* The masthead: the chamber in spaced capitals over the district's number, large and condensed in the chamber color. */
.district-head h1,.cmp-name{margin:0 0 var(--s-2);line-height:1;letter-spacing:0}
.district-head h1:focus{outline:none}.district-head h1:focus-visible{outline:3px solid var(--accent);outline-offset:3px}
.mast-chamber{display:block;font-size:var(--fs-base);font-weight:700;color:var(--chamber)}
.mast-number{display:block;margin:2px 0 -.06em -.04em;font-family:var(--display);font-stretch:68%;font-size:clamp(64px,6vw,96px);font-weight:800;line-height:.86;letter-spacing:-.02em;color:var(--chamber);font-variant-numeric:lining-nums}
.district-facts{min-width:0}
.district-where{margin:0;font-size:var(--fs-base);font-weight:600;line-height:1.45}
.district-meta{margin:2px 0 0;font-size:var(--fs-sm);line-height:1.5;color:var(--muted)}
/* Shown only while it has focus, as the page's own skip link is. */
.skip-ask:not(:focus){position:absolute;width:1px;height:1px;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
.skip-ask:focus{display:inline-block;margin-top:10px;padding:6px 12px;background:#fff;border-radius:var(--r-ctl);font-weight:600}
/* Where the agent is a panel, its round button is the way to it. */
html.chat-floats .skip-ask{display:none}
html[data-page=district] .stage-map{grid-area:map}
#profile{grid-area:prof}
.profile{min-width:0;background:transparent;padding:0}
/* The district's legislator as listed, under where the district is. Where and when the name was read opens beneath it. */
.profile-member{display:flex;flex-wrap:wrap;align-items:baseline;gap:0 14px;margin:4px 0 0}
.profile-member-name{margin:0;font-size:var(--fs-sm);line-height:1.5}
.profile-member-title{font-weight:600}
details.profile-member-about{margin:0;padding:0;border:0;font-size:var(--fs-xs);line-height:1.5;color:var(--muted)}
.profile-member-about[open]{flex-basis:100%}
.profile-member-about summary{padding:4px 0}
.profile-member-note{margin:0 0 4px;max-width:var(--measure)}
.member-links{margin:0 0 12px;font-size:var(--fs-sm);color:var(--muted);line-height:1.5}
.member-links p{margin:0 0 4px}
/* The Commission's official description and permanent residents, each with its report page, in a section of its own. */
.profile-plan{max-width:var(--measure);padding-bottom:4px}
.profile-plan p{margin:0 0 8px;font-size:var(--fs-sm);line-height:1.5}
.profile-plan-label{font-weight:600}
.profile-plan-cite,.profile-plan .profile-plan-note{color:var(--muted)}
.profile-status{margin:var(--s-4) 0;font-size:var(--fs-sm);color:var(--muted)}
/* 1 At a glance: the section's number and title over an ink rule, with the share actions at its right, then the five
   headline figures, parted by thin rules. Each figure reads label, figure, margin, then how it compares. */
.profile-glance{margin:var(--s-4) 0 0;scroll-margin-top:calc(var(--stick) + 12px)}
.glance-head{display:flex;flex-wrap:wrap;align-items:baseline;justify-content:space-between;gap:var(--s-1) var(--s-5);padding-bottom:6px;border-bottom:2px solid var(--ink)}
.glance-title{display:flex;align-items:center;margin:0;font-size:var(--fs-lg);font-weight:750;letter-spacing:-.01em}
/* Each section's number in a round badge of the chamber's color, white on it (8:1 or more). */
.sec-num{flex:none;display:inline-grid;place-items:center;width:1.8em;height:1.8em;margin-right:12px;border-radius:50%;background:var(--chamber);color:#fff;font-family:var(--display);font-stretch:87%;font-size:.9em;font-weight:800;line-height:1;font-variant-numeric:lining-nums}
.profile-stats{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,9rem),1fr));gap:0;margin:0}
.profile-stats>div{display:flex;flex-direction:column;min-width:0;padding:10px var(--s-4) var(--s-3);border-left:1px solid var(--line)}
.profile-stats>div:first-child{padding-left:0;border-left:0}
.profile-stats dd{margin:0;line-height:1.2;font-variant-numeric:tabular-nums}
.profile-stats .num{display:block;font-family:var(--display);font-stretch:87%;font-size:clamp(26px,2.3vw,32px);font-weight:800;line-height:1.1;letter-spacing:-.01em;white-space:nowrap;color:var(--chamber)}
.profile-stats .moe{display:block;margin-top:2px;font-size:var(--fs-xs);color:var(--muted);white-space:nowrap}
.profile-stats dt{margin:0 0 4px;font-size:var(--fs-sm);font-weight:600;line-height:1.35;color:var(--muted)}
.profile-stats .profile-reading{margin-top:6px;font-size:var(--fs-xs);line-height:1.4}
.reading-mark{display:inline-block;width:1em;text-indent:0;text-align:center;color:inherit}
.reading-state{display:block;color:var(--muted)}
/* The strip under a headline figure (see glanceStrip in app.js), at the foot of its column so the four line up: a gray
   line, the district's margin of error as a pale band edged in the chamber's color, its figure a dot in that color, the
   county a tick and the state a diamond in ink, each edged in white where they cross. */
.profile-stats .glance-strip{position:relative;height:22px;margin:auto 6px 0;padding:0}
.profile-stats>div:has(.glance-strip)>.profile-reading{margin-bottom:var(--s-3)}
.glance-strip::before{content:"";position:absolute;top:50%;left:-6px;right:-6px;height:2px;margin-top:-1px;background:var(--line)}
.glance-strip>span,.glance-key i{position:absolute;top:50%}
.gs-band{height:10px;margin-top:-5px;border:1px solid var(--chamber);border-radius:5px;background:var(--chamber-land)}
.gs-here{width:12px;height:12px;margin:-6px 0 0 -6px;border-radius:50%;background:var(--chamber);box-shadow:0 0 0 2px #fff}
.gs-county{width:3px;height:18px;margin:-9px 0 0 -1.5px;border-radius:1px;background:var(--ink);box-shadow:0 0 0 1px #fff}
.gs-state{width:9px;height:9px;margin:-4.5px 0 0 -4.5px;background:var(--ink);transform:rotate(45deg);box-shadow:0 0 0 1.5px #fff}
/* What the marks stand for, once under the four figures. */
.glance-key{display:flex;flex-wrap:wrap;gap:var(--s-1) var(--s-5);margin:var(--s-2) 0 0;padding:var(--s-2) 0 0;border-top:1px solid var(--line);font-size:var(--fs-xs);line-height:1.5;color:var(--muted)}
.glance-key span{display:inline-flex;align-items:center;gap:8px}
.glance-key i{position:relative;top:auto;flex:none;display:inline-block}
.gk-here{width:26px;height:10px;border:1px solid var(--chamber);border-radius:5px;background:var(--chamber-land)}
.gk-here::after{content:"";position:absolute;top:50%;left:50%;width:10px;height:10px;margin:-5px 0 0 -5px;border-radius:50%;background:var(--chamber);box-shadow:0 0 0 2px #fff}
.gk-county{width:3px;height:14px;border-radius:1px;background:var(--ink)}
.gk-state{width:8px;height:8px;margin:0 1px;background:var(--ink);transform:rotate(45deg)}
/* The links stay above the profile as it scrolls. Their measured height leaves room for headings and focus targets. */
.profile-jumps ol{display:flex;flex-wrap:wrap;gap:var(--s-1) var(--s-2);margin:0;padding:0;list-style:none}
.profile-jumps a{display:inline-flex;align-items:center;min-height:32px;padding:4px 6px;border-radius:var(--r-ctl);font-size:var(--fs-sm);font-weight:600;text-decoration:none}
.profile-jumps .sec-title{text-decoration:underline;text-decoration-thickness:1px;text-underline-offset:3px}
.profile-jumps .sec-num{margin-right:6px;font-size:var(--fs-xs)}
.profile-jumps a[aria-current=location]{background:var(--accent-soft);color:var(--accent-dark)}
.profile-jumps a[aria-current=location] .sec-title{text-decoration-thickness:2px}
@media screen and (min-width:761px){
  .profile-jumps{position:sticky;top:var(--stick);z-index:5}
  #profile :is(.profile-glance,.profile-section){scroll-margin-top:calc(var(--stick) + var(--profile-jumps-h,0px) + 12px)}
  #profile :is(.profile-glance,.profile-section) :is(a[href],button,summary){scroll-margin-top:calc(var(--stick) + var(--profile-jumps-h,0px) + 8px)}
}
/* Narrow screens: every section link shows at once, wrapping onto more lines, so Programs and help and Reference are in
   sight with no sideways swipe. Each keeps a full-size target. */
@media(max-width:760px){
  .profile-jumps ol{flex-wrap:wrap;gap:var(--s-1)}
  .profile-jumps a{min-height:44px;white-space:nowrap}
  .profile-jumps a:focus-visible{outline-offset:-3px}
}
.profile-back a{display:inline-block;padding:4px 0;font-size:var(--fs-sm);font-weight:600}
/* The row that closes the profile: where to read about the data, and the way to another district. */
.profile-end{display:flex;flex-wrap:wrap;align-items:baseline;gap:0 18px;margin:var(--block-gap) 0 0;padding-top:8px;border-top:2px solid var(--ink)}
.profile-end-title{margin:0;font-size:var(--fs-sm);font-weight:700;color:var(--ink)}
.profile-end ul{display:flex;flex:1 1 24rem;flex-wrap:wrap;gap:0 18px;margin:0;padding:0;list-style:none}
.profile-end a{display:inline-block;padding:10px 0;font-size:var(--fs-sm);font-weight:600}
/* Each numbered section opens and shuts under its own heading. */
.profile .profile-section{margin:0;padding:0;border-top:0;scroll-margin-top:calc(var(--stick) + 12px)}
.profile-section>summary{display:flex;align-items:center;padding:var(--s-3) 0 6px;border-bottom:2px solid var(--ink);font-size:var(--fs-lg);font-weight:750;letter-spacing:-.01em;color:var(--ink);list-style:none}
.profile-section>summary::-webkit-details-marker,.sources-fold>summary::-webkit-details-marker{display:none}
.profile-section[open]>summary{margin-bottom:var(--s-2)}
/* A group's parts: each table under its own title when the group has more than one, its sources folded under it. */
.profile-part+.profile-part{margin-top:var(--s-3);padding-top:var(--s-3);border-top:1px solid var(--line)}
.profile-part-title{margin:0 0 var(--s-2);font-size:var(--fs-base);font-weight:700;line-height:1.35}
details.sources-fold{margin:0;padding:var(--s-1) 0 var(--s-3);border-top:0;font-size:var(--fs-xs)}
.sources-fold>summary{display:inline-flex;align-items:center;gap:var(--s-2);padding:var(--s-1) 0;font-size:var(--fs-xs);list-style:none}
.sources-fold .profile-sources{border-top:0;padding:var(--s-1) 0 0}
/* A section's figures as a table: the measure, then the home place and each place beside it in its own column, then how
   the figure compares. The home column carries the chamber tint, as on the printed summary. */
.profile-table{width:100%;border-collapse:collapse;font-size:var(--fs-sm);line-height:1.4}
.profile-table th,.profile-table td{padding:7px 10px 7px 0;border:0;border-top:1px solid var(--line);background:transparent;font-weight:400;white-space:normal}
.profile-table td:last-child{white-space:normal}  /* the site's other tables keep their last column on one line */
.profile-table thead th{padding-top:6px;padding-bottom:6px;border-top:0;font-size:var(--fs-xs);font-weight:600;line-height:1.3;color:var(--muted);vertical-align:bottom}
/* Figure columns grow to fit their estimates and bounds without breaking either line. A note on how a place's figure
   was made wraps under the value. */
.profile-table .profile-figure{width:15%;padding-left:10px;text-align:right;font-variant-numeric:tabular-nums}
.profile-table .profile-figure.home{min-width:8rem;background:var(--accent-soft)}
.profile-table thead .home{color:var(--accent-dark)}
.profile-table .profile-figure.missing{min-width:7rem}
.profile-figure .num,.profile-figure .none,.profile-figure .moe,.profile-aside{display:block}
.profile-figure .num,.profile-figure .none,.profile-figure:not(.missing) .moe{white-space:nowrap}
.profile-figure .num{font-size:var(--fs-base);line-height:1.3;letter-spacing:-.01em;color:var(--ink)}
.profile-figure.home .num{font-weight:700;color:var(--accent-dark)}
.profile-figure .estimate-about{font-size:var(--fs-xs);font-weight:400;color:var(--muted)}
.profile-figure .moe,.profile-figure .none,.profile-aside{font-size:var(--fs-xs);color:var(--muted)}
.profile-aside{min-width:6.5rem}
.profile-figure .chip.caution{margin-top:2px;padding:0 6px}
.profile-place{display:none}
/* The label keeps room for three or four words a line. A table that cannot give it that does not fit, and stacks. */
.profile-table .profile-measure{min-width:8.5rem}
.profile-label{color:var(--ink)}
.profile-label sup{margin-left:3px;font-size:var(--fs-xs);line-height:0;color:var(--muted)}
/* The button that opens what a label means, after the label's last word: 28 px square, so it clears the 24 px target
   size, and pulled into the line so it adds no height. */
.info{display:inline-grid;place-items:center;width:28px;height:28px;margin:-6px 0;padding:0;border:0;border-radius:var(--r-ctl);background:transparent;color:var(--accent);vertical-align:middle}
.info[aria-expanded=true]{background:var(--accent-soft);color:var(--accent-dark)}
.info:focus-visible{outline-offset:0}
.profile-table .profile-how{width:11rem;min-width:9rem;padding-left:var(--s-4);padding-right:0;white-space:normal}
/* Clear gaps use ink in either direction; a reading inside the margins of error uses muted text. */
.compare-line{display:block;padding-left:1em;text-indent:-1em;font-size:var(--fs-xs);line-height:1.45;color:var(--ink);font-variant-numeric:tabular-nums}
.compare-line:is(.higher,.lower){font-weight:700}
.compare-line.within_margin{color:var(--muted)}
.compare-line+.compare-line{margin-top:2px}
/* Under a measure, as wide as the table: the notes on its figure, then what its label means once that is opened. */
.profile-table .profile-more td{padding:0 0 12px;border-top:0;white-space:normal}
.profile-more p:first-child{margin-top:0}
.profile-more .meaning{max-width:var(--measure);padding:10px 12px;border-radius:var(--r-sm);background:var(--subtle);font-size:var(--fs-xs);line-height:1.5;color:var(--muted)}
.profile-more p+.meaning{margin-top:8px}
.profile-more .meaning>:first-child{margin-top:0}
.profile-key{margin:0;padding:8px 0 6px;border-top:1px solid var(--line);font-size:var(--fs-xs);line-height:1.5;color:var(--muted)}
.glance-key+.profile-key{border-top:0}
/* A table too wide for its box stacks (the page adds the class): each measure becomes a block with its label on top,
   the places side by side under it, each named, and the comparison last. The column headings stay for screen readers. */
.stacked .profile-table thead{display:block;position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
.stacked .profile-table,.stacked .profile-table tbody{display:block}
.stacked .profile-row{display:flex;flex-wrap:wrap;gap:8px;padding:12px 0;border-top:1px solid var(--line)}
.stacked .profile-table .profile-row>*{width:auto;min-width:0;padding:0;border:0}
.stacked .profile-table .profile-measure,.stacked .profile-table .profile-how{flex:0 0 100%}
.stacked .profile-table .profile-row .profile-figure{flex:1 1 min-content;min-width:min(5.5rem,100%);padding:6px 8px;border-radius:var(--r-sm);text-align:left}
.stacked .profile-aside{min-width:0}
.stacked .profile-table .profile-figure:not(.home){background:var(--subtle)}
.stacked .profile-place{display:block;font-size:var(--fs-xs);line-height:1.3;color:var(--muted)}
.stacked .profile-more:not([hidden]),.stacked .profile-table .profile-more td{display:block}
/* Programs side by side when there is room. */
.program-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(min(18rem,100%),1fr));column-gap:24px}
.profile-back{margin:0;padding:0 0 12px}
.profile-scope{margin:0 0 12px;font-size:var(--fs-sm);line-height:1.5;color:var(--muted)}
.profile-caution{margin:6px 0 0;font-size:var(--fs-xs);line-height:1.5;color:var(--muted)}
.profile-beside .chip.caution,.program-figure .chip.caution{padding:0 6px}
.profile-stats dd .chip.caution{vertical-align:.2em;letter-spacing:0}
.profile-sources{border-top:1px solid var(--line);padding:10px 0 14px;font-size:var(--fs-xs);line-height:1.5;color:var(--muted)}
.profile-sources-title{margin:0 0 2px;font-weight:600;color:var(--ink)}
.profile-sources ul,.profile-sources ol{margin:0;padding-left:18px}.profile-sources ul{list-style:none;padding-left:0}
.profile-sources ul+.profile-sources-title,.profile-sources ol+.profile-sources-title{margin-top:8px}
.profile-source-year{display:block}.profile-sources li+li{margin-top:4px}
/* Programs in need groups: each group's heading and district figure once, then one row per program with its level,
   who it is for, one limit, and its page and phone. */
.program-intro,.program-checked{margin:0 0 6px;font-size:var(--fs-xs);line-height:1.5;color:var(--muted)}
.program-group{padding:12px 0 2px;border-top:1px solid var(--line)}
.program-group-title{margin:0;font-size:var(--fs-base);font-weight:600;line-height:1.35}
.program-figure{margin:2px 0 4px;font-size:var(--fs-xs);line-height:1.5;color:var(--muted)}
.program{padding:10px 0 12px;border-top:1px solid var(--line)}
.program-group .program-grid>.program{border-top-style:dashed}
.program-name{margin:0;font-size:var(--fs-sm);font-weight:600;line-height:1.35}
.program-name a{color:var(--accent-dark)}
.program-level{margin-left:4px;font-size:var(--fs-xs);font-weight:400;color:var(--muted)}
.program-agency,.program-contact{margin:2px 0 0;font-size:var(--fs-xs);line-height:1.45;color:var(--muted)}
.program-contact{margin-top:6px}
.program-contact a{white-space:nowrap}
.program-about{margin:4px 0 0;font-size:var(--fs-sm);line-height:1.45}
.program-for,.program-limit{margin:4px 0 0;font-size:var(--fs-xs);line-height:1.45;color:var(--muted)}
.program-for b,.program-limit b{font-weight:600;color:var(--ink)}
.program-actions{display:flex;flex-wrap:wrap;align-items:baseline;gap:4px 14px;margin:6px 0 0;font-size:var(--fs-xs);line-height:1.45}
.program-actions a{white-space:nowrap}
.program-phone-label{color:var(--muted)}
.program-stale{margin:4px 0 0;font-size:var(--fs-xs);line-height:1.45;color:var(--ink);font-weight:600}
.program-others{border-top:1px solid var(--line)}
.program-others>summary{padding:12px 0;font-size:var(--fs-sm);font-weight:600;cursor:pointer}
.program-others[open]>summary{padding-bottom:4px}
.program-note{margin:0;padding:10px 0 8px;border-top:1px solid var(--line);font-size:var(--fs-xs);line-height:1.5;color:var(--muted)}
article .answer-programs .program-checked{margin-top:10px}
article .answer-programs summary+.program-grid{margin-top:10px}
/* Income-eligible estimates: a second figure beside the row and a caveat line. */
.profile-beside,.profile-caveat{margin:6px 0 0;font-size:var(--fs-xs);line-height:1.5;color:var(--muted)}
.profile-beside b{font-weight:600;color:var(--ink);font-variant-numeric:tabular-nums}
.profile-beside sup{margin-left:3px;line-height:0}
.profile-caveat.lead{margin:0 0 4px}
/* Print, link, download and compare: one line of plain actions at the right of At a glance. */
.icon{flex:none;width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
/* Fixed and see-through: the selection Copy link falls back on when it cannot write to the clipboard directly. */
.copy-buffer{position:fixed;top:0;left:0;width:1px;height:1px;padding:0;border:0;opacity:0;pointer-events:none}
/* Suggested questions, written out in full: a list under the agent's introduction, and after an answer, under it. */
#messages{display:flex;flex-direction:column}
.suggest{padding:4px 0}
.suggest-title{margin:var(--s-3) 0 2px;font-size:var(--fs-sm);font-weight:700;color:var(--ink)}
/* After the first answer: the first question, with More questions for the rest (the page hides the others). */
.suggest.folded{display:block}
.more-questions{display:inline-flex;align-items:center;margin-top:4px;padding:6px 0;border:0;background:none;color:var(--accent-dark);font-size:var(--fs-sm);font-weight:600;line-height:1.4;white-space:nowrap}
#question-form,#chat-status{flex:none}
/* Tight enough that the note under the question box leaves an answer room to be read in at 1440 by 900. */
.chat-card #question-form{padding-top:10px}
.chat-card #chat-status{padding-bottom:10px}

/* The agent floats wherever it is not docked: on Find at any width, and on a district's page or Compare below
   1200 px. It is hidden until the round button opens it, then a card above the button, or the whole screen on a phone.
   The button says when an answer came while the panel was shut. */
.chat-dock{position:fixed;z-index:46;display:none;right:max(var(--s-4),env(safe-area-inset-right));bottom:calc(56px + var(--s-4) * 2);width:min(26rem,calc(100vw - var(--s-4) * 2));height:min(42rem,calc(100vh - var(--stick) - 56px - var(--s-4) * 4))}
html.chat-open .chat-dock{display:block}
html.chat-open .chat-dock #messages{flex:1 1 0px;min-height:80px;overflow-y:auto;scroll-padding-block:12px}
html.chat-open .chat-min{display:grid}
/* The panel floats over the page, so it alone among the panels casts a shadow. */
html.chat-open .chat-card{box-shadow:var(--shadow-lg)}
.chat-fab{position:fixed;z-index:45;right:max(var(--s-4),env(safe-area-inset-right));bottom:max(var(--s-4),env(safe-area-inset-bottom));display:inline-flex;align-items:center;gap:10px;min-height:56px;padding:0 22px 0 18px;border:1px solid var(--gold-edge);border-radius:var(--r-pill);background:var(--gold);color:var(--ink);font-size:var(--fs-base);font-weight:700;box-shadow:var(--shadow-lg)}
.chat-fab .icon{width:22px;height:22px}
.chat-fab:focus-visible{outline-offset:3px}
.fab-new{padding:2px 8px;border-radius:var(--r-pill);background:var(--ink);color:#fff;font-size:var(--fs-xs);font-weight:700}
/* Where the round button floats over the page, whatever the keyboard moves to scrolls clear of it. */
html.chat-floats{scroll-padding-bottom:calc(56px + var(--s-4) * 2)}
/* Phones: the panel covers the screen, under its own title bar with the button that minimizes it. */
@media(max-width:640px){
  html.chat-open .chat-dock{inset:0;width:auto;height:auto;z-index:60}
  html.chat-open .chat-card{border:0;border-radius:0;box-shadow:none}
  html.chat-open .chat-fab{display:none}
  html.chat-cover body{overflow:hidden}
}

/* Compare uses the whole stage until the reader opens chat. On a wide screen the open panel
   sits alongside the figures so both stay readable. */
html[data-page=compare] .stage{grid-template-columns:minmax(0,1fr);grid-template-areas:"bar" "cmp"}
@media(min-width:1200px){
  /* The last row takes any height the agent's column adds, so the bar and the rows under it keep their own height. */
  html[data-page=district] .stage{grid-template-columns:repeat(3,minmax(0,1fr));grid-template-rows:auto auto 1fr;grid-template-areas:"bar bar chat" "map head chat" "prof prof chat"}
  html[data-page=compare].chat-open .stage{grid-template-columns:repeat(3,minmax(0,1fr));grid-template-rows:auto 1fr;grid-template-areas:"bar bar chat" "cmp cmp chat"}
  html:is([data-page=district],[data-page=compare].chat-open) .chat-dock{grid-area:chat;grid-row:1/-1;align-self:start;display:block;position:sticky;z-index:auto;top:calc(var(--stick) + var(--s-4));right:auto;bottom:auto;width:auto;height:calc(100vh - var(--stick) - var(--s-4) * 2);max-height:60rem}
  html:is([data-page=district],[data-page=compare]) #messages{flex:1 1 0px;min-height:120px;overflow-y:auto;scroll-padding-block:12px}
  html:is([data-page=district],[data-page=compare].chat-open) .chat-fab{display:none}
}
@media(min-width:1200px) and (max-height:559px){
  html:is([data-page=district],[data-page=compare].chat-open) .chat-dock{position:static;height:auto}
}
@media(max-width:1199px){
  html[data-page=district] .stage{grid-template-columns:minmax(0,2fr) minmax(0,3fr);grid-template-areas:"bar bar" "map head" "prof prof"}
}
.compare-view{grid-area:cmp}


/* The refreshed look over the profile: At a glance, the section links, the outreach note and each section are white
   panels with rounded corners and a soft shadow on the gray page, in place of the printed brief's ink rules. */
.profile>.profile-status{margin:0}
.profile-glance,.profile-jumps,.profile .profile-section,.profile-outreach,.profile-end{background:#fff;border:1px solid var(--line);border-radius:var(--r-card);box-shadow:var(--shadow-sm)}
.profile-glance{margin:0 0 var(--s-4);padding:var(--s-4) var(--card-pad) var(--s-2)}
.glance-head{padding-bottom:var(--s-2);border-bottom:1px solid var(--line)}
.profile-jumps{margin:0 0 var(--s-4);padding:var(--s-2) var(--s-3)}
.profile .profile-section{margin:0 0 var(--s-3);padding:0 var(--card-pad);overflow:hidden}
.profile .profile-section>summary,.cmp-section>summary{margin:0 calc(-1 * var(--card-pad));padding:var(--s-4) var(--card-pad);border-bottom:0}
.profile .profile-section[open]>summary,.cmp-section[open]>summary{margin-bottom:var(--s-2);border-bottom:1px solid var(--line)}
:is(.profile-section,.sources-fold)>summary::after{content:"";flex:none;width:10px;height:10px;margin:0 6px 0 auto;border:solid var(--accent);border-width:0 2.5px 2.5px 0;transform:translateY(-.25em) rotate(45deg)}
:is(.profile-section,.sources-fold)[open]>summary::after{transform:translateY(.1em) rotate(-135deg)}
@media(prefers-reduced-motion:no-preference){:is(.profile-section,.sources-fold)>summary::after{transition:transform .15s}}
.profile-outreach{margin:0 0 var(--s-4);padding:var(--s-4) var(--card-pad)}
.profile-end{margin:var(--s-4) 0 0;padding:var(--s-2) var(--card-pad)}
.cmp-section{padding:0 var(--card-pad) var(--s-2);background:#fff;border:1px solid var(--line);border-radius:var(--r-card);box-shadow:var(--shadow-sm);overflow:hidden}
.profile-stats>div{border-left-color:var(--line)}
/* The agent's title sits on a light tint of the chamber's color, so the eye finds it first. */
:root{--key-tint:var(--house-tint)}
body[data-chamber=senate],.chat-dock[data-chamber=senate]{--key-tint:var(--senate-tint)}
.chat-head{background:var(--key-tint)}

/* The map's card: the island tabs over the map on Find, then the whole chain on the sea, as wide as the card and the
   chain's own shape, with the zoom buttons in its top right corner. On a district's page the card is the map alone. */
.map-card{padding:var(--s-4)}
.map-controls{margin-bottom:var(--s-3)}
.map-controls .island-tabs{justify-content:flex-start}
.zoom-buttons{border-radius:var(--r-ctl);overflow:hidden}
html[data-page=district] .map-card{padding:var(--s-3);align-self:stretch;display:flex;flex-direction:column;justify-content:center}
.island-tabs button{border-radius:var(--r-pill);padding:6px 12px}
.island-tabs button[aria-pressed=true]{background:var(--accent);border-color:var(--accent);color:#fff}

/* The view transition between Find and a district's page: the map's card moves and shrinks to its corner, and the
   rest fades. */
html.moving .stage-map{view-transition-name:district-map}
@media print{html.moving .stage-map{view-transition-name:none}}
::view-transition-group(district-map){animation-duration:.5s;animation-timing-function:cubic-bezier(.2,.7,.2,1)}
::view-transition-old(root),::view-transition-new(root){animation-duration:.35s}
@media(prefers-reduced-motion:reduce){::view-transition-group(*),::view-transition-old(*),::view-transition-new(*){animation:none!important}}

/* What to print: a dialog over the page with a checkbox for each section. */
.print-dialog{width:min(32rem,calc(100vw - 32px));max-height:calc(100vh - 32px);padding:0;border:0;border-radius:var(--r-card);box-shadow:var(--shadow-lg);color:var(--ink)}
.print-dialog::backdrop{background:rgb(23 35 38 / .5)}
.print-dialog form{display:grid;gap:var(--s-4);padding:var(--s-5)}
.print-dialog h2{margin:0;font-size:var(--fs-xl)}
.print-intro{margin:0;font-size:var(--fs-sm);color:var(--muted)}
.print-dialog fieldset{margin:0;padding:0;border:0;min-width:0}
.print-dialog fieldset:disabled{opacity:.5}
.print-dialog legend{padding:0;margin-bottom:var(--s-2);font-size:var(--fs-sm);font-weight:700;color:var(--ink)}
.print-quick{display:flex;gap:var(--s-4);margin:-6px 0 var(--s-1)}
.print-quick .textbutton{padding:4px 0;font-size:var(--fs-sm)}
.print-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:var(--s-1) var(--s-4)}
.print-dialog label{display:flex;align-items:center;gap:10px;margin:0;padding:6px 0;font-size:var(--fs-base);font-weight:600;cursor:pointer}
.print-dialog input[type=checkbox]{flex:none;width:20px;height:20px;margin:0;accent-color:var(--accent)}
.print-num{min-width:1.2em;font-family:var(--display);font-weight:800;color:var(--chamber)}
.print-summary{align-items:flex-start!important;padding:var(--s-3) var(--s-4)!important;border:1px solid var(--line);border-radius:var(--r-ctl);background:var(--subtle)}
.print-summary input{margin-top:2px!important}
.print-hint{display:block;font-size:var(--fs-sm);font-weight:400;color:var(--muted)}
.print-error{margin:0;font-size:var(--fs-sm);font-weight:600;color:var(--error-ink)}.print-error:empty{display:none}
.print-actions{display:flex;flex-wrap:wrap;gap:var(--s-2)}
.button.secondary{background:#fff;color:var(--ink);border-color:var(--control)}
@media(max-width:480px){.print-list{grid-template-columns:minmax(0,1fr)}}

/* Answer tiles, charts, and sources */
article .lead{margin:0 0 12px}
article .lead-list{margin:0 0 12px;padding-left:20px}
.lead-list li{margin:0 0 4px}.lead-list li:last-child{margin-bottom:0}
.answer-opening{font-weight:600}
.tiles{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(10.625rem,100%),1fr));gap:12px;margin:0 0 16px}
.tile{display:flex;flex-direction:column;border:1px solid var(--line);border-radius:var(--r-ctl);background:#fff;padding:14px 16px;min-width:0;container-type:inline-size}
.tile-value{font-size:var(--fs-num);line-height:2.25rem;font-weight:400;color:var(--ink);overflow-wrap:normal}
/* --ems and --about are the widths in em of the number and of the small "about" before it, so long numbers shrink to fit. */
.tile-num{font-size:var(--fs-num);font-size:clamp(1rem,min(19cqi,calc((90cqi - var(--about,0) * var(--fs-xs)) / var(--ems,1))),var(--fs-num));letter-spacing:-.02em;line-height:0}
.tile-value.none .tile-num{font-size:var(--fs-lg);color:var(--muted)}
.tile-about{font-size:var(--fs-xs);font-weight:600;line-height:0;color:var(--muted)}
.tile-label{font-size:var(--fs-sm);margin-top:4px}
.tile-meta{font-size:var(--fs-xs);color:var(--muted);margin-top:auto;padding-top:6px;text-wrap:balance}
/* The same measure in the other places compared, under the tile's own figure. */
.tile-places{list-style:none;display:grid;gap:4px;margin:auto 0 0;padding:8px 0 0;font-size:var(--fs-xs);line-height:1.4;color:var(--muted)}
.tile-meta~.tile-places{margin-top:8px;border-top:1px solid var(--line)}
.tile-places~.meaning{margin-top:0}
.tile-place{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:baseline;gap:0 8px}
.tile-place-value{color:var(--ink);font-variant-numeric:tabular-nums;text-align:right;white-space:nowrap}
.tile-place-spread{display:block;color:var(--muted)}
.tile-place .chip.caution{grid-column:1/-1;justify-self:start;padding:0 6px}
.answer .more-figures{margin:-4px 0 16px}
.chart{margin:0 0 20px;padding:0;font-size:var(--fs-sm)}
.chart-head{display:flex;justify-content:space-between;gap:10px;flex-wrap:wrap;font-weight:600;font-size:var(--fs-sm);margin-bottom:4px}
.chart-summary{margin:0 0 10px;color:var(--muted);line-height:1.5}
.chart-bars{display:grid;grid-template-columns:fit-content(150px) minmax(96px,1fr) fit-content(13em);align-items:center;gap:6px 12px}
.chip{font-weight:400;font-size:var(--fs-xs);color:var(--muted);border:1px solid var(--line);border-radius:var(--r-pill);padding:1px 8px;background:#fff}
.chip.strong{color:var(--accent-dark);border-color:var(--accent)}
/* Uncertainty: a chip on unreliable estimates, and how apportioned and modeled figures are estimated. */
.chip.caution{display:inline-block;font-weight:600;line-height:1.5;color:var(--error-ink);border-color:var(--error-line);background:var(--error-bg);white-space:nowrap}
.method{margin:6px 0 0;font-size:var(--fs-xs);line-height:1.5;color:var(--muted)}
.profile-section>.method{margin:0 0 10px}
.bar-value .chip.caution{display:table;margin:2px 0 0 auto}
.chart-note{margin:8px 0 0;font-size:var(--fs-xs);line-height:1.5;color:var(--muted)}
.chart-data td .chip.caution{margin-top:2px}
/* Notes for districts with a known caveat, such as the Maui wildfires. */
.place-notes{display:grid;gap:10px;margin:0 0 12px;padding:12px 14px;border:1px solid var(--line);border-left:4px solid var(--accent);border-radius:var(--r-ctl);background:#fff;font-size:var(--fs-sm);line-height:1.5}
.place-note-text{margin:0}
.place-note-text b{font-weight:700}
.place-note-sources{list-style:none;margin:4px 0 0;padding:0;font-size:var(--fs-xs);color:var(--muted)}
.place-note-sources li+li{margin-top:2px}
.profile-notes{margin:12px 0 4px;background:var(--subtle)}
article .place-notes .place-note-sources{padding-left:0}
.bar-row{display:contents}
.bar-place{min-width:0;overflow-wrap:break-word}.bar-place.home{font-weight:700}
.bar-track{position:relative;height:18px}
.bar{position:absolute;left:0;top:2px;height:14px;border-radius:var(--r-sm)}
.bar.home{background:var(--accent)}
.bar.other{background:var(--bar-other)}
/* A thin white edge keeps the margin of error visible where it crosses the dark bar. */
.whisker{position:absolute;top:8px;height:2px;background:var(--ink);box-shadow:0 0 0 1px #fff}
.whisker::before,.whisker::after{content:"";position:absolute;top:-4px;width:2px;height:10px;background:var(--ink);box-shadow:0 0 0 1px #fff}
.whisker::before{left:0}.whisker::after{right:0}
.whisker{container-type:inline-size}@container (width < 4px){.whisker::before,.whisker::after{display:none}}
.bar-value{font-variant-numeric:tabular-nums;white-space:normal;overflow-wrap:normal;color:var(--ink);text-align:right}
.bar-spread{display:inline-block;text-wrap:balance}
.chart .chart-data{margin-top:8px;padding-top:0;border-top:0}
.chart-data summary{padding:4px 0}
.chart-data table{margin-top:8px;font-size:var(--fs-sm);border:1px solid var(--line);background:#fff}
.chart-data th,.chart-data td{padding:6px 10px;white-space:normal;overflow-wrap:normal}
.chart-data tbody th{font-weight:400;background:#fff}.chart-data tbody tr:first-child th{font-weight:700}
.chart-data caption{text-align:left}
.chart-data.more-figures tbody tr:first-child th{font-weight:400}
.more-spread{display:block;font-size:var(--fs-xs);color:var(--muted)}
.chart-data.more-figures tbody tr th.more-place{font-weight:700;background:var(--subtle)}
.answer .caveat{font-size:var(--fs-sm);color:var(--muted);margin:0 0 10px}
.source-line{font-size:var(--fs-xs);color:var(--muted);border-top:1px solid var(--line);padding-top:10px;margin:0}
.answer .prepared{font-size:var(--fs-xs);color:var(--muted);margin:10px 0 0}
/* How many figures an answer shows, each from a cited source. */
article .verified{font-size:var(--fs-sm);color:var(--ink);margin:6px 0 0}
/* The datatrove.ai pointer after an answer with no figures. */
article .elsewhere{font-size:var(--fs-sm)}
.answer .elsewhere{margin:0 0 10px}
.answer details ul{font-size:var(--fs-sm);padding-left:18px;margin:8px 0 0}
.answer{container-type:inline-size}
@container (max-width:440px){.chart-bars{grid-template-columns:minmax(96px,1fr) fit-content(13em);row-gap:2px}.bar-place{grid-column:1/-1;margin-top:6px}.bar-spread{display:block}.chart.wide .bar-track,.chart.wide .bar-value{grid-column:1/-1}.chart.wide .bar-value{text-align:left}.chart.wide .bar-spread{display:inline-block}}

/* Map: on the Find page beside the search; on the rankings page with its measure and table. */
.map-status{margin:var(--s-3) 0 0}.map-status:empty{margin:0;min-height:0}
#map.zip-mode:not(.shaded) .district:not(.zip-hit){fill:var(--map-dim);stroke:var(--control)}#map.zip-mode:not(.shaded) .district.zip-hit:not(.picked){fill:var(--zip)}#map.zip-mode .labels{display:inline}#map.zip-mode:not(.zoomed) .label:not(.zip-hit){display:none}#map.zip-mode .label:not(.zip-hit){fill:var(--muted);opacity:1}.zip-form .match{padding:7px 12px;font-size:var(--fs-xs)}
.map-controls{display:flex;flex-wrap:wrap;gap:var(--s-3);justify-content:space-between;align-items:center;margin-bottom:var(--s-3)}
.segmented{display:inline-flex;border:1px solid var(--control);border-radius:var(--r-ctl);overflow:hidden}.segmented button{border:0;background:transparent;padding:8px 16px;font-size:var(--fs-sm);font-weight:600}.segmented [data-chamber=house]{color:var(--house)}.segmented [data-chamber=senate]{color:var(--senate)}.segmented [data-chamber=house][aria-pressed=true]{background:var(--house);color:#fff}.segmented [data-chamber=senate][aria-pressed=true]{background:var(--senate);color:#fff}
.island-tabs{display:flex;flex-wrap:wrap;gap:6px}.island-tabs button{border:1px solid var(--line);background:#fff;color:var(--ink);border-radius:var(--r-ctl);padding:6px 10px;font-size:var(--fs-xs);font-weight:600}.island-tabs button[aria-pressed=true]{background:var(--house-soft);border-color:var(--house);color:var(--house-dark)}
.map-frame{position:relative;overflow:hidden;width:100%;background:var(--map-sea);border:1px solid var(--line);border-radius:var(--r-sm);aspect-ratio:3/2}
@media screen and (min-width:1024px){
  /* Allow for the title band, page and card padding, and the controls above the map.
     Keep a usable map on shorter screens where the reader will need to scroll. */
  :is(.hero-find,.rankings-page .hero-inner){padding-block:var(--s-4)}
  :is(.hero-find,.rankings-page .hero-inner) .lede{max-width:56rem}
  html[data-page=compare]:not(.cmp-choosing) .hero-compare{display:flex;align-items:center;gap:var(--s-6);padding-block:var(--s-4)}
  html[data-page=compare]:not(.cmp-choosing) .hero-compare h1{margin:0}
  html[data-page=compare]:not(.cmp-choosing) .hero-compare h1::before{margin-bottom:var(--s-2)}
  html[data-page=home] .stage-map{--map-chrome:20rem}
  html[data-page=home] .map-controls .island-tabs button{padding-inline:8px}
  .rankings-page .map-card{--map-chrome:25.5rem}
  .rankings-page .page-body{padding-top:var(--s-3)}
  .rankings-page .page-tabs{margin-bottom:var(--s-3)}
  .rankings-page .page-tabs [role=tab]{padding-block:var(--s-2)}
  .rank-controls .shade-row{display:grid;grid-template-columns:auto minmax(0,1fr);align-items:center;column-gap:var(--s-2)}
  .rank-controls .shade-row label{margin:0}
  #shade-status{grid-column:1/-1}
  :is(html[data-page=home],.rankings-page) .map-frame{max-height:max(12rem,calc(100svh - var(--header-h) - var(--map-chrome)))}
}
@media(max-width:640px){
  :is(html[data-page=home],.rankings-page) .map-card{padding:var(--s-2)}
}
.map-frame .zoom-buttons{position:absolute;z-index:2;top:8px;right:8px}
#map{position:absolute;inset:0;display:block;width:100%;height:100%;--label:12px;touch-action:pan-y;user-select:none;-webkit-user-select:none}#map.free{touch-action:none;cursor:grab}#map.free:active{cursor:grabbing}
#map .district,#map .label{--land:var(--house-land);--hover:var(--house-hover);--zip:var(--house-zip);--pick:var(--house);--pick-dark:var(--house-dark)}#map [data-geo^="senate:"]{--land:var(--senate-land);--hover:var(--senate-hover);--zip:var(--senate-zip);--pick:var(--senate);--pick-dark:var(--senate-dark)}
#map .district{fill:var(--land);stroke:var(--pick);stroke-width:1px;stroke-linejoin:round;vector-effect:non-scaling-stroke;cursor:pointer;transition:fill .15s}
#map,.map-card button{-webkit-tap-highlight-color:transparent}#map .district,#map .district:focus{outline:none}#map .district:focus-visible{fill:var(--hover);outline:none}@media(hover:hover){#map .district:hover{fill:var(--hover)}}
#map .district.picked{fill:var(--pick);stroke:#fff}
#map .focus-ring path{fill:none;stroke-linejoin:round;vector-effect:non-scaling-stroke;pointer-events:none}#map .hover-line{stroke:var(--ink);stroke-width:2.5px}#map .ring-halo{stroke:#fff;stroke-width:7px}#map .ring-line{stroke:var(--ink);stroke-width:3px}
#map .labels{pointer-events:none;display:none}#map.zoomed .labels{display:inline}
#map .label{font-family:var(--sans);font-size:var(--label);font-weight:700;fill:var(--ink);text-anchor:middle;dominant-baseline:central;opacity:.8;paint-order:stroke;stroke:#fff;stroke-width:calc(var(--label) / 4);stroke-linejoin:round}
#map .label.picked{fill:#fff;stroke:var(--pick-dark);opacity:1}#map .label.crowded{visibility:hidden}
/* Zoom: two buttons in the map's top right corner. */
.zoom-buttons{display:flex;border:1px solid var(--control);border-radius:var(--r-ctl);background:#fff}.zoom-buttons button{width:34px;height:34px;border:0;background:transparent;color:var(--ink);font-size:var(--fs-lg);line-height:1}.zoom-buttons button+button{border-left:1px solid var(--line)}
.map-controls{align-items:center}.map-controls .island-tabs{flex:1 1 auto;justify-content:flex-start}
/* On Find the House or Senate switch leads the map's card, the island tabs beside it at the right. */
.map-controls .chamber-switch+.island-tabs{justify-content:flex-end}
.map-controls .chamber-switch button{min-width:5.5rem;min-height:36px;padding:4px 16px}
/* At statewide zoom, each island caption is also a button. */
#map:not(.statewide) .frame-captions{display:none}
#map .frame-caption{cursor:pointer}
#map .frame-caption rect{fill:#fff;stroke:var(--control)}
#map .frame-caption text{font:600 12px var(--sans);fill:var(--ink);dominant-baseline:central;pointer-events:none}
#map .frame-caption:hover rect{fill:var(--accent-soft)}
#map .frame-caption:focus-visible{outline:none}
#map .frame-caption:focus-visible rect{stroke:var(--accent);stroke-width:3px}
.map-island-hint{margin:var(--s-2) 0 0;font-size:var(--fs-sm);color:var(--muted)}
.map-hint{position:absolute;left:12px;right:12px;bottom:12px;width:fit-content;margin:0 auto;padding:8px 14px;background:var(--ink);color:#fff;font-size:var(--fs-xs);font-weight:600;border-radius:var(--r-ctl);text-align:center;text-wrap:balance;pointer-events:none}
.map-loading{position:absolute;inset:0;display:grid;place-items:center;margin:0;color:var(--muted);font-size:var(--fs-sm);font-weight:600;background:linear-gradient(90deg,var(--map-sea) 25%,var(--subtle) 50%,var(--map-sea) 75%);background-size:200% 100%;animation:shimmer 1.6s ease-in-out infinite}
.map-loading.failed{padding:var(--s-4);text-align:center;background:var(--map-sea);animation:none}
.map-tip{position:absolute;z-index:3;top:0;left:0;transform:translate(var(--tip-x,0),var(--tip-y,0));display:grid;gap:1px;max-width:16rem;padding:6px 10px;border:1px solid var(--ink);border-radius:var(--r-sm);background:#fff;color:var(--ink);font-size:var(--fs-sm);line-height:1.35;pointer-events:none;white-space:nowrap}
.map-tip span{font-size:var(--fs-xs);color:var(--muted)}
@media(max-width:640px){.key-hint{display:none}}

/* The map shaded by a measure. Each district takes the shade of its figure, q1 lightest to q5 darkest; its fill no
   longer changes under the mouse or focus, which the outlines show. Borders and stripes are ink on the light shades and
   white on the dark ones (q4 and q5). Stripes mark an unreliable estimate and dots a district with no figure, so neither
   depends on color. Outlines drawn over the map pair ink with white, so they show on every shade: a picked district gets
   a white line edged in ink, a ZIP code's districts a dashed ink line on white, and the district under the mouse a thin
   ink line on white. */
.shade-row{margin-bottom:16px}.shade-row select{max-width:26rem}.shade-row .status{margin:8px 0 0}.shade-row .status:empty{margin:0;min-height:0}
#map .district,.map-legend,.rank-table{--q1:var(--house-q1);--q2:var(--house-q2);--q3:var(--house-q3);--q4:var(--house-q4);--q5:var(--house-q5)}
#map [data-geo^="senate:"],.map-legend[data-ramp=senate],.rank-table[data-ramp=senate]{--q1:var(--senate-q1);--q2:var(--senate-q2);--q3:var(--senate-q3);--q4:var(--senate-q4);--q5:var(--senate-q5)}
#map.shaded .district{stroke:var(--ink);forced-color-adjust:none}#map.shaded .district:is(.q4,.q5){stroke:#fff}
#map.shaded .district.q1{fill:var(--q1)}#map.shaded .district.q2{fill:var(--q2)}#map.shaded .district.q3{fill:var(--q3)}#map.shaded .district.q4{fill:var(--q4)}#map.shaded .district.q5{fill:var(--q5)}#map.shaded .district.none{fill:var(--map-dim)}
#map .marks{pointer-events:none}#map .marks path{stroke:none}#map .marks .unreliable{fill:url(#map-stripes)}#map .marks .unreliable.on-dark{fill:url(#map-stripes-light)}#map .marks .none{fill:url(#map-dots)}
#map .stripe{stroke:var(--ink);stroke-width:1.25px}#map .stripe.light{stroke:#fff}#map .dot{fill:var(--control)}
#map .pick-casing{stroke:var(--ink);stroke-width:6px}#map .pick-line{stroke:#fff;stroke-width:2px}#map .zip-halo{stroke:#fff;stroke-width:5px}#map .zip-line{stroke:var(--ink);stroke-width:2.5px;stroke-dasharray:6 4}
#map .hover-halo{stroke:#fff;stroke-width:4.5px}#map.shaded .hover-line{stroke-width:2px}
#map:not(.shaded) :is(.marks,.pick-casing,.pick-line,.zip-halo,.zip-line,.hover-halo){display:none}
.map-legend{margin-top:12px;font-size:var(--fs-sm);line-height:1.45}
.legend-title{margin:0 0 8px;color:var(--ink)}
.legend-keys{display:flex;flex-wrap:wrap;gap:6px 16px;margin:0 0 8px;padding:0;list-style:none}
.legend-keys li{display:flex;align-items:center;gap:6px;font-variant-numeric:tabular-nums}
.swatch{flex:none;width:28px;height:18px;border:1px solid var(--ink);border-radius:2px;forced-color-adjust:none}
.swatch.q1{background:var(--q1)}.swatch.q2{background:var(--q2)}.swatch.q3{background:var(--q3)}.swatch.q4{background:var(--q4)}.swatch.q5{background:var(--q5)}
/* Stripes as they look on a light shade (ink) and on a dark one (white). */
.swatch.unreliable{background:repeating-linear-gradient(-45deg,var(--ink) 0 1.25px,transparent 1.25px 5px) left/50% 100% no-repeat,repeating-linear-gradient(-45deg,#fff 0 1.25px,transparent 1.25px 5px) right/50% 100% no-repeat,linear-gradient(90deg,var(--q2) 50%,var(--q5) 50%)}
.swatch.none{background:radial-gradient(circle,var(--control) 0 1px,transparent 1.5px) 0 0/5px 5px,var(--map-dim)}
.legend-note{margin:0 0 6px;color:var(--muted);max-width:var(--measure)}
.legend-source{margin:0;color:var(--muted)}
.pick-value{display:block;margin-top:6px;font-size:var(--fs-sm);line-height:1.45;color:var(--ink)}
.map-table tbody tr:first-child th{font-weight:400}.map-table td.note{color:var(--muted)}

/* The Find page's last strip: the store's counts in one row, and the way to the data and methods. */
.counts{padding:var(--s-5) 0;border-top:1px solid var(--line)}
.counts-inner{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:var(--s-3) var(--s-6)}
/* Each count's number large in Archivo and teal, its label under it. */
.facts-list{display:flex;flex-wrap:wrap;gap:var(--s-4) var(--s-6);margin:0;padding:0;list-style:none;font-size:var(--fs-sm);color:var(--muted)}
.facts-list li{display:grid;margin:0;line-height:1.3}
.stat-num{font-family:var(--display);font-stretch:87%;font-size:var(--fs-num);font-weight:800;line-height:1.1;letter-spacing:-.01em;color:var(--house);font-variant-numeric:lining-nums tabular-nums}
.stat-label{max-width:9rem}
.counts-link{font-weight:600}

/* Tables and lists the pages share */
.facts{max-width:52rem;margin:0 0 var(--block-gap);padding:var(--s-3) var(--s-4);background:var(--surface);border:1px solid var(--line);border-radius:var(--r-ctl);font-size:var(--fs-base);color:var(--ink)}
/* Relative, so text kept for screen readers inside a table that scrolls sideways is clipped with it. Tables sit on the
   page under an ink rule, as in a printed report, with no box around them. */
.table-scroll{position:relative;overflow-x:auto;border-top:2px solid var(--ink);background:var(--bg)}
#source-table{font-size:var(--fs-sm)}#source-table td:last-child{white-space:normal}#source-table td:first-child{width:34%}
table{width:100%;border-collapse:collapse;font-size:var(--fs-base)}
th,td{text-align:left;vertical-align:top;padding:var(--s-3) 14px;border-bottom:1px solid var(--line)}
th{font-weight:600;background:transparent}
thead th{border-bottom:1px solid var(--ink);font-size:var(--fs-sm);color:var(--ink)}
tbody tr:last-child td{border-bottom:0}
td:last-child{white-space:nowrap}
.notes{margin:var(--block-gap) 0 0;padding-left:20px;max-width:var(--measure)}
.notes li{margin:0 0 var(--s-2)}
.method-terms{padding-left:20px}.method-terms li{margin:0 0 var(--s-2)}
/* Where a source's figures can be checked: its tables on data.census.gov, or the methods section. */
.source-links{display:block}
/* A disclosure that folds a long table or list away inside a card. */
details.fold{margin:var(--s-3) 0 0;padding:0;border:0}
details.fold>summary{padding:var(--s-2) 0}
details.fold[open]>summary{margin-bottom:var(--s-2)}

/* Tabs on a page: the compare page's three ways to compare. Each tab has its own address. */
/* The tab's label starts at the page's edge, and its bar is as wide as the label. */
.page-tabs{display:flex;flex-wrap:wrap;gap:var(--s-1) var(--s-6);margin:var(--s-5) 0;border-bottom:1px solid var(--line)}
.page-tabs [role=tab]{margin-bottom:-1px;padding:var(--s-3) 0;border:0;border-bottom:3px solid transparent;background:transparent;color:var(--muted);font-size:var(--fs-base);font-weight:700}
.page-tabs [role=tab][aria-selected=true]{color:var(--ink);border-bottom-color:var(--accent)}
.page-tabs [role=tab]:focus-visible{outline-offset:-4px}
.tab-note{max-width:var(--measure);margin:0 0 var(--s-4);font-size:var(--fs-sm);color:var(--muted)}

/* Compare: two columns, the first district on the left and the second in the middle, each a search until a district
   is chosen, then the district's name, a small map and where it is. Under them, one panel per group of figures, each
   measure a row across both columns: its name and Hawaiʻi's figure, each district's figure under its own name, and
   whether the two differ beyond their margins of error. */
.cmp-cols{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:var(--s-5);align-items:stretch}
.cmp-col{min-width:0;display:flex;flex-direction:column;container-type:inline-size}
.cmp-col>*{flex:1}
.cmp-pick,.cmp-card{padding:var(--card-pad);background:#fff;border:1px solid var(--line);border-radius:var(--r-card);box-shadow:var(--shadow-sm)}
.cmp-pick-title{margin:0 0 var(--s-4);font-size:var(--fs-lg)}
.cmp-pick .chamber-switch{display:flex;width:100%;max-width:20rem;margin-top:var(--s-4)}
.cmp-pick .chamber-switch button{min-width:0;flex:1;white-space:nowrap}
.cmp-pick .seat-index{margin-top:var(--s-4)}
.cmp-pick .seat-row{grid-template-columns:minmax(0,1fr)}
.cmp-pick .seat-island{padding-top:0}
.cmp-matches:not(:empty){margin-top:var(--s-3)}
.cmp-find .status:empty{margin:0;min-height:0}
.cmp-card.senate{--chamber:var(--senate)}
.cmp-card.house{--chamber:var(--house)}
.cmp-card-head{display:flex;flex-wrap:wrap;align-items:flex-start;justify-content:space-between;gap:var(--s-2) var(--s-3)}
.cmp-name a{display:block;color:inherit;text-decoration:none;border-radius:var(--r-sm)}
.cmp-name a:hover .mast-number{text-decoration:underline;text-decoration-thickness:3px;text-underline-offset:6px}
.cmp-name .mast-number{font-size:clamp(52px,4.4vw,72px)}
/* A and B, gold with ink letters, before each district's name on its card and over its column. */
.cmp-badge{flex:none;display:inline-grid;place-items:center;width:28px;height:28px;border:1px solid var(--gold-edge);border-radius:var(--r-sm);background:var(--gold);color:var(--ink);font-family:var(--display);font-size:var(--fs-sm);font-weight:800;line-height:1}
.cmp-name{display:flex;align-items:flex-start;gap:var(--s-3)}
.cmp-sticky-name{display:inline-flex;align-items:center;gap:var(--s-2)}
.cmp-sticky .cmp-badge{width:22px;height:22px;font-size:var(--fs-xs)}
.cmp-card-actions{display:flex;gap:var(--s-2)}
.cmp-map{margin:var(--s-3) 0;border:1px solid var(--line);border-radius:var(--r-sm);overflow:hidden;background:var(--map-sea);aspect-ratio:3/2}
@container (min-width:24rem){
  .cmp-card:has(.cmp-map){display:grid;grid-template-columns:minmax(0,1fr) minmax(0,.65fr);grid-template-rows:auto 1fr;gap:var(--s-2) var(--s-4)}
  .cmp-map{grid-column:2;grid-row:1/3;align-self:start;margin:0}
  .cmp-facts{grid-column:1}
}
.locator-map{display:block;width:100%;height:100%}
.locator-map .sea{fill:var(--map-sea)}
.locator-map path{fill:var(--house-land);stroke:#fff;stroke-width:1px;vector-effect:non-scaling-stroke;stroke-linejoin:round}
.cmp-card.senate .locator-map path{fill:var(--senate-land)}
.locator-map path.here{fill:var(--chamber);stroke:var(--ink)}
.locator-map .here-label{font-family:var(--display);font-weight:800;fill:#fff;text-anchor:middle;dominant-baseline:central;paint-order:stroke;stroke:var(--chamber);stroke-width:.4px}
.cmp-facts .profile-member-name{margin-top:4px}
.cmp-result{margin-top:var(--s-5)}
.cmp-empty,.cmp-note{max-width:var(--measure);margin:0 0 var(--s-3);font-size:var(--fs-sm);color:var(--muted)}
/* The two names over their columns, held under the header while the rows scroll. */
.cmp-sticky{position:sticky;z-index:5;top:var(--stick);display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0;margin:0 0 var(--s-3);padding:var(--s-2) var(--card-pad);background:#fff;border:1px solid var(--line);border-radius:var(--r-ctl);font-weight:700}
.cmp-sticky-name.house{color:var(--house-dark)}.cmp-sticky-name.senate{color:var(--senate-dark)}
.cmp-sticky:has(.cmp-sticky-name:only-child){grid-template-columns:minmax(0,1fr)}
.cmp-section{margin:0 0 var(--s-3)}
.cmp-table{table-layout:fixed;width:100%;border-collapse:collapse;font-size:var(--fs-sm);line-height:1.4}
.cmp-table thead{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
.cmp-table tbody{border-top:1px solid var(--line)}
.cmp-table thead+tbody{border-top:0}
.cmp-table th,.cmp-table td{padding:0;border:0;background:transparent;white-space:normal}
.cmp-table .cmp-label{padding:var(--s-3) 0 4px;font-weight:600;color:var(--ink);text-align:left}
.cmp-measure{margin-right:var(--s-2)}
.cmp-state{display:inline-block;font-size:var(--fs-xs);font-weight:400;color:var(--muted);white-space:nowrap}
.cmp-table .cmp-figure{padding:0 var(--s-4) var(--s-2) 0;vertical-align:top;font-variant-numeric:tabular-nums}
.cmp-table .cmp-figure .num{display:block;font-family:var(--display);font-stretch:90%;font-size:var(--fs-lg);font-weight:700;line-height:1.25;color:var(--ink)}
.cmp-table .cmp-figure .moe,.cmp-table .cmp-figure .none{display:block;font-size:var(--fs-xs);color:var(--muted)}
.cmp-table .cmp-figure .chip.caution{margin-top:2px;padding:0 6px}
.cmp-place{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
/* Each district's figures in its chamber's color. */
.cmp-table .cmp-figure.house .num{color:var(--house-dark)}.cmp-table .cmp-figure.senate .num{color:var(--senate-dark)}
.cmp-table .cmp-figure .compare-line{margin-top:4px}
.cmp-table .cmp-shared{padding-bottom:var(--s-2);text-align:center}
/* While a column is choosing, the House or Senate switch sits in the bar, centered between the way home and the share
   actions. On a phone it takes a row of its own under them. */
@media(min-width:641px){
  html[data-page=compare] .stage-bar{display:grid;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr)}
  html[data-page=compare] .compare-head{grid-column:1;grid-row:1}
  html[data-page=compare] .stage-bar>.chamber-switch{grid-column:2;grid-row:1}
  html[data-page=compare] .share-bar{grid-column:3;grid-row:1;justify-self:end}
}
@media(max-width:640px){
  html[data-page=compare] .stage-bar>.chamber-switch{order:2;width:100%}
  html[data-page=compare] .stage-bar>.chamber-switch button{flex:1}
}
@media(max-width:640px){
  .cmp-cols{gap:var(--s-3)}
  .cmp-pick,.cmp-card{padding:var(--s-3)}
  .cmp-name .mast-number{font-size:48px}
  .cmp-table .cmp-figure{padding-right:var(--s-2)}
  .cmp-table .cmp-figure .num{font-size:var(--fs-base)}
}
/* On a phone a search takes the whole width; two districts stay side by side, as their figures do. */
@media(max-width:760px){
  .cmp-col:has(.cmp-pick){grid-column:1/-1}
}

/* Rankings: the map's card, with the measure and the chamber over the island tabs, the colored map, its legend and the
   district picked; beside it from 1200 px, every district's figure in a card of its own, the table scrolling inside it
   under headings that stay. */
.rank-layout{display:grid;grid-template-columns:minmax(0,1fr);gap:var(--s-5);align-items:start}
@media(min-width:1200px){
  .rank-layout{grid-template-columns:minmax(0,3fr) minmax(0,2fr)}
  /* The table's card stays in view beside the map as the page scrolls, and its rows scroll inside it. */
  .rank-table{position:sticky;top:calc(var(--stick) + var(--s-4))}
  .rank-table .table-scroll{max-height:calc(100vh - var(--stick) - 9rem);overflow-y:auto}
}
.rank-controls{display:flex;flex-wrap:wrap;align-items:flex-end;justify-content:space-between;gap:var(--s-3) var(--s-4);margin-bottom:var(--s-4)}
.rank-controls .shade-row{flex:1 1 18rem;max-width:28rem;margin:0}
.rank-controls .shade-row select{width:100%;max-width:none}
.rank-table{margin:0;padding:var(--s-4) var(--card-pad) var(--s-2)}
/* The card's title, with the choice of order at its right. */
.rank-head{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:var(--s-2) var(--s-4);margin:0 0 var(--s-3)}
.rank-head h2{margin:0;font-size:var(--fs-lg)}
.rank-table .rank-num{width:3.5rem;font-variant-numeric:tabular-nums;color:var(--muted)}
.rank-table tbody .rank-num{font-weight:800;color:var(--accent-dark)}
.rank-table .table-scroll{border-top:1px solid var(--line)}
.rank-table caption{padding:var(--s-3) 0 var(--s-2);text-align:left;font-size:var(--fs-sm);font-weight:600;color:var(--muted)}
.rank-table thead th{position:sticky;top:0;z-index:1;background:#fff}
.rank-table th,.rank-table td{padding:10px 12px}
.rank-table th:first-child,.rank-table td:first-child{padding-left:10px}
/* The order of the rows, over the table. */
.rank-order{display:flex;align-items:center;gap:var(--s-2)}
.rank-order label{margin:0;white-space:nowrap}
.rank-order select{width:auto;max-width:100%;height:40px}
/* By island: each island's name over its districts. */
.rank-table .rank-group th{padding-top:var(--s-4);border-bottom:1px solid var(--ink);font-size:var(--fs-sm);font-weight:700;color:var(--muted)}
/* Each district's name opens its page; the district picked on the map has its row tinted and edged in the chamber's
   color. */
.rank-name{display:inline-block;min-height:24px;padding:0;border:0;background:none;color:var(--ink);font:inherit;font-weight:600;text-align:left;text-decoration:none;text-underline-offset:3px}
.rank-name:focus-visible{outline-offset:2px}
@media(hover:hover){.rank-name:hover{color:var(--accent-dark);text-decoration:underline}}
.rank-table tr.picked>*{background:var(--accent-soft)}
/* An unreliable estimate: a small red mark beside the figure, explained under the table. */
.unreliable-mark{display:inline-grid;place-items:center;width:18px;height:18px;margin-left:2px;border-radius:50%;background:var(--error-ink);color:#fff;font-size:12px;font-weight:800;line-height:1;vertical-align:1px;cursor:help}
.rank-key{margin:var(--s-2) 0 0;font-size:var(--fs-xs);color:var(--muted)}
.rank-table tr.picked>:first-child{box-shadow:inset 4px 0 0 var(--accent)}
/* Under each figure in the ranking, a bar from zero in the district's map shade, edged in ink so the lightest shows on
   white, with the margin of error as an ink whisker edged in white. Every row shares one scale. */
/* The estimate's column takes the room the table has to spare, so its bars are long enough to compare. */
.rank-table thead th:nth-child(3){width:36%}
.rank-bar{position:relative;display:block;width:100%;min-width:3rem;height:12px;margin-top:6px}
.rank-fill{position:absolute;top:1px;left:0;width:var(--bar-w,0);height:10px;border:1px solid var(--ink);border-radius:2px;forced-color-adjust:none}
.rank-fill.q1{background:var(--q1)}.rank-fill.q2{background:var(--q2)}.rank-fill.q3{background:var(--q3)}.rank-fill.q4{background:var(--q4)}.rank-fill.q5{background:var(--q5)}
.rank-whisker{position:absolute;top:5px;left:var(--whisker-x,0);width:var(--whisker-w,0);height:2px;background:var(--ink);box-shadow:0 0 0 1px #fff}
.rank-whisker::before,.rank-whisker::after{content:"";position:absolute;top:-3px;width:2px;height:8px;background:var(--ink);box-shadow:0 0 0 1px #fff}
.rank-whisker::before{left:0}.rank-whisker::after{right:0}
.rank-table tr.picked .rank-num{color:var(--accent-dark)}
#map-table th[scope=row]{white-space:nowrap}
.page-body>.page-tabs:first-child{margin-top:0}

/* Data and methods: a list of its sections that stays in view beside the page, and each section as a card. */
.data-layout{display:grid;grid-template-columns:11rem minmax(0,1fr);gap:var(--s-6);align-items:start;margin-top:var(--s-5)}
.data-nav{position:sticky;top:calc(var(--stick) + var(--s-4))}
.data-nav ul{display:grid;gap:var(--s-1);margin:0;padding:0;list-style:none}
.data-nav a{display:block;padding:var(--s-2) var(--s-3);border-left:3px solid var(--line);color:var(--ink);font-weight:600;text-decoration:none}
.data-nav a[aria-current]{border-left-color:var(--accent);background:var(--accent-soft);color:var(--accent-dark)}
.data-section{padding:0;background:transparent;scroll-margin-top:calc(var(--stick) + var(--s-4))}
.data-section+.data-section{margin-top:var(--s-7)}
.data-section>h2{margin:0 0 var(--s-3);padding-bottom:6px;border-bottom:2px solid var(--ink)}
.data-section :is(p,ul,ol){max-width:var(--measure)}
.data-section h3{margin:var(--s-6) 0 var(--s-2);font-size:var(--fs-lg)}
.data-section h4{margin:var(--s-5) 0 var(--s-2);font-size:var(--fs-base)}
.data-section section{scroll-margin-top:calc(var(--stick) + var(--s-4))}
.data-section .terms{margin-top:var(--s-3)}
.check-part{margin-top:var(--s-6)}
.check-part>h3{margin-top:0}

/* Accessibility statement: docs/ACCESSIBILITY.md, rendered into the page by the server */
.statement h1{max-width:var(--measure)}
.statement h2{margin:var(--s-6) 0 var(--s-3)}
.statement .page-body>:first-child{margin-top:0}
.statement p,.statement ul{max-width:var(--measure);line-height:1.6}
.statement li+li{margin-top:var(--s-2)}

/* Footer: the colophon at the foot of the page, under an ink rule. */
footer{background:var(--bg);color:var(--ink);padding:var(--s-6) 0 var(--s-6);border-top:1px solid var(--line);font-size:var(--fs-base)}
/* Room under the footer for the agent's round button, which floats over the bottom right of the page. */
footer{padding-bottom:calc(var(--s-6) + 72px)}
footer a{color:var(--accent-dark)}
.footer-inner{display:grid;grid-template-columns:minmax(0,1.6fr) repeat(3,minmax(0,1fr));gap:var(--s-6) var(--s-6);align-items:start}
.footer-about p{max-width:36rem;margin:var(--s-4) 0 0;font-size:var(--fs-sm);line-height:1.6;color:var(--muted)}
.footer-brand{display:flex;align-items:center;gap:12px}
.footer-brand img{display:block;flex:none;width:40px;height:40px}
.footer-name{display:grid;margin:0;line-height:1.25}
.footer-name strong{font-family:var(--display);font-stretch:125%;font-size:var(--fs-lg);font-weight:800;letter-spacing:.12em;color:var(--ink)}
.footer-name span{font-size:var(--fs-sm);color:var(--muted)}
.footer-title{margin:0 0 var(--s-3);font-size:var(--fs-sm);font-weight:700;color:var(--ink)}
.footer-col ul{display:grid;gap:10px;margin:0;padding:0;list-style:none}
.footer-col p{margin:0}

/* Where the bar beside the docked agent is narrow, its two links say "Search another" and "Compare another", so they
   and the share actions fit on one row; their names still end in "district". */
@media(min-width:1200px) and (max-width:1399px){
  .bar-long{position:absolute;width:1px;height:1px;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
}

/* Smaller screens. Five widths: 1199 (the agent floats), 1023 (tablet), 760 (header, set with the header above), 640
   (phone), 480 (small phone). */
@media(max-width:1023px){
  /* Find in one column: the switch, the search and the numbers, then the map. */
  html[data-page=home] .stage{grid-template-columns:minmax(0,1fr);grid-template-areas:"find" "map"}
  .topic-starters{grid-template-columns:repeat(2,minmax(0,1fr))}
  .footer-inner{grid-template-columns:repeat(3,minmax(0,1fr))}.footer-about{grid-column:1/-1}
  /* The section list runs across the top of the data page, and scrolls sideways on its own when it must. */
  .data-layout{grid-template-columns:minmax(0,1fr);gap:var(--s-4)}
  .data-nav{position:static}
  .data-nav ul{display:flex;gap:var(--s-1);overflow-x:auto;scrollbar-width:none}
  .data-nav a{border-left:0;border-bottom:3px solid var(--line)}
  .data-nav a[aria-current]{border-bottom-color:var(--accent)}
}
@media(max-width:640px){
  :root{--head-gap:24px;--block-gap:20px;--fs-lead:16px}
  .stage{gap:var(--s-3);padding-top:var(--s-4)}
  .hero{min-height:0}
  .hero .lede{font-size:var(--fs-base)}
  .inputrow,.question-row{flex-direction:column}
  .inputrow button,.question-row button{width:100%}
  /* The button sits under the box here, so the suggestions open below the button instead of covering it. */
  .inputrow{position:relative}.combo{position:static}
  .profile-stats{grid-template-columns:repeat(2,minmax(0,1fr))}
  .profile-stats>div:nth-child(odd){padding-left:0;border-left:0}
  .profile-stats>div:nth-child(n+3){border-top:1px solid var(--line)}
  .profile-outreach{grid-template-columns:minmax(0,1fr)}.profile-outreach>:not(h2){grid-column:1}.profile-outreach li>*{min-width:0}
  .topic-starters{grid-template-columns:minmax(0,1fr)}
  #messages{padding:16px 16px 8px}
  .switch{flex-direction:column;gap:10px}.switch:before{flex:none;width:40px}.switch:after{display:none}
  .zoom-buttons button{width:40px;height:40px;font-size:var(--fs-md)}
  /* Rows of choices wrap onto a second line rather than running off the screen. */
  .island-tabs{flex-wrap:wrap}
  /* A district's page: the district's name and who and where it is first, then its map, short, then the profile, so
     the map never fills the first screen before the reader knows which district this is. */
  html[data-page=district] .stage{grid-template-columns:minmax(0,1fr);grid-template-areas:"bar" "head" "map" "prof"}
  html[data-page=district] .map-frame{aspect-ratio:2/1}
  .district-bar{width:100%;justify-content:space-between}
  .district-head{padding:var(--s-3)}
  .bar-link{padding:8px 12px;font-size:var(--fs-sm)}
  /* The bar's two links say "Search another" and "Compare another" on a phone, so both fit on one row; their names
     still end in "district". */
  .bar-long{position:absolute;width:1px;height:1px;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
  .district-bar{gap:var(--s-2)}
  .share-bar{margin-left:0}
  .share-bar .action{padding:6px 8px}
  .page-tabs{flex-wrap:wrap}.page-tabs [role=tab]{padding:var(--s-3) var(--s-2)}
  .rank-controls .shade-row{max-width:none}
  #source-table thead{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0)}
  #source-table tr{display:block;padding:10px 14px;border-bottom:1px solid var(--line)}
  #source-table tbody tr:last-child{border-bottom:0}
  #source-table td{display:block;padding:0;border:0;white-space:normal}
  #source-table td+td{color:var(--muted);font-size:var(--fs-sm)}
  footer{padding-top:var(--s-6)}.footer-inner{grid-template-columns:1fr;gap:var(--s-5)}
}
@media(max-width:480px){
  .chamber-cols{grid-template-columns:1fr}
  .profile-stats .num{font-size:var(--fs-xl)}
  .seat-row{grid-template-columns:minmax(0,1fr)}.seat-island{padding-top:0}
  /* Eight numbers to a row, so each island's numbers line up in columns and none sits alone on a row. */
  .seat-nums{display:grid;grid-template-columns:repeat(8,minmax(0,1fr))}.seat-index .seat-nums a{min-width:0}
  .home-ask textarea{min-height:72px}
  .mast-number{font-size:60px}
  .chamber-switch button{min-width:6rem;padding:6px 14px}
  .chips{grid-template-columns:repeat(auto-fill,minmax(7.75rem,1fr))}.match,.zip-form .match{padding-left:8px;padding-right:8px;gap:6px;font-size:var(--fs-xs)}
}

@media(hover:hover){
.textbutton:not(:disabled):hover{text-decoration:underline;text-decoration-thickness:2px}
.nav-links a:not([aria-current]):hover{color:#fff;box-shadow:inset 0 -4px 0 rgb(255 255 255 / .45)}
.inputrow button:not(:disabled):hover,.question-row button:not(:disabled,[aria-disabled=true]):hover,.button:not(.secondary,:disabled):hover,.chat-fab:hover{background:var(--gold-hover)}
.button.secondary:not(:disabled):hover{background:var(--surface)}
.page-tabs [role=tab][aria-selected=false]:hover{color:var(--ink);border-bottom-color:var(--line)}.cmp-remove:hover{background:#fff}.data-nav a:not([aria-current]):hover{background:var(--subtle)}
.match.house:hover{background:var(--house-soft-hover)}.match.senate:hover{background:var(--senate-soft-hover)}
.more-questions:hover,.examples button:not(:disabled,[aria-disabled=true]):hover,.topic .starter:hover,.followup:not([aria-disabled=true]):hover{text-decoration-thickness:2px}
.chat-card :is(.examples button,.chat-starters .starter):not([aria-disabled=true]):hover,#log .followups .followup:not([aria-disabled=true]):hover{background:var(--accent-soft-hover);border-color:var(--accent)}
.island-tabs button[aria-pressed=false]:hover,.zoom-buttons button:hover,.seat-nums a:hover{background:var(--accent-soft)}
.seat-chamber.senate .seat-nums a:hover{background:var(--senate-soft)}
.switch-offer .followup:not([aria-disabled=true]):hover,.pending .cancel:hover{background:var(--accent-soft)}.retry:not([aria-disabled=true]):hover{background:var(--error-bg)}
.share-bar .action:hover,.bar-link:hover{background:var(--accent-soft)}.chamber-switch button[aria-pressed=false]:hover{background:var(--surface)}.chat-min:hover{background:var(--surface)}
.sources-fold>summary:hover{text-decoration:underline}
.segmented [data-chamber=house][aria-pressed=false]:hover{background:var(--house-soft)}.segmented [data-chamber=senate][aria-pressed=false]:hover{background:var(--senate-soft)}
}
/* Touch screens: larger targets for controls and for links that stand alone in lists. */
@media(pointer:coarse){
#map.free{touch-action:pan-y;cursor:auto}
.island-tabs button,.segmented button,.match,.suggest .examples button,.more-questions,.followup,.retry,.pending .cancel,.topic .starter,.share-bar .action{min-height:44px}
.seat-nums a{min-width:40px;height:40px}
.zoom-buttons button{width:40px;height:40px}
.footer-col ul{gap:0}.footer-col a{display:inline-block;padding:10px 0}
#source-table a{display:inline-block;padding:6px 0}
.cmp-remove{width:40px;height:40px}.data-nav a{min-height:44px}
}

/* At a glance says where its figures come from and the survey years they cover, with each figure's definition and
   sources one tap away. */
.glance-source{margin:var(--s-2) 0 0;padding-top:var(--s-2);border-top:1px solid var(--line);font-size:var(--fs-xs);line-height:1.5;color:var(--muted)}
.glance-about .glance-defs{margin:0;padding:var(--s-1) 0 0;font-size:var(--fs-xs);line-height:1.5;color:var(--muted)}
.glance-defs>div+div{margin-top:var(--s-2)}
.glance-defs dt{font-weight:600;color:var(--ink)}
.glance-defs dd{margin:0}.glance-defs dd p{margin:2px 0 0}
/* Which of a group's measures a section shows, as a line under its title. */
.profile-intro{margin:0 0 12px;font-size:var(--fs-sm);line-height:1.5;color:var(--muted)}
/* Compare: each part of a group under its own title, its notes, then its table; a row's source numbers after its
   name; notes on how a row's figures were made under it; county figures in a cell of their own. */
.cmp-part+.cmp-part{margin-top:var(--s-4);padding-top:var(--s-3);border-top:1px solid var(--line)}
.cmp-measure sup{margin-left:3px;font-size:.75em;line-height:0;color:var(--muted)}
.cmp-table .cmp-notes td{padding:0 0 var(--s-2);font-size:var(--fs-xs);line-height:1.5;color:var(--muted)}
.cmp-table .cmp-notes .meaning{max-width:var(--measure);padding:10px 12px;border-radius:var(--r-sm);background:var(--subtle)}
.cmp-table .cmp-notes p{margin:4px 0 0}.cmp-table .cmp-notes .meaning>:first-child{margin-top:0}
.cmp-table .cmp-figure.county .num{color:var(--ink)}
.cmp-table .cmp-figure.county .cmp-place{position:static;display:block;width:auto;height:auto;margin:0 0 2px;overflow:visible;clip:auto;white-space:normal;font-size:var(--fs-xs);color:var(--muted)}
.cmp-table .cmp-figure.missing .none{font-weight:600;color:var(--ink)}
/* A comparison or ranking answer's next step: the same places on Compare, or the measure on Rankings. */
.answer-actions{display:flex;flex-wrap:wrap;gap:var(--s-1) var(--s-4);margin:var(--s-2) 0 var(--s-3);font-size:var(--fs-sm);font-weight:600}
.answer-actions a{display:inline-flex;align-items:center;min-height:32px}
/* Whose checks the Checks section shows: the served data's build, or not, and how the last build attempt went. */
.check-identity{max-width:var(--measure);margin:0 0 var(--s-4);padding:10px 14px;border:1px solid var(--line);border-left:4px solid var(--accent);border-radius:var(--r-sm);background:#fff;font-size:var(--fs-sm);line-height:1.5}
.check-identity:has(.fail){border-left-color:var(--ink)}
.identity-line{margin:0}.identity-line+.identity-line{margin-top:6px}
/* How this site answers, under the agent's welcome, when it is the basic lookup alone. */
.chat-mode{width:fit-content;max-width:90%;margin:0 0 var(--s-3);padding:6px 12px;border:1px solid var(--line);border-radius:var(--r-sm);background:#fff;font-size:var(--fs-xs);line-height:1.5;color:var(--muted)}
/* The notice that replaces the question boxes when the chat is locked on this site. */
.chat-lock{max-width:46rem;margin:0 0 var(--s-3);padding:12px 16px;border:1px solid var(--gold-line);border-left:6px solid var(--gold);border-radius:var(--r-sm);background:#fff;font-size:var(--fs-sm);line-height:1.5;color:var(--ink)}
.chat-lock p{margin:0}
.chat-lock .chat-lock-title{margin-bottom:4px;font-weight:700}
.chat-lock a{color:var(--accent);font-weight:600}
html[data-answers=locked] #question-form :is(textarea,button):disabled{cursor:not-allowed}
/* The House or Senate switch over the numbers, where the map comes after them (one column); the map's own switch shows
   beside the map. Only one of the two shows at a time, so the keyboard meets one. */
.find-switch{display:none}
@media(max-width:1023px){
  html[data-page=home] .find-switch{display:flex;width:100%;max-width:20rem;margin:var(--s-4) 0 0}
  .find-switch button{flex:1;min-width:0}
  html[data-page=home] #district-map .map-controls .chamber-switch{display:none}
}
/* On a phone the round button shows its icon alone, so it covers less of the page under it; its name stays for screen
   readers, and the New answer badge still shows. */
@media(max-width:640px){
  .chat-fab{gap:6px;min-width:56px;padding:0 16px;justify-content:center}
  .chat-fab .fab-label{position:absolute;width:1px;height:1px;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
  /* The section links stop short of the button's column, so wherever the page scrolls the button never sits on one. */
  html.chat-floats .profile-jumps ol{padding-right:56px}
}

/* Printed district summary. The page prints as it is until a district profile loads; from then on the summary prints in
   its place, on one US Letter page, with every address written out since paper cannot follow links. The district's
   chamber color marks its column, the group names and the rule under the heading. */
.print-sheet{display:none;--tint:var(--house-soft);--rule:var(--house)}
.print-sheet[data-chamber=senate]{--tint:var(--senate-soft);--rule:var(--senate)}
@media print{
  /* Custom properties do not reach @page, so its margin is written here. */
  @page{size:letter;margin:.5in}
  body.has-sheet{background:#fff}
  body.has-sheet>:not(.print-sheet){display:none!important}
  body.has-sheet .print-sheet{display:block}
}
/* The summary's own layout holds on screen too, so the page can lay it out unseen at the printed width (7.5in, a
   Letter page inside its margins) and fit it to one page before it prints. */
.print-sheet.measure{display:block;position:absolute;top:0;left:-9999px;width:7.5in;visibility:hidden}
.print-sheet{font-family:var(--sans);font-size:var(--pt-base);line-height:1.35;color:var(--ink);-webkit-print-color-adjust:exact;print-color-adjust:exact}
.print-sheet p{margin:0}
.print-sheet h1{margin:1pt 0 0;font-size:var(--pt-title);line-height:1.1}
.print-sheet h2{margin:0 0 3pt;padding-bottom:2pt;border-bottom:1pt solid var(--ink);font-size:var(--pt-sm)}

/* Heading: the district on the left; where to find it online, and how current it is, on the right */
.sheet-head{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:6pt 18pt;align-items:end;padding-bottom:6pt;border-bottom:2.5pt solid var(--rule)}
.sheet-kicker{font-size:var(--pt-xs);font-weight:700;color:var(--muted)}
.sheet-where{margin-top:2pt;font-size:var(--pt-md)}
.sheet-member{margin-top:2pt;font-size:var(--pt-sm)}
.sheet-member b{font-weight:600}
.sheet-live{max-width:3.2in;padding:4pt 8pt;border:1pt solid var(--rule);border-radius:4pt;font-size:var(--pt-xs);color:var(--muted)}
.print-sheet .sheet-live .sheet-url{font-size:var(--pt-sm);font-weight:700;color:var(--ink)}
.sheet-dates{margin-top:2pt}
.sheet-about{margin-top:5pt;font-size:var(--pt-sm);color:var(--muted)}
.sheet-about b{font-weight:600;color:var(--ink)}
/* The Commission's description can run long, so it takes the smallest print size. */
.sheet-about .sheet-plan{font-size:var(--pt-xs)}
.sheet-section{margin-top:var(--pt-gap);break-inside:avoid}

/* Key figures: an estimate column and a margin column for each place, the district's tinted, sources last */
.sheet-figures{width:100%;border-collapse:collapse;font-size:var(--pt-base);font-variant-numeric:tabular-nums}
/* Two classes, to win over the page's own table rules. */
.print-sheet .sheet-figures th,.print-sheet .sheet-figures td{padding:2pt 0;border-bottom:1px solid var(--line);vertical-align:baseline;background:none;font-weight:400;text-align:left;white-space:nowrap}
.print-sheet .sheet-figures thead th{padding-top:0;border-bottom:1pt solid var(--ink);font-size:var(--pt-xs);font-weight:700;color:var(--muted)}
.print-sheet .sheet-figures thead .place{padding:2pt 8pt;text-align:center}
.print-sheet .sheet-figures thead .place.home{color:var(--ink)}
.print-sheet .sheet-figures tbody th{padding-right:8pt;white-space:normal}
.print-sheet .sheet-figures .home{background:var(--tint)}
.print-sheet .sheet-figures .num{width:1%;padding:2pt 3pt 2pt 7pt;text-align:right}
.print-sheet .sheet-figures .num.home{font-weight:700}
.print-sheet .sheet-figures .moe{width:1%;padding-right:7pt;font-size:var(--pt-xs);color:var(--muted)}
.print-sheet .sheet-figures .src{width:1%;padding-left:4pt;font-size:var(--pt-xs);color:var(--muted);text-align:center}
.print-sheet .sheet-figures .sheet-none{padding:2pt 10pt;font-size:var(--pt-xs);color:var(--muted);text-align:center}
.print-sheet .sheet-figures .sheet-group{padding:5pt 0 1pt;font-size:var(--pt-xs);line-height:1.2;font-weight:700;color:var(--rule)}
.sheet-note{margin-top:3pt;font-size:var(--pt-xs);color:var(--muted)}

/* Programs and sources: one entry each, its address on a line of its own */
.sheet-list{margin:0;padding:0;list-style:none;font-size:var(--pt-sm)}
ol.sheet-list{padding-left:12pt;list-style:decimal}
.sheet-list li{margin:0 0 3pt;break-inside:avoid}
.sheet-program-group{margin:4pt 0 2pt;font-size:var(--pt-sm);break-after:avoid}
.sheet-url{display:block;font-size:var(--pt-xs);color:var(--muted);overflow-wrap:anywhere}
.sheet-foot{margin-top:var(--pt-gap);padding-top:4pt;border-top:1px solid var(--line);font-size:var(--pt-xs);color:var(--muted)}
/* A printout the reader chose section by section runs as many pages as it needs: sections break between rows, a
   table's headings repeat on each page, and a heading stays with what follows it. */
.print-sheet:not(.one-page) .sheet-section{break-inside:auto}
.print-sheet :is(h2,h3,.sheet-program-group){break-after:avoid}
.print-sheet tr{break-inside:avoid}
.print-sheet .sheet-figures thead{display:table-header-group}
.print-sheet .sheet-sub{margin:6pt 0 2pt;font-size:var(--pt-sm);font-weight:700}
.print-sheet .sheet-figures .words{padding:2pt 0 2pt 6pt;font-size:var(--pt-xs);white-space:normal}
.print-sheet .sheet-figures .words .compare-line{font-size:inherit}
.print-sheet .sheet-figures th.words{font-weight:700;color:var(--muted)}
.print-sheet .sheet-scope{margin:0 0 2pt}
.print-sheet .sheet-plan-box{margin-top:6pt}

/* What a short label stands for: a disclosure under each tile, chart, profile row and figure card with a plain
   definition, the official label, who the figure counts and a link to the glossary. Summary and link are at least
   24px tall to tap. Rules here come last, so they win over the tile, card and profile rules above. */
details.meaning{margin:6px 0 0;padding:0;border:0;font-size:var(--fs-xs);line-height:1.5;color:var(--muted)}
.meaning summary{padding:4px 0;font-weight:600}
.meaning p,.meaning dl{margin:4px 0 0;font-size:inherit;line-height:1.5}
.meaning dl div+div{margin-top:4px}
.meaning dt{font-weight:600;color:var(--ink)}
.meaning dd{margin:0}
.meaning-more a{display:inline-block;padding:4px 0;color:var(--accent);font-weight:600}
.tile .meaning{margin-top:auto;padding-top:6px}
.tile-meta+.meaning{margin-top:0}
/* The lines under a tile's label sit together at its foot. */
.tile>:nth-child(n+3){margin-top:0;padding-top:4px}.tile>:nth-child(3){margin-top:auto;padding-top:6px}
.fact .meaning span:not(.visually-hidden){display:inline;margin:0;font-size:inherit;color:inherit}
@media print{.meaning{display:none}}

/* Glossary terms */
.terms{max-width:var(--measure);margin:var(--s-3) 0 0}
.terms>div{padding:var(--s-4) 0;border-top:1px solid var(--line);scroll-margin-top:calc(var(--stick) + var(--s-4))}
.terms>div:target{margin:0 calc(-1 * var(--s-3));padding:var(--s-4) var(--s-3);border-radius:var(--r-sm);background:var(--accent-soft)}
.terms dt{font-size:var(--fs-lg);font-weight:700;line-height:1.3}
.terms dd{margin:6px 0 0;line-height:1.6}
.terms dd p{margin:0 0 8px}.terms dd p:last-child{margin:0}

/* Outreach, the compare page's third tab: one program's group across House or Senate districts, in tiers whose ranges
   overlap. The accent follows the chamber shown, as it does in the chat. */
#panel-outreach[data-chamber=senate]{--accent:var(--senate);--accent-dark:var(--senate-dark);--accent-soft:var(--senate-soft)}
.outreach-choose{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:16px 32px;align-items:start;margin:0 0 var(--block-gap)}
.outreach-choose fieldset{margin:0;padding:0;border:0;min-width:0}
.outreach-choose legend{padding:0;margin:0 0 8px;font-size:var(--fs-sm);font-weight:600;color:var(--ink)}
.pair-options{display:grid;grid-template-columns:repeat(auto-fit,minmax(10.5rem,1fr));gap:8px}
.pair-option{display:grid;grid-template-columns:auto minmax(0,1fr);grid-template-rows:auto 1fr;gap:4px 10px;align-items:baseline;align-content:start;margin:0;padding:12px 14px;background:#fff;border:1px solid var(--control);border-radius:var(--r-ctl);color:var(--ink);font-size:var(--fs-sm);font-weight:400;cursor:pointer}
.pair-option input,.chamber-option input{width:auto;height:auto;margin:0;accent-color:var(--accent)}
.pair-option input{grid-row:1/3;align-self:start;margin-top:3px}
.pair-title{font-size:var(--fs-base);font-weight:700}
.pair-who{grid-column:2;color:var(--muted);line-height:1.4}
.pair-option:has(input:checked){background:var(--accent-soft);border-color:var(--accent);box-shadow:inset 0 0 0 1px var(--accent)}
.pair-option:has(input:focus-visible),.chamber-option:has(input:focus-visible){outline:3px solid var(--accent);outline-offset:2px}
.pair-option input:focus-visible,.chamber-option input:focus-visible{outline:none}
.chamber-options{display:inline-flex;border:1px solid var(--control);border-radius:var(--r-ctl);overflow:hidden;background:#fff}
.chamber-option{display:flex;align-items:center;gap:8px;margin:0;padding:10px 18px;font-size:var(--fs-base);font-weight:600;cursor:pointer}
.chamber-option+.chamber-option{border-left:1px solid var(--control)}
.chamber-option.house{color:var(--house)}.chamber-option.senate{color:var(--senate)}
.chamber-option.house input{accent-color:var(--house)}.chamber-option.senate input{accent-color:var(--senate)}
.chamber-option.house:has(input:checked){background:var(--house-soft)}.chamber-option.senate:has(input:checked){background:var(--senate-soft)}
#out-status:empty{min-height:0;margin:0}
.outreach-result{padding:var(--s-5) var(--card-pad)}
.outreach-result h2{margin:0 0 12px}
.outreach-lead{margin:0 0 8px;font-size:var(--fs-md);line-height:1.55;max-width:var(--measure)}
.outreach-year{margin:0 0 12px;font-size:var(--fs-sm);color:var(--muted)}
.outreach-facts{margin:0 0 8px;padding-left:20px;max-width:var(--measure)}
.outreach-facts li{margin:0 0 4px}
.outreach-result .num{font-variant-numeric:tabular-nums}
.outreach-result .moe{font-size:var(--fs-sm);color:var(--muted)}
.outreach-caution{color:var(--error-ink);font-size:var(--fs-sm)}
td .outreach-caution{display:block;margin-top:2px;font-size:var(--fs-xs)}
td .outreach-flag{display:block;margin-top:4px;font-size:var(--fs-xs);line-height:1.5;color:var(--muted)}
.outreach-result details.meaning{max-width:var(--measure)}
.outreach-note{max-width:var(--measure);margin:var(--s-3) 0 0;font-size:var(--fs-sm);line-height:1.5;color:var(--muted)}
.outreach-programs{margin:var(--block-gap) 0 0}
.outreach-programs h3{margin:0 0 4px}
.outreach-programs .program:first-of-type{border-top:0;padding-top:6px}
.use-note{max-width:var(--measure);margin:var(--block-gap) 0 0;font-size:var(--fs-sm);color:var(--muted)}
.use-note b{color:var(--ink)}
.tier.top{margin:var(--block-gap) 0 0}
.tier.top h3,.tier-others{margin:0 0 4px}
.tier-others{margin-top:var(--block-gap)}
.tier-note{margin:0 0 10px;font-size:var(--fs-sm);color:var(--muted);max-width:var(--measure)}
details.tier{margin-top:12px;padding-top:12px}
details.tier summary{padding:4px 0}
details.tier[open] summary{margin-bottom:6px}
.tier-table th[scope=row]{background:transparent;white-space:nowrap}
.tier-table tbody tr:last-child th{border-bottom:0}
.tier-table td:last-child{white-space:normal}
.tier-table td.use{color:var(--muted)}
.tier-left{margin:6px 0 0;padding-left:20px;font-size:var(--fs-sm)}
.outreach-sources{margin:var(--block-gap) 0 0;padding-top:12px;border-top:1px solid var(--line);font-size:var(--fs-sm);color:var(--muted)}
.outreach-sources-title{margin:0 0 4px;font-weight:600;color:var(--ink)}
.outreach-sources ul{margin:0;padding:0;list-style:none}.outreach-sources li+li{margin-top:6px}
.source-year{display:block}
@media(max-width:640px){
  .outreach-choose{grid-template-columns:minmax(0,1fr)}
  .pair-options{grid-template-columns:minmax(0,1fr)}
  /* Each district becomes a short card: its name, then its figure, then the program-use figure. */
  .tier-table thead{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0)}
  .tier-table tr{display:block;padding:10px 14px;border-bottom:1px solid var(--line)}
  .tier-table tbody tr:last-child{border-bottom:0}
  .tier-table th,.tier-table td{display:block;padding:0;border:0;white-space:normal}
  .tier-table td:before{content:attr(data-label) ": ";color:var(--muted);font-size:var(--fs-xs)}
  .tier-table td+td{margin-top:2px}
}
@media(pointer:coarse){.pair-option,.chamber-option{min-height:44px}.tier-table th a{display:inline-block;padding:6px 0}}

/* The profile's outreach note: groups where the district is in the top tier, under the share buttons and above the sections. */
.profile-outreach{display:grid;grid-template-columns:auto minmax(0,1fr);gap:2px var(--s-4);align-items:baseline;margin:0 0 var(--s-4);padding:var(--s-3) var(--card-pad);background:var(--accent-soft);border:1px solid var(--accent-soft-hover);border-radius:var(--r-card);box-shadow:none;font-size:var(--fs-sm);line-height:1.45}
.profile-outreach>:not(h2){grid-column:2}
.profile-outreach li{display:flex;flex-wrap:wrap;align-items:baseline;column-gap:var(--s-3)}
.profile-outreach-none{margin:var(--s-3) 0 0;padding-top:var(--s-3);border-top:1px solid var(--line);font-size:var(--fs-sm);line-height:1.5;color:var(--muted)}
.profile-outreach-none a{font-weight:600}
.profile-outreach h2{margin:0;font-size:var(--fs-sm);font-weight:700;color:var(--ink)}
.profile-outreach ul{margin:0;padding:0;list-style:none}
.profile-outreach li+li{margin-top:10px}
.profile-outreach p{margin:0}
.profile-outreach a{display:inline-block;padding:2px 0;font-weight:600}
.profile-outreach-more{margin-top:2px!important;color:var(--muted)}
.profile-outreach-more:empty{display:none}

/* The checks section of the data page: the checks and the assistant's scores. */
.result{display:inline-block;padding:2px 10px;border:1px solid var(--line);border-radius:var(--r-pill);background:var(--surface);color:var(--muted);font-size:var(--fs-sm);font-weight:600;line-height:1.5;white-space:nowrap}
.result.pass{background:var(--house-soft);border-color:var(--house);color:var(--house-dark)}
.result.fail{background:var(--error-bg);border-color:var(--error-line);color:var(--error-ink)}
#checks td:last-child{white-space:normal}
#checks table th[scope=row]{font-weight:600;background:transparent}
#checks .num{text-align:right;white-space:nowrap;font-variant-numeric:tabular-nums}
#checks tbody tr:last-child th{border-bottom:0}
#checks .bad{color:var(--error-ink);font-weight:700}
#check-table .type-cell,#check-table .result-cell{white-space:nowrap}
#check-table th:first-child{width:34%}
.data-table{font-size:var(--fs-sm)}
.data-table th,.data-table td{padding:10px 14px}
.table-block+.table-block{margin-top:var(--block-gap)}
.table-title{margin:0 0 10px;font-size:var(--fs-md)}
.scroll-hint{display:none;margin:0 0 var(--s-2);font-size:var(--fs-sm);color:var(--muted)}
.table-note{max-width:var(--measure);margin:10px 0 0;font-size:var(--fs-sm);color:var(--muted)}
.key-list,.limit-list{max-width:52rem;margin:0;padding-left:20px}
.key-list li,.limit-list li{margin:0 0 var(--s-2)}
.key-list:empty{display:none}
#population-notes{margin-bottom:var(--block-gap)}
.answer-tables{display:grid;grid-template-columns:minmax(0,1.5fr) minmax(0,1fr);gap:var(--block-gap) var(--s-6);align-items:start}
.answer-tables .table-block+.table-block{margin-top:0}
.answer-tables th[scope=row]{min-width:10rem}
.answer-tables td{min-width:9rem}
#answer-notes{margin-top:var(--block-gap)}
#checks details.table-toggle,#checks details.check-detail{margin:0;padding:0;border-top:0}
.table-toggle>summary{display:inline-flex;padding:10px var(--s-4);background:#fff;border:1px solid var(--accent);border-radius:var(--r-ctl);color:var(--accent-dark)}
.table-toggle[open]>summary{margin-bottom:var(--s-4)}
.check-details{display:grid;grid-template-columns:minmax(0,1fr);gap:10px}
#checks .check-detail{background:#fff;border:1px solid var(--line);border-radius:var(--r-ctl);scroll-margin-top:calc(var(--stick) + var(--s-4))}
.check-detail>summary{display:flex;align-items:center;gap:var(--s-3);padding:14px 18px;color:var(--ink)}
.detail-title{flex:1;min-width:0;font-weight:600}
.detail-body{padding:var(--s-1) 18px 20px;border-top:1px solid var(--line)}
.detail-body>p{max-width:var(--measure);margin:14px 0 0}
.detail-summary,.detail-label{font-weight:600}
.detail-body .key-list{margin-top:var(--s-2)}
.detail-body .table-block{margin-top:20px}
.check-detail:target{border-color:var(--accent);box-shadow:0 0 0 1px var(--accent)}
@media(max-width:1023px){
  .answer-tables{grid-template-columns:minmax(0,1fr)}
}
@media(max-width:640px){
  .answer-tables th[scope=row],.answer-tables td{min-width:0}
  .scroll-hint{display:block}
  .detail-body{padding:var(--s-1) var(--s-4) 18px}
  .check-detail>summary{padding:var(--s-3) 14px;align-items:flex-start}
  /* The check table becomes one card per check: name, then type and result, then the finding. */
  #check-table thead{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0)}
  #check-table tr{display:grid;grid-template-columns:auto 1fr;align-items:center;gap:6px 10px;padding:14px;border-bottom:1px solid var(--line)}
  #check-table tbody tr:last-child{border-bottom:0}
  #check-table th,#check-table td{display:block;padding:0;border:0;width:auto}
  #check-table th,#check-table th:first-child{grid-column:1/-1;width:auto}
  #check-table .result-cell{grid-row:2;grid-column:1}
  #check-table .type-cell{grid-row:2;grid-column:2;color:var(--muted);font-size:var(--fs-sm)}
  #check-table .found-cell{grid-column:1/-1;font-size:var(--fs-sm)}
}
@media(pointer:coarse){.check-detail>summary,.table-toggle>summary,details.fold>summary,.sources-fold>summary{min-height:44px}}

/* Loading: gray bars shaped like what is coming, with a slow shimmer that stops for readers who ask for less motion.
   Screen readers skip them; a status line says what is loading. */
.skeleton-bar{display:block;height:12px;margin:6px 0;border-radius:var(--r-sm);background:linear-gradient(90deg,var(--map-dim) 25%,var(--subtle) 50%,var(--map-dim) 75%);background-size:200% 100%;animation:shimmer 1.6s ease-in-out infinite}
.skeleton-bar.title{height:20px;margin:2px 0 14px}
.skeleton-bar.big{height:30px;margin:10px 0}
.skeleton-bar.block{height:auto;aspect-ratio:3/2;margin:var(--s-3) 0}
.skeleton-bar.w-20{width:20%}.skeleton-bar.w-30{width:30%}.skeleton-bar.w-45{width:45%}.skeleton-bar.w-60{width:60%}.skeleton-bar.w-80{width:80%}
.skeleton-row td{padding-top:14px;padding-bottom:14px}
.skeleton-stats{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,9rem),1fr));gap:var(--s-5);padding:var(--s-2) 0 var(--s-3)}
.profile-section.skeleton,.cmp-section.skeleton{padding:var(--s-4) var(--card-pad) var(--s-2)}
.cmp-map.skeleton-bar{height:auto;margin:0}
.cmp-card .profile-status{margin:0 0 var(--s-2);font-weight:600;color:var(--ink)}
@keyframes shimmer{from{background-position:100% 0}to{background-position:-100% 0}}
@media(prefers-reduced-motion:reduce){.skeleton-bar,.map-loading{animation:none}}
@media(max-width:640px){.skeleton-stats{grid-template-columns:repeat(2,minmax(0,1fr))}}
/* The rankings table while its figures load: a gray line for each row, in the table's columns but without its rules,
   and the districts gray on the map, fading in and out. */
.skeleton-line{display:grid;grid-template-columns:2.5rem minmax(0,9rem) 4.5rem 6rem;gap:var(--s-4);align-items:center;padding:12px 0}
.skeleton-line .skeleton-bar{width:100%;margin:0}
#map.waiting .district{fill:var(--map-dim);stroke:#fff;animation:waiting 1.6s ease-in-out infinite}
#map.waiting .labels{visibility:hidden}
@keyframes waiting{50%{opacity:.55}}
@media(prefers-reduced-motion:reduce){#map.waiting .district{animation:none}}
