/* Additions to the L7 design system (trace.css) for the integrated app. */

/* Nav: inline on desktop; at 760px and below it becomes a menu button that opens a sheet (js/navmenu.js). */
.site-nav a { white-space: nowrap; flex: none; }
.nav-toggle { display: none; }
.nav-toggle__x { display: none; }
@media (max-width: 760px) {
  .site-header__inner { flex-wrap: nowrap; gap: var(--s3); padding: 8px 0; min-height: 60px; }
  .site-header .header-search { order: 0; flex: 1 1 0; min-width: 0; max-width: none; }
  .site-header .header-search input { min-width: 0; text-overflow: ellipsis; }
  .nav-toggle { display: grid; place-items: center; flex: none; width: 44px; height: 44px; margin-left: auto; border: 1px solid #3a372c; border-radius: 12px; background: var(--night-2); color: var(--on-night); cursor: pointer; }
  .nav-toggle svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
  .nav-toggle[aria-expanded="true"] .nav-toggle__bars { display: none; }
  .nav-toggle[aria-expanded="true"] .nav-toggle__x { display: inline; }
  /* closed: out of layout and out of the tab order */
  .site-nav { display: none; }
  .site-nav.is-open {
    display: flex; flex-direction: column; gap: 2px; margin: 0;
    position: fixed; left: 0; right: 0; top: var(--nav-top, 60px); max-height: calc(100dvh - var(--nav-top, 60px)); overflow-y: auto; overscroll-behavior: contain;
    padding: var(--s3) var(--s4) calc(var(--s5) + env(safe-area-inset-bottom)); background: var(--night); border-bottom: 1px solid #000; box-shadow: 0 18px 40px rgba(0,0,0,.45); z-index: 25;
  }
  .site-nav.is-open a { display: flex; align-items: center; min-height: 48px; padding: 0 var(--s3); border-radius: 12px; font-size: 1.05rem; color: var(--on-night); }
  .site-nav.is-open a[aria-current="page"] { background: var(--night-2); box-shadow: inset 3px 0 0 var(--accent-bright); }
  .site-nav.is-open .site-nav__account { min-height: 48px; margin-top: var(--s3); border-radius: 12px; font-size: 1rem; text-align: center; background: var(--accent-bright); color: var(--night); border-color: transparent; }
  .site-nav.is-open .site-nav__account[hidden] { display: none; }
  .nav-scrim { position: fixed; inset: 0; top: var(--nav-top, 60px); background: rgba(10,9,6,.55); z-index: 24; }
  .nav-scrim[hidden] { display: none; }
}
@media (max-width: 359px) { .brand__name { display: none; } }
.site-nav__account { border: 1px solid var(--line-2); border-radius: 999px; background: var(--card); color: var(--ink); padding: 6px 11px; font: 650 var(--fs-xs) var(--font-body); cursor: pointer; white-space: nowrap; }
.site-nav__account:hover { background: var(--accent-wash); }

.site-footer__nav { display: flex; flex-wrap: wrap; gap: var(--s2) var(--s5); }
.site-footer__nav a, .site-footer__nav .linkish { color: var(--ink-2); font-weight: 500; font-size: var(--fs-sm); }

/* place suggestions (combobox) */
.search-xl, .header-search { position: relative; }
.place-menu {
  position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 30; background: var(--card); color: var(--ink);
  border: 1px solid var(--line-2); border-radius: var(--radius); box-shadow: var(--shadow-2); padding: var(--s2); display: grid; gap: 2px;
  max-height: 360px; overflow-y: auto;
}
.search-xl .place-menu { top: 76px; }
.place-menu__note { font-size: var(--fs-xs); color: var(--ink-3); padding: 4px 10px; }
.place-menu__opt { text-align: left; border: 0; background: transparent; padding: 10px 12px; border-radius: var(--radius-sm); cursor: pointer; display: grid; gap: 1px; }
.place-menu__opt strong { font-weight: 600; }
.place-menu__opt small { color: var(--ink-3); font-size: var(--fs-xs); }
.place-menu__opt:hover, .place-menu__opt[aria-selected="true"] { background: var(--accent-wash); }

.hero__saved { margin-top: var(--s4); color: var(--on-night-2); font-size: var(--fs-sm); display: flex; gap: 8px; align-items: center; }
.hero__saved a { color: var(--on-night); }

/* Results page, phones and tablets: the "Representatives | Community Vibe" switch (role=tablist, built by
   js/vibe/index.js). Styled here rather than in the lazily loaded vibe/vibe.css so the buttons never
   render as bare browser buttons while that file is still loading. Desktop shows both panes, no switch. */
.vibe-switch { display: none; }
.vibe-badge { display: inline-block; background: var(--tc-amber, var(--accent-bright)); color: var(--tc-bg, var(--night)); border-radius: 999px; padding: 1px 8px; font-size: var(--fs-xs); font-weight: 700; margin-left: 4px; line-height: 1.5; }
@media (max-width: 1023px) {
  .vibe-switch {
    display: flex; position: sticky; top: calc(var(--vibe-sticky-top, 56px) + 6px); z-index: 12; margin: var(--s4) 0; padding: 4px; gap: 4px;
    background: var(--paper-2); border: 1px solid var(--line-2); border-radius: 999px;
    box-shadow: 0 6px 18px rgba(27, 26, 21, .1);
  }
  /* An opaque paper band behind the pill, so scrolled cards never show in the gap under the sticky header. */
  .vibe-switch::before { content: ""; position: absolute; inset: -8px calc(-1 * var(--s5)) -6px; background: var(--paper); z-index: -1; }
  .vibe-switch button {
    flex: 1; min-height: 44px; padding: 0 var(--s3); border: 0; border-radius: 999px; background: transparent; cursor: pointer;
    display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: 700 var(--fs-sm) var(--font-body); color: var(--ink-2); white-space: nowrap;
  }
  .vibe-switch button:hover { color: var(--ink); background: rgba(27, 26, 21, .06); }
  .vibe-switch button[aria-selected="true"] { background: var(--tc-bg, var(--night)); color: var(--tc-white, var(--on-night)); }
  .vibe-switch button[aria-selected="true"]::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--tc-amber, var(--accent-bright)); flex: none; }
  .vibe-switch button:focus-visible { outline: none; box-shadow: 0 0 0 2px var(--paper-2), 0 0 0 5px var(--tc-turquoise, var(--green)); }
}
@media (max-width: 520px) { .vibe-switch::before { inset: -8px calc(-1 * var(--s4)) -6px; } }
.explain__item { text-decoration: none; color: inherit; display: block; transition: border-color .15s, box-shadow .15s; }
.explain__item:hover { border-color: var(--line-2); box-shadow: var(--shadow-1); }

