/* ============================================================
   Parcenomics — Commonwealth section
   Nav, footer, palette and type follow the site stylesheet (v4 Daylight):
   warm paper, forest ink, working green, ochre;
   Mulish display and body (PWC style guide, 19 Oct) / 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:     #1E5A8C;
  --accent-dim: #154468;
  --amber:      #9C5604;
  --slate:      #46697A;
  --mono:       'IBM Plex Mono', ui-monospace, monospace;
  --display:    'Mulish', -apple-system, 'Segoe UI', system-ui, sans-serif;   /* PWC style guide: Mulish stands in for Proxima Nova (19 Oct) */
  --body:       'Mulish', -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: 500; 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: 500; 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: 500; 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: 500; 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: 500; 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; }
/* Full-window table (19 Oct): CSS places it, so it is right on first paint; app.js only scales it to fit.
   --sbw is the vertical scrollbar width (0 with overlay scrollbars), set by app.js. */
@media screen {
  .table-wrap.fit { max-width: none; width: calc(100vw - var(--sbw, 0px) - 2 * var(--gut));
    margin-left: calc(50% - (100vw - var(--sbw, 0px)) / 2 + var(--gut)); }
}
/* Scrolling full lists on legislator pages (19 Oct) */
.table-wrap.scroll { max-height: 460px; overflow-y: auto; }
table.amlist td:nth-child(4), table.billlist td:nth-child(3) { min-width: 280px; }
@media print { .table-wrap.scroll { max-height: none; overflow: visible; } }
/* Town land map (20 Oct) */
.landmap { height: 460px; margin: 18px 0 10px; border: 1px solid var(--border); background: #eef1ee; }
.swatch { display: inline-block; width: 12px; height: 12px; margin-right: 6px; vertical-align: -1px; border-radius: 2px; }
.leaflet-control-layers label { font-family: var(--body); font-size: 13px; }
@media (max-width: 640px) { .landmap { height: 360px; } }
@media print { .landmap { display: none !important; } }
/* Column-heading info buttons (19 Oct) */
.col-info { display: inline-flex; align-items: center; justify-content: center; width: 15px; height: 15px; margin-left: 5px;
  border: 1px solid currentColor; border-radius: 50%; background: none; color: var(--muted); font: italic 600 10px/1 Georgia, serif;
  cursor: help; vertical-align: 1px; padding: 0; opacity: 0.8; }
.col-info:hover, .col-info:focus-visible { color: var(--accent); opacity: 1; outline: none; }
.col-tip { position: absolute; z-index: 50; max-width: 280px; padding: 10px 12px; background: var(--surface); color: var(--text);
  border: 1px solid var(--border); box-shadow: 0 6px 20px rgba(0,0,0,0.12); font-size: 13px; line-height: 1.45; text-align: left; }
@media print { .col-info, .col-tip { display: none !important; } }
.read-more { font-weight: 700; white-space: nowrap; }
@media print { .read-more { display: none !important; } }
/* Plain-English terms on the method page (19 Oct) */
.terms dt { font-weight: 600; color: var(--text); margin-top: 16px; }
.terms dd { margin: 4px 0 0; max-width: 72ch; }
.term-link { color: inherit; text-decoration: underline dotted; text-underline-offset: 3px; }
.terms dt { scroll-margin-top: 120px; }
/* Losers Club list on the landing page (19 Oct) */
.losers-list { list-style: none; padding: 0; margin: 18px 0 10px; columns: 3 220px; column-gap: 32px; }
.losers-list li { break-inside: avoid; padding: 5px 0; border-bottom: 1px solid var(--border); }
.losers-list .muted { font-size: 0.85em; margin-left: 6px; }
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: 500; 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: 500; 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 2px; font-size: 19px; }
ol.report-contents .toc-desc { display: block; padding: 0 0 12px; font-size: 15px; line-height: 1.45; color: var(--muted); }
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: 500; 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; } }

/* long award lists: print the 15 largest */
.print-more { display: none; }
@media print { table.trunc tbody tr:nth-child(n+16) { display: none; } .print-more { display: block; } }

