/* ============================================================
   FLIGHT-TRACKER.NET — Design System
   Clean, trustworthy aviation UI: deep navy, sky blue, amber.
   Structure adapted from the Sudoku.by design system.
   ============================================================ */

:root {
  --blue: #0284c7;          /* sky blue — primary */
  --blue-dark: #075985;
  --blue-light: #e0f2fe;
  --blue-border: #bae6fd;
  --navy: #0b2447;
  --accent: #f59e0b;        /* amber — beacons, highlights */
  --accent-light: #fffbeb;
  --live: #16a34a;          /* radar green — live indicators */
  --text: #1e293b;
  --text-muted: #64748b;
  --text-light: #94a3b8;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --surface-3: #f1f5f9;
  --border: #e2e8f0;
  --border-focus: #7dd3fc;
  --shadow-sm: 0 1px 3px rgba(2,32,71,.08);
  --shadow: 0 4px 12px rgba(2,32,71,.10);
  --shadow-lg: 0 8px 24px rgba(2,32,71,.12);
  --radius: 10px;
  --radius-sm: 6px;
  --radius-lg: 16px;
  --nav-height: 62px;
  --font: 'Inter', 'Inter Fallback', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-serif: 'Source Serif 4', Georgia, 'Times New Roman', serif;
}

/* Metric-matched fallback: keeps line boxes the same size before Inter loads,
   so swapping the webfont in does not reflow text (a CLS source). */
@font-face {
  font-family: 'Inter Fallback';
  src: local('Helvetica Neue'), local('Arial'), local('Liberation Sans');
  size-adjust: 107%;
  ascent-override: 90%;
  descent-override: 22.5%;
  line-gap-override: 0%;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; overflow-x: hidden; }
body { overflow-x: hidden; font-family: var(--font); color: var(--text);
  background: var(--surface-2); line-height: 1.6; -webkit-font-smoothing: antialiased; }
a { color: var(--blue); text-decoration: none; }
a:hover { color: var(--blue-dark); }
img, video, iframe, embed, object { max-width: 100%; display: block; }
picture { display: contents; }

h1, h2, h3, h4, h5, h6 { font-weight: 700; line-height: 1.2; color: var(--text); }
h1 { font-size: 2rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.1rem; }
p { margin-bottom: 1rem; color: var(--text-muted); }
p:last-child { margin-bottom: 0; }

/* One site-wide content width: containers match the map/nav width (1400px). */
.container { max-width: 1400px; margin: 0 auto; padding: 0 1.5rem; }
.container-sm { max-width: 800px; margin: 0 auto; padding: 0 1.5rem; }
.container-lg { max-width: 1400px; margin: 0 auto; padding: 0 1.5rem; }
.page-wrap { padding: 2.5rem 0; }

/* ---- NAVIGATION ---- */
.site-nav { background: var(--navy); border-bottom: 1px solid #143462;
  height: var(--nav-height); position: sticky; top: 0; z-index: 1000; }
.nav-inner { display: flex; align-items: center; height: 100%; gap: 0; }
.nav-logo { display: flex; align-items: center; gap: .5rem; font-size: 1.25rem;
  font-weight: 800; color: #fff; letter-spacing: -.5px; margin-right: 1.75rem;
  white-space: nowrap; flex-shrink: 0; }