/* level + office icons */
.level__icon:empty { display: none; }
.level__icon { width: 26px; height: 26px; color: var(--lvl); align-self: center; display: inline-grid; place-items: center; }
.level__icon svg { width: 22px; height: 22px; }
.office-icon { display: inline-grid; place-items: center; width: 18px; height: 18px; margin-right: 6px; vertical-align: -3px; color: currentColor; }
.office-icon svg { width: 16px; height: 16px; }
.office-icon--lg { width: 24px; height: 24px; }
.office-icon--lg svg { width: 22px; height: 22px; }
.rep__role { display: flex; align-items: center; }

/* results */
.results-head__election { margin-top: var(--s3); }
.chip--election { text-decoration: none; background: var(--accent-wash); border-color: #e9cf9f; color: var(--accent); min-height: 34px; padding: 4px 12px; }
.btn--on-dark { margin-top: var(--s4); background: transparent; color: var(--on-night); border-color: #4a4638; }
.btn--on-dark:hover { background: var(--night-2); }
.panel__note { margin-top: var(--s3); font-size: var(--fs-xs); color: var(--ink-3); display: flex; gap: 6px; align-items: center; }
.stories__note { grid-column: 1 / -1; }
.story__flag { color: var(--red); font-weight: 650; }
.council li a { text-decoration: none; }
.council li a:hover { text-decoration: underline; }

/* school board */
.school { grid-column: 1 / -1; display: grid; gap: var(--s3); }
.school__choose { border: 0; padding: 0; margin: 0; }
.school__choose legend { font-family: var(--font-display); font-size: var(--fs-lg); font-weight: 600; }
.school__rule { color: var(--ink-3); font-size: var(--fs-sm); margin-top: 4px; }
.school__options { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: var(--s2); margin-top: var(--s3); }
.school__options label { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); cursor: pointer; font-size: var(--fs-sm); }
.school__options label:has(input:checked) { border-color: var(--lvl-school); background: color-mix(in srgb, var(--lvl-school) 7%, var(--card)); }
.school__options small { display: block; color: var(--ink-3); font-size: var(--fs-xs); }
.school__trustees { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--s3); }
.school__trustees li { border-top: 1px solid var(--paper-2); padding-top: var(--s3); }
.school__name { font-family: var(--font-display); font-size: 1.3rem; }
.school__cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: var(--s3); }
.school__card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: var(--s4); display: grid; align-content: start; gap: var(--s2); }
.school__card h3 { font-size: var(--fs-lg); line-height: 1.25; }
.school__people { display: grid; gap: 4px; }
.school__people p { display: flex; flex-wrap: wrap; gap: var(--s2); align-items: baseline; }
.school__term, .school__governance { font-size: var(--fs-sm); }
.school__governance { font-weight: 600; }
.school__support { display: block; color: var(--ink-3); line-height: 1.45; border-top: 1px solid var(--paper-2); padding-top: var(--s2); }

