/* ============================================================
   Parcenomics — Commonwealth section
   Nav, footer, palette and type follow the site stylesheet (v4 Daylight):
   warm paper, forest ink, working green, ochre;
   Fraunces display / DM Sans body / IBM Plex Mono labels and figures.
   Large type throughout: these pages are meant to be read on a screen in a room.
   ============================================================ */

:root {
  --bg:         #FDFBF6;
  --surface:    #FFFFFF;
  --surface2:   #F3EFE4;
  --border:     #E6E0D0;
  --border2:    #C6BDA8;
  --text:       #16241D;
  --text-soft:  #33443B;
  --muted:      #51625A;
  --accent:     #0F7A46;
  --accent-dim: #0A5C33;
  --amber:      #9C5604;
  --slate:      #46697A;
  --mono:       'IBM Plex Mono', ui-monospace, monospace;
  --display:    'Fraunces', Georgia, serif;
  --body:       'DM Sans', -apple-system, 'Segoe UI', system-ui, sans-serif;
  --max:        1120px;
  --gut:        48px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--body);
  font-weight: 300;
  font-size: 18px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 0.18em; }
b, strong { font-weight: 500; color: var(--text); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--muted); }
.nowrap { white-space: nowrap; }

/* ── Draft strip ── */
.draft-strip {
  background: var(--surface2);
  border-bottom: 1px solid var(--border);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-align: center;
  padding: 4px 16px;
}

/* ── Site nav (from the site stylesheet; sticky rather than fixed here) ── */
.site-nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(253,251,246,0.94);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  padding: 0 var(--gut);
  display: flex; align-items: center; justify-content: space-between;
  height: 64px;
}
.nav-wordmark {
  font-family: var(--mono); font-weight: 600; font-size: 17px;
  color: var(--text); letter-spacing: -0.02em; display: inline-block; line-height: 1.1;
}
.nav-wordmark:hover { text-decoration: none; }
.nav-wordmark > span:not(.nav-tagline) { color: var(--accent); display: inline; }
.nav-tagline {
  display: block; font-family: var(--mono); font-size: 0.58rem; font-weight: 400;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin-top: 3px;
}
.nav-links { display: flex; gap: 36px; list-style: none; align-items: center; }
.nav-links a { font-size: 16px; font-weight: 400; color: var(--muted); letter-spacing: 0.02em; }
.nav-links a:hover { color: var(--text); text-decoration: none; }
.nav-divider { width: 1px; height: 18px; background: var(--border2); }
.nav-cta {
  font-family: var(--mono); font-size: 13px; font-weight: 600;
  color: var(--bg) !important; background: var(--accent);
  padding: 8px 18px; letter-spacing: 0.04em; white-space: nowrap;
}
.nav-cta:hover { background: var(--accent-dim); }
.has-dropdown { position: relative; }
.has-dropdown > a { display: inline-flex; align-items: center; gap: 6px; }
.dd-caret { display: inline-block; font-size: 12px; line-height: 1; color: var(--accent-dim); transform: rotate(90deg); position: relative; top: -1px; }
.nav-dropdown {
  position: absolute; top: calc(100% + 14px); left: 50%; transform: translateX(-50%);
  min-width: 220px; background: var(--surface); border: 1px solid var(--border); border-radius: 6px;
  padding: 8px 0; list-style: none; box-shadow: 0 10px 28px rgba(22,36,29,0.10);
  opacity: 0; visibility: hidden; pointer-events: none; z-index: 200;
  transition: opacity 0.15s ease, visibility 0s linear 0.15s;
}
.nav-dropdown::before { content: ""; position: absolute; top: -14px; left: 0; right: 0; height: 14px; }
.has-dropdown:hover .nav-dropdown, .has-dropdown:focus-within .nav-dropdown {
  opacity: 1; visibility: visible; pointer-events: auto; transition: opacity 0.15s ease;
}
.nav-dropdown li a { display: block; padding: 10px 20px; font-size: 15px; color: var(--muted); white-space: nowrap; }
.nav-dropdown li a:hover { color: var(--text); background: var(--surface2); }
.nav-hamburger {
  display: none; flex-direction: column; justify-content: center; gap: 5px;
  width: 36px; height: 36px; background: none; border: none; cursor: pointer; padding: 4px;
}
.nav-hamburger span { display: block; width: 22px; height: 2px; background: var(--muted); transition: all 0.25s ease; }
.nav-hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); background: var(--accent); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; }
.nav-hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); background: var(--accent); }

