/* ===== Design Tokens ===== */
:root {
  /* One navy for every piece of text. `--text-dark` (#1a1a2e), `--text-muted`
     (#6b7280) and the old `--navy` (#1e2d6b) were three near-identical inks
     applied by habit rather than by rule; they all resolve here now. The three
     names are kept so call sites still read as heading / body / secondary, but
     they no longer differ in colour — weight and size carry the hierarchy. */
  --navy: #232d63;
  --navy-dark: #141f4d;
  --orange: #f7a125;
  --teal: #00b4f9;
  --green: #82d043;
  /* The negative counterpart to --green, for a stat that moved the wrong way.
     Tuned for the navy hero the stats bar sits on: 6.63:1 there against
     --green's 6.79:1, so a rise and a fall carry the same visual weight. */
  --red: #ffa0a0;
  --light-bg: #f3f4fa;
  --border: #e4e4e7;
  --text-dark: var(--navy);
  --text-muted: var(--navy);
  --white: #ffffff;
  --font: 'Hanken Grotesk', system-ui, -apple-system, sans-serif;
  --shadow: 0 2px 12px rgba(35, 45, 99, 0.08);

  /* Status badge fills. Text is always navy — the fill carries the status. */
  --status-green: #ecf8e3;
  --status-yellow: #fef1de;
  --status-red: #fedede;
  --status-blue: #e5f7fe;
  --status-grey: #e4e4e7;
}

/* ===== Reset & Base ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* Navy behind the page: dragging past the footer on a phone (the overscroll
   bounce) showed the white body background as blank space below the navy
   footer. Every section paints its own background, so nothing else changes. */
html {
  scroll-behavior: smooth;
  background: var(--navy);
  overscroll-behavior-y: none;
}

body {
  font-family: var(--font);
  color: var(--text-dark);
  background: var(--white);
  line-height: 1.6;
}

a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }

/* ===== Typography ===== */
h1 { font-size: clamp(1.75rem, 3vw, 2.5rem); font-weight: 700; line-height: 1.2; }
h2 { font-size: clamp(1.4rem, 2.5vw, 2rem); font-weight: 700; line-height: 1.3; }
h3 { font-size: 1.25rem; font-weight: 700; }
h4 { font-size: 1rem; font-weight: 600; }

.label-small {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* ===== Beta Banner =====

   A sticky notice above the nav on every page, injected by components/load.js.

   Geometry is measured from mocks/layout/beta-banner-*.png at a 1440 viewport:
   the card insets 40px from each edge, stands 83px tall expanded and 56px
   collapsed, and the whole band comes to 119px. The mock puts 37px of navy
   above the card and none below, which reads as hero padding rather than a
   deliberate asymmetry, so the band uses a symmetric 18px — same total height,
   and it holds up as a standalone bar once it detaches from the hero.

   The card colour is sampled straight from the mock. It is not derivable from
   the token set (it is neither --navy lightened nor --teal over navy), so it
   lives here as a literal rather than as a wrong-but-tidy blend. */
.beta-banner {
  position: sticky;
  top: 0;
  z-index: 200;                 /* above .nav's 100, below the login overlay's 1000 */
  background: var(--navy);
  padding: 18px 40px;
}

.beta-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: #2d6091;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 8px;
  /* 1rem vertical lands the card on 82px expanded / 55px collapsed, against
     the mock's 83 / 56. The pair only resolves together: the 27px difference
     between the two states is the body line plus its gap, which is why the
     line-height and margin below are set to sum to exactly that. */
  padding: 1rem 1.35rem;
  color: var(--white);
}

.beta-text { flex: 1; min-width: 0; }

.beta-title {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  /* Sized from the mock rather than guessed: its title glyph run measures
     269px against 221px at 0.95rem, which puts it at ~18.4px. The 1.2
     line-height is not a style choice either — it is what makes the collapsed
     card 56px, matching the mock, at that font size. Change one and the card
     height stops matching, so they move together. */
  font-size: 1.15rem;
  font-weight: 600;
  line-height: 1.2;
}

/* 20px in the mock, and it must not shrink when the title wraps on mobile. */
.beta-icon {
  flex: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--orange);
  color: var(--navy);
  font-size: 0.75rem;
  font-weight: 800;
  font-style: normal;
  line-height: 20px;
  text-align: center;
}

/* Collapsing animates max-height rather than toggling [hidden], so the motion
   is available; `visibility` is what actually takes the copy out of the
   accessibility tree, which max-height alone would not do. */
.beta-body {
  font-size: 0.91rem;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.95);
  max-height: 4rem;
  overflow: hidden;
  visibility: visible;
  transition: max-height 0.22s ease, visibility 0s, margin-top 0.22s ease;
  margin-top: 0.3rem;
}

.beta-banner.is-collapsed .beta-body {
  max-height: 0;
  visibility: hidden;
  margin-top: 0;
  transition: max-height 0.22s ease, visibility 0s linear 0.22s, margin-top 0.22s ease;
}

.beta-body a {
  color: var(--white);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.beta-body a:hover { color: var(--orange); }

.beta-toggle {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  /* A 32px target is taller than the title line, so on its own it set the
     collapsed card's height — 66px against the mock's 56. Pulling it back into
     the card's own padding keeps the comfortable hit area without letting it
     drive layout: 32 - 10 = 22px of flex line, which the title already fills. */
  margin-block: -5px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--white);
  cursor: pointer;
}

.beta-toggle:hover { background: rgba(255, 255, 255, 0.14); }

.beta-toggle:focus-visible {
  outline: 2px solid var(--white);
  outline-offset: 2px;
}

/* One right-pointing chevron for both states, as in the mock: collapsed points
   right, expanded rotates a quarter turn to point down. */
.beta-toggle svg {
  width: 20px;
  height: 20px;
  transform: rotate(90deg);
  transition: transform 0.22s ease;
}

.beta-banner.is-collapsed .beta-toggle svg { transform: rotate(0deg); }

.beta-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (prefers-reduced-motion: reduce) {
  .beta-body,
  .beta-toggle svg { transition: none; }
}

@media (max-width: 1024px) {
  .beta-banner { padding: 14px 24px; }
  .beta-card { padding: 0.7rem 1rem; gap: 0.75rem; }
  .beta-title { font-size: 1.05rem; }
  .beta-body { font-size: 0.85rem; max-height: 5rem; }
}

@media (max-width: 640px) {
  .beta-banner { padding: 10px 16px; }
  .beta-card { padding: 0.65rem 0.8rem; gap: 0.5rem; align-items: flex-start; }
  .beta-title { font-size: 0.98rem; }
  /* Room for the sentence to wrap hard at this width. */
  .beta-body { font-size: 0.8rem; max-height: 8rem; }
  .beta-toggle { width: 28px; height: 28px; }
  .beta-toggle svg { width: 18px; height: 18px; }
}


/* In-page anchors land under the sticky banner without this — following the
   nav's "Roadmap" link put #solution-1 at top: -17px, i.e. fully behind it.
   These are the only linked targets on the site: the roadmap sections and the
   footer's About link. The extra 1rem is breathing room, not just clearance. */
.solution-section,
footer[id] {
  scroll-margin-top: calc(var(--beta-h, 0px) + 1rem);
}

/* ===== Navigation ===== */
.nav {
  position: sticky;
  /* Defensive, not load-bearing today: this `position: sticky` is currently
     inert, because the nav is wrapped in #header-container, which is exactly
     nav-height tall — a sticky box cannot travel outside its parent, so the
     nav has never actually stuck. If that wrapper is ever removed, the nav
     would stick at top: 0 and disappear behind the beta banner, which sits at
     top: 0 with a higher z-index. --beta-h (kept in sync by
     components/load.js) makes it land below the banner instead. The fallback
     covers pages that do not load the banner. */
  top: var(--beta-h, 0px);
  z-index: 100;
  background: var(--navy);
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 130px;
  box-shadow: none;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.nav-logo-text {
  color: var(--white);
  font-weight: 800;
  font-size: 1rem;
  line-height: 1.2;
}

.nav-logo-text span {
  color: var(--orange);
}

.nav-logo-icon {
  width: 120px;
  height: 120px;
}

.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
}

