/* InFlight Live (tracker.html): one night-sky look, on purpose */
:root {
  color-scheme: dark;
  --bg: #060b16; --sea: #0b1426; --land: #1c2a40; --coast: #2d4262; --grid: rgba(140, 170, 220, .045);
  --night: rgba(2, 5, 12, .42); --panel: rgba(12, 20, 36, .78); --edge: rgba(150, 180, 230, .14);
  --fg: #eef3fb; --fg-2: #9fb0c8; --fg-3: #6f809a; --tint: #4da3ff; --live: #30d158;
  --k-standard: #30d158; --k-swift: #ff453a; --k-turbo: #e8ecf4; --k-rocket: #ffc93c; --k-mystery: #c86bff;
}
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body { background: var(--bg); color: var(--fg); font: 15px/1.4 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", system-ui, sans-serif; -webkit-font-smoothing: antialiased; }
[hidden] { display: none !important; }
a { color: var(--tint); }

.tk { position: fixed; inset: 0; overflow: hidden; }
.tk-map { position: absolute; inset: 0; width: 100%; height: 100%; display: block; cursor: default; }
.tk-map { cursor: grab; touch-action: none; }
.tk-map.hot { cursor: pointer; }
.tk-map.drag { cursor: grabbing; }

.tk-panel { position: absolute; top: 20px; left: 20px; max-height: calc(100% - 40px); width: 316px; display: flex; flex-direction: column; gap: 16px; padding: 20px 22px;
  background: var(--panel); border: 1px solid var(--edge); border-radius: 22px; backdrop-filter: blur(18px) saturate(1.4); -webkit-backdrop-filter: blur(18px) saturate(1.4);
  overflow-y: auto; box-shadow: 0 20px 60px rgba(0, 0, 0, .45); }
.tk-head { display: flex; align-items: center; gap: 12px; }
.tk-icon { border-radius: 11px; }
.tk-head h1 { margin: 0; font-size: 20px; font-weight: 700; letter-spacing: -.3px; }
.tk-sub { margin: 2px 0 0; display: flex; align-items: center; gap: 7px; font-size: 13px; color: var(--fg-2); font-variant-numeric: tabular-nums; }
.tk-live { width: 8px; height: 8px; border-radius: 50%; background: var(--live); box-shadow: 0 0 0 0 rgba(48, 209, 88, .6); animation: tk-pulse 2s infinite; }
.tk-live.off { background: var(--fg-3); animation: none; }
@keyframes tk-pulse { 70% { box-shadow: 0 0 0 7px rgba(48, 209, 88, 0); } 100% { box-shadow: 0 0 0 0 rgba(48, 209, 88, 0); } }

.tk-count { display: grid; gap: 2px; }
.tk-n { font-size: 48px; line-height: 1; font-weight: 700; letter-spacing: -2px; font-variant-numeric: tabular-nums; }
.tk-nlabel { font-size: 15px; color: var(--fg-2); }

.tk-kinds { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.tk-kind { display: flex; align-items: center; gap: 9px; padding: 9px 11px; border-radius: 12px; background: rgba(255, 255, 255, .04); border: 1px solid var(--edge); font-size: 13px; color: var(--fg-2); }
.tk-kind b { margin-left: auto; color: var(--fg); font-variant-numeric: tabular-nums; }
.tk-dot { width: 10px; height: 10px; border-radius: 50%; flex: none; background: var(--c); box-shadow: 0 0 8px var(--c); }

.tk-panel h2 { margin: 0 0 8px; font-size: 12px; font-weight: 600; letter-spacing: .6px; text-transform: uppercase; color: var(--fg-3); }
.tk-where { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.tk-where li { display: flex; gap: 8px; font-size: 14px; }
.tk-where li span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tk-where li b { margin-left: auto; font-variant-numeric: tabular-nums; font-weight: 600; }
.tk-where .none { color: var(--fg-3); }

.tk-zoom { position: absolute; right: 20px; bottom: 20px; display: flex; gap: 8px; }
.tk-zoom button { min-width: 40px; height: 40px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--edge); background: var(--panel); color: var(--fg);
  font: 600 18px/1 -apple-system, BlinkMacSystemFont, system-ui, sans-serif; backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); cursor: pointer; }
.tk-zoom button[data-z="reset"] { font-size: 13px; }
.tk-zoom button:hover { background: rgba(40, 56, 86, .9); }
.tk-zoom button:focus-visible { outline: 2px solid var(--tint); outline-offset: 2px; }

.tk-tip { position: absolute; pointer-events: none; padding: 9px 12px; border-radius: 12px; background: rgba(14, 22, 40, .94); border: 1px solid var(--edge);
  font-size: 13px; line-height: 1.35; color: var(--fg); white-space: nowrap; box-shadow: 0 10px 30px rgba(0, 0, 0, .4); transform: translate(-50%, calc(-100% - 14px)); }
.tk-tip small { display: block; color: var(--fg-2); }
/* (a tip fades in as you reach a dot, rather than popping) */
.tk-tip:not([hidden]) { animation: tk-tip .15s ease; }
@keyframes tk-tip { from { opacity: 0; } }

.tk-phone { min-height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 32px 24px; text-align: center; }
.tk-phone img { border-radius: 22px; }
.tk-phone h1 { margin: 6px 0 0; font-size: 24px; line-height: 1.2; text-wrap: balance; }
.tk-phone p { margin: 0; max-width: 32ch; color: var(--fg-2); }
.tk-btn { margin-top: 8px; padding: 14px 26px; border-radius: 999px; background: var(--tint); color: #fff; font-weight: 600; text-decoration: none; }

@media (prefers-reduced-motion: reduce) { .tk-live { animation: none; } }
/* (the zoom buttons give a little under a press) */
.tk-zoom button { transition: transform .3s cubic-bezier(.2, 1.1, .4, 1), background-color .2s; }
.tk-zoom button:active { transform: scale(.94); }
@media (prefers-reduced-motion: reduce) { .tk-zoom button { transition: background-color .2s; } .tk-zoom button:active { transform: none; } }

/* today, as totals: top right, over the map */
.tk-today { position: absolute; top: 20px; right: 20px; display: flex; align-items: stretch; gap: 0; padding: 12px 6px; border-radius: 18px;
  background: var(--panel); border: 1px solid var(--edge); backdrop-filter: blur(18px) saturate(1.4); -webkit-backdrop-filter: blur(18px) saturate(1.4); box-shadow: 0 14px 40px rgba(0, 0, 0, .35); }
.tk-today > div { display: flex; flex-direction: column; justify-content: center; gap: 2px; padding: 0 16px; }
.tk-today > div + div { border-left: 1px solid var(--edge); }
.tk-tday b { font-size: 15px; font-weight: 700; }
.tk-tday small, .tk-stat small { font-size: 12px; color: var(--fg-3); white-space: nowrap; }
.tk-stat b { font-size: 22px; line-height: 1.1; font-weight: 700; letter-spacing: -.4px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tk-seas-stat { cursor: default; }
@media (max-width: 1100px) { .tk-tday { display: none !important; } .tk-today > div:nth-child(2) { border-left: 0; } }

/* on their way to or from the Moon: a count only */
.tk-moon { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; background: rgba(129, 144, 179, .12); border: 1px solid var(--edge); font-size: 13px; color: var(--fg-2); }
.tk-moon svg { width: 18px; height: 18px; flex: none; fill: #c9d2e6; }
.tk-moon b { color: var(--fg); font-variant-numeric: tabular-nums; }