/* states */
.state__hint { font-size: var(--fs-sm) !important; margin-top: var(--s5) !important; color: var(--ink-3) !important; }
.chooser a {
  width: 100%; text-align: left; display: grid; grid-template-columns: 40px 1fr auto; gap: var(--s3); align-items: center; text-decoration: none;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: var(--s4); transition: border-color .15s, box-shadow .15s;
}
.chooser a:hover { border-color: var(--ink-3); box-shadow: var(--shadow-1); }

/* person page */
.person-hero__level { display: flex; align-items: center; color: var(--lvl); }
.person-hero__honorific { color: var(--ink-3); font-size: var(--fs-sm); margin-top: var(--s2); }
.person-hero__recent, .rep__recent { color: var(--ink-2); font-size: var(--fs-sm); font-weight: 650; margin-top: var(--s3); }
.infobox img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 20%; }
.infobox figcaption a { color: inherit; }
.timeline__meta { color: var(--ink-2); font-size: var(--fs-sm); }
.bio-notice { margin-top: var(--s6); }
.person-stories { margin-top: var(--s7); }
.person-stories .section-title h2 { font-size: var(--fs-xl); }
.facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: var(--s3); margin: var(--s5) 0 0; }
.facts div { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: var(--s3) var(--s4); }
.facts dt { font-size: var(--fs-xs); font-weight: 700; color: var(--ink-3); text-transform: uppercase; letter-spacing: .06em; }
.facts dd { margin: 2px 0 0; font-weight: 600; }
.empty--soft { margin-top: var(--s5); }
.contact-tip { margin-top: var(--s5); max-width: 960px; }
.sources { margin-top: var(--s5); }

/* office guide */
.office__kicker { display: flex; align-items: center; }
.office__headline { margin-top: var(--s2); }
.office__route { font-size: var(--fs-xl); margin-top: var(--s6); }
.office__route-sum { color: var(--ink-2); max-width: var(--measure); margin-top: var(--s2); }
.office__step-head { font-weight: 650; margin-top: var(--s4); }
.office__instead { margin-top: var(--s6); background: var(--paper-2); border-radius: var(--radius); padding: var(--s5); }
.office__instead h3 { font-size: var(--fs-lg); }
.office__instead ul { list-style: none; padding: 0; margin: var(--s3) 0 0; display: grid; gap: var(--s3); }
.office__instead li { display: grid; gap: 2px; font-size: var(--fs-sm); }
.office__instead li span { color: var(--ink-2); }
.office__chosen { margin-top: var(--s5); max-width: var(--measure); color: var(--ink-2); }
.panel__h-sm { font-size: var(--fs-lg); margin-top: 4px; }

/* elections */
.election-dates { margin: var(--s5) 0 var(--s6); }
.candidates { list-style: none; padding: 0; margin: var(--s4) 0; display: grid; gap: var(--s2); }
.candidates li { display: flex; justify-content: space-between; gap: var(--s3); border-top: 1px solid var(--paper-2); padding-top: var(--s2); }
.candidates span { color: var(--ink-3); font-size: var(--fs-sm); }
.elections-offices { margin-top: var(--s6); max-width: 760px; }

