/* ============================================================
 * school-card.css — GrammarBound school-detail card redesign.
 * Recreated from design/design_handoff_school_card (the signed-off
 * Dartford "compact panel"). "Navy + Brass" editorial system:
 * Spectral headings, a single load-bearing brass accent, mono
 * editorial labels, tight radii, 1px hairlines, 3px brass top-rule.
 *
 * Tokens are scoped to .sc (not :root) so they never collide with
 * the project's existing tokens.css palette. The card mounts inside
 * the existing #detail-panel positioning wrapper.
 * ============================================================ */

.sc {
  --navy: #16244C; --deep: #060F3C;
  --brass: #C99B43; --brass-d: #A6741F; --brass-tint: #F4EFE2; --brass-line: #E4D5A8;
  --ink: #0F172A; --ink2: #1E293B; --muted: #475569; --faint: #64748B; --quiet: #94A3B8;
  --line: #E2E8F0; --line-soft: #EEF2F7;
  --paper: #fff; --inset: #F8FAFC; --warm: #FAFAF7;
  --blue: #2A4FA0; --olive: #5E7245; --rose: #9C5570; --slate: #7C8AA0; --sienna: #9A3324;
  --green: #16A34A; --amber: #C99B43; --red: #DC2626;
  --mono: ui-monospace, "SF Mono", Menlo, "Roboto Mono", monospace;
  --serif: "Spectral", Georgia, "Times New Roman", serif;
  --ui: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --pad: 18px;

  font-family: var(--ui);
  color: var(--ink2);
  background: var(--paper);
  position: relative;
  box-sizing: border-box;
}
.sc *, .sc *::before, .sc *::after { box-sizing: border-box; }
.sc::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 3px;
  background: var(--brass); border-radius: 4px 4px 0 0; z-index: 3;
}

/* ── Editorial label (mono, uppercase, brass square marker) ── */
.sc-eyebrow {
  font-family: var(--mono); font-size: 10px; font-weight: 600;
  letter-spacing: .14em; text-transform: uppercase; color: var(--faint);
  display: inline-flex; align-items: center; gap: 7px; line-height: 1;
}
.sc-eyebrow::before {
  content: ""; width: 6px; height: 6px; background: var(--brass); flex: 0 0 auto;
}
.sc-eyebrow--bare::before { display: none; }

/* ── Header ────────────────────────────────────────────────── */
.sc-head { padding: var(--pad) var(--pad) 0; }
.sc-meta {
  font-family: var(--mono); font-size: 10.5px; letter-spacing: .08em;
  text-transform: uppercase; color: var(--faint);
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 9px;
}
.sc-meta > span { white-space: nowrap; }
.sc-meta .dot { width: 3px; height: 3px; border-radius: 50%; background: var(--quiet); }
.sc-meta .sc-gender { color: var(--navy); font-weight: 700; }
.sc-name {
  font-family: var(--serif); font-weight: 600; color: var(--navy);
  letter-spacing: -.012em; line-height: 1.1; margin: 0;
  font-size: 20px;
}
.sc-name-row { display: flex; align-items: flex-start; gap: 10px; }
.sc-name-row .sc-name { flex: 1; min-width: 0; }

/* close + track buttons */
.sc-iconbtn {
  flex: 0 0 auto; width: 30px; height: 30px; border: 1px solid var(--line);
  background: var(--paper); border-radius: 6px; cursor: pointer; color: var(--faint);
  display: flex; align-items: center; justify-content: center; font-size: 15px;
  transition: all .15s; padding: 0;
}
.sc-iconbtn:hover { border-color: var(--quiet); color: var(--ink2); background: var(--inset); }
.sc-track.on { color: var(--brass); border-color: var(--brass-line); background: var(--brass-tint); }
.sc-close { font-size: 18px; line-height: 1; }