.nav-links a {
  color: rgba(255,255,255,0.85);
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.2s;
  padding-bottom: 2px;
  border-bottom: 2px solid transparent;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--white);
  border-bottom-color: var(--orange);
}

/* ===== Hero (Dark) ===== */
.hero-dark {
  background: var(--navy);
  color: var(--white);
  text-align: center;
  padding: 4rem 2rem 5rem;
  position: relative;
  overflow: hidden;
  min-height: 420px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

/* The art sits behind the copy. Without the z-index pair it painted over the
   overline and the H1 at 0.5 opacity — the stats block below escaped only
   because `.goal-progress` already carried a z-index — and how much of the
   headline it washed out depended on the viewport width, since the image is
   sized `100% auto` and anchored to the bottom. */
.hero-dark > * {
  position: relative;
  z-index: 1;
}

.hero-dark::after {
  content: '';
  position: absolute;
  z-index: 0;
  bottom: 0;
  left: 0;
  right: 0;
  height: 100%;
  background: url("../assets/background/header-background.png") no-repeat;
  background-size: 100% auto;
  background-position: center calc(100% + 190px);
  opacity: 0.5;
  pointer-events: none;
}

.hero-dark .overline {
  color: rgba(255,255,255,0.7);
  margin-bottom: 1rem;
  letter-spacing: 0.15em;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
}

.hero-dark h1 {
  max-width: min(814px, 100%);
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  font-weight: 400;
  line-height: 1.5;
}

.hero-dark h1 strong {
  color: var(--orange);
  font-weight: 800;
}

/* ===== Goal Progress / Stats Bar ===== */
/* z-index 2, one above the hero's other children (`.hero-dark > *` gives each
   1): the stat tooltips open downward out of this block, and at 1 the Learn
   more button — later in the DOM, same layer — painted over the 3-8 bubble. */
.goal-progress {
  margin: 2.75rem 0 1.5rem;
  position: relative;
  z-index: 2;
}

.goal-progress-title {
  color: rgba(255,255,255,0.7);
  margin-bottom: 1.25rem;
}

.stats-bar {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 0;
}

.stat-item {
  padding: 0 2.5rem;
  text-align: center;
  border-right: 1px solid rgba(255,255,255,0.25);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.stat-item:last-child { border-right: none; }

.stat-value {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--white);
  line-height: 1;
}

.stat-value span { font-size: 1.6rem; }

.stat-value-empty { color: rgba(255,255,255,0.4); }

.stat-delta {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--green);
  vertical-align: super;
  margin-left: 0.15rem;
}

/* A decline. Without this the delta inherits --green, which is how the 3-8
   tile showed a 6-point drop in the same colour as a rise. */
.stat-delta-down {
  color: var(--red);
}

.stat-label {
  position: relative;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.7);
  margin-top: 0.4rem;
}

.stat-pill {
  display: inline-block;
  margin-top: 0.6rem;
  padding: 0.2rem 0.7rem;
  border-radius: 20px;
  font-size: 0.65rem;
  font-weight: 700;
  background: var(--white);
}

/* ----- Measure tooltips on the stats bar -----
   Styled after .msr-map-tip so a tooltip reads the same here as it does over a
   chart: white card, --border hairline, 8px radius, navy text.

   The bubble is absolutely positioned and starts at visibility:hidden rather
   than display:none — out of flow so it can never move the stat values, and
   still in the accessibility tree for aria-describedby. Shown on hover AND on
   keyboard focus, and kept open while the pointer is over the bubble itself so
   the text stays selectable. */
/* Out of flow, so the icon adds no width to the label. In flow it made
   "K-2 STUDENTS" the widest child of its column and pushed two stat items 3px
   wider — small, but the brief is that the tooltips change no layout. */
.stat-tip {
  position: absolute;
  left: 100%;
  top: 50%;
  transform: translateY(-50%);
  margin-left: 0.3rem;
  line-height: 0;
}

.stat-tip-btn {
  display: block;
  width: 14px;
  height: 14px;
  padding: 0;
  border: none;
  background: none;
  color: rgba(255, 255, 255, 0.7);
  cursor: pointer;
  transition: color 0.15s;
}

.stat-tip-btn svg { width: 100%; height: 100%; display: block; }

.stat-tip-btn:hover,
.stat-tip-btn:focus-visible { color: var(--white); }

.stat-tip-btn:focus-visible {
  outline: 2px solid var(--white);
  outline-offset: 3px;
  border-radius: 50%;
}

.stat-tip-bubble {
  position: absolute;
  /* Below the icon, not above it. Above, the bubble covered the very figure the
     reader is asking about; below it only overlaps the status pill. */
  top: calc(100% + 9px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 6;
  width: max-content;
  max-width: 15rem;
  padding: 0.5rem 0.7rem;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 4px 14px rgba(35, 45, 99, 0.18);
  /* The stat label is uppercase 0.65rem; tooltip prose is neither. */
  font-size: 0.75rem;
  font-weight: 400;
  line-height: 1.45;
  letter-spacing: 0;
  text-transform: none;
  text-align: left;
  color: var(--navy);
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.15s, visibility 0.15s;
}

/* The arrow, drawn as a rotated square so it inherits the card's border. */
.stat-tip-bubble::after {
  content: '';
  position: absolute;
  bottom: 100%;
  left: 50%;
  width: 8px;
  height: 8px;
  margin: 0 0 -5px -4px;
  background: var(--white);
  border-left: 1px solid var(--border);
  border-top: 1px solid var(--border);
  transform: rotate(45deg);
}

/* `:focus`, not `:focus-visible`, for revealing the bubble — a tap or a click
   gives focus without focus-visible, and on a touch device there is no hover to
   fall back on. The visible ring stays on :focus-visible so a mouse click
   doesn't leave an outline behind. */
.stat-tip:hover .stat-tip-bubble,
.stat-tip-btn:focus + .stat-tip-bubble {
  visibility: visible;
  opacity: 1;
}

@media (max-width: 768px) {
  /* Centred on the viewport-narrow card, the bubble would overflow its column. */
  .stat-tip-bubble { max-width: 12rem; }
}

.stat-pill-on { color: var(--navy); }
.stat-pill-pending { background: rgba(255,255,255,0.18); color: rgba(255,255,255,0.85); }

/* ===== Buttons ===== */
.btn {
  display: inline-block;
  padding: 0.75rem 2rem;
  border-radius: 4px;
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  border: none;
  transition: opacity 0.2s, transform 0.1s;
}

.btn:hover { opacity: 0.9; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-orange { background: var(--orange); color: var(--white); }
.btn-teal { background: var(--teal); color: var(--white); }
.btn-outline {
  background: transparent;
  color: var(--teal);
  border: 2px solid var(--teal);
}
.btn-outline:hover { background: var(--teal); color: var(--white); opacity: 1; }
.btn-navy { background: var(--navy); color: var(--white); }

/* ===== Section ===== */
.section { padding: 4rem 2rem; }
.section-light { background: var(--white); }
.section-gray { background: var(--light-bg); }

.section-header {
  text-align: center;
  margin-bottom: 3rem;
}

.section-header .overline {
  color: var(--teal);
  margin-bottom: 0.5rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.section-subtitle {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-top: 0.5rem;
}

.link-orange { color: var(--orange); font-weight: 600; }
.link-blue { color: var(--teal); font-weight: 600; }
.link-orange:hover, .link-blue:hover { text-decoration: underline; }

.container {
  max-width: 1200px;
  margin: 0 auto;
}

/* ===== Focus Areas ===== */
.focus-areas {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  padding: 1rem 0;
}

.focus-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  width: 110px;
  text-align: center;
  cursor: pointer;
  transition: transform 0.2s;
}

.focus-item:hover { transform: translateY(-4px); }

.focus-num {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--white);
}

.focus-num.orange { background: var(--orange); }
.focus-num.blue { background: var(--teal); }

.focus-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-dark);
  line-height: 1.3;
}

/* ===== Solution / Accelerant Section ===== */
.solution-section {
  padding: 3.5rem 2rem;
  border-top: 6px solid var(--orange);
}

