/* Layout: fixed side panel of controls beside a full-height map; stacks on phones. */
@font-face { font-family: 'Public Sans'; font-style: normal; font-weight: 100 900; font-display: swap; src: url(fonts/public-sans.woff2) format('woff2'); }
@font-face { font-family: 'Literata'; font-style: normal; font-weight: 200 900; font-display: swap; src: url(fonts/literata.woff2) format('woff2'); }
:root {
  --bg: #f4f5f2; --panel: #ffffff; --fg: #1a2433; --muted: #4a5361; --line: #dde1dc;
  --accent: #1f3a5f; --inside: #c2541b; --in-bg: #f3f5f8; --out-bg: #f6faf7; --out-line: #2f6f62; --warn: #b3261e; --walk: #2f6f62; --home: #1f3a5f; --home-bg: #e6edf6;
  --paper: #f5f1e8; --rule: #d9d3c4; --card: #ffffff; --slide: #6b7280; --shops: #6b3fa0;
  --display: 'Literata', Georgia, 'Times New Roman', serif;
  --body: 'Literata', Georgia, 'Times New Roman', serif;
  /* Small all-caps labels stay in a plain sans-serif, which reads crisper at 11–14px. */
  --label: 'Public Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme=light]) { --bg: #181613; --panel: #1f1c18; --fg: #ede7dc; --muted: #b8af9f; --line: #3a352e; --accent: #7fa6d6; --home: #9dbbe2; --home-bg: #2b2722; --inside: #e8834f; --in-bg: #26231f; --out-bg: #22251f; --out-line: #8cc4a8; --warn: #e3a857; --paper: #26221d; --rule: #3a352e; --card: #221f1b; --slide: #a8a092; --shops: #b892e0; color-scheme: dark; }
}
:root[data-theme=dark] { --bg: #181613; --panel: #1f1c18; --fg: #ede7dc; --muted: #b8af9f; --line: #3a352e; --accent: #7fa6d6; --home: #9dbbe2; --home-bg: #2b2722; --inside: #e8834f; --in-bg: #26231f; --out-bg: #22251f; --out-line: #8cc4a8; --warn: #e3a857; --paper: #26221d; --rule: #3a352e; --card: #221f1b; --slide: #a8a092; --shops: #b892e0; color-scheme: dark; }
:root[data-theme=light] { color-scheme: light; }
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body { background: var(--bg); color: var(--fg); font: 16px/1.5 var(--body); }
.app { --panel-w: 460px; display: grid; grid-template-columns: var(--panel-w) 6px 1fr; height: 100%; }
.resizer { cursor: col-resize; background: var(--line); touch-action: none; }
.resizer:hover, .resizer.dragging { background: var(--accent); }
body.resizing { user-select: none; cursor: col-resize; }
.panel { background: var(--panel); border-right: 1px solid var(--line); overflow-y: auto; padding: 20px 20px 28px; display: grid; gap: 18px; align-content: start; }
.mapwrap { position: relative; min-height: 0; }
#map { position: absolute; inset: 0; }
.brand h1 { font-family: var(--display); font-weight: 600; font-size: 26px; margin: 0; letter-spacing: -0.01em; }
.brand .sub { margin: 4px 0 0; color: var(--muted); }
.block { display: grid; gap: 8px; }
.lbl { font-size: 15px; font-weight: 600; color: var(--fg); }
select, input[type=number] { font: inherit; padding: 7px 9px; border: 1px solid var(--line); border-radius: 6px; background: var(--panel); color: var(--fg); }
input[type=number] { width: 6.5em; }
.seg { display: flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.seg button { flex: 1; font: inherit; font-size: 13px; padding: 8px 6px; border: 0; background: transparent; color: var(--fg); cursor: pointer; }
.seg button + button { border-left: 1px solid var(--line); }
.seg button[aria-pressed=true] { background: var(--accent); color: var(--panel); font-weight: 600; }
.slider { display: flex; align-items: center; gap: 10px; }
.slider input { flex: 1; accent-color: var(--accent); }
.slider output { min-width: 5.5em; text-align: right; font-variant-numeric: tabular-nums; }
.chips { display: flex; gap: 6px; }
.chips button { font: inherit; font-size: 13px; padding: 4px 10px; border: 1px solid var(--line); border-radius: 999px; background: transparent; color: var(--fg); cursor: pointer; }
.chips button[aria-pressed=true] { border-color: var(--accent); color: var(--accent); font-weight: 600; }
.btn { font: inherit; font-size: 13px; padding: 6px 10px; border-radius: 6px; border: 1px solid var(--accent); background: var(--accent); color: var(--panel); cursor: pointer; }
.btn.ghost { background: transparent; color: var(--accent); }
.btn:disabled { opacity: .45; cursor: default; }
button:focus-visible, select:focus-visible, input:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.row.between { justify-content: space-between; }
.hint { margin: 0; color: var(--muted); font-size: 13.5px; }
.cap { color: var(--muted); font-size: 13px; }
.result { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 14px 0; }
.big { font-family: var(--display); font-size: 48px; line-height: 1; font-variant-numeric: tabular-nums; }
.big.loading { opacity: .4; }
.note { font-size: 13px; }
.status { font-size: 13px; color: var(--inside); }
.tbl { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 12.5px; font-variant-numeric: tabular-nums; }
th, td { text-align: left; padding: 5px 5px; border-bottom: 1px solid var(--line); white-space: nowrap; }
th { color: var(--muted); font-weight: 600; }
th .sort { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; white-space: nowrap; }
th .sort:hover { color: var(--fg); }
th[aria-sort=ascending] .sort, th[aria-sort=descending] .sort { color: var(--fg); }
.num { text-align: right; }
tr.home td, tr.home th { font-weight: 700; color: var(--home); }
tr.home { background: var(--home-bg); }
.restaurant { display: grid; gap: 6px; }
.kv { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px 10px; font-size: 13px; }
.kv b { font-variant-numeric: tabular-nums; text-align: right; margin-left: auto; }
.foot { color: var(--muted); font-size: 12px; }
.foot a { color: inherit; }
.legend { position: absolute; left: 12px; bottom: 12px; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; display: flex; flex-wrap: wrap; gap: 12px; font-size: 12px; }
.legend .dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 5px; vertical-align: -1px; }
.legend .dot.in { background: var(--inside); }
.legend .dot.out { background: #8a8f98; opacity: .6; }
.legend .dot.lost { background: #7b4fc9; }
.legend .ring { display: inline-block; width: 14px; height: 0; border-top: 2px dashed var(--walk); margin-right: 5px; vertical-align: 3px; }
.legend .sq { display: inline-block; width: 14px; height: 3px; background: var(--walk); margin-right: 5px; vertical-align: 3px; }
@media (max-width: 1023px) {
  .app { grid-template-columns: 1fr; grid-template-rows: 55vh auto; height: auto; }
  .resizer { display: none; }
  .mapwrap { grid-row: 1; height: 55vh; }
  .panel { grid-row: 2; border-right: 0; }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; } }

.lost-btn { border-color: #7b4fc9; color: #7b4fc9; }
.lost-btn[aria-pressed=true] { background: #7b4fc9; color: #fff; }

/* collapsible tool sections */
.tool { border-top: 1px solid var(--line); padding-top: 10px; }
.tool > summary { cursor: pointer; font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; font-family: var(--label); color: var(--muted); list-style: none; display: flex; align-items: center; gap: 6px; }
.tool > summary::before { content: '▸'; font-size: 11px; transition: transform .15s; }
.tool[open] > summary::before { transform: rotate(90deg); }
.tool > summary::-webkit-details-marker { display: none; }
.tool[open] > summary { margin-bottom: 10px; color: var(--fg); }
.tool > * + * { margin-top: 8px; }
.form { display: grid; grid-template-columns: 1fr 7em; gap: 6px 10px; align-items: center; font-size: 13px; }
.form input { width: 100%; }
/* side-by-side maps */
#map2 { position: absolute; top: 0; bottom: 0; right: 0; left: 50%; border-left: 2px solid var(--panel); }
.mapwrap.split #map { right: 50%; }
.maplabel { position: absolute; top: 10px; left: 10px; background: var(--panel); border: 1px solid var(--line); border-radius: 6px; padding: 4px 8px; font-size: 13px; font-weight: 600; }
.maplabel.right { left: calc(50% + 10px); }
/* print sheet */
#printSheet { display: none; }
@media print {
  @page { size: letter; margin: 0.5in; }
  body { background: #fff; color: #111; }
  .app { display: none !important; }
  #printSheet { display: block; font: 11pt/1.4 var(--body); color: #111; }
  #printSheet h1 { font-family: var(--display); font-size: 20pt; margin: 0 0 2pt; }
  #printSheet .sub { color: #444; margin: 0 0 8pt; }
  #printSheet .nums { display: flex; gap: 18pt; margin: 6pt 0 8pt; }
  #printSheet .nums b { display: block; font-family: var(--display); font-size: 22pt; }
  #printSheet .maps { display: flex; gap: 6pt; }
  #printSheet .maps img { width: 100%; max-height: 4.2in; object-fit: cover; border: 1px solid #ccc; }
  #printSheet table { font-size: 9pt; }
  #printSheet .small { font-size: 8pt; color: #444; }
}
.legend .dot.gained { background: #e0a100; }
.legend .sq.g0 { background: #0b4f9c; } .legend .sq.g1 { background: #3b86d1; } .legend .sq.g2 { background: #9cc3ea; }
.legend .box { display: inline-block; width: 12px; height: 10px; background: rgba(91,107,130,.35); border: 1px solid #5b6b82; margin-right: 5px; vertical-align: -1px; }
.garage-pin { width: 24px; height: 24px; border-radius: 4px; background: #0b4f9c; color: #fff; font: 700 14px/24px var(--body); text-align: center; border: 2px solid #fff; box-shadow: 0 1px 3px rgba(0,0,0,.4); }
.chips.wrap { flex-wrap: wrap; }
textarea { font: inherit; font-size: 13px; width: 100%; padding: 7px 9px; border: 1px solid var(--line); border-radius: 6px; background: var(--panel); color: var(--fg); resize: vertical; }
input[type=text] { font: inherit; padding: 7px 9px; border: 1px solid var(--line); border-radius: 6px; background: var(--panel); color: var(--fg); }
@media print { #printSheet .notes { white-space: pre-wrap; border-left: 3px solid #999; padding-left: 8pt; } #printSheet .by { font-size: 9pt; color: #333; } }
.legend .sq.net { background: repeating-linear-gradient(90deg, #7a5c00 0 4px, transparent 4px 6px); opacity: .7; }

/* ---- v17: inputs vs. results, Basic/Advanced, accessibility ---- */
body.basic [data-adv] { display: none !important; }
.sr { position: absolute; top: 0; left: 0; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 10; background: var(--accent); color: var(--panel); padding: 8px 12px; border-radius: 6px; }
.skip:focus { left: 8px; }
.ui-row { margin-top: 10px; }
.seg.small button { font-size: 13px; padding: 6px 14px; }
.seg.small { flex: 0 0 auto; }
.group { display: grid; gap: 14px; padding: 14px; border-radius: 10px; }
.group.inputs { background: var(--in-bg); border: 1px solid var(--line); }
.group.outputs { background: var(--out-bg); border: 1px solid var(--line); border-left: 4px solid var(--out-line); }
.group.outputs:focus { outline: none; }
.group.whatif, .group.share { border: 1px dashed var(--line); }
.group-h { margin: 0; font-family: var(--display); font-weight: 600; font-size: 19px; display: flex; align-items: center; gap: 8px; }
.step { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--accent); color: var(--panel); font: 600 13px/1 var(--body); flex: none; }
.outputs .step { background: var(--out-line); }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 12px; }
.card.tool { padding-top: 10px; }
.result.card { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 14px 12px; display: grid; gap: 6px; }
.sentence { margin: 2px 0 0; font-size: 16px; font-weight: 500; }
div.outbox { border-left: 3px solid var(--out-line); background: var(--out-bg); padding: 8px 10px; border-radius: 0 6px 6px 0; display: grid; gap: 6px; font-size: 13px; }
div.outbox p { margin: 0; }
.out-tag { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; font-family: var(--label); color: var(--out-line); }
fieldset.cols { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 13px; }
fieldset.cols legend { font-size: 12px; color: var(--muted); padding: 0; margin-bottom: 4px; width: 100%; }
label.chk { display: inline-flex; align-items: center; gap: 5px; cursor: pointer; min-height: 28px; }
label.chk input { width: 16px; height: 16px; accent-color: var(--accent); margin: 0; }
td.basis { font-weight: 700; }
td.dim { color: var(--muted); font-style: italic; }
td.off { font-weight: 700; }
tr.grp th { padding-top: 10px; color: var(--fg); font-size: 12px; text-transform: uppercase; font-family: var(--label); letter-spacing: .05em; }
tbody th { font-weight: 400; text-align: left; }
.maptip { position: absolute; top: 12px; left: 50%; transform: translateX(-50%); background: var(--accent); color: var(--panel); padding: 8px 14px; border-radius: 999px; font-size: 14px; font-weight: 500; box-shadow: 0 2px 8px rgba(0,0,0,.25); z-index: 3; max-width: calc(100% - 24px); text-align: center; }
.adv-notice { font-size: 13px; background: var(--in-bg); border-radius: 6px; padding: 6px 8px; }
.linklike { font: inherit; color: var(--accent); background: none; border: 0; padding: 0; text-decoration: underline; cursor: pointer; }
/* Bigger, easier targets */
.seg button, .chips button, .btn { min-height: 36px; }
body.basic .seg button { min-height: 42px; font-size: 14px; }
/* Larger text: scales the whole panel */
body.big-text .panel { zoom: 1.25; }
body.big-text .legend, body.big-text .maptip { font-size: 15px; }
@media print { #printSheet h2 { font-family: var(--display); font-size: 13pt; margin: 10pt 0 3pt; } #printSheet table { margin-bottom: 3pt; } #printSheet td.off { font-weight: 700; } #printSheet tr.grp th { font-weight: 700; } }
.panel { grid-template-columns: minmax(0, 1fr); position: relative; overscroll-behavior: contain; overflow-x: clip; }
.group, .card, .block, .tool { min-width: 0; }
.group { grid-template-columns: minmax(0, 1fr); }

/* ---- v17 review fixes ---- */
summary h3 { display: inline; font: inherit; margin: 0; }
.tool > summary { min-height: 36px; padding: 6px 0; font-size: 12.5px; }
th .sort { padding: 6px 2px; min-height: 30px; }
tbody th[scope=row] { white-space: normal; min-width: 8em; }
#sideTable td, #slideCheck td { white-space: nowrap; }
.callout { margin: 0; font-size: 15px; background: var(--home-bg); border-radius: 6px; padding: 8px 10px; }
.callout b { font-family: var(--display); font-size: 20px; }
input.wide { width: 100%; }
.answer-bar { position: sticky; top: -20px; z-index: 4; margin: -20px -20px 0; padding: 8px 20px; background: var(--accent); color: var(--panel); font-size: 13.5px; box-shadow: 0 2px 6px rgba(0,0,0,.18); }
.answer-bar b { font-family: var(--display); font-size: 18px; }
.legend .dot.outside { background: #8a8f98; opacity: .6; }
.cmp-foot { font-size: 12px; }
@media (pointer: coarse) {
  th .sort { padding: 12px 4px; }
  .tool > summary { min-height: 44px; }
  .btn, .seg button, .chips button { min-height: 44px; }
  label.chk { min-height: 40px; }
  input[type=range] { height: 32px; }
}
@media (max-width: 1023px) {
  .legend { font-size: 11px; gap: 4px 10px; padding: 4px 8px; left: 6px; right: 6px; bottom: 6px; max-height: 3.4em; overflow: auto; }
  .mapwrap.split #map { right: 0; bottom: 50%; }
  #map2 { left: 0; top: 50%; border-left: 0; border-top: 2px solid var(--panel); }
  .maplabel.right { left: 10px; top: calc(50% + 10px); }
  .panel { overflow-y: visible; }
  .answer-bar { top: 0; margin: -20px -20px 0; }
}
.answer-bar { cursor: pointer; } .answer-bar .go { text-decoration: underline; white-space: nowrap; }
#compare td.vs { white-space: normal; min-width: 4.5em; } #compare th .sort { white-space: normal; text-align: inherit; }
/* ---- v18 ---- */
.seg button small { display: block; font-size: 11.5px; font-weight: 400; font-style: italic; opacity: .85; margin-top: 1px; }
.switch { font: inherit; font-size: 13px; display: inline-flex; align-items: center; gap: 8px; background: none; border: 0; color: var(--fg); cursor: pointer; padding: 6px 4px; min-height: 36px; }
.switch .knob { width: 34px; height: 20px; border-radius: 999px; background: var(--line); position: relative; flex: none; transition: background .15s; }
.switch .knob::after { content: ''; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.3); transition: left .15s; }
.switch[aria-checked=true] .knob { background: var(--accent); }
.switch[aria-checked=true] .knob::after { left: 16px; }
.switch:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
tr.home td.off, td.off { font-weight: 700; }
.mapwrap.split #map .maplibregl-ctrl-attrib { display: none; }
.loading-pill { position: absolute; left: 50%; bottom: 56px; transform: translateX(-50%); background: var(--panel); color: var(--fg); border: 1px solid var(--line); border-radius: 999px; padding: 8px 14px; font-size: 14px; display: flex; align-items: center; gap: 8px; box-shadow: 0 2px 10px rgba(0,0,0,.18); z-index: 3; }
.loading-pill[hidden] { display: none; }
.spin { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--line); border-top-color: var(--accent); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spin { animation-duration: 2.4s; } }
.btn.busy { opacity: .7; cursor: progress; }
/* rank chart: two small multiples, each scaled to its own top town */
.rankchart { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 4px; }
.rankchart h4 { margin: 0 0 2px; font-size: 12.5px; font-weight: 600; }
.rankchart .sub { font-size: 11.5px; color: var(--muted); margin: 0 0 6px; }
.rankchart .bar { display: grid; grid-template-columns: 6.6em 1fr; align-items: center; gap: 6px; font-size: 11.5px; height: 18px; }
.rankchart .bar .nm { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--muted); }
.rankchart .bar .track { position: relative; height: 12px; }
.rankchart .bar .fill { position: absolute; left: 0; top: 0; bottom: 0; background: #b9c0c9; border-radius: 0 4px 4px 0; }
.rankchart .bar .val { position: absolute; top: -1px; font-size: 11px; color: var(--muted); white-space: nowrap; padding-left: 4px; font-variant-numeric: tabular-nums; }
.rankchart .bar.home .nm, .rankchart .bar.home .val { color: var(--home); font-weight: 700; }
.rankchart .bar.home .fill { background: var(--home); }
@media (prefers-color-scheme: dark) { :root:not([data-theme=light]) .rankchart .bar .fill { background: #4a525d; } }
:root[data-theme=dark] .rankchart .bar .fill { background: #4a525d; }
@media (max-width: 420px) { .rankchart { grid-template-columns: 1fr; } }
@media (pointer: coarse) {
  select, input[type=number], input[type=text], .switch, label.chk, th .sort { min-height: 44px; }
  input[type=range] { height: 44px; }
  .maplibregl-ctrl-group button { width: 44px !important; height: 44px !important; }
  .maplibregl-ctrl-attrib-button { width: 44px !important; height: 44px !important; background-repeat: no-repeat !important; background-position: center !important; } /* one "i", not a tiled grid */
}
.warn { margin: 0 0 6px; color: var(--warn); font-size: 13px; }
@media (pointer: coarse) { .seg button, .chips button, .btn, th .sort, .linklike { min-width: 44px; } }
/* ---- v20: section headers are clear accordion buttons on every browser (WebKit ignores display:flex on <summary>) ---- */
.tool > summary { display: block; position: relative; padding: 10px 76px 10px 0; min-height: 44px; line-height: 1.35; }
.tool > summary::before { content: ''; display: inline-block; width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(-45deg); margin: 0 10px 2px 2px; vertical-align: middle; transition: transform .15s; }
.tool[open] > summary::before { transform: rotate(45deg); }
.tool > summary::after { content: 'Show'; position: absolute; right: 0; top: 50%; transform: translateY(-50%); font-size: 12px; font-weight: 600; letter-spacing: 0; text-transform: none; color: var(--accent); border: 1px solid var(--accent); border-radius: 999px; padding: 3px 12px; }
.tool[open] > summary::after { content: 'Hide'; }
.tool > summary:hover::after { background: var(--accent); color: var(--panel); }
summary::marker { content: ''; }
@media print { .tool > summary::after { display: none; } }
@media print {
  #printSheet .ps { break-inside: avoid; page-break-inside: avoid; margin-bottom: 8pt; }
  #printSheet .settings-page { break-before: page; page-break-before: always; }
  #printSheet table.settings { width: 100%; border-collapse: collapse; }
  #printSheet table.settings { table-layout: fixed; }
  #printSheet table.settings th { text-align: left; width: 1.9in; vertical-align: top; padding: 2pt 8pt 2pt 0; font-weight: 600; white-space: normal; }
  #printSheet table.settings td { padding: 2pt 0; white-space: normal; overflow-wrap: anywhere; }
  #printSheet table.settings tr { border-bottom: 1px solid #ddd; }
  #printSheet .reopen { display: flex; gap: 12pt; align-items: flex-start; margin-top: 10pt; }
  #printSheet .reopen .qr { width: 1.4in; height: 1.4in; image-rendering: pixelated; flex: none; }
  #printSheet .reopen .link { font-size: 8pt; word-break: break-all; font-family: ui-monospace, Menlo, monospace; }
  #printSheet h2 { break-after: avoid; page-break-after: avoid; }
  #printSheet .maps.one img { max-height: 5in; }
  #printSheet .maps img { width: 50%; }
  #printSheet .maps.one img { width: 100%; }
}
@media (pointer: coarse) { #dataTool a, .foot a { display: inline-block; min-height: 44px; line-height: 44px; } }
#csvButtons { flex-wrap: wrap; }
/* ---- v28 ---- */
.map-close { position: absolute; top: 10px; right: 56px; z-index: 3; font: inherit; font-size: 13px; font-weight: 600; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--panel); color: var(--fg); cursor: pointer; box-shadow: 0 1px 4px rgba(0,0,0,.2); }
.map-close:hover { background: var(--accent); color: var(--panel); }
.total-space { margin: 0; font-size: 14px; background: var(--in-bg); border-radius: 6px; padding: 6px 10px; }
.group-h .group-toggle { all: unset; display: flex; align-items: center; gap: 8px; width: 100%; cursor: pointer; }
.group-h .group-toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.group-h .chev { margin-left: auto; font-size: 12px; font-family: var(--body); font-weight: 600; color: var(--accent); border: 1px solid var(--accent); border-radius: 999px; padding: 2px 10px; }
body.basic .group-h .chev { display: none; }
body.basic .group-h .group-toggle { cursor: default; }
body.adv .group.collapsed > :not(.group-h) { display: none !important; }
@media (max-width: 1023px) { .map-close { right: 10px; top: auto; bottom: calc(50% + 10px); } }
#luTable .sep { border-left: 2px solid var(--line); }
#luTable .tot { border-left: 2px solid var(--fg); font-weight: 700; }
#luTable th .sort { white-space: normal; text-align: inherit; }
@media (pointer: coarse) { .group-h .group-toggle { min-height: 44px; } }
@media (pointer: coarse) { .map-close { min-height: 44px; } } .chips[role=group] { flex-wrap: wrap; }

/* saved settings */
.saved { list-style: none; padding: 0; margin: 6px 0 0; display: grid; gap: 8px; }
.saved li { border: 1px solid var(--line, #ddd); border-radius: 6px; padding: 8px 10px; }
.saved li.hint { border: 0; padding: 0; }
.saved li b { display: block; }
.saved .row { margin-top: 6px; gap: 8px; }

/* start-over picker and the slide check's fixed-method note */
.preset-pick { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.preset-pick label { font-size: 14px; color: var(--muted); }
.preset-pick select { max-width: 100%; font: inherit; padding: 4px 6px; }
.fixed-note { margin: 6px 0; padding: 8px 10px; border-left: 4px solid var(--accent); background: var(--in-bg); font-size: 15px; }
.fixed-note.same { border-left-color: var(--home); background: var(--home-bg); }
.saved li.builtin { border-style: dashed; }
@media (pointer: coarse) { .preset-pick select { min-height: 44px; } }

/* ---- v42: senior-friendly pass ---- */
/* Section headings in sentence case and full-strength color */
.tool > summary, .tool > summary h3 { text-transform: none; letter-spacing: 0; }
.tool > summary { font-size: 15px; color: var(--fg); }
body.adv .basic-only { display: none !important; }
.byline { margin: 6px 0 0; font-size: 14px; color: var(--fg); }
.big-switch { font-size: 15px; font-weight: 600; border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; }
.ui-row .btn { font-size: 14px; }
/* Phones: the map sits in the page (app.js moves it) */
@media (max-width: 1023px) {
  .app { grid-template-rows: auto; }
  .panel { grid-row: 1; }
  .panel .mapwrap { grid-row: auto; height: 45vh; min-height: 260px; margin: 0 -20px; }
}
/* Phones: wide tables become one card per row, each value labeled with its column heading */
@media (max-width: 600px) {
  table.cards, table.cards tbody, table.cards tr, table.cards td, table.cards tbody th { display: block; }
  table.cards { font-size: 15px; }
  table.cards thead tr { display: flex; flex-wrap: wrap; gap: 4px 6px; }
  table.cards thead th { border: 0; padding: 0; }
  table.cards thead th:not(:has(.sort)) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  table.cards thead th .sort { border: 1px solid var(--line); border-radius: 999px; padding: 4px 10px; color: var(--fg); }
  table.cards tbody tr { border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; margin-top: 8px; }
  table.cards tbody tr.grp { border: 0; padding: 0; margin-top: 12px; }
  table.cards td, table.cards tbody th { border: 0; padding: 3px 0; white-space: normal; text-align: left; }
  table.cards tbody th[scope=row] { font-weight: 700; font-size: 16px; min-width: 0; padding-bottom: 4px; }
  table.cards tbody tr { display: flex; flex-direction: column; }
  table.cards tbody th[scope=row] { order: -1; }
  table.cards td { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; white-space: normal !important; }
  table.cards td::before { content: attr(data-label); color: var(--fg); font-weight: 400; text-align: left; flex: none; max-width: 55%; }
  table.cards td[data-label="#"]::before { content: 'Rank'; }
  table.cards thead tr:has(.sort)::before { content: 'Sort by'; align-self: center; font-size: 14px; }
  table.cards td[data-label=""]::before { content: none; }
  table.cards td.num { text-align: right; }
  #compare td.vs { min-width: 0; }
}
/* Larger text zooms the panel; the map inside it on phones stays at normal scale so taps land where they should */
body.big-text .panel .mapwrap { zoom: .8; margin: 0 -25px; }
body.big-text .panel .mapwrap .legend { font-size: 18px; }

/* ---- v43: the report ---- */
body.adv .basic-only { display: none !important; }
body.basic #answerBar { display: none !important; }
.report { display: grid; gap: 22px; }
.rp-sec { display: grid; gap: 10px; }
.rp-sec + .rp-sec { border-top: 1px solid var(--line); padding-top: 18px; }
.rp-kicker { margin: 0; font-size: 14px; font-weight: 600; color: var(--accent); }
.report h2 { margin: 0; font-family: var(--display); font-weight: 600; font-size: 26px; line-height: 1.2; }
.report h3 { margin: 0; font-family: var(--display); font-weight: 600; font-size: 20px; line-height: 1.25; }
.rp-answer { margin: 0; font-size: 19px; line-height: 1.4; }
.rp-answer b { display: block; font-family: var(--display); font-size: 44px; line-height: 1.05; color: var(--home); }
.rp-text { margin: 0; font-size: 16px; line-height: 1.55; }
.report .btn { font-size: 15px; padding: 8px 14px; }
.rp-list { margin: 0; padding-left: 20px; font-size: 16px; line-height: 1.55; display: grid; gap: 6px; }
.rp-who { margin: 0; font-size: 14px; }
#rpSlide { font-size: 15px; }
#rpSlide td.off { font-weight: 700; }
/* single ranked bar chart, larger type for reading */
.rankchart.one { grid-template-columns: 1fr; }
.rankchart.one h4 { font-size: 15px; }
.rankchart.one .sub { font-size: 14px; color: var(--fg); }
.rankchart.one .bar { grid-template-columns: 8.2em 1fr; font-size: 14px; height: 24px; }
.rankchart.one .bar .nm { color: var(--fg); }
.rankchart.one .bar .track { height: 16px; }
.rankchart.one .bar .val { font-size: 14px; color: var(--fg); top: -1px; }
@media print {
  #printSheet .rp-print h2 { font-size: 15pt; margin: 4pt 0; }
  #printSheet .rp-print h3 { font-family: var(--display); font-size: 13pt; margin: 8pt 0 3pt; }
  #printSheet .rp-print p, #printSheet .rp-print blockquote { margin: 0 0 4pt; font-size: 10.5pt; }
  #printSheet .rp-print .rp-answer b { font-size: 22pt; display: block; }
  #printSheet .rp-print .rp-kicker { display: none; }
  #printSheet .rankchart.one { display: block; max-width: 5.5in; }
  #printSheet .rankchart .bar { height: 14pt; font-size: 9pt; }
  #printSheet .rankchart .bar .fill { background: #b9c0c9; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  #printSheet .rankchart .bar.home .fill { background: #17803d; }
}
#rpSlide td:last-child { white-space: normal; min-width: 6.5em; }
#rpSlide th, #rpSlide td { padding: 6px 5px; }
/* place labels on the report's map */
.lm-label { pointer-events: none; font: 600 12px/1.2 var(--body); color: #1d2530; background: rgba(255,255,255,.9); border-radius: 4px; padding: 2px 6px; white-space: nowrap; box-shadow: 0 1px 2px rgba(0,0,0,.25); }
.lm-label.lm-shops { border-left: 3px solid #c2541b; }
.lm-label.lm-park { border-left: 3px solid #2f6f62; }
.lm-label.lm-civic { border-left: 3px solid #1f3b57; }
body.big-text .lm-label { font-size: 15px; }
@media print { #printSheet .rp-print .maps img { width: auto; max-width: 100%; max-height: 4.6in; object-fit: contain; display: block; margin: 0 auto; } }

/* ---- v45: report opening, slopegraph, small multiples; Northbrook in dark ink in the report ---- */
.rp-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.rp-pair > div { display: grid; grid-template-rows: 1fr auto; gap: 2px; }
.rp-pair .lab { font-size: 14px; }
.rp-pair b { font-family: var(--display); font-size: 42px; line-height: 1.05; font-variant-numeric: tabular-nums; }
.rp-fig { margin: 0; }
.rp-figcap { font-size: 14px; font-weight: 600; margin-bottom: 4px; }
.slope { max-width: 460px; }
.slope .sl-h { font: 600 12px var(--body); fill: var(--fg); }
.slope .sl-t { font: 12px var(--body); fill: var(--muted); font-variant-numeric: tabular-nums; }
.slope .sl-t.home { font-weight: 700; fill: var(--fg); }
.slope .sl-line { stroke: #9aa3ad; stroke-width: 1.5; }
.slope .sl-line.home { stroke: var(--fg); stroke-width: 3; }
.slope .sl-dot { fill: #9aa3ad; } .slope .sl-dot.home { fill: var(--fg); }
.rp-note { margin: 0; font-size: 14px; line-height: 1.5; color: var(--fg); }
.rankchart.three { grid-template-columns: 1fr; gap: 18px; }
.report .rankchart .bar.home .fill { background: var(--fg); }
.report .rankchart .bar.home .nm, .report .rankchart .bar.home .val { color: var(--fg); }
.report .rankchart .sub { color: var(--fg); }
.report .rankchart h4 { font-size: 15px; }
.report .rankchart .bar { grid-template-columns: 8.2em 1fr; font-size: 14px; height: 24px; }
.report .rankchart .bar .nm { color: var(--fg); }
.report .rankchart .bar .track { height: 16px; }
.report .rankchart .bar .val { font-size: 14px; color: var(--fg); }
#rpSlide tr.home td, #rpSlide tr.home th, #rpPlazaTable tr.home td { color: var(--fg); }
#rpSlide tr.home { background: var(--in-bg); }
#rpPlazaTable td.num { white-space: normal; }
.legend .dot.station { background: #1f3b57; border: 2px solid #fff; box-shadow: 0 0 0 1px #1f3b57; }
.legend .dot.sz5 { width: 5px; height: 5px; } .legend .dot.sz25 { width: 8px; height: 8px; margin-left: 6px; } .legend .dot.sz100 { width: 15px; height: 15px; margin-left: 6px; vertical-align: -3px; }
.lm-label.lm-station { border-left: 3px solid #1f3b57; font-weight: 700; }
@media print {
  #printSheet .rp-print { break-inside: auto; page-break-inside: auto; }
  #printSheet .rp-print .rankchart, #printSheet .rp-print table, #printSheet .rp-print .rp-fig, #printSheet .rp-print .maps { break-inside: avoid; page-break-inside: avoid; }
  #printSheet .rp-print p, #printSheet .rp-print li { font-size: 11pt; }
  #printSheet .rp-print .rp-note, #printSheet .rp-print .hint { font-size: 9.5pt; color: #222; }
  #printSheet .rp-print .rp-pair b { font-size: 24pt; }
  #printSheet .rp-print .slope { max-width: 4.2in; }
  #printSheet .rp-print .rankchart.three { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10pt; max-width: none; }
  #printSheet .rp-print .rankchart.two { display: grid; grid-template-columns: 1fr 1fr; gap: 10pt; max-width: none; }
  #printSheet .rankchart .bar .nm, #printSheet .rankchart .bar .val { font-size: 9pt; }
  #printSheet .rankchart .bar.home .fill { background: #111; }
  #printSheet .slope .sl-line.home { stroke: #111; }
}
.rankchart.two { grid-template-columns: 1fr; gap: 18px; }
.slope { max-width: 520px; }
#rpSlide th:first-child { min-width: 7em; }
.slope .sl-t { font-size: 14px; } .slope .sl-h { font-size: 14px; }
@media print { #printSheet .rp-print .bar.home .nm, #printSheet .rp-print .bar.home .val, #printSheet .rp-print tr.home td, #printSheet .rp-print tr.home th { color: #111 !important; } #printSheet .rp-print tr.home { background: #eee; } }
.report, .rp-sec { min-width: 0; grid-template-columns: minmax(0, 1fr); }
#drawBtn.drawing { background: #fff4d6; color: #1d2530; font-weight: 700; }
body.basic #drawBtn { display: none; }
/* theme picker */
.theme-pick { display: inline-flex; align-items: center; gap: 6px; }
.theme-pick .lbl2 { font-size: 14px; }
.seg.tiny button { font-size: 13px; padding: 6px 10px; flex: 0 0 auto; }
.lm-label { color: #1d2530; }
/* before/after maps and land-use key */
.legend .sw { display: inline-block; width: 12px; height: 12px; border-radius: 2px; margin-right: 5px; vertical-align: -1px; }
/* the report's summary and the "all the numbers" section */
.rp-more > summary h3 { display: inline; font-family: var(--display); font-size: 19px; }
.rp-more[open] { display: grid; gap: 22px; }
.rp-more { border-top: 1px solid var(--line); padding-top: 12px; }
.share-row a.btn { text-decoration: none; display: inline-flex; align-items: center; }
/* Share: one equal-sized button per app, two across on phones, more on wider screens */
.share-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.share-grid .btn { min-height: 52px; justify-content: center; text-align: center; font-size: 17px; }
.share-grid a.btn { text-decoration: none; display: inline-flex; align-items: center; }
.share-grid .share-all { grid-column: 1 / -1; }
@media print { #printSheet .rp-more { display: block; } }
.rp-about p { margin: 0 0 8px; } .rp-about p:last-child { margin: 0; }
.rp-more > summary h3 { font-size: 18px; text-transform: none; letter-spacing: 0; }

/* ---- v49: one type system, a cover, figure cards, full-width disclosure rows ---- */
/* Type scale: kicker 14 · H1 34 · H2 26 · H3 20 · big numbers 56 · body 18 · captions 16. One reading font:
   Literata for headings, numbers and text; Public Sans only for the small all-caps labels (--label). */
.hint, .cap, .note, .status, .foot { font-size: 15px; }
table { font-size: 14px; }
.brand { display: grid; gap: 12px; }
.masthead { display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--rule); padding-bottom: 10px; }
.brand h1 { font-family: var(--display); font-weight: 700; font-size: 20px; letter-spacing: 0; }
body.adv .brand h1 { font-size: 26px; }
.aa { position: relative; }
.aa > summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 6px 14px; border: 1px solid var(--rule); border-radius: 999px; font-size: 15px; font-weight: 600; color: var(--fg); }
.aa > summary::-webkit-details-marker { display: none; }
.aa-glyph { font-family: var(--display); font-weight: 700; font-size: 18px; }
.aa[open] > summary { background: var(--accent); color: var(--panel); border-color: var(--accent); }
.aa-pop { position: absolute; right: 0; top: calc(100% + 6px); z-index: 20; background: var(--panel); border: 1px solid var(--rule); border-radius: 12px; padding: 14px; display: grid; gap: 12px; box-shadow: 0 8px 24px rgba(0,0,0,.16); width: max-content; max-width: min(320px, 86vw); }
.seg.tabs { border-radius: 10px; }
.seg.tabs button { font-size: 16px; min-height: 48px; font-weight: 600; }
.trust { display: grid; gap: 2px; font-size: 16px; line-height: 1.45; }
.trust p { margin: 0; }
.trust .byline { font-size: 16px; }
.contact-line { color: var(--muted); }
/* Intro above the maker line: what this page is, in three short paragraphs (Key findings only) */
.intro { display: grid; gap: 10px; max-width: 40em; }
.intro p { margin: 0; font-size: 18px; line-height: 1.55; }
.intro p:first-child, .intro #introLede { font-family: var(--display); font-size: 20px; line-height: 1.45; }
.intro .intro-np { font-size: 17px; font-style: italic; }
.intro .intro-lab { display: block; font-family: var(--display); font-weight: 700; font-size: 19px; line-height: 1.3; margin: 10px 0 4px; color: var(--accent); }
.intro .intro-np .np-label { display: inline; }
.intro #introLede { font-size: 18px; line-height: 1.55; }
.intro .np-label { font-style: normal; }
.intro-h { font-family: var(--display); font-size: 22px; font-weight: 600; margin: 4px 0 0; }
.linkish { font: inherit; color: var(--accent); font-weight: 600; background: none; border: 0; padding: 0; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; min-height: 0; }
.linkish:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 3px; }
.contact-line a, .rp-about a { color: var(--accent); font-weight: 600; }
body.basic .brand .sub { display: none; }

/* Key findings */
.report { gap: 40px; }
.report .rp-sec + .rp-sec:not(.rp-card):not(.rp-next):not(.rp-about) { border-top: 0; padding-top: 0; }
.rp-sec { gap: 14px; }
.rp-kicker { font-size: 14px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; font-family: var(--label); color: var(--accent); }
.report h2 { font-family: var(--display); font-weight: 700; font-size: 34px; line-height: 1.15; letter-spacing: -0.005em; }
.report h3 { font-family: var(--display); font-weight: 600; font-size: 26px; line-height: 1.2; }
.report h4 { margin: 8px 0 0; font-size: 20px; font-weight: 700; }
.rp-text, .rp-list, .rp-about p { font-size: 18px; line-height: 1.55; }
.rp-note, .rp-figcap { font-size: 16px; line-height: 1.5; color: var(--muted); font-weight: 400; }
.rp-answer { font-size: 20px; line-height: 1.45; font-weight: 600; }
.report .btn { font-size: 17px; min-height: 48px; padding: 10px 16px; border-radius: 10px; font-weight: 600; }
.report .btn.big { font-size: 18px; min-height: 56px; padding: 12px 20px; }
/* the cover: a full-width paper band with the question, the two numbers to scale, and one sentence */
.rp-cover { background: var(--paper); margin: 0 -20px; padding: 28px 20px 24px; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); gap: 16px; }
.vs { display: grid; gap: 18px; margin: 4px 0; }
.vs-row { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 2px 12px; }
.vs-row .lab { font-size: 16px; font-weight: 600; line-height: 1.3; }
.vs-num { font: 800 56px/1 var(--body); font-variant-numeric: tabular-nums lining-nums; letter-spacing: -0.02em; }
.vs-slide .vs-num { color: var(--slide); }
.vs-census .vs-num { color: var(--accent); }
.vs-track { grid-column: 1 / -1; position: relative; height: 18px; margin-top: 6px; }
.vs-fill { position: absolute; left: 0; top: 0; bottom: 0; width: var(--w, 100%); border-radius: 0 4px 4px 0; }
.vs-slide .vs-fill { background: repeating-linear-gradient(-45deg, var(--paper) 0 3px, transparent 3px 7px), var(--slide); border: 2px solid var(--slide); }
.vs-census .vs-fill { background: var(--accent); }
.vs-village .vs-num { color: var(--out-line); }
.vs-village .vs-fill { background: var(--out-line); }
.vs-row[hidden] { display: none; }
.vs-gap { position: absolute; top: -2px; bottom: -2px; left: var(--w, 100%); right: 0; border: 2px dashed var(--warn); border-left: 0; border-radius: 0 4px 4px 0; }
.vs-gap:empty { display: none; }
.vs-gap::after { content: attr(data-label); position: absolute; right: 0; top: calc(100% + 6px); font: 700 16px/1.2 var(--body); color: var(--warn); white-space: nowrap; }
.vs-slide { padding-bottom: 22px; }
.rp-dateline { margin: 0; font-size: 15px; color: var(--muted); }
/* figure cards */
.rp-card { background: var(--card); border: 1px solid var(--rule); border-radius: 12px; padding: 20px; }
.rp-fig { display: grid; gap: 10px; }
.slope { max-width: none; }
.legend span { display: inline-flex; align-items: center; gap: 8px; line-height: 1.3; }
.legend svg.sw { flex: none; }
/* the invitation to dig in */
.rp-next { border: 2px solid var(--accent); border-radius: 12px; padding: 20px; background: var(--card); }
.rp-proof { margin: 0; font: 700 17px/1.4 var(--body); color: var(--accent); }
/* share bar */
.rp-about { border-top: 1px solid var(--rule) !important; padding-top: 24px !important; }

/* Disclosure rows: the whole row is the control, with one chevron on the right */
.tool > summary { display: block; position: relative; min-height: 56px; padding: 14px 44px 14px 0; line-height: 1.35; font-size: 17px; font-weight: 600; }
.tool > summary::before { content: none; }
.tool > summary::after, .tool[open] > summary::after { content: ''; position: absolute; right: 10px; top: 50%; width: 10px; height: 10px; padding: 0; border: 0; border-right: 2.5px solid var(--accent); border-bottom: 2.5px solid var(--accent); border-radius: 0; background: none; transform: translateY(-75%) rotate(45deg); transition: transform .15s; }
.tool[open] > summary::after { transform: translateY(-25%) rotate(-135deg); }
.tool > summary:hover { background: var(--in-bg); }
.tool > summary:hover::after { background: none; }
.tool > summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.rp-more { border: 1px solid var(--rule); border-radius: 12px; padding: 0 16px; }
.rp-more > summary { min-height: 72px; padding: 16px 44px 16px 0; }
.rp-more > summary h3 { display: block; font-family: var(--display); font-size: 24px; font-weight: 600; }
.rp-more .sum-sub { display: block; font-size: 16px; font-weight: 400; color: var(--muted); margin-top: 2px; }
.rp-more[open] { padding-bottom: 20px; }
.rp-more[open] > .rp-sec { border-top: 1px solid var(--rule); padding-top: 20px; }
.rp-more .rp-sec h3 { font-size: 22px; }

/* Map card: on phones the map, its key and its caption sit together in one outlined card */
.map-card { border: 1px solid var(--rule); border-radius: 12px; background: var(--card); overflow: hidden; display: grid; }
.map-card .mapcard-h { margin: 0; padding: 16px 16px 10px; font: 700 20px/1.3 var(--body); }
.map-card .mapwrap { margin: 0 !important; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.map-card .legend { position: static; border: 0; border-radius: 0; background: transparent; max-height: none; overflow: visible; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 14px; padding: 14px 16px; font-size: 16px; left: auto; right: auto; bottom: auto; }
.map-card .legend span { min-width: 0; }
.map-card .mapcard-cap { margin: 0; padding: 0 16px 16px; font-size: 16px; color: var(--muted); line-height: 1.5; }
body.adv .map-card .mapcard-h, body.adv .map-card .mapcard-cap { display: none; }
@media (max-width: 380px) { .map-card .legend { grid-template-columns: 1fr; } }
body.big-text .panel .map-card .mapwrap { margin: 0 !important; }
.legend .sw { width: 18px; height: 14px; border-radius: 3px; }
.legend .dot.sz100 { margin-left: 0; }
.legend .sizes { gap: 6px; }

/* Explore: one card style; the home town highlighted in neutral blue, not green */
.group.whatif, .group.share { border: 1px solid var(--line); }
.group-h { font-size: 22px; }

@media print {
  #printSheet .trustline { font-size: 9.5pt; color: #222; border-bottom: 1px solid #999; padding-bottom: 4pt; margin: 0 0 8pt; }
  #printSheet h1, #printSheet h2, #printSheet h3, #printSheet .rp-print h3, #printSheet .rp-print h4 { break-after: avoid; page-break-after: avoid; }
  #printSheet .rp-print .rp-cover { background: none; margin: 0; padding: 0; border: 0; }
  #printSheet .rp-print .rp-card { border: 0; padding: 0; }
  #printSheet .rp-print .vs-num { font-size: 24pt; }
  #printSheet .rp-print h2 { font-family: var(--display); }
  #printSheet .vs-fill, #printSheet .vs-gap, #printSheet .sc svg, #printSheet .rankchart .fill { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  #printSheet .rp-print .sc { grid-template-columns: 1fr 1fr; }
  #printSheet .rp-print .rp-about h4 { font-size: 12pt; margin: 6pt 0 2pt; }
}
/* the private message box */
.fb-form { display: grid; gap: 6px; }
.fb-form label { font-size: 17px; font-weight: 600; margin-top: 8px; }
.fb-form .opt { font-weight: 400; color: var(--muted); }
.fb-form textarea, .fb-form input[type=text], .fb-form input[type=email], .fb-form select { font: inherit; font-size: 18px; width: 100%; min-height: 48px; padding: 10px 12px; border: 1px solid #8a93a0; border-radius: 8px; background: var(--panel); color: var(--fg); }
.fb-form textarea { min-height: 150px; line-height: 1.5; }
.fb-form .btn { margin-top: 12px; width: 100%; }
.fb-hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.fb-status { margin: 4px 0 0; font-size: 17px; font-weight: 600; }
.fb-status.err { color: var(--warn); }
.fb-done { display: grid; gap: 10px; }
#fbHuman:empty { display: none; }
@media print { #printSheet .rp-feedback { display: none; } }
/* dumbbell: slide (hollow) vs Census (solid) per town */
.dumbbell { display: grid; gap: 14px; }
.db-row { display: grid; gap: 2px; padding-bottom: 12px; border-bottom: 1px solid var(--rule); }
.db-row:last-child { border-bottom: 0; padding-bottom: 0; }
.db-name { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; font-size: 18px; }
.db-diff { font-size: 16px; color: var(--muted); }
.db-diff.off { color: var(--warn); font-weight: 700; }
.db-row.home .db-name b { font-size: 20px; }
.db-vals { display: flex; justify-content: space-between; font-size: 16px; color: var(--muted); }
.db-vals b { color: var(--fg); font-variant-numeric: tabular-nums; }
.dumbbell .db-axis { stroke: var(--rule); stroke-width: 1; }
.dumbbell .db-link { stroke: var(--slide); stroke-width: 3; }
.dumbbell .db-a { fill: var(--card); stroke: var(--slide); stroke-width: 2.5; }
.dumbbell .db-b { fill: var(--accent); }
.db-row.home .db-link { stroke: var(--fg); stroke-width: 4; }
.db-legend { display: block; margin-top: 4px; }
.db-k { display: inline-block; width: 13px; height: 13px; border-radius: 50%; vertical-align: -1px; margin: 0 4px 0 6px; }
.db-k.hollow { border: 2.5px solid var(--slide); background: var(--card); }
.db-k.solid { background: var(--accent); }
figure.map-card { margin: 0; }
.map-card .legend .sizes { grid-column: 1 / -1; }
.legend .ring { width: 20px; border-top-width: 2.5px; }
@media print { #printSheet .db-row { break-inside: avoid; } #printSheet .dumbbell { max-width: 5in; } #printSheet .db-a, #printSheet .db-b, #printSheet .db-k { -webkit-print-color-adjust: exact; print-color-adjust: exact; } }
@media print {
  #printSheet .rp-print.keep { break-inside: avoid; page-break-inside: avoid; }
  #printSheet .rp-print .maps.one img { max-height: 3.5in; }
}
/* Phones and tablets (iPad in portrait): one column, the map in the page, a comfortable reading width */
@media (max-width: 1023px) {
  .panel { --gut: max(20px, calc((100vw - 720px) / 2)); padding-left: var(--gut); padding-right: var(--gut); }
  .rp-cover { margin-left: calc(-1 * var(--gut)); margin-right: calc(-1 * var(--gut)); padding-left: var(--gut); padding-right: var(--gut); }
  .answer-bar { margin-left: calc(-1 * var(--gut)); margin-right: calc(-1 * var(--gut)); padding-left: var(--gut); padding-right: var(--gut); }
  .map-card .mapwrap { max-height: 560px; }
}
@media (min-width: 600px) and (max-width: 1023px) {
  .report h2 { font-size: 42px; }
  .vs-num { font-size: 64px; }
}
@media (pointer: coarse) {
  .contact-line a, .rp-about a { display: inline-block; min-height: 44px; line-height: 44px; }
}
.db-track { position: relative; height: 16px; margin: 14px 8px 12px; border-top: 1px solid var(--rule); }
.db-track i { position: absolute; display: block; }
.db-track .db-link { top: -2.5px; height: 4px; background: var(--slide); }
.db-row.home .db-track .db-link { background: var(--fg); top: -3px; height: 5px; }
.db-track .db-a, .db-track .db-b { top: -9px; width: 17px; height: 17px; margin-left: -8.5px; border-radius: 50%; box-sizing: border-box; }
.db-track .db-a { background: var(--card); border: 3px solid var(--slide); z-index: 1; }
.db-track .db-b { background: var(--accent); }
@media print { #printSheet .db-track i { -webkit-print-color-adjust: exact; print-color-adjust: exact; } }

/* ---- v50 ---- */
/* dark mode: warm charcoal like the paper version; the selected tab is a dark chip with a blue underline, not a pastel fill */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme=light]) .seg.tabs button[aria-pressed=true] { background: #2f3a4a; color: var(--fg); box-shadow: inset 0 -3px 0 var(--accent); }
  :root:not([data-theme=light]) #map canvas { filter: brightness(.86); }
}
:root[data-theme=dark] .seg.tabs button[aria-pressed=true] { background: #2f3a4a; color: var(--fg); box-shadow: inset 0 -3px 0 var(--accent); }
:root[data-theme=dark] #map canvas { filter: brightness(.86); }
/* the cover's gap: dashed outline in ink, not alarm red */
.vs-gap { border-color: var(--fg); }
.vs-gap::after { color: var(--fg); }
/* the slide vs. the Census, two bars per town (same look as the cover) */
.tb { display: grid; gap: 20px; }
.tb-town { display: grid; gap: 6px; padding-bottom: 18px; border-bottom: 1px solid var(--rule); }
.tb-town:last-child { border-bottom: 0; padding-bottom: 0; }
.tb-town.home { background: var(--paper); border: 0; border-left: 4px solid var(--accent); border-radius: 0 10px 10px 0; padding: 14px 14px 16px 14px; }
.tb-head { display: flex; justify-content: space-between; align-items: baseline; gap: 4px 12px; flex-wrap: wrap; }
.tb-name { font-size: 19px; font-weight: 700; }
.tb-town.home .tb-name { font-size: 21px; }
.tb-verdict { font-size: 17px; font-weight: 600; }
.tb-verdict.ok { font-weight: 400; color: var(--muted); }
.tb-row { display: grid; grid-template-columns: 64px 1fr; align-items: center; gap: 8px; }
.tb-row .lab { font-size: 16px; }
.tb-track { position: relative; height: 18px; margin-right: 64px; }
.tb-track .tb-fill { position: absolute; left: 0; top: 0; bottom: 0; width: var(--w); border-radius: 0 3px 3px 0; }
.tb-slide .tb-fill { background: repeating-linear-gradient(-45deg, var(--card) 0 3px, transparent 3px 7px), var(--slide); border: 2px solid var(--slide); }
.tb-town.home .tb-slide .tb-fill { background: repeating-linear-gradient(-45deg, var(--paper) 0 3px, transparent 3px 7px), var(--slide); }
.tb-census .tb-fill { background: var(--accent); }
.tb-village .tb-fill { background: var(--out-line); }
.tb-track .tb-num { position: absolute; left: calc(var(--w) + 8px); top: 50%; transform: translateY(-50%); font: 700 18px/1 var(--body); font-variant-numeric: tabular-nums; white-space: nowrap; }
.tb-track .tb-gap { position: absolute; top: -2px; bottom: -2px; left: var(--w); width: var(--g); border: 2px dashed var(--fg); border-left: 0; border-radius: 0 3px 3px 0; }
@media print { #printSheet .tb-fill, #printSheet .tb-town.home { -webkit-print-color-adjust: exact; print-color-adjust: exact; } #printSheet .tb-town { break-inside: avoid; } #printSheet .tb { max-width: 5.5in; } }
/* before/after: stacked, one shared key; side by side only where there's room (iPad) */
.report .rp-sec.rp-card { border-top: 1px solid var(--rule); padding-top: 20px; }
.report .rp-sec.rp-next { border-top: 2px solid var(--accent); padding-top: 20px; }
/* hidden means hidden, even for elements given a display above */
[hidden] { display: none !important; }
/* the two acreage figures stack; side by side only where the card is wide (iPad) */

/* Meadow Plaza, to scale: two square panels (areas to scale), side by side on wider screens */
.sc { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); gap: 18px; }
.sc-panel { display: grid; gap: 6px; align-content: start; max-width: 420px; }
.sc-h { margin: 0; font-size: 18px; font-weight: 700; }
.sc svg { display: block; }
.sc-v { fill: var(--paper); stroke: var(--rule); stroke-width: 1.5; }
.sc-c { fill: rgba(47, 111, 98, .10); stroke: #2f6f62; stroke-width: 1.5; stroke-dasharray: 6 4; }
.sc-s { fill: var(--shops); fill-opacity: .35; stroke: var(--shops); stroke-width: 1.5; }
.sc-p { fill: var(--shops); stroke: var(--fg); stroke-width: 1; }
.sc-t { font: 500 15px var(--label); fill: var(--fg); }
.sc-t.big { font-weight: 700; font-size: 16px; }
.sc-t.strong { font-weight: 700; }
.sc-stat { margin: 0; font-size: 18px; line-height: 1.5; }
.sc-table caption { text-align: left; font-weight: 700; font-size: 16px; padding-bottom: 6px; }
.sc-table td small { display: block; color: var(--muted); font-size: 14px; }
.sc-table th, .sc-table td { white-space: normal; }

/* Map / Aerial switch on the map */
.basemap-switch { display: inline-flex; background: var(--panel); border: 1px solid var(--rule); border-radius: 8px; overflow: hidden; box-shadow: 0 1px 3px rgba(0,0,0,.15); clear: both; }
.basemap-switch button { font: 600 15px var(--body); min-height: 44px; min-width: 64px; padding: 0 12px; border: 0; background: transparent; color: var(--fg); cursor: pointer; }
.basemap-switch button + button { border-left: 1px solid var(--rule); }
.basemap-switch button[aria-pressed="true"] { background: var(--accent); color: var(--panel); }
.fixed-note .back-slide { display: flex; margin-top: 10px; min-height: 48px; font-size: 17px; }
.sc-table tfoot td { font-size: 15px; color: var(--muted); line-height: 1.45; border-bottom: 0; padding-top: 10px; }

/* Original documents */
.doc-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.doc-list li { display: grid; gap: 2px; padding: 12px 14px; border: 1px solid var(--rule); border-radius: 10px; background: var(--card); }
.doc-list a { font-size: 18px; font-weight: 600; color: var(--accent); line-height: 1.35; }
.doc-meta { font-size: 15px; color: var(--muted); }
.doc-note { font-size: 15px; color: var(--muted); font-style: italic; }
@media print { .doc-list a::after { content: " (" attr(href) ")"; font-weight: 400; font-size: 9pt; word-break: break-all; } }

/* link to the Build a downtown page */
.build-link { display: grid; gap: 2px; margin: 10px 0 0; padding: 10px 12px; border: 1px solid var(--accent); border-radius: 8px; color: var(--accent); text-decoration: none; font-size: 15px; min-height: 44px; }
.build-link span { color: var(--fg); font-size: 14px; }
.build-link:hover b { text-decoration: underline; }
/* What downtown Northbrook already has */
.has-groups { display: grid; gap: 6px; }
.has-group { margin: 12px 0 2px; font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; font-family: var(--label); color: var(--muted); }
.has-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.has-list li { display: grid; gap: 2px; padding-left: 12px; border-left: 3px solid var(--rule); }
.has-list .has-num { font-family: var(--display); font-size: 28px; line-height: 1.1; font-variant-numeric: tabular-nums; color: var(--accent); }
.has-list .has-txt { font-size: 17px; line-height: 1.5; }
.has-list .has-rank { font: 600 15px/1 var(--body); color: var(--accent); margin-left: 10px; vertical-align: middle; white-space: nowrap; min-height: 44px; padding: 0 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--card); cursor: pointer; }
.has-list .has-rank:hover { border-color: var(--accent); }
.has-caret { display: inline-block; margin-left: 6px; transition: transform .15s; }
.has-rank[aria-expanded=true] .has-caret { transform: rotate(180deg); }
.has-detail { margin-top: 8px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--in-bg); }
.has-dcap { margin: 0 0 8px; font-size: 15px; color: var(--muted); }
.has-bars { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.has-bars li { display: grid; grid-template-columns: minmax(7.5em, auto) 1fr auto; gap: 8px; align-items: center; font-size: 15px; }
.has-bars .hb-track { height: 12px; background: var(--line); border-radius: 6px; overflow: hidden; }
.has-bars .hb-track i { display: block; height: 100%; background: var(--slide); }
.has-bars li.home { font-weight: 700; }
.has-bars li.home .hb-track i { background: var(--accent); }
.has-bars .hb-val { font-variant-numeric: tabular-nums; text-align: right; min-width: 4.5em; }
@media (prefers-reduced-motion: reduce) { .has-caret { transition: none; } }
@media print { .has-detail { display: none !important; } .has-caret { display: none; } .has-list .has-rank { border: 0; padding: 0; min-height: 0; color: inherit; } }
/* "New here?" examples in Explore */
.try { display: grid; gap: 10px; border-color: var(--accent); }
.try-h { margin: 0; font-family: var(--display); font-weight: 600; font-size: 19px; }
.try-list { display: grid; gap: 8px; }
.try-btn { font: inherit; text-align: left; display: grid; gap: 2px; padding: 12px 14px; min-height: 56px; border: 1px solid var(--line); border-radius: 10px; background: var(--in-bg); color: var(--fg); cursor: pointer; }
.try-btn b { font-size: 16px; color: var(--accent); }
.try-btn span { font-size: 14px; color: var(--muted); }
.try-btn:hover { border-color: var(--accent); }
/* one-page handout: large type for reading on paper */
@media print {
  #printSheet.handout { font: 12pt/1.38 var(--body); }
  #printSheet.handout h1 { font-size: 24pt; }
  #printSheet.handout .sub { font-size: 12pt; margin-bottom: 6pt; }
  #printSheet.handout h2 { font-family: var(--display); font-size: 15pt; margin: 8pt 0 3pt; border-top: 1px solid #bbb; padding-top: 6pt; }
  #printSheet.handout p { margin: 0 0 4pt; }
  #printSheet.handout .nums { gap: 24pt; margin: 2pt 0 4pt; }
  #printSheet.handout .nums div { max-width: 3.2in; font-size: 11pt; color: #333; }
  #printSheet.handout .nums b { font-size: 28pt; color: #111; }
  #printSheet.handout ul.has { margin: 0; padding: 0; list-style: none; display: grid; gap: 3pt; }
  #printSheet.handout ul.has b { font-family: var(--display); font-size: 13.5pt; }
  #printSheet.handout ul.has .scope { font-weight: 700; }
  #printSheet.handout .foot2 { display: flex; gap: 14pt; align-items: center; margin-top: 10pt; border-top: 2px solid #111; padding-top: 8pt; break-inside: avoid; }
  #printSheet.handout .qr { width: 1.25in; height: 1.25in; image-rendering: pixelated; flex: none; }
  #printSheet.handout .go { font-weight: 600; }
  #printSheet.handout .url { font-family: var(--display); font-size: 18pt; margin: 2pt 0 4pt; }
  #printSheet.handout .by { font-size: 9.5pt; color: #444; }
}

/* ---- v66: "For reference" appendix: two plain fact boxes ---- */
.ref-box { border-top: 1px solid var(--rule); padding-top: 14px; margin-top: 16px; }
.ref-box h4 { font-family: var(--display); font-weight: 600; font-size: 19px; margin: 0 0 8px; }
.ref-box .rp-list { margin-bottom: 8px; }
/* Literata is a little wider than the old sans-serif: on narrow phones, a four-button row wraps into two rows. */
@media (max-width: 420px) {
  .seg:has(> button:nth-child(4)):not(.tabs) { flex-wrap: wrap; }
  .seg:has(> button:nth-child(4)):not(.tabs) > button { flex: 1 1 40%; border-top: 1px solid var(--line); margin-top: -1px; }
}

/* ---- The argument made at the meeting ---- */
.mt-list { margin: 12px 0 0; padding-left: 1.4em; display: grid; gap: 14px; }
.mt-list li { padding-left: 2px; }
.mt-said, .mt-data { margin: 0; font-size: 17px; line-height: 1.5; }
.mt-said q { font-style: italic; }
.mt-meta { color: var(--muted); font-size: 14px; white-space: normal; }
.mt-yt { margin: 4px 0 0; font-size: 16px; line-height: 1.5; }
.mt-yt q { font-style: italic; }
.mt-note { margin: 4px 0 0; font-size: 16px; line-height: 1.5; }
.mt-data { margin-top: 4px; padding: 8px 10px; background: var(--bg); border-left: 3px solid var(--accent); border-radius: 4px; }

/* ---- Summary figures (#introFigA, #introFigB) ---- */
.ifig { margin: 4px 0 2px; padding: 12px 12px 10px; background: var(--card); border: 1px solid var(--rule); border-radius: 10px; }
.ifig-cap { font-family: var(--label); font-size: 13px; font-weight: 600; color: var(--muted); margin: 0 0 10px; }
.ifig-rows { display: grid; gap: 8px; }
.ifig-row { display: grid; grid-template-columns: minmax(7.5em, 34%) 1fr auto; align-items: center; gap: 8px; font-size: 15px; }
.ifig-row.home .ifig-lab, .ifig-row.home .ifig-num { font-weight: 700; }
.ifig-lab { line-height: 1.2; }
.ifig-num { font-variant-numeric: tabular-nums; min-width: 3.2em; text-align: right; }
.ifig-track { position: relative; height: 18px; }
.ifig-fill { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 0 4px 4px 0; transition: width 1.2s ease-out; }
.ifig-fill.slide { background: repeating-linear-gradient(-45deg, var(--paper) 0 3px, transparent 3px 7px), var(--slide); }
.ifig-row:not(.home) .ifig-fill.slide { opacity: .55; }
.ifig-fill.census { background: var(--accent); }
.ifig-fill.village { background: var(--out-line); } /* the Village's corrected count */
.ifig-mark { display: block; font-size: 12.5px; font-weight: 600; font-family: var(--label); color: var(--inside); }
.ifig-gap { position: absolute; top: -3px; bottom: -3px; border: 2px dashed var(--inside); border-radius: 4px; opacity: 0; transition: opacity .5s; }
.ifig-gaplab { grid-column: 1 / -1; font-size: 13px; font-family: var(--label); font-weight: 700; color: var(--inside); opacity: 0; transition: opacity .5s; text-align: right; }
#introFigB.shown .ifig-gaplab { opacity: 1; }
.ifig-even { position: absolute; top: -26px; bottom: -4px; border-left: 2px dotted var(--fg); opacity: 0; transition: opacity .5s; }
#introFigB.shown .ifig-gap, #introFigB.shown .ifig-even { opacity: 1; }
.intro .ifig-foot { margin: 2px 0 0; font-size: 12.5px; color: var(--muted); font-family: var(--label); }
.ifig-key { margin: 8px 0 0 !important; font-size: 12.5px !important; font-family: var(--label); color: var(--muted); display: flex; gap: 6px 10px; align-items: center; flex-wrap: wrap; }
.ifig-k { white-space: nowrap; display: inline-flex; align-items: center; gap: 5px; }
.ifig-k .ifig-sw { margin-left: 0 !important; }
.ifig-sw { display: inline-block; width: 14px; height: 10px; border-radius: 2px; vertical-align: middle; }
.ifig-sw.slide { background: repeating-linear-gradient(-45deg, var(--paper) 0 2px, transparent 2px 5px), var(--slide); }
.ifig-sw.census { background: var(--accent); margin-left: 6px; }
.ifig-sw.village { background: var(--out-line); margin-left: 6px; }
.ifig-sw.tick { width: 0; height: 14px; border-radius: 0; border-left: 2px solid var(--fg); opacity: .8; margin-left: 6px; }
@media (prefers-reduced-motion: reduce) { .ifig-fill, .ifig-gap, .ifig-even, .ifig-gaplab { transition: none; } }
@media print { .ifig-gap, .ifig-even, .ifig-gaplab { opacity: 1 !important; } }
/* printed or saved before the animation ran: every Census bar at its final length (set by app.js as --final) */
@media print { .ifig-fill { transition: none !important; } .ifig-fill.census, .ifig-fill.village { width: var(--final) !important; } }
.ifig-replay { margin-left: auto; font: inherit; font-size: 13px; font-weight: 600; color: var(--accent); background: transparent; border: 1px solid var(--rule); border-radius: 999px; padding: 4px 12px; min-height: 36px; cursor: pointer; }
@media (pointer: coarse) { .ifig-replay { min-height: 44px; } }
@media print { .ifig-replay { display: none; } }
#introFigC .ifig-row { grid-template-columns: minmax(6.5em, 30%) 1fr auto; row-gap: 0; }
#introFigC .ifig-fill.ghost { opacity: .35; }
#introFigC .ifig-fill.census { opacity: 1; }
#introFigC .ifig-chg { grid-column: 3; justify-self: end; font-family: var(--label); font-size: 12.5px; font-weight: 700; opacity: 0; transition: opacity .5s; }
#introFigC.shown .ifig-chg { opacity: 1; }
#introFigC .ifig-chg.up { color: var(--inside); }
#introFigC .ifig-chg.down, #introFigC .ifig-chg.same { color: var(--muted); }
@media print { #introFigC .ifig-chg { opacity: 1 !important; } }
@media (prefers-reduced-motion: reduce) { #introFigC .ifig-chg { transition: none; } }

/* ---- v99: map key as tidy rows; compact Text & colors button ---- */
.map-card .legend { grid-template-columns: 1fr; gap: 0; padding: 6px 16px 12px; font-size: 16px; }
.map-card .legend > span { display: grid; grid-template-columns: 28px 1fr; align-items: center; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--rule); line-height: 1.25; }
.map-card .legend > span:last-child { border-bottom: 0; }
.map-card .legend > span > i, .map-card .legend > span > svg, .map-card .legend > span > .sw { justify-self: center; margin: 0; }
.map-card .legend > span.sizes { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
@media (min-width: 640px) { .map-card .legend { grid-template-columns: 1fr 1fr; column-gap: 24px; } .map-card .legend > span.sizes { grid-column: 1 / -1; } }
body.big-text .panel .mapwrap.map-card .legend, body.big-text .map-card .legend { font-size: 17px; }
.aa > summary { white-space: nowrap; font-size: 14px; padding: 4px 12px; gap: 6px; }
.aa-glyph { font-size: 17px; }
.masthead h1 { min-width: 0; }
.masthead .aa { flex: none; }
@media (max-width: 400px) { .aa > summary { padding: 4px 9px; font-size: 13px; } .aa-glyph { font-size: 15px; } }
@media (max-width: 400px) { body.big-text .aa-word { display: none; } body.big-text .aa > summary { padding: 4px 12px; } }
.masthead h1 .kicker { display: block; font-family: var(--label); font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); margin-bottom: 2px; }
#introFigC .ifig-tick { position: absolute; top: -4px; bottom: -4px; width: 0; border-left: 2px solid var(--fg); opacity: .8; }
#introFigC .ifig-gap { border-color: var(--inside); }
#introFigC.shown .ifig-gap { opacity: 1; }
#introFigC .ifig-was { grid-column: 3; justify-self: end; font-family: var(--label); font-size: 12px; color: var(--muted); }
#introFigC .ifig-was.fixed { grid-column: 1 / -1; justify-self: end; text-align: right; font-size: 13px; font-weight: 600; color: var(--out-line); } /* Northbrook: the Village's corrected count, readable, not small gray */
#introFigC .ifig-fill.ghost.village { opacity: .45; }

/* "↑ Key findings": Explore the data, after scrolling. Bottom-left (over the panel, not the map on wide screens),
   clear of the phone's rounded corners and home bar; the panel gets room at the end so it never hides the last line. */
.to-top { position: fixed; z-index: 6; left: calc(12px + env(safe-area-inset-left, 0px)); bottom: calc(12px + env(safe-area-inset-bottom, 0px)); min-height: 44px; min-width: 44px; padding: 10px 16px; font: inherit; font-size: 15px; font-weight: 600; color: var(--panel); background: var(--accent); border: 0; border-radius: 999px; box-shadow: 0 2px 8px rgba(0,0,0,.25); cursor: pointer; }
.to-top[hidden] { display: none; }
.to-top:focus-visible { outline: 3px solid var(--fg); outline-offset: 2px; }
body.adv .panel { padding-bottom: calc(80px + env(safe-area-inset-bottom, 0px)); }
@media print { .to-top { display: none !important; } }

/* Phones: side by side stacks the two maps, so give them more height, and keep each map's name clear of the
   scale, the Map/Aerial switch and the zoom buttons (top) and the map credit (bottom right). */
@media (max-width: 1023px) {
  .panel .mapwrap.split, .map-card .mapwrap.split { height: min(82vh, 760px); max-height: none; }
  .mapwrap.split #label1 { top: auto; bottom: calc(50% + 10px); }
  .mapwrap.split .map-close { top: calc(50% + 10px); bottom: auto; right: 10px; } /* top right of the second map, which has no zoom buttons */
  .map-close .long { display: none; }
}

/* Side-by-side bar (phones only; wider screens keep the Close button on the map and the picker beside it) */
.side-bar { display: none; }
@media (max-width: 1023px) {
  .side-bar:not([hidden]) { display: block; padding: 12px 16px; border-bottom: 1px solid var(--rule); background: var(--card); }
  .side-what { margin: 0 0 10px; font-size: 15px; line-height: 1.45; color: var(--fg); }
  .side-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; }
  .side-row label { font-size: 15px; font-weight: 600; }
  .side-row select { flex: 1 1 10em; min-width: 0; }
  .mapwrap.split .map-close { display: none; } /* the bar under the maps has Close */
}

/* Summary: the plain-language bottom line, the update line, the scope box and the timeline */
.intro-bottom { font-size: 1.18em; line-height: 1.5; font-weight: 600; margin: 0 0 6px; }
.intro-upd { font-family: var(--label); font-size: 13.5px; color: var(--muted); margin: 0 0 18px; }
.intro-scope { border-left: 3px solid var(--out-line); padding: 6px 0 6px 12px; background: color-mix(in srgb, var(--out-line) 7%, transparent); }
.intro-tl { margin: 4px 0 14px; font-size: 15px; }
.intro-tl summary { cursor: pointer; font-family: var(--label); font-weight: 700; }
.intro-tl ul { margin: 8px 0 0; padding-left: 1.2em; }
.intro-tl li { margin: 3px 0; }
@media print { .intro-tl { display: block; } .intro-tl ul { display: block; } }
.ifig-key-bare { justify-content: flex-end; }
