/* Trace UI prototype — design system
   Identity: dark header, warm cream paper, serif display + clean sans.
   No webfonts are downloaded; the stacks below use high-quality system faces. */

:root {
  /* colour */
  --ink: #1b1a15;          /* body text on cream: 15.9:1 */
  --ink-2: #4a463b;        /* secondary text: 8.6:1 */
  --ink-3: #6b6556;        /* tertiary / meta: 5.3:1 */
  --paper: #f6f1e6;        /* page */
  --paper-2: #efe8d8;      /* sunken */
  --card: #fffdf8;         /* raised */
  --line: #ddd4bf;
  --line-2: #c9bea4;
  --night: #15140f;        /* header */
  --night-2: #26241c;
  --on-night: #f3efe5;
  --on-night-2: #c9c2b0;
  --accent: #9a5b0b;       /* amber, text-safe on cream 5.4:1 */
  --accent-bright: #d99a3a;/* on night only */
  --accent-wash: #f6e7cc;
  --green: #2f6f4e;        /* focus + positive */
  --green-wash: #e2efe6;
  --red: #9b2c1f;
  --red-wash: #f7e3de;

  /* government levels */
  --lvl-federal: #8c2f2b;
  --lvl-provincial: #24557a;
  --lvl-regional: #5b4a8a;
  --lvl-municipal: #2f6f4e;
  --lvl-school: #8a5a14;

  /* type */
  --font-display: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Charter, "Bitstream Charter", Georgia, serif;
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", "Inter", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --fs-xs: 0.8125rem;   /* 13 */
  --fs-sm: 0.875rem;    /* 14 */
  --fs-md: 1rem;        /* 16 */
  --fs-lg: 1.125rem;    /* 18 */
  --fs-xl: 1.375rem;    /* 22 */
  --fs-2xl: clamp(1.6rem, 1.2rem + 1.4vw, 2.1rem);
  --fs-3xl: clamp(2rem, 1.4rem + 2.4vw, 3rem);
  --fs-hero: clamp(2.3rem, 1.5rem + 3.4vw, 4rem);

  /* space & shape */
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px; --s8: 64px; --s9: 96px;
  --radius: 14px;
  --radius-sm: 9px;
  --radius-pill: 999px;
  --shadow-1: 0 1px 0 rgba(27, 26, 21, .04), 0 1px 3px rgba(27, 26, 21, .06);
  --shadow-2: 0 2px 4px rgba(27, 26, 21, .05), 0 10px 28px rgba(27, 26, 21, .09);
  --focus: 0 0 0 3px var(--paper), 0 0 0 6px var(--green);
  --page: 1200px;
  --measure: 68ch;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
/* Default size for inline icons; component rules below override. */
:where(svg:not([width])) {
  width: 1.1em; height: 1.1em; flex: none; vertical-align: -0.18em;
  fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
}
h1, h2, .hero__lede, .rep__does, .explain__item p, .story h3 { text-wrap: balance; }
p { text-wrap: pretty; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 88px; }
body {
  margin: 0;
  font: 400 var(--fs-md)/1.6 var(--font-body);
  color: var(--ink);
  background: var(--paper);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main { flex: 1; outline: none; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--accent); }
button, input, select { font: inherit; color: inherit; }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 600; line-height: 1.15; margin: 0; letter-spacing: -0.01em; }
p { margin: 0; }
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: 6px; }
/* Headings and regions get focus only so screen readers announce the new page; they are not controls, so no ring (John 2026-10-17: the green box on page titles). */
h1[tabindex="-1"]:focus-visible, h2[tabindex="-1"]:focus-visible, section[tabindex="-1"]:focus-visible, div[tabindex="-1"]:focus-visible { box-shadow: none; }
::selection { background: var(--accent-wash); }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}
.skip-link {
  position: absolute; left: var(--s4); top: -60px; z-index: 100;
  background: var(--card); padding: var(--s2) var(--s4); border-radius: var(--radius-sm);
  font-weight: 600; text-decoration: none; box-shadow: var(--shadow-2);
}
.skip-link:focus { top: var(--s3); }

.wrap { width: min(100% - 2 * var(--s5), var(--page)); margin-inline: auto; }
@media (max-width: 520px) { .wrap { width: calc(100% - 2 * var(--s4)); } }

/* ---------- header ---------- */
.site-header {
  background: var(--night);
  color: var(--on-night);
  position: sticky; top: 0; z-index: 20;
  border-bottom: 1px solid #000;
}
.site-header__inner {
  width: min(100% - 2 * var(--s5), var(--page)); margin-inline: auto;
  display: flex; align-items: center; gap: var(--s5);
  min-height: 64px;
}
.brand { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; text-decoration: none; flex: none; }
.brand__mark { width: 30px; height: 30px; }
.brand__name { font-family: var(--font-display); font-size: 1.45rem; font-weight: 600; letter-spacing: 0.01em; }
.site-nav { display: flex; gap: var(--s1); margin-left: auto; }
.site-nav a {
  text-decoration: none; color: var(--on-night-2); font-size: var(--fs-sm); font-weight: 500;
  padding: 8px 12px; border-radius: var(--radius-pill);
}
.site-nav a:hover { color: var(--on-night); background: var(--night-2); }
.site-nav a[aria-current="page"] { color: var(--on-night); background: var(--night-2); }
.site-header :focus-visible { box-shadow: 0 0 0 3px var(--night), 0 0 0 6px var(--accent-bright); }