.solution-section.is-accelerant {
  border-top-color: var(--teal);
}

.solution-layout {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1.7fr;
  gap: 4rem;
  align-items: start;
}

.solution-label {
  color: var(--navy);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

/* Solution and Accelerant labels read the same navy — the section's top rule
   and its Learn more button still carry the orange/teal distinction. */
.solution-section.is-accelerant .solution-label {
  color: var(--navy);
}

.solution-left h2 {
  font-size: 1.6rem;
  color: var(--navy);
  margin-bottom: 1.25rem;
}

/* ===== Objectives & Activities ===== */
.sub-label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.sub-label-spaced { margin-top: 2rem; }

.objective-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--border);
}

/* The status badge keeps its full width on one line; the objective text
   beside it wraps instead. */
.objective-row .badge { flex-shrink: 0; }

.objective-text {
  font-size: 1rem;
  font-weight: 700;
  color: var(--navy);
  line-height: 1.4;
}

.activity-row {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.85rem;
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--border);
}

.activity-row:last-child { border-bottom: none; }

.activity-num {
  font-size: 0.85rem;
  font-weight: 400;
  color: var(--text-muted);
}

.activity-text {
  font-size: 0.85rem;
  color: var(--text-dark);
  line-height: 1.5;
}

/* ===== Badges ===== */
.badge {
  display: inline-block;
  padding: 0.3rem 0.8rem;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 600;
  white-space: nowrap;
}

.badge-green { background: var(--status-green); color: var(--navy); }
.badge-amber { background: var(--status-yellow); color: var(--navy); }
.badge-red { background: var(--status-red); color: var(--navy); }
.badge-orange { background: var(--status-yellow); color: var(--navy); }
.badge-blue { background: var(--status-blue); color: var(--navy); }
.badge-gray { background: var(--status-grey); color: var(--navy); }

/* ===== Progress Page Hero ===== */
.hero-light {
  background: var(--navy);
  color: var(--white);
  text-align: center;
  padding: 3rem 2rem;
}

.hero-light h1 { margin-bottom: 1rem; }

.hero-light p {
  max-width: 680px;
  margin: 0 auto;
  opacity: 0.85;
  font-size: 0.95rem;
  line-height: 1.7;
}

.hero-light p strong { color: var(--orange); }

/* ===== Stat Tabs ===== */
.stat-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-bottom: 1px solid var(--border);
  background: var(--white);
  box-shadow: var(--shadow);
}

.stat-tab {
  padding: 1.5rem 2rem;
  cursor: pointer;
  border-top: 4px solid transparent;
  transition: border-color 0.2s;
  border-right: 1px solid var(--border);
}

.stat-tab:last-child { border-right: none; }

.stat-tab.active { border-top-color: var(--orange); }

.stat-tab .tab-value {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--teal);
  line-height: 1;
}

.stat-tab .tab-value sup {
  font-size: 1.2rem;
  font-weight: 700;
  vertical-align: super;
}

.stat-tab .tab-label {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

/* ===== Filter Bar ===== */
.filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 2rem;
  background: var(--white);
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
  gap: 1rem;
}

.filter-group {
  display: flex;
  gap: 1rem;
  align-items: center;
  flex-wrap: wrap;
}

.filter-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.8rem;
  border: 1.5px solid var(--border);
  border-radius: 6px;
  background: var(--white);
  cursor: pointer;
  font-size: 0.85rem;
  transition: border-color 0.2s;
}

.filter-item:hover { border-color: var(--teal); }

.filter-item .filter-icon {
  font-size: 1rem;
  opacity: 0.6;
}

.filter-item .filter-label {
  color: var(--text-muted);
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.filter-item .filter-value {
  color: var(--teal);
  font-weight: 700;
}

.filter-right {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.filter-right .filter-value { color: var(--teal); font-weight: 700; }

/* ===== Chart Container ===== */
.chart-section {
  padding: 2rem;
  background: var(--white);
  border-bottom: 1px solid var(--border);
}

#progress-chart {
  width: 100%;
  height: 340px;
}

/* ===== AG Grid ===== */
.grid-section {
  padding: 2rem;
  background: var(--white);
}

.grid-section h3 {
  margin-bottom: 1rem;
  color: var(--navy);
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

#data-grid {
  height: 360px;
  width: 100%;
}

/* ===== Photo Banner ===== */
.photo-banner {
  position: relative;
  min-height: 280px;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: var(--navy-dark);
}

.photo-banner-bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, rgba(20,31,77,0.88) 40%, rgba(20,31,77,0.3) 100%);
  z-index: 1;
}

.photo-banner img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

.photo-banner-content {
  position: relative;
  z-index: 2;
  padding: 3rem;
  max-width: 500px;
}

.photo-banner-content h2 {
  color: var(--white);
  font-size: 2rem;
  margin-bottom: 1.5rem;
}

/* ===== CTA Section ===== */
.cta-section {
  text-align: center;
  padding: 3rem 2rem;
  background: var(--white);
}

/* ===== Roadmap ===== */
.roadmap-intro {
  text-align: center;
  padding: 3rem 2rem;
  background: var(--light-bg);
}

.roadmap-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
}

.roadmap-card {
  background: var(--white);
  border-radius: 10px;
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: box-shadow 0.2s;
}

.roadmap-card:hover { box-shadow: 0 6px 24px rgba(30,45,107,0.14); }

.roadmap-card-header {
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  border-bottom: 1px solid var(--border);
}

.roadmap-card-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  flex-shrink: 0;
}

.roadmap-card-header h3 {
  font-size: 1rem;
  color: var(--navy);
}

.roadmap-card-header .card-type {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.roadmap-card-body { padding: 1rem 1.5rem; }

.roadmap-card-body p {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
  line-height: 1.6;
}

.roadmap-key-results { list-style: none; }

.roadmap-key-results li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--border);
  gap: 0.75rem;
  font-size: 0.83rem;
}

.roadmap-key-results li:last-child { border-bottom: none; }

.roadmap-key-results .kr-label {
  font-weight: 500;
  color: var(--text-dark);
}

/* ===== Map Section ===== */
.map-section {
  padding: 3rem 2rem;
  background: var(--light-bg);
}

.map-section h2 {
  text-align: center;
  margin-bottom: 0.5rem;
  color: var(--navy);
}

.map-section .map-subtitle {
  text-align: center;
  color: var(--text-muted);
  margin-bottom: 2rem;
  font-size: 0.9rem;
}

.map-layout {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 2rem;
  align-items: start;
}

#nyc-map {
  height: 480px;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.map-legend {
  background: var(--white);
  border-radius: 10px;
  padding: 1.5rem;
  box-shadow: var(--shadow);
}

.map-legend h4 { color: var(--navy); margin-bottom: 1rem; }

.legend-scale {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.legend-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.83rem;
}

.legend-swatch {
  width: 24px;
  height: 16px;
  border-radius: 3px;
  flex-shrink: 0;
}

.map-stats { margin-top: 1.5rem; border-top: 1px solid var(--border); padding-top: 1rem; }

.map-stat-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0;
  font-size: 0.85rem;
  border-bottom: 1px solid var(--border);
}

.map-stat-row:last-child { border-bottom: none; }
.map-stat-name { font-weight: 600; color: var(--text-dark); }
.map-stat-value { color: var(--teal); font-weight: 700; }

/* ===== Footer ===== */
footer {
  position: relative;
  overflow: hidden;
  background: var(--navy);
  color: var(--white);
  padding: 3.5rem 2rem 4rem;
}

footer::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 42%;
  background: url("../assets/background/footer-background.png") no-repeat;
  background-position: right 60px bottom;
  background-size: auto 115%;
  pointer-events: none;
}

.footer-grid {
  position: relative;
  z-index: 1;
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr;
  gap: 2rem;
  align-items: start;
}

.footer-credit {
  margin-top: 1.25rem;
  max-width: 380px;
  font-size: 0.8rem;
  line-height: 1.6;
  color: rgba(255,255,255,0.45);
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  padding-top: 1.5rem;
}

.footer-links a {
  font-size: 0.9rem;
  font-weight: 600;
  color: rgba(255,255,255,0.8);
  transition: color 0.2s;
}

