/* FlightBeat calculator component styles.
   Shared by the calculator page (/calculator) and the homepage hero, so the
   live calculator looks identical in both places. Tokens, fonts, and the base
   body live here too. Nav and footer come from chrome.css; the homepage adds a
   small inline block for its landing sections (hero copy, routes, facts). */
@font-face { font-family: 'Grotesk'; src: url('/fonts/space-grotesk-400.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Grotesk'; src: url('/fonts/space-grotesk-500.woff2') format('woff2'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'Grotesk'; src: url('/fonts/space-grotesk-700.woff2') format('woff2'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'PlexMono'; src: url('/fonts/ibm-plex-mono-500.woff2') format('woff2'); font-weight: 500; font-display: swap; }

:root {
  --bg: #081018;
  --bg-2: #0B1826;
  --panel: #13293D;
  --panel-hi: #1B3A54;
  --line: rgba(126,167,196,0.16);
  --sky: #5BC8F5;
  --sky-deep: #2AA6E0;
  --coral: #FF6F5B;
  --text: #EAF3FA;
  --read: #DDE8F1;
  --muted: #9FB6C9;
  --dim: #6C8497;
  --label: #A6BAC9;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  background:
    radial-gradient(900px 520px at 78% -8%, rgba(91,200,245,0.10), transparent 60%),
    radial-gradient(700px 500px at 8% 8%, rgba(255,111,91,0.06), transparent 55%),
    var(--bg);
  color: var(--text);
  font-family: 'Grotesk', system-ui, sans-serif;
  min-height: 100vh;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
.mono { font-family: 'PlexMono', ui-monospace, monospace; }
.wrap { max-width: 760px; margin: 0 auto; padding: 26px 20px 80px; }

/* query bar */
.query { background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 14px; }
.field { position: relative; }
.field + .field { margin-top: 8px; }
.field .cap { font-size: 12.5px; color: var(--muted); font-weight: 500; padding: 0 4px 6px; }
.field input {
  width: 100%; background: var(--bg-2); border: 1px solid var(--line); border-radius: 12px;
  color: var(--text); font-family: 'Grotesk', sans-serif; font-size: 16px; padding: 13px 14px; outline: none;
  transition: border-color .15s;
}
.field input:focus { border-color: var(--sky-deep); }
.field input.sel { border-color: rgba(91,200,245,0.5); }
.field input::placeholder { color: var(--dim); }
.swap { display: block; margin: 6px auto; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); background: var(--bg-2); color: var(--coral); cursor: pointer; font-size: 17px; transition: transform .2s, border-color .15s; }
.swap:hover { border-color: var(--coral); transform: rotate(180deg); }
.dd { position: absolute; left: 0; right: 0; z-index: 20; margin-top: 6px; background: var(--panel-hi); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; box-shadow: 0 20px 50px rgba(0,0,0,0.5); }
.dd-item { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; background: none; border: none; cursor: pointer; padding: 11px 14px; border-bottom: 1px solid var(--line); }
.dd-item:last-child { border-bottom: none; }
.dd-item:hover { background: rgba(91,200,245,0.08); }
.dd-code { font-family: 'PlexMono', monospace; color: var(--sky); font-size: 14px; width: 48px; flex: none; }
.dd-body { min-width: 0; }
.dd-name { font-size: 14px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dd-sub { font-size: 12px; color: var(--muted); }

.cap2 { font-size: 12.5px; color: var(--muted); font-weight: 500; padding: 0 2px 8px; }
.depart, .aircraft { margin-top: 16px; }
.dt { display: flex; gap: 8px; }
.dt input { flex: 1; background: var(--bg-2); border: 1px solid var(--line); border-radius: 12px; color: var(--text); font-family: 'Grotesk', sans-serif; font-size: 15px; padding: 12px; outline: none; color-scheme: dark; }
.dt input:focus { border-color: var(--sky-deep); }
@media (max-width: 420px) { .dt { flex-direction: column; } }
.classes { display: flex; flex-wrap: wrap; gap: 8px; }
.cls { background: var(--bg-2); border: 1px solid var(--line); color: var(--muted); font-family: 'Grotesk', sans-serif; font-weight: 500; font-size: 14px; padding: 12px 16px; border-radius: 999px; cursor: pointer; white-space: nowrap; }
.cls.on { background: var(--sky); color: #04121C; border-color: var(--sky); font-weight: 700; }
.altline { margin-top: 16px; font-size: 13px; color: var(--muted); }
.altline button { background: none; border: none; color: var(--sky); font: inherit; cursor: pointer; padding: 4px 0; text-decoration: underline; }
#status { text-align: center; color: var(--muted); font-size: 13px; margin-top: 10px; }

/* result */
.result { margin-top: 30px; }
.route-head { display: flex; align-items: baseline; gap: 14px; font-family: 'PlexMono', monospace; font-size: 26px; letter-spacing: 0.04em; }
.route-head .to { color: var(--sky); font-size: 18px; }
.cities { color: var(--muted); font-size: 15px; margin-top: 4px; }
.answer { font-weight: 700; font-size: clamp(54px, 14vw, 86px); line-height: 1; letter-spacing: 0; margin-top: 18px; color: var(--sky); font-variant-numeric: tabular-nums; }
.answer .u { font-size: 0.45em; font-weight: 500; color: var(--muted); font-variant-numeric: normal; margin: 0 0.1em 0 0.03em; }
.answer-sub { color: var(--muted); font-size: 15px; margin-top: 8px; }

/* signature map */
.mapwrap { margin-top: 26px; border: 1px solid var(--line); border-radius: 18px; overflow: hidden; background: linear-gradient(180deg, #0A1826, #071019); }
.mapwrap svg { display: block; width: 100%; height: auto; }

/* stats */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; margin-top: 22px; background: var(--line); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.stat { background: var(--panel); padding: 16px 14px; }
.stat .v { font-family: 'PlexMono', monospace; font-size: 20px; color: var(--text); white-space: nowrap; }
.stat .l { font-size: 11px; color: var(--label); letter-spacing: 0.06em; text-transform: uppercase; margin-top: 5px; line-height: 1.35; }
@media (max-width: 560px) { .stats { grid-template-columns: repeat(2, 1fr); } }

/* compare */
h2.sec { font-size: 13px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--label); font-family: 'PlexMono', monospace; margin: 34px 0 12px; }
.chk { color: var(--coral); }
.cmp { display: flex; flex-direction: column; gap: 8px; }
.cmp-row { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 12px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 13px 16px; }
.cmp-row.on { border-color: var(--sky-deep); background: var(--panel-hi); border-left: 3px solid var(--coral); }
.cmp-name { font-weight: 500; }
.cmp-name span { display: block; font-size: 12px; color: var(--muted); font-weight: 400; }
.cmp-time { font-family: 'PlexMono', monospace; font-size: 18px; }
.cmp-row.on .cmp-time { color: var(--sky); }

.warn { border: 1px solid rgba(255,111,91,0.5); background: rgba(255,111,91,0.08); color: #FFB4A6; border-radius: 12px; padding: 12px 14px; margin-top: 14px; font-size: 13.5px; }
.note { color: var(--muted); font-size: 12.5px; line-height: 1.55; margin-top: 14px; }

/* book */
.book-btns { display: flex; flex-wrap: wrap; gap: 10px; }
.bk { flex: 1; min-width: 140px; text-align: center; text-decoration: none; border-radius: 12px; padding: 14px 12px; font-weight: 500; font-size: 14px; }
.bk .k { font-family: 'PlexMono', monospace; font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; display: block; opacity: 0.7; }
.bk-primary { background: var(--coral); color: #1A0B08; }
.bk-alt { background: var(--panel); border: 1px solid var(--line); color: var(--text); }
.disclosure { color: var(--muted); font-size: 11.5px; margin-top: 12px; }