/* dialog */
.dialog__quote { color: var(--ink-2); }
.dialog__choices { border: 0; padding: 0; margin: 0; display: grid; gap: 8px; }
.dialog__choices label { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; }
.dialog__choices small { color: var(--ink-3); }
.dialog__fine { font-size: var(--fs-xs); color: var(--ink-3); }
.dialog__body { overflow-wrap: anywhere; }
.community-field { display: grid; gap: 5px; margin-top: var(--s3); font-size: var(--fs-sm); }
.community-field input, .community-field textarea, .community-field select { width: 100%; box-sizing: border-box; border: 1px solid var(--line-2); border-radius: var(--radius-sm); background: var(--card); color: var(--ink); padding: 10px 12px; font: inherit; }
.community-auth, .community-composer { display: grid; gap: var(--s3); }
.community-status { min-height: 1.4em; margin-top: var(--s2); color: var(--green); font-size: var(--fs-sm); }
.community-status--error { color: var(--red); }
.btn--danger { border-color: #a8341f; color: #8b2919; }

/* Community threads and moderation */
.community-thread { margin-top: var(--s7); border-top: 1px solid var(--line); padding-top: var(--s5); max-width: 860px; }
.community-thread > h2 { font-size: var(--fs-xl); }
.community-thread__intro { color: var(--ink-2); max-width: 68ch; margin-top: var(--s2); }
.community-thread__state { margin-top: var(--s4); }
.community-comments { display: grid; gap: var(--s3); }
.community-comment { border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--card); padding: var(--s4); }
.community-comment__meta { color: var(--ink-3); font-size: var(--fs-xs); }
.community-comment__meta strong { color: var(--ink); }
.community-comment__body { white-space: pre-wrap; overflow-wrap: anywhere; margin-top: var(--s2); }
.community-comment__actions { display: flex; gap: var(--s3); margin-top: var(--s3); }
.community-comment__actions .linkish { font-size: var(--fs-xs); }
.community-composer { border-top: 1px solid var(--line); margin-top: var(--s4); padding-top: var(--s4); }
.community-signed-out, .community-empty { color: var(--ink-3); font-size: var(--fs-sm); }
.community-raise__notice { border-left: 3px solid var(--accent); background: var(--accent-wash); padding: var(--s3); color: var(--ink-2); }
.community-raise__count { font-weight: 650; margin-top: var(--s3); }
.moderation-queue { display: grid; gap: var(--s3); max-height: 55vh; overflow-y: auto; margin-top: var(--s3); }
.moderation-item { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: var(--s4); background: var(--card); }
@media (max-width: 520px) {
  .community-comment, .moderation-item { padding: var(--s3); }
  .community-comment__actions, .moderation-item .dialog__actions { align-items: stretch; flex-direction: column; }
}

/* consent — banner lives in document flow at the top of <main> on every viewport.
   It cannot be position:fixed because at scroll=0 the fixed banner covers the
   first representative card (QA4 #10/N1). Inline at the top pushes the rep
   grid below it instead, matching the mobile behaviour that QA3 shipped. */
.consent {
  position: static;
  margin: var(--s3) auto;
  width: min(760px, calc(100vw - 2 * var(--s3)));
  background: var(--card); border: 1px solid var(--line-2); border-radius: var(--radius);
  box-shadow: var(--shadow-2);
  padding: var(--s4) var(--s5);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  column-gap: var(--s4);
  gap: var(--s2);
  z-index: 1;
}
.consent h2 { font-size: var(--fs-md); grid-column: 1; }
.consent p { font-size: var(--fs-sm); color: var(--ink-2); grid-column: 1; }
.consent .consent__actions { grid-column: 2; grid-row: 1 / span 2; margin: 0; }
.consent__actions { display: flex; gap: var(--s2); margin-top: var(--s2); }
@media (max-width: 640px) {
  .consent { grid-template-columns: 1fr; gap: 6px; padding: 10px 12px; width: auto; }
  .consent h2 { font-size: var(--fs-sm); }
  .consent p { font-size: var(--fs-xs); line-height: 1.35; }
  .consent .consent__actions { grid-column: 1; grid-row: auto; }
  .consent__actions { flex-wrap: wrap; }
}

/* issues page inside the new shell */
.issues-intro { padding: var(--s6) 0 var(--s4); }
.issues-intro h1 { font-size: var(--fs-3xl); margin-top: var(--s2); }
.issues-intro p:last-child { color: var(--ink-2); font-size: var(--fs-lg); margin-top: var(--s2); max-width: 62ch; }

