/* ─────────────────────────────────────────────────────────────
   LearnFlying.UK — one-page redesign
   Palette: sky blue → sunset · Style: Rightmove/Zoopla-coded
   ───────────────────────────────────────────────────────────── */

/* Self-hosted Cookie font (used by the donate button to match BMC styling).
   Self-hosted instead of Google Fonts so no third-party IP transfer occurs. */
@font-face {
  font-family: 'Cookie';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/cookie.woff2') format('woff2');
}

:root {
  --sky-1: #7dd3fc;
  --sky-2: #fda4af;
  --sky-3: #fb923c;
  --sky-deep: #0c4a6e;
  --accent: #ff8a3d;
  --accent-2: #fef3c7;
  --navy: #0a2540;
  --navy-soft: #1e3a5f;
  --muted: #5b6b80;
  --line: #e2e8f0;
  --bg: #f6f8fb;
  --bg-alt: #ffffff;
  --card-bg: #ffffff;
  --card-shadow: 0 4px 24px rgba(10, 37, 64, 0.08);
  --card-shadow-hover: 0 16px 40px rgba(10, 37, 64, 0.18);
  --radius: 14px;
  --radius-sm: 8px;
  --nav-h: 64px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Inter", Roboto, sans-serif;
  color: var(--navy);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
.hidden { display: none !important; }

/* ── Sticky top nav ──────────────────────────────────────── */
.top-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  z-index: 100;
  transition: background .25s ease, box-shadow .25s ease, color .25s ease;
  color: #fff;
}
.top-nav.stuck {
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 rgba(10, 37, 64, 0.08);
  color: var(--navy);
}
.top-nav .brand {
  display: flex;
  align-items: center;
  gap: .65rem;
  cursor: pointer;
  user-select: none;
}
.brand-mark {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  filter: drop-shadow(0 4px 10px rgba(10, 37, 64, 0.25));
  transition: transform .35s cubic-bezier(.4,0,.2,1);
}
.top-nav .brand:hover .brand-mark { transform: rotate(-8deg) scale(1.08); }
.brand-plane {
  transform-origin: center;
  animation: brand-plane-bob 3.6s ease-in-out infinite;
}
@keyframes brand-plane-bob {
  0%, 100% { transform: translate(22px, 14px) rotate(-30deg); }
  50%      { transform: translate(23px, 13px) rotate(-28deg); }
}
.brand-contrail {
  stroke-dashoffset: 0;
  animation: brand-contrail 4s linear infinite;
}
@keyframes brand-contrail {
  to { stroke-dashoffset: -20; }
}
.brand-text {
  font-weight: 900;
  font-size: 1.15rem;
  letter-spacing: -0.025em;
  line-height: 1;
}
.brand-tld {
  color: var(--accent);
  font-weight: 900;
}
.top-nav:not(.stuck) .brand-tld { color: var(--accent-2); }
.nav-anchors {
  display: flex;
  gap: 1.5rem;
  align-items: center;
}
.nav-anchor {
  font-size: .9rem;
  font-weight: 600;
  opacity: .85;
  padding: .35rem .15rem;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: opacity .2s ease, border-color .2s ease;
}
.nav-anchor:hover { opacity: 1; }
.nav-anchor.active {
  opacity: 1;
  border-bottom-color: var(--accent);
}
.nav-extra {
  font-size: .82rem;
  opacity: .8;
  margin-left: 1rem;
}
.nav-extra:hover { opacity: 1; }

@media (max-width: 720px) {
  .top-nav { padding: 0 1rem; }
  .nav-anchors { gap: .9rem; }
  .nav-anchor { font-size: .82rem; }
  .nav-extra { display: none; }
}

/* ── Animated sky gradient ───────────────────────────────── */
.sky-bg {
  background: linear-gradient(160deg, var(--sky-deep) 0%, var(--sky-1) 35%, var(--sky-2) 70%, var(--sky-3) 100%);
  background-size: 220% 220%;
  animation: sky-shift 28s ease-in-out infinite;
  position: relative;
  overflow: hidden;
}
@keyframes sky-shift {
  0%, 100% { background-position: 0% 50%; }
  50%      { background-position: 100% 50%; }
}

/* ── Weather scene (clouds, particles, aircraft) ─────────── */
.weather-scene {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}
.hero > .slogan,
.hero > .hero-sub,
.hero > .what,
.hero > .tile-grid,
.hero > .more-disciplines,
.hero > .stat-strip { position: relative; z-index: 2; }

/* Generic drifting element (cloud or aircraft) */
.ws-drift {
  position: absolute;
  left: -300px;
  will-change: transform;
  animation: ws-drift var(--ws-dur, 80s) linear var(--ws-delay, 0s) infinite;
}
@keyframes ws-drift {
  from { transform: translateX(0) translateY(0); }
  to   { transform: translateX(calc(100vw + 400px)) translateY(var(--ws-dy, 0px)); }
}

/* Clouds */
.ws-cloud { opacity: var(--ws-opacity, 0.95); }
.ws-cloud svg { width: 100%; height: 100%; display: block; }
.ws-cloud.cb { filter: drop-shadow(0 8px 12px rgba(0,0,0,0.25)); }

/* Aircraft */
.ws-aircraft {
  filter: drop-shadow(0 3px 6px rgba(10, 37, 64, 0.35));
}
.ws-aircraft svg { width: 100%; height: 100%; display: block; }
.ws-aircraft.tilt-up   svg { transform: rotate(-3deg); }
.ws-aircraft.tilt-down svg { transform: rotate(2deg); }

/* Helicopter rotor spin */
.ws-aircraft.is-heli .heli-rotor-blades {
  transform-origin: 50px 30px;
  animation: rotor-spin .12s linear infinite;
}
@keyframes rotor-spin {
  to { transform: rotate(360deg); }
}

/* Balloon bobs gently (vertical) on top of its drift */
.ws-balloon { animation: ws-balloon-drift var(--ws-dur, 220s) linear var(--ws-delay, 0s) infinite; }
@keyframes ws-balloon-drift {
  from { transform: translate(0, 0); }
  to   { transform: translate(calc(100vw + 200px), var(--ws-dy, -50px)); }
}
.ws-balloon .ws-balloon-bob {
  animation: ws-balloon-bob 5s ease-in-out infinite;
  display: block;
}
@keyframes ws-balloon-bob {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-10px); }
}