.footer-links a:hover { color: var(--white); }

/* ===== Utility ===== */
.divider-orange {
  height: 6px;
  background: var(--orange);
}

.divider-teal {
  height: 6px;
  background: var(--teal);
}

.text-center { text-align: center; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }

/* ===== Scrollbar ===== */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--light-bg); }
::-webkit-scrollbar-thumb { background: var(--navy); border-radius: 3px; }

/* ===== AG Grid Theme Override ===== */
.ag-theme-alpine {
  --ag-header-background-color: var(--light-bg);
  --ag-odd-row-background-color: #fafbfc;
  --ag-row-hover-color: #e8f4fd;
  --ag-selected-row-background-color: #dbeafe;
  --ag-font-family: var(--font);
  --ag-font-size: 13px;
  --ag-header-foreground-color: var(--navy);
  --ag-border-color: var(--border);
}

/* ===== Mobile Nav Toggle (hamburger) ===== */
.nav-toggle {
  display: none; /* shown only at mobile breakpoint */
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 10px;
  background: none;
  border: none;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--white);
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.2s ease;
}

.nav-toggle.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.is-open span:nth-child(2) { opacity: 0; }
.nav-toggle.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* =====================================================================
   RESPONSIVE — Tablet (<= 1024px)
   ===================================================================== */
@media (max-width: 1024px) {
  /* Nav — smaller bar, keep text links */
  .nav { height: 84px; padding: 0 1.5rem; }
  .nav-logo-icon { width: 72px; height: 72px; }
  .nav-links { gap: 1.5rem; }

  /* Section spacing */
  .section { padding: 3rem 1.5rem; }
  .hero-dark { padding: 3rem 1.5rem 4rem; min-height: 0; }
  .section-header { margin-bottom: 2.5rem; }

  /* Hero cityscape — zoom in so it stays visible behind the stats on narrower screens */
  .hero-dark::after {
    background-size: 160% auto;
    background-position: center bottom;
  }

  /* Focus areas — single centered column */
  .focus-areas { flex-direction: column; align-items: center; gap: 1.75rem; }
  .focus-item { width: auto; max-width: 280px; gap: 0.5rem; }

  /* Solution / accelerant — stack into one column, with roomier side gutters */
  .solution-section { padding: 3rem 3rem; }
  .solution-layout { grid-template-columns: 1fr; gap: 1.75rem; }
  .solution-left h2 { margin-bottom: 1rem; }

  /* Map layouts stack (index + data pages) */
  .map-layout { grid-template-columns: 1fr; }

  /* Footer condenses to two columns */
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 1.5rem; }
}

/* =====================================================================
   RESPONSIVE — Mobile (<= 640px)
   ===================================================================== */
@media (max-width: 640px) {
  /* Nav — hamburger menu */
  .nav { height: 64px; padding: 0 1rem; }
  .nav-logo-icon { width: 56px; height: 56px; }

  .nav-toggle { display: flex; }

  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background: var(--navy);
    padding: 0.5rem 0;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
  }

  .nav-links.open { display: flex; }

  .nav-links li { width: 100%; }

  .nav-links a {
    display: block;
    padding: 0.9rem 1.5rem;
    border-bottom: none;
    font-size: 1rem;
  }

  .nav-links a:hover,
  .nav-links a.active {
    border-bottom-color: transparent;
    background: rgba(255, 255, 255, 0.08);
  }

  /* Hero — tighter, stats stack vertically */
  .hero-dark { padding: 2.5rem 1.25rem 3.5rem; }
  .goal-progress { margin: 2rem 0 1.25rem; }

  /* Hero cityscape — zoom in further so buildings fill the lower hero on phones */
  .hero-dark::after {
    background-size: 300% auto;
    background-position: center bottom;
  }

  .stats-bar { flex-direction: column; align-items: center; gap: 0; }

  .stat-item {
    width: 100%;
    max-width: 240px;
    padding: 1.1rem 0;
    border-right: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  }

  .stat-item:last-child { border-bottom: none; }

  /* Sections */
  .section { padding: 2.5rem 1.25rem; }
  .solution-section { padding: 2.5rem 1.25rem; }

  /* Objectives — the status badge stays beside the text on phones too; the
     sentence wraps in the narrower space instead (CPRL, 2026-10). */
  .objective-row { gap: 0.75rem; }

  /* Progress page — stat tabs shrink, charts single column */
  .stat-tab { padding: 1rem 0.75rem; }
  .stat-tab .tab-value { font-size: 1.75rem; }
  .charts-row { grid-template-columns: 1fr !important; }

  /* Footer — single column */
  .footer-grid { grid-template-columns: 1fr; }

  /* Footer cityscape — wider and more zoomed so it reads on phones, like the mock */
  footer::after {
    width: 56%;
    background-position: right bottom;
    background-size: auto 130%;
  }
}

/* =====================================================================
   SOLUTION / ACCELERANT DETAIL PAGE
   Shared styles for the per-focus-area "Learn more" pages. Driven by
   js/solution-page.js + a per-page config (js/solutions/solution-N.js).
   ===================================================================== */

/* ----- Hero (left-aligned, category → title → blurb → supporting content) ----- */
.detail-hero {
  position: relative;
  overflow: hidden;
  background: var(--navy);
  color: var(--white);
  padding: 3.5rem 2rem 4rem;
}

.detail-hero::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 55%;
  background: url("../assets/background/header-background.png") no-repeat;
  background-position: right bottom;
  background-size: auto 120%;
  opacity: 0.5;
  pointer-events: none;
}

.detail-hero-inner {
  position: relative;
  z-index: 1;
  max-width: 1100px;
  margin: 0 auto;
}

.detail-hero .overline {
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 0.9rem;
}

.detail-hero h1 {
  font-size: clamp(1.9rem, 3.5vw, 2.6rem);
  font-weight: 700;
  margin-bottom: 1.1rem;
}

.detail-hero .hero-blurb {
  font-size: 1.15rem;
  font-weight: 400;
  line-height: 1.5;
  max-width: 30ch;
  color: rgba(255, 255, 255, 0.92);
}

.hero-support {
  margin-top: 2.75rem;
  max-width: 900px;
}

.hero-support-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.75);
  margin-bottom: 1rem;
}

.hero-support-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
}

.hero-support-cols p {
  font-size: 0.9rem;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.85);
}

.hero-support-cols p + p { margin-top: 0.9rem; }

/* ----- Detail body wrapper ----- */
.detail-wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 3.5rem 2rem;
}

.detail-heading {
  color: var(--navy);
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
}

/* ----- Objectives table (each objective expands to reveal its description) ----- */
.otable-head,
.obj-header {
  display: grid;
  grid-template-columns: 1.5fr 2.2fr 0.8fr 0.8fr;
  gap: 1.5rem;
  align-items: start;
}

.otable-head {
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.otable-head .col-objective {
  color: var(--navy);
  font-size: 1.25rem;
  font-weight: 700;
}

.otable-head .col-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding-top: 0.4rem;
}

.obj-item { border-bottom: 1px solid var(--border); }

.obj-header {
  padding: 1.35rem 0;
  cursor: pointer;
  transition: background 0.15s;
}

.obj-item:not(.obj-item--static) .obj-header:hover { background: #fafbfd; }
.obj-item--static .obj-header { cursor: default; }

/* An open objective takes the same tint as an open activity accordion, so the
   expanded row reads as one panel rather than a taller table row. The hover
   rule above is more specific than `.obj-item.open > .obj-header`, so it has to
   be restated here or hovering an open row would wash the tint back out. */
.obj-item.open { background: var(--light-bg); }
.obj-item.open > .obj-header,
.obj-item.open > .obj-header:hover { background: var(--light-bg); }

/* Chevron + title share the Objective column (title indents past the chevron,
   matching the measure sub-table). */
.obj-title-cell {
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 0.7rem;
  align-items: start;
}

.obj-title {
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--navy);
  line-height: 1.4;
}

.obj-measure {
  font-size: 0.9rem;
  color: var(--text-dark);
  line-height: 1.5;
}

.obj-body { display: none; padding: 0 0 1.5rem 1.75rem; }
.obj-item.open > .obj-body { display: block; }

