@font-face {
  font-family: "IBM Plex Mono";
  src: url("./assets/fonts/ibm-plex-mono.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Departure Mono";
  src: url("./assets/fonts/departure-mono.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --background: #050403;
  --panel: #080502;
  --phosphor: #ffd08a;
  --amber: #ffc04a;
  --signal: #ffb000;
  --muted: #dfa758;
  --line: rgb(255 176 44 / 40%);
  --line-strong: rgb(255 182 57 / 73%);
  --glow: rgb(255 156 30 / 40%);
  --display-glow: 0 0 2px rgb(255 198 93 / 52%), 0 0 11px var(--glow), 0 0 16px rgb(255 142 27 / 18%);
  --data-glow: 0 0 2px rgb(255 188 72 / 32%), 0 0 8px rgb(255 164 41 / 30%);
  --divider-glow: 0 1px 7px rgb(255 167 36 / 23%);
  --raster-opacity: 2.2%;
  --raster: repeating-linear-gradient(0deg, rgb(255 169 52 / var(--raster-opacity)) 0 1px, transparent 1px 4px);
  --gutter: clamp(1rem, calc(29vw - 14rem), 10.4vw);
  --header-gutter: clamp(1rem, 2.8vw, 2.5rem);
  --terminal: "Departure Mono", "IBM Plex Mono", monospace;
  --mono: "IBM Plex Mono", ui-monospace, "Courier New", monospace;
  background: var(--background);
  color: var(--amber);
  font-family: var(--mono);
  font-synthesis: none;
  line-height: 1.5;
}

*, *::before, *::after { box-sizing: border-box; }
body, h1, h2, p, figure { margin: 0; }

.terminal-brand, h1, h2, .percentage, .target-line strong, .satellite-count strong {
  font-family: var(--terminal);
  font-weight: 400;
}

body {
  min-height: 100vh;
  background-image: var(--raster), radial-gradient(ellipse at 50% 13%, rgb(255 153 33 / 2%), transparent 67%);
}

.shell {
  width: min(72rem, calc(100% - var(--gutter) * 2));
  margin: clamp(1.5rem, 2.3vw, 2.125rem) auto 0;
}

.scroll-test-notice {
  margin-bottom: .875rem;
  color: var(--muted);
  font-size: .875rem;
}

.terminal-header {
  border-bottom: 1px solid var(--line-strong);
  box-shadow: var(--divider-glow);
}

.terminal-brand {
  display: flex;
  align-items: center;
  gap: .875rem;
  min-height: clamp(2.75rem, 3.55vw, 3.25rem);
  padding: .5rem var(--header-gutter);
  color: var(--amber);
  font-size: clamp(1rem, 1.56vw, 1.25rem);
  line-height: 1.15;
  text-shadow: var(--display-glow);
}

.terminal-brand svg {
  flex: none;
  color: var(--signal);
  filter: drop-shadow(0 0 2px var(--glow)) drop-shadow(0 0 6px var(--glow));
}

h1 {
  margin-bottom: clamp(1.25rem, 1.65vw, 1.5rem);
  color: var(--phosphor);
  font-size: clamp(1.5rem, 3.125vw, 2.75rem);
  line-height: 1.06;
  letter-spacing: -.012em;
  text-shadow: var(--display-glow);
}

.heading-phrase { white-space: nowrap; }

.cursor {
  display: inline-block;
  width: .30em;
  height: .69em;
  margin-inline-start: .25em;
  background: var(--signal);
  box-shadow: 0 0 9px var(--glow);
}

@keyframes cursor-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

@media (prefers-reduced-motion: no-preference) {
  .cursor { animation: cursor-blink 1s step-end 4; }
  body[data-motion="playing"] .cursor { animation-iteration-count: infinite; }
  body[data-motion="paused"] .cursor { animation: none; }
}

.capacity-panel {
  padding-block: clamp(.875rem, 1.25vw, 1.125rem);
  padding-inline: clamp(1.5rem, 2vw, 1.875rem);
  border: 1px solid var(--phosphor);
  border-radius: .75rem;
  background: var(--raster), var(--panel);
  box-shadow: 0 0 0 1px rgb(255 172 38 / 24%), 0 0 5px rgb(255 176 44 / 42%), 0 0 18px rgb(255 144 25 / 22%), inset 0 0 12px rgb(255 144 25 / 11%);
}

.capacity-readout {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: clamp(.625rem, .95vw, .875rem);
}

.percentage {
  color: var(--phosphor);
  font-size: clamp(2.75rem, 5vw, 4.375rem);
  line-height: .96;
  font-variant-numeric: tabular-nums;
  letter-spacing: -.035em;
  text-shadow: var(--display-glow);
  padding-inline-start: .5rem;
}

.target {
  display: grid;
  flex: none;
  gap: .1875rem;
  padding-inline-start: clamp(1.5rem, 2.4vw, 2.5rem);
  border-inline-start: 1px solid var(--line-strong);
  text-align: right;
  font-size: clamp(.9375rem, 1.38vw, 1.1875rem);
  line-height: 1.3;
  text-shadow: var(--data-glow);
}

.target-line { color: var(--muted); white-space: nowrap; }

.target-line strong {
  color: var(--phosphor);
  font-size: clamp(1.9375rem, 2.6vw, 2.375rem);
  line-height: 1.1;
  letter-spacing: -.035em;
  text-shadow: var(--display-glow);
}

.capacity-track {
  position: relative;
  overflow: hidden;
  height: clamp(1.4375rem, 1.8vw, 1.625rem);
  border: 1px solid rgb(255 194 76 / 88%);
  border-radius: .375rem;
  background: var(--background);
  box-shadow: inset 0 0 9px rgb(255 159 25 / 25%), 0 0 7px rgb(255 167 38 / 36%);
}

.capacity-fill { height: 100%; background: rgb(255 176 0 / 52%); }

.capacity-track.has-progress::after {
  position: absolute;
  inset-block: 3px;
  inset-inline-start: 3px;
  width: 2px;
  background: var(--phosphor);
  box-shadow: 0 0 4px var(--phosphor), 0 0 10px var(--glow);
  content: "";
  pointer-events: none;
}

.capacity-caption {
  margin-top: .5rem;
  color: var(--muted);
  font-size: .875rem;
  text-shadow: var(--data-glow);
}

.orbit-section {
  --globe-width: min(84%, clamp(19.75rem, 24.5vw, 22rem));
  display: grid;
  grid-template:
    "news globe" auto
    "news count" auto / minmax(0, 1.37fr) minmax(0, 1fr);
  column-gap: clamp(2rem, 6vw, 5.5rem);
  row-gap: .5rem;
  margin-block: clamp(.75rem, 1.1vw, 1rem) clamp(1rem, 1.4vw, 1.125rem);
}

.satellite-count {
  grid-area: count;
  justify-self: center;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
}

.count-icon {
  flex: none;
  width: 4.5rem;
  height: 4.125rem;
  color: var(--signal);
  filter: drop-shadow(0 0 2px var(--glow)) drop-shadow(0 0 6px var(--glow));
}

.satellite-count strong {
  display: block;
  color: var(--phosphor);
  font-size: clamp(2.75rem, 3.5vw, 3.25rem);
  line-height: .97;
  font-variant-numeric: tabular-nums;
  text-shadow: var(--display-glow);
}

.satellite-count span span { font-size: .9375rem; text-shadow: var(--data-glow); }

.globe {
  grid-area: globe;
  position: relative;
  justify-self: center;
  width: var(--globe-width);
  color: var(--signal);
}

.globe > svg {
  display: block;
  width: 100%;
  overflow: visible;
}

.globe.has-motion > svg { opacity: 0; }

.orbit-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.orbit-toggle {
  position: absolute;
  inset-inline-end: 0;
  inset-block-end: 0;
  width: 2.75rem;
  height: 2.75rem;
  place-items: center;
  border: 0;
  padding: 0;
  color: var(--muted);
  background: none;
  cursor: pointer;
}

.orbit-toggle:not([hidden]) { display: grid; }
.orbit-toggle:hover, .orbit-toggle:focus-visible { color: var(--phosphor); }
.orbit-toggle svg { width: 1rem; height: 1rem; }
.orbit-toggle[data-paused="true"] .orbit-pause, .orbit-toggle[data-paused="false"] .orbit-play { display: none; }

.rear-orbits {
  stroke: currentColor;
  stroke-width: 1;
  opacity: .73;
}

.globe-surface { fill: #0c0802; }

.globe-grid {
  fill: none;
  stroke: currentColor;
  stroke-width: .72;
  stroke-dasharray: 1.2 2.2;
  opacity: .60;
}

.globe-land {
  fill: url(#land-dots);
  fill-opacity: .9;
  stroke: currentColor;
  stroke-width: .95;
  stroke-linejoin: round;
}

.globe-limb {
  stroke: var(--phosphor);
  stroke-width: 1.85;
  filter: drop-shadow(0 0 4px rgb(255 174 40 / 69%)) drop-shadow(0 0 9px rgb(255 150 18 / 45%));
}

.globe-atmosphere { fill: url(#limb-light); }

.front-orbits {
  stroke: currentColor;
  stroke-width: 1.15;
  stroke-linecap: round;
}

.dashed-orbit { stroke-dasharray: 4 4; }
.satellite-illustration { color: var(--amber); filter: drop-shadow(0 0 3px var(--glow)); }

h2 {
  color: var(--phosphor);
  font-size: 1.375rem;
  line-height: 1.1;
  letter-spacing: .045em;
  text-shadow: var(--display-glow);
  text-transform: uppercase;
}

.news-section {
  grid-area: news;
  align-self: center;
  margin-block-end: 1rem;
}
.scroll-frame {
  --fade-depth: 1.1875rem;
  --fade-gutter: .25rem;
  --scroll-control-width: 0px;
  position: relative;
  min-width: 0;
  isolation: isolate;
}

.scroll-frame::before,
.scroll-frame::after {
  position: absolute;
  z-index: 2;
  inset-inline: 0 calc(var(--scrollbar-inset, 0px) + var(--fade-gutter) + var(--scroll-control-width));
  block-size: var(--fade-depth);
  pointer-events: none;
  transition: opacity 100ms linear;
  content: "";
}

.scroll-frame::before {
  inset-block-start: var(--pinned-header-height, 0px);
  background: linear-gradient(to bottom, rgb(5 4 3 / 94%), rgb(5 4 3 / 55%) 36%, transparent);
  opacity: var(--fade-top, 0);
}

.scroll-frame::after {
  inset-block-end: var(--scrollbar-offset, 0px);
  background: linear-gradient(to top, rgb(5 4 3 / 94%), rgb(5 4 3 / 55%) 36%, transparent);
  opacity: var(--fade-bottom, 0);
}

.scroll-viewport {
  overflow: auto;
  scroll-padding-block: var(--fade-depth);
  scroll-behavior: smooth;
  scrollbar-color: #ffb536 #211403;
  scrollbar-width: thin;
}

.scroll-viewport:focus-visible { outline-offset: -2px; }

@supports selector(::-webkit-scrollbar) {
  .scroll-viewport { scrollbar-color: auto; scrollbar-width: auto; }
}

.scroll-viewport::-webkit-scrollbar { width: 6px; height: 6px; }
.scroll-viewport::-webkit-scrollbar-track { border-radius: 3px; background: #211403; }
.scroll-viewport::-webkit-scrollbar-thumb {
  border-radius: 3px;
  background: #ffb536;
  box-shadow: inset 0 0 2px rgb(255 219 145 / 80%);
}

.has-scroll-control {
  --scroll-control-width: 1rem;
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--scroll-control-width);
}

.has-scroll-control .scroll-viewport { scrollbar-width: none; }

@supports selector(::-webkit-scrollbar) {
  .has-scroll-control .scroll-viewport { scrollbar-width: auto; }
  .has-scroll-control .scroll-viewport::-webkit-scrollbar { width: 0; }
}

.scroll-control {
  --scrollbar-thickness: 4px;
  --track-color: #432902;
  --thumb-color: #ffb536;
  position: absolute;
  /* Position in the parent frame, regardless of the slider's writing mode. */
  top: 0;
  right: 0;
  width: var(--scroll-control-width);
  height: calc(100% - var(--scrollbar-offset, 0px));
  margin: 0;
  writing-mode: vertical-lr;
  direction: ltr;
  appearance: none;
  background: linear-gradient(var(--track-color), var(--track-color)) center / var(--scrollbar-thickness) 100% no-repeat;
  border: 0;
  cursor: pointer;
  touch-action: none;
}

.scroll-control:disabled { --thumb-color: #80541c; cursor: default; }
.scroll-control:focus-visible { outline-offset: 0; }

.scroll-control::-webkit-slider-runnable-track { width: var(--scrollbar-thickness); height: 100%; background: transparent; }
.scroll-control::-moz-range-track { width: var(--scrollbar-thickness); height: 100%; background: transparent; }

.scroll-control::-webkit-slider-thumb {
  appearance: none;
  width: var(--scrollbar-thickness);
  height: var(--scroll-thumb-height);
  background: var(--thumb-color);
  border: 0;
  border-radius: 3px;
}

.scroll-control::-moz-range-thumb {
  width: var(--scrollbar-thickness);
  height: var(--scroll-thumb-height);
  background: var(--thumb-color);
  border: 0;
  border-radius: 3px;
}

.news-frame { --fade-gutter: 1.125rem; margin-top: .5rem; }
.news-scroll {
  --news-row-height: 3.75rem;
  max-block-size: calc(3 * var(--news-row-height));
  overflow-x: hidden;
  padding-inline-end: var(--fade-gutter);
}

.news-list { margin: 0; padding: 0; list-style: none; }
.news-list li {
  block-size: var(--news-row-height);
  padding-block: .1875rem;
  padding-inline: .625rem;
}
.news-list li + li { border-block-start: 1px solid var(--line); }

.news-list time {
  display: block;
  color: var(--muted);
  font-size: .875rem;
  line-height: .9375rem;
  text-shadow: var(--data-glow);
  text-transform: uppercase;
}

.news-item-content {
  display: flex;
  align-items: flex-start;
  gap: .375rem;
}

.news-summary {
  display: block;
  display: -webkit-box;
  min-width: 0;
  max-block-size: 2.375rem;
  overflow: hidden;
  overflow-wrap: anywhere;
  line-height: 1.1875rem;
  text-shadow: var(--data-glow);
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.news-summary:focus-within { outline: 2px solid var(--amber); outline-offset: -2px; }

.news-launch {
  flex: none;
  width: 1.625em;
  height: 1.1875em;
  color: var(--signal);
  filter: drop-shadow(0 0 3px var(--glow));
}

a {
  color: inherit;
  text-decoration-color: var(--muted);
  text-decoration-thickness: 1px;
  text-underline-offset: .18em;
}

.news-list a {
  text-decoration-style: dotted;
  text-decoration-color: var(--line);
}

a, summary { transition: color 140ms ease; }

a:hover, summary:hover { color: #ffda88; }
a:hover, .news-list a:hover { text-decoration-color: currentColor; }

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

.satellites-section { margin-bottom: 3.25rem; }
.table-frame { --fade-gutter: clamp(.25rem, 1.45vw, 1.375rem); margin-top: .5rem; }
.table-wrap {
  --table-header-height: 2.5rem;
  --table-row-height: 2.75rem;
  max-block-size: calc(var(--table-header-height) + 5 * var(--table-row-height));
  padding-inline-end: var(--fade-gutter);
  scroll-padding-block-start: calc(var(--pinned-header-height, var(--table-header-height)) + var(--fade-depth));
}

table {
  width: 100%;
  min-width: 34rem;
  border-collapse: separate;
  border-spacing: 0;
  text-align: left;
}

th, td {
  padding: .5rem .875rem;
  border-bottom: 1px solid var(--line);
  text-shadow: var(--data-glow);
}

thead {
  position: sticky;
  z-index: 1;
  inset-block-start: 0;
  background: var(--background);
  box-shadow: var(--divider-glow);
}

thead th {
  height: var(--table-header-height);
  background: var(--background);
  color: var(--signal);
  border-bottom-color: var(--line-strong);
  font-size: .9375rem;
  letter-spacing: .055em;
  text-transform: uppercase;
}

th { font-weight: 400; }
tbody tr { height: var(--table-row-height); }
thead th:first-child { width: 34%; }
th:last-child, td:last-child {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
tbody th a:hover { text-shadow: var(--display-glow); }
td.empty, .news-list .empty { color: var(--muted); text-align: left; }

footer {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 1rem 2rem;
  border-top: 1px solid var(--line-strong);
  color: var(--muted);
  font-size: .875rem;
  text-shadow: var(--data-glow);
}

details { max-width: 29rem; }

summary {
  cursor: pointer;
  color: var(--amber);
  text-align: right;
}

summary::marker { color: var(--signal); }

.source-note { margin-top: .75rem; }
.source-note p + p { margin-top: .5rem; }

::selection { background: var(--amber); color: var(--background); }

@media (max-width: 50rem) {
  .orbit-section {
    --globe-width: min(100%, 280px);
    grid-template: "globe" "count" "news" / minmax(0, 1fr);
    row-gap: .875rem;
    margin-block: clamp(1.5rem, 2.8vw, 2.5rem) clamp(2.25rem, 3vw, 2.75rem);
  }

  .satellite-count { width: var(--globe-width); gap: 1rem; }
  .count-icon { width: 4rem; height: 4rem; }
  .news-section { margin-block: .625rem 0; }
}

@media (max-width: 42rem) {
  .table-frame { --fade-gutter: .25rem; }
  .table-wrap { --table-header-height: 3.25rem; }
  table { min-width: 21rem; }
  th, td { padding-inline: .3125rem; }
  thead th { font-size: .875rem; line-height: 1.25; }
  thead th:first-child { width: 32%; }
  tbody th, td { font-size: .9375rem; }
  tbody th {
    min-width: 6.375rem;
    overflow-wrap: anywhere;
  }
}

@media (max-width: 34rem) {
  :root { --raster-opacity: 1.8%; }
  .shell { margin-top: 1.5rem; }
  h1 { font-size: 1.5rem; line-height: 1.14; margin-bottom: 1.25rem; }
  .capacity-panel { padding: .875rem 1rem; }

  .capacity-readout {
    flex-direction: column;
    align-items: flex-start;
    gap: .625rem;
  }

  .percentage { font-size: clamp(2.3125rem, 11.3vw, 3.125rem); padding-inline-start: 0; }
  .news-list li { padding-inline: .3125rem; }

  .target {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    gap: .375rem .625rem;
    padding-block: .625rem 0;
    padding-inline: 0;
    border-inline-start: 0;
    border-block-start: 1px solid var(--line);
    font-size: .875rem;
    text-align: left;
  }

  .target-line strong { font-size: 1.375rem; }
  .current-capacity { min-width: 0; }
  .satellites-section { margin-bottom: 2rem; }
  footer { flex-direction: column; gap: .625rem; }
  summary { text-align: left; }
}

@media (prefers-reduced-motion: reduce) {
  a, summary, .scroll-frame::before, .scroll-frame::after { transition: none; }
  .scroll-viewport { scroll-behavior: auto; }
}

@media (prefers-contrast: more), (forced-colors: active) {
  :root {
    --raster: none;
    --line: var(--amber);
    --display-glow: none;
    --data-glow: none;
    --divider-glow: none;
  }
  body { background-image: none; }
  .capacity-panel, .capacity-track, .cursor, .capacity-track.has-progress::after { box-shadow: none; }
  .terminal-brand svg, .globe-limb, .count-icon, .satellite-illustration, .news-launch { filter: none; }
  .globe-atmosphere { display: none; }
  .scroll-frame::before, .scroll-frame::after { display: none; }
}

@media (forced-colors: active) {
  .scroll-control {
    --track-color: GrayText;
    --thumb-color: Highlight;
    forced-color-adjust: none;
  }
  .scroll-control:disabled { --thumb-color: GrayText; }
  .cursor, .capacity-fill, .capacity-track.has-progress::after {
    background: CanvasText;
    forced-color-adjust: none;
  }
}
