:root {
  --sat-navy: #102b55;
  --sat-blue: #1768a7;
  --sat-cyan: #1aa6b2;
  --sat-sky: #eaf7fb;
  --sat-ink: #16324d;
  --sat-muted: #5b6f84;
  --sat-line: rgba(30, 83, 126, .18);
  --sat-card: rgba(255, 255, 255, .96);
  --sat-accent: #f5b942;
}

* { box-sizing: border-box; }

body.satellite-page {
  margin: 0;
  color: var(--sat-ink);
  background:
    radial-gradient(circle at 8% 5%, rgba(74, 181, 200, .18), transparent 28rem),
    linear-gradient(180deg, #eef8fb 0%, #f8fbfd 54%, #eef5f8 100%);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.sat-site-head {
  position: relative;
  z-index: 1100;
  border-bottom: 1px solid rgba(255, 255, 255, .18);
  background: linear-gradient(120deg, #152f66, #087f8c);
  box-shadow: 0 8px 28px rgba(16, 43, 85, .18);
}

.sat-site-nav {
  width: min(1440px, calc(100% - 32px));
  min-height: 68px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.sat-brand,
.sat-site-links a {
  color: #fff;
  text-decoration: none;
  font-weight: 800;
}

.sat-brand { display: inline-flex; align-items: center; gap: 10px; font-size: 1.05rem; }
.sat-brand img { width: 40px; height: 40px; padding: 5px; border-radius: 12px; background: rgba(255,255,255,.92); }
.sat-site-links { display: flex; align-items: center; gap: 8px; }
.sat-site-links a { padding: 10px 13px; border-radius: 999px; background: rgba(255,255,255,.12); }
.sat-site-links a:hover,
.sat-site-links a:focus-visible { background: rgba(255,255,255,.24); outline: none; }

.sat-main { width: min(1440px, calc(100% - 28px)); margin: 0 auto; padding: 18px 0 42px; }

.sat-breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin: 2px 4px 15px;
  color: #5a6f82;
  font-size: .88rem;
  font-weight: 700;
}
.sat-breadcrumbs a { color: #245b91; }

.sat-hero {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(290px, .55fr);
  gap: clamp(22px, 5vw, 70px);
  align-items: end;
  padding: clamp(26px, 4.5vw, 58px);
  border-radius: 28px;
  color: #fff;
  background:
    radial-gradient(circle at 87% 18%, rgba(255, 206, 92, .92) 0 7%, rgba(255, 206, 92, .13) 7.2% 15%, transparent 15.2%),
    linear-gradient(125deg, #122f65 0%, #176aa0 53%, #078796 100%);
  box-shadow: 0 22px 55px rgba(25, 74, 113, .22);
}
.sat-hero::before,
.sat-hero::after { content: ""; position: absolute; border: 1px solid rgba(255,255,255,.18); border-radius: 50%; pointer-events: none; }
.sat-hero::before { width: 420px; height: 420px; top: -290px; right: 10%; }
.sat-hero::after { width: 580px; height: 190px; left: -150px; bottom: -150px; transform: rotate(-8deg); }
.sat-hero > * { position: relative; z-index: 1; }
.sat-eyebrow { margin: 0 0 10px; color: #bfeef2; font-size: .78rem; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; }
.sat-hero h1 { max-width: 900px; margin: 0; font-size: clamp(2rem, 5vw, 4.25rem); line-height: 1.02; letter-spacing: -.04em; }
.sat-hero-copy { max-width: 850px; margin: 18px 0 0; color: #e7f5fb; font-size: clamp(1rem, 1.8vw, 1.18rem); line-height: 1.65; }
.sat-hero-facts { display: grid; gap: 10px; margin: 0; }
.sat-hero-facts div { padding: 14px 16px; border: 1px solid rgba(255,255,255,.2); border-radius: 16px; background: rgba(5,35,70,.2); backdrop-filter: blur(8px); }
.sat-hero-facts dt { color: #bfeef2; font-size: .72rem; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.sat-hero-facts dd { margin: 4px 0 0; font-weight: 800; line-height: 1.35; }

.sat-layout { display: grid; grid-template-columns: minmax(280px, 370px) minmax(0, 1fr); gap: 18px; margin-top: 20px; align-items: start; }
.sat-layout > * { min-width: 0; }
.sat-selector,
.sat-map-card,
.sat-info-card {
  border: 1px solid var(--sat-line);
  border-radius: 24px;
  background: var(--sat-card);
  box-shadow: 0 14px 35px rgba(24, 65, 96, .1);
}
.sat-selector { padding: 18px; }
.sat-selector h2,
.sat-map-title h2 { margin: 0; color: var(--sat-navy); }
.sat-selector-intro { margin: 8px 0 15px; color: var(--sat-muted); font-size: .91rem; line-height: 1.55; }

.sat-category-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
  padding: 5px;
  border-radius: 15px;
  background: #edf4f8;
}
.sat-category-tab {
  min-height: 48px;
  padding: 8px 5px;
  border: 0;
  border-radius: 11px;
  color: #476078;
  background: transparent;
  font: inherit;
  font-size: .77rem;
  font-weight: 900;
  line-height: 1.2;
  cursor: pointer;
}
.sat-category-tab[aria-selected="true"] { color: #fff; background: linear-gradient(135deg, #2f4b91, #148894); box-shadow: 0 8px 17px rgba(32,83,128,.22); }
.sat-category-tab:focus-visible { outline: 3px solid rgba(245, 185, 66, .55); outline-offset: 2px; }

.sat-layer-group { display: grid; gap: 8px; margin-top: 13px; }
.sat-layer-group[hidden] { display: none; }
.sat-layer-button {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 18px;
  gap: 10px;
  align-items: center;
  width: 100%;
  min-height: 67px;
  padding: 10px 11px;
  border: 1px solid #d7e4ed;
  border-radius: 15px;
  color: var(--sat-ink);
  background: #fff;
  text-align: left;
  font: inherit;
  cursor: pointer;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.sat-layer-button:hover { transform: translateY(-1px); border-color: #66a9c0; box-shadow: 0 8px 20px rgba(33,91,128,.12); }
.sat-layer-button[aria-pressed="true"] { border-color: #188b9a; background: linear-gradient(135deg, #eef9fb, #f4f7ff); box-shadow: inset 4px 0 #168895, 0 8px 20px rgba(33,91,128,.12); }
.sat-layer-button:focus-visible { outline: 3px solid rgba(23,104,167,.25); outline-offset: 2px; }
.sat-layer-icon { display: grid; width: 44px; height: 44px; place-items: center; border-radius: 13px; color: #fff; background: linear-gradient(145deg, #2b5ca6, #16a0a8); font-size: 1.25rem; }
.sat-layer-button strong { display: block; color: #1c3d60; font-size: .9rem; line-height: 1.25; }
.sat-layer-button small { display: block; margin-top: 3px; color: #6a7d8e; font-size: .74rem; line-height: 1.35; }
.sat-layer-arrow { color: #5c7892; font-weight: 900; }

.sat-selected-note { margin-top: 14px; padding: 14px; border: 1px solid #dbe9ef; border-radius: 15px; background: #f5fafc; }
.sat-selected-note strong { display: block; color: var(--sat-navy); }
.sat-selected-note p { margin: 6px 0 0; color: var(--sat-muted); font-size: .83rem; line-height: 1.52; }

.sat-map-card { min-width: 0; overflow: hidden; }
.sat-map-head { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 16px 18px; }
.sat-map-title { min-width: 0; }
.sat-map-title .sat-eyebrow { color: #2e7798; }
.sat-map-title h2 { font-size: clamp(1.15rem, 2.5vw, 1.65rem); overflow-wrap: anywhere; }
.sat-status { flex: 0 0 auto; padding: 7px 11px; border-radius: 999px; color: #17616b; background: #e2f5f3; font-size: .75rem; font-weight: 900; }
.sat-status[data-tone="loading"] { color: #745215; background: #fff3d3; }
.sat-status[data-tone="error"] { color: #8d2939; background: #fde8ec; }

.sat-map-shell { position: relative; min-height: 590px; background: #dceaf0; isolation: isolate; }
#satellite-map { width: 100%; height: clamp(590px, 67vh, 790px); background: #dceaf0; }
.sat-map-shell:fullscreen,
.sat-map-shell.is-pseudo-fullscreen { position: fixed; inset: 0; z-index: 9999; width: 100vw; height: 100dvh; min-height: 100dvh; border-radius: 0; }
.sat-map-shell:fullscreen #satellite-map,
.sat-map-shell.is-pseudo-fullscreen #satellite-map { height: 100dvh; min-height: 100dvh; }
body.sat-fullscreen-open { overflow: hidden; }

.sat-fullscreen {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 900;
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border: 2px solid #fff;
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(145deg, #21488f, #0e8792);
  box-shadow: 0 8px 22px rgba(8,36,70,.3);
  font-size: 1.35rem;
  cursor: pointer;
}
.sat-fullscreen:focus-visible { outline: 3px solid var(--sat-accent); outline-offset: 3px; }

.sat-map-overlay { position: absolute; inset: 0; z-index: 850; display: grid; place-items: center; padding: 20px; background: rgba(231,243,247,.7); backdrop-filter: blur(3px); }
.sat-map-overlay[hidden] { display: none; }
.sat-map-overlay-card { max-width: 390px; padding: 18px 20px; border: 1px solid rgba(31,82,122,.18); border-radius: 18px; background: rgba(255,255,255,.95); box-shadow: 0 15px 35px rgba(18,50,75,.18); text-align: center; }
.sat-spinner { width: 38px; height: 38px; margin: 0 auto 10px; border: 4px solid #dbe9ef; border-top-color: #168895; border-radius: 50%; animation: sat-spin .85s linear infinite; }
.sat-map-overlay-card strong { display: block; color: var(--sat-navy); }
.sat-map-overlay-card p { margin: 7px 0 0; color: var(--sat-muted); font-size: .87rem; line-height: 1.48; }
@keyframes sat-spin { to { transform: rotate(360deg); } }

.sat-map-attribution {
  position: absolute;
  z-index: 820;
  left: 8px;
  bottom: 8px;
  max-width: calc(100% - 16px);
  padding: 4px 7px;
  border-radius: 7px;
  color: #213e5b;
  background: rgba(255,255,255,.88);
  font-size: .65rem;
  line-height: 1.25;
  pointer-events: none;
}

.sat-timeline { padding: 15px 18px 18px; border-top: 1px solid var(--sat-line); }
.sat-time-summary { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; margin-bottom: 10px; }
.sat-time-summary strong { color: var(--sat-navy); }
.sat-time-summary span { color: var(--sat-muted); font-size: .8rem; text-align: right; }
.sat-player { display: grid; grid-template-columns: 46px 52px 46px minmax(120px, 1fr); gap: 9px; align-items: center; }
.sat-player button {
  min-width: 46px;
  min-height: 46px;
  border: 0;
  border-radius: 13px;
  color: #fff;
  background: linear-gradient(145deg, #2b5ca6, #148894);
  font: inherit;
  font-size: 1.15rem;
  font-weight: 900;
  cursor: pointer;
}
.sat-player button:disabled { opacity: .43; cursor: not-allowed; }
.sat-player button:focus-visible { outline: 3px solid rgba(245,185,66,.65); outline-offset: 2px; }
.sat-time-range { width: 100%; accent-color: #168895; cursor: pointer; }
.sat-time-range:disabled { cursor: not-allowed; }

.sat-legend { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 15px; align-items: center; margin: 0 18px 18px; padding: 13px 15px; border: 1px solid #dae7ee; border-radius: 15px; background: #f6fafc; }
.sat-legend strong { display: block; color: var(--sat-navy); font-size: .84rem; }
.sat-legend p { margin: 4px 0 0; color: var(--sat-muted); font-size: .77rem; line-height: 1.45; }
.sat-legend img { display: block; max-width: min(320px, 38vw); max-height: 82px; border-radius: 8px; background: #fff; }
.sat-legend img[hidden] { display: none; }

.sat-info-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 20px; }
.sat-info-card { padding: clamp(18px, 2.5vw, 27px); }
.sat-info-card h2 { margin: 0 0 12px; color: var(--sat-navy); font-size: 1.18rem; }
.sat-info-card p,
.sat-info-card li { color: #536b7f; font-size: .91rem; line-height: 1.64; }
.sat-info-card p { margin: 0; }
.sat-info-card p + p { margin-top: 10px; }
.sat-info-card ul { margin: 0; padding-left: 20px; }
.sat-info-card a { color: #1768a7; font-weight: 750; }
.sat-caution { border-color: rgba(215,143,36,.3); background: linear-gradient(145deg, #fffef9, #fff7e7); }

.sat-footer { padding: 28px 16px 34px; color: #dcecf6; background: #112f55; text-align: center; }
.sat-footer a { color: #fff; font-weight: 750; }
.sat-footer p { margin: 8px auto; max-width: 1000px; line-height: 1.55; }
.sat-footer-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 16px; }

.satellite-page .leaflet-control-zoom a { width: 42px; height: 42px; line-height: 42px; color: #173f6a; }
.satellite-page .leaflet-control-attribution { display: none; }

@media (max-width: 1040px) {
  .sat-layout { grid-template-columns: 1fr; }
  .sat-selector { position: static; }
  .sat-layer-group { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sat-info-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sat-info-card:last-child { grid-column: 1 / -1; }
}

@media (max-width: 760px) {
  .sat-site-nav { width: min(100% - 18px, 1440px); min-height: 60px; }
  .sat-brand span { display: none; }
  .sat-site-links a { padding: 9px 10px; font-size: .8rem; }
  .sat-main { width: min(100% - 12px, 1440px); padding-top: 11px; }
  .sat-hero { grid-template-columns: 1fr; padding: 24px 18px; border-radius: 21px; }
  .sat-hero-facts { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
  .sat-hero-facts div { padding: 10px 8px; }
  .sat-hero-facts dd { font-size: .78rem; }
  .sat-layout { gap: 12px; margin-top: 12px; }
  .sat-selector { min-width: 0; max-width: 100%; padding: 13px; border-radius: 19px; }
  .sat-category-tabs { width: 100%; max-width: 100%; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .sat-category-tab { min-width: 0; min-height: 52px; padding-inline: 3px; font-size: .7rem; overflow-wrap: anywhere; }
  .sat-layer-group { grid-template-columns: 1fr 1fr; gap: 7px; }
  .sat-layer-button { grid-template-columns: 38px minmax(0,1fr); min-height: 66px; padding: 8px; }
  .sat-layer-icon { width: 38px; height: 38px; }
  .sat-layer-arrow,
  .sat-layer-button small { display: none; }
  .sat-map-card { border-radius: 19px; }
  .sat-map-head { align-items: flex-start; padding: 13px; }
  .sat-status { white-space: nowrap; }
  .sat-map-shell { min-height: 470px; }
  #satellite-map { height: 61vh; min-height: 470px; max-height: 680px; }
  .sat-timeline { padding: 13px; }
  .sat-player { grid-template-columns: 44px 48px 44px minmax(80px, 1fr); gap: 6px; }
  .sat-player button { min-width: 44px; min-height: 44px; }
  .sat-legend { grid-template-columns: 1fr; margin: 0 13px 13px; }
  .sat-legend img { max-width: 100%; }
  .sat-info-grid { grid-template-columns: 1fr; gap: 12px; margin-top: 12px; }
  .sat-info-card:last-child { grid-column: auto; }
}

@media (max-width: 430px) {
  .sat-site-links a:first-child { display: none; }
  .sat-hero-facts { grid-template-columns: 1fr; }
  .sat-layer-group { grid-template-columns: 1fr; }
  .sat-layer-button small { display: block; }
  .sat-layer-arrow { display: block; }
  .sat-layer-button { grid-template-columns: 40px minmax(0, 1fr) 16px; }
  .sat-time-summary { display: grid; gap: 4px; }
  .sat-time-summary span { text-align: left; }
  .sat-player { grid-template-columns: repeat(3, 1fr); }
  .sat-player .sat-time-range { grid-column: 1 / -1; min-height: 30px; }
}

@media (prefers-reduced-motion: reduce) {
  .sat-spinner { animation: none; }
  .sat-layer-button { transition: none; }
}