/* ── Quality verdict (the lead) ────────────────────────────── */
.sc-verdict {
  margin: 16px var(--pad) 0; padding: 14px; border: 1px solid var(--line);
  border-radius: 8px; background: var(--warm);
  display: grid; gap: 14px;
}
.sc-grade-row { display: flex; align-items: stretch; gap: 13px; }
.sc-grade-badge {
  flex: 0 0 auto; display: flex; flex-direction: column; align-items: center;
  justify-content: center; min-width: 88px; padding: 9px 12px;
  border-radius: 6px; background: var(--navy); color: #fff; text-align: center;
}
.sc-grade-badge.ungraded { background: var(--inset); color: var(--navy); border: 1px solid var(--line); }
.sc-grade-badge .g {
  font-family: var(--serif); font-weight: 600; font-size: 17px; line-height: 1.05;
  letter-spacing: -.01em;
}
.sc-grade-badge.outstanding .g { color: var(--brass); }
.sc-grade-badge .gk {
  font-family: var(--mono); font-size: 8.5px; letter-spacing: .12em; text-transform: uppercase;
  margin-top: 4px; opacity: .8;
}
.sc-grade-meta { min-width: 0; }
.sc-grade-meta .gl { font-size: 12px; color: var(--muted); line-height: 1.45; }
.sc-grade-meta .gl b { color: var(--ink); font-weight: 600; }
.sc-ofsted-marks { display: grid; grid-template-columns: max-content max-content; gap: 6px 14px; margin-top: 8px; }
.sc-ofsted-mark {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 10px; color: var(--muted); font-family: var(--mono);
  letter-spacing: .02em;
}
.sc-ofsted-mark .pip { width: 7px; height: 7px; border-radius: 2px; flex: 0 0 auto; }

/* headline stats inside verdict */
.sc-head-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.sc-hstat { min-width: 0; }
.sc-hstat .k {
  font-family: var(--mono); font-size: 9.5px; letter-spacing: .1em; text-transform: uppercase;
  color: var(--faint); margin-bottom: 5px; display: block;
}
.sc-hstat .v {
  font-family: var(--serif); font-weight: 600; font-size: 26px; color: var(--ink);
  line-height: 1; letter-spacing: -.01em;
}
.sc-hstat .hval { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; margin-bottom: 9px; }
.sc-hstat .pctbadge {
  font-family: var(--mono); font-size: 10px; font-weight: 700; letter-spacing: .02em;
  color: var(--brass-d); background: var(--brass-tint); border: 1px solid var(--brass-line);
  padding: 2px 6px; border-radius: 4px; white-space: nowrap; align-self: center;
}
.sc-pct-row { margin-top: 7px; }
.sc-hstat .cap { display: flex; align-items: baseline; gap: 6px; margin-top: 6px; }
.sc-hstat .cap .rk { font-family: var(--ui); font-size: 12px; font-weight: 700; color: var(--navy); }
.sc-hstat .capsub { font-family: var(--mono); font-size: 8.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--quiet); }

/* ── Generic section ───────────────────────────────────────── */
.sc-section { padding: 16px var(--pad) 0; }
.sc-section-hd { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 11px; }
.sc-rule { height: 1px; background: var(--line); margin: 16px var(--pad) 0; }

/* key/value rows */
.sc-rows { display: grid; gap: 0; }
.sc-row {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 7px 8px; margin: 0 -8px; border-radius: 6px;
  border-bottom: 1px solid var(--line-soft); transition: background .15s;
}
.sc-row:hover { background: var(--inset); }
.sc-row:last-child { border-bottom: 0; }
.sc-row .k { font-size: 12px; color: var(--faint); flex: 0 0 auto; }
.sc-row .v { font-size: 12.5px; color: var(--ink2); font-weight: 600; text-align: right; display: flex; align-items: center; gap: 7px; flex-wrap: wrap; justify-content: flex-end; }
.sc-row .v .unit { color: var(--quiet); font-weight: 500; }
.sc-row .v a { color: var(--brass-d); text-decoration: none; }
.sc-row .v a:hover { text-decoration: underline; }
.sc-locked .k { display: flex; align-items: center; gap: 6px; }
.sc-locked .lock { color: var(--quiet); display: inline-flex; }
.sc-locked .lock svg { width: 12px; height: 12px; }
.sc-unlock {
  font-size: 11px; font-weight: 700; color: var(--brass-d); text-decoration: none;
  font-family: var(--mono); letter-spacing: .02em; white-space: nowrap; cursor: pointer;
}
.sc-unlock:hover { text-decoration: underline; }

