:root {
  --coral: #fe4b4e;
  --coral-dark: #cf3038;
  --coral-soft: #fff1ef;
  --ink: #111111;
  --slate: #334155;
  --muted: #64748b;
  --quiet: #94a3b8;
  --line: #e2e8f0;
  --line-strong: #cbd5e1;
  --paper: #ffffff;
  --soft: #f6f7f9;
  --soft-blue: #eef4f8;
  --green: #147a54;
  --green-soft: #e9f7f1;
  --amber: #9a5b00;
  --amber-soft: #fff6df;
  --red: #b4232d;
  --red-soft: #fdeced;
  --year-2025: #172033;
  --year-2026: #fe4b4e;
  --radius: 12px;
  --max: 1440px;
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--soft);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 15px;
  line-height: 1.55;
}

button,
select,
input {
  font: inherit;
}

button,
select {
  cursor: pointer;
}

a {
  color: inherit;
}

.skip-link {
  position: fixed;
  left: 16px;
  top: -60px;
  z-index: 100;
  padding: 10px 14px;
  background: var(--coral);
  color: var(--ink);
  font-weight: 800;
  text-decoration: none;
}

.skip-link:focus {
  top: 12px;
}

:focus-visible {
  outline: 3px solid rgba(254, 75, 78, 0.45);
  outline-offset: 2px;
}

.site-header {
  background: var(--ink);
  color: var(--paper);
  border-bottom: 6px solid var(--coral);
}

.header-inner {
  width: min(calc(100% - 48px), var(--max));
  margin: 0 auto;
  min-height: 242px;
  display: grid;
  grid-template-columns: minmax(260px, 0.8fr) minmax(460px, 1.8fr) minmax(240px, 0.8fr);
  gap: 42px;
  align-items: center;
  padding: 36px 0;
}

.institution {
  display: flex;
  align-items: stretch;
  gap: 16px;
}

.institution-line {
  width: 6px;
  min-height: 52px;
  background: var(--coral);
}

.institution-overline {
  display: block;
  max-width: 230px;
  margin-bottom: 5px;
  color: #b9c0ca;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1.35;
  text-transform: uppercase;
}

.institution strong {
  display: block;
  font-size: 1.35rem;
  line-height: 1.15;
}