.obj-desc-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
}

.obj-desc-cols p {
  font-size: 0.88rem;
  line-height: 1.7;
  color: var(--text-dark);
}

.obj-desc-cols p + p { margin-top: 0.9rem; }

/* When an objective also carries a chart, its description needs the same gap
   before the source line that a measure's description has. */
.obj-body .msr-detail > .obj-desc-cols { margin-bottom: 1.75rem; }

/* An activity's own copy, at the top of the open accordion panel — it frames
   the activity before the measure table lists what's tracked about it.
   It's a single long paragraph in every activity, so it flows into two balanced
   columns rather than being split paragraph-wise like objective/measure copy. */
.acc-desc {
  columns: 2;
  column-gap: 2.5rem;
  padding: 0 1.5rem 1.5rem;
}

.acc-desc p {
  font-size: 0.88rem;
  line-height: 1.7;
  color: var(--text-dark);
}

.acc-desc p + p { margin-top: 0.9rem; }

/* A measure can publish more than one headline figure — NAEP reports grade 4
   and grade 8 separately — so a Result cell may hold several pills. */
.obj-field[data-label="Result"] .pill + .pill { margin-left: 0.35rem; }

/* ----- Result / status pills ----- */
.pill {
  display: inline-block;
  padding: 0.3rem 0.8rem;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 600;
  white-space: nowrap;
}

.pill-neutral { background: var(--status-grey); color: var(--navy); }
.pill-result  { background: var(--status-blue); color: var(--navy); }
.pill-on      { background: var(--status-green); color: var(--navy); }
.pill-risk    { background: var(--status-yellow); color: var(--navy); }
.pill-off     { background: var(--status-red); color: var(--navy); }

/* ----- Activity accordion ----- */
.activity-block { margin-top: 3.5rem; }

.acc-item { border-bottom: 1px solid var(--border); }
.acc-item:first-of-type { border-top: 1px solid var(--border); }

.acc-header {
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: 0.85rem;
  align-items: center;
  padding: 1.15rem 0.5rem;
  cursor: pointer;
  transition: background 0.15s;
}

.acc-header:hover { background: #fafbfd; }
.acc-item.open > .acc-header { background: var(--light-bg); }

/* An activity with no description and no measures yet — no chevron, so the
   title takes the whole row and the header isn't a click target. */
.acc-item--static .acc-header { cursor: default; }
.acc-item--static .acc-header:hover { background: transparent; }
.acc-item--static .acc-title { grid-column: 1 / -1; }

.acc-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--navy);
  line-height: 1.45;
}

.chevron {
  width: 18px;
  height: 18px;
  color: var(--teal);
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.open > .acc-header .chevron,
.open > .msr-header .chevron,
.obj-item.open > .obj-header .chevron { transform: rotate(90deg); }

.acc-body,
.msr-body { display: none; }

.acc-item.open > .acc-body,
.msr-item.open > .msr-body { display: block; }

.acc-body { background: var(--light-bg); padding: 0.5rem 1rem 1.5rem; }

/* ----- Measure sub-table (inside an activity) ----- */
.msr-head {
  display: grid;
  grid-template-columns: 1fr 0.7fr 0.7fr;
  gap: 1.5rem;
  padding: 0.75rem 1rem 0.5rem;
}

.msr-head .col-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.msr-item { border-top: 1px solid var(--border); }

.msr-header {
  display: grid;
  grid-template-columns: 1fr 0.7fr 0.7fr;
  gap: 1.5rem;
  align-items: center;
  padding: 1rem;
  cursor: pointer;
}

.msr-header-title {
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 0.75rem;
  align-items: center;
}

/* Nothing to expand into: no chevron, so the title has to be pinned to the
   second column — left in the 18px chevron column it wraps a word per line —
   which also keeps it aligned with its expandable siblings. */
.msr-item--static .msr-header { cursor: default; }
.msr-item--static .msr-title-text { grid-column: 2; }

.msr-title-text {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--navy);
  line-height: 1.45;
}

/* ----- Measure detail panel (description + source + chart + grid) ----- */
.msr-detail { padding: 0.5rem 1rem 2rem 2.75rem; }

.msr-desc-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  margin-bottom: 1.75rem;
}

.msr-desc-cols p {
  font-size: 0.88rem;
  line-height: 1.7;
  color: var(--text-dark);
}

/* The same gap the objective descriptions have — without it two paragraphs
   in one column ran together (1.1A). */
.msr-desc-cols p + p { margin-top: 0.9rem; }

.msr-source {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.msr-source strong { color: var(--navy); font-weight: 700; }
/* Only a real link is underlined. A measure with no public source keeps its
   name as plain text rather than presenting a link that does nothing. */
.msr-source a.src-name {
  color: inherit;
  text-decoration: underline;
}

.msr-source a.src-name:hover { color: var(--teal); }

.msr-controls {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
}

/* ----- Control row per mocks/viz/group_filter-mock.png -----
   "Group by" [grouping] | [Filter] [Year] ............ View [Chart|Map] */
.ctl-label {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--navy);
  white-space: nowrap;
}

.ctl-divider {
  align-self: stretch;
  width: 1.5px;
  margin: 0.35rem 0.6rem;
  background: var(--navy);
}

/* The Group by pill: icon and value on one line, the value set larger since
   it carries no label above it. */
.viz-pill.viz-pill--bare .gp-value {
  grid-row: 1 / span 2;
  font-size: 1.15rem;
}

.viz-view {
  display: inline-flex;
  align-items: center;
  gap: 0.9rem;
  margin-left: auto;
  align-self: stretch;
}

.viz-view[hidden] { display: none; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* An explicit `display` beats the UA stylesheet's [hidden] rule, so these have
   to opt back out by hand — the renderer hides both when a measure's config
   defines no chart or table. */
.msr-controls[hidden],
.viz-title[hidden] { display: none; }

/* Per the mock: a large icon on the left, with "Group by" stacked above the
   active dimension. A 2-column grid gets that without extra markup — the icon
   spans both rows and the two spans flow into column 2. */
.groupby-pill {
  display: inline-grid;
  grid-template-columns: auto auto;
  column-gap: 0.65rem;
  align-items: center;
  justify-items: start;
  padding: 0.5rem 0.95rem;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  background: var(--white);
  cursor: pointer;
  text-align: left;
  line-height: 1.2;
  transition: border-color 0.15s;
}

.groupby-pill:hover:not(:disabled) { border-color: var(--teal); }
.groupby-pill:disabled { cursor: default; }

.groupby-pill svg {
  grid-column: 1;
  grid-row: 1 / span 2;
  align-self: center;
  width: 30px;
  height: 30px;
  color: var(--teal);
}

.groupby-pill .gp-label {
  grid-column: 2;
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.8rem;
}

.groupby-pill .gp-value {
  grid-column: 2;
  color: var(--teal);
  font-weight: 700;
  font-size: 1rem;
}

/* ----- Viz controls: Year / Grouping / Filter (mocks/viz/buttons_layout.png) ----- */
.viz-control { position: relative; }

.viz-pill {
  display: inline-grid;
  grid-template-columns: auto auto;
  column-gap: 0.65rem;
  align-items: center;
  justify-items: start;
  padding: 0.5rem 0.95rem;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  background: var(--white);
  cursor: pointer;
  text-align: left;
  line-height: 1.2;
  transition: border-color 0.15s;
}

.viz-pill:hover:not(:disabled) { border-color: var(--teal); }
.viz-pill[aria-expanded="true"] { border-color: var(--teal); }
.viz-pill:disabled { cursor: default; opacity: 0.55; }

.viz-pill svg {
  grid-column: 1;
  grid-row: 1 / span 2;
  align-self: center;
  width: 30px;
  height: 30px;
  color: var(--teal);
}

.viz-pill .gp-label {
  grid-column: 2;
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.8rem;
}

.viz-pill .gp-value {
  grid-column: 2;
  color: var(--teal);
  font-weight: 700;
  font-size: 1rem;
  white-space: nowrap;
}

/* Dropdown shared by Year and Grouping. */
.viz-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 40;
  min-width: 100%;
  padding: 0.35rem;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 10px 28px rgba(26, 26, 46, 0.14);
}