/* Rain */
.weather-particles { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.rain-drop {
  position: absolute;
  width: 1.2px;
  height: 16px;
  background: linear-gradient(to bottom, transparent, rgba(220, 235, 255, 0.85));
  top: -20px;
  animation: rain-fall var(--rd-dur, 0.7s) linear var(--rd-delay, 0s) infinite;
  transform: rotate(14deg);
}
@keyframes rain-fall {
  from { transform: translateY(-30px) rotate(14deg); opacity: 0; }
  10%  { opacity: 1; }
  90%  { opacity: 1; }
  to   { transform: translateY(120vh) rotate(14deg); opacity: 0; }
}

/* Snow */
.snow-flake {
  position: absolute;
  width: 5px;
  height: 5px;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  top: -10px;
  box-shadow: 0 0 4px rgba(255, 255, 255, 0.6);
  animation: snow-fall var(--sf-dur, 10s) linear var(--sf-delay, 0s) infinite;
}
@keyframes snow-fall {
  from { transform: translate(0, -20vh); opacity: 0; }
  10%  { opacity: .95; }
  50%  { transform: translate(20px, 60vh); }
  90%  { opacity: .95; }
  to   { transform: translate(-10px, 120vh); opacity: 0; }
}
.snow-pellet {
  width: 3px;
  height: 3px;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 50%;
  animation-duration: 3s !important;
}

/* Fog / mist overlay */
.weather-fog {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(to top, rgba(255,255,255,0.55) 0%, rgba(255,255,255,0.25) 30%, transparent 65%);
  opacity: 0;
  transition: opacity 1s ease;
}
.weather-fog.show {
  opacity: 1;
  animation: fog-drift 24s ease-in-out infinite;
}
.weather-fog.mist {
  background: linear-gradient(to top, rgba(255,255,255,0.35) 0%, rgba(255,255,255,0.15) 50%, transparent 80%);
}
@keyframes fog-drift {
  0%, 100% { transform: translateX(0); }
  50%      { transform: translateX(40px); }
}

/* Lightning flash overlay */
.lightning-flash {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.95);
  opacity: 0;
  pointer-events: none;
}
.lightning-flash.flash {
  animation: lightning 0.55s ease-out;
}
@keyframes lightning {
  0%   { opacity: 0; }
  6%   { opacity: 0.85; }
  14%  { opacity: 0; }
  22%  { opacity: 0.7; }
  32%  { opacity: 0.1; }
  100% { opacity: 0; }
}

/* Storm-darkened hero overlay (sits over the gradient) */
.weather-storm-overlay {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 30%, rgba(10, 25, 45, 0.45), rgba(10, 25, 45, 0.7));
  pointer-events: none;
}

/* Reduced motion: kill animations */
@media (prefers-reduced-motion: reduce) {
  .ws-drift, .ws-balloon, .rain-drop, .snow-flake,
  .heli-rotor-blades, .weather-fog.show, .lightning-flash.flash {
    animation: none !important;
  }
  .ws-drift, .ws-balloon { left: 30%; }
}

/* ── Hero ────────────────────────────────────────────────── */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 6rem 2rem 4rem;
  text-align: center;
  color: #fff;
  position: relative;
}
.slogan {
  font-size: clamp(2.6rem, 6.2vw, 5.4rem);
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1.02;
  margin: 0 0 1.25rem;
  text-shadow: 0 6px 28px rgba(10, 37, 64, 0.3);
  max-width: 1100px;
}
.slogan em {
  font-style: normal;
  background: linear-gradient(90deg, #ffffff, var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-sub {
  font-size: clamp(1.05rem, 1.5vw, 1.3rem);
  color: rgba(255, 255, 255, 0.95);
  max-width: 620px;
  margin: 0 auto 2.5rem;
  font-weight: 500;
  line-height: 1.5;
}
.cycler {
  display: inline-block;
  position: relative;
  color: var(--accent-2);
  font-weight: 700;
  vertical-align: baseline;
}
.cycler .w {
  display: inline-block;
  opacity: 0;
  position: absolute;
  left: 0;
  transform: translateY(8px);
  transition: opacity .55s ease, transform .55s ease;
  white-space: nowrap;
}
.cycler .w.active {
  opacity: 1;
  transform: translateY(0);
}
.cycler .placeholder {
  visibility: hidden;
  display: inline-block;
}

/* Hero stat strip */
.stat-strip {
  display: flex;
  gap: 2.5rem;
  margin-bottom: 2.5rem;
  flex-wrap: wrap;
  justify-content: center;
}
.stat {
  color: #fff;
  text-align: center;
}
.stat .n {
  font-size: 2rem;
  font-weight: 800;
  display: block;
  line-height: 1;
  text-shadow: 0 2px 12px rgba(10, 37, 64, 0.35);
}
.stat .l {
  font-size: .75rem;
  opacity: .9;
  text-transform: uppercase;
  letter-spacing: .14em;
  margin-top: .4rem;
  display: block;
}

.what {
  color: rgba(255, 255, 255, 0.95);
  font-size: .85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .16em;
  margin: 0 0 1.5rem;
}

/* Tile grid (6 tiles, 3x2 desktop, 2x3 mobile) */
.tile-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(180px, 220px));
  gap: 1.25rem;
  margin-bottom: 1.25rem;
}
.tile {
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: var(--radius);
  padding: 1.5rem 1.25rem;
  text-align: center;
  cursor: pointer;
  transition: transform .25s cubic-bezier(.4,0,.2,1), box-shadow .25s ease;
  box-shadow: 0 4px 16px rgba(10, 37, 64, 0.1);
  backdrop-filter: blur(8px);
  color: var(--navy);
}
.tile:hover {
  transform: translateY(-6px);
  box-shadow: 0 14px 36px rgba(10, 37, 64, 0.22);
}
.tile .label {
  font-weight: 800;
  font-size: 1.3rem;
  letter-spacing: -0.015em;
  line-height: 1.1;
}
.tile .sub {
  font-size: .78rem;
  color: var(--muted);
  margin-top: .4rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  font-weight: 600;
}

.more-disciplines {
  color: rgba(255, 255, 255, 0.9);
  font-size: .85rem;
  margin: 1rem 0 0;
}
.more-disciplines a {
  color: #fff;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.6);
  padding-bottom: 1px;
  font-weight: 600;
  cursor: pointer;
}
.more-disciplines a:hover { border-bottom-style: solid; }

.hero-bottom-sentinel {
  position: absolute;
  bottom: 0;
  height: 1px;
  width: 1px;
}

@media (max-width: 720px) {
  .hero { padding: 5rem 1.25rem 3rem; }
  .tile-grid { grid-template-columns: repeat(2, 1fr); gap: .85rem; }
  .tile { padding: 1.1rem .75rem; }
  .tile .label { font-size: 1.05rem; }
}

/* ── Section base ────────────────────────────────────────── */
.section {
  padding: 5rem 2rem;
  background: var(--bg);
}
.section-alt { background: var(--bg-alt); }
.section-header {
  max-width: 1280px;
  margin: 0 auto 2.5rem;
}
.section-header h2 {
  font-size: clamp(1.7rem, 3vw, 2.4rem);
  font-weight: 800;
  margin: 0 0 .5rem;
  color: var(--navy);
  letter-spacing: -0.02em;
}
.section-sub {
  color: var(--muted);
  margin: 0;
  font-size: 1rem;
  max-width: 640px;
}