/* mini stat grid (compact tiles) */
.sc-subhd { margin: 16px 0 11px; padding-top: 14px; border-top: 1px solid var(--line); }
.sc-tiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.sc-tile { border: 1px solid var(--line); border-radius: 6px; padding: 10px 11px; background: var(--paper);
  transition: border-color .15s, box-shadow .15s, transform .15s; }
.sc-tile:hover { border-color: var(--brass-line); box-shadow: 0 5px 16px rgba(8,14,38,.07); transform: translateY(-1px); }
.sc-tile .k {
  font-family: var(--mono); font-size: 9px; letter-spacing: .1em; text-transform: uppercase;
  color: var(--faint); display: block; margin-bottom: 6px;
}
.sc-tile .v { font-size: 15px; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; }
.sc-tile .v small { font-size: 11px; color: var(--faint); font-weight: 600; }
.sc-tile .viz { margin-top: 8px; }
.sc-tile--locked { display: flex; flex-direction: column; gap: 8px; }
.sc-tile-unlock { display: inline-flex; align-items: center; gap: 6px; font-family: var(--mono); font-size: 11px; font-weight: 700; letter-spacing: .02em; color: var(--brass-d); text-decoration: none; }
.sc-tile-unlock:hover { text-decoration: underline; }
.sc-tile-unlock .sc-locked-ic { display: inline-flex; color: var(--brass-d); }
.sc-tile-unlock .sc-locked-ic svg { width: 13px; height: 13px; }

