/* FOSSA Pass Predictor — built on FOSSA Design System tokens */
:root {
  --deep-space: #00061C;
  --raised: #040D2A;
  --panel: #081540;
  --panel-edge: #0D1E52;
  --sky: #0066F7;
  --sky-hover: #0057D2;
  --sky-press: #0048AE;
  --sky-75: #408CF9;
  --sky-50: #80B3FB;
  --sky-25: #BFD9FD;
  --sky-deep: #0031CC;
  --light-blue: #DDECF4;
  --muted: #9BC1D0;
  --glass: rgba(221, 236, 244, .06);
  --line: rgba(221, 236, 244, .16);
  --line-strong: rgba(221, 236, 244, .32);
  --grid-line: rgba(128, 179, 251, .10);
  --glow-sky: 0 0 0 1px rgba(0, 102, 247, .28), 0 0 40px rgba(0, 102, 247, .35);
  --focus: rgba(0, 102, 247, .45);

  --font: "Bai Jamjuree", "Segoe UI", system-ui, sans-serif;
  --r-md: 6px;
  --r-sm: 4px;
  --r-pill: 999px;
  --ease: cubic-bezier(.22, .61, .36, 1);
  --container: 1240px;
  --gutter: 24px;

  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  color: #fff;
  background-color: var(--deep-space);
  background-image:
    radial-gradient(120% 60% at 50% -10%, rgba(0, 102, 247, .22), transparent 60%),
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 100% 100%, 64px 64px, 64px 64px;
  background-attachment: fixed;
  font-variant-numeric: tabular-nums;
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

button, input, select { font: inherit; color: inherit; }

:focus-visible { outline: 2px solid var(--sky); outline-offset: 2px; }

.muted { color: var(--muted); font-size: 14px; }

/* ---------- Top bar ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  padding-top: env(safe-area-inset-top, 0px);
  background: rgba(0, 6, 28, .75);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.topbar-inner {
  max-width: var(--container);
  margin: 0 auto;
  height: 64px;
  padding: 0 var(--gutter);
  display: flex;
  align-items: center;
  gap: 16px;
}
.brand { display: flex; align-items: center; }
.brand-logo { height: 30px; width: auto; display: block; }
.brand-sep { width: 1px; height: 24px; background: var(--line-strong); }
.brand-app {
  font-weight: 600;
  font-size: 13px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--light-blue);
}
.clock { margin-left: auto; display: flex; align-items: baseline; gap: 8px; }
.clock-time { font-size: 20px; font-weight: 600; letter-spacing: .02em; }
.clock-zone { font-size: 12px; font-weight: 600; letter-spacing: .22em; color: var(--sky-75); text-transform: uppercase; }

/* ---------- Toolbar ---------- */
.toolbar { border-bottom: 1px solid var(--line); background: rgba(4, 13, 42, .6); }
.toolbar-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 12px var(--gutter);
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 12px 24px;
}

.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--muted);
}

.select, .input {
  height: 40px;
  padding: 0 12px;
  border-radius: var(--r-sm);
  border: 1px solid var(--line);
  background-color: var(--raised);
  color: #fff;
  font-size: 15px;
  transition: border-color 160ms var(--ease), box-shadow 160ms var(--ease);
}
.select {
  appearance: none;
  padding-right: 36px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%239BC1D0' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  cursor: pointer;
}
.select:hover, .input:hover { border-color: var(--line-strong); }
.select:focus-visible, .input:focus-visible { border-color: var(--sky); box-shadow: 0 0 0 3px var(--focus); outline: none; }
.input { width: 100%; }
.input::-webkit-inner-spin-button { opacity: .4; }