.report-label,
.eyebrow,
.chart-kicker {
  color: var(--coral-dark);
  font-size: 0.73rem;
  font-weight: 900;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.report-label {
  color: var(--coral);
}

.header-copy h1 {
  margin: 8px 0 10px;
  font-size: clamp(2.25rem, 4vw, 4.6rem);
  line-height: 0.98;
  letter-spacing: -0.055em;
}

.header-copy h1 span {
  display: block;
  color: var(--coral);
}

.header-copy p {
  margin: 0;
  color: #c7ccd4;
  font-size: 0.92rem;
}

.header-meta {
  display: grid;
  gap: 8px;
  align-content: center;
}

.source-pill {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 8px 11px;
  border: 1px solid #38404c;
  border-radius: 6px;
  color: #dbe0e6;
  font-size: 0.76rem;
  font-weight: 750;
}

.source-pill::before {
  content: "";
  width: 8px;
  height: 8px;
  margin-right: 8px;
  border-radius: 50%;
  background: #8290a3;
}

.source-pill.good::before {
  background: #54d195;
}

.source-pill.mixed::before {
  background: #f6b94a;
}

.filter-bar {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(10px);
}

.filter-inner {
  width: min(calc(100% - 48px), var(--max));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 0.7fr 1fr 1.7fr 1.2fr auto;
  gap: 12px;
  align-items: end;
  padding: 14px 0;
}

.filter-group {
  min-width: 0;
}

.filter-group label {
  display: block;
  margin: 0 0 5px;
  color: var(--slate);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.filter-group select,
.filter-group input,
.chart-card select {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: var(--paper);
  color: var(--ink);
  padding: 9px 34px 9px 11px;
}

.filter-group input {
  padding-right: 11px;
}

.filter-group select:hover,
.filter-group input:hover,
.chart-card select:hover {
  border-color: #aab4c3;
}

.reset-button,
.export-button {
  min-height: 42px;
  border: 1px solid var(--ink);
  border-radius: 7px;
  background: var(--ink);
  color: var(--paper);
  padding: 9px 16px;
  font-weight: 800;
}

.reset-button:hover,
.export-button:hover {
  background: var(--coral);
  border-color: var(--coral);
  color: var(--ink);
}

.page-shell {
  width: min(calc(100% - 48px), var(--max));
  margin: 0 auto;
  padding: 42px 0 72px;
}

.executive-intro {
  display: grid;
  grid-template-columns: minmax(380px, 1.1fr) minmax(380px, 0.9fr);
  gap: 52px;
  align-items: end;
  padding: 10px 2px 34px;
}

.executive-intro h2 {
  margin: 8px 0 0;
  max-width: 760px;
  font-size: clamp(2rem, 4vw, 3.7rem);
  line-height: 1.02;
  letter-spacing: -0.045em;
}

.executive-intro p {
  margin: 0;
  padding-left: 22px;
  border-left: 4px solid var(--coral);
  color: var(--slate);
  font-size: 1.06rem;
}

.quality-banner {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 22px;
  padding: 15px 17px;
  border: 1px solid #f0c981;
  border-radius: 8px;
  background: var(--amber-soft);
}

.quality-icon {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 25px;
  height: 25px;
  border-radius: 50%;
  background: var(--amber);
  color: var(--paper);
  font-weight: 900;
}

.quality-banner strong {
  display: block;
  margin-bottom: 2px;
}

.quality-banner p {
  margin: 0;
  color: #61430e;
  font-size: 0.88rem;
}

.section {
  margin-top: 22px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
}

.section-heading {
  display: flex;
  justify-content: space-between;
  gap: 30px;
  align-items: flex-end;
  margin-bottom: 24px;
}

.section-heading.compact {
  align-items: start;
}

.section-heading h2 {
  margin: 4px 0 0;
  font-size: clamp(1.7rem, 2.7vw, 2.65rem);
  line-height: 1.08;
  letter-spacing: -0.035em;
}

.section-heading > p,
.section-heading > div > p {
  max-width: 600px;
  margin: 0;
  color: var(--muted);
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.kpi-card {
  position: relative;
  min-height: 178px;
  padding: 18px;
  border: 1px solid var(--line);
  border-top: 4px solid var(--ink);
  border-radius: 8px;
  background: var(--paper);
}

.kpi-card.highlight {
  border-top-color: var(--coral);
}

.kpi-title {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: var(--slate);
  font-size: 0.74rem;
  font-weight: 850;
  letter-spacing: 0.055em;
  text-transform: uppercase;
}

.kpi-current {
  display: block;
  margin: 15px 0 5px;
  font-size: clamp(1.65rem, 2.3vw, 2.55rem);
  line-height: 1;
  letter-spacing: -0.045em;
}

.kpi-base {
  display: block;
  color: var(--muted);
  font-size: 0.82rem;
}

.delta-pill,
.data-pill,
.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 25px;
  margin-top: 14px;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 850;
}

.delta-pill.good,
.status-pill.good {
  background: var(--green-soft);
  color: var(--green);
}

.delta-pill.bad,
.status-pill.bad {
  background: var(--red-soft);
  color: var(--red);
}

.delta-pill.mixed,
.status-pill.mixed {
  background: var(--amber-soft);
  color: var(--amber);
}

.visual-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 16px;
}

.chart-card {
  min-width: 0;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--paper);
}

.chart-card-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: start;
  min-height: 56px;
  margin-bottom: 18px;
}

.chart-card h3 {
  margin: 2px 0 0;
  font-size: 1.35rem;
  line-height: 1.18;
  letter-spacing: -0.02em;
}

.definition-chip {
  max-width: 220px;
  padding: 6px 8px;
  border-radius: 5px;
  background: var(--soft);
  color: var(--muted);
  font-size: 0.7rem;
  line-height: 1.35;
  text-align: right;
}

.chart-legend {
  display: flex;
  gap: 18px;
  align-items: center;
  color: var(--slate);
  font-size: 0.78rem;
  font-weight: 750;
}

.chart-legend span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.chart-legend i {
  width: 14px;
  height: 14px;
  border-radius: 2px;
}

