/* WR Voter Guide — site styles (ported from prototype_v1.html design language) */
* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: #F4F6FA;
  color: #1a1a1a;
  font-size: 15px;
  line-height: 1.55;
}

.app { max-width: 760px; margin: 0 auto; padding: 0 16px 72px; }

/* header */
.site-head { padding: 14px 0 6px; }
.crumbs { font-size: 13px; color: #667; }
.crumbs a { color: #1B2E44; text-decoration: none; font-weight: 600; }
.crumbs a:hover { text-decoration: underline; }
.crumbs .sep { margin: 0 6px; color: #636a78; }

/* heads */
.page-head { background: #1B2E44; color: #fff; border-radius: 12px; padding: 22px 22px 18px; margin: 10px 0 16px; }
.page-head h1 { font-size: 22px; font-weight: 700; line-height: 1.25; margin-bottom: 6px; }
.page-head .sub { font-size: 13px; opacity: .8; }
.page-head .sub a { color: #cdd9ea; }
.page-head .back-link { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: #fff; background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.3); border-radius: 999px; padding: 3px 12px 3px 9px; margin-top: 10px; text-decoration: none; transition: background .15s; }
.page-head .back-link:hover, .page-head .back-link:focus-visible { background: rgba(255,255,255,.26); }
.page-head .back-link .arr { display: inline-flex; align-items: center; justify-content: center; width: 16px; height: 16px; border: 1.5px solid currentColor; border-radius: 50%; font-size: 11px; line-height: 1; }
h2 { font-size: 16px; margin: 22px 0 10px; color: #1B2E44; }

/* entry */
.race-list, .topic-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.race-card { display: block; background: #fff; border: 1.5px solid #e3e7ee; border-radius: 10px; padding: 14px 16px; text-decoration: none; color: inherit; transition: border-color .15s; }
.race-card:hover { border-color: #1B2E44; }
.race-name { font-weight: 700; color: #1B2E44; }
.race-sub { font-size: 12px; color: #636a78; margin-top: 3px; }
.topic-tile { display: block; background: #EEF2FF; border: 1.5px solid #dbe3f5; border-radius: 10px; padding: 12px 14px; font-weight: 600; font-size: 13px; color: #334; text-decoration: none; }

/* pills */
.pills { display: flex; flex-wrap: wrap; gap: 7px; margin: 12px 0 16px; }
.pill { font-size: 12px; font-weight: 600; padding: 6px 12px; border-radius: 999px; background: #fff; border: 1.5px solid #dfe4ec; color: #445; text-decoration: none; }
.pill.active { background: #1B2E44; border-color: #1B2E44; color: #fff; }
.pill:hover { border-color: #1B2E44; }

/* candidate cards (Track 1) */
.cand-list { display: grid; gap: 10px; }
.cand-card { display: block; background: #fff; border: 1.5px solid #e3e7ee; border-radius: 12px; padding: 14px 16px; text-decoration: none; color: inherit; }
.cand-card:hover { border-color: #1B2E44; }
.cand-name { font-weight: 700; color: #1B2E44; }
.signals-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 14px; margin: 10px 0 6px; }
.sig-cell { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.sig-topic { color: #445; }
.cand-actions { margin-top: 6px; }
.lnk { font-size: 13px; font-weight: 600; color: #1B2E44; }

/* score dots */
.dot { width: 13px; height: 13px; border-radius: 50%; flex: none; display: inline-block; }
.dot.gr { background: #2e9e5b; }
.dot.y  { background: #c7860a; }
.dot.r  { background: #d43c3c; }
.dot.g  { background: #c9cfd8; box-shadow: 0 0 0 1px #667084; }

/* Track 2 */
.topic-sec { background: #fff; border: 1.5px solid #e3e7ee; border-radius: 12px; padding: 16px 18px; margin-bottom: 12px; }
.topic-sec h2 { margin-top: 0; display: flex; align-items: center; gap: 8px; font-size: 17px; }
.sec-score { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: #636a78; }
.grey-lbl { text-transform: none; letter-spacing: 0; color: #636a78; font-weight: 600; }
.q-block { padding: 10px 0; }
.q-head { display: flex; align-items: baseline; gap: 8px; font-size: 13.5px; }
.q-label { font-weight: 600; color: #334; }
.q-tag { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: #667084; margin: 10px 0 2px; }
.q-tag.key { color: #1B2E44; }
.sels { margin: 6px 0 0 4px; padding-left: 16px; font-size: 13.5px; }
.sels li { margin-bottom: 3px; }
.opt-cls { font-size: 11px; color: #667084; }
.free { margin: 6px 0 0 4px; font-size: 13.5px; color: #334; white-space: pre-wrap; }

/* methodology */
.meth { background: #fff; border: 1.5px solid #e3e7ee; border-radius: 12px; padding: 18px 20px; }
.meth p, .meth ul { margin-bottom: 10px; font-size: 14px; }
.meth ul { padding-left: 20px; }
.meth li { margin-bottom: 6px; }
.meth h3 { font-size: 14px; margin: 16px 0 8px; color: #1B2E44; }
.meth a { color: #1B2E44; }
.meth .endorse { margin-top: 14px; font-weight: 700; color: #1B2E44; }

/* audit expander (collapsed by default) */
.cls-audit { margin-top: 14px; }
.cls-audit summary { display: flex; align-items: center; gap: 10px; font-size: 16px; font-weight: 700; color: #1B2E44; cursor: pointer; list-style: none; }
.cls-audit summary::-webkit-details-marker { display: none; }
.cls-audit summary::after { content: '\25B8'; margin-left: auto; color: #667084; transition: transform .15s; }
.cls-audit[open] summary::after { content: '\25BE'; }
.cls-audit[open] summary { margin-bottom: 12px; }
.cls-table .q-cell { width: 34%; }
.cls-table { width: 100%; border-collapse: collapse; font-size: 12px; margin-top: 8px; }
.cls-table th, .cls-table td { border: 1px solid #e6e9ef; padding: 5px 8px; text-align: left; }
.cls-strong { color: #217a44; font-weight: 700; }
.cls-moderate { color: #916c00; font-weight: 700; }
.cls-opposing { color: #d43c3c; font-weight: 700; }
.cls-neutral { color: #636a78; }

/* footer */
.site-foot { margin-top: 28px; padding-top: 14px; border-top: 1px solid #e3e7ee; font-size: 12px; color: #636a78; }
.site-foot a { color: #1B2E44; }

/* compact single-row card (topic-filtered race pages) */
.cand-row {
  display: flex; align-items: center; gap: 10px;
  background: #fff; border: 1.5px solid #e3e7ee; border-radius: 10px;
  padding: 10px 14px; text-decoration: none; color: inherit;
}
.cand-row:hover { border-color: #1B2E44; }
.cand-row .cand-name { font-weight: 700; color: #1B2E44; }
.cand-row .row-link { font-size: 13px; color: #1B2E44; white-space: nowrap; margin-left: auto; }


/* expandable candidate rows (topic race pages) */
details.cand-x { background: #fff; border: 1.5px solid #e3e7ee; border-radius: 10px; }
details.cand-x + details.cand-x { margin-top: 8px; }
/* Safari <16.4 ignores display:flex on <summary>: the flex row lives on an
   inner .sum-row span instead (identical layout on modern browsers).
   Padding stays on summary so hit target + focus ring are unchanged. */
details.cand-x summary {
  padding: 10px 14px; cursor: pointer; list-style: none;
}
details.cand-x summary::-webkit-details-marker { display: none; }
details.cand-x .sum-row { display: flex; align-items: center; gap: 10px; }
details.cand-x .sum-row::after { content: '\25B8'; margin-left: auto; color: #667084; transition: transform .15s; }
details.cand-x[open] .sum-row::after { content: '\25BE'; }
details.cand-x .cand-name { font-weight: 700; color: #1B2E44; flex: 1; }
details.cand-x .row-link { font-size: 13px; color: #1B2E44; }
details.cand-x .x-panel { padding: 2px 14px 12px; border-top: 1px solid #eef1f5; }
details.cand-x .x-panel .topic-sec { border: none; padding: 0; margin: 0; }
details.cand-x .x-full { display: inline-block; font-size: 12.5px; color: #1B2E44; margin-right: 16px; margin-top: 8px; }

/* question hierarchy: stem + indented sub-parts */
.q-stem { font-weight: 600; font-size: 14px; color: #223; margin: 14px 0 4px; }
.q-block.sub { margin-left: 18px; }
.sub-label { font-weight: 600; }
.q-label { font-weight: 600; }
.q-open { font-weight: 600; font-size: 13.5px; color: #334; }

/* answer-format chips */
.fmt { font-size: 11px; font-weight: 600; color: #5d6779; background: #eef1f6; border-radius: 6px; padding: 2px 8px; margin-left: 8px; white-space: nowrap; vertical-align: middle; }
p.free .fmt { margin-left: 6px; }


/* ===== Response presentation (from mockup decision, rolled out) ===== */
/* Dedicated answer class so question and response styles can never collide. */
ul.resp, p.resp, ol.resp {
  background: #F7F8FA;
  border-radius: 8px;
  padding: 8px 12px;
  margin-top: 6px;
}
@font-face {
  font-family: 'Kalam';
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url('/assets/fonts/Kalam-Light.ttf') format('truetype');
}
@font-face {
  font-family: 'Kalam';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/assets/fonts/Kalam-Regular.ttf') format('truetype');
}
ul.resp, p.resp, ol.resp {
  font-family: 'Kalam', 'Comic Sans MS', cursive, sans-serif;
  font-weight: 400;
  font-size: 15px;
  line-height: 1.5;
  color: #3a4150;
}
p.resp { font-weight: 400; line-height: 1.55; }
ol.resp { list-style-position: inside; padding-left: 12px; margin-left: 0; }
ol.resp li { margin-bottom: 4px; }
ul.resp { list-style: none; padding-left: 12px; }
ul.resp li { margin-bottom: 4px; padding-left: 18px; position: relative; }
ul.resp li::before { content: '\2013'; position: absolute; left: 0; top: 0; color: #667084; font-size: 14.5px; }

/* all-topics candidate view: collapsible topic sections */
details.topic-x { background: #fff; border: 1.5px solid #e3e7ee; border-radius: 12px; margin-bottom: 12px; }
details.topic-x summary { padding: 14px 18px; cursor: pointer; list-style: none; }
details.topic-x summary::-webkit-details-marker { display: none; }
details.topic-x .sum-row { display: flex; align-items: center; gap: 10px; }
details.topic-x .sum-row::after { content: '\25B8'; margin-left: auto; color: #667084; }
details.topic-x[open] .sum-row::after { content: '\25BE'; }
details.topic-x .topic-name { font-weight: 700; color: #1B2E44; font-size: 16px; flex: 1; }
details.topic-x .x-hint { font-size: 12px; color: #667084; }
details.topic-x .x-panel { padding: 2px 18px 14px; }
details.topic-x .topic-inner { border: none; padding: 0; margin: 0; background: none; }
details.topic-x .topic-inner h2 { display: none; }  /* name already in the summary row */

/* candidate card: link pinned top-right */
.cand-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.cand-link { font-size: 12.5px; white-space: nowrap; }

/* site-wide traffic-light toggle */
.dots-toggle { margin-left: auto; font-size: 12px; font-weight: 600; color: #1B2E44; background: #fff; border: 1.5px solid #dfe4ec; border-radius: 999px; padding: 4px 12px; cursor: pointer; }
.dots-toggle:hover { border-color: #1B2E44; }
.site-head { display: flex; align-items: center; gap: 12px; }
body.dots-off .dot { visibility: hidden; }

/* unanswered (optional-free) questions: quiet inline label, no wash */
.no-resp { font-style: italic; font-size: 13px; color: #6a7483; margin-left: 4px; }

/* colour legend popover */
.legend { position: relative; }
.legend summary { font-size: 12px; font-weight: 600; color: #1B2E44; cursor: pointer; list-style: none; white-space: nowrap; }
.legend summary::-webkit-details-marker { display: none; }
.legend .legend-panel { display: none; position: absolute; right: 0; top: calc(100% + 6px); z-index: 30; background: #fff; border: 1.5px solid #dfe4ec; border-radius: 10px; box-shadow: 0 8px 30px rgba(0,0,0,.12); padding: 12px 14px; width: 300px; font-size: 12.5px; display: flex; flex-direction: column; gap: 8px; }
.legend[open] .legend-panel { display: flex; }
.legend .legend-panel div { display: flex; align-items: baseline; gap: 8px; }
.legend .legend-panel .dot { width: 11px; height: 11px; }
.legend a { color: #1B2E44; }
/* legend is only meaningful when lights are visible */
body.dots-off .legend { display: none; }

/* persistent traffic-light bar (fixed bottom, all breakpoints) */
.tl-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
  display: flex; align-items: center; gap: 14px;
  background: #F4F6FA; border-top: 1px solid #e3e7ee;
  padding: 8px 16px;
}
.tl-bar .dots-toggle { margin-left: 0; }
.tl-bar .legend .legend-panel { top: auto; bottom: calc(100% + 8px); }
.tl-bar .legend summary { background: #fff; border: 1.5px solid #dfe4ec; border-radius: 999px; padding: 4px 12px; }

/* mini traffic-light icon inside the toggle button */
.tl-icon { display: inline-flex; gap: 3px; margin-right: 4px; vertical-align: middle; }
.tl-icon i { width: 7px; height: 7px; border-radius: 50%; display: inline-block; }
.tl-icon .tl-r { background: #d43c3c; }
.tl-icon .tl-y { background: #c7860a; }
.tl-icon .tl-g { background: #2e9e5b; }

/* hero topic chips (non-clickable, visual only) */
.topic-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.topic-chip { background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.25); border-radius: 999px; padding: 6px 12px; font-size: 13px; font-weight: 600; color: #fff; white-space: nowrap; }

/* hero sub: stacked paragraphs + bold key phrase */
.page-head .sub + .sub { margin-top: 10px; }
.page-head .sub strong { font-weight: 700; color: #fff; }

/* 404 page CTAs (pill language from back-link / dots-toggle) */
.cta-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 16px; }
.btn-primary { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 700; text-decoration: none; color: #1B2E44; background: #fff; border-radius: 999px; padding: 7px 16px; transition: background .15s; }
.btn-primary:hover, .btn-primary:focus-visible { background: #dfe8f2; }
.btn-primary .arr { display: inline-flex; align-items: center; justify-content: center; width: 16px; height: 16px; border: 1.5px solid currentColor; border-radius: 50%; font-size: 11px; line-height: 1; }
.btn-quiet { display: inline-flex; align-items: center; font-size: 12px; font-weight: 600; text-decoration: none; color: #fff; background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.3); border-radius: 999px; padding: 5px 12px; transition: background .15s; }
.btn-quiet:hover, .btn-quiet:focus-visible { background: rgba(255,255,255,.26); }

/* entry: region-first race selection */
.hint { font-size: 13px; color: #636a78; margin-bottom: 10px; }
.hint a { color: #1B2E44; font-weight: 600; }
.region-card { border-color: #1B2E44; grid-column: 1 / -1; }
.region-block { grid-column: 1 / -1; }
/* city/township cards: one per row on ALL breakpoints (expanding one card
   otherwise stretches its row-mates in the shared grid row) */
.race-list .muni-block { grid-column: 1 / -1; }
.muni-block { background: #fff; border: 1.5px solid #e3e7ee; border-radius: 10px; }
.muni-block summary { padding: 14px 16px; cursor: pointer; list-style: none; }
.muni-block summary::-webkit-details-marker { display: none; }
.muni-block .sum-row { display: flex; flex-direction: row; align-items: center; justify-content: space-between; gap: 10px; }
.muni-block .sum-row::after { content: '▾'; font-size: 12px; color: #1B2E44; font-weight: 600; white-space: nowrap; }
.muni-block[open] .sum-row::after { content: '▴'; }
.ward-list { display: flex; flex-wrap: wrap; gap: 8px; padding: 4px 16px 14px; }
.ward-link { font-size: 13px; font-weight: 600; color: #1B2E44; background: #EEF2FF; border: 1px solid #dbe3f5; border-radius: 6px; padding: 5px 12px; text-decoration: none; }
.ward-link:hover { border-color: #1B2E44; }

/* region card: always-expanded (no details) */
.region-block .region-head { display: flex; flex-direction: column; gap: 2px; padding: 14px 16px 4px; }
.region-block .ward-list { padding: 4px 16px 14px; }

.hint-bottom { margin-top: 20px; }

/* header: keep on one line; crumbs truncate with ellipsis instead of wrapping */
.site-head { flex-wrap: nowrap; }
.crumbs { white-space: nowrap; }
.crumbs a { text-decoration: underline; text-decoration-color: rgba(27,46,68,.35); text-underline-offset: 3px; }
.crumbs .current { font-weight: 700; color: #1B2E44; }
.dots-toggle { white-space: nowrap; }
.legend summary { white-space: nowrap; }

/* controls row: below the breadcrumb line, right-aligned */

/* breadcrumb dropdown menus (hover / focus) */
.crumb-item { position: relative; }
.crumb-item .crumb-link { cursor: pointer; text-decoration: underline; text-decoration-color: rgba(27,46,68,.35); text-underline-offset: 3px; }
.crumb-menu { display: none; position: absolute; top: calc(100% + 6px); left: 0; z-index: 40; background: #fff; border: 1.5px solid #dfe4ec; border-radius: 10px; box-shadow: 0 8px 30px rgba(0,0,0,.14); padding: 8px; min-width: 180px; flex-direction: column; gap: 2px; }
/* invisible bridge so hover survives the gap between crumb and panel */
.crumb-item .crumb-menu::before { content: ''; position: absolute; top: -10px; left: 0; right: 0; height: 10px; }
.crumb-item:hover .crumb-menu, .crumb-item:focus-within .crumb-menu { display: flex; }
.crumb-menu a { padding: 6px 10px; border-radius: 7px; text-decoration: none; color: #1B2E44; font-weight: 600; font-size: 13px; }
.crumb-menu a:hover { background: #EEF2FF; }

/* "On the ballot but not yet in this guide" section */
.not-responded { background: #fff; border: 1.5px dashed #dfe4ec; border-radius: 12px; padding: 14px 18px; margin-top: 12px; }
.not-responded h2 { font-size: 14px; color: #4a5262; font-weight: 700; margin: 0 0 8px; }
.not-responded .nr-list { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 14px; }
.not-responded .nr-list li { font-size: 13px; color: #667084; }
.not-responded li::before { content: '\00B7'; margin-right: 8px; color: #c3cad4; }
.not-responded .nr-src { font-size: 11.5px; color: #6a7483; margin-top: 8px; }
.not-responded .nr-src a { color: #1B2E44; }


/* narrow-desktop band (521–560px): worst-case crumb trail ≈523px only overflows
   here (available = viewport − 32px padding; ≤520px the mobile bar takes over).
   Flex-shrink + per-crumb ellipsis instead of scroll: overflow-x on .crumbs
   would create a scroll container that clips the dropdown menus. */
@media (min-width: 521px) and (max-width: 560px) {
  .crumbs { display: flex; align-items: center; min-width: 0; }
  .crumbs > a, .crumbs > .crumb-item, .crumbs > .current { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .crumbs > .sep { flex: none; }
  .crumb-item .crumb-link { display: block; overflow: hidden; text-overflow: ellipsis; }
}

/* ===== mobile (<520px) ===== */
@media (max-width: 520px) {
  .app { padding: 0 12px 64px; }
  .page-head { padding: 16px 16px 14px; border-radius: 10px; }
  .page-head h1 { font-size: 19px; }

  /* crumbs: allow icon-only truncation of middle levels is complex; keep nowrap+ellipsis */

  /* signal grid: keep 2 cols but tighter */
  .signals-grid { gap: 5px 10px; }

  /* entry */
  .race-list, .topic-grid { grid-template-columns: 1fr; }
  .region-block .region-head { flex-direction: column; }
  .ward-list { gap: 6px 8px; }

  /* cards */
  .cand-card, .muni-block, .topic-sec { padding: 12px 14px; }
  details.topic-x summary, details.cand-x summary { padding: 10px 12px; }
  details.topic-x .x-panel, details.cand-x .x-panel, .q-block.sub { margin-left: 12px; }

  /* question text wraps: chips can sit on their own line */
  .q-head { flex-wrap: wrap; row-gap: 4px; }
  .fmt { margin-left: 0; }
  .q-stem { font-size: 13.5px; }

  /* long rank/selection lists */
  .sels, .ranks { padding-left: 4px; }
  ul.resp { padding: 6px 10px 6px 24px; }

  /* legend popover fits */
  .legend .legend-panel { width: min(300px, 86vw); }
  .crumb-menu { min-width: 160px; }

  /* hero topic chips: too tall when wrapped — hide on phones
     (topic info is on every race/candidate page anyway) */
  .topic-chips { display: none; }

  /* topic pill nav: single row, swipe to scroll */
  .pills { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; padding-bottom: 2px; }
  .pills::-webkit-scrollbar { display: none; }
  .pill { flex: none; scroll-snap-align: start; }
  /* scroll affordances (external feedback 2026-09-07: scroller not obviously scrollable):
     right fade always on (signals more content, works without JS);
     left fade + transient progress bar driven by app.js state classes */
  .pills.in-bar { scroll-snap-type: x proximity;
    mask-image: linear-gradient(90deg, #000 0, #000 calc(100% - 18px), transparent);
    -webkit-mask-image: linear-gradient(90deg, #000 0, #000 calc(100% - 18px), transparent); }
  .mobile-bar.is-scrolled .pills.in-bar {
    mask-image: linear-gradient(90deg, transparent 0, #000 14px, #000 calc(100% - 18px), transparent);
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 14px, #000 calc(100% - 18px), transparent); }

  /* breadcrumb trail: horizontal scroller instead of clipping */
  .crumbs { overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .crumbs::-webkit-scrollbar { display: none; }
}

/* mobile bar: persistent hamburger + topic scroller */
.mobile-bar { display: none; }
@media (max-width: 520px) {
  .mobile-bar {
    display: flex; align-items: center; gap: 10px;
    position: sticky; top: 0; z-index: 50;
    background: #F4F6FA; padding: 8px 12px;
    border-bottom: 1px solid #e3e7ee;
    margin: 0 -12px;
  }
  .menu-toggle { font-size: 15px; line-height: 1; background: #fff; border: 1.5px solid #dfe4ec; border-radius: 8px; padding: 6px 10px; cursor: pointer; flex: none; color: #1B2E44; }
  .mobile-bar .pills { margin: 0; flex: 1; }
  .mobile-bar .pills .pill.active { background: #1B2E44; }
  /* transient scroll-progress bar (fill width/offset from --p-w/--p-l set by app.js) */
  .pill-progress { position: absolute; left: 48px; right: 12px; bottom: -1px; height: 2px;
    background: #1B2E44; width: calc(var(--p-w, 0) * 100%); margin-left: calc(var(--p-l, 0) * 100%);
    opacity: 0; transition: opacity .25s; pointer-events: none; }
  .mobile-bar.has-overflow.is-scrolling .pill-progress { opacity: 1; }
  /* desktop pills hidden on mobile (bar carries them) */
  .pills:not(.in-bar) { display: none; }
  /* header becomes the hamburger panel */
  .site-head { display: none; }
  body.crumbs-open .site-head {
    display: block; position: fixed; top: 0; left: 0; right: 0; z-index: 60;
    background: #fff; padding: 12px 14px 14px;
    box-shadow: 0 10px 40px rgba(0,0,0,.18);
    max-height: 80vh; overflow-y: auto;
  }
  body.crumbs-open .crumbs { white-space: normal; overflow: visible; }
  body.crumbs-open .crumb-menu { display: flex; position: static; box-shadow: none; border: none; padding: 4px 0 4px 12px; min-width: 0; }
}

/* mobile crumb panel: close button */
.panel-close { display: none; }
@media (max-width: 520px) {
  body.crumbs-open .panel-close {
    display: flex; justify-content: flex-end; position: fixed;
    top: 10px; right: 12px; z-index: 61;
  }
}

/* about section (unscored background) */
.topic-sep {
  margin: 8px 16px 20px;
  height: 1px;
  background: rgba(26, 39, 68, 0.12);
}
.candidate-about summary .topic-name {
  color: #5a6a82;
}
.candidate-about[open] summary .topic-name {
  color: #1a2744;
}
.candidate-about h2 {
  font-weight: 500;
  color: #4a5a72;
}
@media (max-width: 520px) {
  .topic-sep {
    margin-left: 12px;
    margin-right: 12px;
  }
}

/* ===== home-page response-count tooltips (click ⓘ, all devices) =====
   Approved design: mockups/home_tooltip_tap.html (2026-09-11) — filled-badge
   ⓘ, raised beside the pill; bubble 6px above the icon; caret JS-centered;
   identical click behavior on desktop and mobile. Reveal/close in app.js. */
.pill-wrap { position: relative; display: inline-flex; align-items: center; }
.tip-btn {
  --tipc: #667084;
  appearance: none; border: 0; background: none; font: inherit;
  width: 13px; height: 13px; position: relative;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%; cursor: pointer; color: var(--tipc); flex: none;
  margin-left: 3px; align-self: flex-start; margin-top: 2px;
}
.tip-btn:hover, .pill-wrap.tip-open .tip-btn { --tipc: #1B2E44; }
/* filled badge: solid circle with a white serif italic “i” */
.tip-btn::before {
  content: 'i';
  font-family: Georgia, 'Times New Roman', serif; font-style: italic;
  font-weight: 700; font-size: 9px; line-height: 1;
  color: #fff; background: var(--tipc);
  width: 100%; height: 100%; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  padding-bottom: 1px; box-sizing: border-box;
}
/* generous invisible hit area (13px visual, ~27px hit) */
.tip-btn::after { content: ''; position: absolute; inset: -7px; border-radius: 50%; }
.tip-btn:focus-visible { outline: 2px solid #1B2E44; outline-offset: 2px; }

/* the bubble: 6px above the raised icon, right edge nudged past the icon */
.tip-bubble {
  position: absolute; bottom: calc(100% + 2px); right: -8px;
  background: #1B2E44; color: #fff;
  font-size: 11.5px; font-weight: 600; letter-spacing: .01em;
  padding: 5px 10px; border-radius: 6px; white-space: nowrap;
  box-shadow: 0 3px 10px rgba(27, 46, 68, .25);
  opacity: 0; transform: translateY(3px); pointer-events: none;
  transition: opacity .12s ease, transform .12s ease;
  z-index: 30;
}
.tip-caret {
  position: absolute; top: 100%; right: 10px;  /* default; app.js centers over the icon */
  width: 0; height: 0;
  border: 5px solid transparent; border-top-color: #1B2E44;
}
.tip-bubble .zero { color: #cdd5e0; }  /* neutral grey for no-responses */
/* edge flip: app.js adds .tip-r when the bubble would spill past the card */
.tip-bubble.tip-r { right: auto; left: -8px; }
/* reveal: .tip-open (click) or keyboard focus */
.pill-wrap.tip-open .tip-bubble,
.tip-btn:focus-visible ~ .tip-bubble { opacity: 1; transform: translateY(0); }
/* desktop hover: hover also reveals the bubble (click still toggles and
   keeps it open on every device). Gated on hover:hover so touch devices
   don't get sticky first-tap hover. */
@media (hover: hover) and (pointer: fine) {
  .tip-btn:hover ~ .tip-bubble { opacity: 1; transform: translateY(0); }
}
