:root {
  --bg: #f4f4f1;
  --surface: #ffffff;
  --surface-2: #fafaf8;
  --ink: #18212d;
  --ink-2: #3f4a59;
  --muted: #6a7380;
  --line: #e2e3de;
  --line-2: #eeeeea;
  --accent: #1f3a5f;
  --accent-hover: #2a4c7a;
  --accent-soft: #e8eef6;
  --focus: #3b82f6;
  --danger: #b4322a;

  --l5: #0d7a4e; --l5-bg: #dcf2e6; --l5-fg: #0a5a3a;
  --l4: #3ba55c; --l4-bg: #e5f5e9; --l4-fg: #226f3b;
  --l3: #4e79c4; --l3-bg: #e5ecf8; --l3-fg: #2a4d8d;
  --l2: #e39b0b; --l2-bg: #fcf0d6; --l2-fg: #865700;
  --l1: #d1433a; --l1-bg: #fae2df; --l1-fg: #982a22;
  --l0: #98a1ab; --l0-bg: #eef0f2; --l0-fg: #4f5864;

  --radius: 10px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 1px 3px rgba(16, 24, 40, .08);
  --shadow-lg: 0 12px 32px rgba(16, 24, 40, .16);
  --sidebar: 440px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  font-size: 14px;
  line-height: 1.45;
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body { display: flex; flex-direction: column; }
a { color: var(--accent-hover); }
h1, h2, h3, h4 { margin: 0; font-weight: 650; letter-spacing: -0.01em; }
button { font: inherit; color: inherit; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.nowrap { white-space: nowrap; }
.num { font-variant-numeric: tabular-nums; }

/* --- top bar --- */
.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 10px 18px; background: var(--surface); border-bottom: 1px solid var(--line);
  z-index: 1000;
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark { width: 34px; height: 34px; flex: none; }
.brand h1 { font-size: 17px; }
.tagline { margin: 0; color: var(--muted); font-size: 12.5px; }

.status { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--ink-2); max-width: 55%; }
.status .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--l4); flex: none; }
.status.loading .dot { background: var(--l2); animation: pulse 1.2s infinite ease-in-out; }
.status.error .dot { background: var(--l1); }
.status .bar { width: 120px; height: 5px; border-radius: 3px; background: var(--line); overflow: hidden; flex: none; }
.status .bar i { display: block; height: 100%; background: var(--accent); transition: width .3s; }
@keyframes pulse { 50% { opacity: .35; } }
.status { margin-left: auto; }
.top-links { display: flex; align-items: center; gap: 6px; flex: none; }
.gh-link { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 8px; color: var(--ink); }
.gh-link:hover { background: rgba(0,0,0,.06); }

/* --- feedback --- */
.feedback { width: min(440px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); padding: 0; border: 0; border-radius: 14px; box-shadow: var(--shadow-lg); color: var(--ink); background: var(--bg); }
.feedback::backdrop { background: rgba(16, 24, 40, .45); }
.feedback form { display: flex; flex-direction: column; gap: 12px; padding: 16px 18px 18px; }
.fb-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.fb-head h2 { font-size: 16px; }
.fb-intro { margin: 0; font-size: 13px; color: var(--ink-2); }
.feedback label { display: flex; flex-direction: column; gap: 4px; font-weight: 600; font-size: 13px; }
.feedback label .muted { font-weight: 500; }
.feedback input[type="text"], .feedback textarea { font: inherit; font-weight: 400; width: 100%; }
.fb-kinds { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; margin: 0; padding: 0; border: 0; }
.feedback .fb-kind { position: relative; align-items: center; gap: 5px; padding: 9px 2px 8px; text-align: center; font-size: 11.5px; line-height: 1.2; color: var(--ink-2); background: var(--surface); border: 1px solid var(--line); border-radius: 10px; cursor: pointer; }
.fb-kind input { position: absolute; opacity: 0; pointer-events: none; }
.fb-kind:hover { border-color: var(--accent); }
.fb-kind:has(input:checked) { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); background: var(--accent-soft); color: var(--accent); }
.fb-kind:has(input:focus-visible) { outline: 2px solid var(--focus); outline-offset: 2px; }
.fb-kind[data-kind="love"] svg { color: #d1437a; }
.fb-kind[data-kind="love"]:has(input:checked) svg { fill: currentColor; }
.fb-set { display: flex; flex-direction: column; gap: 12px; }
.feedback .fb-attach { flex-direction: row; align-items: center; gap: 8px; font-weight: 500; }
.fb-attach input { margin: 0; }
.fb-context { margin: 6px 0 0; padding-left: 22px; font-size: 12px; color: var(--muted); overflow-wrap: anywhere; }
.fb-attach:has(input:not(:checked)) + .fb-context { opacity: .45; text-decoration: line-through; }
#fb-check:empty { display: none; }
#fb-error { margin: 0; }
.fb-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 8px; }

/* --- layout --- */
.layout { flex: 1; display: grid; grid-template-columns: var(--sidebar) 1fr; min-height: 0; }
.sidebar { min-width: 0; overflow-y: auto; border-right: 1px solid var(--line); background: var(--bg); display: flex; flex-direction: column; }
.view { flex: 1; }
.map-wrap { position: relative; min-height: 0; }
#map { position: absolute; inset: 0; background: #e9ebe6; }
#map .leaflet-tile-pane { filter: grayscale(.88) sepia(.07) contrast(.77) brightness(1.14); }