/* election transitions: notices banner, seat-state cards, level notes (js/transitions.js) */
.notices { display: grid; gap: var(--s2); margin-top: var(--s4); }
.notice { display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: var(--s3); padding: var(--s3) var(--s4); border: 1px solid #e9cf9f; background: var(--accent-wash); border-radius: var(--radius-sm); max-width: 78ch; }
.notice--vacant, .notice--dissolved { border-color: var(--line-2); background: #f3efe5; }
.notice__icon { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: #fffdf8; color: var(--accent); }
.notice__icon svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.75; }
.notice p { font-size: var(--fs-sm); color: var(--ink-2); }
.notice__title { color: var(--ink) !important; font-size: var(--fs-md, 1rem) !important; }
.notice__date { color: var(--ink-2); font-weight: 400; }
.notice__links, .seat__links { margin-top: 4px; font-size: var(--fs-sm); }
.seat__list { margin: var(--s2) 0 0; padding-left: 1.1rem; font-size: var(--fs-sm); color: var(--ink-2); }
.seat__list li + li { margin-top: 2px; }
.seat__list strong { color: var(--ink); }
.rep--seat { border-style: dashed; background: #fbf8f1; }
.rep--seat-elect { border-style: solid; }
.avatar--seat span { font-size: 1rem; }
.avatar--seat svg { width: 30px; height: 30px; fill: none; stroke: currentColor; stroke-width: 1.75; }
.seat-tag { display: inline-block; font-size: var(--fs-xs); font-weight: 600; padding: 1px 8px; border-radius: 999px; background: #efe8d8; color: var(--ink-2); }
.rep--seat-vacant .seat-tag, .rep--seat-dissolved .seat-tag { background: #f1ddd2; color: #7a3412; }
.rep--seat-elect .seat-tag { background: #dcebd8; color: #24561f; }
.level__note { margin: 0 0 var(--s3); font-size: var(--fs-sm); color: var(--ink-2); display: flex; gap: 6px; align-items: flex-start; max-width: 78ch; }
.level__note svg { flex: none; width: 16px; height: 16px; margin-top: 2px; fill: none; stroke: currentColor; stroke-width: 1.75; }

/* narrow phones: person-page actions stack full width instead of overflowing the 288px column */
@media (max-width: 420px) {
  .person-hero__cta .btn { flex: 1 1 100%; white-space: normal; text-align: center; }
  .state__actions .btn { max-width: 100%; white-space: normal; overflow-wrap: anywhere; text-align: center; }
}
.person-hero h1 { overflow-wrap: anywhere; hyphens: auto; }
/* Directory cards have no portrait column: give their labels the full card width. */
.rep--directory, .rep--municipality { grid-template-columns: minmax(0, 1fr); }
.rep--directory .rep__name, .rep--municipality .rep__name { overflow-wrap: normal; word-break: normal; hyphens: none; }
.rep__count { margin-top: var(--s2); color: var(--ink-3); font-size: var(--fs-sm); font-weight: 650; }
.browse-filter-label { display: block; margin: var(--s3) 0 var(--s1); font-weight: 650; }
.browse-filter { display: block; width: 100%; box-sizing: border-box; margin-bottom: var(--s4); }
.browse-community-list { color: var(--ink-2); line-height: 1.65; }
@media (max-width: 420px) { .person-hero h1 { font-size: 1.6rem; } }

/* Words: filterable official activity grouped by record type. */
.words { max-width: 900px; }
.words__head { display: grid; gap: var(--s4); margin-bottom: var(--s5); }
.words__head h2 { margin: 0 0 var(--s2); }
.words__head p:last-child { color: var(--ink-2); max-width: 68ch; }
.word-filters { display: flex; flex-wrap: wrap; gap: var(--s2); }
.word-filters .chip { cursor: pointer; }
.word-filters .chip[aria-pressed="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.word-group { display: grid; gap: var(--s3); margin-top: var(--s6); }
.word-group > h3 { font-size: var(--fs-xl); }
.word-list { display: grid; gap: var(--s3); }
.word h4 { font-size: 1.1rem; line-height: 1.35; }
.word__kind { flex-wrap: wrap; }
.word__source { font-size: var(--fs-xs); }
.word__body { max-width: 72ch; }
.word__body p { line-height: 1.6; margin: 0 0 var(--s3); }
.word__body p:last-child { margin-bottom: 0; }
.word[hidden], .word-group[hidden] { display: none; }
.word-votes { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.word-votes > summary { cursor: pointer; padding: var(--s4) var(--s5); font-weight: 650; color: var(--accent); }
.word-votes[open] > summary { border-bottom: 1px solid var(--line); }
.word-votes > .word-list { padding: var(--s3); }

/* story meta flows as one line of text so "·" separators never dangle at a flex-wrap edge */
.story__top { display: block; line-height: 1.6; }
.story__top > * { display: inline; }
.story__more { margin-top: var(--s2); }
.story__more summary { cursor: pointer; font-weight: 600; }
.story__more p { margin-top: var(--s2); }
/* clamp excerpts on whole lines (a fixed line-height avoids a half-visible fourth line) */
.story__dek { line-height: 1.5; max-height: calc(1.5em * 3); }
.story--lead .story__dek { max-height: calc(1.5em * 4); }
.party { display: inline-flex; align-items: center; gap: 6px; }
.story__top > [aria-hidden="true"] { margin: 0 6px; }
.story__top time, .notice__date { white-space: nowrap; }

/* ---------- biographies (W2-WEB-2) ---------- */
.bio .bio-section { scroll-margin-top: 120px; }
.bio .bio-section h2 { font-size: var(--fs-xl); }
.bio .bio-section ul { margin-top: .6em; }
.bio-more { margin-top: var(--s5); }
.bio-more__n { color: var(--ink-3); font-weight: 500; margin-left: 6px; font-size: var(--fs-sm); }
.bio--none h2 { font-size: var(--fs-xl); }
.linklike { background: none; border: 0; padding: 0; color: var(--accent); font: inherit; text-decoration: underline; cursor: pointer; }
.results-tables { margin-top: var(--s4); }
.results-tables summary { cursor: pointer; font-weight: 600; color: var(--accent); }
.results-table { width: 100%; border-collapse: collapse; margin-top: var(--s4); font-size: var(--fs-sm); font-family: var(--font-body); }
.results-table caption { text-align: left; font-weight: 650; padding-bottom: 6px; }
.results-table th, .results-table td { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--paper-2); }
.results-table th { font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: .05em; color: var(--ink-3); }
.results-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.results-table .is-winner td { font-weight: 650; background: var(--green-wash); }
.infobox figure img { display: block; width: 100%; height: auto; max-height: 420px; object-fit: cover; object-position: top; background: var(--paper-2); }

/* ---------- office guide (W2-WEB-2; content from web/content/offices) ---------- */
.oguide { --tile: var(--lvl, var(--accent)); }
.oguide__head { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: var(--s4); align-items: start; }
.oguide__tile { width: 64px; height: 64px; border-radius: 16px; background: var(--tile); color: #fff; display: grid; place-items: center; }
.oguide__tile svg { width: 34px; height: 34px; }
.oguide__kicker { display: flex; align-items: center; gap: 6px; color: var(--tile); }
.oguide__level-icon { display: inline-grid; width: 16px; height: 16px; }
.oguide__level-icon svg { width: 16px; height: 16px; }
.oguide__title { font-size: var(--fs-3xl); margin-top: 4px; line-height: 1.15; }
h2.oguide__title { font-size: var(--fs-2xl); }
.oguide__fr { color: var(--ink-3); font-style: italic; margin-top: 2px; }
.oguide__summary { font-size: var(--fs-lg); color: var(--ink-2); max-width: var(--measure); margin-top: var(--s3); }
.oguide__facts { list-style: none; padding: 0; margin: var(--s4) 0 0; display: flex; flex-wrap: wrap; gap: var(--s2); }
.oguide__facts li { background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 4px 12px; font-size: var(--fs-sm); display: flex; gap: 6px; }
.oguide__facts span { color: var(--ink-3); }
.oguide__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s4); margin-top: var(--s6); align-items: start; }
@media (max-width: 820px) { .oguide__grid { grid-template-columns: 1fr; } .oguide__head { grid-template-columns: 48px minmax(0, 1fr); } .oguide__tile { width: 48px; height: 48px; border-radius: 12px; } .oguide__tile svg { width: 26px; height: 26px; } .oguide__title { font-size: var(--fs-2xl); } }
.oguide-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: var(--s5); border-top: 4px solid var(--line-2); }
.oguide-card h2, .oguide-card h3 { font-family: var(--font-body); font-size: var(--fs-md); font-weight: 700; display: flex; gap: var(--s2); align-items: center; }
.oguide-card__icon { display: inline-grid; place-items: center; width: 22px; height: 22px; flex: none; }
.oguide-card__icon svg { width: 20px; height: 20px; }
.oguide-card ul, .oguide-card ol { margin: var(--s3) 0 0; padding-left: 1.2em; color: var(--ink-2); font-size: var(--fs-sm); line-height: 1.55; }
.oguide-card li + li { margin-top: 6px; }
.oguide-card p { color: var(--ink-2); font-size: var(--fs-sm); margin-top: var(--s3); line-height: 1.55; }
.oguide-card--can { border-top-color: var(--green); } .oguide-card--can .oguide-card__icon { color: var(--green); }
.oguide-card--cannot { border-top-color: var(--red); } .oguide-card--cannot .oguide-card__icon { color: var(--red); }
.oguide-card--when { border-top-color: var(--accent); } .oguide-card--when .oguide-card__icon { color: var(--accent); }
.oguide-card--help { border-top-color: var(--lvl-provincial); } .oguide-card--help .oguide-card__icon { color: var(--lvl-provincial); }
.oguide-card--chosen { border-top-color: var(--lvl-regional); } .oguide-card--chosen .oguide-card__icon { color: var(--lvl-regional); }
.oguide-card--fact { border-top-color: var(--lvl-school); background: var(--accent-wash); } .oguide-card--fact .oguide-card__icon { color: var(--lvl-school); }
.oguide-steps { counter-reset: s; list-style: none; padding-left: 0 !important; }
.oguide-steps li { counter-increment: s; position: relative; padding-left: 30px; }
.oguide-steps li::before { content: counter(s); position: absolute; left: 0; top: 0; width: 22px; height: 22px; border-radius: 50%; background: var(--lvl-provincial); color: #fff; font-size: 12px; font-weight: 700; display: grid; place-items: center; }
.oguide__instead-title { font-weight: 650; color: var(--ink) !important; margin-top: var(--s4) !important; }
.oguide__instead { list-style: none; padding: 0 !important; display: grid; gap: var(--s2); }
.oguide__instead li { display: grid; gap: 1px; border-top: 1px solid var(--paper-2); padding-top: var(--s2); }
.oguide__issue { color: var(--ink); font-weight: 600; }
.oguide__terms { display: grid; gap: var(--s2); margin: var(--s3) 0 0; font-size: var(--fs-sm); }
.oguide__terms dt { font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); font-weight: 700; }
.oguide__terms dd { margin: 0; color: var(--ink-2); }
.oguide__sources { margin-top: var(--s5); background: var(--paper-2); border-radius: var(--radius-sm); padding: var(--s3) var(--s4); font-size: var(--fs-sm); }
.oguide__sources summary { cursor: pointer; font-weight: 600; display: flex; gap: 8px; align-items: center; }
.oguide__sources summary span { display: inline-grid; width: 18px; height: 18px; } .oguide__sources summary svg { width: 18px; height: 18px; }
.oguide__sources ol { margin: var(--s3) 0 0; padding-left: 1.3em; display: grid; gap: 6px; }
.oguide__sources .src-meta { color: var(--ink-3); }
.oguide-page { padding-bottom: var(--s8, 64px); }
.office-index__head { max-width: 42rem; }
.office-index__head h1 { margin: 0; }
.office-index__head p:last-child { margin: var(--s2) 0 0; }
.oguide-page .oguide { margin-top: var(--s5); }
.oguide-province { display: flex; gap: var(--s2); align-items: center; justify-content: flex-end; font-size: var(--fs-sm); margin-top: var(--s3); }
.oguide-province select { font: inherit; padding: 6px 10px; border: 1px solid var(--line-2); border-radius: var(--radius-sm); background: var(--card); }
.oguide-index { margin-top: var(--s7); border-top: 1px solid var(--line); padding-top: var(--s5); }
.oguide-index h2 { font-size: var(--fs-xl); }
.oguide-index__list { list-style: none; padding: 0; margin: var(--s4) 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: var(--s2); }
.oguide-index__list a { display: flex; gap: var(--s2); align-items: center; padding: 10px 12px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-sm); text-decoration: none; color: var(--ink); font-weight: 600; font-size: var(--fs-sm); }
.oguide-index__list a[aria-current="page"] { border-color: var(--lvl); box-shadow: inset 3px 0 0 var(--lvl); }
.oguide-index__icon { display: inline-grid; width: 20px; height: 20px; color: var(--lvl); } .oguide-index__icon svg { width: 20px; height: 20px; }
.office--guide .oguide__grid { grid-template-columns: 1fr; }
@media (min-width: 1200px) { .office--guide .oguide__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
:root { --measure: 68ch; }
.bio .bio-section > * + * { margin-top: 1em; }
.bio .bio-section h2 { font-size: var(--fs-2xl); }
.bio .lede { font-size: 1.25rem; }
.toc--long summary { cursor: pointer; font-family: var(--font-body); font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); font-weight: 700; }
.toc--long[open] summary { margin-bottom: var(--s2); }
.toc a { text-decoration: none; } .toc a:hover { text-decoration: underline; }
.infobox dl { grid-template-columns: 104px 1fr; }
.infobox dl > div { display: contents; }
.person-hero__figure { margin: 0; display: grid; gap: 6px; justify-items: start; align-content: start; }
.person-hero__credit { font-size: var(--fs-xs); color: var(--ink-3); max-width: 180px; line-height: 1.35; }
.person-hero__credit a { color: inherit; }
.infobox dl { gap: 0; }
.infobox dt { padding-right: var(--s3); }
.bio { max-width: 62ch; }
.bio .lede, .bio .toc { max-width: none; }
@media (max-width: 760px) { .person-hero__credit { max-width: 96px; font-size: 11px; } }
.bio { max-width: 38em; }
.bio-license { font-size: var(--fs-xs); color: var(--ink-3); margin-top: var(--s3); }
.bio-pending { margin-top: var(--s4); }
@media (max-width: 760px) { .person-hero__credit { display: none; } .article .infobox__credit { display: block; } }
.infobox__credit { display: none; padding: var(--s2) var(--s4) 0; font-size: var(--fs-xs); color: var(--ink-3); }

/* "Which of these is yours?" choosers (views/area-choices.js) */
.areachoices { margin-bottom: var(--s6); }
.areachoice { margin-top: var(--s4); padding: var(--s4); border: 1px solid var(--line); border-left: 4px solid var(--lvl); border-radius: var(--radius); background: var(--card); }
.areachoice__title, .areachoice__sum { font-size: var(--fs-md, 1.05rem); font-weight: 700; color: var(--ink); margin: 0; }
.areachoice__tag { display: flex; gap: 6px; align-items: center; margin: 4px 0 var(--s3); font-size: var(--fs-sm); color: var(--ink-2); }
.areachoice__tag svg, .areachoice__add svg { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.75; }
.areachoice__add { display: inline-flex; gap: 6px; align-items: center; margin-top: var(--s3); font-size: var(--fs-sm); font-weight: 650; }
.areachoice--city summary { cursor: pointer; display: flex; flex-wrap: wrap; gap: 4px var(--s3); align-items: baseline; }
.areachoice--city summary small { color: var(--ink-3); }
.choices { list-style: none; margin: var(--s3) 0 0; padding: 0; display: grid; gap: var(--s3); }
.choice { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: var(--s3); align-items: center; padding-top: var(--s3); border-top: 1px solid var(--line); }
.choice:first-child { border-top: 0; padding-top: 0; }
.choice__area { font-weight: 650; overflow-wrap: anywhere; }
.choice__share { display: block; font-weight: 400; color: var(--ink-3); }
.choice__people { display: grid; gap: var(--s2); }
.choice__person { display: flex; gap: var(--s3); align-items: center; }
.choice__photo { width: 40px; height: 48px; flex: none; border-radius: 8px; overflow: hidden; display: grid; place-items: center; background: color-mix(in srgb, var(--lvl) 16%, #fffdf8); color: var(--lvl); font-weight: 700; font-size: .85rem; }
.choice__photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 20%; }
.choice__who { display: grid; min-width: 0; }
.choice__who strong { overflow-wrap: anywhere; }
.choice__who small { color: var(--ink-3); }
.choices--compact { column-gap: var(--s5); }
@media (min-width: 1100px) { .areachoice--city .choices--compact { grid-template-columns: 1fr 1fr; } .areachoice--city .choices--compact .choice:nth-child(2) { border-top: 0; padding-top: 0; } }
@media (max-width: 760px) { .choice { grid-template-columns: 1fr; gap: var(--s2); } .areachoice { padding: var(--s3); } }
.areachoice--city .choice { grid-template-columns: 1fr; gap: var(--s2); align-items: start; }
.areachoice--city .choices--compact { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: var(--s4) var(--s5); }
.areachoice--city .choices--compact .choice, .areachoice--city .choices--compact .choice:nth-child(2) { border-top: 0; padding-top: 0; }
.choice__who strong a { text-decoration-thickness: 1px; }