.segmented {
  display: inline-flex;
  height: 40px;
  padding: 3px;
  border-radius: var(--r-pill);
  border: 1px solid var(--line);
  background: var(--raised);
}
.segmented button {
  border: 0;
  background: transparent;
  padding: 0 16px;
  border-radius: var(--r-pill);
  font-weight: 600;
  font-size: 14px;
  color: rgba(255, 255, 255, .68);
  cursor: pointer;
  transition: background-color 160ms var(--ease), color 160ms var(--ease);
}
.segmented button:hover { color: #fff; }
.segmented button[aria-checked="true"] { background: var(--sky); color: #fff; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 40px;
  padding: 0 20px;
  border-radius: var(--r-pill);
  border: 1px solid transparent;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 160ms var(--ease), border-color 160ms var(--ease), color 160ms var(--ease), box-shadow 160ms var(--ease);
}
.btn:active { transform: translateY(1px); }
.btn-ghost { background: transparent; border-color: var(--line-strong); color: rgba(255, 255, 255, .85); }
.btn-ghost:hover { border-color: var(--sky-75); color: #fff; background: rgba(0, 102, 247, .12); }
.btn-sm { height: 32px; padding: 0 14px; font-size: 13px; }
.btn-link { height: auto; padding: 0; border: 0; background: none; color: var(--sky-75); font-weight: 600; }
.btn-link:hover { color: var(--sky-25); }
.btn[disabled] { opacity: .5; cursor: progress; }

/* ---------- Layout ---------- */
.page {
  max-width: var(--container);
  margin: 0 auto;
  padding: 32px var(--gutter) 64px;
  display: flex;
  flex-direction: column;
  gap: 56px;
}

.panel {
  background: var(--glass);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  box-shadow: inset 0 0 0 1px rgba(221, 236, 244, .04);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.eyebrow {
  margin: 0;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--sky-75);
}

.section { display: flex; flex-direction: column; gap: 20px; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.section-title {
  margin: 6px 0 0;
  font-size: 28px;
  line-height: 1.16;
  font-weight: 700;
  letter-spacing: .02em;
  text-transform: uppercase;
}
.section-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

.top-grid {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: var(--gutter);
  align-items: stretch;
}

/* ---------- Map ---------- */
.map-panel { display: flex; flex-direction: column; overflow: hidden; }
.map-wrap { position: relative; flex: 1; min-height: 360px; }
#map { position: absolute; inset: 0; background: #050b22; }
.map-hint {
  position: absolute;
  left: 12px;
  bottom: 12px;
  margin: 0;
  z-index: 500;
  padding: 6px 12px;
  border-radius: var(--r-pill);
  font-size: 12px;
  font-weight: 500;
  color: var(--light-blue);
  background: rgba(0, 6, 28, .75);
  border: 1px solid var(--line);
  pointer-events: none;
}

.location { padding: 16px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 12px; }
.location-fields { display: grid; grid-template-columns: 1fr 1fr 0.8fr auto; gap: 12px; align-items: end; }
.search { position: relative; display: flex; gap: 12px; align-items: flex-end; }
.search-field { flex: 1; }
.btn-primary { background: var(--sky); color: #fff; }
.btn-primary:hover { background: var(--sky-hover); box-shadow: var(--glow-sky); }
.btn-primary:active { background: var(--sky-press); }
.search-results {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 6px);
  z-index: 1100;
  margin: 0;
  padding: 4px;
  list-style: none;
  border-radius: var(--r-md);
  border: 1px solid var(--line-strong);
  background: rgba(4, 13, 42, .98);
  box-shadow: 0 16px 40px rgba(0, 0, 0, .5);
  max-height: 260px;
  overflow-y: auto;
}
.search-results li { padding: 8px 12px; border-radius: var(--r-sm); cursor: pointer; display: flex; flex-direction: column; }
.search-results li b { font-weight: 600; }
.search-results li span { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.search-results li:hover, .search-results li.active { background: rgba(0, 102, 247, .22); }
.search-msg { margin: 0; font-size: 13px; color: var(--muted); }
.osm-dark { filter: invert(1) hue-rotate(200deg) brightness(.75) contrast(.9) saturate(.5); }

/* Leaflet theming */
.leaflet-container { font-family: var(--font); }
.leaflet-control-attribution {
  background: rgba(0, 6, 28, .7) !important;
  color: var(--muted) !important;
  font-size: 10px;
}
.leaflet-control-attribution a { color: var(--sky-50) !important; }
.leaflet-bar a {
  background: rgba(0, 6, 28, .85) !important;
  color: #fff !important;
  border-color: var(--line) !important;
}
.leaflet-bar { border: 1px solid var(--line) !important; box-shadow: none !important; }

.gs-marker { position: relative; }
.gs-marker::before, .gs-marker::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  border-radius: 50%;
  transform: translate(-50%, -50%);
}
.gs-marker::before { width: 14px; height: 14px; background: var(--sky); box-shadow: 0 0 0 3px #fff, var(--glow-sky); }
.gs-marker::after { width: 34px; height: 34px; border: 1px solid rgba(128, 179, 251, .6); }

.sat-marker { position: relative; }
.sat-marker i {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 9px;
  height: 9px;
  background: var(--light-blue);
  transform: translate(-50%, -50%) rotate(45deg);
  box-shadow: 0 0 10px rgba(128, 179, 251, .9);
}
.sat-marker span {
  position: absolute;
  left: 12px;
  top: -9px;
  white-space: nowrap;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .04em;
  color: var(--light-blue);
  text-shadow: 0 0 4px #00061C, 0 0 8px #00061C;
}
.sat-marker.visible i { background: var(--sky-25); box-shadow: 0 0 0 2px var(--sky), 0 0 16px var(--sky); }

/* ---------- Hero ---------- */
.hero { padding: 24px; display: flex; flex-direction: column; gap: 4px; position: relative; overflow: hidden; }
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(80% 60% at 70% 0%, rgba(0, 102, 247, .25), transparent 70%);
  pointer-events: none;
}
.hero > * { position: relative; }
.hero-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 22px; }
.hero-sat {
  margin: 4px 0 0;
  font-size: 32px;
  line-height: 1.1;
  font-weight: 700;
  letter-spacing: .02em;
  text-transform: uppercase;
  overflow-wrap: anywhere;
}
.hero-count {
  margin: 0;
  font-size: 18px;
  font-weight: 300;
  color: var(--light-blue);
}
.hero-count strong { font-weight: 600; color: #fff; font-size: 26px; letter-spacing: .02em; }
.hero.live .eyebrow { color: var(--sky-25); }
.hero.live .eyebrow::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 8px;
  border-radius: 50%;
  background: var(--sky-25);
  box-shadow: 0 0 0 0 rgba(128, 179, 251, .7);
  animation: pulse 1600ms var(--ease) infinite;
  vertical-align: 1px;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(128, 179, 251, .75); }
  100% { box-shadow: 0 0 0 10px rgba(128, 179, 251, 0); }
}

.hero-body { display: flex; flex-direction: column; gap: 16px; margin-top: 12px; flex: 1; }
.polar { margin: 0 auto; width: 100%; max-width: 300px; }
.polar svg { display: block; width: 100%; height: auto; overflow: visible; }
.polar .ring { fill: none; stroke: rgba(221, 236, 244, .18); stroke-width: 1; }
.polar .ring-outer { stroke: rgba(221, 236, 244, .4); }
.polar .mask { fill: rgba(0, 49, 204, .18); stroke: var(--sky-75); stroke-width: 1; stroke-dasharray: 3 4; }
.polar .spoke { stroke: rgba(221, 236, 244, .12); stroke-width: 1; }
.polar .lbl { fill: var(--muted); font-size: 11px; font-weight: 600; font-family: var(--font); }
.polar .card { fill: #fff; font-size: 13px; font-weight: 700; font-family: var(--font); }
.polar .track { fill: none; stroke: var(--sky-75); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; filter: drop-shadow(0 0 6px rgba(0, 102, 247, .8)); }
.polar .aos { fill: var(--deep-space); stroke: #fff; stroke-width: 2; }
.polar .los { fill: #fff; }
.polar .peak { fill: var(--sky-25); }
.polar .now { fill: #fff; filter: drop-shadow(0 0 8px #fff); }
.polar .note { fill: var(--muted); font-size: 12px; font-family: var(--font); }

.stats {
  margin: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--line);
}
.stats div { padding: 12px 8px 0 0; }
.stats div:nth-child(n+4) { border-top: 1px solid var(--line); margin-top: 12px; }
.stats dt { font-size: 11px; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); }
.stats dd { margin: 2px 0 0; font-size: 18px; font-weight: 600; white-space: nowrap; }
.stats dd small { font-size: 12px; font-weight: 400; color: var(--muted); margin-left: 4px; }

/* ---------- Live 3D network ---------- */
.net-status { font-size: 14px; font-weight: 500; color: var(--light-blue); }
.globe-panel {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(60% 70% at 50% 50%, rgba(0, 102, 247, .14), transparent 70%),
    rgba(0, 6, 28, .6);
}
.globe { position: relative; height: clamp(380px, 56vw, 600px); touch-action: none; cursor: grab; }
.globe.dragging { cursor: grabbing; }
.globe canvas { display: block; width: 100%; height: 100%; }
.globe-labels { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.globe-label {
  position: absolute;
  left: 0;
  top: 0;
  margin: -22px 0 0 8px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .04em;
  color: var(--muted);
  white-space: nowrap;
  text-shadow: 0 0 4px #00061C, 0 0 10px #00061C;
  transition: opacity 160ms var(--ease);
  will-change: transform;
}
.globe-label.in-view { color: #fff; }
.globe-label.gs { color: #fff; font-size: 12px; margin: 8px 0 0 10px; }
.globe-hud { position: absolute; z-index: 2; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.globe-hud-tl { top: 16px; left: 16px; }
.globe-hud-tr { top: 16px; right: 16px; justify-content: flex-end; }
.globe-hud-bl { bottom: 16px; left: 16px; gap: 16px; font-size: 12px; color: var(--muted); pointer-events: none; }
.globe-time {
  padding: 6px 12px;
  border-radius: var(--r-pill);
  border: 1px solid var(--line);
  background: rgba(0, 6, 28, .75);
  font-size: 13px;
  font-weight: 600;
}
.globe-time::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 8px;
  border-radius: 50%;
  background: var(--sky-25);
  vertical-align: 1px;
  animation: pulse 1600ms var(--ease) infinite;
}
.globe-time.warp::before { animation: none; background: var(--sky-75); border-radius: 1px; }
.segmented-sm { height: 32px; background: rgba(0, 6, 28, .75); }
.segmented-sm button { padding: 0 12px; font-size: 13px; }
.globe-btn { background: rgba(0, 6, 28, .75); }
.key { display: inline-block; vertical-align: middle; margin-right: 6px; }
.key-link { width: 16px; height: 2px; background: var(--sky-25); }
.key-ring { width: 12px; height: 12px; border-radius: 50%; border: 1px dashed var(--sky-75); }
.globe-hint {
  position: absolute;
  right: 16px;
  bottom: 16px;
  margin: 0;
  font-size: 12px;
  color: rgba(155, 193, 208, .8);
  pointer-events: none;
}
.globe-fallback { position: absolute; inset: 0; display: grid; place-items: center; padding: 24px; text-align: center; color: var(--muted); }

/* ---------- Satellite selector ---------- */
.sat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.sat-card {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2px 12px;
  padding: 14px 16px;
  border-radius: var(--r-md);
  border: 1px solid var(--line);
  background: var(--glass);
  cursor: pointer;
  transition: border-color 160ms var(--ease), background-color 160ms var(--ease), opacity 160ms var(--ease);
}
.sat-card:hover { border-color: var(--line-strong); }
.sat-card:has(input:checked) { border-color: rgba(0, 102, 247, .7); background: rgba(0, 102, 247, .12); }
.sat-card:has(input:focus-visible) { outline: 2px solid var(--sky); outline-offset: 2px; }
.sat-card input { position: absolute; opacity: 0; pointer-events: none; }
.sat-name { font-weight: 700; letter-spacing: .02em; font-size: 16px; white-space: nowrap; }
.sat-meta, .sat-norad { grid-column: 1 / -1; font-size: 13px; color: var(--muted); }
.sat-norad { font-size: 12px; color: rgba(155, 193, 208, .7); }
.sat-meta b { font-weight: 600; color: var(--light-blue); }
.sat-meta.stale b { color: var(--sky-50); }
.switch {
  grid-row: 1;
  grid-column: 2;
  align-self: center;
  width: 40px;
  height: 22px;
  border-radius: var(--r-pill);
  background: rgba(221, 236, 244, .16);
  position: relative;
  transition: background-color 160ms var(--ease);
}
.switch::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .7);
  transition: transform 160ms var(--ease), background-color 160ms var(--ease);
}
.sat-card input:checked ~ .switch { background: var(--sky); }
.sat-card input:checked ~ .switch::after { transform: translateX(18px); background: #fff; }
.sat-card:not(:has(input:checked)) .sat-name { color: rgba(255, 255, 255, .6); }
.sat-card.unavailable { cursor: not-allowed; border-style: dashed; background: transparent; }
.sat-card.unavailable .switch { opacity: .35; }

/* ---------- Schedule ---------- */
.schedule { padding: 0; overflow: hidden; }
.coverage {
  margin: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-bottom: 1px solid var(--line);
}
.coverage div { padding: 16px 20px; border-left: 1px solid var(--line); }
.coverage div:first-child { border-left: 0; }
.coverage dt { font-size: 11px; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); }
.coverage dd { margin: 4px 0 0; font-size: 24px; font-weight: 700; }
.coverage dd small { font-size: 13px; font-weight: 400; color: var(--muted); margin-left: 4px; }

.tl-scroll { overflow-x: auto; overscroll-behavior-x: contain; scrollbar-color: var(--panel-edge) transparent; }
.tl { --label-w: 150px; min-width: 720px; padding: 8px 20px 16px 0; }
.tl-row { display: grid; grid-template-columns: var(--label-w) 1fr; align-items: center; height: 36px; }
.tl-label {
  position: sticky;
  left: 0;
  z-index: 3;
  height: 100%;
  display: flex;
  align-items: center;
  padding: 0 12px 0 20px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  background: linear-gradient(90deg, #060f30 85%, rgba(6, 15, 48, 0));
}
.tl-track { position: relative; height: 100%; }
.tl-row:not(.tl-axis) .tl-track::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 20px;
  transform: translateY(-50%);
  background: rgba(221, 236, 244, .04);
  border-radius: 2px;
}
.tl-union { border-top: 1px solid var(--line); margin-top: 6px; height: 42px; }
.tl-union .tl-label { color: var(--sky-25); }
.tl-label .short { display: none; }

.tl-axis { height: 30px; }
.tl-tick {
  position: absolute;
  top: 0;
  transform: translateX(-50%);
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
}
.tl-tick.day { color: #fff; font-weight: 600; }
.tl-grid { position: absolute; top: 0; bottom: 0; left: var(--label-w); right: 20px; pointer-events: none; }
.tl-grid i { position: absolute; top: 30px; bottom: 0; width: 1px; background: rgba(221, 236, 244, .07); }
.tl-grid i.day { background: rgba(221, 236, 244, .2); }
.tl-body { position: relative; }
.tl-now {
  position: absolute;
  top: 24px;
  bottom: 0;
  width: 2px;
  margin-left: -1px;
  background: #fff;
  box-shadow: 0 0 8px rgba(255, 255, 255, .7);
  z-index: 2;
  pointer-events: none;
}
.tl-now::before {
  content: "";
  position: absolute;
  top: -4px;
  left: -3px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #fff;
}

.bar {
  position: absolute;
  top: 50%;
  height: 20px;
  min-width: 4px;
  transform: translateY(-50%);
  border: 0;
  padding: 0;
  border-radius: 2px;
  background: var(--sky);
  cursor: pointer;
  transition: box-shadow 160ms var(--ease), filter 160ms var(--ease);
}
.bar.mid { background: var(--sky-75); }
.bar.high { background: var(--sky-25); }
.bar:hover, .bar:focus-visible { box-shadow: var(--glow-sky); filter: brightness(1.15); z-index: 4; }
.bar.selected { box-shadow: 0 0 0 2px #fff, var(--glow-sky); z-index: 4; }
.bar.union { background: var(--sky); cursor: default; height: 24px; }
.bar.union:hover { box-shadow: none; filter: none; }

.sw { display: inline-block; width: 14px; height: 10px; border-radius: 2px; margin-right: 6px; vertical-align: 0; }
.sw-low { background: var(--sky); }
.sw-mid { background: var(--sky-75); }
.sw-high { background: var(--sky-25); }
.legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 13px; color: var(--muted); }

/* ---------- Pass table ---------- */
.table-panel { overflow: hidden; }
.passes { width: 100%; border-collapse: collapse; font-size: 15px; }
.passes th {
  text-align: left;
  padding: 14px 16px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
  background: rgba(4, 13, 42, .6);
}
.passes td { padding: 12px 16px; border-bottom: 1px solid rgba(221, 236, 244, .08); white-space: nowrap; }
.passes .num { text-align: right; }
.passes tbody tr { cursor: pointer; transition: background-color 160ms var(--ease); }
.passes tbody tr:hover { background: rgba(0, 102, 247, .08); }
.passes tbody tr.selected { background: rgba(0, 102, 247, .2); }
.passes tbody tr.live td:first-child::after {
  content: "In view";
  margin-left: 10px;
  padding: 2px 8px;
  border-radius: var(--r-pill);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .06em;
  background: var(--sky);
  color: #fff;
}
.passes tbody tr.past { color: rgba(255, 255, 255, .45); }
.passes tbody tr.day-break td { border-top: 1px solid var(--line-strong); }
.passes .sat { font-weight: 600; }
.passes .date { color: var(--muted); font-size: 13px; margin-right: 6px; }
.elbar { display: inline-flex; align-items: center; gap: 8px; justify-content: flex-end; }
.elbar i { display: block; width: 56px; height: 4px; border-radius: 2px; background: rgba(221, 236, 244, .12); position: relative; overflow: hidden; }
.elbar i::after { content: ""; position: absolute; inset: 0 auto 0 0; width: var(--w); background: var(--sky-75); }
.empty { margin: 0; padding: 40px 20px; text-align: center; color: var(--muted); }

/* ---------- Tooltip ---------- */
.tooltip {
  position: fixed;
  z-index: 2000;
  padding: 10px 12px;
  border-radius: var(--r-md);
  background: rgba(4, 13, 42, .96);
  border: 1px solid var(--line-strong);
  font-size: 13px;
  line-height: 1.45;
  pointer-events: none;
  max-width: 240px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, .5);
}
.tooltip b { display: block; font-size: 14px; margin-bottom: 2px; }
.tooltip span { color: var(--muted); }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--line); }
.footer-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 20px var(--gutter);
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 13px;
  color: rgba(255, 255, 255, .7);
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .top-grid { grid-template-columns: 1fr; }
  .hero { order: -1; }
  .map-wrap { min-height: 380px; }
  .hero-body { flex-direction: row; align-items: center; }
  .polar { flex: 0 0 260px; margin: 0; }
  .stats { flex: 1; }
}

@media (max-width: 720px) {
  :root { --gutter: 16px; }
  .topbar-inner { height: 56px; gap: 12px; }
  .brand-logo { height: 24px; }
  .brand-app { font-size: 11px; letter-spacing: .16em; }
  .clock-time { font-size: 16px; }
  .clock-zone { font-size: 10px; }
  .toolbar-inner { display: grid; grid-template-columns: auto 1fr 1fr; gap: 10px; padding-top: 10px; padding-bottom: 10px; }
  .toolbar .field-label { font-size: 10px; letter-spacing: .14em; }
  .toolbar .select { width: 100%; height: 36px; padding-left: 10px; padding-right: 28px; background-position: right 10px center; }
  .segmented { height: 36px; }
  .segmented button { padding: 0 10px; font-size: 13px; }
  .sat-grid { grid-template-columns: 1fr; gap: 8px; }
  .sat-card { padding: 12px 14px; grid-template-columns: 1fr auto auto; align-items: center; }
  .sat-card .switch { grid-column: 3; grid-row: 1 / 3; }
  .sat-meta { grid-column: 1; }
  .sat-norad { grid-column: 2; grid-row: 1; justify-self: end; }
  .page { padding-top: 20px; gap: 40px; }
  .map-wrap { min-height: 300px; }
  .location-fields { grid-template-columns: 1fr 1fr; }
  .location-fields .btn { grid-column: 1 / -1; }
  .hero { padding: 20px; }
  .hero-sat { font-size: 26px; }
  .hero-body { flex-direction: column; }
  .polar { flex: none; max-width: 280px; margin: 0 auto; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stats div:nth-child(n+3) { border-top: 1px solid var(--line); margin-top: 12px; }
  .section-title { font-size: 22px; }
  .globe { height: 420px; }
  .globe-hud-tr { top: auto; bottom: 44px; right: 12px; left: 12px; justify-content: space-between; }
  .globe-hud-tl { top: 12px; left: 12px; }
  .globe-hud-bl { display: none; }
  .globe-hint { left: 12px; right: 12px; bottom: 14px; text-align: center; }
  .coverage { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .coverage div:nth-child(3) { border-left: 0; }
  .coverage div:nth-child(n+3) { border-top: 1px solid var(--line); }
  .coverage dd { font-size: 20px; }
  .tl { --label-w: 64px; }
  .tl-label { font-size: 12px; padding-left: 12px; }
  .tl-label .full { display: none; }
  .tl-label .short { display: inline; }
  .tl-union .tl-label { font-size: 0; }
  .tl-union .tl-label::after { content: "All"; font-size: 12px; }

  /* Pass table becomes stacked cards */
  .passes thead { display: none; }
  .passes, .passes tbody { display: block; }
  .passes tbody tr {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px 12px;
    padding: 14px 16px;
    border-bottom: 1px solid rgba(221, 236, 244, .1);
  }
  .passes td { padding: 0; border: 0; white-space: normal; }
  .passes td.sat { grid-column: 1 / -1; font-size: 16px; }
  .passes td[data-label]::before {
    content: attr(data-label);
    display: block;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--muted);
  }
  .passes .num { text-align: left; }
  .passes .date { display: none; }
  .passes tbody tr.day-break td { border-top: 0; }
  .elbar { justify-content: flex-start; }
}

@media (max-width: 380px) {
  .brand-sep, .brand-app { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

.map-error { position: absolute; inset: 0; display: grid; place-items: center; margin: 0; padding: 24px; text-align: center; color: var(--muted); }