/* admission priority criteria cards */
.sc-crit-wrap { margin-bottom: 15px; }
.sc-crit-cap {
  font-family: var(--mono); font-size: 9px; letter-spacing: .1em; text-transform: uppercase;
  color: var(--faint); margin-bottom: 9px;
}
.sc-crit { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.sc-crit-card {
  border: 1px solid var(--line); border-radius: 6px; padding: 9px 10px; background: var(--paper);
  display: flex; gap: 8px; align-items: flex-start; transition: border-color .15s, box-shadow .15s, transform .15s;
}
.sc-crit-card:hover { border-color: var(--brass-line); box-shadow: 0 4px 12px rgba(8,14,38,.06); transform: translateY(-1px); }
.sc-crit-card .n {
  font-family: var(--mono); font-size: 10px; font-weight: 700; color: var(--brass-d);
  background: var(--brass-tint); border: 1px solid var(--brass-line); width: 19px; height: 19px;
  border-radius: 5px; display: flex; align-items: center; justify-content: center; flex: 0 0 auto;
}
.sc-crit-card .t { font-size: 11.5px; font-weight: 600; color: var(--ink2); line-height: 1.25; }
.sc-crit-card .d { font-size: 10px; color: var(--faint); margin-top: 2px; line-height: 1.3; }
.sc-crit-card:last-child:nth-child(odd) { grid-column: 1 / -1; }

/* destinations legend */
.sc-legend { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 9px; }
.sc-legend span { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; color: var(--muted); }
.sc-legend i { width: 9px; height: 9px; border-radius: 2px; flex: 0 0 auto; }

/* eligibility chip (understated) */
.sc-elig {
  display: inline-flex; align-items: center; gap: 8px; padding: 5px 10px;
  border-radius: 5px; font-size: 11.5px; font-weight: 600; border: 1px solid;
}
.sc-elig .dot { width: 8px; height: 8px; border-radius: 50%; flex: 0 0 auto; }
.sc-elig.green { background: #F0FDF4; border-color: #BBF7D0; color: #15803D; }
.sc-elig.green .dot { background: var(--green); }
.sc-elig.amber { background: var(--brass-tint); border-color: var(--brass-line); color: var(--brass-d); }
.sc-elig.amber .dot { background: var(--amber); }
.sc-elig.red { background: #FEF2F2; border-color: #FECACA; color: #B91C1C; }
.sc-elig.red .dot { background: var(--red); }
.sc-elig.neutral { background: var(--inset); border-color: var(--line); color: var(--muted); }
.sc-elig.neutral .dot { background: var(--slate); }

/* callout / note */
.sc-note {
  font-size: 11px; line-height: 1.5; color: var(--muted); background: var(--inset);
  border: 1px solid var(--line); border-radius: 6px; padding: 8px 10px; margin-top: 10px;
}
.sc-note.warn { background: #FFFBEB; border-color: #FDE68A; color: #92400E; }

/* segmented tab control — icons + sliding indicator */
.sc-tabs {
  position: relative; display: flex; gap: 0; margin: 16px var(--pad) 4px; background: var(--inset);
  border: 1px solid var(--line); border-radius: 9px; padding: 4px;
}
.sc-tab-ind {
  position: absolute; top: 4px; bottom: 4px; left: 4px;
  width: calc((100% - 8px) / var(--n, 4));
  transform: translateX(calc(var(--i, 0) * 100%));
  background: var(--paper); border-radius: 6px;
  box-shadow: 0 1px 3px rgba(15,23,42,.13), 0 0 0 1px rgba(15,23,42,.03);
  transition: transform .3s cubic-bezier(.34,1.25,.5,1); z-index: 0;
}
.sc-tabs button {
  position: relative; z-index: 1; flex: 1; border: 0; background: transparent; cursor: pointer;
  padding: 7px 3px 6px; display: flex; flex-direction: column; align-items: center; gap: 4px;
  font-family: var(--ui); font-size: 10.5px; font-weight: 600; color: var(--faint);
  letter-spacing: .005em; transition: color .2s;
}
.sc-tabs button .ic { color: var(--quiet); display: flex; transition: color .2s, transform .25s; }
.sc-tabs button:hover { color: var(--ink2); }
.sc-tabs button:hover .ic { color: var(--faint); transform: translateY(-1px); }
.sc-tabs button.active { color: var(--navy); }
.sc-tabs button.active .ic { color: var(--brass); }

/* footer */
.sc-foot { margin-top: 16px; padding: 12px var(--pad); border-top: 1px solid var(--line); background: var(--inset); }
.sc-foot-src { font-size: 10px; line-height: 1.5; color: var(--quiet); font-family: var(--mono); letter-spacing: .01em; margin-top: 10px; }
.sc-foot-src.hidden { display: none; }
.sc-pro {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 9px 11px; background: var(--navy); border-radius: 6px;
}
.sc-pro .lab { font-size: 11.5px; color: #DCE3F4; line-height: 1.35; }
.sc-pro .lab b { color: #fff; font-weight: 600; }
.sc-pro a {
  flex: 0 0 auto; font-size: 11px; font-weight: 700; color: var(--deep); background: var(--brass);
  text-decoration: none; padding: 6px 11px; border-radius: 5px; transition: background .15s;
  font-family: var(--mono); letter-spacing: .02em; cursor: pointer;
}
.sc-pro a:hover { background: #D9B45E; }
.sc-pro.hidden { display: none; }

/* ── Premium "Pro" bands (multi-year cutoff + qualifying score) ── */
.sc-pro-bands {
  margin-top: 14px; padding: 12px; border: 1px solid var(--brass-line);
  border-radius: 8px; background: var(--warm); display: grid; gap: 14px;
}
.sc-pro-bands-hd { display: flex; align-items: center; justify-content: space-between; }
.sc-protag {
  font-family: var(--mono); font-size: 8.5px; font-weight: 700; letter-spacing: .12em;
  color: var(--deep); background: var(--brass); padding: 2px 6px; border-radius: 3px;
}
.sc-band-k {
  font-family: var(--mono); font-size: 9px; letter-spacing: .1em; text-transform: uppercase;
  color: var(--faint); margin-bottom: 9px;
}
.sc-band-bars { display: flex; align-items: flex-end; gap: 14px; height: 56px; }
.sc-band-col { display: flex; flex-direction: column; align-items: center; gap: 4px; justify-content: flex-end; }
.sc-band-col .bv { font-family: var(--mono); font-size: 10px; font-weight: 700; font-variant-numeric: tabular-nums; }
.sc-band-col .bar { width: 26px; border-radius: 2px 2px 0 0; }
.sc-band-col .by { font-family: var(--mono); font-size: 8.5px; letter-spacing: .06em; color: var(--quiet); }

/* qualifying score band — markers only; values shown in legend below */
.sc-scoreband { position: relative; height: 8px; margin: 4px 0 5px; }
.sc-scoreband .track { position: absolute; inset: 0; background: var(--line-soft); border-radius: 4px; }
.sc-scoreband .fill { position: absolute; top: 0; height: 8px; background: var(--brass); border-radius: 4px; opacity: .4; }
.sc-scoreband .tick { position: absolute; top: -3px; width: 2px; margin-left: -1px; height: 14px; border-radius: 1px; }
.sc-scoreband .tick.pass { background: var(--slate); }
.sc-scoreband .tick.offer { background: var(--navy); }
.sc-scoreband-scale { display: flex; justify-content: space-between; font-family: var(--mono); font-size: 8px; color: var(--quiet); letter-spacing: .06em; }
.sc-score-legend { display: flex; gap: 16px; margin-top: 9px; }
.sc-score-legend span { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 600; color: var(--ink2); }
.sc-score-legend i { width: 9px; height: 9px; border-radius: 2px; flex: 0 0 auto; }
.sc-score-legend .pass { background: var(--slate); }
.sc-score-legend .offer { background: var(--navy); }

/* ── Links to authoritative admissions sources ── */
.sc-links { display: grid; gap: 8px; margin-top: 14px; }
.sc-link {
  display: flex; align-items: center; gap: 11px; padding: 11px 12px;
  border: 1px solid var(--line); border-radius: 7px; background: var(--paper);
  text-decoration: none; transition: border-color .15s, box-shadow .15s, transform .15s;
}
.sc-link.hidden { display: none; }
.sc-link:hover { border-color: var(--brass-line); box-shadow: 0 5px 16px rgba(8,14,38,.07); transform: translateY(-1px); }
.sc-link .ic {
  flex: 0 0 auto; width: 30px; height: 30px; border-radius: 6px; background: var(--brass-tint);
  color: var(--brass-d); display: flex; align-items: center; justify-content: center; border: 1px solid var(--brass-line);
}
.sc-link .tx { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.sc-link .tx b { font-size: 12.5px; font-weight: 600; color: var(--navy); }
.sc-link .tx small { font-size: 10.5px; color: var(--faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sc-link .arr { flex: 0 0 auto; color: var(--quiet); font-size: 14px; transition: color .15s, transform .15s; }
.sc-link:hover .arr { color: var(--brass-d); transform: translate(2px, -2px); }

/* capacity fill bar (Info tab) */
.sc-cap-line { margin-bottom: 13px; }
.sc-cap-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 6px; }
.sc-cap-head .pupils { font-size: 12.5px; color: var(--ink2); font-weight: 600; }
.sc-cap-head .full { font-family: var(--mono); font-size: 11px; font-weight: 700; color: var(--brass-d); }
.sc-cap-head .full.over { color: var(--sienna); }
.sc-cap-track { position: relative; height: 6px; border-radius: 3px; background: var(--line-soft); }
.sc-cap-track .fill { position: absolute; inset: 0 auto 0 0; border-radius: 3px; background: var(--brass); }
.sc-cap-track .fill.over { background: var(--sienna); }
.sc-cap-track .tick { position: absolute; top: -2px; bottom: -2px; left: calc(100% - 1px); width: 1.5px; background: var(--quiet); }
.sc-cap-sub { font-size: 11px; color: var(--faint); margin-top: 6px; }

/* big stat (Leavers headline) */
.sc-bigstat { display: flex; align-items: baseline; gap: 8px; margin-bottom: 9px; }
.sc-bigstat .n { font-family: var(--serif); font-weight: 600; font-size: 26px; color: var(--ink); line-height: 1; }
.sc-bigstat .lab { font-size: 12px; color: var(--muted); }
.sc-bar { display: flex; height: 13px; border-radius: 3px; overflow: hidden; gap: 1.5px; }
.sc-bar > i { display: block; }

/* tab panes — only the active one is in flow */
.sc-pane { display: none; }
.sc-pane.active { display: block; }

/* Pro-gated teaser block (free users) — keeps the brass framing + PRO tag. */
.sc-locked-block { background: var(--inset); }
.sc-locked-cta { display: flex; align-items: center; gap: 10px; }
.sc-locked-ic { flex: 0 0 auto; color: var(--brass-d); display: inline-flex; }
.sc-locked-ic svg { width: 16px; height: 16px; }
.sc-locked-tx { flex: 1; min-width: 0; font-size: 11.5px; line-height: 1.4; color: var(--muted); }
.sc-locked-block .sc-unlock { flex: 0 0 auto; align-self: center; }

/* reveal animation for tab body content */
.sc-reveal { opacity: 0; transform: translateY(7px); transition: opacity .34s ease, transform .34s cubic-bezier(.2,.7,.3,1); }
.sc-reveal.in { opacity: 1; transform: translateY(0); }

/* sparkline / rank-trend draw-in */
.sc-spark-line { stroke-dasharray: 100; stroke-dashoffset: 100; animation: sc-draw .9s cubic-bezier(.4,0,.2,1) forwards; }
@keyframes sc-draw { to { stroke-dashoffset: 0; } }

/* multi-site list inside an Info row */
.sc-sites-list { margin: 0; padding: 0; list-style: none; text-align: right; }
.sc-sites-list li { font-size: 12px; font-weight: 600; color: var(--ink2); line-height: 1.4; }

/* Tier-Analysis badge row in the header (FEAT-155) */
.detail-tier-badge-row { margin-bottom: 8px; }
.detail-tier-badge-row.hidden { display: none; }

/* inline secondary admissions links (info / prep) */
.sc-admlinks-inline { display: flex; flex-direction: column; gap: 4px; margin-top: 10px; }
.sc-admlinks-inline a { font-size: 11.5px; font-weight: 600; color: var(--brass-d); text-decoration: none; }
.sc-admlinks-inline a:hover { text-decoration: underline; }
.sc-admlinks-inline a.hidden { display: none; }

/* existing-feature containers injected into panes keep their own styling but
   inherit sensible spacing inside the card. */
/* Legacy catchment-status line — toned down to a subtle inline note (the
   "Priority/Open" chip already carries the headline). Overrides style.css. */
#detail-catchment-status { font-size: 11px; padding: 0; margin: 0 0 10px; border-radius: 0; display: flex; align-items: center; gap: 6px; }
#detail-catchment-status:not(:empty)::before { content: ""; width: 6px; height: 6px; border-radius: 50%; flex: 0 0 auto; background: currentColor; }
#detail-catchment-status.available { background: none; color: var(--green); }
#detail-catchment-status.missing { background: none; color: var(--sienna); }
#detail-score:not(:empty), #detail-probability:not(:empty), #gravesend-showcase:not(.hidden) { margin-top: 12px; }

/* data-not-available fallback */
.sc-empty { font-size: 12px; color: var(--faint); padding: 14px var(--pad); }

/* ── Panel shell: fixed-height with a scrollable body ── */
.sc--panel { display: flex; flex-direction: column; max-height: 600px;
  border-radius: 11px; overflow: hidden; border: 1px solid var(--line);
  box-shadow: 0 10px 34px rgba(8,14,38,.16), 0 2px 8px rgba(8,14,38,.08); }
.sc--panel .sc-head, .sc--panel .sc-tabs, .sc--panel .sc-foot { flex: 0 0 auto; }
.sc--panel .sc-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding-bottom: 6px; }

/* ── Collapsed state: header only, so the map/catchment shows through ──
   The chevron flips to point up; everything below the header is hidden. */
.sc-collapse svg { transition: transform .2s; }
.sc--panel.sc-collapsed { max-height: none; }
.sc--panel.sc-collapsed .sc-head { padding-bottom: var(--pad); }
.sc--panel.sc-collapsed .sc-tabs,
.sc--panel.sc-collapsed .sc-body,
.sc--panel.sc-collapsed .sc-foot { display: none; }
.sc--panel.sc-collapsed .sc-collapse svg { transform: rotate(180deg); }
/* The report-a-boundary link lives outside the card, so hide it alongside. */
#detail-panel:has(.sc--panel.sc-collapsed) > #detail-report-link { display: none; }

@media (prefers-reduced-motion: reduce) {
  .sc-reveal { transition: none; opacity: 1; transform: none; }
  .sc-tab-ind { transition: none; }
  .sc-spark-line { animation: none; stroke-dashoffset: 0; }
}
