/* Florida Government Officials Directory
   White and light-gray surfaces, navy primary, a restrained red accent. */
:root {
  --navy: #13294b;
  --navy-600: #1f3d6b;
  --red: #b3262e;
  --bg: #f3f5f8;
  --surface: #ffffff;
  --tint: #eaeef4;
  --border: #d8dee8;
  --input: #a9b4c4;
  --text: #15213a;
  --muted: #56627a;
  --green: #1c6a45;
  --amber: #875800;
  --focus: #2457a6;
  --radius: 8px;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.55 var(--sans);
  -webkit-font-smoothing: antialiased;
}
main { flex: 1; }
h1, h2, h3 { font-family: var(--serif); line-height: 1.2; margin: 0; text-wrap: balance; letter-spacing: -0.01em; }
h1 { font-size: clamp(1.9rem, 4vw, 2.6rem); }
h2 { font-size: 1.3rem; }
p { margin: 0; }
a { color: var(--navy-600); text-underline-offset: 3px; }
a:hover { color: var(--red); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
svg:where(:not(.leaflet-pane svg)) { width: 1em; height: 1em; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
code { font-size: 0.85em; background: var(--tint); padding: 0.1em 0.35em; border-radius: 4px; overflow-wrap: anywhere; }

.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 16px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 16px; top: -60px; z-index: 10; background: var(--navy); color: #fff; padding: 8px 14px; border-radius: var(--radius); }
.skip:focus { top: 12px; color: #fff; }
.muted { color: var(--muted); }
.small { font-size: 0.875rem; }
.strong { font-weight: 600; }
.right { text-align: right; }
.nowrap { white-space: nowrap; }
.break { overflow-wrap: anywhere; }
.tabular { font-variant-numeric: tabular-nums; }
.error-text { color: var(--red); }
.gap-top { margin-top: 12px; }
.fine { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--border); }

/* header and footer */
#site-header { background: var(--surface); border-bottom: 1px solid var(--border); }
.topbar { height: 4px; background: linear-gradient(90deg, var(--navy) 0 85%, var(--red) 85% 100%); }
.header-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--text); }
.brand-mark { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; background: linear-gradient(135deg, #2457a6, var(--navy)); color: #fff; font-size: 20px; box-shadow: 0 2px 6px rgba(19, 41, 75, 0.25); }
.brand-name { font: 600 1.05rem/1.2 var(--serif); }
.nav-desktop { display: flex; gap: 4px; }
.nav-desktop a, .nav-mobile a { color: var(--muted); text-decoration: none; font-weight: 500; font-size: 0.95rem; padding: 8px 12px; border-bottom: 2px solid transparent; }
.nav-desktop a:hover, .nav-mobile a:hover { color: var(--text); }
.nav-desktop a[aria-current="page"] { color: var(--text); border-bottom-color: var(--red); }
.nav-mobile a[aria-current="page"] { color: var(--text); font-weight: 600; }
.menu-button { display: none; background: none; border: 0; padding: 8px; font-size: 22px; color: var(--text); cursor: pointer; }
.nav-mobile { border-top: 1px solid var(--border); }
.nav-mobile a { display: block; padding: 12px 4px; font-size: 1rem; }
#site-footer { margin-top: 64px; background: var(--surface); border-top: 1px solid var(--border); color: var(--muted); font-size: 0.9rem; }
.footer-row { display: flex; justify-content: space-between; gap: 24px; padding-top: 32px; padding-bottom: 32px; }
.footer-row > div { max-width: 560px; }
.footer-title { font: 600 1rem var(--serif); color: var(--text); margin-bottom: 6px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 24px; align-content: flex-start; }
.footer-links a { color: var(--muted); }

/* page frame */
.page { padding-top: 32px; }
.page-intro { margin-bottom: 24px; max-width: 760px; }
.page-intro p { margin-top: 8px; color: var(--muted); font-size: 1.05rem; }
.hero { background: var(--surface); border-bottom: 1px solid var(--border); padding: 56px 0; text-align: center; }
.hero p.lede { max-width: 640px; margin: 16px auto 0; color: var(--muted); font-size: 1.15rem; }
.hero-search { position: relative; max-width: 720px; margin: 32px auto 0; text-align: left; }
.section { margin-top: 40px; }
.section > h2 { margin-bottom: 16px; font-size: 1.5rem; }

/* surfaces */
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; box-shadow: 0 1px 2px rgba(19, 41, 75, 0.04); }
.panel + .panel { margin-top: 20px; }
.stack > .panel, .grid-2 > .panel, .profile-grid > .panel { margin-top: 0; }
.panel.flush { padding: 0; overflow: hidden; }
.panel h2 { margin-bottom: 4px; }
.panel-head { padding: 20px; }
.stack { display: grid; gap: 20px; align-content: start; }
.grid-2 { display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.split { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }

.tiles { display: grid; gap: 12px; margin: 0; }
.tiles-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.tiles-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.tile { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; }
.tile dt { color: var(--muted); font-size: 0.875rem; }
.tile dd { margin: 4px 0 0; font: 600 1.6rem var(--serif); }
.bar { height: 8px; margin: 10px 0; background: var(--tint); border-radius: 99px; overflow: hidden; }
.bar span { display: block; height: 100%; background: var(--navy); border-radius: 99px; }

.level-cards { display: grid; gap: 16px; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.level-card { display: flex; flex-direction: column; gap: 8px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; text-decoration: none; color: var(--text); transition: box-shadow 0.15s, border-color 0.15s; }
.level-card:hover { color: var(--text); border-color: var(--navy-600); box-shadow: 0 6px 18px rgba(19, 41, 75, 0.1); }
.level-card .icon { display: grid; place-items: center; width: 40px; height: 40px; border-radius: var(--radius); background: var(--tint); color: var(--navy); font-size: 20px; }
.level-card h3 { font-size: 1.15rem; }
.level-card p { color: var(--muted); font-size: 0.925rem; flex: 1; }
.level-card .foot { display: flex; justify-content: space-between; align-items: center; font-size: 0.9rem; }
.level-card .go { display: inline-flex; align-items: center; gap: 4px; color: var(--navy-600); font-weight: 600; }

/* controls */
label { display: block; font-size: 0.875rem; font-weight: 600; margin-bottom: 6px; }
input, select, button { font: inherit; color: inherit; }
input[type="search"], input[role="combobox"], select {
  width: 100%; height: 42px; padding: 0 12px; border: 1px solid var(--input); border-radius: 6px; background: var(--surface);
}
select { padding-right: 32px; }
.input-icon { position: relative; }
.input-icon svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.input-icon input { padding-left: 38px; }
.hero-search form { display: flex; gap: 8px; }
.hero-search .input-icon { flex: 1; }
.hero-search input { height: 52px; font-size: 1.05rem; }
.filters { border: 0; padding: 0; margin: 16px 0 0; display: grid; gap: 16px; grid-template-columns: repeat(6, minmax(0, 1fr)); }
.field.narrow { max-width: 360px; margin-bottom: 20px; }
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 42px; padding: 0 18px;
  border-radius: 6px; border: 1px solid transparent; background: var(--navy); color: #fff; font-weight: 600; cursor: pointer; text-decoration: none; white-space: nowrap;
}
.button:hover { background: var(--navy-600); color: #fff; }
.button.large { height: 52px; padding: 0 24px; }
.button.small { height: 36px; padding: 0 12px; font-size: 0.875rem; }
.button.outline { background: var(--surface); color: var(--text); border-color: var(--input); }
.button.outline:hover { background: var(--tint); color: var(--text); }
.button.ghost { background: transparent; color: var(--navy-600); padding: 0 4px; }
.button.ghost:hover { color: var(--red); background: transparent; }
#clear { margin-top: 12px; }
.button:disabled { opacity: 0.45; cursor: not-allowed; }
.actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.chip { height: 34px; padding: 0 14px; border-radius: 99px; border: 1px solid var(--input); background: var(--surface); cursor: pointer; font-size: 0.875rem; font-weight: 500; }
.chip[aria-pressed="true"] { background: var(--navy); border-color: var(--navy); color: #fff; }

.suggestions { position: absolute; left: 0; right: 0; top: 100%; z-index: 5; margin: 6px 0 0; padding: 0; list-style: none; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: 0 12px 30px rgba(19, 41, 75, 0.15); overflow: hidden; }
.suggestions li + li { border-top: 1px solid var(--border); }
.suggestions a { display: flex; flex-direction: column; padding: 10px 16px; text-decoration: none; color: var(--text); }
.suggestions a:hover, .suggestions a:focus-visible { background: var(--tint); }
.suggestions .muted { font-size: 0.875rem; }

/* badges */
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 10px; border-radius: 99px; font-size: 0.78rem; font-weight: 600; background: var(--tint); color: var(--navy); border: 1px solid transparent; white-space: nowrap; }
.badge.outline { background: transparent; border-color: var(--border); color: var(--text); font-weight: 500; }
.badge.navy { background: var(--navy); color: #fff; }
.badge.green { background: #e5f2ec; color: var(--green); border-color: #bcdccb; }
.badge.amber { background: #fbf1df; color: var(--amber); border-color: #ecd3a4; }
.badge.red { background: #fae8e9; color: var(--red); border-color: #efc2c5; }
.badges { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }

/* tables and cards */
.results-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--border); }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 0.925rem; }
th { text-align: left; padding: 10px 16px; background: #f5f7fa; color: var(--muted); font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; border-bottom: 1px solid var(--border); white-space: nowrap; }
th.right { text-align: right; }
td { padding: 12px 16px; border-bottom: 1px solid var(--border); vertical-align: middle; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #f8fafc; }
td.strong a { font-weight: 600; }
.sort { display: inline-flex; align-items: center; gap: 4px; background: none; border: 0; padding: 4px 0; color: inherit; font: inherit; text-transform: inherit; letter-spacing: inherit; cursor: pointer; }
.sort:hover { color: var(--text); }
.sort svg { opacity: 0.45; }
.sort.active { color: var(--text); }
.sort.active svg { opacity: 1; color: var(--red); }
.contact { display: flex; flex-direction: column; gap: 4px; }
td .contact a { white-space: nowrap; overflow-wrap: normal; }
.contact a { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; }
.contact a:hover span { text-decoration: underline; }
.contact svg { color: var(--muted); font-size: 0.85em; }
.details { display: inline-flex; align-items: center; gap: 4px; font-weight: 600; white-space: nowrap; text-decoration: none; }
.cards { display: none; list-style: none; margin: 0; padding: 0; }
.cards li { display: grid; gap: 10px; padding: 16px; border-bottom: 1px solid var(--border); }
.cards li:last-child { border-bottom: 0; }
.card-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.card-name { font: 600 1.05rem var(--serif); }
.card-top .muted { font-size: 0.875rem; margin-top: 2px; }
.pager { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 16px; border-top: 1px solid var(--border); font-size: 0.9rem; }

.mini-list { list-style: none; margin: 12px 0 0; padding: 0; }
.mini-list li { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 12px 0; border-top: 1px solid var(--border); }
.mini-list li > div { min-width: 0; flex: 1; }
.mini-list a { font-weight: 600; }
.mini-list p { font-size: 0.875rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-list > li > span { font-size: 0.875rem; flex-shrink: 0; }

/* profile */
.back { display: inline-flex; align-items: center; gap: 6px; font-size: 0.9rem; font-weight: 600; text-decoration: none; margin-bottom: 18px; }
.profile-head { margin-bottom: 24px; display: flex; align-items: center; gap: 20px; }
.profile-head .lede { margin-top: 8px; color: var(--muted); font-size: 1.15rem; }
.profile-grid { display: grid; gap: 20px; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); align-items: start; margin-top: 8px; }
.rows { margin: 12px 0 0; }
.rows .row { display: grid; grid-template-columns: 200px 1fr; gap: 16px; padding: 12px 0; border-top: 1px solid var(--border); }
.rows .row dt { color: var(--muted); font-size: 0.9rem; font-weight: 500; }
.rows .row dd { margin: 0; overflow-wrap: anywhere; }
.rows.compact .row { grid-template-columns: 1fr; gap: 2px; }
.rows a { display: inline-flex; align-items: center; gap: 4px; }
.contact-list { list-style: none; padding: 0; margin: 16px 0 0; display: grid; gap: 16px; }
.contact-list li { display: flex; gap: 12px; align-items: flex-start; }
.contact-list li > svg { font-size: 20px; color: var(--muted); margin-top: 2px; }
.contact-list li > div { min-width: 0; }
.contact-list a { font-weight: 600; display: inline-flex; align-items: center; gap: 4px; }

/* portraits */
.avatar { --s: 40px; position: relative; display: inline-flex; flex: none; align-items: center; justify-content: center; width: var(--s); height: var(--s); border-radius: 50%; overflow: hidden; background: var(--navy); color: #fff; font: 600 calc(var(--s) * 0.38) var(--sans); letter-spacing: 0.02em; box-shadow: 0 0 0 1px var(--border); user-select: none; }
.avatar img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center 12%; background: var(--tint); }
.avatar.blank { background: var(--tint); color: var(--navy); }
.avatar.xs { --s: 30px; }
.avatar.sm { --s: 36px; }
.avatar.lg { --s: 60px; }
.avatar.xl { --s: 112px; box-shadow: 0 0 0 3px #fff, 0 0 0 4px var(--border); }
.name-cell { display: flex; align-items: center; gap: 10px; min-width: 0; }

/* county map */
.map-layout { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 20px; align-items: start; }
.map-card { position: sticky; top: 16px; }
.map-wrap { position: relative; width: 100%; max-width: 520px; margin: 0 auto; }
.map-wrap svg { display: block; width: 100%; height: auto; }
.county-shape { fill: var(--tint); stroke: #fff; stroke-width: 0.9; stroke-linejoin: round; cursor: pointer; outline: none; transition: fill 0.12s; }
.county-shape.has-officials, .county-shape.t1 { fill: #c4d2e8; }
.county-shape.t2 { fill: #a3b8da; }
.county-shape.t3 { fill: #7f9bc9; }
.county-shape.t4 { fill: #5a7bb5; }
.county-shape:hover { fill: #8aa5cf; }
.county-shape:focus-visible { stroke: var(--focus); stroke-width: 3; }
.county-shape.selected { fill: var(--navy); }
.pins { position: absolute; inset: 0; pointer-events: none; }
.pin { position: absolute; transform: translate(-50%, -50%); padding: 0; border: 2px solid #fff; border-radius: 50%; background: none; cursor: pointer; pointer-events: auto; box-shadow: 0 1px 4px rgba(19, 41, 75, 0.35); }
.pin:hover { z-index: 2; transform: translate(-50%, -50%) scale(1.25); }
.pin:focus-visible { outline: 3px solid var(--focus); outline-offset: 1px; }
.map-note { margin-top: 12px; text-align: center; }
.map-panel .panel-top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 8px 16px; }
.panel-actions { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 16px; font-size: 0.9rem; font-weight: 600; }
.link-button { padding: 0; border: 0; background: none; color: var(--navy-600); font: inherit; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.link-button:hover { color: var(--red); }
.group { margin-top: 20px; font: 600 0.78rem var(--sans); text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.people { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 10px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.person > a { display: flex; align-items: center; gap: 12px; height: 100%; padding: 10px; border: 1px solid var(--border); border-radius: var(--radius); text-decoration: none; color: var(--text); }
.person > a:hover { border-color: var(--navy-600); box-shadow: 0 6px 18px rgba(19, 41, 75, 0.1); color: var(--text); }
.person > a > span:last-child { display: grid; gap: 2px; justify-items: start; min-width: 0; }
.person-name { font: 600 1rem var(--serif); color: var(--navy); }
.section-title { margin: 32px 0 14px; }

/* county explorer */
.section-lede { max-width: 720px; margin: -8px 0 16px; color: var(--muted); }
.map-picker { margin-bottom: 12px; }
.map-picker select { width: 100%; }
.pin { display: block; }
.legend { list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 16px; margin: 12px 0 0; padding: 0; }
.legend li { display: inline-flex; align-items: center; gap: 6px; }
.swatch { width: 14px; height: 14px; border-radius: 3px; border: 1px solid var(--border); }
.swatch.t1 { background: #c4d2e8; }
.swatch.t2 { background: #a3b8da; }
.swatch.t3 { background: #7f9bc9; }
.swatch.t4 { background: #5a7bb5; }
.swatch.selected { background: var(--red); }
.map-layout > .panel { margin-top: 0; }
.county-shape.selected { fill: var(--red); }
/* The marker sits above its county so the highlighted shape stays visible. */
.pin.marker { transform: translate(-50%, calc(-100% - 6px)); }
.pin.marker:hover { transform: translate(-50%, calc(-100% - 6px)) scale(1.15); }
.pin.marker::after { content: ""; position: absolute; left: 50%; bottom: -8px; transform: translateX(-50%); border: 5px solid transparent; border-top: 6px solid #fff; }
.map-panel .panel-top h2 { font-size: 1.6rem; }
.roster-tools { margin-top: 16px; display: grid; gap: 4px; }
.roster-tools .chips { margin-top: 8px; }
.chip:disabled { opacity: 0.45; cursor: default; }
.chip .tabular { opacity: 0.75; margin-left: 2px; }
.roster-level { margin-top: 8px; }
.roster-level .group { display: flex; align-items: center; gap: 8px; padding-top: 16px; border-top: 1px solid var(--border); }
.roster-level:first-child .group { border-top: 0; }
.count { display: inline-flex; min-width: 22px; justify-content: center; padding: 0 7px; border-radius: 99px; background: var(--tint); color: var(--navy); font: 600 0.75rem/1.6 var(--sans); letter-spacing: 0; text-transform: none; }
.roster-section { margin-top: 14px; }
.roster-section h4 { display: inline-flex; align-items: center; gap: 8px; margin: 0; font: 600 1rem var(--serif); color: var(--text); }
details.roster-section { border: 1px solid var(--border); border-radius: var(--radius); padding: 10px 12px; }
details.roster-section > summary { cursor: pointer; list-style: none; display: flex; align-items: center; justify-content: space-between; }
details.roster-section > summary::-webkit-details-marker { display: none; }
details.roster-section > summary::after { content: ""; width: 8px; height: 8px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); margin: 0 4px 4px 0; transition: transform 0.15s; }
details.roster-section[open] > summary::after { transform: rotate(-135deg); margin-bottom: -4px; }
details.roster-section[open] > .people { margin-top: 12px; }
.person.vacant > div { display: flex; align-items: center; gap: 12px; height: 100%; padding: 10px; border: 1px dashed var(--input); border-radius: var(--radius); background: var(--bg); }
.person.vacant > div > span:last-child { display: grid; gap: 2px; }
.person.vacant .person-name { color: var(--muted); }
.notice { margin-top: 12px; padding: 10px 12px; border-left: 3px solid var(--amber); background: #fbf1df; border-radius: 0 var(--radius) var(--radius) 0; color: #5c3d00; }
.about .bio-summary { margin-top: 10px; font-size: 1.02rem; color: #2c3a54; }

/* counties */
.county-grid { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.county-grid a { display: flex; gap: 12px; height: 100%; padding: 16px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); text-decoration: none; color: var(--text); }
.county-grid a:hover { border-color: var(--navy-600); box-shadow: 0 6px 18px rgba(19, 41, 75, 0.1); color: var(--text); }
.county-grid svg { color: var(--red); font-size: 20px; margin-top: 2px; }
.county-name { display: block; font: 600 1rem var(--serif); color: var(--navy); }
.county-grid + p { margin-top: 20px; }
.link-list { list-style: none; padding: 0; margin: 12px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.link-list a { display: inline-block; padding: 6px 12px; border: 1px solid var(--border); border-radius: 99px; text-decoration: none; font-size: 0.9rem; }
.plain { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 4px; font-size: 0.925rem; }

/* prose */
.prose { max-width: 760px; color: #2c3a54; }
.prose section { margin-top: 40px; scroll-margin-top: 24px; }
.prose h2 { font-size: 1.5rem; color: var(--text); margin-bottom: 12px; }
.prose p + p, .prose p + ul, .prose ul + p, .prose .panel + p { margin-top: 12px; }
.prose ul { padding-left: 22px; margin: 12px 0 0; }
.prose li + li { margin-top: 6px; }
.prose .panel { margin-top: 12px; }

/* states */
.state { padding: 48px 24px; text-align: center; display: grid; gap: 10px; justify-items: center; }
.state p { max-width: 520px; color: var(--muted); }
.state .state-title { font: 600 1.2rem var(--serif); color: var(--text); }
.state[role="status"] { justify-items: stretch; padding: 20px; }
.skeleton { height: 40px; border-radius: 6px; background: linear-gradient(90deg, var(--tint) 25%, #f4f6f9 50%, var(--tint) 75%); background-size: 200% 100%; animation: shimmer 1.4s infinite; }
.skeleton.short { width: 60%; }
@keyframes shimmer { to { background-position: -200% 0; } }

@media (max-width: 1000px) {
  .filters { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .level-cards, .county-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tiles-5 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .profile-grid { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .nav-desktop { display: none; }
  .menu-button { display: block; }
  .hero { padding: 36px 0; }
  .hero-search form { flex-direction: column; }
  .filters, .grid-2, .tiles-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-2 { grid-template-columns: 1fr; }
  .tiles-5 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tiles-5 .tile:first-child { grid-column: 1 / -1; }
  .table-wrap:not(.always) { display: none; }
  .cards { display: block; }
  .rows .row { grid-template-columns: 1fr; gap: 2px; }
  .footer-row { flex-direction: column; }
}

@media (max-width: 480px) {
  .filters, .level-cards, .county-grid, .tiles-4 { grid-template-columns: 1fr; }
  .brand-name { font-size: 0.95rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

@media (max-width: 860px) {
  .map-layout { grid-template-columns: 1fr; }
  .map-card { position: static; }
}
@media (max-width: 560px) {
  .people { grid-template-columns: 1fr; }
  .profile-head { flex-direction: column; align-items: flex-start; }
}

/* your representatives (map) */
.hero-cta { margin-top: 16px; }
.rep-search { display: grid; gap: 8px; margin-bottom: 20px; }
.rep-search-row { display: flex; flex-wrap: wrap; gap: 8px; }
.rep-search-row .input-icon { flex: 1 1 280px; }
.rep-search-row .button svg { margin-right: 6px; }
.rep-layout { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 20px; align-items: start; }
.rep-layout > .panel { margin-top: 0; }
.rep-map-card { position: sticky; top: 12px; }
.rep-layers { margin: 0; padding: 12px; border-bottom: 1px solid var(--border); }
.rep-map { height: min(68vh, 620px); min-height: 360px; background: #dfe8f1; }
.rep-map-note { padding: 10px 12px; }
.rep-marker { background: none; border: 0; }
.rep-marker .avatar { box-shadow: 0 0 0 2px #fff, 0 2px 8px rgba(19, 41, 75, 0.35); }
.leaflet-container { font: inherit; }
.leaflet-popup-content { font-size: 0.875rem; line-height: 1.45; }
.tag-list { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0 0; padding: 0; }
.swatch-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; vertical-align: middle; }
.rep-panel .people { grid-template-columns: minmax(0, 1fr); }
@media (max-width: 900px) {
  .rep-layout { grid-template-columns: minmax(0, 1fr); }
  .rep-map-card { position: static; }
  .rep-map { height: 58vh; }
}
.layer-tools { display: flex; flex-wrap: wrap; gap: 4px 16px; }
.layer-tools .chips { margin-top: 10px; }
.legend-row { list-style: none; display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 12px 0 0; padding: 0; font-size: 0.875rem; }
.district-list { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 6px; max-height: 52vh; overflow-y: auto; }
.district-list li { display: flex; align-items: center; gap: 8px; }
.district-row { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; padding: 6px 8px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); text-align: left; font: inherit; color: var(--text); cursor: pointer; }
.district-row:hover, .district-row:focus-visible { border-color: var(--navy-600); }
.district-row > span:last-child { display: grid; min-width: 0; }
.swatch-bar { flex: none; width: 6px; align-self: stretch; border-radius: 3px; }
.rep-borders { margin: 0; padding: 0 12px 12px; align-items: center; }
.small-chip { height: 30px; padding: 0 10px; font-size: 0.8rem; display: inline-flex; align-items: center; gap: 6px; }
.line-swatch { width: 22px; height: 6px; stroke-width: 0; }
.leaflet-tooltip.border-label { background: rgba(255, 255, 255, 0.85); border: 0; box-shadow: none; padding: 1px 5px; font-size: 0.72rem; font-weight: 600; }
.leaflet-tooltip.border-label::before { display: none; }
.hit-tag { cursor: pointer; font: inherit; font-size: 0.8rem; }
.hit-tag[aria-pressed="true"] { background: var(--navy); border-color: var(--navy); color: #fff; }
.small-chip[data-streets] { margin-right: 8px; }
.special-list { display: grid; gap: 10px; margin-top: 6px; }
.special-list li { line-height: 1.45; }

/* -- address combobox and results filters (representatives page) -- */
.input-icon.combo { position: relative; }
.suggest { position: absolute; z-index: 1000; top: calc(100% + 4px); left: 0; right: 0; margin: 0; padding: 4px; list-style: none;
  background: var(--surface); border: 1px solid var(--input); border-radius: var(--radius); box-shadow: 0 10px 28px rgba(19, 41, 75, 0.16); }
.suggest li { display: flex; align-items: center; gap: 8px; padding: 9px 10px; border-radius: 6px; cursor: pointer; font-size: 0.9375rem; }
.suggest li svg { width: 16px; height: 16px; flex: none; color: var(--muted); }
.suggest li:hover, .suggest li[aria-selected="true"] { background: var(--bg); color: var(--navy); }
.rep-results-top { align-items: flex-start; }
.rep-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.small-button { height: 32px; padding: 0 12px; font-size: 0.8125rem; }
.rep-filter { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 5; margin: 14px -4px 4px; padding: 8px 4px; background: var(--surface);
  border-bottom: 1px solid var(--border); overflow-x: auto; flex-wrap: nowrap; }
.rep-filter .chip { flex: none; }
.rep-filter .count { margin-left: 4px; color: var(--muted); font-variant-numeric: tabular-nums; }
.person.with-actions { position: relative; }
.person.with-actions > a { padding-bottom: 46px; }
.person-actions { position: absolute; bottom: 9px; left: 82px; display: flex; gap: 6px; }
.person-actions a { display: grid; place-items: center; padding: 0; line-height: 0; width: 30px; height: 30px; border-radius: 99px; border: 1px solid var(--border);
  background: var(--surface); color: var(--navy-600); }
.person-actions a:hover { border-color: var(--navy-600); background: var(--bg); }
.person-actions svg { width: 15px; height: 15px; }
/* end-reps-actions */

/* -- map toolbar: layer dropdown, borders menu, street map switch -- */
.map-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; padding: 12px; border-bottom: 1px solid var(--border); }
.map-field { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 0.875rem; color: var(--navy); }
.map-field select { width: auto; min-width: 230px; height: 38px; font-weight: 400; }
.borders-menu { position: relative; }
.borders-menu > summary { list-style: none; display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 12px 0 14px;
  border: 1px solid var(--input); border-radius: 6px; background: var(--surface); cursor: pointer; font-size: 0.875rem; font-weight: 500; }
.borders-menu > summary::-webkit-details-marker { display: none; }
.borders-menu > summary::after { content: ""; width: 7px; height: 7px; margin-left: 4px; border: solid var(--muted); border-width: 0 2px 2px 0;
  transform: translateY(-2px) rotate(45deg); }
.borders-menu[open] > summary::after { transform: translateY(1px) rotate(-135deg); }
.borders-menu .count { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 99px; background: var(--navy); color: #fff;
  font-size: 0.75rem; display: inline-grid; place-items: center; font-variant-numeric: tabular-nums; }
.borders-list { position: absolute; z-index: 1000; top: calc(100% + 6px); left: 0; min-width: 260px; margin: 0; padding: 8px;
  border: 1px solid var(--input); border-radius: var(--radius); background: var(--surface); box-shadow: 0 10px 28px rgba(19, 41, 75, 0.16); }
.border-option { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 6px; cursor: pointer; font-size: 0.9375rem; }
.border-option:hover { background: var(--bg); }
.border-option input { width: 16px; height: 16px; margin: 0; accent-color: var(--navy); }
.border-option:has(input:disabled) { opacity: 0.45; cursor: not-allowed; }
.borders-note { margin: 4px 8px 2px; }
.switch { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: 0.875rem; font-weight: 500; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch-track { position: relative; width: 36px; height: 20px; border-radius: 99px; background: var(--input); transition: background 0.15s; }
.switch-track::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25); transition: transform 0.15s; }
.switch input:checked + .switch-track { background: var(--navy); }
.switch input:checked + .switch-track::after { transform: translateX(16px); }
.switch input:focus-visible + .switch-track { outline: 2px solid var(--navy-600); outline-offset: 2px; }
@media (max-width: 640px) {
  .map-field { width: 100%; }
  .map-field select { flex: 1; min-width: 0; }
}
.borders-menu .count[hidden] { display: none; }

/* -- "Who runs this county": spotlight, dais, officer tiles -- */
.leadership { margin: 6px 0 18px; }
.leader-block { margin-top: 22px; }
.leader-block h4 { margin: 0 0 2px; font: 600 1.05rem var(--serif); color: var(--navy); }
.spotlight { position: relative; margin-top: 10px; padding: 18px 18px 14px; border-radius: var(--radius);
  background: linear-gradient(135deg, #13294b 0%, #1f3d6b 100%); color: #fff; overflow: hidden; }
.spots { list-style: none; margin: 0; padding: 0; display: grid; }
.spot { grid-area: 1 / 1; display: flex; align-items: center; gap: 18px; opacity: 0; transform: translateX(14px);
  transition: opacity 0.45s ease, transform 0.45s ease; pointer-events: none; }
.spot.on { opacity: 1; transform: none; pointer-events: auto; }
.spot .avatar.xl { box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.9); flex: none; }
.spot-role { margin: 0; font-size: 0.8125rem; letter-spacing: 0.04em; text-transform: uppercase; color: #c9d6ee; }
.spot-name { margin: 2px 0 6px; font: 600 1.5rem/1.2 var(--serif); color: #fff; }
.spot .badge.outline { color: #fff; border-color: rgba(255, 255, 255, 0.5); }
.spot-links { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 10px 0 0; }
.spot-links a { display: inline-flex; align-items: center; gap: 6px; color: #fff; }
.spot-links svg { width: 14px; height: 14px; }
.spot-dots { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.spot-dots button { width: 8px; height: 8px; padding: 0; border: 0; border-radius: 99px; background: rgba(255, 255, 255, 0.4); cursor: pointer;
  transition: width 0.2s, background 0.2s; }
.spot-dots button[aria-pressed="true"] { width: 22px; background: #fff; }
.spot-dots button:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { .spot { transition: none; } }

.dais-wrap { margin: 10px 0 0; }
.dais { position: relative; width: 100%; max-width: 460px; margin: 0 auto; aspect-ratio: 2 / 1.08; }
.dais::before { content: ""; position: absolute; left: 6%; right: 6%; bottom: 0; height: 88%; border: 2px dashed var(--border);
  border-bottom: 0; border-radius: 999px 999px 0 0; }
.seat { position: absolute; transform: translate(-50%, -50%); border-radius: 50%; text-decoration: none; }
.seat .avatar { box-shadow: 0 0 0 3px var(--surface), 0 0 0 6px var(--ring); transition: transform 0.15s; }
.dais.md .seat .avatar { --s: 54px; }
.dais.sm .seat .avatar { --s: 42px; }
.seat.lead .avatar { --s: 70px !important; }
.seat:hover .avatar, .seat:focus-visible .avatar { transform: scale(1.08); }
.seat:focus-visible { outline: none; }
.seat-tip { position: absolute; left: 50%; bottom: calc(100% + 8px); transform: translateX(-50%); z-index: 5; display: none; width: max-content;
  max-width: 220px; padding: 6px 10px; border-radius: 6px; background: var(--navy); color: #fff; font-size: 0.8125rem; text-align: center; }
.seat-tip strong { display: block; font-weight: 600; }
.seat:hover .seat-tip, .seat:focus-visible .seat-tip { display: block; }
.dais-centre { position: absolute; left: 50%; bottom: 4%; transform: translateX(-50%); display: grid; justify-items: center; color: var(--muted); }
.dais-centre strong { font: 600 1.6rem var(--serif); color: var(--navy); line-height: 1; }
.dais-centre span { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.06em; }
.dais-mix { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 14px; margin-top: 8px; }
.dais-mix i { display: inline-block; width: 9px; height: 9px; margin-right: 5px; border-radius: 50%; vertical-align: 0; }

.officer-tiles { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
.officer-tiles a { display: flex; align-items: center; gap: 10px; padding: 10px; border: 1px solid var(--border); border-radius: var(--radius);
  text-decoration: none; color: var(--text); height: 100%; }
.officer-tiles a:hover { border-color: var(--navy-600); box-shadow: 0 6px 18px rgba(19, 41, 75, 0.1); }
.officer-tiles a > span { display: grid; gap: 1px; min-width: 0; }
.officer-role { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); }

details.everyone { margin-top: 26px; border-top: 1px solid var(--border); padding-top: 14px; }
details.everyone > summary { cursor: pointer; list-style: none; }
details.everyone > summary::-webkit-details-marker { display: none; }
details.everyone > summary h3 { display: inline; }
details.everyone > summary::before { content: "▸"; margin-right: 8px; color: var(--muted); }
details.everyone[open] > summary::before { content: "▾"; }
details.everyone > summary .muted { display: block; margin: 2px 0 0 18px; }
@media (max-width: 640px) {
  .spot { flex-direction: column; text-align: center; }
  .spot-links { justify-content: center; }
  .dais.md .seat .avatar { --s: 40px; }
  .seat.lead .avatar { --s: 52px !important; }
}
.back-link { display: inline-flex; align-items: center; gap: 6px; margin: 0 0 10px; padding: 0; border: 0; background: none; color: var(--navy-600);
  font: 600 0.875rem var(--sans); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.back-link svg { width: 16px; height: 16px; }
.type-chips { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 0; padding: 0; }
.type-chips li { padding: 4px 10px; border-radius: 99px; background: var(--tint); color: var(--navy); font-size: 0.8125rem; }
.type-chips .count { margin-left: 4px; color: var(--muted); }
.special-more { margin-top: 10px; }
.special-more > summary { cursor: pointer; color: var(--navy-600); font-weight: 600; font-size: 0.875rem; }
.special-more .special-list { margin-top: 8px; max-height: 320px; overflow-y: auto; }
.coverage-table th[scope="row"] { font-weight: 500; text-align: left; }
.coverage-table .ok-cell { color: #1c6a45; font-weight: 600; }
.coverage-table .gap-cell { color: var(--muted); background: #fbf3e4; }
.gap-box { margin: 12px 0; padding: 12px 14px; border: 1px dashed var(--input); border-radius: var(--radius); background: var(--bg); }
.gap-box ul { margin: 6px 0; }
.gap-box li { padding: 2px 0; }
.board-marker { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--navy); color: #fff;
  font: 600 0.875rem var(--sans); box-shadow: 0 0 0 3px #fff, 0 2px 6px rgba(0, 0, 0, 0.25); }
.avatar-stack { display: inline-flex; flex: none; }
.avatar-stack .avatar { box-shadow: 0 0 0 2px var(--surface); }
.avatar-stack .avatar + .avatar { margin-left: -10px; }
/* Clicking a district shape shouldn't draw the browser's focus box around it. */
.leaflet-container path.leaflet-interactive:focus,
.leaflet-container .leaflet-interactive:focus:not(:focus-visible) { outline: none; }
.chips.rep-filter { flex-wrap: wrap; overflow: visible; }
.rep-results-top { position: relative; }
.close-x { position: absolute; top: -6px; right: -6px; width: 36px; height: 36px; display: grid; place-items: center; border: 1px solid var(--border);
  border-radius: 50%; background: var(--surface); color: var(--text); font-size: 1.375rem; line-height: 1; cursor: pointer; }
.close-x:hover { background: var(--tint); }
.rep-results-top:has(.close-x) { padding-right: 44px; }
