/* Live (/live/): who is flying with Aeromigo now. The site's header (site.css), under it the list on the left and
   our own relief map everywhere else (assets/cabinet-relief.js); on a phone the map fills the screen and the list
   is a sheet at the bottom. The list, the map and the card use the system font, like the cabinet. */
.live-body {
  --surface: #ffffff; --surface-2: #f1f3f6; --hover: #eceff3; --line: #e3e8ee; --line-2: #d5dbe2;
  --text: #0b1016; --text-2: #566170; --text-3: #8a94a3; --accent: #e8501c;
  --ok: #1d7a3e; --ok-soft: #e6f2ea; --bad: #c42b1c; --row-on: #ebf4ff; --sel: #2457d6;
  --live: #e5372b; --me: #007aff; --halo: #ffffff; --map: #e9efe6;
  --float: 0 2px 10px rgba(11, 16, 22, .14); --sh-2: 0 18px 40px -16px rgba(16, 24, 40, .22);
  --p0: #2457d6; --p1: #7b3fd6; --p2: #0b8f7f; --p3: #d0337f; --p4: #b07700; --p5: #5a6f86; --p6: #1f7fbf; --p7: #8a5a2b;
  --ui: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  height: 100vh; height: 100dvh; display: flex; flex-direction: column; overflow: hidden;
}
:root[data-theme="dark"] .live-body {
  --surface: #12171d; --surface-2: #1a2028; --hover: #1f2731; --line: #232b35; --line-2: #303a46;
  --text: #eef2f6; --text-2: #b3bcc8; --text-3: #8390a0; --accent: #ff6a33;
  --ok: #3fb36a; --ok-soft: #13261b; --bad: #f87171; --row-on: #18233d; --sel: #6d93ff;
  --live: #ff5a4d; --me: #0a84ff; --halo: #0b0e12; --map: #1a2219;
  --float: 0 2px 12px rgba(0, 0, 0, .5); --sh-2: 0 18px 40px -16px rgba(0, 0, 0, .7);
  --p0: #6d93ff; --p1: #a57bff; --p2: #3cc7b3; --p3: #ff6fb0; --p4: #f0b429; --p5: #9fb0c4; --p6: #5ab4f0; --p7: #d29a63;
}
.live-body > .top { flex: none; background: var(--paper); position: relative; z-index: 6; }
.live-body .top .wrap { max-width: none; }
.dot-live { width: 8px; height: 8px; border-radius: 50%; background: var(--live, #e5372b); box-shadow: 0 0 0 3px color-mix(in srgb, var(--live, #e5372b) 22%, transparent); flex: none; }

.lv { flex: 1; min-height: 0; display: grid; grid-template-columns: 384px 1fr; font-family: var(--ui); color: var(--text); line-height: 1.4; }
.lv button { font: inherit; color: inherit; }
.lv svg.i { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.lv svg.i .fill { fill: currentColor; stroke: none; }
.lv-side { background: var(--surface); border-right: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; }
.lv-head { padding: 20px 22px 12px; }
.lv-eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 750; letter-spacing: .08em; color: var(--live); }
.lv-head h1 { font-size: 26px; line-height: 1.15; margin: 8px 0 0; letter-spacing: -0.02em; font-weight: 750; }
.lv-stats { display: flex; gap: 8px; margin-top: 14px; flex-wrap: wrap; align-items: center; }
.lv-stat { display: inline-flex; align-items: baseline; gap: 6px; padding: 7px 12px; border-radius: 99px; background: var(--surface-2); font-size: 14px; color: var(--text-2); }
.lv-stat b { color: var(--text); font-size: 16px; font-variant-numeric: tabular-nums; }
.lv-stat.air b { color: var(--ok); }
.lv-upd { font-size: 13px; color: var(--text-3); }
.lv-upd.bad { color: var(--bad); }
.lv-search { display: block; margin: 0 22px 10px; position: relative; }
.lv-search input { width: 100%; height: 42px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--surface); padding: 0 14px 0 40px; font: inherit; font-size: 15px; color: var(--text); }
.lv-search input::placeholder { color: var(--text-3); }
.lv-search input:focus { outline: 2px solid var(--sel); outline-offset: -1px; }
.lv-search svg.i { position: absolute; left: 13px; top: 11px; color: var(--text-3); }
.lv-list { overflow: auto; flex: 1; min-height: 0; border-top: 1px solid var(--line); overscroll-behavior: contain; }
.lv-grp { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding: 12px 22px 8px; font-size: 13px; color: var(--text-2); background: var(--surface-2); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 1; }
.lv-grp > span:first-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lv-grp > span:last-child { flex: none; }
.lv-grp b { color: var(--text); font-weight: 650; font-size: 14px; }
.lv-grp.near { background: color-mix(in srgb, var(--me) 9%, var(--surface)); }
.lv-grp.near b { color: var(--me); display: inline-flex; align-items: center; gap: 5px; }
.lv-grp.near svg.i { width: 14px; height: 14px; }
.lv-row { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 11px 22px; border: 0; border-bottom: 1px solid var(--line); background: none; width: 100%; text-align: left; cursor: pointer; }
.lv-row:hover { background: var(--hover); }
.lv-row:focus-visible { outline: 2px solid var(--sel); outline-offset: -2px; }
.lv-row.on { background: var(--row-on); box-shadow: inset 3px 0 0 var(--sel); }
.lv-row .nm { display: block; font-weight: 650; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lv-row .sub { display: block; font-size: 13px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lv-row .sub .dist { color: var(--me); font-weight: 650; }
.lv-row .nums { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.lv-row .alt { display: block; font-weight: 700; font-size: 16px; }
.lv-row .alt small { font-weight: 500; font-size: 12px; color: var(--text-2); margin-left: 2px; }
.lv-row .vs { display: block; font-size: 13px; font-weight: 650; }
.lv .up { color: var(--ok); } .lv .down { color: var(--bad); } .lv .flat { color: var(--text-2); }
.lv-row.landed .alt, .lv-row.silent .alt, .lv-row.silent .nm { color: var(--text-2); }
.lv-empty { padding: 26px 22px; color: var(--text-2); font-size: 14.5px; line-height: 1.5; }
.lv-empty b { display: block; color: var(--text); font-size: 17px; margin-bottom: 6px; }

.lv-av { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-weight: 750; font-size: 14px; letter-spacing: .02em; position: relative; background: var(--c); }
.lv-av.landed { border-radius: 10px; }
.lv-av.silent { background: transparent; color: var(--text-2); border: 2px dashed var(--text-3); }
.lv-av .ring { position: absolute; inset: -4px; border-radius: 50%; border: 2.5px solid transparent; }
.lv-av .ring.up { border-color: var(--ok); } .lv-av .ring.down { border-color: var(--bad); }

.lv-foot { padding: 14px 22px 18px; border-top: 1px solid var(--line); font-size: 13px; color: var(--text-2); line-height: 1.45; }
.lv-foot b { color: var(--text); display: block; font-size: 14px; margin-bottom: 4px; }
.lv-foot .how { display: block; margin-top: 6px; white-space: nowrap; }
.lv-foot .path { display: inline-block; padding: 1px 8px; border-radius: 6px; background: var(--surface-2); color: var(--text); font-weight: 600; }

/* ---- the map */
.lv-map { position: relative; overflow: hidden; background: var(--map); touch-action: none; user-select: none; -webkit-user-select: none; cursor: grab; }
.lv-map.drag { cursor: grabbing; }
.lv-map canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; max-width: none; }
.lv-map svg.tracks { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; max-width: none; }
.tracks path { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.tracks .halo { stroke: var(--halo); opacity: .85; }
.lv-marks { position: absolute; inset: 0; pointer-events: none; }
.mk { position: absolute; transform: translate(-50%, -50%); z-index: 2; pointer-events: auto; cursor: pointer; }
.mk .pin { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-weight: 750; font-size: 11.5px; border: 2px solid #fff; box-shadow: 0 1px 4px rgba(0,0,0,.35); position: relative; background: var(--c); }
:root[data-theme="dark"] .mk .pin { border-color: #0b0e12; }
.mk .head { position: absolute; left: 50%; top: 50%; width: 0; height: 0; }
.mk .head i { position: absolute; left: -6px; top: -27px; width: 0; height: 0; border-left: 6px solid transparent; border-right: 6px solid transparent; border-bottom: 10px solid var(--c); filter: drop-shadow(0 0 1.5px var(--halo)); }
.mk.landed .pin { border-radius: 6px; width: 28px; height: 28px; }
.mk.silent .pin { background: var(--surface); color: var(--text-2); border: 2px dashed var(--text-3); box-shadow: none; }
.mk.sel { z-index: 3; }
.mk.sel .pin { width: 38px; height: 38px; font-size: 13.5px; border-width: 3px; box-shadow: 0 0 0 4px color-mix(in srgb, var(--c) 30%, transparent), 0 2px 8px rgba(0,0,0,.35); }
.mk.sel .head i { top: -33px; }
.mk .lbl { position: absolute; left: calc(100% + 7px); top: 50%; transform: translateY(-50%); white-space: nowrap; padding: 3px 9px 3px 8px; border-radius: 99px; background: color-mix(in srgb, var(--surface) 92%, transparent); box-shadow: var(--float); font-size: 12.5px; font-weight: 650; display: flex; gap: 6px; align-items: baseline; }
.mk .lbl.pl { left: auto; right: calc(100% + 7px); }
.mk .lbl.pu { left: 50%; top: auto; bottom: calc(100% + 9px); transform: translateX(-50%); }
.mk .lbl.pd { left: 50%; top: calc(100% + 9px); transform: translateX(-50%); }
.mk.sel .lbl { font-size: 13.5px; }
.mk .lbl .a { color: var(--text-2); font-weight: 600; font-variant-numeric: tabular-nums; }
.tk { position: absolute; transform: translate(-50%, -100%); z-index: 1; font-size: 12px; font-weight: 650; color: var(--text); display: flex; flex-direction: column; align-items: center; text-shadow: 0 0 3px var(--halo), 0 0 3px var(--halo), 0 0 2px var(--halo); white-space: nowrap; }
.tk svg { width: 14px; height: 12px; fill: var(--text); margin-top: 1px; }
.cl { position: absolute; width: 0; height: 0; z-index: 2; pointer-events: auto; cursor: pointer; }   /* the circle's middle on the place */
.cl .n { position: absolute; left: 0; top: 0; transform: translate(-50%, -50%); width: var(--d); height: var(--d); border-radius: 50%; background: var(--accent); color: #fff; font-weight: 800; font-size: 16px; display: grid; place-items: center; border: 3px solid #fff; box-shadow: 0 0 0 6px color-mix(in srgb, var(--accent) 25%, transparent), 0 2px 8px rgba(0,0,0,.3); }
:root[data-theme="dark"] .cl .n { border-color: #0b0e12; }
.cl .t { position: absolute; left: calc(var(--d) / 2 + 8px); top: 0; transform: translateY(-50%); padding: 4px 10px; border-radius: 99px; background: var(--surface); box-shadow: var(--float); font-size: 13px; font-weight: 650; white-space: nowrap; }
.cl .t span { color: var(--text-2); font-weight: 500; }
.cl .t.pl { left: auto; right: calc(var(--d) / 2 + 8px); }
/* where I am: blue like the iPhone's own dot, so it never looks like a pilot */
.me { position: absolute; width: 0; height: 0; z-index: 2; }
.me .acc { position: absolute; left: 0; top: 0; transform: translate(-50%, -50%); border-radius: 50%; background: color-mix(in srgb, var(--me) 13%, transparent); border: 1.5px solid color-mix(in srgb, var(--me) 50%, transparent); }
.me .dot { position: absolute; left: -10px; top: -10px; width: 20px; height: 20px; border-radius: 50%; background: var(--me); border: 3px solid #fff; box-shadow: 0 0 0 6px color-mix(in srgb, var(--me) 22%, transparent), 0 1px 5px rgba(0,0,0,.35); }
.me .lbl { position: absolute; left: 18px; top: 0; transform: translateY(-50%); white-space: nowrap; padding: 3px 9px 3px 8px; border-radius: 99px; background: color-mix(in srgb, var(--surface) 92%, transparent); box-shadow: var(--float); font-size: 12.5px; font-weight: 700; color: var(--me); display: flex; gap: 6px; align-items: baseline; }
.me .lbl .a { color: var(--text-2); font-weight: 600; }

/* ---- what floats over the map */
.fl { position: absolute; z-index: 4; }
.lv-tools { top: 16px; left: 16px; display: flex; gap: 8px; flex-wrap: wrap; }
.lv-seg { display: inline-flex; background: var(--surface); border-radius: 99px; box-shadow: var(--float); padding: 3px; font-size: 13.5px; font-weight: 600; }
.lv-seg button { padding: 7px 13px; border-radius: 99px; color: var(--text-2); border: 0; background: none; cursor: pointer; }
.lv-seg button[aria-pressed="true"] { background: var(--text); color: var(--surface); }
.lv-near { display: inline-flex; align-items: center; gap: 6px; padding: 0 10px 0 12px; min-height: 38px; border-radius: 99px; background: var(--me); color: #fff; font-size: 13.5px; font-weight: 650; box-shadow: var(--float); border: 0; cursor: pointer; }
.lv-near > span { opacity: .82; font-weight: 500; }
.lv-near svg.i { width: 16px; height: 16px; }
.lv-near svg.i:last-child { margin-left: 4px; opacity: .85; stroke-width: 2.2; }
.lv-zoomer { right: 16px; bottom: 44px; display: flex; flex-direction: column; background: var(--surface); border-radius: 14px; box-shadow: var(--float); overflow: hidden; }
.lv-zoomer button { width: 44px; height: 44px; border: 0; background: none; font-size: 22px; color: var(--text); display: grid; place-items: center; cursor: pointer; }
.lv-zoomer button + button { border-top: 1px solid var(--line); }
.lv-zoomer button:hover { background: var(--hover); }
.lv-zoomer button.loc.on { color: var(--me); }
.lv-zoomer button.loc.off { color: var(--text-3); }
.lv-zoomer button.loc.wait svg { opacity: .45; }
.lv-legend { left: 16px; bottom: 16px; display: flex; gap: 14px; padding: 8px 14px; border-radius: 99px; background: color-mix(in srgb, var(--surface) 94%, transparent); box-shadow: var(--float); font-size: 13px; color: var(--text-2); align-items: center; }
.lv-legend span { display: inline-flex; align-items: center; gap: 6px; }
.lv-legend i { width: 12px; height: 12px; border-radius: 50%; display: inline-block; }
.lv-legend i.up { border: 2.5px solid var(--ok); } .lv-legend i.down { border: 2.5px solid var(--bad); }
.lv-legend i.landed { border-radius: 3px; background: var(--text-2); }
.lv-legend i.silent { border: 2px dashed var(--text-3); }
.lv-credit { right: 16px; bottom: 14px; font-size: 11.5px; color: var(--text-2); background: color-mix(in srgb, var(--surface) 85%, transparent); padding: 2px 8px; border-radius: 6px; }
.lv-pop { right: 72px; bottom: 44px; width: 330px; background: var(--surface); border-radius: 16px; box-shadow: var(--sh-2), 0 0 0 1px var(--line); padding: 16px 18px; font-size: 14px; line-height: 1.45; }
.lv-pop b { display: block; font-size: 16px; margin-bottom: 6px; }
.lv-pop p { color: var(--text-2); margin: 0; }
.lv-pop p.hint { color: var(--text-3); font-size: 13px; margin-top: 6px; }
.lv-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 0 16px; border-radius: 99px; border: 1px solid var(--line-2); background: var(--surface); color: var(--text); font-weight: 600; font-size: 14px; white-space: nowrap; cursor: pointer; }
.lv-btn:hover { background: var(--hover); }
.lv-btn.on { background: var(--sel); border-color: var(--sel); color: #fff; }
.lv-btn svg.i { width: 18px; height: 18px; stroke-width: 2; }
.lv-pop .lv-btn { margin-top: 12px; }
.lv-emptymap { left: 50%; top: 50%; transform: translate(-50%, -50%); background: var(--surface); border-radius: 16px; box-shadow: var(--sh-2), 0 0 0 1px var(--line); padding: 22px 24px; width: min(360px, calc(100% - 32px)); text-align: center; }
.lv-emptymap b { display: block; font-size: 18px; margin-bottom: 6px; }
.lv-emptymap p { color: var(--text-2); font-size: 14.5px; margin: 0; }
.lv-toast { left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--text); color: var(--surface); border-radius: 99px; padding: 9px 16px; font-size: 14px; font-weight: 600; box-shadow: var(--float); white-space: nowrap; }

/* ---- the pilot's card */
.lv-card { top: 16px; right: 16px; width: 372px; max-width: calc(100% - 32px); background: var(--surface); border-radius: 16px; box-shadow: var(--sh-2), 0 0 0 1px var(--line); padding: 18px 18px 16px; }
.lv-card .who { display: grid; grid-template-columns: 48px minmax(0, 1fr) 32px; gap: 12px; align-items: center; }
.lv-card .who .lv-av { width: 48px; height: 48px; font-size: 16px; }
.lv-card h2 { font-size: 19px; line-height: 1.2; margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lv-card .wing { font-size: 14px; color: var(--text-2); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lv-card .x { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; color: var(--text-2); background: var(--surface-2); align-self: start; border: 0; cursor: pointer; }
.lv-card .x svg.i { width: 18px; height: 18px; }
.lv-card .state { margin-top: 12px; font-size: 14px; color: var(--text-2); display: flex; align-items: center; gap: 8px; }
.lv-card .state b { color: var(--text); font-weight: 650; }
.lv-card .state .dot-live { background: var(--ok); box-shadow: 0 0 0 3px var(--ok-soft); }
.lv-figs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 14px; border-top: 1px solid var(--line); }
.lv-figs div { padding: 11px 0 9px; border-bottom: 1px solid var(--line); min-width: 0; }
.lv-figs div:not(:nth-child(3n+1)) { padding-left: 12px; border-left: 1px solid var(--line); }
.lv-figs b { display: block; font-size: 21px; font-weight: 700; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; line-height: 1.15; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lv-figs b small { font-size: 13px; font-weight: 600; margin-left: 2px; }
.lv-figs div > span { display: block; font-size: 12.5px; color: var(--text-2); }
.lv-card .acts { display: flex; gap: 8px; margin-top: 14px; }
.lv-card .acts .lv-btn { flex: 1; }
.lv-card .upd { margin-top: 10px; font-size: 12.5px; color: var(--text-3); text-align: center; }

/* ---- a narrow window: the header on one line (the logo leads home; About and Privacy are on every other page), no legend under the map */
@media (max-width: 1100px) {
  .live-body .nav > a:not(.live-link):not(.acc-link):not([href$="whats-new/"]) { display: none; }
  .lv-legend { display: none; }
}

/* ---- phone: the map, the list in a sheet at the bottom */
.lv [hidden] { display: none !important; }
.lv-sheet { display: none; }
.lv-chip { display: none; }
@media (max-width: 760px) {
  .lv { display: block; position: relative; }
  .lv-side { display: none; }
  .lv-map { position: absolute; inset: 0; }
  .lv-tools, .lv-legend { display: none; }
  .lv-chip { display: flex; top: 12px; left: 12px; align-items: center; gap: 8px; padding: 7px 12px; border-radius: 99px; background: var(--surface); box-shadow: var(--float); font-size: 13.5px; font-weight: 650; border: 0; max-width: calc(100% - 90px); }
  .lv-chip span { color: var(--text-2); font-weight: 500; }
  .lv-chip .near-in { color: var(--me); font-weight: 650; display: inline-flex; align-items: center; gap: 5px; }
  .lv-chip svg.i { width: 15px; height: 15px; }
  .lv-chip > svg.i:last-child { color: var(--text-3); margin-left: 2px; stroke-width: 2.2; }
  .lv-zoomer { right: 12px; top: 12px; bottom: auto; }
  .lv-zoomer button { width: 42px; height: 42px; }
  .lv-credit { right: auto; left: 12px; bottom: auto; top: 56px; font-size: 10.5px; }
  .lv-pop { right: 62px; top: 12px; bottom: auto; width: min(300px, calc(100% - 80px)); }
  .lv-sheet { display: flex; flex-direction: column; position: absolute; left: 0; right: 0; bottom: 0; height: 47%; z-index: 5; background: var(--surface); border-radius: 22px 22px 0 0; box-shadow: 0 -8px 30px -10px rgba(0,0,0,.25), 0 0 0 1px var(--line); transition: height .2s ease; }
  .lv-sheet.low { height: 92px; }
  .lv-sheet .grab { width: 100%; height: 22px; border: 0; background: none; flex: none; cursor: pointer; display: grid; place-items: center; }
  .lv-sheet .grab i { width: 40px; height: 5px; border-radius: 3px; background: var(--line-2); }
  .lv-sheet .sh-head { display: flex; align-items: center; justify-content: space-between; padding: 0 18px 10px; gap: 10px; }
  .lv-sheet .sh-head h2 { font-size: 19px; margin: 0; }
  .lv-sheet .lv-list .lv-row { padding: 10px 18px; }
  .lv-sheet .lv-grp { padding: 10px 18px 7px; }
  .lv-sheet .lv-card { position: static; width: auto; max-width: none; box-shadow: none; padding: 0 18px 18px; border-radius: 0; overflow: auto; }
  .lv-sheet .lv-foot { padding: 14px 18px 18px; border-top: 0; }
  .lv-toast { bottom: calc(47% + 16px); }
}
@media (prefers-reduced-motion: reduce) { .lv-sheet { transition: none; } }
