/* ==========================================================================
   School Rank — stylesheet
   Hand-written (no framework/CDN dependency) recreation of the original
   brand system: primary blue #004aad, accent orange #ff4620, black & white.
   Font pairing: Montserrat (display/headings) + Open Sans (body).
   ========================================================================== */

:root {
  --background: 0 0% 100%;
  --foreground: 0 0% 8%;
  --card: 0 0% 100%;
  --card-foreground: 0 0% 8%;

  --primary: 214 100% 34%;
  --primary-foreground: 0 0% 100%;
  --accent: 11 100% 56%;
  --accent-foreground: 0 0% 100%;

  --secondary: 214 40% 96%;
  --secondary-foreground: 214 100% 28%;
  --muted: 214 25% 96%;
  --muted-foreground: 0 0% 40%;

  --success: 145 55% 35%;
  --success-foreground: 0 0% 100%;
  --destructive: 11 100% 56%;
  --destructive-foreground: 0 0% 100%;

  --border: 214 20% 90%;
  --input: 214 20% 90%;
  --ring: 214 100% 34%;
  --radius: 0.75rem;

  --phase-primary: 200 75% 45%;
  --phase-secondary: 280 50% 50%;
  --phase-combined: 165 60% 38%;
  --phase-ecd: 35 80% 55%;
  --phase-special: 350 60% 50%;
  --phase-skills: 25 70% 45%;

  --gradient-hero: linear-gradient(135deg, hsl(214 100% 28%) 0%, hsl(214 100% 34%) 55%, hsl(11 100% 56%) 100%);
  --shadow-card: 0 1px 3px hsl(214 100% 14% / 0.08), 0 4px 16px hsl(214 100% 14% / 0.06);
  --shadow-elevated: 0 8px 32px hsl(214 100% 14% / 0.16);
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: hsl(var(--background));
  color: hsl(var(--foreground));
  font-family: 'Open Sans', system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
  line-height: 1.55;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4, h5, h6 { font-family: 'Montserrat', system-ui, sans-serif; letter-spacing: -0.01em; margin: 0; font-weight: 800; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; }
button { font: inherit; cursor: pointer; }
input, select, textarea { font: inherit; }
table { border-collapse: collapse; width: 100%; }

/* ---------- layout ---------- */
.container { width: 100%; max-width: 1400px; margin: 0 auto; padding: 0 1rem; }
@media (min-width: 768px) { .container { padding: 0 2rem; } }
.narrow { max-width: 72rem; margin: 0 auto; }
.max-w-3xl { max-width: 48rem; }
.max-w-2xl { max-width: 42rem; }

.site-main { flex: 1; }
.site-main.with-header-pad { padding-top: 68px; }
.site-wrap { min-height: 100vh; display: flex; flex-direction: column; }

/* ---------- header / nav ---------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 40;
  transition: background-color .3s, border-color .3s;
  border-bottom: 1px solid transparent;
}
.site-header.solid { background: hsl(var(--background) / .92); backdrop-filter: blur(8px); border-color: hsl(var(--border)); }
.site-header.transparent { background: transparent; }
.site-header .container { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-top: .7rem; padding-bottom: .7rem; }
.brand-logo { height: 2.3rem; width: auto; }
.brand-logo.invert { filter: brightness(0) invert(1); }

.nav-desktop { display: none; align-items: center; gap: .25rem; }
@media (min-width: 1024px) { .nav-desktop { display: flex; } }
.nav-link {
  position: relative; display: inline-flex; align-items: center; gap: .35rem;
  padding: .5rem .75rem; border-radius: .5rem; font-size: .875rem; font-weight: 600;
  color: hsl(var(--foreground) / .7);
}
.site-header.transparent .nav-link { color: hsl(0 0% 100% / .85); }
.nav-link:hover { background: hsl(var(--muted)); color: hsl(var(--foreground)); }
.site-header.transparent .nav-link:hover { background: hsl(0 0% 100% / .1); color: #fff; }
.nav-link.active { background: hsl(var(--primary)); color: hsl(var(--primary-foreground)); }
.site-header.transparent .nav-link.active { background: hsl(0 0% 100% / .15); color: #fff; }
.nav-badge { margin-left: .15rem; border-radius: 999px; background: hsl(var(--accent)); color: #fff; font-size: .625rem; font-weight: 700; padding: .1rem .4rem; line-height: 1; }

.nav-toggle { display: inline-flex; align-items: center; justify-content: center; width: 2.5rem; height: 2.5rem; border-radius: .5rem; background: transparent; border: 0; color: hsl(var(--foreground)); }
.site-header.transparent .nav-toggle { color: #fff; }
@media (min-width: 1024px) { .nav-toggle { display: none; } }

.nav-mobile { display: none; border-top: 1px solid hsl(var(--border)); background: hsl(var(--background) / .98); backdrop-filter: blur(8px); }
.nav-mobile.open { display: block; }
.nav-mobile .container { display: flex; flex-direction: column; gap: .25rem; padding-top: .75rem; padding-bottom: .75rem; }
.nav-mobile .nav-link { color: hsl(var(--foreground) / .85); justify-content: space-between; padding: .75rem; }
@media (min-width: 1024px) { .nav-mobile { display: none !important; } }

/* ---------- footer ---------- */
.site-footer { margin-top: 4rem; background: hsl(var(--accent)); color: hsl(var(--accent-foreground) / .9); }
.site-footer .container { padding: 2.5rem 1rem; }
.footer-grid { display: grid; gap: 2rem; grid-template-columns: 1fr; }
@media (min-width: 768px) { .footer-grid { grid-template-columns: repeat(4, 1fr); } }
.footer-grid h4 { font-size: .95rem; font-weight: 700; color: hsl(var(--accent-foreground)); margin-bottom: .5rem; }
.footer-grid ul { display: flex; flex-direction: column; gap: .35rem; }
.footer-grid a:hover { text-decoration: underline; }
.footer-bottom { margin-top: 2rem; border-top: 1px solid hsl(var(--accent-foreground) / .2); padding-top: 1rem; font-size: .75rem; }
.footer-small { font-size: .75rem; margin-top: .5rem; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  border-radius: .5rem; border: 1px solid transparent; font-weight: 600; font-size: .875rem;
  padding: .55rem 1.1rem; line-height: 1.2; transition: background-color .15s, color .15s, border-color .15s;
  background: hsl(var(--muted)); color: hsl(var(--foreground));
}
.btn:hover { filter: brightness(.97); }
.btn-primary { background: hsl(var(--primary)); color: hsl(var(--primary-foreground)); }
.btn-primary:hover { background: hsl(var(--primary) / .9); }
.btn-secondary { background: hsl(0 0% 100% / .15); color: #fff; border-color: hsl(0 0% 100% / .3); }
.btn-secondary:hover { background: hsl(0 0% 100% / .25); }
.btn-outline { background: transparent; border-color: hsl(var(--border)); }
.btn-outline:hover { border-color: hsl(var(--primary)); color: hsl(var(--primary)); }
.btn-ghost { background: transparent; }
.btn-ghost:hover { background: hsl(var(--muted)); }
.btn-sm { padding: .35rem .7rem; font-size: .8rem; }
.btn-lg { padding: .8rem 1.5rem; font-size: 1rem; border-radius: 999px; }
.btn-round { border-radius: 999px; }
.btn[disabled] { opacity: .4; cursor: not-allowed; }

/* ---------- badges ---------- */
.badge { display: inline-flex; align-items: center; gap: .25rem; border-radius: 999px; padding: .15rem .6rem; font-size: .72rem; font-weight: 700; white-space: nowrap; }
.badge-muted { background: hsl(var(--muted)); color: hsl(var(--muted-foreground)); }
.badge-success { background: hsl(var(--success)); color: hsl(var(--success-foreground)); }
.badge-accent { background: hsl(var(--accent)); color: hsl(var(--accent-foreground)); }
.badge-destructive { background: hsl(var(--destructive)); color: hsl(var(--destructive-foreground)); }
.badge-secondary { background: hsl(var(--secondary)); color: hsl(var(--secondary-foreground)); }
.badge-outline { background: hsl(var(--background)); border: 1px solid hsl(var(--border)); color: hsl(var(--foreground) / .75); }
.badge-phase-primary { background: hsl(var(--phase-primary)); color: #fff; }
.badge-phase-secondary { background: hsl(var(--phase-secondary)); color: #fff; }
.badge-phase-combined { background: hsl(var(--phase-combined)); color: #fff; }
.badge-phase-ecd { background: hsl(var(--phase-ecd)); color: #fff; }
.badge-phase-special { background: hsl(var(--phase-special)); color: #fff; }
.badge-phase-skills { background: hsl(var(--phase-skills)); color: #fff; }
.badge-success-soft { background: hsl(var(--success) / .15); color: hsl(var(--success)); }

/* ---------- cards ---------- */
.card { background: hsl(var(--card)); border: 1px solid hsl(var(--border)); border-radius: .9rem; box-shadow: var(--shadow-card); }
.card-elevated { box-shadow: var(--shadow-elevated); }
.card-pad { padding: 1.25rem; }

.school-card { display: flex; flex-direction: column; overflow: hidden; border-radius: .9rem; border: 1px solid hsl(var(--border)); background: hsl(var(--card)); box-shadow: var(--shadow-card); transition: box-shadow .15s; }
.school-card:hover { box-shadow: var(--shadow-elevated); }
.school-card-tags { display: flex; align-items: center; gap: .4rem; flex-wrap: wrap; border-bottom: 1px solid hsl(var(--border)); background: hsl(var(--muted) / .3); padding: .6rem 1rem; }
.school-card-body { display: flex; flex: 1; flex-direction: column; padding: 1rem; }
.school-card-name { font-family: 'Montserrat', sans-serif; font-size: 1.05rem; font-weight: 700; line-height: 1.25; color: hsl(var(--foreground)); }
.school-card-name:hover { color: hsl(var(--primary)); }
.school-card-addr { margin-top: .3rem; display: flex; gap: .35rem; font-size: .85rem; color: hsl(var(--muted-foreground)); }
.school-card-stats { margin-top: .7rem; display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; font-size: .75rem; }
.stat-mini { border-radius: .5rem; background: hsl(var(--muted) / .5); padding: .4rem .6rem; }
.stat-mini .lbl { color: hsl(var(--muted-foreground)); }
.stat-mini .val { font-weight: 700; color: hsl(var(--foreground)); }
.school-card-actions { margin-top: auto; padding-top: 1rem; display: flex; align-items: center; justify-content: space-between; gap: .5rem; }

/* ---------- grid utilities ---------- */
.grid { display: grid; gap: 1rem; }
.grid-2 { grid-template-columns: repeat(1, 1fr); }
.grid-3 { grid-template-columns: repeat(1, 1fr); }
.grid-4 { grid-template-columns: repeat(1, 1fr); }
@media (min-width: 640px) { .grid-2 { grid-template-columns: repeat(2, 1fr); } .grid-3 { grid-template-columns: repeat(2, 1fr); } .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .grid-3 { grid-template-columns: repeat(3, 1fr); } .grid-4 { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 1280px) { .grid-4 { grid-template-columns: repeat(4, 1fr); } }

/* ---------- hero ---------- */
.hero { position: relative; min-height: 100svh; width: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; overflow: hidden; text-align: center; color: #fff; }
.hero-bg { position: absolute; inset: 0; background-size: cover; background-position: center; }
.hero-overlay { position: absolute; inset: 0; background: linear-gradient(180deg, hsl(214 100% 14% / .65) 0%, hsl(214 100% 12% / .55) 50%, hsl(214 100% 8% / .85) 100%); }
.hero-content { position: relative; max-width: 60rem; padding: 5rem 1rem; display: flex; flex-direction: column; align-items: center; }
.hero-title { font-size: 2.5rem; font-weight: 900; line-height: 1.05; text-shadow: 0 2px 12px rgb(0 0 0 / .25); }
@media (min-width: 768px) { .hero-title { font-size: 4rem; } }
@media (min-width: 1024px) { .hero-title { font-size: 4.5rem; } }
.hero-sub { margin-top: 1.1rem; max-width: 42rem; font-size: 1.05rem; color: hsl(0 0% 100% / .88); }

.search-box { margin-top: 2rem; width: 100%; max-width: 56rem; }
.search-panel { display: flex; flex-direction: column; border-radius: 1.5rem; background: #fff; padding: .5rem; box-shadow: var(--shadow-elevated); }
@media (min-width: 768px) { .search-panel { flex-direction: row; align-items: center; border-radius: 999px; padding: .4rem; } }
.search-field { flex: 1; display: flex; align-items: center; gap: .6rem; padding: .6rem 1rem; }
.search-field label { font-family: 'Montserrat', sans-serif; font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: hsl(var(--foreground)); }
.search-field input, .search-field select { flex: 1; border: 0; background: transparent; font-size: 1rem; color: hsl(var(--foreground)); outline: none; min-width: 0; }
.search-divider { display: none; width: 1px; height: 2rem; background: hsl(var(--border)); }
@media (min-width: 768px) { .search-divider { display: block; } }
.search-submit { flex-shrink: 0; width: 3.2rem; height: 3.2rem; border-radius: 999px; background: hsl(var(--primary)); color: #fff; border: 0; display: inline-flex; align-items: center; justify-content: center; font-size: 1.1rem; }
.hero-scrolldown { margin-top: 2.5rem; font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .15em; color: hsl(0 0% 100% / .7); }

.gradient-hero { background: var(--gradient-hero); color: #fff; }

/* ---------- band sections (school detail page) ---------- */
.band { width: 100%; }
.band .container { padding-top: 3.5rem; padding-bottom: 3.5rem; }
.band-white { background: hsl(var(--background)); color: hsl(var(--foreground)); }
.band-muted { background: hsl(var(--muted)); color: hsl(var(--foreground)); }
.band-ink { background: hsl(var(--foreground)); color: hsl(var(--background)); }
.band-brand { background: hsl(var(--primary)); color: hsl(var(--primary-foreground)); }
.band-header { margin-bottom: 2.2rem; max-width: 48rem; }
.band-eyebrow { font-size: .7rem; font-weight: 800; text-transform: uppercase; letter-spacing: .22em; color: hsl(var(--primary)); }
.band-brand .band-eyebrow, .band-ink .band-eyebrow { color: hsl(0 0% 100% / .7); }
.band-title { margin-top: .5rem; font-size: 1.9rem; font-weight: 900; line-height: 1.05; }
@media (min-width: 768px) { .band-title { font-size: 2.8rem; } }
.band-sub { margin-top: .7rem; font-size: 1rem; color: hsl(var(--muted-foreground)); }
.band-brand .band-sub, .band-ink .band-sub { color: hsl(0 0% 100% / .8); }

/* ---------- forms / filters ---------- */
.field { display: inline-flex; align-items: center; height: 2.5rem; border-radius: .5rem; border: 1px solid hsl(var(--input)); background: hsl(var(--background)); padding: 0 .75rem; font-size: .875rem; gap: .5rem; }
.field select, .field input { border: 0; background: transparent; outline: none; height: 100%; width: 100%; }
.filters-bar { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.search-input-wrap { display: flex; align-items: center; gap: .5rem; border: 1px solid hsl(var(--input)); border-radius: .5rem; padding: 0 .75rem; background: hsl(var(--background)); }
.search-input-wrap input { flex: 1; border: 0; outline: none; padding: .6rem 0; background: transparent; font-size: 1rem; }

/* Full filters form (school-list page): a proper responsive grid with
   stacked label/control per field, instead of the inline .field used by
   the compact header search — long labels like "Min. 2025 NSC pass rate"
   need room above the control, not beside it. */
.filters-form { background: hsl(var(--card)); border: 1px solid hsl(var(--border)); border-radius: .9rem; padding: 1.25rem; box-shadow: var(--shadow-card); }
.filters-grid { display: grid; grid-template-columns: repeat(1, 1fr); gap: 1rem; }
@media (min-width: 560px) { .filters-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) { .filters-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1180px) { .filters-grid { grid-template-columns: repeat(4, 1fr); } }
.filter-field { display: flex; flex-direction: column; gap: .35rem; min-width: 0; }
.filter-field label { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: hsl(var(--muted-foreground)); }
.filter-field select, .filter-field input { height: 2.5rem; width: 100%; border-radius: .5rem; border: 1px solid hsl(var(--input)); background: hsl(var(--background)); padding: 0 .75rem; font-size: .875rem; outline: none; }
.filter-field select:focus, .filter-field input:focus { border-color: hsl(var(--primary)); }
.filters-actions { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1.25rem; padding-top: 1.25rem; border-top: 1px solid hsl(var(--border)); }

/* ---------- table ---------- */
.table-wrap { overflow-x: auto; border-radius: .9rem; border: 1px solid hsl(var(--border)); background: hsl(var(--card)); box-shadow: var(--shadow-card); }
.sr-table { width: 100%; font-size: .875rem; }
.sr-table thead { background: hsl(var(--muted) / .5); }
.sr-table th { text-align: left; padding: .6rem .8rem; font-size: .68rem; text-transform: uppercase; letter-spacing: .06em; color: hsl(var(--muted-foreground)); font-weight: 700; }
.sr-table td { padding: .7rem .8rem; border-top: 1px solid hsl(var(--border)); }
.sr-table tr:hover td { background: hsl(var(--muted) / .25); }
.text-right { text-align: right; }
.tabular-nums { font-variant-numeric: tabular-nums; }

/* !important here is deliberate: .mobile-cards is combined with other
   component classes (e.g. .grid-cards) that also set `display`, and
   without !important a later same-specificity rule elsewhere in this
   file can win the cascade and defeat the responsive toggle — which is
   exactly what happened when .grid-cards's unconditional `display: grid`
   silently overrode the desktop `display: none` below. */
.mobile-cards { display: block !important; }
.table-wrap.desktop-only { display: none !important; }
@media (min-width: 768px) { .mobile-cards { display: none !important; } .table-wrap.desktop-only { display: block !important; } }

/* ---------- band grid tiles (stat squares) ---------- */
.tile-grid { display: grid; grid-template-columns: repeat(2, 1fr); border-top: 1px solid hsl(0 0% 100% / .15); }
@media (min-width: 768px) { .tile-grid { grid-template-columns: repeat(4, 1fr); } }
.tile { padding: 1.5rem; border-color: hsl(0 0% 100% / .15); display: flex; flex-direction: column; justify-content: space-between; min-height: 9rem; }
.tile .lbl { font-size: .68rem; font-weight: 800; text-transform: uppercase; letter-spacing: .16em; opacity: .75; }
.tile .val { margin-top: .5rem; font-family: 'Montserrat', sans-serif; font-size: 2.1rem; font-weight: 900; line-height: 1; }

.fact-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; overflow: hidden; border: 1px solid hsl(var(--border)); background: hsl(var(--border)); margin-top: 2rem; max-width: 64rem; }
@media (min-width: 640px) { .fact-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1024px) { .fact-grid { grid-template-columns: repeat(6, 1fr); } }
.fact { background: hsl(var(--muted)); padding: .9rem; display: flex; flex-direction: column; justify-content: space-between; aspect-ratio: 1; }
.fact dt { font-size: .65rem; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; color: hsl(var(--muted-foreground)); }
.fact dd { margin: 0; font-family: 'Montserrat', sans-serif; font-size: 1.2rem; font-weight: 900; }

.field-list .field-row { border-bottom: 1px solid hsl(var(--border) / .6); padding: .7rem 0; }
.field-list .field-row:last-child { border-bottom: 0; }
.field-row .lbl { font-size: .62rem; text-transform: uppercase; letter-spacing: .12em; color: hsl(var(--muted-foreground)); }
.field-row .val { margin-top: .2rem; font-size: .9rem; font-weight: 600; }

/* ---------- breadcrumb ---------- */
.breadcrumb { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem; font-size: .75rem; color: hsl(0 0% 100% / .8); margin-bottom: .75rem; }
.breadcrumb a:hover { color: #fff; text-decoration: underline; }
.breadcrumb.on-light { color: hsl(var(--muted-foreground)); }
.breadcrumb.on-light a:hover { color: hsl(var(--primary)); }

/* ---------- pagination ---------- */
.pagination { margin-top: 2rem; display: flex; align-items: center; justify-content: center; gap: .75rem; font-size: .875rem; }

/* ---------- accordion (FAQ) using native <details>/<summary> ---------- */
.faq-item { border-bottom: 1px solid hsl(var(--border)); }
.faq-item summary { list-style: none; cursor: pointer; padding: .9rem 0; font-weight: 700; font-size: .9rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: '+'; font-size: 1.2rem; font-weight: 400; color: hsl(var(--muted-foreground)); flex-shrink: 0; }
.faq-item[open] summary::after { content: '–'; }
.faq-item .faq-body { padding: 0 0 1rem; font-size: .9rem; line-height: 1.6; color: hsl(var(--foreground) / .85); white-space: pre-line; }

/* ---------- link ---------- */
.link { color: hsl(var(--primary)); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.link:hover { color: hsl(var(--primary) / .8); }

/* ---------- legal / prose pages ---------- */
.legal-hero { border-bottom: 1px solid hsl(var(--border)); background: hsl(var(--muted) / .4); }
.legal-hero .container { max-width: 48rem; padding-top: 2.5rem; padding-bottom: 2.5rem; }
.legal-article { max-width: 48rem; margin: 0 auto; padding: 3rem 1rem; }
.legal-prose { font-size: 1rem; line-height: 1.7; color: hsl(var(--foreground) / .85); }
.legal-prose > * + * { margin-top: 1.1rem; }
.legal-prose p.lead { font-size: 1.1rem; border-left: 4px solid hsl(var(--primary)); padding: .2rem 0 .2rem 1.1rem; color: hsl(var(--foreground)); }
.legal-prose h2 { font-size: 1.5rem; font-weight: 900; margin-top: 2.5rem; margin-bottom: .5rem; }
.legal-prose h3 { font-size: 1.15rem; font-weight: 800; margin-top: 1.75rem; margin-bottom: .4rem; }
.legal-prose ul, .legal-prose ol { margin-top: .6rem; padding-left: 1.3rem; }
.legal-prose ul { list-style: disc; }
.legal-prose ol { list-style: decimal; }
.legal-prose li + li { margin-top: .35rem; }
.legal-prose a { color: hsl(var(--primary)); font-weight: 600; text-decoration: underline; }
.legal-prose strong { font-weight: 700; color: hsl(var(--foreground)); }

/* ---------- misc utility ---------- */
.text-muted { color: hsl(var(--muted-foreground)); }
.text-primary { color: hsl(var(--primary)); }
.text-accent { color: hsl(var(--accent)); }
.text-success { color: hsl(var(--success)); }
.text-center { text-align: center; }
.text-xs { font-size: .75rem; }
.text-sm { font-size: .875rem; }
.mt-1 { margin-top: .25rem; } .mt-2 { margin-top: .5rem; } .mt-3 { margin-top: .75rem; }
.mt-4 { margin-top: 1rem; } .mt-6 { margin-top: 1.5rem; } .mt-8 { margin-top: 2rem; } .mt-10 { margin-top: 2.5rem; }
.mb-2 { margin-bottom: .5rem; } .mb-3 { margin-bottom: .75rem; } .mb-4 { margin-bottom: 1rem; }
.py-8 { padding-top: 2rem; padding-bottom: 2rem; }
.py-10 { padding-top: 2.5rem; padding-bottom: 2.5rem; }
.py-12 { padding-top: 3rem; padding-bottom: 3rem; }
.flex { display: flex; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.items-end { align-items: flex-end; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: .25rem; } .gap-2 { gap: .5rem; } .gap-3 { gap: .75rem; } .gap-4 { gap: 1rem; } .gap-6 { gap: 1.5rem; }
.font-display { font-family: 'Montserrat', sans-serif; }
.font-bold { font-weight: 700; } .font-black { font-weight: 900; }
.rounded { border-radius: var(--radius); }
.empty-state { border: 1px dashed hsl(var(--border)); border-radius: 1rem; background: hsl(var(--card)); padding: 3rem 1.5rem; text-align: center; }
.dl-flat dt { font-size: .62rem; text-transform: uppercase; letter-spacing: .12em; color: hsl(var(--muted-foreground)); }
.dl-flat dd { margin: .2rem 0 0; font-size: .9rem; }
.dl-flat > div { padding: .7rem 0; border-bottom: 1px solid hsl(var(--border) / .6); }

/* ---------- progress / meter bars (benchmark, subjects) ---------- */
.meter-track { position: relative; height: .55rem; width: 100%; border-radius: 999px; background: hsl(0 0% 100% / .15); overflow: visible; }
.meter-fill { position: absolute; inset: 0 auto 0 0; border-radius: 999px; background: hsl(var(--accent)); }
.meter-dot { position: absolute; top: 50%; width: 1rem; height: 1rem; border-radius: 999px; background: #fff; border: 2px solid hsl(var(--primary)); transform: translate(-50%, -50%); box-shadow: 0 1px 4px rgb(0 0 0 / .3); }
.bar-track { height: 6px; border-radius: 999px; background: hsl(var(--muted)); overflow: hidden; }
.bar-fill { height: 100%; border-radius: 999px; }

/* ---------- map ---------- */
#map-canvas { position: absolute; inset: 0; }
.map-shell { position: relative; height: 70vh; border-radius: .9rem; overflow: hidden; border: 1px solid hsl(var(--border)); box-shadow: var(--shadow-card); }
.map-popup-card { position: absolute; bottom: .75rem; left: .75rem; right: .75rem; z-index: 500; max-width: 26rem; border-radius: .9rem; border: 1px solid hsl(var(--border)); background: hsl(var(--background)); padding: 1rem; box-shadow: var(--shadow-elevated); }
@media (min-width: 768px) { .map-popup-card { right: auto; } }
.map-legend { margin-top: 1rem; display: flex; flex-wrap: wrap; gap: .75rem; font-size: .75rem; color: hsl(var(--muted-foreground)); align-items: center; }
.legend-dot { display: inline-block; width: .7rem; height: .7rem; border-radius: 999px; margin-right: .3rem; vertical-align: -1px; }

/* ---------- 404 ---------- */
.notfound { min-height: 60vh; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 4rem 1rem; }
.notfound .code { font-family: 'Montserrat', sans-serif; font-size: 4.5rem; font-weight: 900; color: hsl(var(--primary)); }

/* ---------- print / misc ---------- */
.skip-link { position: absolute; left: -9999px; top: 0; background: hsl(var(--primary)); color: #fff; padding: .6rem 1rem; z-index: 100; }
.skip-link:focus { left: .5rem; top: .5rem; }

.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; }

/* ---------- section headers (non-band, on white/muted pages) ---------- */
.section { padding: 3rem 0; }
.section-header { margin-bottom: 1.75rem; max-width: 48rem; }
.section-eyebrow { font-size: .7rem; font-weight: 800; text-transform: uppercase; letter-spacing: .22em; color: hsl(var(--primary)); }
.section-title { margin-top: .4rem; font-size: 1.6rem; font-weight: 900; line-height: 1.1; }
@media (min-width: 768px) { .section-title { font-size: 2.1rem; } }
.section-sub { margin-top: .6rem; font-size: .95rem; color: hsl(var(--muted-foreground)); }

/* ---------- card grids (schools, provinces, districts, places) ---------- */
.grid-cards { display: grid; gap: 1.1rem; grid-template-columns: 1fr; }
@media (min-width: 640px) { .grid-cards { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .grid-cards { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1280px) { .grid-cards { grid-template-columns: repeat(4, 1fr); } }

.province-card { display: flex; flex-direction: column; gap: .6rem; border-radius: .9rem; border: 1px solid hsl(var(--border)); background: hsl(var(--card)); box-shadow: var(--shadow-card); padding: 1.4rem; transition: box-shadow .15s, transform .15s; }
.province-card:hover { box-shadow: var(--shadow-elevated); transform: translateY(-2px); }
.province-card .name { font-family: 'Montserrat', sans-serif; font-size: 1.2rem; font-weight: 800; }
.province-card .count { font-size: .8rem; color: hsl(var(--muted-foreground)); }

.link-card { display: flex; flex-direction: column; gap: .3rem; border-radius: .75rem; border: 1px solid hsl(var(--border)); background: hsl(var(--card)); padding: 1rem 1.1rem; box-shadow: var(--shadow-card); transition: box-shadow .15s; }
.link-card:hover { box-shadow: var(--shadow-elevated); }
.link-card .name { font-weight: 700; font-size: .95rem; }
.link-card .count { font-size: .78rem; color: hsl(var(--muted-foreground)); }

.link-strong { font-weight: 700; color: hsl(var(--foreground)); }
.link-strong:hover { color: hsl(var(--primary)); text-decoration: underline; }

/* ---------- quick stat tiles (home / stats pages) ---------- */
.stat-band { display: grid; gap: 1px; background: hsl(0 0% 100% / .15); grid-template-columns: repeat(2, 1fr); border-radius: .9rem; overflow: hidden; }
@media (min-width: 768px) { .stat-band { grid-template-columns: repeat(4, 1fr); } }
.stat-band .cell { background: hsl(0 0% 100% / .06); padding: 1.4rem; text-align: center; }
.stat-band .cell .num { font-family: 'Montserrat', sans-serif; font-size: 1.9rem; font-weight: 900; }
.stat-band .cell .lbl { margin-top: .3rem; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; opacity: .8; }

/* ---------- FAQ section wrapper ---------- */
.faq-section { padding: 2.5rem 0; }
.faq-section h2 { font-size: 1.4rem; font-weight: 900; margin-bottom: .5rem; }
.faq-list { margin-top: 1rem; border-top: 1px solid hsl(var(--border)); }

/* ---------- top-matric slider (home page) ---------- */
.matric-strip { display: flex; gap: 1rem; overflow-x: auto; padding-bottom: .5rem; scroll-snap-type: x mandatory; }
.matric-strip::-webkit-scrollbar { height: 6px; }
.matric-strip::-webkit-scrollbar-thumb { background: hsl(var(--border)); border-radius: 999px; }
.matric-strip-item { scroll-snap-align: start; flex: 0 0 auto; width: 15.5rem; }