@media (max-width: 720px) {
  .section { padding: 3rem 1.25rem; }
}

/* ── Pre-browse disclaimer banner ────────────────────────── */
.pre-browse-disclaimer {
  background: #fff1f2;
  border-top: 1px solid #fecaca;
  border-bottom: 1px solid #fecaca;
  padding: .9rem 2rem;
}
.pre-browse-disclaimer-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  align-items: flex-start;
  gap: .85rem;
  color: #7f1d1d;
  font-size: .88rem;
  line-height: 1.5;
}
.pre-browse-disclaimer strong { color: #b91c1c; }
.pbd-icon {
  font-size: 1.4rem;
  flex-shrink: 0;
  color: #b91c1c;
  line-height: 1.2;
}

/* ── Map section ─────────────────────────────────────────── */
#map-section { padding-left: 0; padding-right: 0; }
#map-section .section-header { width: 90%; max-width: none; padding: 0; margin: 0 auto 2.5rem; }
.map-toolbar {
  width: 90%;
  max-width: none;
  margin: 0 auto 1rem;
  display: flex;
  gap: .65rem;
  flex-wrap: wrap;
  align-items: center;
  background: #fff;
  padding: 1rem;
  border-radius: var(--radius);
  box-shadow: var(--card-shadow);
}
.chips { display: flex; gap: .35rem; flex-wrap: wrap; }
.chip-btn {
  background: #f1f5f9;
  border: 1px solid transparent;
  color: var(--navy-soft);
  font-weight: 600;
  font-size: .82rem;
  padding: .5rem .9rem;
  border-radius: 999px;
  transition: background .15s ease, color .15s ease;
}
.chip-btn:hover { background: #e2e8f0; }
.chip-btn.active {
  background: var(--navy);
  color: #fff;
}
.chip-btn.cat-active {
  background: var(--accent);
  color: #fff;
}
.chip-btn .chip-sub {
  display: block;
  font-size: .65rem;
  font-weight: 600;
  opacity: .75;
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-top: .15rem;
}

.toolbar-search {
  flex: 1;
  min-width: 200px;
  position: relative;
}
.toolbar-search input {
  width: 100%;
  padding: .55rem .9rem .55rem 2.2rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: .9rem;
  background: #fff;
  outline: none;
  color: var(--navy);
}
.toolbar-search::before {
  content: "🔍";
  position: absolute;
  left: .8rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: .85rem;
  pointer-events: none;
  opacity: .6;
}
.toolbar-search input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(255, 138, 61, 0.15);
}
.toolbar-sort {
  padding: .55rem .9rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  font-size: .85rem;
  color: var(--navy);
  font-weight: 600;
  cursor: pointer;
}

.active-cat-banner {
  width: 90%;
  max-width: none;
  margin: 0 auto .8rem;
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-radius: var(--radius-sm);
  padding: .65rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: .9rem;
  color: var(--navy-soft);
}
.active-cat-banner strong { color: var(--accent); margin-left: .25rem; }
.active-cat-banner button {
  background: none;
  border: 0;
  color: var(--accent);
  font-weight: 600;
  font-size: .85rem;
}
.active-cat-banner button:hover { text-decoration: underline; }

/* Hidden-schools info note above the map */
.hidden-schools-note {
  width: 90%;
  max-width: none;
  margin: 0 auto 1rem;
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  color: #075985;
  padding: .65rem 1rem;
  border-radius: var(--radius-sm);
  font-size: .85rem;
  line-height: 1.45;
}
.hidden-schools-note .hidden-schools-link {
  color: var(--accent);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.hidden-schools-note .hidden-schools-link:hover { color: #ea580c; }

.map-list-split {
  width: 90%;
  max-width: none;
  margin: 0 auto;
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
}
.map-list-split .map-wrap {
  flex: 0 0 33%;
  position: sticky;
  top: calc(var(--nav-h) + 1rem);
}
.map-list-split .card-rail-wrap {
  flex: 1;
  margin: 0;
  min-width: 0;
}

.map-wrap {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--card-shadow);
}
#map {
  width: 100%;
  height: calc(100vh - var(--nav-h) - 3rem);
  min-height: 480px;
  background: linear-gradient(135deg, #e0f2fe, #fde68a);
}
.map-loading {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(125, 211, 252, 0.4), rgba(251, 146, 60, 0.3));
  color: var(--navy);
  font-weight: 600;
  z-index: 5;
  pointer-events: none;
}
.map-loading.hidden { display: none; }

@media (max-width: 960px) {
  .map-list-split { flex-direction: column; gap: 1.5rem; }
  .map-list-split .map-wrap { flex: 1; width: 100%; position: static; }
  #map { height: 400px; min-height: 0; }
}
@media (max-width: 720px) {
  .map-toolbar { flex-direction: column; align-items: stretch; gap: .5rem; }
}

/* Reset-to-UK button on the map */
.map-reset-btn {
  width: 38px;
  height: 38px;
  background: #fff;
  border: 2px solid rgba(0, 0, 0, 0.2);
  border-radius: 6px;
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
  transition: background .15s ease, transform .1s ease;
  padding: 0;
}
.map-reset-btn:hover { background: #fff7ed; }
.map-reset-btn:active { transform: scale(0.92); }

/* Leaflet marker styling */
.plane-marker {
  font-size: 1.5rem;
  text-align: center;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
  cursor: pointer;
  background: transparent !important;
  border: none !important;
  transition: transform .2s ease;
}
.plane-marker:hover { transform: scale(1.2); }
.plane-marker.selected { transform: scale(1.6); z-index: 1000 !important; }

.marker-cluster-small,
.marker-cluster-medium,
.marker-cluster-large {
  background: rgba(255, 138, 61, 0.25);
}
.marker-cluster-small div,
.marker-cluster-medium div,
.marker-cluster-large div {
  background: var(--accent);
  color: #fff;
  font-weight: 700;
}

/* ── Card rail ──────────────────────────────────────────── */
.card-rail-wrap {
  margin: 0;
}
#rail-title {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0 0 1rem;
  color: var(--navy);
}
.card-rail {
  display: flex;
  flex-direction: column;
  gap: .85rem;
}
.show-more-wrap {
  text-align: center;
  margin-top: 1.25rem;
}
.show-more-btn {
  background: #fff;
  color: var(--navy);
  border: 1px solid var(--line);
  font-weight: 700;
  font-size: .9rem;
  padding: .75rem 1.75rem;
  border-radius: 999px;
  cursor: pointer;
  box-shadow: var(--card-shadow);
  transition: background .15s ease, transform .1s ease;
}
.show-more-btn:hover { background: #f1f5f9; }
.show-more-btn:active { transform: scale(0.97); }
.rail-empty {
  color: var(--muted);
  text-align: center;
  padding: 2rem;
  font-size: .95rem;
  grid-column: 1 / -1;
}

/* ── School card (horizontal list row) ───────────────────── */
.card {
  background: var(--card-bg);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--card-shadow);
  transition: transform .2s ease, box-shadow .25s ease, opacity .6s ease;
  opacity: 0;
  transform: translateY(12px);
  cursor: pointer;
  position: relative;
  display: flex;
  align-items: stretch;
  min-height: 100px;
}
.card.in-view {
  opacity: 1;
  transform: translateY(0);
}
.card:hover {
  transform: translateY(-2px);
  box-shadow: var(--card-shadow-hover);
}
.card.is-hovered {
  box-shadow: 0 0 0 3px var(--accent), var(--card-shadow-hover);
}
/* Thin coloured left stripe per category */
.card-no-header { border-left: 5px solid var(--sky-1); }
.card-no-header.card-fixed_wing  { border-left-color: var(--sky-3); }
.card-no-header.card-helicopter  { border-left-color: #818cf8; }
.card-no-header.card-microlight  { border-left-color: #34d399; }
.card-no-header.card-glider      { border-left-color: #06b6d4; }
.card-no-header.card-gyrocopter  { border-left-color: #f59e0b; }
.card-no-header.card-balloon     { border-left-color: #f472b6; }
.card-no-header.card-motorglider { border-left-color: #a3e635; }
.card-no-header.card-ground_school { border-left-color: #94a3b8; }
.card-no-header.card-language_assessment { border-left-color: #c084fc; }

.card-flag-row {
  display: flex;
  gap: .35rem;
  flex-wrap: wrap;
  margin-bottom: .35rem;
}
.card-flag {
  background: rgba(255, 255, 255, 0.95);
  color: var(--navy);
  font-size: .68rem;
  font-weight: 700;
  padding: .2rem .55rem;
  border-radius: 999px;
  letter-spacing: .04em;
}
.card-flag.verified { background: #d1fae5; color: #065f46; }
.card-body {
  padding: .9rem 1rem;
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: .25rem;
}
.card-name {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--navy);
  letter-spacing: -0.01em;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.card-price {
  color: var(--navy-soft);
  font-size: .9rem;
}
.card-price strong {
  color: var(--accent);
  font-weight: 800;
  font-size: 1rem;
}
.card-no-price {
  color: var(--muted);
  font-size: .85rem;
  font-style: italic;
}
.card-loc {
  color: var(--muted);
  font-size: .8rem;
}
.card-chips { display: flex; flex-wrap: wrap; gap: .3rem; margin-top: .15rem; }
.chip {
  background: #eef3fa;
  color: var(--navy-soft);
  font-size: .7rem;
  font-weight: 600;
  padding: .2rem .5rem;
  border-radius: 999px;
}
.card-aside {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: space-between;
  gap: .5rem;
  padding: .85rem 1rem .85rem 0;
  flex-shrink: 0;
}
.card-badges {
  display: flex;
  gap: .35rem;
  flex-wrap: wrap;
  align-items: center;
}
.badge {
  background: var(--accent);
  color: #fff;
  font-size: .72rem;
  font-weight: 700;
  padding: .25rem .6rem;
  border-radius: 6px;
}
.badge.muted { background: #e2e8f0; color: var(--navy-soft); }
.card-cmp-btn {
  background: #f1f5f9;
  color: var(--navy-soft);
  border: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  font-weight: 700;
  font-size: 1rem;
}
.card-cmp-btn:hover { background: #e2e8f0; }
.card-cmp-btn.active { background: var(--accent); color: #fff; }

/* ── Stats section ───────────────────────────────────────── */
#stats-content {
  max-width: 1280px;
  margin: 0 auto;
}
.stats-toolbar {
  display: flex;
  align-items: center;
  gap: .85rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}
.outlier-toggle {
  background: #fff;
  color: var(--navy);
  border: 1px solid var(--line);
  font-weight: 700;
  font-size: .85rem;
  padding: .55rem 1.1rem;
  border-radius: 999px;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
  box-shadow: var(--card-shadow);
}
.outlier-toggle:hover { background: #f1f5f9; }
.outlier-toggle.active {
  background: var(--navy);
  color: #fff;
  border-color: var(--navy);
}
.stats-toolbar-hint {
  color: var(--muted);
  font-size: .82rem;
}
.stats-group {
  margin-bottom: 3rem;
}
.stats-group:last-child { margin-bottom: 0; }
.stats-group-title {
  font-size: 1.25rem;
  font-weight: 800;
  margin: 0 0 .35rem;
  color: var(--navy);
  letter-spacing: -0.01em;
}
.stats-group-sub {
  color: var(--muted);
  font-size: .9rem;
  margin: 0 0 1.5rem;
}
.stats-grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(4, 1fr);
}
.stats-grid-2 {
  grid-template-columns: repeat(2, 1fr);
}
.stats-grid .big-tile { grid-column: span 1; }
.stats-grid .chart-full { grid-column: 1 / -1; }
@media (max-width: 980px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 540px) {
  .stats-grid { grid-template-columns: 1fr; }
}
.stat-tile {
  background: #fff;
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--card-shadow);
}
.stat-tile .value {
  font-size: 2.3rem;
  font-weight: 900;
  letter-spacing: -0.02em;
  color: var(--accent);
  display: block;
  line-height: 1;
  margin-bottom: .35rem;
}
.stat-tile .label {
  color: var(--muted);
  font-size: .82rem;
  text-transform: uppercase;
  letter-spacing: .1em;
  font-weight: 600;
}
.stat-tile .sub {
  color: var(--navy-soft);
  font-size: .85rem;
  margin-top: .35rem;
}
.chart-tile h3 {
  font-size: 1rem;
  font-weight: 700;
  margin: 0 0 1rem;
  color: var(--navy);
}
.bar-row {
  display: grid;
  grid-template-columns: 130px 1fr 70px;
  gap: .65rem;
  align-items: center;
  margin-bottom: .55rem;
  font-size: .85rem;
}
.bar-row .b-label { color: var(--navy-soft); font-weight: 600; }
.bar-row .b-track {
  background: #f1f5f9;
  border-radius: 4px;
  height: 10px;
  position: relative;
  overflow: hidden;
}
.bar-row .b-fill {
  position: absolute;
  inset: 0 auto 0 0;
  background: linear-gradient(90deg, var(--sky-1), var(--accent));
  border-radius: 4px;
  width: 0;
  transition: width 1.2s cubic-bezier(.4,0,.2,1);
}
.bar-row .b-value { color: var(--navy); font-weight: 700; text-align: right; }
.stats-loading {
  grid-column: 1 / -1;
  text-align: center;
  padding: 3rem;
  color: var(--muted);
}

/* Tabbed chart header (Average / Median) inside a stat-tile */
.rc-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}
.rc-tabs {
  display: flex;
  gap: .3rem;
  background: #f1f5f9;
  border-radius: 999px;
  padding: 3px;
}
.rc-tab {
  background: transparent;
  color: var(--navy-soft);
  border: 0;
  font-weight: 700;
  font-size: .78rem;
  padding: .35rem .85rem;
  border-radius: 999px;
  transition: background .15s ease, color .15s ease;
}
.rc-tab:hover { color: var(--navy); }
.rc-tab.active {
  background: var(--navy);
  color: #fff;
}
.rc-chart.hidden { display: none; }

/* ── Leaderboard section ─────────────────────────────────── */
.leaderboard-wrap {
  max-width: 1280px;
  margin: 0 auto;
  position: relative;
}
.lb-tabs {
  display: flex;
  gap: .5rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}
.lb-tab {
  background: #fff;
  color: var(--navy-soft);
  border: 1px solid var(--line);
  font-weight: 700;
  font-size: .9rem;
  padding: .65rem 1.25rem;
  border-radius: 999px;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.lb-tab:hover { background: #f1f5f9; }
.lb-tab.active {
  background: var(--navy);
  color: #fff;
  border-color: var(--navy);
}

.lb-reveal-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}
.reveal-btn {
  background: var(--accent);
  color: #fff;
  border: 0;
  font-weight: 700;
  font-size: .95rem;
  padding: .75rem 1.5rem;
  border-radius: 999px;
  cursor: pointer;
  transition: background .15s ease, transform .1s ease;
  box-shadow: 0 4px 12px rgba(255, 138, 61, 0.3);
}
.reveal-btn:hover:not(:disabled) { background: #ea580c; }
.reveal-btn:active:not(:disabled) { transform: scale(0.97); }
.reveal-btn:disabled {
  background: #d1fae5;
  color: #065f46;
  cursor: default;
  box-shadow: none;
}
.lb-reveal-state {
  color: var(--muted);
  font-size: .85rem;
}

.lb-table {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--card-shadow);
  overflow: hidden;
  -webkit-user-select: none;
  -moz-user-select: none;
  user-select: none;
}
.card-rail .card {
  -webkit-user-select: none;
  -moz-user-select: none;
  user-select: none;
}
/* Allow selection inside the modal so users can copy phone/email/website */
.modal, .modal * { user-select: text; -webkit-user-select: text; }
.lb-row {
  display: grid;
  grid-template-columns: 50px 110px 1.4fr 130px 2.2fr 1.4fr 140px;
  gap: .75rem;
  align-items: center;
  padding: .75rem 1.25rem;
  border-bottom: 1px solid var(--line);
  font-size: .92rem;
  color: var(--navy-soft);
  transition: background .15s ease;
}
.lb-action {
  display: flex;
  justify-content: flex-end;
  align-items: center;
}
.lb-row:last-child { border-bottom: 0; }
.lb-row:hover:not(.lb-head) { background: #fff7ed; }
.lb-row-clickable { cursor: pointer; }
.lb-row-focused {
  background: #fff7ed;
  box-shadow: inset 4px 0 0 0 var(--accent);
}
.lb-name-link {
  color: var(--accent);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
  display: inline-block;
}
.lb-name-link:hover { color: #ea580c; }
.lb-show-map {
  background: var(--navy);
  color: #fff;
  border: 0;
  font-weight: 700;
  font-size: .75rem;
  padding: .45rem .85rem;
  border-radius: 999px;
  cursor: pointer;
  transition: background .15s ease;
  white-space: nowrap;
}
.lb-show-map:hover { background: var(--accent); }
.lb-head {
  background: #f1f5f9;
  font-weight: 700;
  font-size: .75rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--muted);
}
.lb-rank {
  font-weight: 800;
  color: var(--accent);
  text-align: center;
}
.lb-rate strong {
  color: var(--navy);
  font-size: 1rem;
  font-weight: 800;
}
.lb-region { color: var(--navy-soft); }
.lb-cat {
  font-size: .82rem;
  font-weight: 600;
  color: var(--navy-soft);
  line-height: 1.2;
}
.lb-school { font-weight: 700; color: var(--navy); }
.lb-aircraft { color: var(--muted); font-size: .88rem; }
.lb-na { color: var(--muted); font-style: italic; }
.lb-mask {
  display: inline-block;
  background: linear-gradient(90deg, #0a2540, #1e3a5f);
  color: transparent;
  letter-spacing: -2px;
  padding: 0 .35rem;
  border-radius: 4px;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  user-select: none;
  pointer-events: none;
}
.lb-mask-name    { min-width: 140px; }
.lb-mask-aircraft { min-width: 80px; }
.lb-show-more-wrap {
  text-align: center;
  padding: 1rem;
  background: #f8fafc;
}
.lb-show-more {
  background: #fff;
  color: var(--navy);
  border: 1px solid var(--line);
  font-weight: 700;
  font-size: .85rem;
  padding: .55rem 1.5rem;
  border-radius: 999px;
  cursor: pointer;
  transition: background .15s ease;
}
.lb-show-more:hover { background: #f1f5f9; }
.lb-loading {
  padding: 3rem;
  text-align: center;
  color: var(--muted);
}

@media (max-width: 720px) {
  .lb-row {
    grid-template-columns: 36px 80px 1fr;
    grid-template-areas:
      "rank rate school"
      ".    cat  school"
      ".    region region"
      ".    .      aircraft"
      ".    .      action";
    row-gap: .25rem;
  }
  .lb-rank     { grid-area: rank; }
  .lb-rate     { grid-area: rate; }
  .lb-region   { grid-area: region; font-size: .8rem; }
  .lb-cat      { grid-area: cat; }
  .lb-school   { grid-area: school; }
  .lb-aircraft { grid-area: aircraft; }
  .lb-action   { grid-area: action; justify-content: flex-start; padding-top: .35rem; }
  .lb-head .lb-region, .lb-head .lb-aircraft, .lb-head .lb-action { display: none; }
}

/* ── FAQ section ─────────────────────────────────────────── */
.faq-list {
  max-width: 800px;
  margin: 0 auto;
}
.faq-list details {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--card-shadow);
  margin-bottom: .8rem;
  padding: 1.1rem 1.25rem;
  transition: box-shadow .2s ease;
}
.faq-list details[open] { box-shadow: var(--card-shadow-hover); }
.faq-list summary {
  font-weight: 700;
  color: var(--navy);
  font-size: 1rem;
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after {
  content: "+";
  font-size: 1.4rem;
  font-weight: 400;
  color: var(--accent);
  transition: transform .2s ease;
}
.faq-list details[open] summary::after { content: "−"; }
.faq-list p {
  color: var(--navy-soft);
  margin: .75rem 0 0;
  line-height: 1.6;
  font-size: .95rem;
}
.faq-body { margin-top: .85rem; }
.faq-body p { margin: .55rem 0; }
.faq-body ul {
  margin: .65rem 0;
  padding-left: 1.25rem;
  color: var(--navy-soft);
  font-size: .92rem;
  line-height: 1.7;
}
.faq-body .muted { color: var(--muted); font-style: italic; }

.hidden-schools-list {
  max-height: 360px;
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #f8fafc;
  padding: .5rem;
  margin-top: .5rem;
}
.hidden-schools-list .hs-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  padding: .4rem .65rem;
  border-radius: 6px;
  font-size: .85rem;
}
.hidden-schools-list .hs-row:hover { background: #fff; }
.hidden-schools-list .hs-name {
  color: var(--navy);
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.hidden-schools-list .hs-ref {
  font-size: .7rem;
  background: #e2e8f0;
  color: var(--navy-soft);
  padding: .15rem .45rem;
  border-radius: 999px;
  font-weight: 700;
  white-space: nowrap;
  flex-shrink: 0;
}

/* ── About section ───────────────────────────────────────── */
.about-grid {
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}
@media (max-width: 720px) {
  .about-grid { grid-template-columns: 1fr; }
}
.about-block {
  background: #fff;
  border-radius: var(--radius);
  padding: 1.75rem;
  box-shadow: var(--card-shadow);
}
.about-block h3 {
  margin: 0 0 .75rem;
  color: var(--navy);
  font-size: 1.15rem;
  font-weight: 800;
}
.about-block p {
  margin: 0 0 .8rem;
  color: var(--navy-soft);
  line-height: 1.6;
  font-size: .95rem;
}
.about-block ul {
  margin: 0;
  padding-left: 1.25rem;
  color: var(--navy-soft);
  font-size: .92rem;
  line-height: 1.7;
}
.about-block.disclaimer {
  background: #fff1f2;
  border: 1px solid #fecaca;
  grid-column: 1 / -1;
}
.about-block.disclaimer h3 { color: #b91c1c; }
.about-block.disclaimer p { color: #7f1d1d; }
.about-block.disclaimer strong { color: #b91c1c; }

/* Collapsible legal notice (inside About) */
.legal-block {
  grid-column: 1 / -1;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem 1.5rem;
  box-shadow: var(--card-shadow);
}
.legal-block[open] { padding-bottom: 1.5rem; }
.legal-block > summary {
  font-weight: 700;
  color: var(--navy);
  font-size: 1rem;
  cursor: pointer;
  list-style: none;
  padding: .35rem 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.legal-block > summary::-webkit-details-marker { display: none; }
.legal-block > summary::after {
  content: "+";
  font-size: 1.4rem;
  font-weight: 400;
  color: var(--accent);
}
.legal-block[open] > summary::after { content: "−"; }
.legal-body {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
  max-height: 60vh;
  overflow-y: auto;
  font-size: .9rem;
  line-height: 1.6;
  color: var(--navy-soft);
}
.legal-body h4 {
  font-size: .95rem;
  font-weight: 800;
  color: var(--navy);
  margin: 1.25rem 0 .5rem;
  letter-spacing: -0.005em;
}
.legal-body h4:first-child { margin-top: 0; }
.legal-body p { margin: 0 0 .65rem; }
.legal-body p:last-child { margin-bottom: 0; }

/* ── Footer ──────────────────────────────────────────────── */
.footer {
  background: var(--navy);
  color: rgba(255, 255, 255, 0.78);
  padding: 2.5rem 2rem;
  text-align: center;
  font-size: .85rem;
}
.footer strong { color: #fff; }
.footer a { color: var(--accent); }
.footer .footer-links {
  margin-top: .75rem;
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* ── Disclaimer gate (one-time, blocks page) ─────────────── */
.disclaimer-gate {
  position: fixed;
  inset: 0;
  background: rgba(10, 37, 64, 0.85);
  backdrop-filter: blur(8px);
  z-index: 3000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.disclaimer-card {
  background: #fff;
  border-radius: var(--radius);
  max-width: 480px;
  width: 100%;
  padding: 2rem 1.75rem;
  text-align: center;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.4);
  border-top: 6px solid #b91c1c;
}
.disclaimer-icon {
  font-size: 3rem;
  line-height: 1;
  margin-bottom: 1rem;
  color: #b91c1c;
}
.disclaimer-card h2 {
  margin: 0 0 1rem;
  font-size: 1.4rem;
  color: var(--navy);
  font-weight: 800;
}
.disclaimer-card p {
  color: var(--navy-soft);
  font-size: .95rem;
  line-height: 1.55;
  margin: 0 0 1rem;
}
.disclaimer-card p strong { color: #b91c1c; }
.disclaimer-accept {
  background: var(--accent);
  color: #fff;
  border: 0;
  padding: .85rem 1.5rem;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 1rem;
  margin-top: .5rem;
  transition: background .15s ease;
}
.disclaimer-accept:hover { background: #ea580c; }

/* ── School detail modal ─────────────────────────────────── */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(10, 37, 64, 0.65);
  backdrop-filter: blur(6px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease;
}
.modal:not(.hidden) {
  opacity: 1;
  pointer-events: auto;
}
.modal-inner {
  background: #fff;
  border-radius: var(--radius);
  width: 100%;
  max-width: 720px;
  max-height: 90vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  position: relative;
  transform: scale(0.95);
  transition: transform .25s ease;
}
.modal:not(.hidden) .modal-inner { transform: scale(1); }
.modal-close {
  position: absolute;
  top: .75rem;
  right: .75rem;
  background: rgba(255, 255, 255, 0.95);
  border: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 1.4rem;
  font-weight: 400;
  color: var(--navy);
  z-index: 2;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}
.modal-close:hover { background: #fff; }
#school-modal-body {
  overflow-y: auto;
  padding: 0;
}
.modal-header {
  height: 140px;
  display: flex;
  align-items: flex-end;
  padding: 1.5rem;
  color: #fff;
  position: relative;
}
.modal-header.fixed_wing  { background: linear-gradient(135deg, var(--sky-1), var(--sky-3)); }
.modal-header.helicopter  { background: linear-gradient(135deg, #818cf8, #c084fc); }
.modal-header.microlight  { background: linear-gradient(135deg, #34d399, #fbbf24); }
.modal-header.glider      { background: linear-gradient(135deg, #06b6d4, #67e8f9); }
.modal-header.gyrocopter  { background: linear-gradient(135deg, #f59e0b, #fde047); }
.modal-header.balloon     { background: linear-gradient(135deg, #f472b6, #fda4af); }
.modal-header.motorglider { background: linear-gradient(135deg, #a3e635, #4ade80); }
.modal-header.ground_school { background: linear-gradient(135deg, #94a3b8, #cbd5e1); }
.modal-header.language_assessment { background: linear-gradient(135deg, #c084fc, #e9d5ff); }
.modal-title {
  font-size: 1.5rem;
  font-weight: 800;
  text-shadow: 0 2px 8px rgba(10, 37, 64, 0.35);
}
.modal-body { padding: 1.5rem; }
.modal-cta-row {
  background: #fff;
  padding: 1rem 1.5rem;
  display: flex;
  gap: .65rem;
  border-top: 1px solid var(--line);
}
.modal-cta {
  flex: 1;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  font-size: .95rem;
  padding: .75rem 1.25rem;
  border-radius: var(--radius-sm);
  text-align: center;
  border: 0;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  transition: background .15s ease;
}
.modal-cta:hover { background: #ea580c; }
.modal-cta.secondary {
  background: #f1f5f9;
  color: var(--navy);
}
.modal-cta.secondary:hover { background: #e2e8f0; }

/* Detail content (re-used from old design) */
.institution-banner {
  background: #fef3c7;
  border-left: 3px solid #f59e0b;
  padding: .65rem .9rem;
  font-size: .85rem;
  color: #78350f;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin-bottom: 1rem;
}
.detail-badges {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  margin-bottom: 1.25rem;
}
.detail-caa, .region-badge, .src-badge, .detail-verified-badge {
  font-size: .72rem;
  padding: .25rem .55rem;
  border-radius: 999px;
  font-weight: 700;
}
.detail-caa { background: #ddd6fe; color: #5b21b6; }
.region-badge { background: #dbeafe; color: #1e40af; }
.src-badge.caa-badge { background: #ddd6fe; color: #5b21b6; }
.src-badge.dto-badge { background: #fef3c7; color: #92400e; }
.src-badge.ai-badge { background: #fee2e2; color: #991b1b; }
.src-badge.web-badge { background: #ccfbf1; color: #115e59; }
.detail-verified-badge { background: #d1fae5; color: #065f46; }
.detail-section {
  margin-bottom: 1.5rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--line);
}
.detail-section:last-child { border-bottom: 0; }
.detail-section-title {
  font-weight: 700;
  font-size: .85rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--navy);
  margin-bottom: .85rem;
  display: flex;
  align-items: center;
  gap: .5rem;
  flex-wrap: wrap;
}
.detail-row {
  display: flex;
  gap: .75rem;
  margin-bottom: .55rem;
  font-size: .92rem;
  color: var(--navy-soft);
  line-height: 1.45;
}
.detail-row .di { font-size: 1.1rem; line-height: 1.45; flex-shrink: 0; }
.field-label { font-weight: 700; color: var(--navy); }
.field-na { color: var(--muted); font-style: italic; }
.ratings-list, .rates-list { margin: .25rem 0 0; padding-left: 1.1rem; }
.ratings-list li, .rates-list li { margin-bottom: .15rem; }
.rates-headline {
  background: linear-gradient(135deg, #fff7ed, #fef3c7);
  border-radius: var(--radius-sm);
  padding: .9rem 1rem;
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
  font-size: .95rem;
}
.rates-headline strong { color: var(--accent); font-weight: 800; font-size: 1.1rem; }
.fleet-tags { display: flex; flex-wrap: wrap; gap: .35rem; }
.fleet-tag {
  background: #eef3fa;
  color: var(--navy-soft);
  padding: .25rem .55rem;
  border-radius: 999px;
  font-size: .78rem;
  font-weight: 600;
}
.location-note, .info-updated {
  color: var(--muted);
  font-size: .8rem;
  font-style: italic;
  margin: .35rem 0 0 1.75rem;
}
.website-row {
  display: flex;
  align-items: center;
  gap: .75rem;
  flex-wrap: wrap;
}
.website-url {
  color: var(--navy);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
  word-break: break-all;
}
.website-url:hover { color: var(--accent); }
.website-visit-btn {
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  font-size: .82rem;
  padding: .4rem .85rem;
  border-radius: 999px;
  white-space: nowrap;
  transition: background .15s ease;
}
.website-visit-btn:hover { background: #ea580c; }

.flag-section { margin-top: 1rem; }
.flag-btn {
  background: #fff1f2;
  border: 1px solid #fecaca;
  color: #b91c1c;
  font-weight: 600;
  font-size: .85rem;
  padding: .55rem 1rem;
  border-radius: var(--radius-sm);
}
.flag-btn:hover:not(:disabled) { background: #fee2e2; }
.flag-btn:disabled { opacity: .65; cursor: default; }
.detail-loading {
  padding: 3rem;
  text-align: center;
  color: var(--muted);
}

/* ── Compare tray + modal (preserved, restyled) ──────────── */
.compare-tray {
  position: fixed;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  background: var(--navy);
  color: #fff;
  border-radius: 999px;
  padding: .65rem .9rem;
  display: flex;
  align-items: center;
  gap: .65rem;
  z-index: 1500;
  box-shadow: 0 12px 32px rgba(10, 37, 64, 0.3);
  max-width: 95vw;
  flex-wrap: wrap;
}
.cmp-tray-label {
  font-weight: 700;
  font-size: .82rem;
  padding-left: .5rem;
}
.cmp-tray-schools { display: flex; gap: .4rem; flex-wrap: wrap; }
.cmp-tray-chip {
  background: rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  padding: .25rem .35rem .25rem .65rem;
  display: flex;
  align-items: center;
  gap: .25rem;
  font-size: .78rem;
}
.cmp-chip-name {
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cmp-chip-remove {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  border: 0;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  font-size: .85rem;
  line-height: 1;
}
.cmp-go-btn {
  background: var(--accent);
  color: #fff;
  border: 0;
  padding: .45rem 1rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: .85rem;
}
.cmp-clear-btn {
  background: transparent;
  color: rgba(255, 255, 255, 0.7);
  border: 0;
  font-size: .8rem;
  padding: 0 .5rem;
}
.cmp-clear-btn:hover { color: #fff; }

.compare-modal {
  position: fixed;
  inset: 0;
  background: rgba(10, 37, 64, 0.7);
  backdrop-filter: blur(6px);
  z-index: 2010;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.compare-modal.hidden { display: none; }
.compare-modal-inner {
  background: #fff;
  border-radius: var(--radius);
  width: 100%;
  max-width: 1100px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
}
.compare-modal-header {
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 800;
  font-size: 1.1rem;
}
.compare-modal-close {
  background: none;
  border: 0;
  font-size: 1.8rem;
  color: var(--muted);
  line-height: 1;
}
.compare-modal-body {
  overflow-y: auto;
  padding: 1.5rem;
}
.cmp-grid { display: grid; gap: 1.5rem; }
.cmp-col {
  padding-right: 1rem;
  border-right: 1px solid var(--line);
}
.cmp-col:last-child { border-right: 0; }

@media (max-width: 720px) {
  .cmp-grid { grid-template-columns: 1fr !important; }
  .cmp-col { border-right: 0; border-bottom: 1px solid var(--line); padding-bottom: 1.25rem; }
  .cmp-col:last-child { border-bottom: 0; }
}

/* ── Contact form (inline below About + still used by Report modal) ── */
.contact-inline-wrap {
  max-width: 640px;
  margin: 0 auto;
  background: #fff;
  border-radius: var(--radius);
  padding: 1.75rem 1.75rem 1.5rem;
  box-shadow: var(--card-shadow);
}
.contact-modal-inner {
  max-width: 540px;
  padding: 1.75rem 1.75rem 1.5rem;
  overflow-y: auto;
}
.contact-title {
  margin: 0 0 .25rem;
  font-size: 1.5rem;
  color: var(--navy);
}
.contact-sub {
  margin: 0 0 1.25rem;
  color: #475569;
  font-size: .95rem;
}
.contact-form { display: flex; flex-direction: column; gap: .9rem; }
.contact-field { display: flex; flex-direction: column; gap: .3rem; font-size: .9rem; color: var(--navy); }
.contact-field input,
.contact-field textarea {
  font: inherit;
  padding: .55rem .7rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--navy);
  resize: vertical;
}
.contact-field input:focus,
.contact-field textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
.contact-optional { color: #94a3b8; font-style: normal; font-size: .8rem; margin-left: .25rem; }
.contact-required { color: #ef4444; font-style: normal; margin-left: .25rem; }
.contact-honeypot { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.contact-consent {
  display: flex;
  gap: .55rem;
  align-items: flex-start;
  font-size: .85rem;
  color: #475569;
  line-height: 1.45;
  padding: .25rem 0;
}
.contact-consent input[type="checkbox"] {
  margin-top: .2rem;
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  accent-color: var(--accent);
}
.contact-consent .contact-privacy-link { color: var(--accent); font-weight: 600; }
.contact-consent .contact-privacy-link:hover { text-decoration: underline; }

/* ── Report-incorrect-data modal additions ─────────────────── */
/* Stack above the school detail modal (which is z-index 2000) so
   the report form is visible when opened from the school modal. */
#report-modal, #contact-modal { z-index: 2100; }
/* Privacy modal stacks above the contact/report modals so it's readable
   from inside the consent link without losing the form behind it. */
#privacy-modal { z-index: 2200; }
.privacy-modal-inner {
  max-width: 680px;
  padding: 1.75rem 1.75rem 1.5rem;
  overflow-y: auto;
}
.privacy-modal-inner .legal-body { padding: 0; }
.report-modal-inner { max-width: 720px; }
.report-fieldset {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: .75rem 1rem 1rem;
  margin: 0;
}
.report-fieldset legend {
  font-size: .9rem;
  font-weight: 600;
  color: var(--navy);
  padding: 0 .35rem;
}
.report-radio-grid {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem 1.25rem;
  margin-top: .35rem;
}
.report-radio-grid label,
.report-check-grid label {
  display: flex;
  align-items: center;
  gap: .45rem;
  font-size: .9rem;
  color: #334155;
  cursor: pointer;
}
.report-check-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: .45rem 1rem;
  margin-top: .35rem;
}
.report-radio-grid input[type="radio"],
.report-check-grid input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
}
.report-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .9rem;
}
@media (max-width: 540px) {
  .report-grid-2 { grid-template-columns: 1fr; }
}

/* ── Donate overlay over Find the cheapest ─────────────────── */
.donate-overlay {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  transition: opacity .25s ease;
}
.donate-overlay.hidden { display: none; }
.donate-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.75rem 1.75rem 1.5rem;
  max-width: 480px;
  text-align: center;
  box-shadow: 0 18px 48px rgba(10, 37, 64, 0.18);
}
.donate-title {
  margin: 0 0 .5rem;
  font-size: 1.4rem;
  color: var(--navy);
}
.donate-text {
  margin: 0 0 1.25rem;
  color: #475569;
  line-height: 1.5;
}
.donate-actions {
  display: flex;
  flex-direction: column;
  gap: .75rem;
  align-items: center;
}
.donate-bmc-slot {
  min-height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.donate-skip {
  background: transparent;
  border: 0;
  color: #64748b;
  font: inherit;
  text-decoration: underline;
  cursor: pointer;
  padding: .25rem .5rem;
}
.donate-skip:hover { color: var(--navy); }

.donate-skip-notice {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin: 1rem 0 0;
  padding: .65rem .85rem;
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-radius: 8px;
  color: #7c2d12;
  font-size: .92rem;
}
.donate-notice-close {
  background: transparent;
  border: 0;
  font-size: 1.2rem;
  line-height: 1;
  color: #7c2d12;
  cursor: pointer;
  padding: 0 .25rem;
}
.donate-notice-close:hover { color: #431407; }

.donate-footer {
  max-width: 1280px;
  margin: 1.75rem auto 0;
  padding: 1.25rem 1rem;
  text-align: center;
  border-top: 1px solid var(--line);
}
.donate-footer-text {
  margin: 0 0 .85rem;
  color: #475569;
  font-size: .95rem;
}
.donate-footer-btn { display: flex; justify-content: center; }

/* BMC-style button (matches the data attributes on the BMC widget) */
.bmc-link-btn {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  background: #FFDD00;
  color: #000;
  border: 1px solid #000;
  border-radius: 6px;
  padding: .55rem 1.1rem;
  font-family: 'Cookie', cursive, sans-serif;
  font-size: 1.4rem;
  line-height: 1;
  text-decoration: none;
  box-shadow: 0 2px 6px rgba(0,0,0,0.12);
  transition: transform .15s ease, box-shadow .15s ease;
}
.bmc-link-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(0,0,0,0.18);
}
.bmc-link-btn .bmc-emoji { font-size: 1.2rem; }
.bmc-link-btn .bmc-text { color: #000; }
.contact-actions { display: flex; align-items: center; gap: 1rem; margin-top: .25rem; }
.contact-submit {
  background: var(--accent);
  color: #fff;
  border: 0;
  border-radius: 8px;
  padding: .65rem 1.25rem;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
.contact-submit:hover { background: #ea580c; }
.contact-submit:disabled { opacity: .6; cursor: not-allowed; }
.contact-status { font-size: .9rem; }
.contact-status.ok  { color: #047857; }
.contact-status.err { color: #b91c1c; }
.contact-link { color: var(--accent); font-weight: 600; cursor: pointer; }
.contact-link:hover { text-decoration: underline; }