.header-search { flex: 1; max-width: 460px; display: flex; position: relative; }
.header-search input {
  width: 100%; height: 40px; border-radius: var(--radius-pill); border: 1px solid #3a372c;
  background: var(--night-2); color: var(--on-night); padding: 0 44px 0 16px; font-size: var(--fs-sm);
}
.header-search input::placeholder { color: #a39c8a; }
.header-search__btn {
  position: absolute; right: 4px; top: 4px; width: 32px; height: 32px; border: 0; border-radius: 50%;
  background: transparent; color: var(--on-night-2); cursor: pointer; display: grid; place-items: center;
}
.header-search__btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
@media (max-width: 760px) {
  .site-header__inner { flex-wrap: wrap; gap: var(--s2) var(--s3); padding: 10px 0; min-height: 56px; }
  .header-search { order: 3; flex-basis: 100%; max-width: none; }
}

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--line); margin-top: var(--s8); background: var(--paper-2); }
.site-footer__inner { width: min(100% - 2 * var(--s5), var(--page)); margin-inline: auto; padding: var(--s6) 0; display: grid; gap: var(--s2); font-size: var(--fs-sm); color: var(--ink-2); }
.site-footer__meta { color: var(--ink-3); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 18px; border-radius: var(--radius-pill);
  border: 1px solid var(--line-2); background: var(--card); color: var(--ink);
  font-weight: 600; font-size: var(--fs-sm); text-decoration: none; cursor: pointer;
  transition: background .15s, border-color .15s, transform .05s;
  white-space: nowrap;
}
.btn:hover { border-color: var(--ink-3); background: #fff; }
.btn:active { transform: translateY(1px); }
.btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.btn--primary { background: var(--night); color: var(--on-night); border-color: var(--night); }
.btn--primary:hover { background: #2c2a21; border-color: #2c2a21; }
/* Primary button = brand amber on dark (#0F0F0D on #F9B32E is about 10:1) on every page. */
.btn--accent { background: var(--tc-amber, #F9B32E); color: var(--tc-bg, #0F0F0D); border-color: var(--tc-amber, #F9B32E); font-weight: 700; }
.btn--accent:hover { background: #ffc24d; border-color: #ffc24d; }
.btn--ghost { background: transparent; border-color: transparent; color: var(--ink-2); }
.btn--ghost:hover { background: var(--paper-2); border-color: transparent; }
.btn--sm { min-height: 36px; padding: 0 14px; font-size: var(--fs-xs); }
.btn--block { width: 100%; }
.linkish { background: none; border: 0; padding: 0; color: var(--accent); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }

.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: var(--radius-pill);
  font-size: var(--fs-xs); font-weight: 600; background: var(--paper-2); color: var(--ink-2); border: 1px solid var(--line);
  line-height: 1.5;
}
.chip--level { color: #fff; border-color: transparent; background: var(--lvl, var(--ink-2)); letter-spacing: .02em; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--party, var(--ink-3)); display: inline-block; flex: none; }

.eyebrow { font: 700 var(--fs-xs)/1.3 var(--font-body); letter-spacing: .09em; text-transform: uppercase; color: var(--accent); }

/* ---------- home ---------- */
/* MOBILE-HOME (2026-10-18, John: "on mobile this page looks sort of meh"). The first screen is the
   TraceCivic brand surface: --tc-bg, sans hero (follows --font-brand, so a serif swap still applies),
   turquoise focus ring, amber-on-dark button, the two brand roads behind the text, the three level
   cards on every width, and a flat two-road rule into the paper section (no more cream curve). */
.hero { background: var(--tc-bg, var(--night)); color: var(--on-night); padding: var(--s8) 0 var(--s8); position: relative; overflow: hidden; isolation: isolate; }
.hero__roads {
  position: absolute; right: -10%; top: -22%; width: min(70vw, 720px); height: auto; pointer-events: none; z-index: 0;
  -webkit-mask-image: linear-gradient(200deg, #000 35%, transparent 72%); mask-image: linear-gradient(200deg, #000 35%, transparent 72%);
}
.hero__road { fill: none; stroke-width: 26; stroke-linecap: round; }
.hero__road--teal { stroke: var(--tc-turquoise); opacity: .3; }
.hero__road--amber { stroke: var(--tc-amber); opacity: .22; }
.hero__inner { position: relative; z-index: 1; max-width: 760px; }
.hero__grid { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: var(--s7); align-items: center; position: relative; z-index: 1; }
.hero__preview-wrap { display: grid; gap: var(--s3); }
.hero__preview-label { font: 700 var(--fs-xs)/1.3 var(--font-body); letter-spacing: .09em; text-transform: uppercase; color: var(--on-night-2); }
.hero__preview { display: grid; gap: var(--s3); list-style: none; margin: 0; padding: 0; }
.preview-card {
  display: grid; grid-template-columns: 44px 1fr; gap: var(--s3); align-items: center; position: relative; overflow: hidden;
  background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .1); border-radius: 14px; padding: 14px 16px 14px 20px;
  margin-right: calc((2 - var(--i)) * 18px);
}
.preview-card::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--lvl); }
.preview-card__lvl { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.preview-card__dot { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; color: #fff; background: linear-gradient(160deg, color-mix(in srgb, var(--lvl) 70%, #f3efe5), var(--lvl)); }
.preview-card__dot svg { width: 22px; height: 22px; }
.preview-card__lvl { font-size: var(--fs-xs); font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #bdb5a2; }
.preview-card__who { font-family: var(--font-brand, var(--font-body)); font-weight: 600; font-size: 1.1rem; color: var(--on-night); }
.preview-card__what { font-size: var(--fs-xs); color: #a7a08e; }
@media (max-width: 1080px) {
  .hero__grid { grid-template-columns: 1fr; gap: var(--s6); }
  .hero__preview { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .preview-card { margin-right: 0; }
  .hero--vibe .hero__preview-wrap--desktop { display: none; }
}
@media (max-width: 640px) { .hero__preview { grid-template-columns: 1fr; } }
.hero .eyebrow { color: var(--tc-amber, var(--accent-bright)); }
.hero h1 { font-family: var(--font-brand, var(--font-display)); font-size: var(--fs-hero); font-weight: 700; line-height: 1.06; margin: var(--s3) 0 var(--s4); letter-spacing: -0.012em; }
.hero__preview-label { text-transform: none; letter-spacing: 0; font: 600 var(--fs-sm)/1.3 var(--font-body); color: var(--on-night-2); }
.hero h1 em { font-style: normal; color: var(--tc-amber, #f0c98a); }
.hero__lede { font-size: var(--fs-lg); color: var(--on-night-2); max-width: 60ch; text-wrap: pretty; }
.hero .linkish { color: var(--tc-amber, var(--accent-bright)); }
.search-xl__under .btn--loc svg { color: var(--tc-turquoise, var(--on-night)); stroke-width: 2; }

.search-xl { margin-top: var(--s6); position: relative; }
.search-xl__field {
  display: flex; align-items: center; gap: var(--s2); background: var(--tc-white, var(--card)); border-radius: 16px;
  padding: 8px 8px 8px 20px; box-shadow: 0 18px 50px rgba(0, 0, 0, .35); border: 2px solid transparent;
}
.search-xl__field:focus-within { border-color: var(--tc-turquoise, var(--green)); box-shadow: 0 0 0 3px color-mix(in srgb, var(--tc-turquoise, #38ACBB) 30%, transparent), 0 18px 50px rgba(0, 0, 0, .35); }
.search-xl__field svg.icon { width: 22px; height: 22px; fill: none; stroke: var(--ink-3); stroke-width: 2; stroke-linecap: round; flex: none; }
.search-xl input {
  flex: 1; min-width: 0; border: 0; background: transparent; font-size: 1.2rem; height: 52px; color: var(--ink); outline: none;
}
@media (max-width: 520px) {
  /* Stacked: the input is its own visible field above the button. */
  .search-xl input { background: var(--paper); border: 1px solid var(--line-2); border-radius: 10px; padding: 0 14px; }
  .search-xl__field:focus-within input { border-color: var(--tc-turquoise, var(--green)); }
}
.search-xl input::placeholder { color: #6b6556; }
.search-xl input:focus-visible { box-shadow: none; }
.search-xl .btn { min-height: 52px; padding: 0 26px; font-size: var(--fs-md); border-radius: 12px; }
/* Brand amber on the dark surface (#0F0F0D on #F9B32E is about 10:1). Elsewhere .btn--accent stays the
   darker amber that is readable with white text on cream. */
.hero .btn--accent { background: var(--tc-amber, var(--accent)); color: var(--tc-bg, var(--night)); border-color: var(--tc-amber, var(--accent)); font-weight: 700; }
.hero .btn--accent:hover { background: #ffc24d; border-color: #ffc24d; }
.search-xl__under { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s3) var(--s4); margin-top: var(--s4); color: var(--on-night-2); font-size: var(--fs-sm); }
.search-xl__under .btn--loc { background: rgba(255, 255, 255, .04); color: var(--on-night); border-color: rgba(255, 255, 255, .24); min-height: 44px; }
.search-xl__under .btn--loc:hover { background: rgba(255, 255, 255, .1); border-color: rgba(255, 255, 255, .4); }
.search-xl__under .hero__saved { margin: 0; min-height: 44px; }
.search-xl__under .hero__saved a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 2px; }
.search-xl__under .hero__saved svg { color: var(--tc-turquoise, var(--on-night)); }
.examples { display: flex; flex-wrap: wrap; gap: var(--s2); align-items: center; flex-basis: 100%; }
.examples a {
  color: var(--on-night); text-decoration: none; padding: 0 14px; min-height: 44px; display: inline-flex; align-items: center; border-radius: var(--radius-pill);
  border: 1px solid rgba(255, 255, 255, .18); background: rgba(255, 255, 255, .05); font-size: var(--fs-sm);
}
.examples a:hover { border-color: var(--tc-amber, var(--accent-bright)); }
.examples > span { color: #bdb5a2; }
.examples .linkish { min-height: 44px; padding: 0 2px; }
@media (max-width: 520px) {
  .hero { padding: var(--s5) 0 var(--s5); }
  .hero__roads { right: -22%; top: -6%; width: 118vw; }
  .hero h1 { font-size: 2rem; margin: var(--s2) 0 var(--s3); }
  .hero__lede { font-size: var(--fs-md); }
  .search-xl { margin-top: var(--s5); }
  .search-xl__field { flex-wrap: wrap; padding: 8px; }
  .search-xl__field svg.icon { display: none; }
  .search-xl input { flex-basis: 100%; padding: 0 10px; height: 48px; font-size: 1.05rem; }
  .search-xl .btn { width: 100%; }
  .hero__grid { gap: var(--s5); }
  .preview-card { grid-template-columns: 36px 1fr; padding: 10px 12px; border-radius: 12px; }
  .preview-card__dot { width: 36px; height: 36px; border-radius: 10px; }
  .preview-card__dot svg { width: 18px; height: 18px; }
  .preview-card__who { font-size: 1rem; }
}

/* The paper section starts flat, under a rule that meets like the two brand roads. */
.explain { padding: 0 0 var(--s4); }
.explain::before { content: ""; display: block; height: 4px; background: linear-gradient(90deg, var(--tc-turquoise, var(--green)) 0 50%, var(--tc-amber, var(--accent)) 50% 100%); }
.explain > .wrap { padding-top: var(--s6); }
.home-vibe { display: grid; gap: var(--s2); background: var(--card); border: 1px solid var(--line); border-left: 4px solid var(--tc-turquoise, var(--green)); border-radius: var(--radius); padding: var(--s5); text-decoration: none; color: inherit; margin-bottom: var(--s5); transition: border-color .15s, box-shadow .15s; }
.home-vibe:hover { border-color: var(--line-2); box-shadow: var(--shadow-1); }
.home-vibe strong { font-family: var(--font-brand, var(--font-display)); font-weight: 650; font-size: var(--fs-xl); line-height: 1.25; text-wrap: balance; }
.home-vibe__dek { color: var(--ink-2); }
.home-vibe__more { color: var(--accent); font-weight: 700; display: inline-flex; gap: 6px; align-items: center; }
.home-vibe__more svg { width: 18px; height: 18px; }
.explain__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s5); }
.explain__item { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: var(--s5); }
.explain__item h2 { font-size: var(--fs-xl); margin: var(--s3) 0 var(--s2); }
.explain__item p { color: var(--ink-2); }
.explain__icon { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--accent-wash); color: var(--accent); }
.explain__icon svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.levels-strip { margin-top: var(--s6); display: flex; flex-wrap: wrap; gap: var(--s2); align-items: center; color: var(--ink-2); font-size: var(--fs-sm); }
@media (max-width: 860px) { .explain__grid { grid-template-columns: 1fr; } }

/* ---------- results ---------- */
.results-head { padding: var(--s6) 0 var(--s4); border-bottom: 1px solid var(--line); }
.results-head .eyebrow { display: flex; gap: 8px; align-items: center; }
.results-head h1 { font-size: var(--fs-3xl); margin-top: var(--s2); }
.results-head__place { font-size: var(--fs-lg); color: var(--ink-2); margin-top: var(--s2); }
.results-head__place strong { color: var(--ink); font-weight: 600; }
.results-head__person-hint { margin-top: var(--s2); color: var(--ink-2); }
.results-head__person-hint a { font-weight: 600; }
.results-head__actions { display: flex; flex-wrap: wrap; gap: var(--s2); margin-top: var(--s4); }

.results-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: var(--s7); padding-top: var(--s5); align-items: start; }
@media (max-width: 1080px) { .results-layout { grid-template-columns: 1fr; gap: var(--s6); } }

.jump { display: flex; gap: var(--s2); flex-wrap: wrap; margin-bottom: var(--s5); position: sticky; top: 64px; z-index: 5; padding: var(--s3) 0; background: linear-gradient(var(--paper) 80%, rgba(246, 241, 230, 0)); }
.jump a { text-decoration: none; }
@media (max-width: 760px) {
  .jump { top: 104px; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-inline: calc(-1 * var(--s4)); padding-inline: var(--s4);
    -webkit-mask-image: linear-gradient(90deg, #000 85%, transparent); mask-image: linear-gradient(90deg, #000 85%, transparent); }
  .jump::-webkit-scrollbar { display: none; }
  .jump::after { content: ""; flex: none; width: var(--s5); }
}

.level { margin-bottom: var(--s7); }
.level__head { display: flex; align-items: baseline; gap: var(--s3); margin-bottom: var(--s4); border-bottom: 2px solid var(--lvl); padding-bottom: var(--s2); }
.level__head h2 { font-size: var(--fs-2xl); }
.level__head .level__sub { color: var(--ink-3); font-size: var(--fs-sm); margin-left: auto; text-align: right; }
.level__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: var(--s4); }
@media (max-width: 520px) { .level__grid { grid-template-columns: 1fr; } .level__head .level__sub { display: none; } }

.rep {
  --lvl: var(--ink-2);
  position: relative; display: grid; grid-template-columns: 84px minmax(0, 1fr); gap: var(--s4);
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: var(--s4);
  box-shadow: var(--shadow-1); transition: box-shadow .15s, border-color .15s, transform .15s;
}
.rep:hover { box-shadow: var(--shadow-2); border-color: var(--line-2); }
.rep:focus-within { border-color: var(--line-2); }
.rep > div:last-child { display: flex; flex-direction: column; min-width: 0; }
.rep .rep__actions { margin-top: auto; padding-top: var(--s3); }
.level__grid > .prompt { grid-column: 1 / -1; }
.rep__photo { width: 84px; height: 104px; border-radius: 10px; overflow: hidden; background: var(--paper-2); position: relative; }
.rep__photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 20%; }
.rep__role { font-size: var(--fs-xs); font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--lvl); }
.rep__name { font-size: 1.35rem; margin: 2px 0 2px; }
.rep__name a { text-decoration: none; }
.rep__name a::after { content: ""; position: absolute; inset: 0; border-radius: var(--radius); }
.rep__name a:focus-visible { box-shadow: none; }
.rep__name a:focus-visible::after { box-shadow: var(--focus); }
.rep__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; color: var(--ink-2); font-size: var(--fs-sm); }
.rep__meta .party { display: inline-flex; align-items: center; gap: 6px; }
.rep__does { margin-top: var(--s2); color: var(--ink-2); font-size: var(--fs-sm); line-height: 1.5; }
.rep__actions { margin-top: var(--s3); display: flex; gap: var(--s2); flex-wrap: wrap; position: relative; z-index: 2; }
.rep__also { margin-top: var(--s2); font-size: var(--fs-xs); font-weight: 600; color: var(--lvl-regional); display: flex; gap: 6px; align-items: center; }
.jump .chip { white-space: nowrap; flex: none; min-height: 34px; padding: 4px 12px; }
.place-note { margin-top: var(--s2); font-size: var(--fs-sm); color: var(--ink-2); display: flex; gap: 6px; align-items: center; }
.place-note svg { color: var(--accent); }
.rep--feature { grid-column: 1 / -1; grid-template-columns: 120px minmax(0, 1fr); padding: var(--s5); }
.rep--feature .rep__photo { width: 120px; height: 150px; }
.rep--feature .rep__name { font-size: 1.75rem; }
@media (max-width: 520px) { .rep--feature { grid-template-columns: 84px minmax(0, 1fr); padding: var(--s4); } .rep--feature .rep__photo { width: 84px; height: 104px; } .rep--feature .rep__name { font-size: 1.4rem; } }

/* fallback portrait */
.avatar { width: 100%; height: 100%; display: grid; place-items: center; background: linear-gradient(160deg, color-mix(in srgb, var(--lvl) 16%, #fffdf8), color-mix(in srgb, var(--lvl) 30%, #efe8d8)); color: var(--lvl); }
.avatar span { font-family: var(--font-display); font-size: 1.9rem; font-weight: 600; letter-spacing: .02em; }
.avatar--lg span { font-size: 3.6rem; }

/* gentle prompt for a missing layer */
.prompt {
  display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: var(--s3); align-items: start;
  background: transparent; border: 1.5px dashed var(--line-2); border-radius: var(--radius); padding: var(--s4);
  color: var(--ink-2);
}
.prompt__icon { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--paper-2); color: var(--lvl, var(--ink-2)); }
.prompt__icon svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.prompt h3 { font-family: var(--font-body); font-size: var(--fs-md); font-weight: 650; color: var(--ink); }
.prompt p { font-size: var(--fs-sm); margin-top: 2px; }
.prompt__action { margin-top: var(--s3); display: flex; gap: var(--s2); flex-wrap: wrap; }
.refine { display: flex; gap: var(--s2); margin-top: var(--s3); flex-wrap: wrap; }
.refine input { flex: 1 1 220px; min-width: 0; height: 44px; border-radius: var(--radius-pill); border: 1px solid var(--line-2); padding: 0 16px; background: var(--card); }

/* council browse */
.council { margin-top: var(--s4); background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.council summary { cursor: pointer; padding: var(--s4); display: flex; align-items: center; gap: var(--s3); font-weight: 600; list-style: none; }
.council summary::-webkit-details-marker { display: none; }
.council summary::after { content: ""; margin-left: auto; width: 10px; height: 10px; border-right: 2px solid var(--ink-3); border-bottom: 2px solid var(--ink-3); transform: rotate(45deg); transition: transform .15s; }
.council[open] summary::after { transform: rotate(-135deg); }
.council summary small { font-weight: 400; color: var(--ink-3); }
.council ul { list-style: none; margin: 0; padding: 0 var(--s4) var(--s4); display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 2px var(--s4); }
.council li { display: grid; gap: 0; padding: 10px 0; border-top: 1px solid var(--paper-2); font-size: var(--fs-sm); line-height: 1.4; }
.council li span:first-child { font-weight: 600; }
.council li span:last-child { color: var(--ink-3); font-size: var(--fs-xs); }
.council summary svg { width: 22px; height: 22px; color: var(--lvl-municipal); }

/* sidebar */
.aside-stack { display: grid; gap: var(--s5); position: sticky; top: 88px; }
@media (max-width: 1080px) { .aside-stack { position: static; } }
.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: var(--s5); }
.panel h2 { font-size: var(--fs-xl); }
.panel__sub { color: var(--ink-3); font-size: var(--fs-sm); margin-top: 4px; }
.panel--dark { background: var(--night); color: var(--on-night); border-color: var(--night); }
.panel--dark .panel__sub { color: var(--on-night-2); }
.panel--dark .eyebrow { color: var(--accent-bright); }
.checklist { list-style: none; padding: 0; margin: var(--s4) 0 0; display: grid; gap: var(--s3); font-size: var(--fs-sm); }
.checklist li { display: grid; grid-template-columns: 22px 1fr; gap: var(--s2); }
.checklist svg { width: 18px; height: 18px; margin-top: 2px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.checklist .ok { color: var(--green); }
.checklist .todo { color: var(--ink-3); }

/* ---------- stories (Community Vibe) ---------- */
.stories { display: grid; gap: var(--s4); margin-top: var(--s4); }
.story { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: var(--s4) var(--s5); display: grid; gap: var(--s2); }
.story__top { display: flex; flex-wrap: wrap; gap: var(--s2); align-items: center; font-size: var(--fs-xs); color: var(--ink-3); }
.story__place { font-weight: 700; color: var(--accent); text-transform: uppercase; letter-spacing: .07em; }
.story h3 { font-size: 1.2rem; line-height: 1.25; }
.story h3 a { text-decoration: none; }
.story h3 a:hover { text-decoration: underline; }
.story__dek { color: var(--ink-2); font-size: var(--fs-sm); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.story__src { font-size: var(--fs-xs); color: var(--ink-3); }
.story__src a { color: var(--ink-2); }
.story__actions { display: flex; gap: var(--s2); flex-wrap: wrap; margin-top: var(--s1); }
.story--community { background: var(--paper); border-style: dashed; }
.story--community h3 { font-family: var(--font-body); font-weight: 650; font-size: 1.05rem; }
.story--lead { padding: var(--s5) var(--s6); border-left: 4px solid var(--accent); }
.story--lead h3 { font-size: var(--fs-2xl); }
.story--lead .story__dek { font-size: var(--fs-md); -webkit-line-clamp: 4; }
.stories--grid { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.stories--grid .story--lead { grid-column: 1 / -1; }
.panel .stories { gap: 0; }
.panel .story { background: transparent; border: 0; border-top: 1px solid var(--line); border-radius: 0; padding: var(--s4) 0; }
.panel .story h3 { font-size: 1.05rem; }

/* ---------- person page ---------- */
.crumbs { padding: var(--s4) 0 0; font-size: var(--fs-sm); color: var(--ink-3); }
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; padding: 0; margin: 0; }
.crumbs li:not(:last-child)::after { content: "›"; margin-left: 6px; color: var(--line-2); }
.crumbs a { color: var(--ink-2); }

.person-hero { padding: var(--s5) 0 0; }
.person-hero__grid { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: var(--s6); align-items: end; }
.person-hero__photo { width: 180px; height: 225px; border-radius: 16px; overflow: hidden; background: var(--paper-2); box-shadow: var(--shadow-2); }
.person-hero__photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 20%; }
.person-hero h1 { font-size: var(--fs-hero); font-weight: 500; letter-spacing: -0.02em; margin: var(--s2) 0; }
.person-hero__role { font-size: var(--fs-xl); font-family: var(--font-display); color: var(--ink-2); }
.person-hero__facts { display: flex; flex-wrap: wrap; gap: var(--s2); margin-top: var(--s4); }
.person-hero__cta { display: flex; flex-wrap: wrap; gap: var(--s2); margin-top: var(--s5); }
@media (max-width: 640px) {
  .person-hero__grid { grid-template-columns: 96px minmax(0, 1fr); gap: var(--s4); align-items: start; }
  .person-hero__photo { width: 96px; height: 120px; border-radius: 12px; }
  .person-hero h1 { font-size: 2rem; margin: 4px 0; }
  .person-hero__role { font-size: var(--fs-md); }
  .person-hero__facts, .person-hero__cta { grid-column: 1 / -1; }
  .avatar--lg span { font-size: 2.2rem; }
}

.tabs { margin-top: var(--s6); border-bottom: 1px solid var(--line-2); display: flex; gap: var(--s1); overflow-x: auto; scrollbar-width: none; position: sticky; top: 64px; background: var(--paper); z-index: 6; }
@media (max-width: 760px) { .tabs { top: 104px; margin-inline: calc(-1 * var(--s4)); padding-inline: var(--s4); } }
.tabs [role="tab"] {
  appearance: none; border: 0; background: none; padding: 14px 16px 12px; font-weight: 600; font-size: var(--fs-sm); color: var(--ink-3);
  border-bottom: 3px solid transparent; margin-bottom: -1px; cursor: pointer; white-space: nowrap;
}
.tabs [role="tab"]:hover { color: var(--ink); }
.tabs [role="tab"][aria-selected="true"] { color: var(--ink); border-bottom-color: var(--accent); }
.tabs [role="tab"] .count { font-weight: 500; color: var(--ink-3); margin-left: 4px; }
.tabpanel { padding-top: var(--s6); }
.tabpanel[hidden] { display: none; }

.article { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: var(--s7); align-items: start; }
@media (max-width: 1000px) { .article { grid-template-columns: 1fr; gap: var(--s5); } .article .infobox { order: -1; } }
.prose { max-width: var(--measure); font-size: 1.0625rem; line-height: 1.7; }
.prose > * + * { margin-top: 1em; }
.prose .lede { font-family: var(--font-display); font-size: 1.35rem; line-height: 1.5; color: var(--ink); }
.prose h2 { font-size: var(--fs-2xl); margin-top: 1.8em; padding-bottom: 6px; border-bottom: 1px solid var(--line); }
.prose h3 { font-size: var(--fs-xl); margin-top: 1.5em; }
.prose ul { padding-left: 1.2em; }
.prose li + li { margin-top: .35em; }
.prose sup a, .cite { font-size: .72em; font-weight: 700; color: var(--accent); text-decoration: none; vertical-align: super; line-height: 0; padding: 0 1px; }
.prose blockquote { margin: 1.4em 0; padding: 0 0 0 var(--s5); border-left: 3px solid var(--accent); font-family: var(--font-display); font-size: 1.2rem; color: var(--ink-2); }
.toc { background: var(--paper-2); border-radius: var(--radius-sm); padding: var(--s4) var(--s5); font-size: var(--fs-sm); max-width: var(--measure); }
.toc h2 { font-family: var(--font-body); font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); border: 0; margin: 0 0 var(--s2); padding: 0; }
.toc ol { margin: 0; padding-left: 1.3em; columns: 2; column-gap: var(--s6); }
@media (max-width: 520px) { .toc ol { columns: 1; } }

.infobox { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; font-size: var(--fs-sm); position: sticky; top: 130px; }
@media (max-width: 1000px) { .infobox { position: static; } }
.infobox__head { background: var(--night); color: var(--on-night); padding: var(--s3) var(--s4); font-family: var(--font-display); font-size: var(--fs-lg); }
.infobox figure { margin: 0; border-bottom: 1px solid var(--line); }
.infobox figcaption { padding: var(--s2) var(--s4); font-size: var(--fs-xs); color: var(--ink-3); }
.infobox dl { margin: 0; padding: var(--s2) var(--s4) var(--s4); display: grid; grid-template-columns: 112px 1fr; gap: 0 var(--s3); }
.infobox dt { font-weight: 650; color: var(--ink-2); padding: 8px 0; border-top: 1px solid var(--paper-2); }
.infobox dd { margin: 0; padding: 8px 0; border-top: 1px solid var(--paper-2); overflow-wrap: anywhere; }
.infobox dt:first-of-type, .infobox dd:first-of-type { border-top: 0; }
.infobox__list { grid-column: 1 / -1; }
.infobox__list ul { margin: 0; padding-left: 1.1em; }
.infobox__list li + li { margin-top: 4px; }
.article .stories--grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.prose sup a { font-size: .75em; padding: 0 2px; }
.notice svg { width: 20px; height: 20px; margin-top: 1px; color: var(--accent); }
.infobox__section { grid-column: 1 / -1; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; font-size: var(--fs-xs); color: var(--accent); padding: var(--s4) 0 4px; }

.timeline { list-style: none; padding: 0; margin: 0; border-left: 2px solid var(--line); }
.timeline li { position: relative; padding: 0 0 var(--s4) var(--s5); }
.timeline li::before { content: ""; position: absolute; left: -7px; top: 6px; width: 12px; height: 12px; border-radius: 50%; background: var(--card); border: 2px solid var(--accent); }
.timeline .when { font-size: var(--fs-xs); font-weight: 700; color: var(--ink-3); letter-spacing: .04em; }
.timeline .what { font-weight: 600; }

.words { display: grid; gap: var(--s4); max-width: 820px; }
.word { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: var(--s5); display: grid; gap: var(--s2); }
.word__kind { display: flex; gap: var(--s2); align-items: center; font-size: var(--fs-xs); color: var(--ink-3); font-weight: 600; }
.word h3 { font-size: 1.2rem; }
.word p { color: var(--ink-2); }
.word blockquote { margin: 0; font-family: var(--font-display); font-size: 1.15rem; color: var(--ink); border-left: 3px solid var(--accent); padding-left: var(--s4); }

.empty {
  max-width: 640px; padding: var(--s6); border: 1.5px dashed var(--line-2); border-radius: var(--radius); background: transparent;
}
.empty h3 { font-size: var(--fs-xl); }
.empty p { color: var(--ink-2); margin-top: var(--s2); }
.empty .btn { margin-top: var(--s4); }

/* office explainer */
.office { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: var(--s7); align-items: start; }
@media (max-width: 1000px) { .office { grid-template-columns: 1fr; gap: var(--s5); } }
.office__headline { font-size: var(--fs-2xl); max-width: 34ch; }
.chips-list { list-style: none; padding: 0; margin: var(--s3) 0 0; display: flex; flex-wrap: wrap; gap: 6px; }
.office__cols { align-items: start; }
.office__purpose { font-size: var(--fs-lg); color: var(--ink-2); max-width: var(--measure); margin-top: var(--s4); }
.office__cols { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s4); margin-top: var(--s6); }
@media (max-width: 640px) { .office__cols { grid-template-columns: 1fr; } }
.office-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: var(--s5); }
.office-card h3 { font-family: var(--font-body); font-size: var(--fs-md); font-weight: 700; display: flex; gap: var(--s2); align-items: center; }
.office-card ul { margin: var(--s3) 0 0; padding-left: 1.1em; color: var(--ink-2); font-size: var(--fs-sm); }
.office-card li + li { margin-top: 6px; }
.office-card--can { border-top: 4px solid var(--green); }
.office-card--cannot { border-top: 4px solid var(--red); }
.office-card--when { border-top: 4px solid var(--accent); }
.office-card--push { border-top: 4px solid var(--lvl-provincial); }
.icon-slot { width: 32px; height: 32px; border-radius: 9px; display: inline-grid; place-items: center; background: var(--paper-2); color: var(--ink-2); flex: none; }
.icon-slot svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.steps { counter-reset: step; list-style: none; padding: 0; margin: var(--s4) 0 0; display: grid; gap: var(--s3); max-width: var(--measure); }
.steps li { counter-increment: step; display: grid; grid-template-columns: 36px 1fr; gap: var(--s3); align-items: start; }
.steps li::before { content: counter(step); width: 30px; height: 30px; border-radius: 50%; background: var(--night); color: var(--on-night); display: grid; place-items: center; font-weight: 700; font-size: var(--fs-xs); }
.office__note { margin-top: var(--s4); padding: var(--s4); background: var(--accent-wash); border-radius: var(--radius-sm); font-size: var(--fs-sm); max-width: var(--measure); }

/* contact */
.contact-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: var(--s4); max-width: 960px; }
.contact-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: var(--s5); display: grid; gap: var(--s3); align-content: start; }
.contact-card h3 { font-size: var(--fs-lg); }
.contact-line { display: grid; grid-template-columns: 22px 1fr; gap: var(--s2); font-size: var(--fs-sm); align-items: start; }
.contact-line svg { width: 18px; height: 18px; margin-top: 2px; fill: none; stroke: var(--ink-3); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.socials { display: flex; flex-wrap: wrap; gap: var(--s2); }

/* sources */
.sources { counter-reset: src; list-style: none; padding: 0; margin: 0; max-width: var(--measure); display: grid; gap: var(--s3); font-size: var(--fs-sm); }
.sources li { counter-increment: src; display: grid; grid-template-columns: 34px 1fr; gap: var(--s2); }
.sources li::before { content: "[" counter(src) "]"; color: var(--accent); font-weight: 700; }
.sources a { overflow-wrap: anywhere; }
.sources .src-meta { color: var(--ink-3); display: block; }
.sources li:target { background: var(--accent-wash); border-radius: 6px; }

/* ---------- states ---------- */
.state { padding: var(--s8) 0; max-width: 720px; }
.state h1 { font-size: var(--fs-3xl); margin-top: var(--s3); }
.state p { color: var(--ink-2); font-size: var(--fs-lg); margin-top: var(--s3); }
.state__actions { display: flex; flex-wrap: wrap; gap: var(--s2); margin-top: var(--s5); }
.state .search-xl__field { box-shadow: var(--shadow-2); border-color: var(--line); }
.state .search-xl__field:focus-within { border-color: var(--tc-turquoise, var(--green)); box-shadow: 0 0 0 4px color-mix(in srgb, var(--tc-turquoise, #38ACBB) 32%, transparent), var(--shadow-2); }
.tips { margin-top: var(--s6); display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s3); }
.tips { margin-top: var(--s2) !important; }
.tips > * { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: var(--s4); font-size: var(--fs-sm); color: var(--ink-2); text-decoration: none; transition: border-color .15s; }
.tips a:hover { border-color: var(--ink-3); }
.tips strong { display: block; color: var(--ink); font-size: var(--fs-md); margin-bottom: 2px; }
@media (max-width: 640px) { .tips { grid-template-columns: 1fr; } }

.chooser { list-style: none; padding: 0; margin: var(--s5) 0 0; display: grid; gap: var(--s2); }
.chooser button {
  width: 100%; text-align: left; display: grid; grid-template-columns: 40px 1fr auto; gap: var(--s3); align-items: center;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: var(--s4); cursor: pointer;
  transition: border-color .15s, box-shadow .15s;
}
.chooser button:hover { border-color: var(--ink-3); box-shadow: var(--shadow-1); }
.chooser .pin { width: 40px; height: 40px; border-radius: 50%; background: var(--accent-wash); color: var(--accent); display: grid; place-items: center; }
.chooser .pin svg, .chooser .chev { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.chooser .label { font-weight: 650; font-size: var(--fs-lg); display: block; }
.chooser .detail { color: var(--ink-3); font-size: var(--fs-sm); }
.chooser .chev { color: var(--ink-3); }

.skeleton { position: relative; overflow: hidden; background: var(--paper-2); border-radius: 8px; }
.skeleton::after {
  content: ""; position: absolute; inset: 0; transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .55), transparent);
  animation: shimmer 1.3s infinite;
}
@keyframes shimmer { to { transform: translateX(100%); } }
.sk-line { height: 12px; margin-top: 10px; }
.sk-card { display: grid; grid-template-columns: 84px 1fr; gap: var(--s4); background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: var(--s4); }
.loading-note { display: flex; gap: var(--s3); align-items: center; color: var(--ink-2); font-size: var(--fs-sm); margin-top: var(--s3); }
.spinner { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--line-2); border-top-color: var(--accent); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition: none !important; scroll-behavior: auto !important; }
}

.notice { display: flex; gap: var(--s3); align-items: flex-start; background: var(--card); border: 1px solid var(--line); border-left: 4px solid var(--accent); padding: var(--s3) var(--s4); border-radius: var(--radius-sm); font-size: var(--fs-sm); color: var(--ink-2); }

/* dialog */
.dialog { border: 0; border-radius: 18px; padding: 0; width: min(560px, calc(100% - 32px)); background: var(--card); color: var(--ink); box-shadow: 0 30px 80px rgba(0, 0, 0, .35); }
.dialog::backdrop { background: rgba(21, 20, 15, .55); }
.dialog__body { padding: var(--s6); display: grid; gap: var(--s3); }
.dialog__body h2 { font-size: var(--fs-2xl); }
.dialog__body textarea { width: 100%; min-height: 120px; border: 1px solid var(--line-2); border-radius: var(--radius-sm); padding: var(--s3); font: inherit; background: var(--paper); }
.dialog__actions { display: flex; justify-content: flex-end; gap: var(--s2); margin-top: var(--s2); }

/* section titles used across views */
.section-title { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s3); flex-wrap: wrap; }
.section-title h2 { font-size: var(--fs-2xl); }
.vibe-head { padding: var(--s6) 0 var(--s4); }
.vibe-head h1 { font-size: var(--fs-3xl); margin-top: var(--s2); }
.vibe-head p { color: var(--ink-2); font-size: var(--fs-lg); margin-top: var(--s2); max-width: 62ch; }
.filters { display: flex; gap: var(--s2); flex-wrap: wrap; margin: var(--s4) 0; }
.filters button[aria-pressed="true"] { background: var(--night); color: var(--on-night); border-color: var(--night); }

.about { max-width: var(--measure); padding: var(--s7) 0; }
.about h1 { font-size: var(--fs-3xl); }

/* Source labels: text and icon always travel together, so colour never carries the meaning alone. */
.source-badge { display: inline-flex; align-items: center; gap: 5px; width: fit-content; min-height: 26px; padding: 3px 8px; border: 1px solid currentColor; border-radius: 999px; background: var(--paper); color: var(--ink-2); font-size: var(--fs-xs); font-weight: 700; line-height: 1.15; }
.source-badge svg { width: 14px; height: 14px; flex: none; fill: currentColor; stroke: currentColor; stroke-width: 1; }
.source-badge svg text { fill: var(--paper); stroke: none; font: 700 10px system-ui; }
.source-badge--official { color: #075f59; }.source-badge--trace_story { color: #6b3b0a; }.source-badge--legislature { color: #375f91; }.source-badge--vote_bill { color: #5b4b90; }.source-badge--news { color: #744436; }.source-badge--resident_discussion { color: #6b3e78; }
.source-badge--compact { min-height: 22px; padding: 2px 7px; font-size: 11px; }
.vibe-item .source-badge { margin-top: var(--s2); }.vibe-detail > .source-badge { margin: 0 0 var(--s4); }.word__kind .source-badge, .story__src .source-badge { margin-right: var(--s2); vertical-align: middle; }
.source-legend { margin-top: var(--s8); padding: var(--s5); border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); }.source-legend h2 { margin: 0 0 var(--s4); font-family: var(--font-display); font-size: var(--fs-xl); }.source-legend ul { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--s3); }.source-legend li { display: grid; grid-template-columns: minmax(150px, auto) 1fr; align-items: center; gap: var(--s3); color: var(--ink-2); font-size: var(--fs-sm); }
@media (max-width: 480px) { .source-legend li { grid-template-columns: 1fr; gap: 4px; } }

/* Plain-language note shown when "Use my location" cannot run (blocked, timed out, not secure). */
.geo-note { margin: var(--s3) 0 0; padding: var(--s3) var(--s4); border-left: 3px solid var(--accent); background: rgba(255,255,255,.08); color: var(--on-night); font-size: var(--fs-sm); max-width: 46rem; }
.state .geo-note, .panel .geo-note { color: inherit; background: rgba(0,0,0,.05); }