/* ── Commonwealth bar ── */
.cw-bar { border-bottom: 1px solid var(--border); background: var(--surface); }
.cw-bar-inner {
  max-width: var(--max); margin: 0 auto; padding: 10px var(--gut);
  display: flex; align-items: center; gap: 28px; flex-wrap: wrap;
}
.cw-home, .cw-link {
  font-family: var(--mono); font-size: 15px; font-weight: 600; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--muted);
}
.cw-home { color: var(--text); }
.cw-home.on, .cw-link.on { color: var(--accent); }
.cw-bar .jump { margin-left: auto; width: 320px; max-width: 100%; }

/* ── Layout ── */
.wrap { max-width: var(--max); margin: 0 auto; padding-left: var(--gut); padding-right: var(--gut); }
main { padding-bottom: 72px; }
.eyebrow, .card-eyebrow {
  font-family: var(--mono); font-size: 14px; font-weight: 600; color: var(--accent);
  letter-spacing: 0.14em; text-transform: uppercase; margin-bottom: 12px;
}
.lede { font-size: 21px; line-height: 1.55; color: var(--text-soft); max-width: 62ch; }
.vintage { font-family: var(--mono); font-size: 15px; color: var(--muted); margin-top: 14px; }
.small { font-size: 16px; line-height: 1.55; color: var(--muted); margin-top: 14px; }
.section-title {
  font-family: var(--display); font-weight: 300; font-size: clamp(28px, 3.2vw, 38px);
  line-height: 1.15; letter-spacing: -0.01em; margin: 64px 0 24px;
}

/* ── Hero (index, method) ── */
.hero { padding-top: 56px; }
.hero h1 {
  font-family: var(--display); font-weight: 300; font-size: clamp(38px, 5vw, 60px);
  line-height: 1.06; letter-spacing: -0.02em; margin-bottom: 20px; max-width: 22ch;
}
.hero .lede { margin-bottom: 4px; }
.hero-sub { font-family: var(--display); font-weight: 300; font-size: clamp(24px, 2.8vw, 34px); line-height: 1.2; color: var(--text-soft); margin: -8px 0 22px; max-width: 44ch; }

/* ── Jump / search box ── */
.jump { position: relative; }
.jump label { display: block; font-size: 16px; color: var(--muted); margin-bottom: 6px; font-weight: 400; }
.jump-input {
  width: 100%; font: inherit; font-size: 17px; font-weight: 400; color: var(--text);
  background: var(--surface); border: 1px solid var(--border2); border-radius: 6px;
  padding: 9px 14px;
}
.jump-input:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
.jump-big { margin-top: 32px; max-width: 640px; }
.jump-big .jump-input { font-size: 20px; padding: 14px 18px; }
.jump-results {
  position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 150;
  list-style: none; background: var(--surface); border: 1px solid var(--border2); border-radius: 6px;
  box-shadow: 0 10px 28px rgba(22,36,29,0.12); max-height: 420px; overflow-y: auto;
}
.jump-results li a, .jump-results li button, .jump-results li .jr-note {
  display: block; width: 100%; text-align: left; background: none; border: 0; font: inherit;
  padding: 10px 14px; color: var(--text); font-size: 17px; cursor: pointer; border-bottom: 1px solid var(--border);
}
.jump-results li:last-child a, .jump-results li:last-child button { border-bottom: 0; }
.jump-results li a:hover, .jump-results li button:hover,
.jump-results li.sel a, .jump-results li.sel button { background: var(--surface2); text-decoration: none; }
.jr-sub { display: block; font-size: 15px; color: var(--muted); }
.jr-note { color: var(--muted) !important; cursor: default !important; font-size: 16px !important; line-height: 1.5; }
.jump-results li .jr-note a, .jump-results li .jr-note button { display: inline; width: auto; padding: 0; border: 0; font-size: 16px; color: var(--accent); background: none; text-decoration: underline; }

/* ── Town header ── */
.town-head { padding-top: 48px; padding-bottom: 8px; }
.town-head h1 {
  font-family: var(--display); font-weight: 300; font-size: clamp(42px, 6vw, 68px);
  line-height: 1.02; letter-spacing: -0.02em; margin-bottom: 10px;
}
.town-meta { font-size: 21px; color: var(--text-soft); }
.facts {
  display: grid; grid-template-columns: 1fr 1fr; gap: 0 48px; margin-top: 28px;
  border-top: 1px solid var(--border);
}
.fact { padding: 20px 0; border-bottom: 1px solid var(--border); }
.fact h3 {
  font-family: var(--mono); font-size: 14px; font-weight: 600; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--muted); margin-bottom: 8px;
}
.fact ul { list-style: none; }
.fact li { padding: 3px 0; font-size: 18px; line-height: 1.45; }
.fact ul.many { columns: 2; column-gap: 32px; }
.fact ul.many li { break-inside: avoid; font-size: 17px; }
.fact .dist { font-weight: 500; color: var(--text); }
.fact .share { font-family: var(--mono); font-size: 15px; color: var(--muted); white-space: nowrap; }
.fact p { font-size: 18px; }
.fact .small { font-size: 16px; }

