/* Civic leadership and elections pages (src/civic/render.js). Strict blue ramp only (palette v2):
   #F2FAFE #E6F6FC #4FC3E7 #009DD7 #0A76BA #1268AE #164C7E #182E45; mid and dark tones carry white text. */
.cv-hero .ls-tagline { max-width: 760px; }
.cv-tabs, .cv-jump { margin-top: 16px; flex-wrap: wrap; gap: 8px; display: flex; }
.cv-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.cv-page { padding-top: 24px; padding-bottom: 48px; display: flex; flex-direction: column; gap: 28px; }
.cv-section { min-width: 0; }
.cv-h2 { font-size: 24px; font-weight: 900; color: var(--brand-navy); margin: 0 0 14px; line-height: 1.2; }
.cv-h3 { font-size: 17px; font-weight: 700; color: var(--brand-navy); margin: 0; line-height: 1.3; }
.cv-h3--city { margin: 22px 0 10px; font-size: 18px; }
.cv-note { font-size: 14px; color: var(--fg-2); line-height: 1.55; margin: 10px 0 0; }
.cv-note a, .cv-neutral a, .cv-prose a { color: #1268AE; }
.cv-muted { color: var(--gray-500); }
.cv-neutral { font-size: 14px; color: var(--fg-2); background: #F2FAFE; border: 1px solid #E6F6FC; border-radius: 12px; padding: 12px 16px; margin: 0; }
.cv-split { display: grid; grid-template-columns: 1fr; gap: 28px; }

/* the newest update, above the fold */
.cv-latest { border: 1px solid #4FC3E7; border-left: 6px solid #0A76BA; background: #F2FAFE; border-radius: 12px; padding: 16px 18px; }
.cv-latest__when { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.cv-latest__when .eyebrow { color: #1268AE; }
.cv-latest__when time { font-weight: 700; color: var(--brand-navy); font-size: 14px; }
.cv-latest__title { font-size: 18px; font-weight: 700; color: var(--brand-navy); margin-top: 6px; line-height: 1.35; }
.cv-latest__text { margin: 6px 0 0; font-size: 15px; color: var(--fg-2); line-height: 1.55; }
/* a source citation wraps: one long citation in the shared latest update once widened every civic page past a phone's screen */
.cv-src { font-size: 13px; color: #1268AE; overflow-wrap: anywhere; }
.cv-log { list-style: none; margin: 0; padding: 0; }
.cv-log li { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 12px; padding: 10px 0; border-top: 1px solid var(--gray-200); font-size: 15px; line-height: 1.5; }
.cv-log li:first-child { border-top: 0; }
.cv-log time { font-weight: 700; color: #164C7E; font-size: 14px; }

/* status chips: a tonal ladder, never another hue */
/* short chips stay on one line; a long one ("Running for ... District Governing Board") wraps inside the screen */
.cv-chip { display: inline-block; max-width: 100%; font-size: 12px; font-weight: 700; border-radius: 999px; padding: 3px 10px; line-height: 1.5; }
.cv-chip--light { background: #E6F6FC; color: #164C7E; }
.cv-chip--mid { background: #1268AE; color: #fff; }
.cv-chip--deep { background: #0A76BA; color: #fff; }
.cv-chip--muted { background: var(--gray-100); color: var(--gray-700); }
/* a party endorsement tag: links the party's own list */
.cv-chip--endorse { background: #F2FAFE; color: #164C7E; border: 1px solid #4FC3E7; text-decoration: none; white-space: normal; }
.cv-chip--endorse:hover { background: #E6F6FC; }
.cv-party { display: inline-block; font-size: 12px; font-weight: 700; color: #164C7E; background: #E6F6FC; border-radius: 4px; padding: 1px 6px; margin-left: 6px; }

/* tables scroll inside their wrapper, never the page */
.cv-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--gray-200); border-radius: 12px; }
.cv-table { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 560px; }
.cv-table caption { text-align: left; font-weight: 700; padding: 10px 14px; color: var(--brand-navy); }
.cv-table th, .cv-table td { text-align: left; padding: 10px 14px; border-top: 1px solid var(--gray-200); vertical-align: top; }
.cv-table thead th { border-top: 0; background: #F2FAFE; font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; color: #164C7E; }
.cv-table tbody th { font-weight: 500; color: var(--brand-navy); }
.cv-table a { color: #1268AE; text-decoration: none; }
.cv-table a:hover { text-decoration: underline; }
.cv-table--cities td { white-space: nowrap; }
.cv-sub { display: block; font-size: 12px; color: var(--gray-500); font-weight: 400; }
.cv-person { font-weight: 500; }

/* Census figures */
.cv-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.cv-stat { background: #F2FAFE; border-radius: 12px; padding: 12px 14px; }
.cv-stat__v { font-size: 20px; font-weight: 900; color: var(--brand-navy); line-height: 1.2; }
.cv-stat__k { font-size: 13px; color: var(--fg-2); margin-top: 2px; }
.cv-mix { margin: 18px 0 0; }
.cv-mix__bar { display: flex; height: 18px; border-radius: 999px; overflow: hidden; margin-top: 8px; background: var(--gray-100); }
.cv-mix__seg--0 { background: #0A76BA; }
.cv-mix__seg--1 { background: #4FC3E7; }
.cv-mix__seg--2 { background: #164C7E; }
.cv-mix__seg--3 { background: #009DD7; }
.cv-mix__seg--4 { background: #182E45; }
.cv-mix__key { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 14px; color: var(--fg-2); }
.cv-mix__dot { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 6px; vertical-align: middle; }

/* maps */
.cv-map { margin: 0; }
.cv-map img, .cv-map iframe { width: 100%; height: auto; aspect-ratio: 640 / 420; border: 1px solid var(--gray-200); border-radius: 12px; display: block; background: #F2FAFE; }
.cv-map figcaption { font-size: 13px; color: var(--fg-2); margin-top: 8px; }
.cv-map figcaption a { color: #1268AE; }

/* county cards */
.cv-counties { display: grid; grid-template-columns: 1fr; gap: 12px; }
.cv-county { display: flex; flex-direction: column; gap: 4px; border: 1px solid var(--gray-200); border-radius: 16px; padding: 16px 18px; text-decoration: none; color: inherit; box-shadow: var(--shadow-xs); transition: border-color var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out); }
.cv-county:hover { border-color: #4FC3E7; box-shadow: var(--shadow-sm); }
.cv-county__name { font-size: 18px; font-weight: 900; color: var(--brand-navy); }
.cv-county__meta { font-size: 13px; color: var(--gray-500); }
.cv-county__facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 12px; margin: 10px 0 0; }
.cv-county__facts div { min-width: 0; }
.cv-county__facts dt { font-size: 12px; color: var(--gray-500); }
.cv-county__facts dd { margin: 0; font-weight: 700; color: var(--brand-navy); font-size: 15px; }
.cv-county__go { margin-top: 10px; font-size: 14px; font-weight: 700; color: #1268AE; }
.cv-counties--tight .cv-county { padding: 12px 14px; }

/* cities */
.cv-cities { display: flex; flex-direction: column; gap: 8px; margin-top: 16px; }
.cv-city { border: 1px solid var(--gray-200); border-radius: 12px; }
.cv-city summary { cursor: pointer; list-style: none; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 16px; padding: 12px 16px; }
.cv-city summary::-webkit-details-marker { display: none; }
.cv-city summary::before { content: '+'; font-weight: 900; color: #1268AE; margin-right: 8px; }
.cv-city[open] summary::before { content: '\2212'; }
.cv-city__name { font-weight: 700; color: var(--brand-navy); flex: 1 1 auto; }
.cv-city__facts { font-size: 14px; color: var(--fg-2); }
.cv-city__body { padding: 0 16px 16px; }
.cv-city__body .cv-note { margin: 0 0 10px; }

/* contests */
.cv-contests { display: grid; grid-template-columns: 1fr; gap: 12px; }
.cv-contest { border: 1px solid var(--gray-200); border-radius: 14px; padding: 14px 16px; box-shadow: var(--shadow-xs); }
.cv-contest__head { display: flex; flex-direction: column; gap: 2px; margin-bottom: 8px; }
.cv-contest__meta { font-size: 13px; color: var(--gray-500); }
.cv-contest__note { font-size: 13px; color: var(--fg-2); margin: 10px 0 0; }
.cv-contest__note a { color: #1268AE; }
.cv-cands, .cv-measures { list-style: none; margin: 0; padding: 0; }
.cv-cand { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; padding: 8px 0; border-top: 1px solid var(--gray-200); }
.cv-cand:first-child { border-top: 0; }
.cv-cand__name { font-weight: 700; color: var(--brand-navy); }
.cv-cand__name a { color: var(--brand-navy); text-decoration: none; border-bottom: 1px solid #4FC3E7; }
.cv-cand__desig { width: 100%; font-size: 13px; color: var(--fg-2); }
.cv-cand__pct { font-weight: 900; color: #164C7E; margin-left: auto; }
.cv-cand__bar { width: 100%; height: 6px; background: var(--gray-100); border-radius: 999px; overflow: hidden; }
.cv-cand__bar span { display: block; height: 100%; background: #0A76BA; }
.cv-cand.is-winner .cv-cand__name::after { content: ' (projected or certified winner)'; font-weight: 400; font-size: 12px; color: #1268AE; }
/* campaign money: one line under each candidate, the figure and the report it comes from */
.cv-cand__money { width: 100%; font-size: 13px; color: var(--fg-2); display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 6px; }
.cv-cand__money strong { font-size: 14px; font-weight: 800; color: #164C7E; font-variant-numeric: tabular-nums; }
.cv-cand__money.is-na strong { color: var(--fg-2); font-weight: 700; }
.cv-money__k { text-transform: uppercase; letter-spacing: .04em; font-size: 12px; font-weight: 700; color: var(--gray-500); }
.cv-money-note { padding-top: 8px; border-top: 1px solid var(--gray-200); }
.cv-measure { padding: 8px 0; border-top: 1px solid var(--gray-200); font-size: 15px; line-height: 1.45; }
.cv-measure:first-child { border-top: 0; }

/* profiles */
.cv-person-page .post__main { display: flex; flex-direction: column; gap: 22px; }
.cv-summary { font-size: 18px; line-height: 1.6; color: var(--brand-navy); margin: 0; }
.cv-prose p, .cv-prose li { font-size: 16px; line-height: 1.7; color: var(--fg-1); }
.cv-prose ul { padding-left: 20px; }
.cv-voice { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.cv-voice li { border-left: 4px solid #4FC3E7; padding: 4px 0 4px 14px; }
.cv-voices + .cv-voices .cv-voice li { border-left-color: #164C7E; }
.cv-voice p { margin: 0; font-size: 16px; line-height: 1.6; }
.cv-voice__who { font-size: 13px; color: var(--fg-2); margin-top: 4px; }
.cv-voice__who a { color: #1268AE; }
.cv-links { list-style: none; margin: 0; padding: 0; }
.cv-links li { padding: 6px 0; }
.cv-links a { color: #1268AE; }
.cv-draft { background: #F2FAFE; border-color: #4FC3E7; }

/* leaders index */
.cv-people { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr; gap: 0 24px; }
.cv-people li { padding: 8px 0; border-top: 1px solid var(--gray-200); display: flex; flex-direction: column; }
.cv-people a { font-weight: 700; color: var(--brand-navy); text-decoration: none; }
.cv-people a:hover { color: #1268AE; }
.cv-people span { font-size: 13px; color: var(--fg-2); }
.cv-letter { scroll-margin-top: calc(var(--header-h) + 12px); }
#county, #cities, #state, #federal, #numbers, .cv-city, .cv-contest { scroll-margin-top: calc(var(--header-h) + 12px); }
/* Phones: the jump bar (letters on /civic/leaders, sections on a county page or ballot) stays under
   the header as one row that scrolls sideways, so a list of 806 names or a 48,000px ballot can be
   crossed from anywhere (2026-10-18 mobile audit); what it jumps to lands below it */
@media (max-width: 719.98px) {
  .cv-jump { position: sticky; top: calc(var(--header-h) + 1px); z-index: 20; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none;
    margin: 0 -20px; padding: 10px 20px; background: #fff; border-bottom: 1px solid var(--gray-200); }
  .cv-jump::-webkit-scrollbar { display: none; }
  .cv-jump > * { flex: none; }
  /* html already pads anchor scrolls by the header (scroll-padding-top), so this adds the bar */
  #county, #cities, #state, #federal, #numbers, .cv-letter, .cv-section[id], .cv-city, .cv-contest { scroll-margin-top: 56px; }
}
@media (max-width: 480px) {
  .cv-jump { top: 65px; }
}
.cv-next { background: #F2FAFE; border-radius: 16px; padding: 20px; }
.cv-next p { margin: 0 0 12px; }

@media (min-width: 640px) {
  .cv-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .cv-counties { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cv-people { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cv-cand__desig { width: auto; }
}
@media (min-width: 960px) {
  .cv-split { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; }
  .cv-counties { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .cv-contests { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cv-people { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .cv-contest__head { flex-direction: row; justify-content: space-between; align-items: baseline; gap: 12px; }
}