.legend-2025 {
  background: var(--year-2025);
}

.legend-2026 {
  background: var(--year-2026);
}

.paired-chart {
  min-height: 305px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px;
  align-items: end;
  padding: 22px 14px 0;
  border-bottom: 1px solid var(--line-strong);
  background-image: linear-gradient(to top, transparent 24%, var(--line) 25%, transparent 25.5%, transparent 49%, var(--line) 50%, transparent 50.5%, transparent 74%, var(--line) 75%, transparent 75.5%);
}

.paired-column {
  height: 270px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: stretch;
  gap: 8px;
  text-align: center;
}

.paired-value {
  display: block;
  font-size: 1.15rem;
  font-weight: 900;
  letter-spacing: -0.02em;
}

.paired-bar {
  min-height: 10px;
  border-radius: 5px 5px 0 0;
}

.paired-bar.y2025 {
  background: var(--year-2025);
}

.paired-bar.y2026 {
  background: var(--year-2026);
}

.paired-year {
  padding-top: 7px;
  font-size: 0.78rem;
  font-weight: 850;
}

.paired-delta {
  grid-column: 1 / -1;
  margin: 13px 0 0;
  text-align: center;
}

.index-axis {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin: 0 0 3px 150px;
  color: var(--quiet);
  font-size: 0.68rem;
}

.index-axis span:nth-child(2) {
  text-align: center;
}

.index-axis span:last-child {
  text-align: right;
}

.index-chart {
  display: grid;
  gap: 13px;
}

.index-row {
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr) 70px;
  gap: 10px;
  align-items: center;
}

.index-label {
  color: var(--slate);
  font-size: 0.77rem;
  font-weight: 750;
  line-height: 1.2;
}

.index-track {
  position: relative;
  height: 13px;
  overflow: hidden;
  border-radius: 3px;
  background: #edf0f4;
}

.index-track::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 40%;
  width: 2px;
  background: var(--ink);
  opacity: 0.35;
}

.index-fill {
  display: block;
  height: 100%;
  background: var(--coral);
}

.index-value {
  text-align: right;
  font-size: 0.76rem;
  font-weight: 900;
}

.funnel-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.funnel-card {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--soft);
}

.funnel-card h3 {
  margin: 0 0 16px;
  font-size: 1.35rem;
}

.funnel-stage {
  margin-top: 9px;
}

.stage-copy {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 4px;
  color: var(--slate);
  font-size: 0.78rem;
}

.stage-copy strong {
  color: var(--ink);
}

.stage-track {
  height: 25px;
  overflow: hidden;
  border-radius: 3px;
  background: #e5e9ef;
}

.stage-bar {
  height: 100%;
  min-width: 2px;
  background: var(--year-2025);
}

.funnel-card.year-2026 .stage-bar {
  background: var(--year-2026);
}

.stage-rate {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.68rem;
}

.course-summary {
  display: grid;
  grid-template-columns: minmax(250px, 1.4fr) repeat(4, minmax(150px, 0.65fr));
  gap: 1px;
  margin-bottom: 16px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--line);
}

.course-summary > div {
  min-height: 112px;
  padding: 17px;
  background: var(--paper);
}

.course-summary .course-identity {
  background: var(--ink);
  color: var(--paper);
}

.course-identity h3 {
  margin: 5px 0 8px;
  font-size: 1.55rem;
  line-height: 1.1;
}

.course-identity p,
.course-metric p {
  margin: 0;
  color: var(--muted);
  font-size: 0.75rem;
}

.course-identity p {
  color: #c6ccd4;
}

.course-metric span {
  display: block;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 850;
  letter-spacing: 0.055em;
  text-transform: uppercase;
}

.course-metric strong {
  display: block;
  margin: 9px 0 4px;
  font-size: 1.55rem;
  line-height: 1;
}

.course-ranking {
  display: grid;
  gap: 14px;
}

.rank-row {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) minmax(220px, 1.6fr);
  gap: 14px;
  align-items: center;
}

.rank-name {
  min-width: 0;
}