/* ── Cards ── */
.cards { display: flex; flex-direction: column; gap: 28px; margin-top: 36px; }
.card {
  background: var(--surface); border: 1px solid var(--border);
  box-shadow: 0 2px 10px rgba(22,36,29,0.04);
  padding: 32px 36px 34px;
}
.card-title {
  font-family: var(--display); font-weight: 300; font-size: clamp(24px, 2.4vw, 30px);
  line-height: 1.22; letter-spacing: -0.01em; margin-bottom: 24px; max-width: 46ch;
}
.card > p:not(.card-eyebrow):not(.small), .card .chart + p:not(.small) { font-size: 18px; color: var(--text-soft); max-width: 72ch; margin-top: 18px; }
.card .small { font-size: 16px; color: var(--muted); }
.card.pending .lede { font-family: var(--mono); font-size: 20px; color: var(--amber); margin-bottom: 14px; }
.card.pending p { margin-top: 10px; }

/* Fixed card heights on wide screens, so the same card lines up from town to town. */
@media (min-width: 961px) {
  .card-fairness  { min-height: 520px; }
  .card-money     { min-height: 760px; }
  .card-earmarks  { min-height: 720px; }
  .card-burden    { min-height: 1100px; }
  .card-squeeze   { min-height: 1960px; }
  .card-schools   { min-height: 470px; }
  .card-expected  { min-height: 470px; }
  .card-title     { min-height: 74px; }
  .tile           { min-height: 148px; }
}

/* ── Tiles ── */
.tiles { display: grid; gap: 1px; background: var(--border); border: 1px solid var(--border); }
.tiles-3 { grid-template-columns: repeat(3, 1fr); }
.tiles-4 { grid-template-columns: repeat(4, 1fr); }
.tile { background: var(--surface); padding: 18px 20px 20px; }
.tile-label { font-size: 16px; color: var(--muted); line-height: 1.35; font-weight: 400; display: flex; align-items: baseline; gap: 8px; }
.tile-value {
  font-family: var(--mono); font-weight: 600; font-size: 30px; line-height: 1.1;
  color: var(--text); margin: 10px 0 8px; letter-spacing: -0.02em; word-break: break-word;
}
.tile-value.tv-sm { font-size: 22px; }
.tile-value.tv-na { font-family: var(--body); font-weight: 400; font-size: 19px; color: var(--muted); letter-spacing: 0; }
.tile-sub { font-size: 15px; color: var(--muted); line-height: 1.4; }
.key { display: inline-block; width: 12px; height: 12px; border-radius: 2px; flex: none; position: relative; top: 1px; }