.panel { padding: 16px 18px; }
.panel + .panel { padding-top: 4px; }
.label { display: block; font-weight: 600; font-size: 12.5px; color: var(--ink-2); margin-bottom: 6px; text-transform: uppercase; letter-spacing: .04em; }
.hint { color: var(--muted); font-size: 12.5px; margin: 8px 0; }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

/* --- buttons --- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: 1px solid var(--line); background: var(--surface); border-radius: 8px;
  padding: 7px 12px; cursor: pointer; font-weight: 550; text-decoration: none; color: var(--ink);
  transition: background .12s, border-color .12s;
}
.btn:hover { background: var(--surface-2); border-color: #cfd1cb; }
.btn.primary { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn.primary:hover { background: var(--accent-hover); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.small { padding: 4px 9px; font-size: 12.5px; }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.ghost:hover { background: rgba(0,0,0,.04); }
/* A button's icon: an outline in the button's own colour (see icons.js). */
.icon { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.icon.solid { fill: currentColor; stroke: none; }
.btn.small .icon, .back .icon { width: 14px; height: 14px; }
.top-links .btn .icon { width: 16px; height: 16px; } /* on a narrow screen the icon is all there is */
.donate .icon { color: #d1437a; }
.icon-btn { border: 0; background: transparent; cursor: pointer; padding: 4px; border-radius: 6px; color: var(--muted); line-height: 0; }
.icon-btn:hover { background: rgba(0,0,0,.06); color: var(--ink); }
.icon-btn svg { width: 16px; height: 16px; fill: currentColor; }
.icon-btn.outlined { border: 1px solid var(--line); background: var(--surface); padding: 8px; border-radius: 8px; }
.icon-btn.outlined:hover { background: var(--surface-2); border-color: #cfd1cb; }
.icon-btn[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: #fff; }

/* Things that fold: a chevron after the summary instead of the browser's triangle. */
.fold > summary, .section > summary, .commute-panel details > summary { list-style: none; cursor: pointer; }
.fold > summary::-webkit-details-marker, .section > summary::-webkit-details-marker, .commute-panel details > summary::-webkit-details-marker { display: none; }
.section > summary::after, .commute-panel details > summary::after, .key-head::after {
  content: ""; flex: none; width: 6px; height: 6px; margin: -3px 3px 0 2px;
  border: solid var(--muted); border-width: 0 1.6px 1.6px 0; transform: rotate(45deg); transition: transform .15s;
}
.section[open] > summary::after, .commute-panel details[open] > summary::after, .key-head[aria-expanded="false"]::after { transform: rotate(-135deg); margin-top: 3px; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: var(--surface); }
.seg-btn { border: 0; background: transparent; padding: 4px 10px; font-size: 12.5px; cursor: pointer; color: var(--ink-2); }
.seg-btn + .seg-btn { border-left: 1px solid var(--line); }
.seg-btn[aria-pressed="true"] { background: var(--accent); color: #fff; }

select, input[type="search"], input[type="text"], textarea {
  font: inherit; color: var(--ink); background: var(--surface);
  border: 1px solid var(--line); border-radius: 8px; padding: 7px 10px;
}
select { padding-right: 26px; }
textarea { width: 100%; resize: vertical; }
input:disabled { background: var(--line-2); }

/* --- search --- */
.searchbox { position: relative; }
.searchbox input { width: 100%; padding: 10px 12px 10px 36px; font-size: 15px; box-shadow: var(--shadow); }
.search-icon { position: absolute; left: 11px; top: 12px; width: 18px; height: 18px; fill: var(--muted); }
.suggestions {
  position: absolute; z-index: 2000; left: 0; right: 0; top: calc(100% + 4px);
  list-style: none; margin: 0; padding: 4px; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-lg);
  max-height: 380px; overflow-y: auto;
}
.suggestion { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 7px; cursor: pointer; }
.suggestion[aria-selected="true"], .suggestion:hover { background: var(--accent-soft); }
.suggestion .s-main { flex: 1; min-width: 0; }
.suggestion .s-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.suggestion .s-sub { font-size: 12.5px; color: var(--muted); }
.suggestion.added { opacity: .6; }
.suggestion-empty { padding: 10px; color: var(--muted); }

/* --- commute --- */
.commute-panel > details { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 0 12px; }
.commute-panel > details > summary { display: flex; align-items: center; gap: 10px; padding: 10px 0; }
.c-title { font-weight: 650; }
.c-status { flex: 1; min-width: 0; color: var(--muted); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.commute-panel > details[open] > summary .c-status { visibility: hidden; } /* the rows below say it */
.place { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
/* The same square, gold-edged badge as the pin on the map. */
.place-badge { flex: none; width: 26px; height: 26px; border-radius: 7px; display: grid; place-items: center; background: var(--ink); color: #fff; border: 2px solid #f2b84b; }
.place-badge svg { width: 14px; height: 14px; fill: currentColor; }
.place-set, .place-find { flex: 1; min-width: 0; display: flex; align-items: center; gap: 6px; }
.place-set { min-height: 34px; }
.place-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.place-find .searchbox { flex: 1; min-width: 0; }
.place-find .searchbox input { padding: 7px 10px; font-size: 14px; box-shadow: none; }
.c-options { border-top: 1px solid var(--line-2); }
.c-options > summary { display: flex; align-items: center; gap: 8px; padding: 9px 0; font-size: 12.5px; color: var(--ink-2); }
#c-summary { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.c-more { color: var(--accent-hover); font-weight: 550; }
.commute-controls { margin-top: 2px; }
input[type="time"], input[type="date"] { font: inherit; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 6px 8px; }
.modes { display: flex; flex-wrap: wrap; gap: 6px 12px; margin: 10px 0 12px; color: var(--ink-2); }
#rank:not(:empty) { border-top: 1px solid var(--line-2); padding: 10px 0 12px; }
#rank .note { margin: 0; }
.card-commute { margin-top: 7px; font-size: 12.5px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.options { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.option { width: 100%; display: flex; flex-direction: column; gap: 5px; text-align: left; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; cursor: pointer; }
.option:hover { border-color: var(--accent); }
.option[aria-pressed="true"] { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); background: var(--accent-soft); }
.o-head { display: flex; justify-content: space-between; gap: 8px; font-variant-numeric: tabular-nums; }
.o-legs, .o-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 7px; font-size: 12.5px; }
.o-foot { font-size: 12px; }
.leg { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.o-steps { display: flex; flex-direction: column; gap: 2px; border-top: 1px solid var(--line); padding-top: 6px; font-size: 12.5px; }
#commute .note button { vertical-align: baseline; }
#commute > .btn, #commute > .error-box + .btn { margin-top: 8px; }
#commute > p:first-child { margin-top: 0; }

/* --- import --- */
.import { margin-top: 12px; }
.import summary { cursor: pointer; color: var(--accent-hover); font-weight: 550; font-size: 13px; }
.import[open] summary { margin-bottom: 4px; }
.import textarea { margin-bottom: 8px; font-size: 13px; }
.import-results { margin-top: 10px; display: flex; flex-direction: column; gap: 6px; }

/* Find schools on the map: filters for the "every London school" layer, and the nearest matches. */
.find { margin-top: 8px; }
.find-phases { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 12px; }
.find .control { flex: 1 1 128px; min-width: 0; }
.find .control select { width: 100%; }
.find select:disabled { background: var(--line-2); color: var(--muted); cursor: not-allowed; }
.find-count { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 28px; margin-top: 14px; font-size: 13px; }
.find-count:empty { display: none; }
.find-results h4 { margin: 12px 0 2px; font-size: 12px; font-weight: 650; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.find-results ol { list-style: none; margin: 0; padding: 0; }
.find-results li { display: grid; grid-template-columns: 10px minmax(0, 1fr) auto; column-gap: 9px; align-items: center; padding: 7px 0; border-top: 1px solid var(--line-2); }
.find-results li:first-child { border-top: 0; }
.find-results li > .icon-btn, .find-results li > .chip { grid-column: 3; grid-row: 1 / span 2; }
.find-results li > .small { grid-column: 2; }
.find-results .icon-btn.outlined { padding: 5px; }
.find-results .icon-btn .icon { width: 16px; height: 16px; }
.find-name { font-weight: 600; color: var(--ink); line-height: 1.3; }
.linkish { border: 0; padding: 0; background: none; font: inherit; color: var(--accent-hover); text-align: left; cursor: pointer; text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 2px; }
.linkish:hover { text-decoration-color: currentColor; }
.find-name.linkish { color: var(--ink); }
.note .linkish { font-weight: 600; }
.empty-action { margin-top: 12px !important; }
.ir { border: 1px solid var(--line); background: var(--surface); border-radius: 8px; padding: 8px 10px; font-size: 13px; }
.ir-line { display: flex; gap: 8px; align-items: baseline; }
.ir-tag { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; padding: 1px 6px; border-radius: 4px; flex: none; }
.ir-tag.added { background: var(--l4-bg); color: var(--l4-fg); }
.ir-tag.already { background: var(--l0-bg); color: var(--l0-fg); }
.ir-tag.ambiguous { background: var(--l2-bg); color: var(--l2-fg); }
.ir-tag.not_found { background: var(--l1-bg); color: var(--l1-fg); }
.ir-cands { display: flex; flex-direction: column; gap: 4px; margin-top: 6px; }
.ir-cand { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 4px 6px; border-radius: 6px; background: var(--surface-2); }
.ir-cand span { min-width: 0; }
.ir.resolved { opacity: .65; }

/* --- list --- */
.list-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.list-actions { display: flex; gap: 6px; }
.list-actions .btn { white-space: nowrap; }
.list-head h2 { font-size: 15px; white-space: nowrap; }
.count { color: var(--muted); font-weight: 500; }
.share-banner { margin: 14px 18px 0; padding: 14px 16px; border-radius: 12px; background: var(--accent-soft); border: 1px solid #cfdcec; }
.share-banner h2 { font-size: 14px; margin: 0 0 4px; }
.share-banner p { margin: 0; color: var(--ink-2); font-size: 13px; }
.share-banner ul { margin: 8px 0 12px; padding-left: 18px; font-size: 13px; color: var(--ink-2); }
.share-banner li + li { margin-top: 2px; }
.share-banner .muted { color: var(--muted); }
.news h2 .muted { font-weight: 500; }
.news .linkish { font-weight: 650; }
.news > ul { list-style: none; padding-left: 0; }
.news > ul > li + li { margin-top: 8px; }
.news li ul { margin: 2px 0 0; }
.school-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.card {
  display: grid; grid-template-columns: 28px 1fr auto; gap: 10px; align-items: start;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 11px 10px 11px 12px; cursor: pointer; box-shadow: var(--shadow);
  transition: border-color .12s, transform .12s;
}
.card:hover { border-color: #c9ccc4; }
.card.flash { animation: flash 1.2s ease-out; }
@keyframes flash { from { box-shadow: 0 0 0 3px var(--focus); } }
.card-name { font-weight: 650; line-height: 1.3; }
.card-meta { color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.card-ofsted { margin-top: 7px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.pin-num {
  width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center;
  color: #fff; font-weight: 700; font-size: 12px; background: var(--pin, var(--l0));
  border: 2px solid #fff; box-shadow: 0 0 0 1px rgba(0,0,0,.15);
}
.empty { text-align: center; color: var(--muted); padding: 28px 18px; border: 1px dashed #cfd1cb; border-radius: var(--radius); }
.empty p { margin: 4px 0; }
.missing-note { margin-top: 8px; }

/* --- chips --- */
.chip { display: inline-flex; align-items: center; gap: 5px; padding: 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; background: var(--l0-bg); color: var(--l0-fg); }
.chip.l5 { background: var(--l5-bg); color: var(--l5-fg); }
.chip.l4 { background: var(--l4-bg); color: var(--l4-fg); }
.chip.l3 { background: var(--l3-bg); color: var(--l3-fg); }
.chip.l2 { background: var(--l2-bg); color: var(--l2-fg); }
.chip.l1 { background: var(--l1-bg); color: var(--l1-fg); }
.chip.warn { background: var(--l1-bg); color: var(--l1-fg); }
.chip.outline { background: transparent; border: 1px solid var(--line); color: var(--ink-2); font-weight: 500; }
.swatch { width: 10px; height: 10px; border-radius: 50%; display: inline-block; flex: none; }

/* --- detail view --- */
.detail-head { padding: 12px 18px 14px; border-bottom: 1px solid var(--line); }
.detail-bar { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.back { display: inline-flex; align-items: center; gap: 4px; border: 0; background: none; color: var(--accent-hover); cursor: pointer; padding: 0; font-weight: 550; font-size: 13px; }
.detail-title { display: flex; gap: 10px; align-items: flex-start; margin-top: 8px; }
.detail-title h2 { font-size: 19px; line-height: 1.25; }
.facts { margin-top: 8px; font-size: 13px; color: var(--ink-2); }
.facts.muted { margin-top: 2px; font-size: 12.5px; color: var(--muted); }
.address { margin-top: 6px; color: var(--ink-2); font-size: 13px; }
.links { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 10px; }
.links a { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 550; text-decoration: none; }
.links a:hover { text-decoration: underline; }
.links.gov { align-items: center; gap: 4px 7px; margin-top: 6px; }
/* A service's own icon beside a link to it. */
.logo { width: 16px; height: 16px; flex: none; border-radius: 3px; object-fit: contain; }
.portal-name { display: inline-flex; align-items: center; gap: 6px; }
.portal small { display: inline-flex; align-items: center; gap: 4px; }
.portal small .logo { width: 13px; height: 13px; border-radius: 2px; }
.compare { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 12px; }
.compare[hidden] { display: none; }
.compare details { flex-basis: 100%; font-size: 13px; }
.compare summary { cursor: pointer; }
.compare label { display: block; padding: 3px 0; }
/* A school's page: sections that fold to one line, with the gist on that line while shut. */
.section { border-bottom: 1px solid var(--line); }
.section > summary { display: flex; align-items: center; gap: 10px; padding: 13px 18px; }
.section > summary:hover { background: rgba(0,0,0,.025); }
.section h3 { font-size: 14px; flex: none; }
.gist { flex: 1; min-width: 0; text-align: right; color: var(--muted); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.section[open] > summary .gist { visibility: hidden; }
.section-body { padding: 0 18px 16px; }
.section h4 { font-size: 13px; color: var(--ink-2); margin: 14px 0 8px; }

.headline { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.headline .big { font-size: 15px; font-weight: 650; }
.headline .bar { width: 6px; align-self: stretch; border-radius: 3px; background: var(--l0); flex: none; }
.concern { margin-top: 8px; padding: 8px 10px; border-radius: 8px; background: var(--l1-bg); color: var(--l1-fg); font-weight: 600; font-size: 13px; }
.insp { margin-top: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 12px; }
.insp-head { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.insp-title { font-weight: 650; }
.grades { width: 100%; border-collapse: collapse; margin-top: 8px; font-size: 13px; }
.grades td { padding: 4px 0; border-top: 1px solid var(--line-2); vertical-align: middle; }
.grades td:last-child { text-align: right; }

.controls { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: end; }
.control { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--ink-2); font-weight: 600; }
.mode-seg { display: flex; width: 100%; }
.mode-seg .seg-btn { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 6px 10px; font-size: 13px; font-weight: 600; }
.portals { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 12px; }
.portal { flex-direction: column; gap: 2px; padding: 10px 6px; }
.portal small { font-weight: 500; color: var(--muted); font-size: 11.5px; }

.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; }
.stat .k { font-size: 11.5px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .03em; }
.stat .v { font-size: 16px; font-weight: 700; margin-top: 2px; font-variant-numeric: tabular-nums; }
.stat .s { font-size: 11.5px; color: var(--muted); }
.type-filter { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0 8px; }
.toggle { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 3px 10px; font-size: 12.5px; cursor: pointer; color: var(--ink-2); }
.toggle[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: #fff; }
.sales-bar { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin: 4px 0 8px; }
.sales { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.sale { display: grid; grid-template-columns: 10px 1fr auto; gap: 10px; align-items: start; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; cursor: pointer; }
.sale:hover, .sale.active { border-color: var(--accent); background: var(--accent-soft); }
.sale .swatch { margin-top: 5px; }
.sale-addr { font-weight: 600; font-size: 13px; }
.sale-meta { color: var(--muted); font-size: 12px; }
.sale-price { font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; }
.sale-date { color: var(--muted); font-size: 12px; text-align: right; }
.loading-row { display: flex; align-items: center; gap: 10px; color: var(--muted); padding: 10px 0; }
.spinner { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--line); border-top-color: var(--accent); animation: spin .8s linear infinite; flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }
.error-box { padding: 10px 12px; border-radius: 8px; background: var(--l1-bg); color: var(--l1-fg); font-size: 13px; }
.note { font-size: 12px; color: var(--muted); margin-top: 10px; }

.sources { padding: 12px 18px 18px; font-size: 12px; color: var(--muted); }
.sources summary { cursor: pointer; font-weight: 600; }
.sources p { margin: 6px 0; }

/* --- map bits --- */
.school-pin { background: none; border: 0; }
.school-pin span {
  width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center;
  background: var(--pin, var(--l0)); color: #fff; font: 700 12px/1 -apple-system, "Segoe UI", Roboto, sans-serif;
  border: 2.5px solid #fff; box-shadow: 0 1px 4px rgba(0,0,0,.35); transition: transform .15s;
}
.school-pin span.hollow, .pin-num.hollow { background: #fff; color: #1d2939; border-color: #475467; }
.swatch.hollow { background: #fff; box-shadow: inset 0 0 0 2px #475467; }
.school-pin.selected span { transform: scale(1.3); box-shadow: 0 0 0 3px rgba(24,33,45,.85), 0 2px 8px rgba(0,0,0,.4); }
.leaflet-popup-content { margin: 12px 14px; font-size: 13px; line-height: 1.4; }
.leaflet-popup-content-wrapper { border-radius: 10px; }
.popup-name { font-weight: 650; font-size: 14px; margin-bottom: 2px; }
.popup-chips { display: flex; flex-wrap: wrap; gap: 4px; margin: 6px 0 4px; }
.popup-actions { margin-top: 8px; display: flex; gap: 6px; }
.popup-actions .btn { white-space: nowrap; }

/* Map controls: a Layers menu (top left) and one key (bottom right), in the page's own type. */
.map-btn {
  display: inline-flex; align-items: center; gap: 7px; border: 0; border-radius: 8px; padding: 7px 11px;
  background: rgba(255,255,255,.97); box-shadow: var(--shadow); color: var(--ink); cursor: pointer; user-select: none;
  font: 600 12.5px/1.3 var(--font); list-style: none;
}
.map-btn::-webkit-details-marker { display: none; }
.map-btn:hover { background: #fff; box-shadow: 0 1px 3px rgba(16,24,40,.12), 0 2px 6px rgba(16,24,40,.12); }
.map-layers { font-family: var(--font); }
.map-layers .count { min-width: 17px; height: 17px; padding: 0 4px; border-radius: 999px; display: inline-grid; place-items: center; background: var(--accent); color: #fff; font-size: 11px; font-weight: 700; }
.map-menu { margin-top: 6px; min-width: 220px; padding: 6px; display: flex; flex-direction: column; background: rgba(255,255,255,.98); border-radius: 10px; box-shadow: var(--shadow-lg); }
.map-menu label { display: flex; align-items: center; gap: 8px; padding: 7px 8px; border-radius: 6px; font-size: 13px; color: var(--ink); cursor: pointer; }
.map-menu label:hover { background: var(--accent-soft); }
.map-menu input { margin: 0; }

.key { display: flex; flex-direction: column-reverse; align-items: flex-end; gap: 6px; font-family: var(--font); } /* the button stays put; the card opens above it */
.key-body {
  width: 272px; max-height: calc(100vh - 280px); overflow-y: auto; padding: 10px 12px;
  background: rgba(255,255,255,.97); border-radius: 10px; box-shadow: var(--shadow); font-size: 12px; line-height: 1.6; color: var(--ink);
}
.key-body > * + * { margin-top: 9px; padding-top: 9px; border-top: 1px solid var(--line-2); }
.key h5 { margin: 0 0 5px; font-size: 11px; font-weight: 650; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.key h5 span { text-transform: none; letter-spacing: 0; font-weight: 500; }
.key-title { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.key-title h5 { margin: 0; }
.key .seg-btn { padding: 2px 9px; font-size: 11.5px; font-family: var(--font); }
.key-note { margin-top: 6px; font-size: 11.5px; color: var(--muted); }
.key .li, .leaflet-tooltip .li { display: flex; align-items: center; gap: 7px; }
.ramp { display: grid; grid-template-columns: repeat(5, 1fr); gap: 2px; }
.ramp i { height: 8px; border-radius: 2px; }
/* Four break points, each centred under the join between two of the five colours. */
.ramp-ticks { display: grid; grid-template-columns: repeat(4, 1fr); margin: 3px 10% 0; text-align: center; font-size: 11px; line-height: 1.2; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.key-lines summary { cursor: pointer; font-weight: 600; }
.key-lines h5 { margin-top: 7px; }
.key-lines .cols { display: grid; grid-template-columns: repeat(2, 1fr); column-gap: 10px; }
.key-lines .li { white-space: nowrap; font-size: 11.5px; line-height: 1.5; }
.leaflet-container .leaflet-control-attribution { font-size: 10.5px; }
.line-key { width: 14px; height: 4px; border-radius: 2px; flex: none; }
.borough-label { pointer-events: none; }
.place-pin { background: none; border: 0; }
.place-pin span { width: 28px; height: 28px; border-radius: 7px; display: grid; place-items: center; background: var(--ink); color: #fff; border: 2.5px solid #f2b84b; box-shadow: 0 1px 4px rgba(0,0,0,.4); }
.place-pin svg { width: 16px; height: 16px; fill: currentColor; }
.leaflet-container.picking, .leaflet-container.picking .leaflet-interactive { cursor: crosshair; }
.borough-label span { position: absolute; transform: translate(-50%, -50%); white-space: nowrap; font-size: 10.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: #3d4b63; text-shadow: 0 0 3px #fff, 0 0 3px #fff, 0 0 6px #fff; }
.filter-bar { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 8px 10px; margin-bottom: 8px; background: #eaf0f8; border: 1px solid var(--line); border-radius: 8px; font-size: 13px; }
.filter-bar .btn { flex: none; white-space: nowrap; }
.portals.wide { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.demand { margin-top: 4px; }
.results h4:first-child { margin-top: 2px; }
.results .note { margin-top: 8px; }
.results .stats + .note { margin-top: 10px; }
.demand + .portals { margin-top: 14px; }
.points { margin: 8px 0 0; padding-left: 18px; font-size: 13px; color: var(--ink-2); }
.admission-summary { margin: 0; font-size: 13.5px; }
.rent-table th { font-size: 11.5px; font-weight: 600; color: var(--muted); text-align: left; padding-bottom: 4px; }
.rent-table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.rent-table tr.match td { background: #eef4ff; }

/* --- small screens --- */
@media (max-width: 860px) {
  :root { --sidebar: 100%; }
  .layout { grid-template-columns: minmax(0, 1fr); grid-template-rows: 42vh auto; }
  .key-body { width: 272px; max-width: calc(100vw - 20px); max-height: calc(42vh - 150px); } /* clear of the zoom buttons */
  .map-wrap { grid-row: 1; height: 42vh; }
  .sidebar { grid-row: 2; border-right: 0; overflow: visible; }
  body { display: block; }
  .tagline { display: none; }
  .topbar { gap: 10px; padding: 10px 12px; }
  .status { max-width: none; min-width: 0; flex: 1; justify-content: flex-end; }
  .top-links .btn span { display: none; } /* the icon and its title say it */
}
@media (max-width: 560px) {
  .status.ready { display: none; } /* no room; "About the data" has the dates. Loading and errors still show */
  .top-links { margin-left: auto; }
}

/* --- toast --- */
.toast {
  position: fixed; left: 18px; bottom: 18px; z-index: 3000; max-width: calc(var(--sidebar) - 36px);
  display: flex; align-items: center; gap: 12px; padding: 10px 12px 10px 14px;
  background: var(--ink); color: #fff; border-radius: 10px; box-shadow: var(--shadow-lg); font-size: 13px;
}
.toast .btn { background: transparent; color: #fff; border-color: rgba(255,255,255,.35); }
.toast .btn:hover { background: rgba(255,255,255,.12); }
@media (max-width: 860px) { .toast { right: 18px; max-width: none; } }
.rent-table td { padding: 5px 6px; }

/* --- side by side: the whole list in one table --- */
.table-dialog { width: min(1240px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); padding: 16px 18px 14px; border: 0; border-radius: 14px; box-shadow: var(--shadow-lg); color: var(--ink); background: var(--bg); }
.table-dialog[open] { display: flex; flex-direction: column; gap: 10px; }
.table-dialog::backdrop { background: rgba(16, 24, 40, .45); }
.td-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 10px; }
.td-head h2 { font-size: 17px; }
.td-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.td-intro { margin: 0; max-width: 92ch; font-size: 13px; color: var(--ink-2); }
.td-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.td-tools:empty { display: none; }
.td-scroll { overflow: auto; min-height: 0; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.td-foot { margin: 0; font-size: 11.5px; color: var(--muted); }
.side { width: 100%; border-collapse: collapse; font-size: 13px; }
.side th { position: sticky; top: 0; z-index: 1; padding: 9px 10px; text-align: left; vertical-align: bottom; font-size: 12px; font-weight: 650; color: var(--ink-2); background: var(--surface-2); box-shadow: inset 0 -1px 0 var(--line); }
.side th span { display: block; font-size: 11.5px; font-weight: 500; color: var(--muted); }
.side td { padding: 9px 10px; border-top: 1px solid var(--line-2); vertical-align: top; }
.side tbody tr:first-child td { border-top: 0; }
.side strong { font-variant-numeric: tabular-nums; }
.side .c-rank { width: 1%; padding-right: 2px; }
.side .rank { display: flex; align-items: center; gap: 5px; }
.side .grip { display: inline-flex; padding: 4px 0; color: var(--muted); cursor: grab; }
.side .moves { display: inline-flex; flex-direction: column; }
.side .moves .icon-btn { padding: 1px 3px; }
.side .moves .icon-btn:disabled { opacity: .3; cursor: default; background: none; }
.side .moves svg { width: 14px; height: 14px; fill: none; }
.side .c-name { min-width: 190px; }
.side .c-note { width: 21%; min-width: 190px; }
.side td[data-label]:not(.c-note) { white-space: nowrap; }
.side textarea, [data-section="notes"] textarea { width: 100%; min-height: 34px; padding: 6px 8px; resize: none; overflow: hidden; font-size: 13px; }
.side .print-note { display: none; white-space: pre-wrap; }
.side tr.dragging { opacity: .45; }
.side tr.drop-before td { box-shadow: inset 0 2px 0 var(--accent); }
.side tr.drop-after td { box-shadow: inset 0 -2px 0 var(--accent); }
.side tr.cut td { padding: 5px 10px; text-align: center; font-size: 11.5px; color: var(--muted); background: var(--surface-2); border-top: 2px dashed #cfd1cb; }
@media (max-width: 720px) {
  /* No room for columns: each school becomes a block of "label: value" lines. */
  .table-dialog { width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh; margin: 0; padding: 12px; border-radius: 0; }
  .side thead, .side .grip { display: none; }
  .side, .side tbody, .side td { display: block; }
  .side tr[data-urn] { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 10px; padding: 10px; border-top: 1px solid var(--line); }
  .side tr.cut { display: block; }
  .side tbody tr:first-child { border-top: 0; }
  .side td { padding: 3px 0; border: 0; }
  .side .c-rank { grid-row: 1 / span 9; width: auto; padding: 0; }
  .side .rank { flex-direction: column; }
  .side td:not(.c-rank) { grid-column: 2; min-width: 0; width: auto; }
  .side td[data-label] { display: grid; grid-template-columns: 8.5em minmax(0, 1fr); column-gap: 8px; align-items: baseline; }
  .side td[data-label]:not(.c-note) { white-space: normal; }
  .side td[data-label]::before { content: attr(data-label); font-size: 12px; color: var(--muted); }
  .side td.c-note { grid-template-columns: minmax(0, 1fr); }
  .side td.c-note::before { margin-bottom: 3px; }
}

/* --- the report's options --- */
.report-dialog { width: min(460px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); padding: 0; border: 0; border-radius: 14px; box-shadow: var(--shadow-lg); color: var(--ink); background: var(--bg); }
.report-dialog::backdrop { background: rgba(16, 24, 40, .45); }
.report-dialog form { display: flex; flex-direction: column; gap: 10px; padding: 16px 18px 18px; }
.rp-option { display: flex; align-items: flex-start; gap: 9px; font-size: 13.5px; font-weight: 600; cursor: pointer; }
.rp-option[hidden] { display: none; }
.rp-option input { margin-top: 3px; flex: none; }
.rp-option .muted { display: block; font-weight: 400; font-size: 12.5px; }
.rp-working { display: flex; flex-direction: column; gap: 4px; }
.rp-working[hidden] { display: none; }
.rp-working progress { width: 100%; height: 8px; accent-color: var(--accent); }
.report-dialog .fb-actions { margin-top: 4px; }

/* --- printing: only what printPage() put in #print-root reaches the paper --- */
.print-root { display: none; }
@page { margin: 14mm 12mm; }
@page wide { size: A4 landscape; margin: 12mm; }
@page sheet { margin: 10mm 12mm; }
@media print {
  :root { height: auto; background: #fff; }
  body.printing { display: block; height: auto; overflow: visible; background: #fff; }
  body.printing > :not(.print-root) { display: none !important; }
  body.printing .print-root { display: block; color: #000; font-size: 10.5pt; }
  .print-root.wide { page: wide; }
  .print-root h1 { margin: 0 0 8pt; font-size: 15pt; }
  .print-root .td-foot { margin-top: 8pt; font-size: 8.5pt; color: #444; }
  .print-root .side { font-size: 9.5pt; }
  .print-root .side th { position: static; background: none; box-shadow: none; border-bottom: 1pt solid #000; white-space: normal; }
  .print-root .side td { border-top: .5pt solid #bbb; }
  .print-root .side .c-name { min-width: 150px; }
  .print-root .side .c-note { width: 17%; min-width: 0; white-space: normal; }
  .print-root .side tr { break-inside: avoid; }
  .print-root .side .grip, .print-root .side .moves, .print-root .side textarea { display: none; }
  .print-root .side .print-note { display: block; }
  .print-root .linkish { color: #000; font-weight: 650; }
  .print-root .chip, .print-root .pin-num, .print-root .overview, .print-root .rp i, .print-root .rp b { -webkit-print-color-adjust: exact; print-color-adjust: exact; }

  /* The report: a cover (map and table), a page for each school, then the sources. */
  body.printing .print-root.report { font-size: 9.5pt; line-height: 1.4; }
  .rp-brand { display: flex; align-items: center; gap: 5pt; font-size: 9pt; font-weight: 700; letter-spacing: .02em; color: #444; }
  .rp h1 { margin: 4pt 0 2pt; font-size: 19pt; line-height: 1.15; }
  .rp-sub { margin: 0 0 9pt; color: #444; }
  .rp-map { margin: 0 0 10pt; }
  .rp-map .overview { display: block; width: 100%; height: auto; border: .5pt solid #bbb; border-radius: 4pt; background: #fbfbf9; }
  .rp-map figcaption { display: flex; flex-wrap: wrap; gap: 3pt 12pt; margin-top: 4pt; font-size: 8.5pt; color: #444; }
  .rp-map figcaption span { display: inline-flex; align-items: center; gap: 4pt; }
  .rp-map figcaption i { width: 8pt; height: 8pt; border-radius: 50%; }
  .rp-map figcaption b { display: grid; place-items: center; width: 10pt; height: 10pt; border-radius: 2pt; font-size: 6.5pt; color: #fff; background: #1f2937; }
  .ov-boroughs path { fill: #fff; stroke: #b9bcb4; stroke-linejoin: round; }
  .ov-name { fill: #7d8078; stroke: #fff; paint-order: stroke; stroke-linejoin: round; text-anchor: middle; dominant-baseline: middle; font-weight: 600; letter-spacing: .02em; }
  .ov-dot { stroke: #fff; }
  .ov-place { fill: #1f2937; stroke: #fff; }
  .ov-num { fill: #fff; text-anchor: middle; dominant-baseline: central; font-weight: 700; }
  .ov-scale path { stroke: #555; fill: none; }
  .ov-scale text { fill: #555; dominant-baseline: middle; }
  .print-root.report .side { width: 100%; font-size: 8.5pt; }
  .print-root.report .side th { padding: 3pt 4pt; font-size: 8pt; }
  .print-root.report .side td { padding: 3.5pt 4pt; }
  .print-root.report .side td[data-label] .small { white-space: normal; } /* the figure and the commute's times stay on one line each */
  .print-root.report .side td[data-label='Commute'] .small { white-space: nowrap; }
  .print-root.report .side .c-name { min-width: 0; }
  .print-root.report .side .chip { padding: 1pt 5pt; font-size: 8pt; }
  .print-root.report .side th span { font-size: 7.5pt; }
  .print-root.report .side .small { font-size: 7.5pt; }
  .print-root.report .side .pin-num, .rp-school .pin-num { box-shadow: none; }
  .print-root.report .side .pin-num { width: 16pt; height: 16pt; font-size: 8pt; border: 0; }
  .print-root .pin-num.hollow { border: 1.2pt solid #475467; }
  .rp-map figcaption i.hollow { border: 1.2pt solid #475467; box-sizing: border-box; }
  .ov-dot.hollow { stroke: #475467; }
  .ov-num.hollow { fill: #1d2939; }
  .rp-school { break-before: page; }
  .rp-school .detail-title { margin-top: 0; }
  .rp-school .detail-title h2 { font-size: 16pt; }
  .rp-school .facts { font-size: 9.5pt; color: #222; }
  .rp-school .facts.muted { font-size: 9pt; color: #555; }
  .rp-cols { columns: 2; column-gap: 18pt; margin-top: 8pt; }
  .rp-block { margin-top: 9pt; padding-top: 6pt; border-top: 1pt solid #000; break-inside: avoid; }
  .rp-block.rp-long { break-inside: auto; } /* several inspections can outgrow a column */
  .rp-long > * { break-inside: avoid; }
  .rp-cols > .rp-block:first-child { margin-top: 0; }
  .rp-block h3 { margin: 0 0 4pt; font-size: 10.5pt; break-after: avoid; }
  .rp-block h4 { margin: 7pt 0 2pt; font-size: 9.5pt; }
  .rp-block p { margin: 3pt 0 0; }
  .rp-block .note, .rp-block .muted, .rp-block .small { font-size: 8.5pt; color: #444; }
  .rp-block .grades, .rp-block .points, .rp-block .stats { font-size: 9pt; }
  .rp-block .stat { break-inside: avoid; }
  .rp-block a { color: inherit; text-decoration: none; }
  .rp-block .btn, .rp-block .portals, .rp-block .logo, .rp-block button { display: none; }
  .rp-note { white-space: pre-wrap; }
  .rp-links { display: flex; flex-wrap: wrap; gap: 2pt 14pt; margin-top: 10pt; padding-top: 5pt; border-top: .5pt solid #bbb; font-size: 8pt; color: #444; overflow-wrap: anywhere; }
  /* One school on one sheet: the same page, set a little tighter so that it fits. */
  body.printing .print-root.sheet { page: sheet; font-size: 9pt; line-height: 1.35; }
  /* A block may run on into the next column, where it gets its rule again. */
  .rp-sheet .rp-block { margin-top: 7pt; padding-top: 5pt; break-inside: auto; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
  .rp-sheet .rp-block > *, .rp-sheet .rp-block .insp, .rp-sheet .rp-block .stats { break-inside: avoid; }
  .rp-sheet .rp-block h4 { break-after: avoid; }
  .rp-sheet .grades td { padding: 2.5pt 0; }
  .rp-sheet .rp-block .note, .rp-sheet .rp-block .muted, .rp-sheet .rp-block .small { font-size: 8pt; }
  .rp-sheet .rp-school { break-before: auto; }
  .rp-top { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 18pt; align-items: start; }
  .rp-top .rp-map { margin: 0; }
  .rp-top .rp-links { flex-direction: column; margin-top: 7pt; padding-top: 0; border-top: 0; }
  .rp-links a { color: inherit; text-decoration: none; }
  .rp-foot { margin-top: 8pt; padding-top: 5pt; border-top: .5pt solid #bbb; font-size: 7.5pt; line-height: 1.35; color: #444; }
  .rp-foot p { margin: 0 0 2pt; }
  .rp-foot a { color: inherit; text-decoration: none; }
  .rp-sources { break-before: page; font-size: 9pt; }
  .rp-sources h2 { margin: 0 0 6pt; font-size: 13pt; }
  .rp-sources ul { margin: 6pt 0; padding-left: 14pt; }
  .rp-sources li { margin-top: 3pt; }
  .rp-sources a { color: inherit; text-decoration: none; }
}