.viz-menu-item {
  display: block;
  width: 100%;
  padding: 0.5rem 0.85rem;
  border: none;
  border-radius: 7px;
  background: none;
  cursor: pointer;
  text-align: left;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--navy);
  white-space: nowrap;
}

.viz-menu-item:hover:not(.is-disabled) { background: #eef7fd; }

/* A grouping with no data for the selected year stays visible but inert. */
.viz-menu-item.is-disabled {
  color: var(--text-muted);
  opacity: 0.5;
  cursor: default;
}
/* Tint plus bold, never coloured text — the same "selected" language the filter
   modal uses for its active dimension and its ticked values, and the only
   selected state the mocks actually specify (mocks/viz/filter_modal.png shows
   Borough on a pale tint with navy text). Cyan is reserved for the pill values,
   which is where the mock does use it. */
.viz-menu-item.is-current { background: #f2fbff; font-weight: 700; }

/* Graph header above the chart. */
.viz-title {
  margin: 0 0 0.75rem;
  font-size: 1rem;
  font-weight: 700;
  color: var(--navy);
}

/* Chart / Map toggle. Per mocks/viz/map_button.png it lives at the far right of
   the control row, matching the pills' height, border and radius so the row
   reads as one set — but icon-only, because it switches how the same data is
   drawn rather than choosing a value the way Year and Grouping do.

   One border, not two. The selected half is a rounded rect whose border sits
   exactly on top of the container's on the outside edges — negative margins pull
   it over — so the outer border simply turns blue there rather than a second
   outline appearing inside the first. */
.viz-modes {
  display: inline-flex;
  align-self: stretch;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  background: var(--white);
}

.viz-modes[hidden] { display: none; }

.viz-mode {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0 1.1rem;
  margin: -1.5px 0;
  font-size: 0.9rem;
  font-weight: 700;
  border: 1.5px solid transparent;
  border-radius: 10px;
  background: none;
  cursor: pointer;
  color: var(--navy);
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.viz-mode:first-child { margin-left: -1.5px; }
.viz-mode:last-child { margin-right: -1.5px; }

.viz-mode svg { width: 26px; height: 26px; }

.viz-mode.is-current {
  background: #e5f7fe;
  border-color: var(--teal);
  color: var(--teal);
}

/* The row wraps on narrow viewports; the toggle should lead its own line rather
   than sit marooned against the right edge under a half-empty row of pills. */
@media (max-width: 640px) {
  .viz-view { margin-left: 0; }
  .ctl-divider { display: none; }
}

/* ----- Footnotes (mocks/viz/footnote-mock.png) ----- */
.footnotes {
  /* Side padding so the list never meets the screen edge — on a phone the
     text ran to within 1px of it. */
  padding: 4.5rem 1.5rem 5rem;
  border-top: 1px solid var(--border);
  background: var(--white);
}

.footnotes h2 {
  margin: 0 0 2rem;
  text-align: center;
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--navy);
}

.footnotes ol {
  max-width: 60rem;
  margin: 0 auto;
  padding-left: 1.5rem;
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--navy);
}

.footnotes li + li { margin-top: 0.35rem; }

.footnotes a {
  color: var(--navy);
  text-decoration: underline;
  overflow-wrap: anywhere;
}

.footnotes a:hover { color: var(--teal); }

/* ----- Map view ----- */
.msr-map[hidden] { display: none; }

.msr-map-figure {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  background: #f5f7fa;
  border-radius: 8px;
  padding: 0.75rem 0.5rem 0.5rem;
}

.msr-map-figure svg { display: block; max-width: 100%; height: auto; }

.msr-map-legend {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.5rem;
  font-size: 0.72rem;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

.msr-map-ramp { display: inline-flex; }
.msr-map-ramp i { display: block; width: 30px; height: 10px; }
.msr-map-ramp i:first-child { border-radius: 2px 0 0 2px; }
.msr-map-ramp i:last-child { border-radius: 0 2px 2px 0; }

/* Banded legend: each swatch is labelled with the range it stands for, because
   the bands are fixed rather than fitted to the data — the same red means the
   same thing on every map, and only a labelled key shows that. */
.msr-map-legend--banded {
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.35rem 0.9rem;
}

.msr-map-band {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  white-space: nowrap;
}

.msr-map-band i {
  display: block;
  width: 14px;
  height: 10px;
  border-radius: 2px;
}

/* Plot has no hover layer, so the map builds one — styled to match the chart
   tooltips rather than the browser's native <title> bubble. */
.msr-map-tip {
  position: absolute;
  z-index: 5;
  pointer-events: none;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 4px 14px rgba(35, 45, 99, 0.14);
  padding: 0.45rem 0.65rem;
  font-size: 0.78rem;
  color: var(--navy);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.msr-map-tip strong { display: block; font-size: 0.85rem; }

/* The same card, floated over a cut-off table label. */
.lead-tip { position: absolute; z-index: 60; }
.lead-tip[hidden] { display: none; }

/* Colour chip tying a table row to its line in the chart. */
.viz-swatch {
  display: inline-block;
  width: 11px;
  height: 11px;
  border-radius: 3px;
  margin-right: 0.55rem;
  vertical-align: baseline;
}

.msr-grid.ag-theme-alpine .grid-lead-header .ag-header-cell-text {
  color: var(--navy);
  font-size: 0.95rem;
  font-weight: 700;
}

/* ----- Filter modal (mocks/viz/filter_modal.png) ----- */
body.modal-open { overflow: hidden; }

#viz-filter-modal {
  position: fixed;
  inset: 0;
  /* Above the beta banner's 200. At the old 100 the banner — sticky at top: 0
     — painted straight through this full-screen overlay, leaving the notice
     floating on top of the dialog's backdrop. A modal outranks site chrome;
     only index.html's login gate (1000) sits higher. */
  z-index: 300;
  display: grid;
  place-items: center;
  padding: 1.5rem;
}

#viz-filter-modal[hidden] { display: none; }

.fm-backdrop { position: absolute; inset: 0; background: rgba(26, 26, 46, 0.45); }

.fm-dialog {
  position: relative;
  width: min(900px, 100%);
  max-height: 86vh;
  display: flex;
  flex-direction: column;
  background: var(--white);
  border-radius: 14px;
  padding: 1.5rem 1.75rem 1.75rem;
  box-shadow: 0 24px 60px rgba(26, 26, 46, 0.3);
}

.fm-head {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  margin-bottom: 1.25rem;
}

.fm-head h3 { margin: 0; font-size: 1.5rem; color: var(--navy); font-weight: 700; }
.fm-actions { margin-left: auto; display: flex; align-items: center; gap: 1rem; }

.fm-close {
  border: none;
  background: none;
  cursor: pointer;
  font-size: 1.75rem;
  line-height: 1;
  color: var(--navy);
  padding: 0 0.15rem;
}

.fm-reset {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  border: none;
  background: none;
  cursor: pointer;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--navy);
}

.fm-reset svg { width: 18px; height: 18px; }

.fm-apply {
  border: none;
  border-radius: 9px;
  padding: 0.7rem 1.35rem;
  background: var(--teal);
  color: var(--white);
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
}

.fm-apply:hover:not(:disabled) { filter: brightness(0.95); }
.fm-apply:disabled { background: #b9bcc9; cursor: default; }

.fm-body {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 1.25rem;
  min-height: 340px;
  overflow: hidden;
}

.fm-panel {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.75rem;
  overflow-y: auto;
}

.fm-dim {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  width: 100%;
  padding: 0.7rem 0.9rem;
  border: none;
  border-radius: 9px;
  background: none;
  cursor: pointer;
  text-align: left;
  font-size: 0.98rem;
  color: var(--navy);
}

/* #f2fbff, sampled from mocks/viz/filter_modal.png — near-white with the
   faintest blue cast, so the row reads as "this one" without reading as a
   coloured chip. The earlier #eef7fd was a few steps more saturated and looked
   blue at size. Same tint for the ticked values on the right, which the mock
   fills identically. */
.fm-dim.is-active { background: #f2fbff; font-weight: 700; }

/* Declared by the config sheet, but the current grouping's rows don't carry it. */
.fm-dim.is-unavailable { color: var(--text-muted); opacity: 0.5; cursor: default; }
.fm-dim.is-unavailable.is-active { background: #f2f4f8; }

.fm-unavailable {
  padding: 1rem 0.9rem;
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.6;
}

.fm-count {
  min-width: 26px;
  padding: 0.1rem 0.45rem;
  border-radius: 999px;
  background: var(--teal);
  color: var(--white);
  font-size: 0.8rem;
  font-weight: 700;
  text-align: center;
}

.fm-value {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 0.9rem;
  border-radius: 9px;
  cursor: pointer;
  font-size: 0.98rem;
  color: var(--navy);
}

/* A ticked row is tinted, always — whether one value is selected or all of
   them. Suppressing the tint in the all-selected state was tried and reverted:
   it made a row's appearance depend on the other rows, so Bronx looked
   different depending on whether Brooklyn happened to be ticked. */
.fm-value.is-checked { background: #f2fbff; font-weight: 700; }
.fm-value input { position: absolute; opacity: 0; pointer-events: none; }

.fm-value--all { font-size: 1.1rem; font-weight: 700; padding-bottom: 0.75rem; }

/* The master row is a control, not a value — it says "all / none / some" about
   the list below it. Tinting it when every child happens to be ticked made the
   header look selected in its own right, and stacked a sixth band of blue on
   1.1A's default view. White always, per the mock, where it sits above the
   divider on white while the two chosen boroughs are filled. Its checkbox still
   reports the state. */
.fm-value--all.is-checked { background: none; }
.fm-divider { height: 1px; background: var(--border); margin: 0 0.9rem 0.5rem; }

.fm-box {
  position: relative;
  flex: none;
  width: 22px;
  height: 22px;
  border: 2px solid var(--navy);
  border-radius: 6px;
  background: var(--white);
}

.fm-value.is-checked .fm-box { background: var(--teal); border-color: var(--teal); }

.fm-value.is-checked .fm-box::after {
  content: "";
  position: absolute;
  left: 6px;
  top: 2px;
  width: 5px;
  height: 10px;
  border: solid var(--white);
  border-width: 0 2.5px 2.5px 0;
  transform: rotate(45deg);
}

/* Indeterminate: some but not all values selected. */
.fm-box.is-mixed { background: var(--teal); border-color: var(--teal); }

/* Choosing a student-group category is one-of; the groups inside it are
   checkboxes. */
.fm-box--radio { border-radius: 50%; }

/* Above a swapped pin's values: ticking several combines them. */
.fm-note {
  margin: 0 0 0.6rem;
  font-size: 0.8rem;
  line-height: 1.45;
  color: var(--text-muted);
}
.fm-box.is-mixed::after {
  content: "";
  position: absolute;
  left: 4px;
  top: 8px;
  width: 10px;
  height: 2.5px;
  background: var(--white);
  border: none;
  transform: none;
}

@media (max-width: 700px) {
  .fm-body { grid-template-columns: 1fr; }
}

.msr-chart {
  width: 100%;
  height: 300px;
  /* Sits directly on the accordion's light-gray background — no white card. */
}

/* Shown in place of a chart when a measure's data or config can't be resolved. */
.msr-viz-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  margin: 0;
  color: var(--text-muted);
  font-size: 0.875rem;
  text-align: center;
}

.msr-grid {
  width: 100%;
  margin-top: 1rem;
}

/* AG Grid floors the body at 150px under `domLayout: autoHeight`, which leaves
   a blank strip beneath short tables — 5.3A has two rows above a pinned total,
   and the reserved third row read as data that had failed to load. */
.msr-grid.ag-theme-alpine .ag-layout-auto-height .ag-center-cols-viewport,
.msr-grid.ag-theme-alpine .ag-layout-auto-height .ag-center-cols-container,
.msr-grid.ag-theme-alpine .ag-layout-auto-height .ag-center-cols-clipper {
  min-height: 0;
}

/* Past five rows the grid takes a fixed height and scrolls. Its own scrollbar is
   no help as a cue: AG Grid renders one as an overlay and marks it
   `ag-scrollbar-invisible` wherever the platform hides overlay scrollbars, and
   its `ag-apple-scrollbar` rules win over anything set here. The affordance is
   geometric instead — the height leaves half of the sixth row showing (see
   MAX_VISIBLE_ROWS in js/solution-page.js) — so this only has to keep that half
   row from being clipped into a hard edge. */
.msr-grid.ag-theme-alpine .ag-body-viewport {
  scrollbar-width: thin;
}

/* Yes/no columns as badges, per mocks/viz/table-mock.png: a filled green tick
   or a grey cross, so a row's pattern of support scans across seven columns.
   Colours sampled from the mock. */
.msr-grid.ag-theme-alpine .msr-bool {
  display: flex;
  align-items: center;
}

.bool-cell {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 23px;
  height: 23px;
  border-radius: 50%;
}

/* Seven focus areas across one row — the mock sets these headers noticeably
   smaller than the rest so two lines fit in a ~110px column. */
.msr-grid.ag-theme-alpine .msr-bool-header .ag-header-cell-text {
  font-size: 0.68rem;
  line-height: 1.3;
}

.bool-cell svg { width: 15px; height: 15px; display: block; }
.bool-cell--yes { background: #68a034; color: #fff; }
.bool-cell--no { background: #e4e4e7; color: var(--navy); }

/* The pinned citywide/overall row reads as a summary, not another data row. */
.msr-grid.ag-theme-alpine .ag-floating-bottom {
  border-top: 1px solid #d7dbe8;
  font-weight: 700;
}

/* Minimal grid look to match the mock: no wrapper box, no vertical lines,
   no zebra striping, transparent background, thin horizontal row separators,
   muted headers. Scoped to .msr-grid so the progress page grid is untouched. */
.msr-grid.ag-theme-alpine {
  --ag-background-color: transparent;
  --ag-odd-row-background-color: transparent;
  --ag-header-background-color: transparent;
  --ag-foreground-color: var(--navy);
  --ag-header-foreground-color: var(--text-muted);
  --ag-row-border-color: var(--border);
  --ag-border-color: transparent;
  --ag-row-hover-color: rgba(30, 45, 107, 0.035);
  --ag-font-size: 13px;
  --ag-cell-horizontal-padding: 0;
}

/* Force every grid surface transparent so the accordion's gray bg shows through
   (AG's alpine theme paints some elements white regardless of the CSS vars). */
.msr-grid.ag-theme-alpine,
.msr-grid.ag-theme-alpine .ag-root-wrapper,
.msr-grid.ag-theme-alpine .ag-header,
.msr-grid.ag-theme-alpine .ag-header-viewport,
.msr-grid.ag-theme-alpine .ag-body-viewport,
.msr-grid.ag-theme-alpine .ag-center-cols-viewport,
.msr-grid.ag-theme-alpine .ag-row,
.msr-grid.ag-theme-alpine .ag-cell {
  background-color: transparent !important;
}

/* Numeric columns right-align by flipping the header label to row-reverse. With
   --ag-cell-horizontal-padding: 0 that puts the text flush against the label's
   own overflow clip, which shaves the last glyph ("2023" losing its 3). Nudge
   the header and the cell by the same amount so they stay aligned. */
.msr-grid.ag-theme-alpine .ag-right-aligned-header .ag-header-cell-label,
.msr-grid.ag-theme-alpine .ag-cell.ag-right-aligned-cell {
  padding-right: 3px;
}

/* The theme paints a divider inside each column's resize handle. On a
   right-aligned header it butts straight up against the text and reads as a
   clipped glyph ("2023|"), and the grid is deliberately free of vertical rules
   everywhere else. Keep the handle draggable — just don't paint it. */
.msr-grid.ag-theme-alpine .ag-header-cell-resize::after {
  background-color: transparent;
}

.msr-grid.ag-theme-alpine .ag-root-wrapper { border: none; }
.msr-grid.ag-theme-alpine .ag-header {
  border-bottom: 1px solid var(--border);
  font-weight: 600;
}

/* ----- Data pending empty state ----- */
.data-pending {
  text-align: center;
  padding: 3.5rem 1rem;
}

.data-pending svg {
  width: 72px;
  height: 72px;
  color: #c3c9d6;
  margin: 0 auto 1.25rem;
}

.data-pending h4 {
  color: var(--navy);
  font-size: 1.05rem;
  margin-bottom: 0.4rem;
}

.data-pending p {
  color: var(--text-muted);
  font-size: 0.85rem;
  /* Wide enough for the copy's three-sentence "no data source" block; a 46ch
     column turned it into a very tall, narrow ribbon. */
  max-width: 68ch;
  margin: 0 auto;
  line-height: 1.6;
}

.data-pending p + p { margin-top: 0.85rem; }

/* =====================================================================
   OUTCOME GOAL PAGE
   The same renderer as the detail pages, in its `layout: "outcome"` shape:
   one measure told four ways, selected by a tab strip.
   Design: mocks/outcome_goal/breakdown.png + breakdown_empty.png
   ===================================================================== */

/* The goal statement is a sentence, not a headline — same Regular weight and
   814px measure as the landing hero, with only the year picked out. */
.og-hero h1 {
  max-width: min(814px, 100%);
  font-size: clamp(1.5rem, 3vw, 2.05rem);
  font-weight: 400;
  line-height: 1.5;
}

.og-hero h1 strong {
  color: var(--orange);
  font-weight: 800;
}

/* The tab card carries four columns of stats and a full-width chart, so it runs
   wider than the objectives table the focus-area pages centre at 1100px. */
.detail-wrap--wide { max-width: 1200px; }

.og-measure-title {
  color: var(--navy);
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.5;
  margin-bottom: 1.25rem;
}

.og-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.og-tabs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}

/* An unselected tab is recessed: the page tint behind it and a rule along the
   bottom. Selecting one lifts it to the panel's white and swaps that rule for
   the orange bar on top, so the tab and its panel read as one surface. */
.og-tab {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.45rem;
  padding: 1.5rem 1.75rem;
  background: var(--light-bg);
  border: none;
  border-top: 4px solid transparent;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  font-family: var(--font);
  text-align: left;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.og-tab:last-child { border-right: none; }

.og-tab:hover:not(.is-current) { background: #eceef7; }

.og-tab.is-current {
  background: var(--white);
  border-top-color: var(--orange);
  border-bottom-color: transparent;
}

.og-tab:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: -3px;
}

.og-tab-result {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.4rem;
  min-height: 2.5rem;
}

.og-value {
  font-size: 2.5rem;
  font-weight: 800;
  line-height: 1;
  color: var(--teal);
}

.og-value .og-unit {
  font-size: 1.2rem;
  font-weight: 700;
}

.og-value--empty {
  color: var(--navy);
  opacity: 0.45;
}

.og-delta {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--green);
  vertical-align: super;
}

/* A decline is not growth. The 2026 ELA result falls 6 points, and the growth
   green made that read as a gain at a glance. */
.og-delta--down { color: #c83518; }

/* A qualifier CPRL attaches to a figure ("(NYCPS ONLY)"). Small and on its own
   line — it belongs with the number but must not compete with it. */
.og-qualifier {
  display: block;
  width: 100%;
  margin-top: 0.2rem;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--navy);
  opacity: 0.65;
}

/* The comparison tab has no figure, so the design sets an icon in its place —
   sized to the numerals it stands in for. */
.og-tab-icon svg {
  width: 2rem;
  height: 2rem;
  color: var(--teal);
}

.og-tab-name {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--navy);
  line-height: 1.35;
}

.og-panel[hidden] { display: none; }

/* The panel is the full width of the card, so the measure detail loses the
   accordion's left indent. */
.og-panel .msr-detail { padding: 2rem 2rem 2.5rem; }

/* Narrative for the selected tab, tinted so it reads as context rather than as
   part of the data below it. */
.og-support {
  background: var(--light-bg);
  border-radius: 8px;
  padding: 1.75rem 2rem;
  margin-bottom: 2rem;
}

.og-support-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--navy);
  margin-bottom: 1rem;
}

.og-support-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
}

.og-support-cols p {
  font-size: 0.88rem;
  line-height: 1.7;
  color: var(--text-dark);
}

.og-support-cols p + p { margin-top: 0.9rem; }

@media (max-width: 900px) {
  /* Four stat columns stop fitting well before the page does; two rows of two
     keeps every tab legible rather than shrinking the figures. */
  .og-tabs { grid-template-columns: repeat(2, 1fr); }
  .og-tab:nth-child(2n) { border-right: none; }
}

@media (max-width: 768px) {
  .og-tabs { grid-template-columns: 1fr; }
  .og-tab { border-right: none; }
  .og-support-cols { grid-template-columns: 1fr; gap: 1rem; }
  .og-support { padding: 1.25rem; }
  .og-panel .msr-detail { padding: 1.25rem 1rem 2rem; }
}

/* ----- Detail page responsive ----- */
@media (max-width: 1024px) {
  .detail-hero::after { width: 100%; opacity: 0.25; }
}

@media (max-width: 768px) {
  .hero-support-cols,
  .msr-desc-cols,
  .obj-desc-cols { grid-template-columns: 1fr; gap: 1rem; }
  .acc-desc { columns: 1; }

  /* The header rows carry the column labels; they're hidden when stacked. So on
     small screens the objective rows and measure rows switch to a flex stack and
     each Result/Status pill carries its own label, sitting side-by-side — never
     two bare "Pending" pills with no context. */
  .otable-head,
  .msr-head { display: none; }

  .obj-header,
  .msr-header {
    display: flex;
    flex-wrap: wrap;
    gap: 0.85rem 2rem;
    align-items: flex-end;
  }

  .obj-title-cell,
  .obj-measure,
  .msr-header-title { flex: 1 1 100%; }

  .obj-measure { color: var(--text-muted); }

  .obj-body { padding-left: 0; }

  .obj-field {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.3rem;
  }

  .obj-field::before {
    content: attr(data-label);
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-muted);
  }

  .msr-detail { padding-left: 1rem; }
}