/* ── Charts ── */
.chart { margin-top: 26px; }
.chart-title {
  font-family: var(--body); font-size: 19px; font-weight: 500; color: var(--text);
  margin-bottom: 14px; line-height: 1.4;
}
/* The expected-vs-actual card title directly above its chart states the finding; the caption repeats it for screen readers only. */
.card-expected .chart-title { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.card-money .chart { margin-top: 28px; }
.money-chart { border-top: 1px solid var(--border); padding-top: 8px; }
.mc-row { display: grid; grid-template-columns: 260px 1fr; gap: 20px; align-items: end; padding: 12px 0; border-bottom: 1px solid var(--border); }
.mc-axis { border-bottom: 0; padding-top: 6px; }
.mc-label { font-size: 17px; font-weight: 500; color: var(--text); line-height: 1.35; display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 8px; }
.mc-sub { flex-basis: 100%; font-size: 15px; font-weight: 300; color: var(--muted); margin-top: 2px; }
.mc-plot .bars { width: 100%; height: 84px; display: block; }
.mc-years { display: grid; grid-template-columns: repeat(10, 1fr); text-align: center; font-family: var(--mono); font-size: 14px; color: var(--muted); }
.chart-note { font-size: 15px; color: var(--muted); margin-top: 6px; }

.chart-hb { max-width: 760px; }
.hb-row { display: grid; grid-template-columns: 110px 1fr 120px; gap: 16px; align-items: center; padding: 10px 0; }
.hb-label { font-size: 17px; color: var(--text-soft); font-weight: 400; }
.hb-track { height: 34px; background: var(--surface2); }
.hb-fill { height: 100%; }
.hb-val { font-family: var(--mono); font-weight: 600; font-size: 19px; color: var(--text); }
.chart-hb.wide-label .hb-row { grid-template-columns: 250px 1fr 120px; }

/* ── Fairness ── */
.fi-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.fi-label { font-family: var(--mono); font-size: 14px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.fi-score { font-family: var(--mono); font-weight: 600; font-size: 56px; line-height: 1.05; color: var(--text); margin: 6px 0 14px; }
.fi-score.na { font-size: 22px; color: var(--muted); }
.fi-of { font-size: 22px; color: var(--muted); font-weight: 400; }
.fi-rank { display: block; font-size: 16px; font-weight: 400; color: var(--muted); margin-top: 4px; }
.lens-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.lens-name { font-size: 16px; color: var(--muted); }
.lens-val { font-family: var(--mono); font-weight: 600; font-size: 22px; color: var(--text); }
.lens-val.na { font-size: 15px; font-weight: 400; color: var(--muted); }
.lens-track { position: relative; height: 12px; background: var(--surface2); margin-top: 6px; }
.lens-track .fill { position: absolute; left: 0; top: 0; bottom: 0; }
.lens-track .mid { position: absolute; left: 50%; top: -4px; bottom: -4px; width: 2px; background: var(--text); }
.fi-range { font-size: 16px; color: var(--muted); margin-top: 14px; }
.fi-block .flag { display: inline-block; font-family: var(--mono); font-size: 15px; color: var(--text); border: 1px solid var(--border2); padding: 2px 10px; margin-top: 8px; }
.fi-sentence { font-size: 18px; color: var(--text-soft); margin-top: 10px; }

/* ── Tables ── */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--border); background: var(--surface); margin-top: 22px; }
.table-wrap.tall { max-height: 760px; overflow-y: auto; }
table { width: 100%; border-collapse: collapse; font-size: 17px; }
caption { caption-side: top; text-align: left; padding: 12px 16px 8px; font-size: 16px; color: var(--muted); }
th, td { padding: 10px 14px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--border); }
thead th {
  font-weight: 500; font-size: 15px; color: var(--text); background: var(--surface2);
  position: sticky; top: 0; z-index: 1; line-height: 1.3;
}
tbody th { font-weight: 400; }
td.num, th.num { font-family: var(--mono); font-size: 16px; white-space: nowrap; text-align: right; }
td.na { color: var(--muted); font-family: var(--body); font-size: 15px; }
table.items.ear td:nth-child(3), table.items.earm td:nth-child(3) { min-width: 300px; }
table.items.ear td:nth-child(4) { font-size: 15px; color: var(--muted); }
thead th.num { text-align: right; font-family: var(--body); font-size: 15px; white-space: normal; }
.sortable thead th { cursor: pointer; user-select: none; }
.sortable thead th[aria-sort="ascending"]::after { content: " ↑"; color: var(--accent); }
.sortable thead th[aria-sort="descending"]::after { content: " ↓"; color: var(--accent); }
.all-towns th:first-child { min-width: 150px; }
.all-towns tbody th { position: sticky; left: 0; background: var(--surface); z-index: 1; }
.all-towns thead th:first-child { left: 0; z-index: 3; }
table.peers tbody th { position: sticky; left: 0; background: var(--surface); z-index: 1; }
table.peers thead th:first-child { left: 0; z-index: 3; }
@media (max-width: 640px) { .all-towns th:first-child, table.peers th[scope="row"] { min-width: 128px; } }
.all-towns thead th.num { min-width: 96px; max-width: 150px; }
.table-tools { display: flex; gap: 20px 28px; flex-wrap: wrap; align-items: end; }
.table-tools label { font-size: 16px; color: var(--muted); display: flex; flex-direction: column; gap: 4px; }
.table-tools input, .table-tools select {
  font: inherit; font-size: 17px; color: var(--text); background: var(--surface);
  border: 1px solid var(--border2); border-radius: 6px; padding: 8px 12px; min-width: 220px;
}
#tbl-count { font-size: 16px; padding-bottom: 10px; }