.rank-name button {
  display: block;
  width: 100%;
  padding: 0;
  overflow: hidden;
  border: 0;
  background: none;
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 800;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-name span {
  color: var(--muted);
  font-size: 0.68rem;
}

.rank-bars {
  display: grid;
  gap: 4px;
}

.rank-bar-line {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) 88px;
  gap: 7px;
  align-items: center;
  font-size: 0.68rem;
}

.rank-track {
  height: 9px;
  overflow: hidden;
  border-radius: 2px;
  background: #edf0f4;
}

.rank-fill {
  display: block;
  height: 100%;
}

.rank-fill.y2025 {
  background: var(--year-2025);
}

.rank-fill.y2026 {
  background: var(--year-2026);
}

.rank-amount {
  text-align: right;
  font-weight: 750;
}

.canvas-wrap {
  position: relative;
  width: 100%;
  height: 390px;
}

#courseScatter {
  width: 100%;
  height: 100%;
}

.chart-footnote {
  margin: 9px 0 0;
  color: var(--muted);
  font-size: 0.72rem;
}

.insight-section {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}

.insight-section .eyebrow {
  color: var(--coral);
}

.insight-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.insight-card {
  padding: 19px;
  border: 1px solid #343d49;
  border-radius: 8px;
  background: #171a1f;
}

.insight-card .signal {
  display: inline-block;
  margin-bottom: 12px;
  color: var(--coral);
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.insight-card h3 {
  margin: 0 0 10px;
  font-size: 1.25rem;
  line-height: 1.18;
}

.insight-card p {
  margin: 0;
  color: #c6ccd4;
  font-size: 0.84rem;
}

.insight-action {
  margin-top: 15px;
  padding-top: 13px;
  border-top: 1px solid #343d49;
  color: var(--paper);
  font-size: 0.78rem;
}

.insight-action strong {
  color: var(--coral);
}

.explorer-heading {
  align-items: center;
}

.advanced-filters {
  margin-bottom: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
}

.advanced-filters summary {
  padding: 13px 15px;
  color: var(--slate);
  font-size: 0.82rem;
  font-weight: 850;
  cursor: pointer;
}

.advanced-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  padding: 0 15px 15px;
}

.search-wide {
  grid-column: span 2;
}

.explorer-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.explorer-stat {
  padding: 12px 14px;
  border-left: 3px solid var(--coral);
  background: var(--soft);
}

.explorer-stat span {
  display: block;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
}

.explorer-stat strong {
  display: block;
  margin-top: 4px;
  font-size: 1.15rem;
}

.explorer-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(280px, 0.55fr);
  gap: 14px;
  align-items: start;
}

.table-card,
.campaign-detail {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
}

.table-meta {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.74rem;
}

.table-meta span:first-child {
  color: var(--ink);
  font-weight: 850;
}

.table-scroll {
  max-height: 650px;
  overflow: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th {
  position: sticky;
  top: 0;
  z-index: 2;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line-strong);
  background: #f1f3f6;
  color: var(--slate);
  font-size: 0.66rem;
  font-weight: 900;
  letter-spacing: 0.045em;
  text-align: right;
  text-transform: uppercase;
  white-space: nowrap;
}

th:first-child,
td:first-child {
  text-align: left;
}

td {
  padding: 11px 12px;
  border-bottom: 1px solid #edf0f4;
  font-size: 0.76rem;
  text-align: right;
  vertical-align: top;
  white-space: nowrap;
}

tbody tr {
  cursor: pointer;
}

tbody tr:hover,
tbody tr.selected {
  background: var(--coral-soft);
}

.campaign-cell {
  max-width: 330px;
  white-space: normal;
}

.campaign-cell button {
  padding: 0;
  border: 0;
  background: none;
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1.3;
  text-align: left;
}

.campaign-cell span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.68rem;
}

.data-pill {
  margin-top: 0;
  border-radius: 4px;
  background: var(--green-soft);
  color: var(--green);
  white-space: nowrap;
}

.data-pill.warn {
  background: var(--amber-soft);
  color: var(--amber);
}

.campaign-detail {
  position: sticky;
  top: 92px;
  min-height: 320px;
  padding: 20px;
}

.campaign-detail h3 {
  margin: 5px 0 7px;
  font-size: 1.5rem;
  line-height: 1.12;
}