/* ----- Scorecard (Solution 4): a leader's photo beside their name ----- */
.cell-person {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  height: 100%;
  line-height: 1.35;
}

.cell-avatar {
  height: 36px;
  width: auto;
  flex: none;
}

.cell-person-name { white-space: normal; }

/* Score shading, per the scorecard mock. Classes, not inline styles: the grid
   theme sets the cell background and has the higher specificity. */
.ag-theme-alpine .ag-cell.score-cell {
  background-color: var(--score-bg) !important;
  padding-left: 0.75rem;
}
.ag-theme-alpine .ag-cell.score-1 { --score-bg: #c3dda0; }
.ag-theme-alpine .ag-cell.score-0-5 { --score-bg: #ecd696; }
.ag-theme-alpine .ag-cell.score-0 { --score-bg: #f2b9a6; }

/* Rows taller than the default (the scorecard) centre their text. */
.grid-tall-rows .ag-cell { display: flex; align-items: center; }
.grid-tall-rows .ag-cell.ag-right-aligned-cell { justify-content: flex-end; }

/* A column a page centres (Solution 4's Total Score). */
.ag-theme-alpine .ag-cell.cell-center { justify-content: center; text-align: center; }
.ag-theme-alpine .header-center .ag-header-cell-label { justify-content: center; }

/* Phones: a little more room either side of the footer's and footnotes'
   content. */
@media (max-width: 640px) {
  footer { padding-left: 2.5rem; padding-right: 2.5rem; }
  /* The list numbers hang left of the text, so the left side gets their width. */
  .footnotes { padding: 3rem 2rem 3.5rem 3.5rem; }
}

/* Footnote markers in body copy, linking to the list at the foot of the page. */
.fn-ref {
  font-size: 0.68em;
  line-height: 0;
  margin-left: 0.08em;
}
.fn-ref a { color: inherit; text-decoration: none; font-weight: 700; }
.fn-ref a:hover { color: var(--teal); text-decoration: underline; }

/* Landing on a footnote from its marker: clear the sticky banner and nav. */
.footnotes li { scroll-margin-top: calc(var(--beta-h, 0px) + 6rem); }