.dag { position: absolute; font-size: 0.75em; margin-left: 1px; color: var(--muted, #6b6b6b); }

@media print { table.trunc5 tbody tr:nth-child(n+6) { display: none; } }

/* ── Search every page ── */
.search-page { padding-bottom: 64px; }
.site-search-input { width: 100%; max-width: 720px; font: inherit; font-size: 22px; padding: 14px 16px; border: 1px solid var(--border2); border-radius: 4px; background: var(--surface); color: inherit; }
.site-search-input:focus { outline: 2px solid var(--accent, #1E5A8C); outline-offset: 1px; }
.search-silos { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.search-silos .chip { font: inherit; font-size: 14px; padding: 5px 12px; border-radius: 999px; border: 1px solid var(--border2); background: transparent; color: var(--muted); cursor: pointer; }
.search-silos .chip:hover { border-color: var(--accent); color: var(--accent); }
.search-silos .chip[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: #fff; }
.sr-silo { font-size: 12px; color: var(--muted); border: 1px solid var(--border2); border-radius: 3px; padding: 0 5px; margin-left: 6px; white-space: nowrap; }
.search-help { max-width: 720px; color: var(--muted); margin-top: 10px; }
.search-status { font-weight: 600; margin: 18px 0 6px; }
.sr-group { margin-top: 28px; }
.sr-group-h { font-size: 20px; font-weight: 500; margin: 0 0 8px; padding-bottom: 6px; border-bottom: 1px solid var(--border2); }
.sr-page { padding: 12px 0; border-bottom: 1px solid var(--border); }
.sr-page-h { font-weight: 600; font-size: 17px; }
.sr-lines { list-style: none; margin: 6px 0 0; padding: 0; }
.sr-lines li { margin: 4px 0; font-size: 15px; line-height: 1.45; }
.sr-lines a { color: inherit; text-decoration: none; }
.sr-lines a:hover { text-decoration: underline; }
.sr-lines mark { background: #F3E3A6; color: inherit; padding: 0 1px; }
.sr-more { margin-top: 8px; }
.jump-results li.jr-all a { font-weight: 600; }

/* ── Commonwealth Weekly: band under the Commonwealth bar, sign-up box at the end of pages, landing page ── */
.cww-band { background: var(--accent); color: #fff; }
.cww-band-inner { max-width: var(--max); margin: 0 auto; padding: 14px var(--gut); display: flex; align-items: center; gap: 28px; justify-content: space-between; }
.cww-band .cww-name { font-family: var(--mono); font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; font-size: 13px; white-space: nowrap; }
.cww-band .cww-line { font-size: 17px; line-height: 1.35; flex: 1; }
.cww-band .cww-line b { font-weight: 700; color: #fff; }
.cww-btn { display: inline-block; background: #fff; color: var(--accent-dim); font-weight: 700; font-size: 16px; padding: 11px 20px; border: 0; border-radius: 4px; text-decoration: none; white-space: nowrap; cursor: pointer; font-family: var(--body); }
.cww-btn:hover { text-decoration: none; filter: brightness(0.96); }
.cww-btn.dark { background: var(--accent); color: #fff; }
.cww-card { background: var(--text); color: #fff; border-radius: 6px; padding: 40px 44px; margin: 36px 0 28px; display: grid; grid-template-columns: 1.35fr 1fr; gap: 40px; align-items: center; }
.cww-card .cww-eyebrow { font-family: var(--mono); letter-spacing: 0.14em; text-transform: uppercase; font-size: 13px; color: #7FD3A6; margin: 0 0 10px; }
.cww-card .cww-eyebrow span + span:before { content: "· "; }
.cww-card h2 { font-size: 34px; line-height: 1.15; font-weight: 500; margin: 0 0 16px; color: #fff; }
.cww-card ul { margin: 0; padding: 0; list-style: none; font-size: 17px; line-height: 1.5; color: #D9E4DD; }
.cww-card ul li { padding-left: 1.5em; text-indent: -1.5em; margin: 6px 0; }
.cww-card ul li:before { content: "✓"; color: #7FD3A6; font-weight: 700; display: inline-block; width: 1.5em; text-indent: 0; }
.cww-price { background: #fff; color: var(--text); border-radius: 6px; padding: 26px 28px; text-align: center; }
.cww-price .amt { font-size: 46px; font-weight: 600; line-height: 1; }
.cww-price .per { font-size: 15px; color: var(--muted); margin: 6px 0 16px; }
.cww-price .cww-btn { width: 100%; box-sizing: border-box; font-size: 18px; padding: 14px; }
.cww-price .small2 { font-size: 13px; color: var(--muted); margin-top: 12px; line-height: 1.45; }
.cww-price .small2 a { color: var(--muted); text-decoration: underline; }
.cww-pay { margin: 0; }
.cww-landing { padding-bottom: 56px; }
.cww-card-land { margin-top: 28px; }
.cww-faq { max-width: 760px; margin-top: 40px; }
.cww-faq h2 { font-size: 26px; font-weight: 500; margin-bottom: 8px; }
.cww-faq dt { font-weight: 700; margin-top: 18px; }
.cww-faq dd { margin: 4px 0 0; line-height: 1.55; }
@media (max-width: 760px) {
  .cww-band-inner { flex-wrap: wrap; padding: 12px 16px; gap: 8px 14px; }
  .cww-band .cww-line { font-size: 15px; flex-basis: 100%; }
  .cww-card { grid-template-columns: 1fr; padding: 26px 20px; gap: 22px; }
  .cww-card h2 { font-size: 26px; }
  .cww-card .cww-eyebrow span { display: block; }
  .cww-card .cww-eyebrow span + span:before { content: ""; }
}
@media print { .cww-band, .cww-card { display: none !important; } }

/* ── Sortable tables and filter boxes ── */
table.is-sortable thead th { cursor: pointer; user-select: none; }
table.is-sortable:not(.sortable) thead th[aria-sort="ascending"]::after { content: " ↑"; color: var(--accent); }
table.is-sortable:not(.sortable) thead th[aria-sort="descending"]::after { content: " ↓"; color: var(--accent); }
.tbl-filter-row { display: flex; align-items: center; gap: 12px; margin: 14px 0 6px; }
.tbl-filter-input { flex: 0 1 340px; font: inherit; font-size: 15px; padding: 8px 12px; border: 1px solid var(--border2); border-radius: 4px; background: var(--surface); color: inherit; }
.tbl-filter-count { font-size: 14px; color: var(--muted); }
@media print { .tbl-filter-row { display: none !important; } }

/* feature flags on town pages (Phase 1) */
.card-roads p.flag { margin: 10px 0; font-weight: 500; }

/* findings story pages (Phase 1) */
.fchart-wrap { margin: 18px 0 6px; }
.fchart { width: 100%; height: auto; display: block; }
.fchart .fc-grid { stroke: var(--border2); stroke-width: 1; }
.fchart .fc-ax { font-size: 11px; fill: var(--muted); }
.fc-s0 { fill: var(--accent); background: var(--accent); }
.fc-s1 { fill: #7FB89A; background: #7FB89A; }
.fc-s2 { fill: #C9A25A; background: #C9A25A; }
.fc-legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: 13px; color: var(--muted); margin-top: 6px; }
.fc-key i { display: inline-block; width: 10px; height: 10px; margin-right: 6px; vertical-align: -1px; }
.findings-list { list-style: none; padding: 0; margin: 0 0 48px; }
.findings-list li { padding: 14px 0; border-bottom: 1px solid var(--border2); }
.findings-list li .muted { display: block; margin-top: 2px; }
h1.h1-finding, .hero h1.h1-finding { font-size: clamp(30px, 4.2vw, 46px); line-height: 1.15; max-width: 920px; }

.card h3.sub-h { font-size: 20px; font-weight: 500; margin: 28px 0 8px; }

table.items.tight th, table.items.tight td { padding-left: 8px; padding-right: 8px; }
@media (max-width: 1100px) { table.items.tight { font-size: 14px; } }

table.bridges-all { font-size: 14px; }
table.bridges-all td, table.bridges-all th { padding-left: 6px; padding-right: 6px; }
table.bridges-all td:nth-child(1) { white-space: nowrap; }
table.bridges-all td:nth-child(10) { white-space: nowrap; }
table.bridges-all tr.row-poor td { background: #FBF3EE; }

/* phone: a scrolling table could push the page wider than the screen (peer table); keep its contents inside the box */
.table-wrap { contain: paint; }

/* ── Link descriptions (Patrick, 20 Oct): hover text on desktop; the phone menu shows them as text ── */
.has-desc { position: relative; }
@media (hover: hover) and (min-width: 961px) {
  .has-desc:hover::after, .has-desc:focus-visible::after {
    content: attr(data-desc); position: absolute; left: 0; top: 100%; margin-top: 8px; z-index: 300;
    width: max-content; max-width: 300px; white-space: normal; pointer-events: none;
    background: var(--text); color: #fff; border-radius: 4px; padding: 9px 11px; box-shadow: 0 4px 14px rgba(0,0,0,.18);
    font-family: var(--body); font-size: 14px; font-weight: 400; line-height: 1.45; letter-spacing: 0; text-transform: none; text-align: left;
  }
  .has-desc.desc-right:hover::after, .has-desc.desc-right:focus-visible::after { left: auto; right: 0; }
  .nav-dropdown .has-desc:hover::after { left: 100%; top: 0; margin: 0 0 0 14px; }
}
.nav-cw { display: none; }
.nav-desc { display: block; font-size: 14px; font-weight: 400; color: var(--muted); letter-spacing: 0; text-transform: none; line-height: 1.4; margin-top: 3px; }
@media (max-width: 640px) {
  .nav-cw { display: block; width: 100%; padding-bottom: 8px; margin-bottom: 4px; border-bottom: 2px solid var(--border); }
  .nav-cw-h { font-family: var(--mono); font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); margin: 6px 0 2px; }
  .nav-cw ul { list-style: none; padding: 0; margin: 0; }
  .nav-links .nav-cw li a { color: var(--text); font-weight: 600; }
  .cw-bar .cw-home, .cw-bar .cw-link { display: none; }
}
@media (max-width: 1100px) { .lbl-long { display: none; } }
@media (max-width: 960px) {
  .nav-links.open { background: var(--bg); max-height: calc(100vh - 64px); overflow-y: auto; box-shadow: 0 10px 24px rgba(0,0,0,.10); }
  .site-nav:has(.nav-links.open) { backdrop-filter: none; -webkit-backdrop-filter: none; background: var(--bg); }
}
.bridge-list-print { display: none; }
/* the town search sits at the right end of the Commonwealth bar, under "Get a Briefing", and never wraps below the links on desktop (Patrick, 21 Oct) */
@media (min-width: 961px) {
  .cw-bar-inner { flex-wrap: nowrap; gap: 24px; max-width: none; padding: 10px var(--gut); }   /* edges line up with the site nav: links under the wordmark, search under the button */
  .cw-home, .cw-link { white-space: nowrap; }
  .cw-bar .jump { flex: 0 1 300px; min-width: 190px; width: auto; margin-left: auto; }
}
/* glossary terms: first use on a page; hover, focus or tap shows the definition (21 Oct) */
.term { text-decoration: underline dotted; text-decoration-color: var(--accent-dim); text-underline-offset: 3px; cursor: help; }
.term:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 2px; }
@media print { .term { text-decoration: none; } }
/* feedback band above the footer, and the feedback page (Patrick, 21 Oct) */
.cw-feedback { border-top: 1px solid var(--border); background: var(--surface); }
.cw-feedback-inner { max-width: var(--max); margin: 0 auto; padding: 22px var(--gut); }
.cw-feedback p { font-size: 15px; line-height: 1.55; color: var(--text-soft); margin: 0; max-width: 900px; }
.cw-feedback-link { font-weight: 600; white-space: nowrap; }
.fb-wrap { max-width: 720px; }
.fb-form { display: grid; gap: 16px; margin: 8px 0 48px; }
.fb-row { display: grid; gap: 6px; }
.fb-row label { font-weight: 600; font-size: 15px; }
.fb-row input, .fb-row textarea { font: inherit; font-size: 16px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 6px; background: #fff; color: var(--text); width: 100%; box-sizing: border-box; }
.fb-row input[readonly] { background: var(--surface); color: var(--muted); }
.fb-send { justify-self: start; }
@media print { .cw-feedback { display: none !important; } }
.fb-send { font: inherit; font-size: 16px; font-weight: 600; padding: 12px 22px; border: 0; border-radius: 6px; background: var(--accent); color: #fff; cursor: pointer; }
.fb-send:disabled { opacity: .6; cursor: default; }

/* Links read as links (Patrick, 21 Oct 2026): underlined in the page body; navigation and buttons keep their own look. */
main a, .cw-feedback a { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.18em;
  text-decoration-color: var(--accent); text-decoration-color: color-mix(in srgb, currentColor 45%, transparent); }
main a:hover, .cw-feedback a:hover { text-decoration-color: currentColor; }
main a.cww-btn, main a.btn-ghost, main .fb-send, main a.cww-btn:hover, main a.btn-ghost:hover { text-decoration: none; }
.cw-fb-box { max-width: 720px; margin-top: 18px; }
.cw-fb-box .fb-form { margin: 0 0 8px; }
.cw-fb-actions { display: flex; gap: 12px; align-items: center; }
.cw-fb-cancel { font: inherit; font-size: 16px; background: none; border: 0; color: var(--muted); cursor: pointer; text-decoration: underline; padding: 12px 6px; }
.cw-fb-box .fb-done p { font-size: 16px; }

/* ── On this page (21 Oct 2026): sticky row of section links on long pages ── */
.cw-onpage {
  position: sticky; top: 64px; z-index: 90;
  background: rgba(253,251,246,0.96); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.cw-onpage-inner { max-width: var(--max); margin: 0 auto; padding: 0 var(--gut); height: 56px; display: flex; align-items: center; gap: 10px; }
.cw-onpage-h {
  flex: none; white-space: nowrap; margin-right: 6px;
  font-family: var(--mono); font-size: 13px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted);
}
.cw-onpage ul {
  list-style: none; display: flex; gap: 8px; flex: 1; min-width: 0; overflow-x: auto; scrollbar-width: none;
  -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 40px), transparent);
          mask-image: linear-gradient(to right, #000 calc(100% - 40px), transparent);
}
.cw-onpage.at-end ul { -webkit-mask-image: none; mask-image: none; }
.cw-onpage ul::-webkit-scrollbar { display: none; }
.cw-onpage li { flex: none; }
.cw-onpage a {
  display: block; white-space: nowrap; font-size: 16px; font-weight: 500; line-height: 1; color: var(--text-soft);
  padding: 9px 14px; border: 1px solid var(--border2); border-radius: 999px; background: var(--surface); text-decoration: none;
}
.cw-onpage a:hover { color: var(--accent); border-color: var(--accent); text-decoration: none; }
.cw-onpage a[aria-current] { color: #fff; background: var(--accent); border-color: var(--accent); }
.cw-onpage-arrow {
  flex: none; width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--border2); background: var(--surface);
  color: var(--text-soft); font-size: 22px; line-height: 1; cursor: pointer; padding: 0 0 3px;
}
.cw-onpage-arrow:hover { color: var(--accent); border-color: var(--accent); }
.cw-onpage-arrow[hidden] { display: none; }
.card, .section-title { scroll-margin-top: 140px; }
.cw-onpage-m { display: none; }
@media (max-width: 960px) {
  .cw-onpage-m { display: block; }
  .method-sec { scroll-margin-top: 136px; }
}
@media (max-width: 640px) {
  .cw-onpage-inner { padding: 0 0 0 16px; height: 52px; }
  .cw-onpage-h, .cw-onpage-arrow { display: none !important; }
  .cw-onpage ul { padding-right: 16px; }
  .cw-onpage a { font-size: 15px; padding: 8px 12px; }
}
@media print { .cw-onpage { display: none !important; } }
.cw-onpage ~ .method .method-toc ul { top: 136px; }
.report-body h2, .report-sidebar h3, .report-summary { scroll-margin-top: 140px; }

/* ── Findings directory (21 Oct 2026) ── */
.fdir { margin-top: 48px; }
.fdir-intro { font-size: 18px; color: var(--text-soft); max-width: 68ch; margin-bottom: 18px; }
.fdir-list { list-style: none; border-top: 1px solid var(--border); }
.fdir-row { display: grid; grid-template-columns: 300px 1fr; gap: 40px; padding: 28px 0; border-bottom: 1px solid var(--border); }
.fdir-h { font-family: var(--display); font-weight: 500; font-size: 24px; line-height: 1.25; }
.fdir-h a { color: var(--text); }
.fdir-h a:hover { color: var(--accent); }
.fdir-n { display: block; font-family: var(--mono); font-size: 14px; font-weight: 600; letter-spacing: 0.08em; color: var(--accent); margin-bottom: 6px; }
.fdir-n::before { content: 'Section '; }
.fdir-body p { font-size: 18px; color: var(--text-soft); max-width: 68ch; }
.fdir-story { margin-top: 12px; }
.fdir-k { font-family: var(--mono); font-size: 13px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin-right: 6px; }
.fdir-story a { font-weight: 500; }
@media (max-width: 760px) {
  .fdir-row { grid-template-columns: 1fr; gap: 10px; padding: 22px 0; }
  .fdir-h { font-size: 22px; }
}

/* ── Elected Officials: show toggle and the money line (21 Oct 2026) ── */
.seg { display: inline-flex; border: 1px solid var(--border2); border-radius: 999px; overflow: hidden; margin: 4px 0 14px; background: var(--surface); }
.seg button { font: inherit; font-size: 16px; font-weight: 500; padding: 9px 18px; border: 0; background: none; color: var(--text-soft); cursor: pointer; }
.seg button + button { border-left: 1px solid var(--border2); }
.seg button[aria-pressed="true"] { background: var(--accent); color: #fff; }
.leg-agg { font-size: 16px; color: var(--text-soft); margin: 0 0 14px; line-height: 1.7; }
.leg-agg b { font-weight: 600; color: var(--text); }
@media (max-width: 640px) { .seg button { font-size: 15px; padding: 8px 12px; } }

/* Tiles in a row share label, figure and note rows, so the large figures line up when a label or note wraps
   (Patrick, 21 Oct 2026). Every tile has exactly three parts: label, value, sub. */
@supports (grid-template-rows: subgrid) {
  .tile { display: grid; grid-row: span 3; grid-template-rows: subgrid; row-gap: 0; align-content: start; }
  .tile-label { align-self: end; }
  .tile-sub { align-self: start; }
}

/* ── Who gave, by size of each giver's total (22 Oct 2026) ── */
.gv { margin: 26px 0 8px; }
.gv-h { font-family: var(--display); font-weight: 500; font-size: 22px; margin-bottom: 10px; }
.gv-row { display: grid; grid-template-columns: minmax(180px, 1.1fr) 1fr 1fr; gap: 14px; align-items: center; min-height: 54px; border-bottom: 1px solid var(--border); padding: 6px 0; }
.gv-head { min-height: 0; font-family: var(--mono); font-size: 13px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); border-bottom: 1px solid var(--border2); }
.gv-lab { font-size: 16px; color: var(--text); line-height: 1.3; }
.gv-sub { display: block; font-size: 14px; color: var(--muted); margin-top: 2px; }
.gv-bar { position: relative; height: 24px; background: var(--surface2); border-radius: 3px; }
.gv-fill { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 3px; }
.gv-g .gv-fill { background: #46697A; }
.gv-d .gv-fill { background: #0F7A46; }
.gv-tick { position: absolute; top: -4px; bottom: -4px; width: 2px; background: #16241D; opacity: 0.55; }
.gv-v { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); font-family: var(--mono); font-size: 14px; color: var(--text); }
.gv-na { background: none; border: 1px dashed var(--border2); }
.gv-na .gv-v { color: var(--muted); font-family: var(--body); }
@media (max-width: 640px) {
  .gv-row { grid-template-columns: 1fr 1fr; }
  .gv-lab { grid-column: 1 / -1; }
  .gv-head div:first-child { display: none; }
}
.gv-total { font-size: 17px; color: var(--text-soft); margin: 14px 0 8px; }

/* Givers per 1,000 residents: dot strip against the chamber (22 Oct 2026) */
.ds { margin: 30px 0 8px; }
.ds-row { display: grid; grid-template-columns: minmax(170px, 0.9fr) 3fr; gap: 16px; align-items: center; }
.ds-lab { font-size: 16px; color: var(--text); line-height: 1.3; }
.ds-track { position: relative; height: 92px; border-bottom: 1px solid var(--border); margin: 0 18px 0 10px; }
.ds-dense .ds-track { height: 128px; }
.ds-dense .ds-dot { width: 7px; height: 7px; margin: -3.5px 0 0 -3.5px; }
.ds-dense .ds-me { width: 16px; height: 16px; margin: -8px 0 0 -8px; }
.ds-dot { position: absolute; width: 9px; height: 9px; margin: -4.5px 0 0 -4.5px; border-radius: 50%; background: #AEB7C0; top: 50%; }
.ds-over { background: #5D6873; }
.ds-me { width: 16px; height: 16px; margin: -8px 0 0 -8px; background: #1E5A8C; opacity: 1; border: 2px solid #fff; box-shadow: 0 0 0 1px #1E5A8C; z-index: 3; }
.ds-tag { position: absolute; top: 4px; transform: translateX(8px); font-family: var(--mono); font-size: 14px; font-weight: 600; color: #1E5A8C; white-space: nowrap; z-index: 4; background: rgba(255,255,255,0.85); padding: 0 3px; }
.ds-tag.ds-left { transform: translateX(calc(-100% - 8px)); }
.ds-med { position: absolute; top: 26px; bottom: 0; width: 2px; margin-left: -1px; background: #1B2B4D; z-index: 5; pointer-events: none; }
.ds-med span { position: absolute; bottom: 2px; left: 6px; font-family: var(--mono); font-size: 13px; color: #1B2B4D; white-space: nowrap; background: rgba(255,255,255,0.8); }
.ds-axisrow { margin-top: 2px; }
.ds-axis { position: relative; height: 22px; margin: 0 18px 0 10px; }
.ds-tick { position: absolute; transform: translateX(-50%); font-family: var(--mono); font-size: 13px; color: var(--muted); }
@media (max-width: 640px) {
  .ds-row { grid-template-columns: 1fr; gap: 4px; }
  .ds-axisrow > div:first-child { display: none; }
}
/* dot strip: every dot names its member on hover and links to the member's page (23 Oct 2026) */
.ds-dot[data-n] { cursor: pointer; text-decoration: none; transition: transform .08s; }
.ds-dot[data-n]:hover, .ds-dot[data-n]:focus-visible { background: #1B2B4D; transform: scale(1.6); z-index: 6; }
.ds-dot[data-n]:hover::after { content: attr(data-n); position: absolute; bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%) scale(0.625);
  transform-origin: bottom center; background: #1B2B4D; color: #fff; font-family: var(--body); font-size: 15px; line-height: 1.25;
  padding: 6px 11px; border-radius: 4px; white-space: pre; text-align: left; pointer-events: none; }
.ds-dot[data-n].ds-r:hover::after { left: auto; right: 50%; transform: scale(0.625); transform-origin: bottom right; }
.ds-dense .ds-dot[data-n]:hover { transform: scale(2); }
.ds-dense .ds-dot[data-n]:hover::after { transform: translateX(-50%) scale(0.5); }
.ds-dense .ds-dot[data-n].ds-r:hover::after { transform: scale(0.5); }
/* post colours (23 Oct 2026): Okabe-Ito colour-blind-safe set, ordered by salience; gray = no post */
.ds-dot.ds-g1 { background: #D55E00; opacity: 1; }
.ds-dot.ds-g2 { background: #0072B2; opacity: 1; }
.ds-dot.ds-g3 { background: #56B4E9; opacity: 1; }
.ds-dot.ds-g4 { background: #B5BDC5; opacity: 1; }
.ds-dot.ds-over { box-shadow: 0 0 0 2px #fff, 0 0 0 3px #363D45; }
a.ds-dot:hover, a.ds-dot:focus-visible { box-shadow: 0 0 0 2px #fff, 0 0 0 3px #1B2B4D; }
.ds-legend { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 4px 0 6px; font-size: 15px; color: var(--text-soft); }
.ds-key { display: inline-flex; align-items: center; gap: 7px; }
.ds-sw { display: inline-block; width: 12px; height: 12px; border-radius: 50%; }
.ds-sw.ds-g1 { background: #D55E00; } .ds-sw.ds-g2 { background: #0072B2; } .ds-sw.ds-g3 { background: #56B4E9; } .ds-sw.ds-g4 { background: #B5BDC5; }
/* Elected Officials: the Legislature at a glance */
.glance { margin-top: 10px; margin-bottom: 40px; }
.gl-chart { margin: 26px 0 10px; }
.gl-track { height: 120px; }
.gl-panel[data-ch="House"] .gl-track { height: 150px; }
.gl-panel[data-ch="House"] .ds-dot { width: 9px; height: 9px; margin: -4.5px 0 0 -4.5px; }
.gl-panel[data-ch="Senate"] .ds-dot { width: 13px; height: 13px; margin: -6.5px 0 0 -6.5px; }
.gl-panel[data-ch="House"] a.ds-dot:hover { transform: scale(1.8); }
.gl-panel[data-ch="House"] a.ds-dot:hover::after { transform: translateX(-50%) scale(0.5556); }
.gl-panel[data-ch="House"] a.ds-dot.ds-r:hover::after { transform: scale(0.5556); }
.gl-panel[data-ch="Senate"] a.ds-dot:hover { transform: scale(1.4); }
.gl-panel[data-ch="Senate"] a.ds-dot:hover::after { transform: translateX(-50%) scale(0.7143); }
.gl-panel[data-ch="Senate"] a.ds-dot.ds-r:hover::after { transform: scale(0.7143); }
.gl-lab { font-family: var(--mono); font-size: 13px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); margin: 0 0 4px; }
/* where the givers live: table with a pie of the share of givers (23 Oct 2026) */
.wh { display: grid; grid-template-columns: minmax(0, 1fr) 210px; gap: 28px; align-items: center; }
.wh-pie { margin: 0; text-align: center; }
.wh-disc { width: 190px; height: 190px; margin: 0 auto; display: block; overflow: visible; }
.wh-disc path, .wh-disc circle { stroke: #fff; stroke-width: 1.5; cursor: default; transition: transform .1s; transform-origin: 100px 100px; }
.wh-disc path.on, .wh-disc circle.on { transform: scale(1.05); }
.wh tr.on td { background: var(--surface2); }
.wh-tip { position: fixed; z-index: 50; background: #1B2B4D; color: #fff; font-family: var(--body); font-size: 15px; line-height: 1.3; padding: 6px 11px; border-radius: 4px; white-space: pre; pointer-events: none; }
.wh-pie figcaption { font-family: var(--mono); font-size: 13px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); margin-top: 10px; }
.wh-sw { display: inline-block; width: 13px; height: 13px; border-radius: 50%; margin-right: 9px; vertical-align: -1px; }
@media (max-width: 760px) { .wh { grid-template-columns: 1fr; } .wh-disc { width: 170px; height: 170px; } }
/* The state budget, year over year (23 Oct 2026): HTML bar charts, large type */
.bd-key { display: flex; flex-wrap: wrap; gap: 6px 20px; font-size: 15px; color: var(--text-soft); margin: 6px 0 10px; }
.bd-key i { display: inline-block; width: 13px; height: 13px; border-radius: 3px; margin-right: 7px; vertical-align: -1px; }
.bd-cols { display: flex; align-items: flex-end; gap: 8px; height: 280px; padding-top: 10px; border-bottom: 1px solid var(--border2); margin-bottom: 52px; }
.bd-col { position: relative; flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; }
.bd-stack { display: flex; flex-direction: column; border-radius: 3px 3px 0 0; overflow: hidden; min-height: 2px; }
.bd-stack span { display: block; min-height: 0; }
.bd-x { position: absolute; bottom: -24px; left: 0; right: 0; text-align: center; font-family: var(--mono); font-size: 13px; color: var(--muted); margin: 0; }
.bd-v { position: absolute; bottom: -44px; left: 0; right: 0; text-align: center; font-family: var(--mono); font-size: 12px; color: var(--text-soft); margin: 0; white-space: nowrap; }
.bd-col:hover .bd-stack { outline: 2px solid #1B2B4D; }
.bd-col:hover::after { content: attr(data-n); position: absolute; bottom: calc(100% + 4px); left: 50%; transform: translateX(-50%); background: #1B2B4D; color: #fff;
  font-size: 15px; line-height: 1.3; padding: 6px 11px; border-radius: 4px; white-space: pre; z-index: 20; pointer-events: none; }
.bd-hchart { margin: 8px 0 6px; }
.bd-hrow { display: grid; grid-template-columns: minmax(150px, 1fr) 3fr; column-gap: 16px; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--border); }
.bd-hl { grid-row: span 2; margin: 0; font-size: 16px; color: var(--text); }
.bd-h { position: relative; height: 22px; margin: 2px 90px 2px 0; }
.bd-hb { position: absolute; top: 3px; bottom: 3px; border-radius: 2px; }
.bd-hv { position: absolute; top: 50%; transform: translate(6px, -50%); font-family: var(--mono); font-size: 13px; color: var(--text); white-space: nowrap; }
.bd-sms { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px 28px; margin: 6px 0 4px; }
.bd-smh { font-weight: 600; font-size: 16px; margin: 0 0 4px; }
.bd-cols-sm { height: 170px; gap: 6px; margin-bottom: 50px; }
@media (max-width: 640px) { .bd-v { display: none; } .bd-cols { margin-bottom: 30px; height: 220px; } .bd-hrow { grid-template-columns: 1fr; } .bd-hl { grid-row: auto; } }
.bd-hv.bd-neg { transform: translate(calc(-100% - 6px), -50%); }

/* Massachusetts in 15 charts (23 Oct 2026) */
.c15-group{margin-top:2.5rem}
.c15 .report-chart img{width:100%;height:auto}
.c15-more{margin:.9rem 0 0;font-weight:500}
.c15 .card-title{margin-bottom:.4rem}
.c15 .gv-h{margin-top:.6rem}
.c15 .report-chart{margin-top:.6rem}

/* Home page: three charts under the hero (23 Oct 2026) */
.hc-row{display:grid;grid-template-columns:repeat(3,1fr);gap:20px;margin-top:4px}
.hc-p{display:block;border:1px solid #C3C8CF;background:#fff;padding:20px 22px;color:inherit;text-decoration:none}
a.hc-p:hover{border-color:#44546F}
.hc-p h3{font-size:1.15rem;line-height:1.35;margin:.3rem 0 .8rem;min-height:6.75em}
.hc-k{font-family:ui-monospace,SFMono-Regular,Menlo,monospace;letter-spacing:.12em;text-transform:uppercase;font-size:.72rem;color:#1a7a4a;margin:0}
.hc-sub{font-size:.85rem;color:#6E7681;margin:0 0 .6rem}
.hc-p .bd-key{margin:0 0 10px}.hc-p .gl-chart{margin:0}.hc-p .ds-legend{font-size:.85rem}
.hc-bars{display:flex;gap:12px}.hc-b{flex:1;text-align:center}
.hc-pos{height:180px;display:flex;flex-direction:column;justify-content:flex-end;border-bottom:1px solid #6E7681}
.hc-neg{min-height:34px}.hc-bar{width:100%;background:#1B2B4D}
.hc-bv{font-size:1rem;font-weight:600;margin:0 0 4px}.hc-bx{font-size:.78rem;line-height:1.25;margin:6px 0 0}
.hc-more{font-weight:500;margin:14px auto 0}
@media (max-width:900px){.hc-row{grid-template-columns:1fr}.hc-p h3{min-height:0}}
.hc-note{margin:.8rem 0 0;color:#6E7681}
a.hc-p:hover,a.hc-p:hover *{text-decoration:none}

/* Fairness bubbles on the 16-chart page: hover a town, click for its page (23 Oct 2026) */
.fb-chart{margin:.6rem 0 0}.fb-svg{width:100%;height:auto;display:block}
.fb-svg .fb-t{font-family:var(--body);font-size:13px;fill:#363D45}
.fb-svg a circle{cursor:pointer;transition:stroke-width .08s}
.fb-svg a:hover circle,.fb-svg a:focus circle{stroke:#1B2B4D;stroke-width:2.5}
.fb-x{text-align:center;margin:.2rem 0 .6rem}
.c15-note{margin:.4rem 0 .2rem;max-width:46rem}

/* Commonwealth Weekly sign-up form (free, 24 Oct 2026) */
.cww-signup { margin: 0; text-align: left; }
.cww-f { display: block; margin: 0 0 10px; font-size: 14px; color: var(--muted); }
.cww-f span { display: block; margin-bottom: 3px; } .cww-f i { font-style: normal; }
.cww-f input { width: 100%; box-sizing: border-box; font: inherit; font-size: 16px; color: var(--text); padding: 10px 12px; border: 1px solid #C3C8CF; border-radius: 4px; background: #fff; }
.cww-signup .cww-btn { margin-top: 6px; }
.cww-done .amt-s { font-size: 24px; font-weight: 600; margin: 4px 0 6px; }

/* weekly update pages (build_updates.py) */
.upd h2 { margin-top: 44px; }
.upd h3 { margin-top: 28px; }
.upd p, .upd li { font-size: 19px; line-height: 1.55; max-width: 72ch; }
.upd table.items th, .upd table.items td { font-size: 17px; }
.upd-chart { margin: 26px 0 8px; max-width: 900px; }
.upd-chart figcaption { font-size: 22px; line-height: 1.35; font-weight: 600; color: var(--navy, #1B2B4D); margin-bottom: 8px; }
.upd-chart svg { width: 100%; height: auto; display: block; }
.upd-note { font-size: 16px; color: var(--muted); max-width: 72ch; }
.upd-nav { display: flex; justify-content: space-between; gap: 16px; margin: 8px 0 0; font-size: 18px; }
.upd-arch { background: var(--surface); border: 1px solid var(--border); padding: 12px 16px; font-size: 18px; }

.upd-tick { border: 1px solid var(--border); background: var(--surface); margin: 24px auto 0; padding: 14px 18px; }
.upd-tick-k { font-family: var(--mono); font-size: 15px; letter-spacing: .06em; text-transform: uppercase; color: var(--green, #1E5A8C); margin: 0 0 4px; }
.upd-tick-t { font-size: 20px; line-height: 1.45; margin: 0; max-width: 78ch; }

/* phone: charts keep a readable type size by scrolling sideways; tables show a scroll cue */
.upd-chart-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
@media (max-width: 700px) {
  .upd-chart-scroll svg { min-width: 760px; }
  .upd .table-wrap { background: linear-gradient(to right, var(--surface) 30%, transparent), linear-gradient(to left, var(--surface) 30%, transparent) 100% 0, linear-gradient(to right, rgba(27,43,77,.18), transparent) 0 0, linear-gradient(to left, rgba(27,43,77,.18), transparent) 100% 0; background-repeat: no-repeat; background-size: 40px 100%, 40px 100%, 14px 100%, 14px 100%; background-attachment: local, local, scroll, scroll; }
  .upd table.items td:nth-child(2) { min-width: 0; }
}
.upd-cap { font-size: 16px; color: var(--muted); margin: 22px 0 -16px; max-width: 72ch; }
.upd .table-wrap.scroll thead th { position: sticky; top: 0; z-index: 1; background: var(--surface2, #F3EFE6); }

/* Mock additions only. Everything else is the live style.css, untouched. */
.mock-strip{background:#16241D;color:#F3EFE4;font:600 13px/1.4 var(--body);text-align:center;padding:6px 12px;letter-spacing:.02em}

/* Scorecard strip: three indices, same grammar, fixed heights so the boxes align */
.sc-strip{display:grid;grid-template-columns:repeat(3,1fr);gap:16px;margin:8px auto 28px}
.sc{display:block;background:var(--surface);border:1px solid var(--border);border-radius:10px;padding:18px 20px 16px;min-height:150px;color:var(--text);text-decoration:none}
.sc:hover{border-color:var(--border2)}
.sc-label{font:600 13px/1.3 var(--body);color:var(--muted);text-transform:uppercase;letter-spacing:.04em;margin:0 0 6px;min-height:34px}
.sc-score{font:700 44px/1 var(--display);margin:0 0 8px;letter-spacing:-.02em}
.sc-of{font:500 18px/1 var(--body);color:var(--muted);margin-left:2px}
.sc-rank{font:500 14px/1.35 var(--body);margin:0 0 4px;color:var(--text-soft)}
.sc-note{font:400 13px/1.35 var(--body);color:var(--muted);margin:0}
.sc-tag{display:inline-block;font:600 10px/1 var(--body);letter-spacing:.06em;text-transform:uppercase;color:#9C5604;border:1px solid #9C5604;border-radius:3px;padding:3px 5px;vertical-align:middle;margin-left:6px}
@media (max-width:760px){.sc-strip{grid-template-columns:1fr}}

/* At a glance: the headline sentence of every card */
.glance2{margin:0 auto 28px}
.gl-list{list-style:none;margin:0;padding:0;background:var(--surface);border:1px solid var(--border);border-radius:10px}
.gl-list li+li{border-top:1px solid var(--border)}
.gl-list a{display:grid;grid-template-columns:170px 1fr;gap:18px;padding:12px 20px;color:var(--text);text-decoration:none;align-items:baseline}
.gl-list a:hover{background:var(--surface2)}
.gl-k{font:600 12px/1.3 var(--body);text-transform:uppercase;letter-spacing:.05em;color:var(--muted)}
.gl-s{font:400 15.5px/1.45 var(--body)}
.gl-new .gl-k{color:#1E5A8C}
@media (max-width:640px){.gl-list a{grid-template-columns:1fr;gap:3px}}

/* Grouped section nav */
.sec-nav{position:sticky;top:0;z-index:20;background:var(--bg);border-bottom:1px solid var(--border);margin:0 auto 24px;padding:10px 0 8px}
.sec-nav-inner{display:flex;gap:28px;flex-wrap:wrap}
.sec-group{display:flex;gap:10px;align-items:baseline}
.sec-h{font:700 12px/1 var(--body);text-transform:uppercase;letter-spacing:.06em;color:var(--text)}
.sec-group ul{display:flex;gap:10px;list-style:none;margin:0;padding:0;flex-wrap:wrap}
.sec-group a{font:500 13.5px/1 var(--body);color:var(--muted);text-decoration:none;padding:4px 0}
.sec-group a:hover{color:var(--accent)}

/* Folded cards */
.card-fold summary{list-style:none;cursor:pointer;display:grid;grid-template-columns:1fr auto;gap:12px;align-items:center}
.card-fold summary::-webkit-details-marker{display:none}
.card-fold summary .card-eyebrow,.card-fold summary .card-title{grid-column:1}
.card-fold summary .card-title{margin-bottom:0}
.fold-hint{grid-column:2;grid-row:1/3;font:600 13px/1 var(--body);color:var(--accent);white-space:nowrap}
.card-fold[open] .fold-hint{display:none}
.fold-body{margin-top:14px}

/* Forest mix strip */
.mix{margin:10px 0 6px}
.mix-row{display:grid;grid-template-columns:210px 1fr;gap:14px;align-items:center;margin:0 0 10px}
.mix-lab b{display:block;font:700 15px/1.2 var(--body)}
.mix-lab span{display:block;font:400 12.5px/1.3 var(--body);color:var(--muted);margin-top:3px}
.mix-svg{width:100%;height:46px;display:block;border-radius:4px;overflow:hidden}
.mix-svg text{font:600 4.2px var(--body);fill:#16241D;pointer-events:none}
.mix-svg g.seg rect[fill="#4D3319"]+text,.mix-svg g.seg rect[fill="#0072B2"]+text,.mix-svg g.seg rect[fill="#009E73"]+text,.mix-svg g.seg rect[fill="#D55E00"]+text{fill:#fff}
.mix-legend{display:flex;flex-wrap:wrap;gap:6px 16px;margin:4px 0 0 224px;font:500 12.5px/1.3 var(--body);color:var(--text-soft)}
.mix-key i{display:inline-block;width:11px;height:11px;border-radius:2px;vertical-align:-1px;margin-right:5px;border:1px solid rgba(0,0,0,.12)}
@media (max-width:640px){.mix-row{grid-template-columns:1fr;gap:4px}.mix-legend{margin-left:0}}

/* Then and now */
.pair{display:grid;grid-template-columns:1fr 1fr;gap:14px;margin-top:8px}
.landmap.half{height:300px}
@media (max-width:640px){.pair{grid-template-columns:1fr}}
.landmap{height:440px;border-radius:8px;border:1px solid var(--border);margin:14px 0 10px}

/* Measure page */
.m-switch{font:500 15px/1.4 var(--body);margin:10px 0 0}
.m-switch select,.m-switch input{font:inherit;padding:5px 8px;border:1px solid var(--border2);border-radius:6px;background:var(--surface);color:var(--text)}
.m-hl{margin-left:14px}
.m-share{margin-left:10px;font-size:14px}
.m-wrap{position:relative}
#m-svg{width:100%;height:auto;display:block}
#m-svg path{stroke:#fff;stroke-width:.7;transition:fill .2s}
#m-svg path:hover{stroke:#16241D;stroke-width:1.5}
#m-svg path.hl{stroke:#16241D;stroke-width:2.5}
.m-legend{display:flex;flex-wrap:wrap;gap:6px 16px;margin:10px 0 0;font:500 12.5px/1.3 var(--body);color:var(--text-soft)}
.m-legend i{display:inline-block;width:14px;height:11px;border-radius:2px;vertical-align:-1px;margin-right:5px;border:1px solid rgba(0,0,0,.1)}
#m-body tr.hl td{background:#FBF3DA;font-weight:700}
/* fixes after first render */
.card-land .fi-grid{grid-template-columns:1fr}
.card-land .fi-block{max-width:720px}
.mix-bar{display:flex;height:46px;border-radius:4px;overflow:hidden}
.mix-seg{display:flex;flex-direction:column;justify-content:center;align-items:center;overflow:hidden;min-width:0;color:#16241D;font:600 12px/1.1 var(--body);white-space:nowrap}
.mix-seg.dk,.mix-seg.dk b{color:#fff}
.mix-seg i{font:500 11px/1.1 var(--body);opacity:.85;font-style:normal;margin-top:2px}
.mix-seg b{overflow:hidden;text-overflow:clip;max-width:100%}
.share-line{margin:6px 0 14px}
.share-line svg{width:100%;max-width:760px;height:auto;display:block}
.share-line .sl-g{stroke:var(--border);stroke-width:1}
.share-line .sl-y{font:500 11px var(--body);fill:var(--muted)}
.share-line .sl-v{font:700 12px var(--body);fill:var(--text)}
#map1830{background:#F7F3E8}
/* read-more affordances */
.gl-list a{grid-template-columns:170px 1fr auto}
.gl-more{font:600 13px/1.4 var(--body);color:var(--accent);text-decoration:underline;text-underline-offset:3px;white-space:nowrap;align-self:center}
.sc-more{font:600 13px/1.3 var(--body);color:var(--accent);text-decoration:underline;text-underline-offset:3px;margin:8px 0 0}
.sec-group a{text-decoration:underline;text-decoration-color:var(--border2);text-underline-offset:3px}
.sec-group a:hover{text-decoration-color:var(--accent)}
@media (max-width:640px){.gl-list a{grid-template-columns:1fr}}
.share-line .sl-gap{font:italic 500 11px var(--body);fill:var(--muted)}
/* map play control */
.map-tools{display:flex;align-items:center;gap:14px;margin:-2px 0 12px}
.map-cap{font:500 14px/1.3 var(--body);color:var(--text-soft);min-height:1.3em}
.landmap.half.nomap{display:flex;align-items:center;justify-content:center;background:var(--surface2)}
.landmap.half.nomap p{margin:0;color:var(--muted)}
/* tree cover lost since 2001 */
.loss-line svg{max-width:760px}
.loss-line rect:hover{opacity:.75}
/* left-margin contents rail: one municipality, both pages; wide screens only */
.mtoc{display:none}
@media (min-width:1500px){
.mtoc{display:block;position:fixed;top:250px;left:calc(50% - var(--max)/2 - 188px);width:160px;font:400 12px/1.5 var(--body);color:var(--muted);max-height:calc(100vh - 270px);overflow:auto}
.mtoc-h{font:700 13px/1.3 var(--body);margin:0 0 8px}
.mtoc-h a{color:var(--text);text-decoration:none}
.mtoc-g{font:700 10.5px/1.3 var(--body);letter-spacing:.06em;text-transform:uppercase;color:var(--text-soft);margin:10px 0 2px}
.mtoc ul{list-style:none;margin:0;padding:0}
.mtoc li a{color:var(--muted);text-decoration:none;display:block;padding:1px 0}
.mtoc li a:hover{color:var(--accent);text-decoration:underline;text-underline-offset:3px}
.mtoc li.away a::after{content:" ·";color:var(--border2)}
.mtoc-k{font-size:10.5px;color:var(--muted);margin:10px 0 0}
}
@media print{.mtoc{display:none!important}}
/* the 1830 sheet, and the lightbox (pattern from 1890s.net zoom.js) */
.sheet{margin:16px 0 6px;max-width:760px}
.sheet a.zoom{display:block;background:#EFEBE1;border:1px solid var(--border);border-radius:8px;overflow:hidden;cursor:zoom-in}
.sheet img{display:block;width:100%;max-height:440px;object-fit:contain}
.sheet figcaption{font:400 13px/1.45 var(--body);color:var(--muted);margin-top:6px}
.sheet .credit{display:block;margin-top:2px}
.sheet .zoom-hint{display:block;color:var(--accent);font-weight:600;margin-top:2px}
#lb{position:fixed;inset:0;background:rgba(22,36,29,.96);z-index:80;display:flex;flex-direction:column}
#lb[hidden]{display:none}
.lb-stage{flex:1;overflow:hidden;position:relative;cursor:grab;touch-action:none}
.lb-stage img{position:absolute;left:0;top:0;transform-origin:0 0;max-width:none;user-select:none;-webkit-user-drag:none}
.lb-cap{color:#F3EFE4;font:400 15px/1.4 var(--body);max-width:900px;margin:0 auto;padding:12px 24px 2px;text-align:center}
.lb-hint{color:#B9C4BC;font:500 12px/1.3 var(--body);letter-spacing:.08em;text-transform:uppercase;text-align:center;margin:0 0 14px}
.lb-close{position:absolute;top:10px;right:16px;z-index:2;background:none;border:0;color:#F3EFE4;font-size:38px;cursor:pointer;line-height:1}
@media print{#lb{display:none!important}.sheet .zoom-hint{display:none}}

/* rare-species */
.guides{display:grid;grid-template-columns:1fr 1fr;gap:16px;margin-top:6px}
.card .guides + .small{margin-top:10px}
.gcard{display:flex;flex-direction:column;background:var(--surface);border:1px solid var(--border);border-radius:10px;padding:12px;text-decoration:none;color:var(--text)}
.gcard:hover{border-color:var(--border2)}
.gcard .gs{display:grid;grid-template-columns:repeat(5,1fr);gap:6px;height:92px;margin-bottom:12px}
.gcard .gs span{display:block;background:#F1E9CF;border-radius:6px;overflow:hidden;min-width:0}
.gcard .gs img{display:block;width:100%;height:100%;object-fit:cover;mix-blend-mode:multiply}
.gcard .gs img.ph{mix-blend-mode:normal}
.card .card-title + .guides{margin-top:0}
#guides .card-title{min-height:0;margin-bottom:16px}
.gcard b{display:block;font:700 19px/1.2 var(--display);min-height:23px}
.gcard .gd{display:block;font:400 15.5px/1.45 var(--body);color:var(--text-soft);margin-top:6px;min-height:68px}
.gcard .gn{display:block;font:700 15px/1.3 var(--body);color:var(--accent-dim);margin-top:auto;padding-top:10px}
.gcard:hover .gn{text-decoration:underline}
@media (max-width:760px){.guides{grid-template-columns:1fr}.gcard .gd{min-height:0}.gcard .gs{height:72px}}
.st-def{cursor:help;text-decoration:underline dotted;text-underline-offset:3px}
.has-desc{position:relative}
.st-what{white-space:nowrap}
@media (hover:hover) and (min-width:961px){.st-def:hover::after,.st-def:focus-visible::after{max-width:420px}.rare-wrap{contain:none;overflow:visible}}
.rare-head{font:500 22px/1.3 var(--display);letter-spacing:-.005em;color:var(--text);max-width:46ch;margin:4px 0 6px}
.card .rare-head{font-size:22px;color:var(--text);margin-top:4px}
.rare-strip{margin:0 0 4px}
.rare-strip b{font-weight:700;color:var(--text)}
.rare-wrap{margin-top:14px}
.rare-tab{table-layout:auto}
.rare-tab th,.rare-tab td{padding:8px 14px;font-size:16px;line-height:1.35}
.rare-tab thead th{position:static}
.rare-tab tr[hidden]{display:none}
.rare-tab.fold:not(.filtering) tr.hist{display:none}
.rare-tab td.gp{width:13em;white-space:nowrap;font-size:14px;color:var(--muted);line-height:1.3}
.rare-tab.is-sortable thead th{cursor:pointer;user-select:none}
.rare-tab.is-sortable thead th[aria-sort="ascending"]::after{content:" ↑";color:var(--accent)}
.rare-tab.is-sortable thead th[aria-sort="descending"]::after{content:" ↓";color:var(--accent)}
.rare-tab.is-sortable thead th:focus-visible{outline:2px solid var(--accent);outline-offset:-2px}
.rare-wrap + .rare-more-wrap{margin:12px 0 0}
.rare-filter-row{display:flex;align-items:center;gap:12px;margin:14px 0 6px}
.rare-filter-row .tbl-filter-input{flex:0 1 340px;font:inherit;font-size:15px;padding:8px 12px;border:1px solid var(--border2);border-radius:4px;background:var(--surface);color:inherit}
.rare-filter-row .tbl-filter-count{font-size:14px;color:var(--muted)}
.rare-filter-row + .rare-wrap{margin-top:8px}
.rare-tab td.nm{width:30%}
.rare-tab td.sci{font-style:italic;color:var(--muted)}
.rare-tab td.st{white-space:nowrap}
.rare-tab td.yr{white-space:nowrap;font-family:var(--mono);font-size:15px}
.rare-tab tr.hist td{color:var(--muted)}
.rare-tab tr.hist td.yr{font-family:var(--body);font-size:15px}
.rare-tab .eb{display:block;font:400 12.5px/1.3 var(--body);color:var(--muted);margin-top:2px}
a.sp{color:var(--text);font-weight:600;text-decoration:underline;text-decoration-color:var(--border2);text-underline-offset:3px}
a.sp:hover,a.sp:focus-visible{color:var(--accent);text-decoration-color:var(--accent);outline:none}
.rare-tab tr.hist a.sp{color:var(--text-soft);font-weight:500}
.rare-more{appearance:none;background:none;border:0;margin:0;cursor:pointer;font:600 15px/1.3 var(--body);color:var(--accent);text-decoration:underline;text-underline-offset:3px;padding:4px 0}
.rare-more:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
.card .rare-note{font-size:17px;color:var(--text-soft);max-width:72ch;margin-top:14px}
.sp-card{position:absolute;z-index:60;width:320px;background:var(--surface);border:1px solid var(--border2);border-radius:10px;box-shadow:0 10px 30px rgba(22,36,29,.2);overflow:hidden;font-family:var(--body)}
.sp-card[hidden]{display:none}
.sp-img{position:relative;width:320px;height:200px;background:#F1E9CF}
.sp-img img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;display:block;opacity:0;transition:opacity .2s}
.sp-img img.on{opacity:1}
.sp-ph{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;padding:0 18px}
.sp-ph b{font:300 27px/1.15 var(--display);color:var(--text);letter-spacing:-.01em}
.sp-ph i{font:italic 400 15px/1.3 var(--body);color:var(--muted);margin-top:8px}
.sp-body{padding:12px 14px 14px}
.sp-name{font:700 17px/1.25 var(--body);color:var(--text);margin:0}
.sp-sci{font:italic 400 14px/1.3 var(--body);color:var(--muted);margin:1px 0 0}
.sp-meta{font:500 13px/1.4 var(--body);color:var(--text-soft);margin:8px 0 0}
.sp-desc{font:400 14px/1.45 var(--body);color:var(--text);margin:8px 0 0}
.sp-go{display:inline-block;font:600 13px/1.3 var(--body);color:var(--accent);margin-top:10px}
@media (max-width:640px){
.rare-head{font-size:20px}
.rare-tab thead{position:absolute;left:-9999px}
.rare-tab,.rare-tab tbody{display:block}
.rare-tab tr{display:flex;flex-wrap:wrap;align-items:baseline;column-gap:10px;row-gap:1px;padding:8px 14px;border-bottom:1px solid var(--border)}
.rare-tab tr::after{content:"";order:3;flex:0 0 100%;height:0}
.rare-tab td{display:block;padding:0;border:0;width:auto!important}
.rare-tab td.nm{order:1}.rare-tab td.sci{order:2;flex:1 1 12em}
.rare-tab td.gp{order:4;flex:0 0 auto;white-space:nowrap;font-size:13px;line-height:1.25;color:var(--muted)}
.rare-tab td.st{order:5;font-size:14px;color:var(--text-soft)}.rare-tab td.yr{order:6;font-size:14px;margin-left:auto}
.rare-tab tr.hist td.st{color:var(--muted)}
.rare-filter-row{flex-wrap:wrap}
.sp-card{width:min(320px,calc(100vw - 16px))}
.sp-img{width:100%}
}
@media print{.sp-card,.rare-filter-row,.rare-more-wrap{display:none!important}}

/* Climate card (8 Nov 2026): tables and one-line facts on the town Land pages */
.card-climate .cl-lede{font:500 22px/1.3 var(--display);letter-spacing:-.005em;color:var(--text);max-width:52ch;margin:6px 0 4px}
.card-climate .cl-line{font:400 18px/1.5 var(--body);color:var(--text-soft);max-width:74ch;margin:14px 0 0}
.card-climate .cl-line b{font-weight:700;color:var(--text)}
.card-climate .cl-r{display:block;font:400 14px/1.35 var(--body);color:var(--muted);margin-top:2px}
.card-climate .cl-nd{color:var(--muted)}
.card-climate .cl-list{margin:6px 0 0 22px;font:400 18px/1.5 var(--body);color:var(--text-soft);max-width:74ch}
.card-climate .cl-list li{margin:3px 0}
.card-climate .cl-list .cl-r{display:inline;margin-left:6px}
.card-climate .cl-src{margin-top:12px}
.card-climate .cl-caveat{margin-top:30px;font-size:16px}
.card-climate table.cl-tab{font-size:17px}
.card-climate table.cl-tab caption{text-align:left;font:600 15px/1.35 var(--body);color:var(--muted);padding:10px 12px 8px}
.card-climate table.cl-tab td:first-child{min-width:170px}
.card-climate table.cl-tab tr.total td{border-top:1px solid var(--border2)}
.card-climate .cl-wrap{margin-top:14px}

/* folds and rare-species highlights (8 Nov 2026): the town money pages' fold style (web/src/style.css .fold), with a ▸/▾ marker and a phone-size tap target */
details.fold{margin:12px 0}
details.fold>summary{list-style:none;cursor:pointer;display:flex;align-items:center;gap:10px;min-height:48px;font:500 16px/1.4 var(--body);color:var(--text);padding:10px 14px;border:1px solid var(--border);border-radius:8px;background:var(--surface);-webkit-tap-highlight-color:transparent}
details.fold>summary::-webkit-details-marker{display:none}
details.fold>summary::before{content:"▸";flex:none;width:1.1em;font-size:18px;line-height:1;color:var(--accent)}
details.fold[open]>summary::before{content:"▾"}
details.fold>summary:hover{border-color:var(--border2)}
details.fold>summary:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
details.fold .fold-k{font-weight:700;color:var(--accent)}
details.fold .k-hide,details.fold[open] .k-show{display:none}
details.fold[open] .k-hide{display:inline}
details.fold>.table-wrap,details.fold>.rare-filter-row{margin-top:12px}
details.fold>.cl-wrap{margin-top:0}
.cl-fold>.sub:first-of-type{margin-top:18px}
.rare-hl{display:grid;grid-template-columns:repeat(2,1fr);gap:14px;list-style:none;margin:18px 0 6px;padding:0}
.rare-hl li{display:flex;min-width:0}
a.hl{position:relative;display:block;width:100%;height:112px;padding:10px 12px 10px 124px;box-sizing:border-box;background:var(--surface);border:1px solid var(--border);border-radius:10px;overflow:hidden;color:var(--text);text-decoration:none}
a.hl:hover,a.hl:focus-visible{border-color:var(--border2)}
a.hl:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
a.hl .hl-img{position:absolute;left:0;top:0;bottom:0;width:112px;background:#F1E9CF;overflow:hidden}
a.hl img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;display:block}
a.hl .hl-name,a.hl .hl-st{display:-webkit-box;-webkit-box-orient:vertical;overflow:hidden;-webkit-line-clamp:2;line-clamp:2}
a.hl .hl-name{font:700 17px/1.25 var(--body)}
a.hl .hl-sci{display:block;font:italic 400 14px/1.3 var(--body);color:var(--muted);margin-top:2px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
a.hl .hl-st{font:500 14px/1.35 var(--body);color:var(--text-soft);margin-top:4px}
a.hl:hover .hl-name{text-decoration:underline}
@media (max-width:760px){.rare-hl{grid-template-columns:1fr;gap:10px}a.hl .hl-name{font-size:16px}}
@media print{details.fold>summary{display:none}details.fold:not([open])::details-content{content-visibility:visible;display:block}.rare-hl{grid-template-columns:repeat(2,1fr)}}

/* storm-record strips (8 Nov 2026): one strip per event type, one bar per year; HTML grid with one inline SVG per strip. Same block in land/mock/mock.css and web/src/style.css. */
.st-fig{margin:18px 0 0;max-width:780px}
.st-title{margin:0 0 10px;font:600 17px/1.35 var(--body);color:var(--text)}
.st-row{display:grid;grid-template-columns:210px minmax(0,1fr) 60px;column-gap:12px;align-items:center;height:42px}
.st-hrow{height:24px;font:600 14px/1 var(--body);color:var(--muted)}
.st-hrow .st-l,.st-hrow .st-t{font:600 14px/1 var(--body);color:var(--muted)}
.st-mrow{height:24px}
.st-arow{height:28px}
.st-l{margin:0;font:400 16px/1.2 var(--body);color:var(--text)}
.st-t{margin:0;text-align:right;font:400 16px/1 var(--mono);color:var(--text)}
.st-bars{position:relative;min-width:0;height:34px}
.st-hbars{height:auto}
.st-mrow .st-bars{height:24px}
.st-arow .st-bars{height:28px}
.st-svg{display:block;width:100%;height:34px}
.st-bar rect{fill:var(--accent)}
.st-bar-oth rect{fill:#B9B09A}
.st-base{stroke:var(--border2);stroke-width:1}
.st-rev{stroke:var(--muted);stroke-width:1;stroke-dasharray:2 2}
.st-mk{position:absolute;top:0;left:var(--x);max-width:calc(100% - var(--x));height:100%;padding-left:6px;border-left:1px dashed var(--muted);font:400 14px/1.3 var(--body);color:var(--muted)}
.st-tk{position:absolute;top:6px;transform:translateX(-50%);font:400 14px/1.2 var(--body);color:var(--muted)}
.st-tk::before{content:"";position:absolute;left:50%;top:-6px;height:5px;border-left:1px solid var(--border2)}
.st-tk-first{left:0 !important;transform:none}
.st-tk-first::before{left:0}
.st-tk-last{left:100% !important;transform:translateX(-100%)}
.st-tk-last::before{left:auto;right:0}
.st-scale,.st-cap{margin:8px 0 0;font:400 15px/1.45 var(--body);color:var(--muted);max-width:64ch}
.st-line{margin:16px 0 0;font:400 18px/1.5 var(--body);color:var(--text-soft);max-width:74ch}
.st-line b{font-weight:700;color:var(--text)}
.st-note{margin:8px 0 0;font:400 15px/1.45 var(--body);color:var(--muted);max-width:74ch}
@media (max-width:560px){
  .st-row{grid-template-columns:minmax(0,1fr) auto;grid-template-areas:"l t" "b b";row-gap:2px;height:auto;margin-top:10px}
  .st-l{grid-area:l}.st-t{grid-area:t}.st-bars{grid-area:b}
  .st-hrow{display:none}
  .st-mrow,.st-arow{grid-template-areas:"b b";margin-top:0}
  .st-mrow .st-l,.st-mrow .st-t,.st-arow .st-l,.st-arow .st-t{display:none}
  .st-mrow{height:40px;margin-top:6px}
  .st-mrow .st-bars{height:40px}
  .st-tk-first{color:transparent}
  .st-arow{height:28px}
  .st-mk{font-size:14px}
}

/* climate card visuals (8 Nov 2026): .vz-* charts (inline SVG, wide and narrow drawings) and .hz-* hazard map. Same block in eco_cloud/mock/mock.css. */
.vz{margin:16px 0 0;max-width:780px}
.vz-title{margin:0 0 8px;font:600 17px/1.35 var(--body);color:var(--text)}
.vz-wrap{width:100%}
.vz-svg{display:block;width:100%;height:auto;overflow:visible}
.vz-n{display:none}
@media (max-width:720px){.vz-w{display:none}.vz-n{display:block;max-width:520px}}
.vz-t{font-family:var(--body);font-size:14px;fill:var(--muted)}
.vz-n .vz-t{font-size:12.5px}
.vz-ty{fill:var(--muted)}
.vz-lab{fill:var(--text);font-weight:600}
.vz-axt{fill:var(--muted)}
.vz-sub{fill:var(--muted);font-size:12.5px}
.vz-n .vz-sub{font-size:11px}
.vz-val{fill:var(--text);font-weight:600}
.vz-endl{fill:var(--text);font-weight:600;font-size:13px}
.vz-n .vz-endl{font-size:11.5px}
.vz-grid{stroke:var(--border);stroke-width:1}
.vz-base{stroke:var(--border2);stroke-width:1}
.vz-bar{fill:var(--accent)}
.vz-rec{fill:#B5470B}
.vz-obs{fill:none;stroke:#51625A;stroke-width:1.2}
.vz-obsdot{fill:#51625A}
.vz-trend{stroke:#16241D;stroke-width:2}
.vz-band{fill:#1F6FA8;fill-opacity:.22;stroke:none}
.vz-int{fill:none;stroke:#1F6FA8;stroke-width:2.2}
.vz-bound{stroke:var(--muted);stroke-width:1;stroke-dasharray:4 3}
.vz-nodata{fill:var(--border);fill-opacity:.55}
.vz-ndt{fill:var(--text);font-weight:600;paint-order:stroke;stroke:var(--border);stroke-width:4px;stroke-linejoin:round}
.vz-rng{stroke-width:2.4}
.vz-s45{stroke:#1F6FA8;fill:#1F6FA8}
.vz-s85{stroke:#B5470B;fill:#B5470B}
.vz-s0{stroke:#51625A;fill:#51625A}
.vz-dot{stroke:#fff;stroke-width:1.2}
.vz-ap{fill:#A9C7B5}
.vz-sp{fill:#0A5C33}
.vz-snow{fill:none;stroke:#1F6FA8;stroke-width:2}
.vz-snowdot{fill:#1F6FA8;stroke:#fff;stroke-width:1}
.vz-tys{fill:#1F6FA8}
.vz-mk{fill:#7B4B94}
.vz-mk0{fill:#C6BDA8}
.vz-mkt{fill:#fff;font-weight:700;font-size:11px}
.vz-n .vz-mkt{font-size:12.6px;letter-spacing:-.3px}
.vz-key{display:flex;flex-wrap:wrap;gap:4px 16px;margin:10px 0 0;font:400 15px/1.35 var(--body);color:var(--text-soft)}
.vz-k{display:inline-flex;align-items:center;gap:6px}
.vz-sw{display:inline-block;width:16px;height:10px;border-radius:2px}
.vz-sw-obs{background:#51625A;height:3px}.vz-sw-trend{background:#16241D;height:3px}.vz-sw-band{background:rgba(31,111,168,.28)}.vz-sw-int{background:#1F6FA8;height:3px}
.vz-sw-s45{background:#1F6FA8}.vz-sw-s85{background:#B5470B}
.vz-sw-ap{background:#A9C7B5}.vz-sw-sp{background:#0A5C33}.vz-sw-snow{background:#1F6FA8;height:3px}.vz-sw-mk{background:#7B4B94;border-radius:50%;width:12px;height:12px}
.vz-cap{margin:8px 0 0;font:400 15px/1.45 var(--body);color:var(--muted);max-width:74ch}
/* map */
.hz-fig{margin:16px 0 0;max-width:780px}
.hz-map{width:100%;height:440px;border:1px solid var(--border);border-radius:6px;background:#EEF0EA}
.hz-load{margin:0;padding:14px;font:400 16px/1.4 var(--body);color:var(--muted)}
.hz-tog{margin:10px 0 0;padding:0;border:0;display:flex;flex-wrap:wrap;gap:6px 16px;font:400 16px/1.4 var(--body);color:var(--text-soft)}
.hz-tog legend{padding:0;margin:0 0 4px;font:600 15px/1.35 var(--body);color:var(--text)}
.hz-tog label{display:inline-flex;align-items:center;gap:6px;min-height:32px;cursor:pointer}
.hz-sw-z{background:rgba(46,134,193,.45)}.hz-sw-z2{background:rgba(46,134,193,.16);box-shadow:inset 0 0 0 1px rgba(46,134,193,.45)}.hz-sw-t{background:#B5470B;height:4px}.hz-sw-m{background:#5B2A86;height:4px}.hz-sw-d{background:#1E7B34;height:4px}.hz-sw-o{background:#3B4252;height:4px}
.hz-sw-f{background:#16241D;border-radius:50%;width:12px;height:12px}.hz-sw-b{background:#C9840B;width:11px;height:11px;transform:rotate(45deg);border-radius:1px}.hz-sw-mc{background:rgba(142,68,173,.6)}
.hz-fac{display:block;width:16px;height:16px;border-radius:50%;background:#16241D;border:2px solid #fff;box-shadow:0 0 0 1px #16241D}
.hz-br{display:block;width:14px;height:14px;margin:1px;background:#C9840B;border:2px solid #fff;box-shadow:0 0 0 1px #6b4506;transform:rotate(45deg)}
.hz-tt{font:600 13px/1.2 var(--body);color:#16241D}
.hz-pm{color:#51625A;font-size:12px}
.leaflet-popup-content{font:400 14px/1.4 var(--body);color:#16241D}
@media (max-width:560px){.hz-map{height:360px}.vz-key{font-size:14px}}

/* 9 Nov 2026 (i): low water, drought declarations, reservoir levels, year strips for fire and declarations. Same block in eco_cloud/mock/mock.css. */
.vz-halo{paint-order:stroke;stroke:var(--surface);stroke-width:3.5px;stroke-linejoin:round}
.vz-ref{stroke:var(--text);stroke-width:1.5;stroke-dasharray:6 4}
.vz-gap{fill:var(--border);fill-opacity:.75}
.vz-zero{fill:var(--text)}
.vz-d13a{fill:#8DB2D8}.vz-d13b{fill:#4F83BC}.vz-d13c{fill:#1F4E85}
.vz-d19a{fill:#E9B94F}.vz-d19b{fill:#D6782A}.vz-d19c{fill:#9A340B}
.vz-sw.vz-d13a{background:#8DB2D8}.vz-sw.vz-d13b{background:#4F83BC}.vz-sw.vz-d13c{background:#1F4E85}
.vz-sw.vz-d19a{background:#E9B94F}.vz-sw.vz-d19b{background:#D6782A}.vz-sw.vz-d19c{background:#9A340B}
.vz-sw-d{width:18px;height:12px}
.vz-sw-d0{background:transparent;border:1px solid var(--border2)}
.vz-kg{font-weight:600;color:var(--text)}
.vz-mw{fill:none;stroke:#1F6FA8;stroke-width:1.8}
.vz-flag{fill:var(--surface);stroke:#B5470B;stroke-width:1.8}
.vz-sw-mw{background:#1F6FA8;height:3px}
.vz-sw-flag{background:transparent;border:2px solid #B5470B;border-radius:50%;width:11px;height:11px}
.card-climate a{text-decoration:underline;text-underline-offset:2px}
.card-climate .cl-wrap table.cl-tab td:first-child{min-width:0}
.card-climate .cl-sublist{margin:6px 0 0 22px;font:400 18px/1.5 var(--body);color:var(--text-soft);max-width:74ch}
.card-climate .cl-sublist li{margin:3px 0}
.card-climate .cl-h4{margin:18px 0 0;font:600 17px/1.35 var(--body);color:var(--text)}

/* 9 Nov 2026 (i2): narrow screens: dam and outage tables stack as cards; year strips keep their first label */
@media (max-width:560px){
  .st-fig-y .st-tk-first{color:var(--muted)}
  .card-climate table.cl-stack,.card-climate table.cl-stack tbody,.card-climate table.cl-stack tr,.card-climate table.cl-stack td{display:block;width:auto}
  .card-climate table.cl-stack thead{position:absolute;left:-9999px}
  .card-climate table.cl-stack tr{padding:10px 12px;border-top:1px solid var(--border2)}
  .card-climate table.cl-stack td{padding:2px 0;border:0;text-align:left}
  .card-climate table.cl-stack td:first-child{font-weight:700;min-width:0}
  .card-climate table.cl-stack td:not(:first-child)::before{content:attr(data-l) ": ";color:var(--muted)}
  .card-climate table.cl-stack td .cl-r{display:block;margin-left:0}
  .card-climate table.cl-stack caption{display:block;width:auto;padding:10px 0 6px}
  .card-climate table.cl-stack td{white-space:normal;font-family:var(--body);font-size:17px}
  .card-climate table.cl-stack td.num{text-align:left}
}

/* Town navigation (7 Nov 2026): Town / Money / Land / History / Officials under a town page's H1. One source: land/townnav/townnav.css. */
.tn { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 14px; position: relative; font-family: var(--body); }
.tn-i { position: relative; }
.tn-i > button { font: inherit; font-size: 16px; font-weight: 600; line-height: 1.2; padding: 9px 14px 9px 18px; min-height: 42px; border-radius: 999px; border: 1px solid var(--border2); background: transparent; color: var(--muted); cursor: pointer; display: inline-flex; align-items: center; gap: 9px; }
.tn-i > button::after { content: ""; width: 6px; height: 6px; border: solid currentColor; border-width: 0 2px 2px 0; transform: translateY(-2px) rotate(45deg); }
.tn-i.open > button::after { transform: translateY(1px) rotate(225deg); }
.tn-i > button:hover, .tn-i.open > button { border-color: var(--accent); color: var(--accent); }
.tn-i.on > button { background: var(--accent); border-color: var(--accent); color: #fff; }
.tn ul { display: none; position: absolute; z-index: 40; top: calc(100% + 6px); left: 0; min-width: 300px; max-width: min(400px, 92vw); 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); padding: 6px 0; }
.tn ul::before { content: ""; position: absolute; top: -8px; left: 0; right: 0; height: 8px; }
.tn-i.open > ul { display: block; }
.tn li a { display: block; padding: 9px 18px; font-size: 16px; font-weight: 400; line-height: 1.35; color: var(--muted); text-decoration: none; }
.tn li a:hover, .tn li a:focus-visible { background: var(--surface2); color: var(--text); text-decoration: none; }
.tn li.hd a { font-weight: 600; color: var(--accent); }
.tn:not(.js) { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.tn:not(.js) ul { display: block; position: static; box-shadow: none; border: 0; min-width: 0; padding: 0; }
.tn:not(.js) .tn-i > button { pointer-events: none; border-radius: 0; border: 0; padding-left: 0; }
.tn:not(.js) .tn-i > button::after { display: none; }
@media (max-width: 760px) { .tn-i { position: static; } .tn ul { left: 0; right: 0; min-width: 0; max-width: none; } .tn-i > button { padding: 10px 12px 10px 16px; } }
@media print { .tn { display: none !important; } }

/* "Weekly" joins the Commonwealth bar (14 Nov 2026): one line, no sideways scroll, from 961px up. Measured 961-1600px. */
@media (min-width: 961px) and (max-width: 1599px) {
  .cw-bar-inner { gap: 10px; }
  .cw-home, .cw-link { font-size: 13px; letter-spacing: 0.04em; }
  .cw-bar .jump { min-width: 160px; }
}
@media (min-width: 961px) and (max-width: 1199px) {
  .cw-bar-inner { gap: 8px; padding-left: 20px; padding-right: 20px; }
  .cw-home, .cw-link { font-size: 12px; letter-spacing: 0.02em; }
  .cw-bar .jump { min-width: 130px; }
}