.nav-logo svg { flex-shrink: 0; }
.nav-logo:hover { color: #7dd3fc; }
.nav-logo .tld { color: #38bdf8; }
.nav-links { display: flex; align-items: center; gap: .25rem; flex: 1; list-style: none; }
.nav-links a, .nav-dropdown-trigger { display: block; padding: .4rem .7rem;
  border-radius: var(--radius-sm); font-size: .9rem; font-weight: 500; color: #cbd5e1;
  white-space: nowrap; transition: background .15s, color .15s; }
.nav-links a:hover, .nav-links a.active { background: rgba(56,189,248,.14); color: #7dd3fc; }
.nav-live-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%;
  background: #4ade80; margin-right: .35rem; animation: pulse 1.6s infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .35; } }

.nav-has-dropdown { position: relative; }
.nav-dropdown-trigger { display: flex; align-items: center; gap: .3rem; cursor: pointer; user-select: none; }
.nav-has-dropdown:hover .nav-dropdown-trigger { background: rgba(56,189,248,.14); color: #7dd3fc; }
.nav-dropdown-trigger svg { transition: transform .15s; }
.nav-has-dropdown:hover .nav-dropdown-trigger svg { transform: rotate(180deg); }
.nav-mega { position: absolute; top: calc(100% + 2px); left: 50%; transform: translateX(-50%);
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: 0 12px 40px rgba(2,32,71,.2); width: 560px; padding: .75rem 0 .5rem;
  display: none; z-index: 300; }
.nav-has-dropdown:hover .nav-mega { display: block; }
.nav-mega-cols { display: grid; grid-template-columns: 1fr 1fr; }
.nav-mega-heading { font-size: .7rem; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; color: var(--text-muted); padding: .6rem 1rem .2rem; }
.nav-mega a { display: flex; align-items: center; justify-content: space-between;
  padding: .3rem 1rem; font-size: .84rem; color: var(--text); border-radius: 4px; }
.nav-mega a:hover { background: var(--blue-light); color: var(--blue); }
.nav-mega-footer { border-top: 1px solid var(--border); margin-top: .5rem;
  padding: .5rem 1rem .25rem; display: flex; justify-content: flex-end; }
.nav-actions { display: flex; align-items: center; gap: .6rem; flex-shrink: 0; margin-left: auto; }

/* Nav search */
.nav-search { position: relative; }
.nav-search input { background: rgba(255,255,255,.1); border: 1px solid rgba(125,211,252,.3);
  color: #fff; border-radius: var(--radius-sm); padding: .38rem .9rem .38rem 2.1rem; font-size: .85rem;
  width: 210px; font-family: var(--font); transition: all .2s; }
.nav-search input::placeholder { color: #94a3b8; }
.nav-search input:focus { outline: none; background: rgba(255,255,255,.16);
  border-color: #38bdf8; width: 260px; }
.nav-search svg { position: absolute; left: .7rem; top: 50%; transform: translateY(-50%);
  color: #94a3b8; pointer-events: none; }
.search-results { position: absolute; top: calc(100% + 6px); right: 0; width: 340px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow-lg); z-index: 500; overflow: hidden; display: none; max-height: 70vh; overflow-y: auto; }
.search-results.open { display: block; }
.search-results .sr-heading { font-size: .7rem; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; color: var(--text-muted); padding: .6rem 1rem .2rem; }
.search-results a { display: flex; justify-content: space-between; align-items: center;
  padding: .45rem 1rem; font-size: .85rem; color: var(--text); }
.search-results a:hover { background: var(--blue-light); }
.search-results .sr-code { font-family: ui-monospace, monospace; font-size: .74rem;
  color: var(--blue); font-weight: 700; }
.search-results .sr-empty { padding: .8rem 1rem; font-size: .84rem; color: var(--text-muted); }
.flight-lookup { max-width: 640px; margin-top: 1.25rem; }
.flight-lookup label { display: block; font-size: .82rem; font-weight: 700; margin-bottom: .4rem; }
.flight-lookup > div { display: flex; gap: .55rem; }
.flight-lookup input { flex: 1; min-width: 0; border: 1px solid var(--border); border-radius: var(--radius-sm); padding: .72rem .85rem; font: inherit; }
.flight-lookup input:focus { outline: 2px solid var(--blue); outline-offset: 1px; }
@media (max-width: 520px) {
  .flight-lookup > div { align-items: stretch; flex-direction: column; }
  .flight-lookup .btn { width: 100%; }
}

/* ---- HAMBURGER / MOBILE NAV ---- */
.nav-hamburger { display: none; flex-direction: column; justify-content: center; align-items: center;
  gap: 5px; width: 38px; height: 38px; border: none; background: none; cursor: pointer;
  border-radius: var(--radius-sm); padding: 6px; flex-shrink: 0; }
.nav-hamburger span { display: block; width: 22px; height: 2px; background: #e2e8f0;
  border-radius: 2px; transition: transform .22s, opacity .22s, width .22s; transform-origin: center; }
.nav-hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; width: 0; }
.nav-hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.nav-mobile-panel { display: none; position: fixed; top: var(--nav-height); left: 0; right: 0; bottom: 0;
  z-index: 999; overflow-y: auto; background: var(--surface); border-top: 1px solid var(--border);
  padding: 0 0 2rem; transform: translateY(-6px); opacity: 0; transition: opacity .2s, transform .2s; }
.nav-mobile-panel.open { opacity: 1; transform: translateY(0); }
.nav-mobile-panel .mob-link { display: block; padding: .65rem 1.25rem; font-size: .95rem;
  font-weight: 500; color: var(--text); }
.nav-mobile-panel .mob-link:hover, .nav-mobile-panel .mob-link.active { background: var(--blue-light); color: var(--blue); }
.nav-mobile-section { border-top: 1px solid var(--border); margin-top: .4rem; padding-top: .4rem; }
.nav-mobile-acc-heading { font-size: .7rem; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; color: var(--text-muted); padding: .6rem 1.25rem .2rem; }
.mob-sub-link { display: block; padding: .45rem 1.25rem .45rem 2.25rem; font-size: .87rem; color: var(--text-muted); }
.mob-sub-link:hover { background: var(--blue-light); color: var(--blue); }

/* ---- BUTTONS ---- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  padding: .55rem 1.25rem; border-radius: var(--radius-sm); font-size: .9rem; font-weight: 600;
  cursor: pointer; border: 2px solid transparent; transition: all .15s; white-space: nowrap; }
.btn-primary { background: var(--blue); color: #fff; border-color: var(--blue); }
.btn-primary:hover { background: var(--blue-dark); border-color: var(--blue-dark); color: #fff; }
.btn-outline { background: transparent; color: var(--blue); border-color: var(--blue); }
.btn-outline:hover { background: var(--blue-light); }
.btn-light { background: #fff; color: var(--navy); border-color: #fff; }
.btn-light:hover { background: var(--blue-light); border-color: var(--blue-light); color: var(--navy); }
.btn-accent { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn-accent:hover { background: #d97706; border-color: #d97706; color: #fff; }
.btn-ghost { background: transparent; color: var(--text-muted); border-color: transparent; }
.btn-ghost:hover { background: var(--surface-3); color: var(--text); }
.btn-sm { padding: .35rem .85rem; font-size: .8rem; }
.btn-lg { padding: .75rem 1.75rem; font-size: 1rem; }
.btn-full { width: 100%; }

/* ---- CARDS ---- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow-sm); }
.card-body { padding: 1.5rem; }
.card-header { padding: 1rem 1.5rem; border-bottom: 1px solid var(--border); font-weight: 600; }

/* ---- FORMS ---- */
.form-group { margin-bottom: 1.25rem; }
.form-label { display: block; font-weight: 600; font-size: .875rem; margin-bottom: .4rem; }
.form-control { width: 100%; padding: .6rem .875rem; border: 1.5px solid var(--border);
  border-radius: var(--radius-sm); font-size: .9rem; color: var(--text); background: var(--surface);
  font-family: var(--font); transition: border-color .15s, box-shadow .15s; }
.form-control:focus { outline: none; border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(2,132,199,.15); }
textarea.form-control { min-height: 120px; resize: vertical; }

/* ---- ALERTS / BADGES ---- */
.alert { padding: .85rem 1.25rem; border-radius: var(--radius-sm); margin-bottom: 1rem;
  font-size: .9rem; display: flex; align-items: flex-start; gap: .6rem; }
.alert-success { background: #f0fdf4; border: 1px solid #86efac; color: #166534; }
.alert-danger { background: #fef2f2; border: 1px solid #fca5a5; color: #991b1b; }
.alert-info { background: var(--blue-light); border: 1px solid var(--blue-border); color: #075985; }
.badge { display: inline-block; padding: .2rem .6rem; border-radius: var(--radius-sm); font-size: .75rem; font-weight: 600; }
.badge-blue { background: var(--blue-light); color: var(--blue-dark); }
.badge-green { background: #f0fdf4; color: #166534; }
.badge-amber { background: var(--accent-light); color: #92400e; }
.badge-red { background: #fef2f2; color: #991b1b; }
.badge-gray { background: var(--surface-3); color: var(--text-muted); }
.badge-live { background: #f0fdf4; color: #15803d; display: inline-flex; align-items: center; gap: .35rem; }
.badge-live::before { content: ''; width: 7px; height: 7px; border-radius: 50%;
  background: var(--live); animation: pulse 1.6s infinite; }
.flight-watch-summary { display: flex; align-items: center; flex-wrap: wrap; gap: .65rem;
  padding: .7rem .8rem; margin: .75rem 0; border: 1px solid var(--border);
  border-radius: var(--radius-sm); background: var(--surface-2); color: var(--text-muted);
  font-size: .88rem; }
.flight-watch-status { white-space: nowrap; }

/* ---- HERO ---- */
.hero { background: linear-gradient(150deg, #0b2447 0%, #0c4a6e 55%, #0284c7 100%);
  color: #fff; padding: 3.5rem 0 3rem; position: relative; overflow: hidden; }
.hero::after { content: ''; position: absolute; inset: 0; pointer-events: none; opacity: .35;
  background-image: radial-gradient(circle at 20% 30%, rgba(125,211,252,.18) 0, transparent 40%),
    radial-gradient(circle at 80% 70%, rgba(56,189,248,.14) 0, transparent 45%); }
.hero h1 { color: #fff; font-size: 2.6rem; margin-bottom: 1rem; letter-spacing: -.5px; }
.hero p { color: rgba(255,255,255,.82); font-size: 1.1rem; }
.hero .container { position: relative; z-index: 1; }

/* Homepage flight search: the primary task is visible without opening the
   navigation or guessing that the map itself contains search. */
.home-flight-search { max-width: 760px; margin-top: 1.4rem; }
.home-flight-search label { display: block; margin-bottom: .45rem; color: #fff;
  font-size: .85rem; font-weight: 700; }
.home-flight-search-row { display: flex; gap: .65rem; align-items: stretch; }
.home-flight-search-row input { min-width: 0; flex: 1; border: 1px solid rgba(255,255,255,.4);
  border-radius: var(--radius-sm); background: rgba(255,255,255,.98); color: var(--text);
  padding: .78rem 1rem; font: inherit; box-shadow: var(--shadow); }
.home-flight-search-row input:focus { outline: 3px solid rgba(125,211,252,.45);
  border-color: #7dd3fc; }
.home-flight-search-row .btn { white-space: nowrap; }
.hero .home-search-help { margin-top: .5rem; font-size: .82rem; color: rgba(255,255,255,.74); }
.hero .home-search-help a, .hero > .container > p a { color: #bae6fd; text-decoration: underline;
  text-underline-offset: 2px; }
.hero .home-search-help a:hover, .hero > .container > p a:hover { color: #fff; }

/* ---- LIVE MAP ---- */
.map-shell { position: relative; background: #0b1c33; }
.map-shell.map-home { height: min(72vh, 680px); border-radius: var(--radius-lg);
  overflow: hidden; border: 1px solid var(--border); box-shadow: var(--shadow-lg); }
.map-shell.map-full { height: calc(100vh - var(--nav-height)); }
.map-shell .leaflet-container { width: 100%; height: 100%; background: #0b1c33; font-family: var(--font); }
.map-topbar { position: absolute; top: .9rem; left: .9rem; right: .9rem; z-index: 800;
  display: flex; gap: .6rem; align-items: center; pointer-events: none; flex-wrap: wrap; }
.map-topbar > * { pointer-events: auto; }
.map-stat-pill { background: rgba(11,36,71,.92); backdrop-filter: blur(6px); color: #e2e8f0;
  border: 1px solid rgba(125,211,252,.25); border-radius: var(--radius-sm); padding: .4rem .95rem;
  font-size: .8rem; font-weight: 600; display: inline-flex; align-items: center; gap: .45rem; }
.map-toggle { cursor: pointer; transition: all .15s; font-family: var(--font); }
.map-toggle:hover { border-color: #38bdf8; color: #fff; }
.map-toggle.active { background: var(--blue); border-color: var(--blue); color: #fff; }
.map-stat-pill strong { color: #7dd3fc; font-variant-numeric: tabular-nums; }
.map-stat-pill .dot { width: 8px; height: 8px; border-radius: 50%; background: #4ade80;
  animation: pulse 1.6s infinite; }
/* Map search (dark, lives in the map topbar) */
.map-search { position: relative; }
.map-search input { background: rgba(11,36,71,.92); backdrop-filter: blur(6px);
  border: 1px solid rgba(125,211,252,.3); color: #fff; border-radius: var(--radius-sm);
  padding: .42rem 1rem .42rem 2.1rem; font-size: .85rem; width: 250px;
  font-family: var(--font); transition: all .2s; }
.map-search input::placeholder { color: #94a3b8; }
.map-search input:focus { outline: none; border-color: #38bdf8; width: 300px; }
.map-search > svg { position: absolute; left: .75rem; top: 50%; transform: translateY(-50%);
  color: #94a3b8; pointer-events: none; }
.map-search-results { left: 0; right: auto; top: calc(100% + 8px); width: 340px;
  background: rgba(9,25,49,.97); border-color: rgba(125,211,252,.25); }
.map-search-results .sr-heading { color: #7dd3fc; }
.map-search-results a { color: #e2e8f0; }
.map-search-results a:hover { background: rgba(56,189,248,.14); }
.map-search-results a small { color: #94a3b8; }
.map-search-results .sr-code { color: #7dd3fc; }
.map-search-results .sr-empty { color: #94a3b8; }

/* Minimizable full map */
.map-shell.map-full { transition: height .25s ease; }
.map-shell.map-full.minimized { height: 46vh; }

.route-tip { background: rgba(11,36,71,.92); border: 1px solid rgba(125,211,252,.3);
  color: #7dd3fc; font-weight: 700; font-family: ui-monospace, monospace; font-size: .7rem;
  padding: .1rem .4rem; border-radius: 4px; box-shadow: none; }
.route-tip::before { display: none; }
.plane-icon { filter: drop-shadow(0 1px 2px rgba(0,0,0,.6)); }
.plane-icon svg { display: block; }
.plane-icon.selected svg path { fill: #4ade80 !important; }
.flight-panel .btn-outline { color: #7dd3fc; border-color: rgba(125,211,252,.5); }
.flight-panel .btn-outline:hover { background: rgba(56,189,248,.15); border-color: #7dd3fc; }

/* Aircraft detail panel (FR24 style) */
.flight-panel { position: absolute; top: 0; left: 0; bottom: 0; width: 330px; max-width: 88vw;
  background: rgba(9,25,49,.97); color: #e2e8f0; z-index: 900; transform: translateX(-105%);
  transition: transform .25s ease; display: flex; flex-direction: column;
  border-right: 1px solid rgba(125,211,252,.2); }
.flight-panel.open { transform: translateX(0); }
.flight-panel-head { background: linear-gradient(135deg, #0c4a6e, #0284c7);
  padding: 1.1rem 1.25rem; position: relative; }
.flight-panel-head .fp-callsign { font-size: 1.5rem; font-weight: 800; color: #fff;
  letter-spacing: .02em; font-family: ui-monospace, monospace; }
.flight-panel-head .fp-airline { font-size: .85rem; color: rgba(255,255,255,.85); margin-top: .15rem; }
.fp-close { position: absolute; top: .8rem; right: .8rem; background: rgba(255,255,255,.15);
  border: none; color: #fff; width: 30px; height: 30px; border-radius: 50%; cursor: pointer;
  font-size: 1rem; line-height: 1; }
.fp-close:hover { background: rgba(255,255,255,.3); }
.fp-route { display: flex; align-items: center; justify-content: space-between; gap: .75rem;
  padding: .8rem 1.25rem; background: rgba(56,189,248,.08);
  border-bottom: 1px solid rgba(125,211,252,.15); }
.fp-route-apt { display: flex; flex-direction: column; min-width: 0; }
.fp-route-apt:last-child { text-align: right; align-items: flex-end; }
.fp-route-apt strong { font-size: 1.25rem; font-weight: 800; color: #fff;
  font-family: ui-monospace, monospace; letter-spacing: .03em; }
.fp-route-apt strong a { color: #fff; }
.fp-route-apt strong a:hover { color: #7dd3fc; }
.fp-route-apt span { font-size: .72rem; color: #94a3b8; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis; max-width: 120px; }
.fp-route > svg { flex-shrink: 0; }
.flight-panel-body { padding: 1rem 1.25rem; overflow-y: auto; flex: 1; }
.fp-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .9rem .75rem; margin-bottom: 1.1rem; }
.fp-item .fp-label { font-size: .7rem; text-transform: uppercase; letter-spacing: .08em;
  color: #7dd3fc; font-weight: 700; margin-bottom: .1rem; }
.fp-item .fp-value { font-size: .98rem; font-weight: 600; color: #f1f5f9;
  font-variant-numeric: tabular-nums; }
.fp-item .fp-sub { font-size: .7rem; color: #94a3b8; }
.fp-link-row { display: flex; gap: .5rem; margin-top: .5rem; flex-wrap: wrap; }
/* The two secondary buttons split the row evenly so they line up with the
   full-width primary button below them. */
.fp-link-row > .btn { flex: 1 1 0; min-width: 0; padding-left: .5rem; padding-right: .5rem; }
.fp-link-row #fp-links { display: block; width: 100%; }
.fp-link-row #fp-links .btn { width: 100%; }

/* Map attribution readable on dark tiles */
.map-shell .leaflet-control-attribution { background: rgba(11,36,71,.8); color: #94a3b8; font-size: .7rem; }
.map-shell .leaflet-control-attribution a { color: #7dd3fc; }
.map-shell .leaflet-control-zoom a { background: rgba(11,36,71,.92); color: #e2e8f0;
  border-color: rgba(125,211,252,.25); }
.map-shell .leaflet-control-zoom a:hover { background: #0c4a6e; }

/* ---- BAR CHARTS (single-series, magnitude) ---- */
.bar-chart { display: flex; flex-direction: column; gap: .5rem; }
.bar-row { display: grid; grid-template-columns: 150px 1fr 64px; align-items: center; gap: .75rem; }
.bar-row .bar-label { font-size: .82rem; color: var(--text); white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis; }
.bar-row .bar-track { display: block; background: var(--surface-3); border-radius: 4px;
  height: 16px; overflow: hidden; }
.bar-row .bar-fill { display: block; background: linear-gradient(90deg, #38bdf8, var(--blue));
  height: 100%; border-radius: 0 4px 4px 0; min-width: 3px; transition: width .5s ease; }
.bar-row:hover .bar-fill { background: linear-gradient(90deg, #0ea5e9, var(--blue-dark)); }
.bar-row .bar-value { font-weight: 600; }
.bar-row .bar-value { font-size: .8rem; color: var(--text-muted); font-variant-numeric: tabular-nums;
  text-align: right; }
.chart-note { font-size: .75rem; color: var(--text-light); margin-top: .75rem; }
.data-provenance { margin: 2.5rem 0 0; padding: 1.15rem 1.25rem;
  border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface-2); }
.data-provenance-head { display: flex; align-items: center; justify-content: space-between;
  gap: .75rem; flex-wrap: wrap; margin-bottom: .65rem; }
.data-provenance h2 { margin: 0; font-size: 1.15rem; }
.data-provenance ul { margin: .25rem 0 .55rem 1.1rem; font-size: .88rem; }
.data-provenance li { margin-bottom: .25rem; }
.data-provenance p { margin: 0; color: var(--text-muted); font-size: .82rem; }
/* Skeleton placeholders reserve the exact geometry of the content that
   replaces them, so nothing on the page moves when data arrives. */
.skeleton { background: var(--surface-3); border-radius: 4px; color: transparent;
  animation: skeleton-pulse 1.4s ease-in-out infinite; }
@keyframes skeleton-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .55; } }
.bar-row .bar-label.skeleton { height: .82rem; }
.bar-row .bar-value.skeleton { height: .8rem; }
@media (prefers-reduced-motion: reduce) { .skeleton { animation: none; } }

/* ============================================================
   FLIGHT PAGE
   The route is the hero: two airport codes with the journey
   drawn between them, then progressively finer detail below.
   ============================================================ */
.flight-hero { background: linear-gradient(165deg, #0b2447 0%, #0c3c66 55%, #0a5a8f 100%);
  color: #fff; padding: 2.75rem 0 5.5rem; position: relative; overflow: hidden; }
.flight-hero::after { content: ''; position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background-image: radial-gradient(circle at 15% 20%, rgba(125,211,252,.16) 0, transparent 45%),
    radial-gradient(circle at 85% 80%, rgba(56,189,248,.12) 0, transparent 50%); }
.flight-hero .container-lg { position: relative; z-index: 1; }
.fh-top { display: flex; align-items: flex-start; justify-content: space-between;
  gap: 1rem; flex-wrap: wrap; }
.fh-eyebrow { font-size: .72rem; font-weight: 800; letter-spacing: .14em;
  text-transform: uppercase; color: #7dd3fc; display: flex; align-items: center;
  gap: .5rem; flex-wrap: wrap; }
.fh-eyebrow a { color: #7dd3fc; }
.fh-eyebrow a:hover { color: #fff; }
.flight-hero h1 { color: #fff; font-size: clamp(2rem, 4.5vw, 2.9rem); line-height: 1.08;
  letter-spacing: -.02em; margin: .55rem 0 .5rem; font-variant-numeric: tabular-nums; }
.fh-sub { color: rgba(255,255,255,.72); font-size: 1rem; margin: 0; }
.fh-status { display: inline-flex; align-items: center; gap: .45rem; flex-shrink: 0;
  background: rgba(255,255,255,.12); border: 1px solid rgba(125,211,252,.35);
  color: #e0f2fe; border-radius: var(--radius-sm); padding: .35rem .8rem;
  font-size: .78rem; font-weight: 700; letter-spacing: .02em; white-space: nowrap; }
.fh-status.is-live { background: rgba(74,222,128,.16); border-color: rgba(74,222,128,.45); color: #bbf7d0; }
.fh-status .dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.fh-status.is-live .dot { animation: pulse 1.6s infinite; }

/* ---- Route diagram ---- */
.route-viz { margin-top: -3.75rem; position: relative; z-index: 5;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  box-shadow: 0 10px 34px rgba(2,32,71,.13);
  display: grid; grid-template-columns: 1fr minmax(140px, 1.1fr) 1fr;
  align-items: center; gap: 1rem; padding: 1.75rem 2rem; }
.rv-end { min-width: 0; }
.rv-end.rv-arr { text-align: right; }
.rv-code { font-family: ui-monospace, SFMono-Regular, monospace; font-size: clamp(2rem, 5vw, 2.9rem);
  font-weight: 800; line-height: 1; letter-spacing: .02em; color: var(--navy); }
.rv-code a { color: inherit; }
.rv-code a:hover { color: var(--blue); }
.rv-city { font-size: 1rem; font-weight: 600; color: var(--text); margin-top: .3rem; }
.rv-name { font-size: .78rem; color: var(--text-muted); margin-top: .1rem;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rv-time { margin-top: .6rem; font-size: .95rem; font-weight: 700; color: var(--text);
  font-variant-numeric: tabular-nums; }
.rv-time span { font-size: .72rem; font-weight: 500; color: var(--text-muted); margin-left: .25rem; }
.rv-mid { text-align: center; display: flex; flex-direction: column; align-items: center; gap: .45rem; }
.rv-duration { font-size: .82rem; font-weight: 700; color: var(--text); font-variant-numeric: tabular-nums; }
.rv-line { position: relative; width: 100%; height: 22px; display: flex;
  align-items: center; justify-content: center; }
.rv-line::before { content: ''; position: absolute; left: 0; right: 0; top: 50%;
  border-top: 2px dashed var(--blue-border); }
.rv-line svg { position: relative; background: var(--surface); padding: 0 .45rem; color: var(--blue); }
.rv-dist { font-size: .74rem; color: var(--text-muted); font-variant-numeric: tabular-nums; }
.rv-stops { font-size: .7rem; color: var(--accent); font-weight: 700;
  text-transform: uppercase; letter-spacing: .06em; }

.route-caption { display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; flex-wrap: wrap; padding: .7rem 1rem .1rem; font-size: .78rem;
  color: var(--text-muted); }
.route-caption .tz-mode-label { color: var(--text); font-weight: 600; }

/* ---- Key numbers strip ---- */
.flight-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr));
  gap: 0; border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--surface); overflow: hidden; margin-top: 1.25rem; }
.fs-item { padding: 1rem 1.25rem; border-right: 1px solid var(--border); min-width: 0; }
.fs-item:last-child { border-right: none; }
.fs-label { font-size: .7rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase;
  color: var(--text-muted); }
.fs-value { font-size: 1.35rem; font-weight: 800; color: var(--navy); line-height: 1.15;
  margin-top: .2rem; font-variant-numeric: tabular-nums; }
.fs-sub { font-size: .72rem; color: var(--text-muted); margin-top: .1rem; }

/* ---- Section rhythm on the flight page ---- */
.flight-section { padding: 2.75rem 0 0; }
.flight-section > h2 { font-size: 1.45rem; letter-spacing: -.02em; margin-bottom: .35rem; }
.flight-section > .lede { color: var(--text-muted); font-size: .95rem; margin-bottom: 1.25rem; }

@media (max-width: 780px) {
  .route-viz { grid-template-columns: 1fr; text-align: center; gap: .5rem;
    padding: 1.5rem 1.25rem; margin-top: -3rem; }
  .rv-end.rv-arr { text-align: center; }
  .rv-name { white-space: normal; }
  .rv-line { width: 60%; margin: .25rem auto; }
  .rv-line svg { transform: rotate(90deg); }
  .flight-hero { padding-bottom: 4.5rem; }
}

/* ---- STAT TILES ---- */
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
.stat-tile { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1.25rem 1.4rem; box-shadow: var(--shadow-sm); }
.stat-tile .stat-num { font-size: 1.9rem; font-weight: 800; color: var(--navy);
  font-variant-numeric: tabular-nums; letter-spacing: -.5px; }
.stat-tile .stat-label { font-size: .8rem; color: var(--text-muted); margin-top: .15rem; }
.stat-tile.stat-live .stat-num { color: var(--live); }

/* ---- SECTIONS & GRIDS ---- */
.section { padding: 3rem 0; }
.section-title { font-size: 1.75rem; font-weight: 800; margin-bottom: .5rem; letter-spacing: -.3px; }
.section-subtitle { color: var(--text-muted); margin-bottom: 2rem; }
.section-head-row { display: flex; align-items: flex-end; justify-content: space-between;
  gap: 1rem; margin-bottom: 1.5rem; flex-wrap: wrap; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.25rem; }

/* Feature card */
.feature-card { padding: 1.75rem; border-radius: var(--radius); background: var(--surface);
  border: 1px solid var(--border); box-shadow: var(--shadow-sm); }
.feature-card-icon svg { width: 38px; height: 38px; color: var(--blue); display: block; margin-bottom: .75rem; }
.feature-card h3 { margin-bottom: .4rem; font-size: 1.05rem; }
.feature-card p { font-size: .88rem; }

/* Entity cards: airports / airlines / aircraft */
.entity-card { display: flex; flex-direction: column; gap: .35rem; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius); padding: 1.15rem 1.25rem;
  color: inherit; transition: box-shadow .2s, transform .2s, border-color .2s; }
.entity-card:hover { transform: translateY(-2px); border-color: var(--blue-border); color: inherit; }
.entity-code { font-family: ui-monospace, monospace; font-weight: 800; font-size: .78rem;
  color: var(--blue); letter-spacing: .05em; }
.entity-name { font-weight: 700; font-size: .98rem; color: var(--text); line-height: 1.35; }
.entity-meta { font-size: .8rem; color: var(--text-muted); }

/* Homepage task steps and direct entry points into the existing library. */
.home-how-it-works { background: var(--blue-light); border-top: 1px solid var(--blue-border); }
.home-step-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem;
  list-style: none; margin: 0; padding: 0; counter-reset: none; }
.home-step-grid .feature-card { position: relative; padding-top: 3.4rem; }
.home-step-number { position: absolute; top: 1.15rem; left: 1.7rem; width: 1.65rem;
  height: 1.65rem; display: grid; place-items: center; border-radius: 50%; background: var(--blue);
  color: #fff; font-size: .8rem; font-weight: 800; }
.home-how-note { margin-top: 1.2rem; font-size: .92rem; }
.home-directory-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; }
.home-directory-card { display: flex; flex-direction: column; min-width: 0; padding: 1.15rem;
  border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface-2); }
.home-directory-card h3 { font-size: 1rem; margin-bottom: .75rem; }
.home-directory-card ul { list-style: none; margin: 0 0 .85rem; padding: 0; }
.home-directory-card li + li { border-top: 1px solid var(--border); }
.home-directory-card li a { display: grid; grid-template-columns: 3.1rem minmax(0, 1fr); gap: .45rem;
  align-items: baseline; padding: .55rem 0; color: var(--text); }
.home-directory-card li a:hover strong, .home-directory-card h3 a:hover { color: var(--blue-dark); }
.home-directory-card li strong { color: var(--blue); font-family: ui-monospace, monospace;
  font-size: .8rem; }
.home-directory-card li span { overflow: hidden; color: var(--text-muted); font-size: .78rem;
  line-height: 1.35; text-overflow: ellipsis; white-space: nowrap; }
.home-directory-more { margin-top: auto; font-size: .78rem; font-weight: 700; }

/* ---- DATA TABLES ---- */
.table-wrap { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface); }
.data-table { width: 100%; border-collapse: collapse; font-size: .875rem; }
.data-table thead tr { background: var(--surface-2); }
.data-table th { padding: .65rem 1rem; font-weight: 700; text-align: left;
  border-bottom: 2px solid var(--border); white-space: nowrap; }
.data-table td { padding: .6rem 1rem; border-bottom: 1px solid var(--border); vertical-align: top; line-height: 1.55; }
.data-table tbody tr:last-child td { border-bottom: none; }
/* Action cells ("Track live →") must never break between text and arrow. */
.data-table td:last-child a { white-space: nowrap; }
.data-table tbody tr:nth-child(even) { background: var(--surface-2); }
.data-table tbody tr:hover td { background: var(--blue-light); }

/* ---- FACTS GRID (key-facts cards, replaces stretched 2-col tables) ---- */
.facts-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: .75rem; }
.fact-cell { background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm); box-shadow: var(--shadow-sm);
  border-top: 3px solid var(--blue-border);
  padding: .8rem 1.1rem; min-width: 0; transition: border-color .15s, box-shadow .15s; }
.fact-cell:hover { border-top-color: var(--blue); }
.fact-label { font-size: .7rem; font-weight: 800; letter-spacing: .09em;
  text-transform: uppercase; color: var(--text-muted); margin-bottom: .2rem; }
.fact-value { font-size: .95rem; font-weight: 600; color: var(--text);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fact-value a { display: inline-block; max-width: 100%; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap; vertical-align: bottom; }
.fact-value .sub { font-size: .75rem; font-weight: 400; color: var(--text-muted); }

/* ---- AT-A-GLANCE SUMMARY ---- */
.summary-box { background: linear-gradient(180deg, var(--blue-light), var(--surface));
  border: 1px solid var(--blue-border); border-left: 4px solid var(--blue);
  border-radius: var(--radius); padding: 1.35rem 1.6rem; margin: 1.75rem 0; }
.summary-box .summary-title { font-size: .8rem; font-weight: 800; letter-spacing: .1em;
  text-transform: uppercase; color: var(--blue-dark); margin-bottom: .75rem;
  padding-bottom: 0; border-bottom: none; }
.summary-box ul { list-style: none; display: grid; gap: .55rem; margin: 0; padding: 0; }
.summary-box li { position: relative; padding-left: 1.35rem; font-size: .93rem;
  line-height: 1.6; color: var(--text); }
.summary-box li::before { content: ''; position: absolute; left: 0; top: .55rem;
  width: 6px; height: 6px; border-radius: 50%; background: var(--blue); }
.summary-box li strong { color: var(--navy); }

/* ---- BREADCRUMB ---- */
.breadcrumb { display: flex; align-items: center; gap: .4rem; font-size: .85rem;
  color: var(--text-muted); flex-wrap: wrap; }
.breadcrumb .sep { color: var(--text-light); }
.nav-breadcrumb-bar { background: var(--navy); border-bottom: 1px solid #143462;
  padding: .5rem 0; }
.nav-breadcrumb-bar .breadcrumb { color: #cbd5e1; margin-bottom: 0; }
.nav-breadcrumb-bar .breadcrumb a { color: #cbd5e1; }
.nav-breadcrumb-bar .breadcrumb a:hover { color: #7dd3fc; }
.nav-breadcrumb-bar .breadcrumb .sep { color: #64748b; }
.nav-breadcrumb-bar .breadcrumb span:not(.sep) { color: #7dd3fc; }

/* ============================================================
   MAGAZINE-STYLE ARTICLES
   ============================================================ */
.mag-hero { position: relative; background: var(--navy); color: #fff; overflow: hidden; }
.mag-hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .45; }
.mag-hero-inner { position: relative; z-index: 1; padding: 4.5rem 0 3rem; }
.mag-kicker { display: inline-block; font-size: .72rem; font-weight: 800; letter-spacing: .14em;
  text-transform: uppercase; color: #fbbf24; margin-bottom: .9rem; }
.mag-hero h1 { color: #fff; font-size: 2.7rem; line-height: 1.12; letter-spacing: -.8px; margin-bottom: 1rem; }
.mag-standfirst { font-size: 1.15rem; color: rgba(255,255,255,.85); line-height: 1.6; font-weight: 400; }
.mag-hero-meta { display: flex; align-items: center; gap: 1rem; margin-top: 1.5rem;
  font-size: .82rem; color: rgba(255,255,255,.7); flex-wrap: wrap; }
.mag-hero-meta .avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--blue);
  display: inline-flex; align-items: center; justify-content: center; font-weight: 700; color: #fff; }

.article-layout { display: grid; grid-template-columns: minmax(0,1fr) 280px; gap: 3rem;
  max-width: 1400px; margin: 0 auto; padding: 2.5rem 1.5rem; align-items: start; }
.article-body { font-size: 1.05rem; line-height: 1.75; color: #334155; }
.article-body > p:first-of-type::first-letter { font-family: var(--font-serif); float: left;
  font-size: 3.6rem; line-height: .85; font-weight: 700; padding: .35rem .6rem 0 0; color: var(--blue); }
.article-body h2 { font-size: 1.6rem; margin: 2.4rem 0 1rem; letter-spacing: -.3px;
  padding-top: .5rem; scroll-margin-top: 80px; }
.article-body h3 { font-size: 1.2rem; margin: 1.8rem 0 .8rem; scroll-margin-top: 80px; }
.article-body p { color: #334155; margin-bottom: 1.15rem; }
.article-body ul, .article-body ol { margin: 0 0 1.25rem 1.4rem; color: #334155; }
.article-body li { margin-bottom: .45rem; }
.article-body li::marker { color: var(--blue); font-weight: 700; }
.article-body a { border-bottom: 1px solid var(--blue-border); }
.article-body a:hover { border-bottom-color: var(--blue); }
.article-body img { border-radius: var(--radius); margin: 1.5rem 0; }
.article-body table { width: 100%; border-collapse: collapse; font-size: .9rem; margin: 1.5rem 0; }
.article-body th { background: var(--surface-2); padding: .6rem .9rem; text-align: left;
  border-bottom: 2px solid var(--border); font-weight: 700; }
.article-body td { padding: .55rem .9rem; border-bottom: 1px solid var(--border); }
.article-body blockquote, .pullquote { font-family: var(--font-serif); font-size: 1.35rem;
  line-height: 1.5; color: var(--navy); border-left: 4px solid var(--accent);
  padding: .5rem 0 .5rem 1.5rem; margin: 2rem 0; font-style: italic; }
.callout { background: var(--blue-light); border: 1px solid var(--blue-border);
  border-radius: var(--radius); padding: 1.4rem 1.6rem; margin: 2rem 0; }
.callout h3 { margin: 0 0 .6rem !important; font-size: 1rem !important;
  text-transform: uppercase; letter-spacing: .06em; color: var(--blue-dark); }
.callout ul { margin-bottom: 0 !important; }
.callout p { margin-bottom: .5rem; }
.factbox { background: var(--accent-light); border: 1px solid #fde68a; border-radius: var(--radius);
  padding: 1.2rem 1.4rem; margin: 2rem 0; font-size: .95rem; }
.factbox h4, .factbox h3 { margin: 0 0 .5rem !important; color: #92400e; font-size: .85rem !important;
  text-transform: uppercase; letter-spacing: .08em; }
.faq-section-inner { width: 100%; max-width: 1400px; margin: 0 auto; padding: 0 1.5rem; }
.container .faq-section-inner, .container-sm .faq-section-inner,
.container-lg .faq-section-inner, .article-layout .faq-section-inner { max-width: none; padding: 0; }
.faq-section-inner > h2 { font-size: 1.45rem; letter-spacing: -.02em; margin-bottom: .35rem; }
.faq-section h3 { font-size: 1.05rem !important; }

@media (max-width: 768px) {
  .faq-section-inner { padding: 0 1rem; }
  .container .faq-section-inner, .container-sm .faq-section-inner,
  .container-lg .faq-section-inner, .article-layout .faq-section-inner { padding: 0; }
}

/* TOC sidebar */
.article-aside { position: sticky; top: calc(var(--nav-height) + 1.5rem); display: flex;
  flex-direction: column; gap: 1.25rem; }
.toc { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1.1rem 1.25rem; font-size: .85rem; }
.toc-heading { font-size: .7rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase;
  color: var(--text-muted); margin-bottom: .6rem; }
.toc ol { list-style: none; display: flex; flex-direction: column; gap: .35rem; }
.toc a { color: var(--text-muted); display: block; padding: .15rem 0 .15rem .6rem;
  border-left: 2px solid transparent; line-height: 1.4; }
.toc a:hover { color: var(--blue); }
.toc a.active { color: var(--blue); border-left-color: var(--blue); font-weight: 600; }

/* References */
.references { border-top: 2px solid var(--border); margin-top: 3rem; padding-top: 1.5rem; }
.references h2 { font-size: 1.1rem; margin-bottom: 1rem; }
.references ol { margin-left: 1.25rem; font-size: .85rem; color: var(--text-muted); }
.references li { margin-bottom: .5rem; line-height: 1.6; }

/* Author box */
.author-box { display: flex; gap: 1.1rem; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.4rem 1.5rem; margin-top: 2.5rem; align-items: flex-start; }
.author-box .avatar { width: 56px; height: 56px; border-radius: 50%; background: var(--navy);
  color: #7dd3fc; display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 1.3rem; flex-shrink: 0; }
.author-box .a-name { font-weight: 700; }
.author-box .a-creds { font-size: .78rem; color: var(--blue); font-weight: 600; margin-bottom: .35rem; }
.author-box p { font-size: .86rem; margin: 0; }

/* Article cards (hub/category/related) */
.article-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
.article-card { display: flex; flex-direction: column; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius); color: inherit;
  overflow: hidden; transition: box-shadow .2s, transform .2s; }
.article-card:hover { transform: translateY(-3px); color: inherit; }
.article-card-img { aspect-ratio: 1200/630; background: linear-gradient(135deg, #0b2447, #0c4a6e);
  overflow: hidden; }
.article-card-img img { width: 100%; height: 100%; object-fit: cover; }
.article-card-body { padding: 1.15rem 1.25rem 1rem; display: flex; flex-direction: column; flex: 1; gap: .5rem; }
.article-card-cat { font-size: .7rem; font-weight: 800; letter-spacing: .09em;
  text-transform: uppercase; color: var(--blue); }
.article-card-title { font-size: 1rem; font-weight: 700; line-height: 1.4; color: var(--text);
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.article-card-excerpt { font-size: .84rem; color: var(--text-muted); line-height: 1.6;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.article-card-meta { display: flex; align-items: center; justify-content: space-between;
  font-size: .76rem; color: var(--text-light); padding-top: .6rem; border-top: 1px solid var(--border); margin-top: auto; }

/* Featured (magazine cover) card */
.featured-card { display: grid; grid-template-columns: 1.2fr 1fr; border-radius: var(--radius-lg);
  overflow: hidden; background: var(--navy); border: 1px solid var(--border); color: inherit;
  margin-bottom: 2rem; min-height: 320px; transition: box-shadow .2s, transform .2s; }
.featured-card:hover { transform: translateY(-2px); color: inherit; }
.featured-card-img { background: linear-gradient(135deg, #0b2447, #0284c7); overflow: hidden; }
.featured-card-img img { width: 100%; height: 100%; object-fit: cover; }
.featured-card-body { padding: 2.25rem 2.25rem 2rem; display: flex; flex-direction: column;
  justify-content: center; gap: .8rem; }
.featured-card-body .article-card-cat { color: #fbbf24; }
.featured-card-body h2 { color: #fff; font-size: 1.65rem; line-height: 1.25; letter-spacing: -.4px; }
.featured-card-body p { color: #cbd5e1; font-size: .95rem;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.featured-card-body .meta { font-size: .8rem; color: #94a3b8; }

/* Hub category tiles */
.hub-tile { position: relative; display: flex; flex-direction: column; justify-content: flex-end;
  min-height: 210px; border-radius: var(--radius); overflow: hidden; color: #fff;
  background: linear-gradient(135deg, #0b2447, #0c4a6e); transition: transform .2s, box-shadow .2s; }
.hub-tile:hover { transform: translateY(-3px); color: #fff; }
.hub-tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .55;
  transition: opacity .2s, transform .3s; }
.hub-tile:hover img { opacity: .68; transform: scale(1.03); }
.hub-tile-body { position: relative; z-index: 1; padding: 1.25rem 1.4rem;
  background: linear-gradient(transparent, rgba(7,20,40,.92) 55%); }
.hub-tile-body h3 { color: #fff; font-size: 1.15rem; margin-bottom: .25rem; }
.hub-tile-body p { color: #cbd5e1; font-size: .82rem; margin: 0;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.hub-tile-count { position: absolute; top: .9rem; right: .9rem; z-index: 2; background: rgba(2,132,199,.9);
  color: #fff; font-size: .7rem; font-weight: 700; padding: .25rem .6rem; border-radius: 999px; }

/* ---- FOOTER ---- */
.site-footer { background: #081a33; color: #94a3b8; padding: 3rem 0 1.5rem; margin-top: 4rem; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr 1fr; gap: 2rem; margin-bottom: 2.5rem; }
.footer-brand { font-size: 1.4rem; font-weight: 800; color: #fff; margin-bottom: .75rem; }
.footer-brand .tld { color: #38bdf8; }
.footer-desc { font-size: .875rem; line-height: 1.6; }
.footer-heading { font-weight: 700; color: #e2e8f0; font-size: .875rem; text-transform: uppercase;
  letter-spacing: .07em; margin-bottom: 1rem; }
.footer-links { list-style: none; display: flex; flex-direction: column; gap: .5rem; }
.footer-links a { color: #94a3b8; font-size: .875rem; }
.footer-links a:hover { color: #7dd3fc; }
.footer-bottom { border-top: 1px solid #14315c; padding-top: 1.5rem; display: flex;
  align-items: center; justify-content: space-between; font-size: .8rem; flex-wrap: wrap; gap: .5rem; }

/* ---- ADMIN ---- */
.admin-layout { display: grid; grid-template-columns: 220px 1fr; min-height: calc(100vh - var(--nav-height)); }
.admin-sidebar { background: var(--navy); padding: 1.5rem 0; }
.admin-sidebar-heading { padding: .5rem 1.25rem; font-size: .7rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .1em; color: #64748b; }
.admin-nav-link { display: flex; align-items: center; gap: .6rem; padding: .6rem 1.25rem;
  font-size: .875rem; color: #94a3b8; }
.admin-nav-link:hover, .admin-nav-link.active { background: #14315c; color: #e2e8f0; }
.admin-nav-form { margin: 0; }
.admin-nav-button { width: 100%; border: 0; background: transparent; font: inherit;
  text-align: left; cursor: pointer; }
.admin-content { padding: 2rem; background: var(--surface-2); min-width: 0; }
.admin-stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin-bottom: 2rem; }

/* ---- MISC ---- */
.mono { font-family: ui-monospace, SFMono-Regular, monospace; }
.text-center { text-align: center; }
.mt-2 { margin-top: .5rem; } .mt-4 { margin-top: 1rem; } .mt-8 { margin-top: 2rem; }
.mb-2 { margin-bottom: .5rem; } .mb-4 { margin-bottom: 1rem; } .mb-8 { margin-bottom: 2rem; }

/* ---- MOBILE ---- */
@media (max-width: 900px) {
  .article-grid, .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .featured-card { grid-template-columns: 1fr; }
  .article-layout { grid-template-columns: 1fr; gap: 1.5rem; }
  .article-aside { position: static; order: -1; }
  .toc { display: none; }
  .stat-grid, .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .home-directory-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 768px) {
  html, body { overflow-x: hidden; max-width: 100vw; }
  .container, .container-sm, .container-lg { padding: 0 1rem; max-width: 100%; }
  h1 { font-size: 1.6rem; }
  .hero { padding: 2.5rem 0 2rem; }
  .hero h1 { font-size: 1.9rem; }
  .mag-hero h1 { font-size: 1.8rem; }
  .mag-hero-inner { padding: 3rem 0 2rem; }
  .grid-2 { grid-template-columns: 1fr; }
  .nav-links { display: none; }
  .nav-search { display: none; }
  .nav-hamburger { display: flex; }
  .nav-mobile-panel { display: block; pointer-events: none; }
  .nav-mobile-panel.open { pointer-events: all; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 1.5rem; }
  .footer-grid > div:first-child { grid-column: 1 / -1; padding-bottom: 1rem; border-bottom: 1px solid #14315c; }
  .flight-panel { width: 300px; }
  .map-shell.map-home { height: 62vh; border-radius: var(--radius); }
  .admin-layout { grid-template-columns: 1fr; }
  .admin-sidebar { display: none; }
  .admin-stat-grid { grid-template-columns: repeat(2, 1fr); }
  .home-step-grid { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .article-grid, .grid-3 { grid-template-columns: 1fr; }
  .stat-grid, .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .home-flight-search-row { flex-direction: column; }
  .home-flight-search-row .btn { width: 100%; }
  .home-directory-grid { grid-template-columns: 1fr; }
}

/* ---- FLIGHT INDEX: airline jump list ----
   Was one comma-separated paragraph of 40+ links, which read as a wall of text
   and gave no sense of how much sat behind each airline. Now a scannable grid
   with per-airline flight counts. */
.airline-jump { background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 1.1rem 1.25rem; margin-bottom: 2rem; }
.airline-jump-head { font-size: .7rem; font-weight: 800; letter-spacing: .1em;
  text-transform: uppercase; color: var(--text-muted); margin-bottom: .75rem; }
.airline-jump-grid { display: grid; gap: .4rem; list-style: none; margin: 0; padding: 0;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }
.airline-jump-grid a { display: flex; align-items: center; justify-content: space-between;
  gap: .5rem; padding: .4rem .65rem; border-radius: var(--radius-sm);
  background: var(--surface); border: 1px solid var(--border); text-decoration: none;
  font-size: .88rem; line-height: 1.25; transition: border-color .12s, background .12s; }
.airline-jump-grid a:hover { border-color: var(--blue-border); background: var(--blue-light); }
.airline-jump-grid .aj-name { color: var(--text); overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap; }
.airline-jump-grid a:hover .aj-name { color: var(--blue-dark); }
.airline-jump-grid .aj-count { flex-shrink: 0; font-variant-numeric: tabular-nums;
  font-size: .75rem; font-weight: 700; color: var(--text-muted);
  background: var(--surface-3); border-radius: 999px; padding: .1rem .45rem; }
@media (max-width: 560px) {
  .airline-jump-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
}

/* ---- MEMBER SIGN-IN ---- */
body.account-login-page { min-height: 100vh; display: flex; flex-direction: column; }
.account-login-page #main-content { flex: 1; display: flex; }
.account-login-page .site-footer { margin-top: auto; }
.account-login-shell { flex: 1; width: 100%; padding: 3.5rem 0 4rem;
  background:
    radial-gradient(circle at 12% 16%, rgba(14,165,233,.09), transparent 30%),
    radial-gradient(circle at 88% 82%, rgba(56,189,248,.07), transparent 28%),
    var(--surface-2); }
.account-login-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(340px, .75fr);
  gap: 3rem; align-items: start; max-width: 1080px; }
.account-login-intro h1 { max-width: 720px; margin: .45rem 0 .8rem; font-size: clamp(2rem, 4vw, 3rem);
  letter-spacing: -.035em; }
.account-login-eyebrow { display: inline-block; color: var(--blue-dark); font-size: .72rem;
  font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.account-login-lede { max-width: 690px; margin-bottom: 2rem; font-size: 1.05rem; line-height: 1.7; }
.account-login-benefit-section > h2, .account-login-steps > h2 { margin-bottom: .85rem; font-size: 1.15rem; }
.account-login-benefits { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; }
.account-login-benefits article { display: flex; gap: .7rem; min-width: 0; padding: .9rem;
  background: rgba(255,255,255,.78); border: 1px solid var(--border); border-radius: var(--radius); }
.account-login-benefits h3 { margin-bottom: .2rem; font-size: .92rem; }
.account-login-benefits p { margin: 0; font-size: .8rem; line-height: 1.55; }
.account-login-feature-icon { display: flex; align-items: center; justify-content: center; flex: 0 0 30px;
  width: 30px; height: 30px; border-radius: 9px; background: var(--blue-light); color: var(--blue-dark);
  font-size: .9rem; font-weight: 800; }
.account-login-steps { margin-top: 1.8rem; }
.account-login-steps ol { display: grid; grid-template-columns: repeat(3, 1fr); gap: .8rem; list-style: none; }
.account-login-steps li { display: flex; align-items: flex-start; gap: .55rem; }
.account-login-steps li > span { display: flex; align-items: center; justify-content: center; flex: 0 0 25px;
  height: 25px; border-radius: 50%; background: var(--navy); color: #fff; font-size: .7rem; font-weight: 800; }
.account-login-steps strong { display: block; color: var(--text); font-size: .82rem; }
.account-login-steps small { display: block; margin-top: .12rem; color: var(--text-muted); font-size: .74rem; line-height: 1.45; }

.account-login-card { position: sticky; top: calc(var(--nav-height) + 2rem); padding: 2rem;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg); }
.account-login-card-icon { display: flex; align-items: center; justify-content: center; width: 44px;
  height: 44px; margin-bottom: 1rem; border-radius: 12px; color: var(--blue-dark); background: var(--blue-light); }
.account-login-card-icon svg { width: 22px; height: 22px; }
.account-login-card h2 { margin-bottom: .45rem; font-size: 1.35rem; }
.account-login-card > p { font-size: .86rem; line-height: 1.6; }
.account-google-button { display: flex; align-items: center; justify-content: center; gap: .6rem;
  min-height: 44px; margin: 1.25rem 0 0; }
.account-login-return-note { padding: .65rem .75rem; margin-top: .75rem; border-radius: var(--radius-sm);
  background: var(--surface-2); font-size: .76rem !important; }
.account-login-privacy { margin-top: 1.35rem; padding-top: 1.15rem; border-top: 1px solid var(--border); }
.account-login-privacy h3 { margin-bottom: .65rem; font-size: .9rem; }
.account-login-privacy ul { display: grid; gap: .5rem; margin: 0; padding: 0; list-style: none; }
.account-login-privacy li { position: relative; padding-left: 1.25rem; color: var(--text-muted);
  font-size: .76rem; line-height: 1.5; }
.account-login-privacy li::before { content: '✓'; position: absolute; left: 0; top: 0;
  color: #15803d; font-weight: 800; }
.account-login-legal { margin: 1rem 0 0 !important; font-size: .72rem !important; }

@media (max-width: 900px) {
  .account-login-grid { grid-template-columns: 1fr; gap: 2rem; max-width: 720px; }
  .account-login-card { position: static; }
}
@media (max-width: 560px) {
  .account-login-shell { padding: 2.25rem 0 2.75rem; }
  .account-login-intro h1 { font-size: 2rem; }
  .account-login-lede { font-size: .95rem; }
  .account-login-benefits, .account-login-steps ol { grid-template-columns: 1fr; }
  .account-login-card { padding: 1.4rem; }
}

/* ---- MEMBER DASHBOARD ----
   Same navy hero / white card / sky-accent language as the rest of the site;
   nothing new is invented here, it just reuses the tokens. */
.dash-hero { background: linear-gradient(150deg, #0b2447 0%, #0c4a6e 55%, #0284c7 100%);
  color: #fff; padding: 2.25rem 0; position: relative; overflow: hidden; }
.dash-hero::after { content: ''; position: absolute; inset: 0; pointer-events: none; opacity: .35;
  background-image: radial-gradient(circle at 18% 25%, rgba(125,211,252,.20) 0, transparent 42%),
    radial-gradient(circle at 82% 75%, rgba(56,189,248,.15) 0, transparent 45%); }
.dash-hero-inner { position: relative; z-index: 1; display: flex; align-items: center;
  gap: 1.1rem; flex-wrap: wrap; }
.dash-hero h1 { color: #fff; font-size: 1.9rem; letter-spacing: -.02em; margin: .1rem 0 .2rem; }
.dash-eyebrow { font-size: .7rem; font-weight: 800; letter-spacing: .12em;
  text-transform: uppercase; color: #7dd3fc; }
.dash-sub { color: rgba(255,255,255,.82); margin: 0; font-size: .95rem; }
.dash-signout-form { margin-left: auto; }
.dash-signout { color: #fff; border-color: rgba(255,255,255,.45); }
.dash-signout:hover { background: rgba(255,255,255,.14); color: #fff; }
.dash-avatar { width: 56px; height: 56px; border-radius: 50%; flex-shrink: 0;
  background: rgba(255,255,255,.15); border: 2px solid rgba(125,211,252,.5);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem; font-weight: 800; color: #fff; overflow: hidden; }
.dash-avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }

.dash-section { margin-bottom: 2.5rem; }
.dash-section-head { display: flex; align-items: flex-end; justify-content: space-between;
  gap: 1rem; border-bottom: 1px solid var(--border); padding-bottom: .6rem; margin-bottom: 1.1rem; }
.dash-section-head h2 { font-size: 1.15rem; margin: 0; }
.dash-section-head p { margin: .15rem 0 0; font-size: .85rem; color: var(--text-muted); }
.dash-count { flex-shrink: 0; font-size: .75rem; font-weight: 800; color: var(--blue-dark);
  background: var(--blue-light); border-radius: 999px; padding: .15rem .6rem; }

.dash-grid { display: grid; gap: .9rem;
  grid-template-columns: repeat(auto-fill, minmax(232px, 1fr)); }
.dash-card { position: relative; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: .9rem 1rem 1rem; transition: border-color .14s, box-shadow .14s; }
.dash-card:hover { border-color: var(--blue-border); box-shadow: var(--shadow-sm); }
.dash-card-top { display: flex; align-items: center; justify-content: space-between;
  gap: .5rem; margin-bottom: .45rem; }
.dash-card-code { font-family: ui-monospace, monospace; font-size: .95rem; font-weight: 800;
  color: var(--blue-dark); letter-spacing: .02em; }
.dash-card-name { display: block; font-weight: 600; color: var(--text); line-height: 1.3;
  margin-bottom: .3rem; }
.dash-card-name:hover { color: var(--blue); }
.dash-card-meta { font-size: .8rem; color: var(--text-muted); }
.dash-card-live { display: flex; gap: 1rem; margin-top: .6rem; padding-top: .55rem;
  border-top: 1px dashed var(--border); font-size: .78rem; color: var(--text-muted); }
.dash-card-live strong { color: var(--text); font-variant-numeric: tabular-nums; }
.dash-status { display: inline-flex; align-items: center; gap: .3rem; flex-shrink: 0;
  font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
  color: var(--text-muted); background: var(--surface-3); border-radius: 999px; padding: .12rem .5rem; }
.dash-status .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--text-light); }
.dash-status.is-live { color: #15803d; background: #dcfce7; }
.dash-status.is-live .dot { background: var(--live); animation: pulse 1.6s infinite; }

.dash-card-remove { position: absolute; top: .35rem; right: .4rem; }
.dash-card-remove button { border: none; background: none; cursor: pointer; line-height: 1;
  font-size: 1.15rem; color: var(--text-light); padding: .15rem .3rem; border-radius: 4px; }
.dash-card-remove button:hover { color: #b91c1c; background: #fee2e2; }

.dash-empty { text-align: center; padding: 3rem 1.5rem; background: var(--surface);
  border: 1px dashed var(--border); border-radius: var(--radius-lg); }
.dash-empty svg { color: var(--text-light); margin: 0 auto .75rem; }
.dash-empty h2 { font-size: 1.2rem; margin-bottom: .4rem; }
.dash-empty p { max-width: 46ch; margin: 0 auto 1.25rem; }
.dash-empty-actions { display: flex; gap: .6rem; justify-content: center; flex-wrap: wrap; }

.dash-danger { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem;
  flex-wrap: wrap; background: var(--surface); border: 1px solid var(--border);
  border-left: 3px solid #f87171; border-radius: var(--radius); padding: 1.1rem 1.25rem; }
.dash-danger h2 { font-size: 1rem; margin: 0 0 .2rem; }
.dash-danger p { margin: 0; font-size: .85rem; max-width: 62ch; }
.dash-delete { color: #b91c1c; border-color: #fca5a5; }
.dash-delete:hover { background: #fee2e2; color: #7f1d1d; }

/* ---- SAVE BUTTON (entity pages) ---- */
.save-btn { display: inline-flex; align-items: center; gap: .4rem; cursor: pointer;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: .35rem .75rem; font-size: .82rem; font-weight: 600; color: var(--text-muted);
  font-family: var(--font); transition: all .14s; }
.save-btn:hover { border-color: var(--blue-border); color: var(--blue-dark); background: var(--blue-light); }
.save-btn svg { width: 14px; height: 14px; }
.save-btn.is-saved { background: var(--blue-light); border-color: var(--blue-border); color: var(--blue-dark); }
.save-btn.is-saved svg { fill: currentColor; }
.save-btn[disabled] { opacity: .55; cursor: default; }

@media (max-width: 560px) {
  .save-btn { width: 40px; height: 40px; flex: 0 0 40px; justify-content: center;
    gap: 0; padding: 0; }
  .save-btn svg { width: 16px; height: 16px; }
  .save-btn span { position: absolute; width: 1px; height: 1px; padding: 0;
    margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0);
    white-space: nowrap; border: 0; }
  .dash-hero-inner { gap: .8rem; }
  .dash-signout-form { margin-left: 0; }
  .dash-grid { grid-template-columns: 1fr; }
}
.nav-account { display: flex; align-items: center; justify-content: center; flex-shrink: 0;
  width: 30px; height: 30px; border-radius: 50%; overflow: hidden;
  background: rgba(255,255,255,.14); border: 1px solid rgba(125,211,252,.45);
  color: #fff; font-size: .8rem; font-weight: 800; }
.nav-account:hover { border-color: #38bdf8; color: #fff; }
.nav-account img { width: 100%; height: 100%; object-fit: cover; }
.nav-signin { flex-shrink: 0; color: #fff; border-color: rgba(255,255,255,.4); }
.nav-signin:hover { background: rgba(255,255,255,.14); color: #fff; }
@media (max-width: 768px) { .nav-signin { display: none; } }

/* Aircraft are painted into a single canvas rather than one DOM marker each,
   so the map stays at a few hundred elements instead of several thousand. */
.ft-plane-canvas { pointer-events: none; z-index: 400; }