/* Peers */
table.peers th[scope="row"] { min-width: 200px; }
table.peers .role { display: block; font-size: 14px; color: var(--muted); font-family: var(--mono); }
table.peers tr.self, table.peers tr.self th { background: #F6F9F4; }
table.peers tr.peer-extra { display: none; }
table.peers.expanded tr.peer-extra { display: table-row; }
table.peers tr.class-row th, table.peers tr.class-row td { background: var(--bg); }
table.peers tr.added th, table.peers tr.added td { background: #FBF7EC; }
.rm { margin-left: 0; font: inherit; font-size: 14px; color: var(--amber); background: none; border: 0; cursor: pointer; text-decoration: underline; }
.peer-controls { display: flex; gap: 20px 32px; flex-wrap: wrap; align-items: end; margin-top: 18px; }
.peer-controls .add-town { flex: 1 1 300px; max-width: 420px; }
.btn-ghost {
  font-family: var(--mono); font-size: 15px; font-weight: 600; letter-spacing: 0.03em;
  padding: 11px 18px; border: 1px solid var(--border2); background: var(--surface); color: var(--text); cursor: pointer;
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.no-js .peer-controls { display: none; }

/* Sources */
.src-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px 36px; }
.src-group h3 { font-family: var(--mono); font-size: 14px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.src-group ul { list-style: none; }
.src-group li { font-size: 16px; line-height: 1.45; padding: 4px 0; }

/* Parcenomics line */
.pn-line { font-size: 18px; color: var(--muted); padding-top: 8px; }
.wrap.pn-line { margin-top: 48px; }

/* ── Index ── */
.findings { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--border); border: 1px solid var(--border); }
.finding { background: var(--surface); padding: 26px 28px 28px; }
.finding h3 { font-family: var(--display); font-weight: 300; font-size: 25px; line-height: 1.2; margin-bottom: 12px; }
.finding p { font-size: 17px; color: var(--text-soft); line-height: 1.55; }
@media (min-width: 961px) { .finding h3 { min-height: 60px; } }
.finding:last-child:nth-child(odd) { grid-column: 1 / -1; }
@media (max-width: 760px) { .findings { grid-template-columns: 1fr; } }

/* ── Method ── */
.method { display: grid; grid-template-columns: 240px 1fr; gap: 56px; margin-top: 48px; }
.method-toc ul { list-style: none; position: sticky; top: 90px; }
.method-toc li a { display: block; padding: 6px 0; font-size: 17px; color: var(--muted); }
.method-toc li a:hover { color: var(--accent); }
.method-sec { padding: 0 0 36px; margin-bottom: 36px; border-bottom: 1px solid var(--border); scroll-margin-top: 90px; }
.method-sec h2 { font-family: var(--display); font-weight: 300; font-size: 32px; line-height: 1.2; margin-bottom: 16px; }
.method-sec p, .method-sec li { font-size: 18px; color: var(--text-soft); max-width: 68ch; }
.method-sec p + p { margin-top: 14px; }
.method-sec ul { padding-left: 22px; margin: 12px 0; }
.method-sec li { margin-bottom: 8px; }

/* ── Footer (site) ── */
.site-footer { background: var(--surface); border-top: 1px solid var(--border); padding: 48px var(--gut); }
.footer-inner { max-width: var(--max); margin: 0 auto; display: grid; grid-template-columns: 1fr 1fr 1fr 1.35fr; gap: 40px; }
.footer-brand .nav-wordmark { font-size: 18px; margin-bottom: 12px; display: block; }
.footer-brand p { font-size: 16px; color: var(--muted); line-height: 1.6; }
.footer-col h4 { font-family: var(--mono); font-size: 13px; font-weight: 600; color: var(--accent); letter-spacing: 0.14em; text-transform: uppercase; margin-bottom: 16px; }
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 8px; }
.footer-col a { font-size: 16px; color: var(--muted); overflow-wrap: anywhere; }
.footer-col a:hover { color: var(--text); text-decoration: none; }
.footer-bottom { max-width: var(--max); margin: 48px auto 0; padding-top: 24px; border-top: 1px solid var(--border); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.footer-bottom p { font-family: var(--mono); font-size: 13px; color: var(--accent-dim); }

/* ── Responsive ── */
@media (max-width: 960px) {
  :root { --gut: 24px; }
  .nav-hamburger { display: flex; }
  .nav-links {
    display: none; position: absolute; top: 64px; left: 0; right: 0;
    background: rgba(253,251,246,0.99); border-bottom: 1px solid var(--border);
    flex-direction: column; align-items: flex-start; padding: 12px 24px 20px; gap: 0; z-index: 99;
  }
  .nav-links.open { display: flex; }
  .nav-links li { width: 100%; }
  .nav-links li a { display: block; padding: 12px 0; border-bottom: 1px solid var(--border); }
  .nav-links .nav-cta { display: inline-block; margin-top: 12px; padding: 10px 20px; border-bottom: none; }
  .nav-links .nav-divider { display: none; }
  .has-dropdown { position: static; }
  .nav-dropdown { position: static; transform: none; opacity: 1; visibility: visible; pointer-events: auto; display: none; background: transparent; border: none; box-shadow: none; padding: 0 0 8px 16px; min-width: 0; }
  .has-dropdown.expanded .nav-dropdown { display: block; }
  .tiles-4 { grid-template-columns: repeat(2, 1fr); }
  .facts { grid-template-columns: 1fr; }
  .fi-grid { grid-template-columns: 1fr; }
  .src-grid { grid-template-columns: 1fr 1fr; }
  .method { grid-template-columns: 1fr; gap: 0; }
  .method-toc { display: none; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .mc-row { grid-template-columns: 1fr; gap: 8px; }
  .mc-axis .mc-label { display: none; }
}
@media (max-width: 640px) {
  :root { --gut: 16px; }
  body { font-size: 17px; }
  .site-nav { padding: 0 16px; }
  .nav-tagline { display: none; }
  .cw-bar-inner { gap: 10px 20px; padding: 10px 16px; }
  .cw-bar .jump { width: 100%; margin-left: 0; }
  .card { padding: 22px 18px 24px; }
  .tiles-3 { grid-template-columns: 1fr; }
  .tiles-4 { grid-template-columns: 1fr 1fr; }
  .tile { padding: 14px 14px 16px; }
  .tile-value { font-size: 24px; }
  .tile-value.tv-sm { font-size: 19px; }
  .tile-label { font-size: 15px; }
  .fact ul.many { columns: 1; }
  .lens-row { grid-template-columns: 1fr 1fr; }
  .src-grid { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; gap: 28px; }
  .site-footer { padding: 36px 16px; }
  .hb-row { grid-template-columns: 84px 1fr 86px; gap: 10px; }
  .hb-val { font-size: 16px; }
  .chart-hb.wide-label .hb-row { grid-template-columns: 1fr 96px; row-gap: 4px; }
  .chart-hb.wide-label .hb-label { grid-column: 1 / -1; }
  .mc-years span:nth-child(even) { visibility: hidden; }
  .table-tools input, .table-tools select { min-width: 0; width: 100%; }
  .table-tools label { flex: 1 1 100%; }
  .fi-score { font-size: 44px; }
}

.print-only { display: none; }

/* ── Print: each town page prints as a compact profile (§15). Same palette and type families; sizes in points. ── */
@page { size: letter; margin: 0.45in 0.5in 0.5in; }
@media print {
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .gen, .card .gen { display: none !important; }
  .print-only { display: block; }
  .site-nav, .cw-bar, .peer-controls, .site-footer, .pn-line, .jump, .nav-hamburger, .btn-ghost, .rm { display: none !important; }
  html, body { background: #fff; font-size: 8.5pt; line-height: 1.35; }
  main { padding-bottom: 0; }
  a { color: var(--accent-dim); }
  .wrap { max-width: none; padding-left: 0; padding-right: 0; }
  .draft-strip { font-size: 7pt; padding: 1pt 0 2pt; border: 0; background: none; text-align: right; }
  /* header */
  .town-head { padding-top: 0; padding-bottom: 0; }
  .town-head h1 { font-size: 24pt; margin-bottom: 2pt; }
  .town-head .eyebrow { font-size: 7pt; margin-bottom: 2pt; }
  .town-meta { font-size: 10pt; }
  .vintage { font-size: 7.5pt; margin-top: 2pt; }
  .facts { grid-template-columns: 1.6fr 1fr 1.4fr 0.9fr; gap: 0 14pt; margin-top: 6pt; }
  .fact { padding: 4pt 0; }
  .fact h3 { font-size: 6.5pt; margin-bottom: 2pt; }
  .fact li, .fact p, .fact ul.many li { font-size: 7.5pt; line-height: 1.3; padding: 0; }
  .fact .small, .fact .share, main .disclosure-inline { font-size: 6.5pt; }
  .fact ul.many { columns: 3; column-gap: 10pt; }
  .facts:has(ul.many) { grid-template-columns: 3fr 1.2fr 1.2fr 0.8fr; }
  .fact ul.many .share { display: inline; }
  /* cards */
  .cards { gap: 8pt 14pt; margin-top: 6pt; }
  .card { box-shadow: none; border: 0; border-top: 0.75pt solid var(--text); padding: 4pt 0 0; min-height: 0 !important; break-inside: auto; background: none; }
  .card-eyebrow { font-size: 6.5pt; margin-bottom: 2pt; }
  .card-title { font-size: 10.5pt; line-height: 1.25; margin-bottom: 5pt; min-height: 0 !important; max-width: none; }
  .card > p:not(.card-eyebrow):not(.small), .card .chart + p:not(.small) { font-size: 7.8pt; margin-top: 4pt; max-width: none; }
  .small, .card .small { font-size: 6.6pt; line-height: 1.3; margin-top: 2pt; }
  main .card h3.sub { font-size: 6.5pt; margin: 5pt 0 2pt; break-after: avoid; }
  .card-eyebrow, .card-title { break-after: avoid; }
  .cards { display: grid; grid-template-columns: 1fr 1fr; }
  .cards > * { grid-column: 1 / -1; }
  .cards > .card-schools, .cards > .card-expected { grid-column: auto; }
  .card-schools .tiles-4 { grid-template-columns: repeat(2, 1fr); }
  .tiles, figure, .chart, table, tr, .fi-block, .hb-row, .mc-row { break-inside: avoid; }
  .tile { padding: 2pt 5pt 3pt; min-height: 0 !important; }
  .card-burden .tile-value { font-size: 10pt; }
  .tile-label { font-size: 7pt; line-height: 1.25; }
  .tile-value { font-size: 11pt; margin: 1pt 0 0; }
  .tile-value.tv-sm { font-size: 10pt; }
  .tile-value.tv-na { font-size: 8.5pt; }
  .tile-sub { font-size: 6.5pt; line-height: 1.25; }
  .tiles-4 { grid-template-columns: repeat(4, 1fr); }
  .tiles-3 { grid-template-columns: repeat(3, 1fr); }
  /* fairness */
  .fi-grid { grid-template-columns: 1fr 1fr; gap: 14pt; }
  .fi-label { font-size: 6.5pt; }
  .fi-score { font-size: 20pt; margin: 1pt 0 3pt; }
  .fi-of { font-size: 9pt; }
  .fi-rank, .fi-range, .lens-name, .fi-block .flag { font-size: 7pt; margin-top: 1pt; }
  .lens-row { grid-template-columns: repeat(4, 1fr); gap: 6pt; }
  .lens-val { font-size: 9pt; }
  .lens-track { height: 5pt; margin-top: 2pt; }
  .fi-sentence { font-size: 7.5pt; margin-top: 2pt; }
  /* charts */
  .chart, .card-money .chart { margin-top: 5pt; }
  .chart-title { font-size: 8.5pt; margin-bottom: 3pt; }
  .mc-row { grid-template-columns: 150pt 1fr; gap: 8pt; padding: 2pt 0; }
  .mc-label { font-size: 7.5pt; }
  .mc-sub { font-size: 6.5pt; margin-top: 0; }
  .mc-plot .bars { height: 14pt; }
  .mc-years { font-size: 6.5pt; }
  .mc-axis .mc-label { display: block; }
  .chart-note { font-size: 6.5pt; margin-top: 1pt; }
  .chart-hb { max-width: none; }
  .hb-row, .chart-hb.wide-label .hb-row { grid-template-columns: 70pt 1fr 60pt; gap: 6pt; padding: 1.5pt 0; }
  .chart-hb.wide-label .hb-row { grid-template-columns: 120pt 1fr 60pt; }
  .hb-label { font-size: 7.5pt; }
  .hb-track { height: 9pt; }
  .hb-val { font-size: 8pt; }
  /* tables */
  .table-wrap { overflow: visible; margin-top: 4pt; border-width: 0.5pt; }
  .table-wrap.tall { max-height: none; }
  table { font-size: 7.5pt; }
  caption { font-size: 6.8pt; padding: 2pt 5pt; }
  th, td { padding: 1.5pt 5pt; }
  thead th, thead th.num { font-size: 6.8pt; position: static; }
  td.num, th.num { font-size: 7.3pt; }
  td.na { font-size: 6.8pt; }
  table.peers th[scope="row"] { min-width: 0; }
  table.peers .role { font-size: 6pt; display: inline; margin-left: 4pt; }
  table.peers tbody th, table.peers thead th:first-child { position: static; }
  table.items.ear td:nth-child(3) { min-width: 0; }
  table.items.ear td:nth-child(4) { font-size: 6.3pt; min-width: 80pt; line-height: 1.2; }
  table.items.ear td:nth-child(3) { font-size: 7pt; }
  /* sources */
  .card-sources { break-inside: avoid; }
  .src-grid { display: block; }
  .src-group { margin-top: 1pt; font-size: 6.3pt; line-height: 1.3; }
  .src-group h3 { display: inline; font-size: 6pt; margin: 0 4pt 0 0; }
  .src-group ul, .src-group li { display: inline; }
  .src-group li { font-size: 6.3pt; padding: 0; }
  .src-group li + li::before { content: "; "; color: var(--muted); }
  .src-group a { color: var(--text-soft); }
}

/* ── Legislator pages ── */
.disclosure { font-size: 17px; color: var(--text-soft); margin: 10px 0 0; font-style: normal; }
.disclosure-inline { display: block; font-size: 15px; color: var(--muted); margin-top: 2px; }
.town-head .table-wrap { margin-top: 26px; }
ul.town-list { list-style: none; columns: 3; column-gap: 28px; margin-top: 4px; }
ul.town-list li { break-inside: avoid; font-size: 17px; padding: 3px 0; }
ul.town-list .share { display: block; font-family: var(--mono); font-size: 14px; color: var(--muted); }
.cols-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 24px; }
.card h3.sub { font-family: var(--mono); font-size: 14px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); margin: 22px 0 8px; }
ul.bill-list { padding-left: 20px; }
ul.bill-list li { font-size: 17px; margin: 4px 0; }
ul.src-plain { list-style: none; }
ul.src-plain li { font-size: 17px; padding: 4px 0; }
td.na[colspan] { text-align: left; }
@media (min-width: 961px) {
  .card-posts, .card-bills, .card-votes, .card-cmoney { min-height: 440px; }
  .card-district { min-height: 560px; }
  .card-amend { min-height: 600px; }
}
@media (max-width: 960px) { ul.town-list { columns: 2; } .cols-2 { grid-template-columns: 1fr; } }
@media (max-width: 640px) { ul.town-list { columns: 1; } }
p.town-flow { font-size: 17px; line-height: 1.9; }
p.town-flow .share { font-family: var(--mono); font-size: 14px; color: var(--muted); }
.cols-2 > * { min-width: 0; }

/* ── Report pages (§16): the report text, word for word; same tokens and patterns as the method page ── */
.report-byline { font-size: 19px; color: var(--text-soft); }
.report-downloads { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
a.btn-ghost { display: inline-block; }
a.btn-ghost:hover { text-decoration: none; }
ol.report-contents { list-style: none; columns: 2; column-gap: 48px; max-width: 900px; }
ol.report-contents li { break-inside: avoid; border-bottom: 1px solid var(--border); }
ol.report-contents a { display: block; padding: 10px 0; font-size: 19px; }
ol.report-contents a.toc-line { display: flex; align-items: baseline; gap: 8px; }
ol.report-contents .toc-label { flex: 0 1 auto; }
ol.report-contents .toc-leader { flex: 1 1 24px; min-width: 24px; border-bottom: 2px dotted var(--border2); transform: translateY(-5px); }
ol.report-contents .toc-page { flex: none; font-variant-numeric: tabular-nums; }
.method-toc a[aria-current] { color: var(--accent); }
.report-body { min-width: 0; overflow-wrap: anywhere; }
.report-body table { overflow-wrap: normal; }
.report-body > p, .report-body li { font-size: 18px; color: var(--text-soft); max-width: 68ch; }
.report-body > p + p, .report-body > ul + p, .report-body > p + ul { margin-top: 14px; }
.report-body > h2 { font-family: var(--display); font-weight: 300; font-size: 30px; line-height: 1.2; margin: 44px 0 14px; }
.report-body > ul { padding-left: 22px; }
.report-body li { margin-bottom: 8px; }
.report-body .report-summary { margin-bottom: 32px; }
.report-sidebar { margin: 0 0 36px; padding: 22px 26px 18px; max-width: 68ch; border: 1px solid var(--border); }
.report-sidebar h3 { font-size: 20px; font-weight: 600; line-height: 1.3; color: var(--text); margin: 0 0 10px; }
.report-sidebar p { font-size: 17px; color: var(--text-soft); }
.report-sidebar p + p { margin-top: 12px; }
.report-sidebar p.small { font-size: 15px; color: var(--muted); }
@media (max-width: 760px) { .report-sidebar { padding: 18px 16px 14px; } }
@media print { .report-sidebar { break-inside: avoid; } }
.report-chart { margin: 30px 0 26px; max-width: 860px; }
.report-chart img { display: block; width: 100%; height: auto; border: 1px solid var(--border); background: var(--surface); }
.report-chart figcaption.small, .report-body > p.small { font-size: 16px; color: var(--muted); }
.report-body .table-wrap { margin-top: 22px; }
.report-body .table-wrap + p.small { margin-top: 8px; margin-bottom: 18px; }
table.report-table tr.total td { font-weight: 500; color: var(--text); }
.report-pager { display: grid; grid-template-columns: 1fr auto 1fr; gap: 16px 32px; margin-top: 56px; padding-top: 22px; border-top: 1px solid var(--border); }
.report-pager a { display: block; font-size: 18px; line-height: 1.35; }
.report-pager .up { text-align: center; }
.report-pager .next { text-align: right; }
.pager-k { display: block; font-family: var(--mono); font-size: 13px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
@media (max-width: 760px) {
  ol.report-contents { columns: 1; }
  .report-pager { grid-template-columns: 1fr; }
  .report-pager .up, .report-pager .next { text-align: left; }
  .report-body > h2 { font-size: 26px; }
}
@media print { .report-pager, .report-downloads, .report .method-toc { display: none !important; } }