.campaign-detail > p {
  color: var(--muted);
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 18px 0;
}

.detail-grid div {
  padding: 10px;
  background: var(--soft);
}

.detail-grid span {
  display: block;
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 800;
  text-transform: uppercase;
}

.detail-grid strong {
  display: block;
  margin-top: 4px;
  font-size: 0.92rem;
}

.detail-note {
  padding: 11px;
  border-left: 3px solid var(--coral);
  background: var(--coral-soft);
  color: var(--slate);
  font-size: 0.76rem;
}

.method-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.method-grid article {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.method-number {
  color: var(--coral);
  font-size: 0.75rem;
  font-weight: 950;
}

.method-grid h3 {
  margin: 8px 0 7px;
  font-size: 1.05rem;
}

.method-grid p {
  margin: 0;
  color: var(--muted);
  font-size: 0.79rem;
}

.source-ledger {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  margin-top: 16px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--line);
}

.source-record {
  padding: 12px;
  background: var(--soft);
}

.source-record strong,
.source-record span {
  display: block;
}

.source-record strong {
  font-size: 0.8rem;
}

.source-record span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.7rem;
}

.empty-state {
  padding: 28px;
  border: 1px dashed var(--line-strong);
  color: var(--muted);
  text-align: center;
}

footer {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: center;
  padding: 28px max(24px, calc((100% - var(--max)) / 2));
  border-top: 6px solid var(--coral);
  background: var(--ink);
  color: var(--paper);
}

footer strong,
footer span {
  display: block;
}

footer span {
  color: #aeb6c1;
  font-size: 0.74rem;
}

footer a {
  color: var(--coral);
  font-weight: 800;
}

@media (max-width: 1120px) {
  .header-inner {
    grid-template-columns: 0.8fr 1.7fr;
  }

  .header-meta {
    grid-column: 1 / -1;
    grid-template-columns: repeat(3, 1fr);
  }

  .filter-inner {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .reset-button {
    grid-column: 4;
  }

  .kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .course-summary {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .course-summary .course-identity {
    grid-column: 1 / -1;
  }

  .advanced-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .explorer-layout {
    grid-template-columns: 1fr;
  }

  .campaign-detail {
    position: static;
  }
}

@media (max-width: 820px) {
  .header-inner,
  .filter-inner,
  .page-shell {
    width: min(calc(100% - 28px), var(--max));
  }

  .header-inner {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .header-meta {
    grid-column: auto;
    grid-template-columns: 1fr;
  }

  .filter-bar {
    position: static;
  }

  .filter-inner,
  .advanced-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .reset-button,
  .search-wide {
    grid-column: span 2;
  }

  .executive-intro,
  .visual-grid,
  .funnel-grid {
    grid-template-columns: 1fr;
  }

  .executive-intro {
    gap: 22px;
  }

  .section-heading {
    display: block;
  }

  .section-heading > p,
  .section-heading > div > p,
  .chart-legend {
    margin-top: 12px;
  }

  .course-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .insight-grid,
  .method-grid,
  .source-ledger,
  .explorer-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .header-copy h1 {
    font-size: 2.55rem;
  }

  .filter-inner,
  .advanced-grid,
  .kpi-grid,
  .course-summary,
  .insight-grid,
  .method-grid,
  .source-ledger,
  .explorer-stats {
    grid-template-columns: 1fr;
  }

  .reset-button,
  .search-wide,
  .course-summary .course-identity {
    grid-column: auto;
  }

  .page-shell {
    padding-top: 26px;
  }

  .section {
    padding: 18px;
  }

  .rank-row {
    grid-template-columns: 1fr;
    gap: 5px;
  }

  .index-row {
    grid-template-columns: 100px minmax(0, 1fr) 58px;
  }

  .index-axis {
    margin-left: 110px;
  }

  .explorer-heading .export-button {
    width: 100%;
    margin-top: 14px;
  }

  footer {
    display: block;
  }

  footer a {
    display: inline-block;
    margin-top: 16px;
  }
}

@media print {
  .filter-bar,
  .reset-button,
  .export-button,
  .advanced-filters {
    display: none !important;
  }

  body {
    background: var(--paper);
  }

  .section {
    break-inside: avoid;
  }
}
