/* Airplane Tracker — one stylesheet, no build step.
   Identity: near-black panel, cyan trace, monospaced figures. It should read as
   an instrument, not a travel brochure. The Pavlus commercial units (.hw, .fc,
   .ad) deliberately sit on a lighter surface so they read as offers placed on
   the panel rather than as part of it. */

:root {
  --bg:      #070b12;
  --bg-2:    #0b1220;
  --panel:   #101827;
  --panel-2: #172033;
  --glass:   rgba(255,255,255,.045);
  --glass-2: rgba(255,255,255,.075);
  --line:    rgba(255,255,255,.09);
  --line-2:  rgba(255,255,255,.16);
  --ink:     #eef3fa;
  --ink-2:   #a3b3c9;
  --ink-3:   #6d7f97;
  --cyan:    #3ddbf0;
  --cyan-dk: #0e8298;
  --gold:    #f0b429;
  --gold-dk: #a8760d;
  --navy:    #0e2340;
  --red:     #ef6553;
  --green:   #4ad38a;
  --mono:    ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  --sans:    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --hdr-h:   58px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; color: var(--ink);
  font: 16px/1.65 var(--sans);
  -webkit-font-smoothing: antialiased;
  background: var(--bg);
  /* Two very soft pools of colour so the page has depth rather than reading as
     one flat slab of near-black. */
  background-image:
    radial-gradient(1100px 620px at 12% -8%,  rgba(61,219,240,.11), transparent 60%),
    radial-gradient(900px 520px at 92% 4%,    rgba(240,180,41,.07), transparent 62%);
  background-attachment: fixed;
}
a { color: var(--cyan); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.15; margin: 0 0 .5em; font-weight: 700; letter-spacing: -.025em; }
h1 { font-size: clamp(1.9rem, 5vw, 3.2rem); }
h2 { font-size: clamp(1.35rem, 2.7vw, 1.85rem); }
h3 { font-size: 1.05rem; }
p  { margin: 0 0 1em; }
img { max-width: 100%; height: auto; }
.wrap { width: min(1180px, 100% - 2.5rem); margin-inline: auto; }
.num { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.muted { color: var(--ink-2); }
.small { font-size: .875rem; }

/* ------------------------------------------------------------------ header */
.hdr {
  position: sticky; top: 0; z-index: 900;
  background: rgba(7,11,18,.78); backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  border-bottom: 1px solid var(--line);
}
.hdr-in { display: flex; align-items: center; gap: 1.5rem; height: var(--hdr-h); }
.brand { display: flex; align-items: center; gap: .55rem; color: var(--ink); font-size: 1.05rem; letter-spacing: -.02em; }
.brand:hover { text-decoration: none; }
.brand strong { color: var(--cyan); font-weight: 650; }
.nav { margin-left: auto; display: flex; align-items: center; gap: 1.35rem; font-size: .925rem; }
.nav a { color: var(--ink-2); }
.nav a:hover, .nav a.on { color: var(--ink); text-decoration: none; }
.nav a.on { box-shadow: inset 0 -2px 0 var(--cyan); }
.nav a.cta {
  background: var(--gold); color: #1b1405; font-weight: 600;
  padding: .45rem .9rem; border-radius: 6px;
}
.nav a.cta:hover { background: #e3b263; }

/* --------------------------------------------------------------- structure */
main { padding-bottom: 3.5rem; }
.sec { margin: 2.75rem 0; }
.sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.sec-head p { margin: 0; color: var(--ink-2); font-size: .925rem; }
.crumb { padding: .9rem 0 .2rem; font-size: .825rem; color: var(--ink-3); }
.crumb a { color: var(--ink-2); }
.crumb i { font-style: normal; opacity: .5; margin: 0 .15rem; }

.hero { padding: 2rem 0 1.25rem; }
.hero h1 { margin-bottom: .35rem; }
.hero .lede { color: var(--ink-2); font-size: 1.05rem; max-width: 62ch; margin: 0; }

/* ------------------------------------------------------------------- stats */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: .75rem; margin: 1.25rem 0; }
.stat {
  background: var(--glass); border: 1px solid var(--line); border-radius: 12px;
  padding: .85rem 1rem; backdrop-filter: blur(10px); transition: border-color .2s, transform .2s;
}
.stat:hover { border-color: var(--line-2); }
.stat b { display: block; font-family: var(--mono); font-size: 1.65rem; font-weight: 600; color: var(--cyan); line-height: 1.1; letter-spacing: -.02em; }
.stat span { display: block; font-size: .78rem; text-transform: uppercase; letter-spacing: .07em; color: var(--ink-3); margin-top: .25rem; }

/* --------------------------------------------------------------------- map */
.mapwrap {
  position: relative; border: 1px solid var(--line); border-radius: 16px;
  overflow: hidden; background: var(--panel);
  box-shadow: 0 24px 70px rgba(0,0,0,.55);
}
#map { height: min(62vh, 620px); min-height: 380px; background: #070b12; }
.map-rail {
  position: absolute; top: 0; right: 0; bottom: 0; width: 330px; z-index: 600;
  background: linear-gradient(180deg, rgba(18,24,33,.97), rgba(10,14,20,.97));
  border-left: 1px solid var(--line); padding: 1rem; overflow-y: auto;
}
.map-bar {
  display: flex; align-items: center; gap: .75rem; flex-wrap: wrap;
  padding: .65rem .95rem; border-top: 1px solid var(--line);
  background: var(--glass); font-size: .85rem; color: var(--ink-2);
}
.map-bar .live { display: inline-flex; align-items: center; gap: .4rem; color: var(--ink); }
.map-bar .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 0 rgba(71,201,126,.6); animation: pulse 2.4s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 7px rgba(71,201,126,0); } 100% { box-shadow: 0 0 0 0 rgba(71,201,126,0); } }
.plane { transform-origin: 50% 50%; }
.leaflet-container { background: #0c1017; font: inherit; }
.leaflet-popup-content-wrapper { background: var(--panel-2); color: var(--ink); border-radius: 8px; border: 1px solid var(--line); box-shadow: 0 10px 30px rgba(0,0,0,.5); }
.leaflet-popup-tip { background: var(--panel-2); border: 1px solid var(--line); }
.leaflet-popup-content { margin: .75rem .9rem; font-size: .875rem; line-height: 1.5; }
.leaflet-popup-content b { display: block; font-size: 1rem; font-family: var(--mono); color: var(--cyan); }
.leaflet-popup-content dl { display: grid; grid-template-columns: auto 1fr; gap: .1rem .6rem; margin: .5rem 0 .6rem; }
.leaflet-popup-content dt { color: var(--ink-3); font-size: .8rem; }
.leaflet-popup-content dd { margin: 0; font-family: var(--mono); font-size: .8rem; }
.leaflet-control-attribution { background: rgba(10,14,20,.8) !important; color: var(--ink-3) !important; }
.leaflet-control-attribution a { color: var(--ink-2) !important; }

/* ------------------------------------------------------------------ tables */
.tbl { width: 100%; border-collapse: collapse; font-size: .9rem; }
.tbl th, .tbl td { text-align: left; padding: .6rem .7rem; border-bottom: 1px solid var(--line); }
.tbl th { font-size: .74rem; text-transform: uppercase; letter-spacing: .07em; color: var(--ink-3); font-weight: 600; }
.tbl td.n { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.tbl tbody tr:hover { background: var(--panel); }
.tbl-scroll {
  overflow-x: auto; border: 1px solid var(--line); border-radius: 14px;
  background: var(--glass); backdrop-filter: blur(10px);
}
.tag { display: inline-block; font-size: .7rem; padding: .1rem .4rem; border-radius: 4px; background: var(--panel-2); color: var(--ink-2); border: 1px solid var(--line); font-family: var(--mono); }
.tag-air { color: var(--cyan); border-color: var(--cyan-dk); }
.tag-gnd { color: var(--ink-3); }

/* ------------------------------------------------------------------- cards */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: .75rem; }
.card {
  display: block; background: var(--glass); border: 1px solid var(--line);
  border-radius: 12px; padding: .9rem 1rem; color: var(--ink);
  backdrop-filter: blur(10px);
  transition: border-color .18s, transform .18s, background .18s;
}
.card:hover {
  border-color: var(--line-2); text-decoration: none; background: var(--glass-2);
  transform: translateY(-2px);
}
.card b { display: block; font-size: .975rem; font-weight: 600; }
.card span { display: block; color: var(--ink-3); font-size: .82rem; }
.card .code { font-family: var(--mono); color: var(--cyan); font-size: .8rem; letter-spacing: .04em; }

/* A–Z index columns */
.az { columns: 4 200px; column-gap: 1.5rem; }
.az a { display: block; padding: .18rem 0; font-size: .9rem; break-inside: avoid; }
.az-h { break-after: avoid; margin: 1.1rem 0 .3rem; font-family: var(--mono); color: var(--gold); font-size: .95rem; }

/* --------------------------------------------------------- booking CTA row */
.book {
  display: flex; align-items: center; justify-content: space-between; gap: 1.25rem; flex-wrap: wrap;
  background: linear-gradient(135deg, var(--navy), #143055);
  border: 1px solid #1d3f68; border-radius: 10px; padding: 1.1rem 1.3rem; margin: 1.75rem 0;
}
.book h3 { margin: 0 0 .2rem; color: #fff; }
.book p { margin: 0; color: #b9cde5; font-size: .9rem; }
.book-act { display: flex; flex-direction: column; align-items: flex-end; gap: .3rem; }
.book-act span { font-size: .8rem; color: #b9cde5; }
.btn {
  display: inline-block; background: var(--gold); color: #1a1202; font-weight: 700;
  padding: .62rem 1.2rem; border-radius: 9px; border: 0; cursor: pointer; font-size: .95rem;
  font-family: inherit; letter-spacing: -.01em;
  transition: filter .18s, transform .12s, box-shadow .18s;
  box-shadow: 0 4px 16px rgba(240,180,41,.18);
}
.btn:hover { filter: brightness(1.08); text-decoration: none; box-shadow: 0 6px 22px rgba(240,180,41,.28); }
.btn:active { transform: translateY(1px); }
.btn-ghost {
  background: var(--glass); color: var(--cyan); border: 1px solid var(--line-2);
  box-shadow: none;
}
.btn-ghost:hover { background: var(--glass-2); filter: none; box-shadow: none; }

/* ------------------------------------------- Pavlus units: hotels + cruise */
/* Both sit on a light surface: these are offers placed on the panel, not part
   of the instrument, and a visitor should be able to tell at a glance. */
.hw, .fc {
  background: #f4f7fb; color: #17212f; border: 1px solid #d5dfeb;
  border-radius: 10px; padding: 1.15rem 1.25rem; margin: 1.75rem 0;
}
.hw-head h2, .fc-head h2 { color: #0e2340; margin-bottom: .2rem; font-size: 1.25rem; }
.hw-head p, .fc-head p { color: #48627f; font-size: .9rem; margin: 0 0 .9rem; }
.hw-head a, .fc-head a { color: #1663a8; }
.hw-grid, .fc-grid {
  display: grid; grid-template-columns: 2fr repeat(2, 1.15fr) .8fr .8fr auto; gap: .6rem; align-items: end;
}
.fc-grid { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.hw-f, .fc-f { display: flex; flex-direction: column; gap: .25rem; margin: 0; }
.hw-f > span, .fc-f > span { font-size: .74rem; text-transform: uppercase; letter-spacing: .06em; color: #5b7593; font-weight: 600; }
.hw-f input, .hw-f select, .fc-f select {
  font: inherit; font-size: .92rem; padding: .5rem .6rem; border: 1px solid #c3d1e0;
  border-radius: 6px; background: #fff; color: #17212f; min-width: 0; width: 100%; height: 40px;
}
.hw-f input:focus, .hw-f select:focus, .fc-f select:focus { outline: 2px solid #1663a8; outline-offset: -1px; }
.hw-go .btn, .fc-go .btn { height: 40px; white-space: nowrap; }
.hw-note, .fc-note { margin: .8rem 0 0; font-size: .8rem; color: #5b7593; }
.fc-tabs { display: flex; gap: .4rem; margin-bottom: .85rem; }
.fc-tabs button {
  font: inherit; font-size: .85rem; padding: .35rem .8rem; border-radius: 999px; cursor: pointer;
  border: 1px solid #c3d1e0; background: #fff; color: #48627f;
}
.fc-tabs button.on { background: #0e2340; border-color: #0e2340; color: #fff; font-weight: 600; }
.fc-usp { color: #48627f; font-size: .85rem; }

/* The cruise widget also runs docked over the dark map, where it inverts. */
.fc-dark {
  background: rgba(14,20,28,.94); border-color: var(--line); color: var(--ink); margin: 0; padding: 0;
}
.fc-dark .fc-head h2 { color: var(--ink); font-size: 1.1rem; }
.fc-dark .fc-head p, .fc-dark .fc-note, .fc-dark .fc-f > span { color: var(--ink-2); }
.fc-dark .fc-grid { grid-template-columns: 1fr; }
.fc-dark .fc-f select { background: var(--panel-2); border-color: var(--line); color: var(--ink); }
.fc-dark .fc-tabs button { background: transparent; border-color: var(--line); color: var(--ink-2); }
.fc-dark .fc-tabs button.on { background: var(--cyan); border-color: var(--cyan); color: #04222a; }

/* ----------------------------------------------------------------- ad rail */
.ad {
  position: fixed; right: 18px; bottom: 18px; z-index: 950; width: 300px;
  background: #fff; color: #17212f; border: 1px solid #cfdae7; border-radius: 10px;
  box-shadow: 0 16px 44px rgba(0,0,0,.45); overflow: hidden;
  font-size: .875rem;
}
.ad[hidden] { display: none; }
.ad-top { display: flex; align-items: center; gap: .5rem; padding: .45rem .6rem; border-bottom: 1px solid #e6edf5; background: #f7fafd; }
.ad-chip { font-size: .62rem; text-transform: uppercase; letter-spacing: .1em; font-weight: 700; color: #6b7f96; border: 1px solid #cfdae7; border-radius: 3px; padding: .05rem .3rem; }
.ad-logo { height: 20px; width: auto; margin-left: auto; opacity: .9; }
.ad-x { margin-left: .35rem; border: 0; background: none; font-size: 1.15rem; line-height: 1; color: #93a6bb; cursor: pointer; padding: 0 .1rem; }
.ad-x:hover { color: #17212f; }
.ad-link { display: block; color: inherit; padding: .85rem .9rem .6rem; }
.ad-link:hover { text-decoration: none; background: #fbfdff; }
.ad-kick { display: block; font-size: .7rem; text-transform: uppercase; letter-spacing: .09em; color: #a07321; font-weight: 700; }
.ad-title { display: block; font-size: 1.1rem; line-height: 1.25; color: #0e2340; margin: .15rem 0 .4rem; }
.ad-l1, .ad-l2 { display: block; color: #3d566f; line-height: 1.45; }
.ad-l2 { color: #6b7f96; font-size: .82rem; }
.ad-usp { display: flex; flex-wrap: wrap; gap: .3rem; margin: .6rem 0 .55rem; }
.ad-usp span { font-size: .67rem; background: #eef4fa; color: #48627f; border-radius: 3px; padding: .12rem .35rem; }
.ad-btn { display: block; background: var(--gold); color: #1b1405; font-weight: 650; text-align: center; padding: .5rem; border-radius: 6px; }
.ad-btn i { font-style: normal; }
.ad-foot { margin: 0; padding: .45rem .9rem .6rem; font-size: .72rem; color: #8698ac; border-top: 1px solid #eef3f8; }

/* ------------------------------------------------------------------ footer */
.ftr { border-top: 1px solid var(--line); background: rgba(7,11,18,.6); padding: 2.5rem 0 1rem; margin-top: 4rem; }
.ftr-in { display: grid; grid-template-columns: 1.7fr repeat(3, 1fr); gap: 2rem; }
.ftr-col h3 { font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); margin-bottom: .6rem; }
.ftr-col a { display: block; color: var(--ink-2); font-size: .875rem; padding: .16rem 0; }
.ftr-col a:hover { color: var(--cyan); }
.ftr-col p { color: var(--ink-2); font-size: .875rem; }
.ftr-brand { color: var(--ink); font-size: 1.05rem; margin-bottom: .5rem; }
.ftr-brand strong { color: var(--cyan); font-weight: 650; }
.ftr-fine { color: var(--ink-3) !important; font-size: .8rem !important; }
.ftr-legal { border-top: 1px solid var(--line); margin-top: 1.75rem; padding-top: 1rem; }
.ftr-legal p { color: var(--ink-3); font-size: .76rem; line-height: 1.6; margin: 0 0 .5rem; }
.ftr-legal a { color: var(--ink-2); }

/* -------------------------------------------------------------- prose page */
.prose { max-width: 70ch; }
.prose h2 { margin-top: 2rem; }
.prose ul { padding-left: 1.2rem; color: var(--ink-2); }
.prose li { margin-bottom: .4rem; }

/* ------------------------------------------------------------- responsive */
@media (max-width: 1080px) {
  .map-rail { position: static; width: auto; border-left: 0; border-top: 1px solid var(--line); max-height: none; }
  #map { height: 52vh; }
}
@media (max-width: 860px) {
  .ftr-in { grid-template-columns: 1fr 1fr; gap: 1.5rem; }
  .hw-grid { grid-template-columns: 1fr 1fr; }
  .hw-where { grid-column: 1 / -1; }
  .hw-go { grid-column: 1 / -1; }
  .hw-go .btn { width: 100%; }
  .az { columns: 2 150px; }
}
@media (max-width: 680px) {
  .nav { gap: .9rem; font-size: .85rem; }
  .nav a:not(.cta):not(.on) { display: none; }   /* keep the bar to brand + CTA */
  .ad { right: 8px; left: 8px; bottom: 8px; width: auto; }
  .book { flex-direction: column; align-items: stretch; }
  .book-act { align-items: stretch; }
  .book-act .btn { text-align: center; }
  .ftr-in { grid-template-columns: 1fr; }
}

/* Feed-unavailable notice. Deliberately not styled as an error the visitor
   caused, and deliberately not hidden — a silent empty map reads as "no
   aircraft are flying", which is a claim we have no basis for. */
.notice {
  background: rgba(226,88,74,.1); border: 1px solid rgba(226,88,74,.4);
  border-left-width: 3px; border-radius: 6px; padding: .7rem .9rem;
  color: #f0b8b1; font-size: .9rem; margin: 1rem 0;
}

/* Touch hint raised by assets/map-gestures.js. */
.map-hint {
  position: absolute; inset: 0; z-index: 500; display: flex;
  align-items: center; justify-content: center; text-align: center;
  background: rgba(10,14,20,.6); color: var(--ink); font-size: .95rem;
  padding: 1rem; opacity: 0; pointer-events: none; transition: opacity .25s;
}
.map-hint.on { opacity: 1; }

/* ------------------------------------------------------- header flight search */
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.hsearch {
  margin-left: auto; display: flex; align-items: center; gap: .4rem;
  background: var(--panel-2); border: 1px solid var(--line); border-radius: 7px;
  padding: 0 .3rem 0 .55rem; height: 34px;
}
.hsearch:focus-within { border-color: var(--cyan-dk); box-shadow: 0 0 0 2px rgba(53,208,232,.15); }
.hsearch svg { color: var(--ink-3); flex: none; }
.hsearch input {
  font: inherit; font-size: .875rem; background: none; border: 0; color: var(--ink);
  width: 150px; padding: 0; height: 100%;
}
.hsearch input::placeholder { color: var(--ink-3); }
.hsearch input:focus { outline: none; }
.hsearch input::-webkit-search-cancel-button { filter: invert(.6); }
.hsearch button {
  font: inherit; font-size: .78rem; font-weight: 600; cursor: pointer;
  background: var(--cyan-dk); color: #dffafe; border: 0; border-radius: 5px;
  padding: .28rem .6rem;
}
.hsearch button:hover { background: var(--cyan); color: #04222a; }
/* The nav no longer owns the right edge; the search box does. */
.nav { margin-left: 1.25rem; }

@media (max-width: 900px) { .hsearch input { width: 108px; } }
@media (max-width: 680px) {
  .hsearch { margin-left: auto; }
  .hsearch input { width: 96px; }
  .hsearch button { padding: .28rem .45rem; }
}

/* ------------------------------------------------------- big flight search */
.fsearch { display: flex; gap: .5rem; margin: 0 0 1.75rem; max-width: 520px; }
.fsearch input {
  flex: 1; font: inherit; font-size: 1.05rem; font-family: var(--mono);
  letter-spacing: .06em; text-transform: uppercase;
  background: var(--panel); border: 1px solid var(--line); border-radius: 8px;
  color: var(--ink); padding: .7rem .85rem; min-width: 0;
}
.fsearch input::placeholder { font-family: var(--sans); letter-spacing: 0; text-transform: none; color: var(--ink-3); }
.fsearch input:focus { outline: none; border-color: var(--cyan-dk); box-shadow: 0 0 0 3px rgba(53,208,232,.15); }
.fsearch .btn { padding: .7rem 1.25rem; }

/* --------------------------------------------------------------- share box */
.share {
  background: var(--panel); border: 1px solid var(--line); border-left: 3px solid var(--cyan);
  border-radius: 10px; padding: 1rem 1.15rem; margin: 0 0 1.5rem;
}
.share-msg strong { display: block; font-size: 1rem; margin-bottom: .2rem; }
.share-msg span { display: block; color: var(--ink-2); font-size: .9rem; }
.share-btns { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .9rem; }
.share-btns .btn { padding: .45rem .9rem; font-size: .875rem; }
.share-note { margin: .6rem 0 0; font-size: .82rem; color: var(--cyan); min-height: 1.2em; }
/* The text-message link only means anything on a device that sends texts. */
.share-sms { display: none; }
@media (pointer: coarse) { .share-sms { display: inline-block; } }

/* ----------------------------------------------------------- map filtering */
.filters {
  display: flex; flex-wrap: wrap; align-items: end; gap: .6rem;
  padding: .75rem .95rem; border-top: 1px solid var(--line); background: var(--glass);
}
.filters label { display: flex; flex-direction: column; gap: .2rem; margin: 0; }
.filters label > span {
  font-size: .68rem; text-transform: uppercase; letter-spacing: .07em; color: var(--ink-3); font-weight: 600;
}
.filters select, .filters input {
  font: inherit; font-size: .85rem; background: var(--panel-2); color: var(--ink);
  border: 1px solid var(--line); border-radius: 6px; padding: .35rem .5rem; height: 32px;
}
.filters input { font-family: var(--mono); width: 130px; }
.filters select:focus, .filters input:focus { outline: none; border-color: var(--cyan-dk); }
.filters .f-count { margin-left: auto; font-size: .82rem; color: var(--ink-2); align-self: center; }
.filters .f-clear {
  font: inherit; font-size: .8rem; background: none; border: 0; color: var(--cyan);
  cursor: pointer; padding: .35rem .2rem; align-self: center;
}
.filters .f-clear:hover { text-decoration: underline; }
@media (max-width: 680px) {
  .filters label, .filters select, .filters input { width: 100%; }
  .filters input { width: 100%; }
  .filters .f-count { margin-left: 0; }
}

/* The filter bar is injected by filters.js. If scripting is off or that file
   fails, it must not leave an empty grey strip under the map. */
.filters:empty { display: none; }

/* Map loading state. Any wait that is going to happen should look deliberate
   rather than like a frozen map — the previous frame stays visible underneath,
   so this is a hint, not a blocker. */
#map.is-loading::after {
  content: "Loading aircraft…";
  position: absolute; top: 10px; left: 50%; transform: translateX(-50%);
  z-index: 620; pointer-events: none;
  background: rgba(10,14,20,.88); color: var(--ink-2);
  border: 1px solid var(--line); border-radius: 999px;
  padding: .28rem .8rem; font-size: .8rem;
  animation: fadeIn .25s ease both;
}
@keyframes fadeIn { from { opacity: 0 } to { opacity: 1 } }
.mapwrap { position: relative; }

/* ═══════════════════════════════════════════════════════════════════════════
   THE STAGE — a full-bleed map as the first thing on the page.

   The map is the product. Burying it under a heading, a paragraph and a row of
   statistics meant the thing people came for was below the fold, which is what
   made the old home page feel like a brochure about a flight tracker rather
   than a flight tracker. Everything else now floats on top of it.
   ═══════════════════════════════════════════════════════════════════════════ */
.stage { position: relative; height: clamp(460px, 78vh, 820px); isolation: isolate; }
.stage #map { position: absolute; inset: 0; height: 100%; border-radius: 0; }
.stage::after {           /* keeps the floating panels legible over bright tiles */
  content: ""; position: absolute; inset: 0; z-index: 400; pointer-events: none;
  background:
    linear-gradient(180deg, rgba(7,11,18,.82) 0%, rgba(7,11,18,.12) 26%, rgba(7,11,18,0) 48%),
    linear-gradient(0deg,   rgba(7,11,18,.92) 0%, rgba(7,11,18,0) 30%);
}
.stage-in {
  position: absolute; inset: 0; z-index: 500; pointer-events: none;
  display: flex; flex-direction: column; justify-content: space-between;
  padding: clamp(1.1rem, 3.5vw, 2.4rem) 0;
}
.stage-in > * { pointer-events: auto; }

.stage-top { width: min(1180px, 100% - 2.5rem); margin-inline: auto; }
.stage-kicker {
  display: inline-flex; align-items: center; gap: .5rem; margin-bottom: .75rem;
  font-size: .76rem; font-weight: 700; letter-spacing: .13em; text-transform: uppercase;
  color: var(--cyan);
  background: rgba(61,219,240,.1); border: 1px solid rgba(61,219,240,.28);
  padding: .3rem .7rem; border-radius: 999px; backdrop-filter: blur(8px);
}
.stage h1 {
  margin: 0 0 .5rem; max-width: 16ch;
  text-shadow: 0 2px 30px rgba(0,0,0,.8);
}
.stage h1 em { font-style: normal; color: var(--cyan); }
.stage-lede {
  margin: 0 0 1.35rem; max-width: 46ch; color: var(--ink-2); font-size: 1.05rem;
  text-shadow: 0 1px 18px rgba(0,0,0,.85);
}

/* The search, floating. This is the single most-wanted action on the site, so
   it sits over the map at full size rather than in the header only. */
.hunt {
  display: flex; gap: .55rem; width: min(560px, 100%);
  background: rgba(10,16,26,.72); border: 1px solid var(--line-2); border-radius: 14px;
  padding: .5rem; backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  box-shadow: 0 18px 50px rgba(0,0,0,.5);
}
.hunt input {
  flex: 1; min-width: 0; font: inherit; font-size: 1.05rem; font-family: var(--mono);
  letter-spacing: .08em; text-transform: uppercase;
  background: none; border: 0; color: var(--ink); padding: .6rem .3rem .6rem .7rem;
}
.hunt input::placeholder { font-family: var(--sans); letter-spacing: 0; text-transform: none; color: var(--ink-3); }
.hunt input:focus { outline: none; }
.hunt .btn { flex: none; padding: .65rem 1.3rem; }
.hunt-hint {
  margin: .6rem 0 0; font-size: .82rem; color: var(--ink-3);
  text-shadow: 0 1px 12px rgba(0,0,0,.9);
}
.hunt-hint b { color: var(--ink-2); font-family: var(--mono); font-weight: 500; }

/* Live counters, bottom-left over the map. */
.stage-bottom {
  width: min(1180px, 100% - 2.5rem); margin-inline: auto;
  display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
}
.pills { display: flex; gap: .5rem; flex-wrap: wrap; }
.pill {
  display: flex; align-items: baseline; gap: .4rem;
  background: rgba(10,16,26,.7); border: 1px solid var(--line); border-radius: 999px;
  padding: .35rem .85rem; backdrop-filter: blur(14px); font-size: .82rem; color: var(--ink-3);
}
.pill b { font-family: var(--mono); font-size: 1rem; color: var(--ink); font-weight: 600; }
.pill.on b { color: var(--cyan); }
.stage-act { display: flex; gap: .5rem; flex-wrap: wrap; }
.stage-act .btn { padding: .45rem 1rem; font-size: .86rem; }

@media (max-width: 680px) {
  .stage { height: clamp(430px, 76vh, 620px); }
  .stage-lede { display: none; }          /* the map says it better on a phone */
  .hunt input { font-size: .95rem; }
  .stage-bottom { flex-direction: column; align-items: stretch; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   ROUTE — where it came from, where it is going.

   The most-asked question on any flight tracker, so it is rendered as the
   headline object on a flight page, not as a table row.
   ═══════════════════════════════════════════════════════════════════════════ */
.route {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 1rem;
  background: var(--glass); border: 1px solid var(--line); border-radius: 16px;
  padding: 1.3rem 1.5rem; margin: 0 0 1.25rem; backdrop-filter: blur(12px);
}
.route-end { min-width: 0; }
.route-end.to { text-align: right; }
.route-code {
  display: block; font-family: var(--mono); font-size: clamp(1.9rem, 5.5vw, 2.9rem);
  font-weight: 700; line-height: 1; letter-spacing: -.02em; color: var(--ink);
}
.route-city {
  display: block; margin-top: .3rem; color: var(--ink-2); font-size: .95rem;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.route-sub { display: block; color: var(--ink-3); font-size: .78rem; margin-top: .1rem; }
.route-mid { display: flex; flex-direction: column; align-items: center; gap: .3rem; color: var(--cyan); }
.route-line {
  position: relative; width: clamp(48px, 14vw, 130px); height: 2px;
  background: linear-gradient(90deg, var(--cyan-dk), var(--cyan), var(--cyan-dk));
  border-radius: 2px;
}
.route-line::before, .route-line::after {
  content: ""; position: absolute; top: 50%; width: 7px; height: 7px; border-radius: 50%;
  background: var(--cyan); transform: translateY(-50%);
}
.route-line::before { left: -1px; }
.route-line::after  { right: -1px; }
.route-plane { color: var(--cyan); }
.route-note { font-size: .72rem; color: var(--ink-3); text-transform: uppercase; letter-spacing: .09em; }
.route-src {
  margin: .5rem 0 1.5rem; font-size: .78rem; color: var(--ink-3); text-align: center;
}
@media (max-width: 560px) {
  .route { padding: 1.1rem; gap: .6rem; }
  .route-city { font-size: .85rem; }
}

/* Compact route, for tables and popups. */
.rt { font-family: var(--mono); font-size: .82rem; white-space: nowrap; }
.rt i { font-style: normal; color: var(--cyan); padding: 0 .15rem; }
.rt-none { color: var(--ink-3); }
.leaflet-popup-content .rt { display: block; margin-top: .2rem; }
