/* orbit-lab page chrome.
 *
 * Everything drawn on the globe is canvas; this file styles the frame around
 * it. Colours come from the shell's custom properties so the page follows the
 * theme, and the canvas reads the SAME properties at draw time — see
 * orbitlab.js's readPalette. One source, two consumers, rather than a second
 * palette hard-coded in the script.
 */

.orbit-stage {
  margin: 1rem 0 0.5rem;
}

.orbit-canvas {
  display: block;
  width: 100%;
  max-width: 640px;
  height: auto;
  aspect-ratio: 1 / 1;
  margin: 0 auto;
  border-radius: 8px;
  background: var(--card-bg, #10141c);
  cursor: grab;
  touch-action: none;
}

.orbit-canvas:active {
  cursor: grabbing;
}

.orbit-status {
  margin: 0.5rem 0 0;
  font-size: 0.9rem;
  opacity: 0.85;
}

.orbit-readout {
  display: flex;
  flex-wrap: wrap;
  gap: 0 2rem;
  margin: 0.5rem 0 0;
}

.orbit-readout p {
  margin: 0.15rem 0;
  font-size: 0.9rem;
}

.orbit-figure {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  min-width: 4ch;
  display: inline-block;
}

.orbit-hint {
  font-size: 0.9rem;
  opacity: 0.8;
}

.orbit-controls p {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin: 0.6rem 0;
}

.orbit-label {
  font-weight: 600;
}

.orbit-rate[aria-pressed='true'] {
  outline: 2px solid var(--accent, #4da3ff);
  outline-offset: 1px;
}

.orbit-slider {
  flex: 1 1 12rem;
  min-width: 8rem;
  max-width: 22rem;
}

.orbit-chart {
  display: block;
  width: 100%;
  max-width: 640px;
  height: auto;
  aspect-ratio: 32 / 9;
  border-radius: 8px;
  background: var(--card-bg, #10141c);
}

/* The sieve button's running state — NO SPINNER, AND THAT IS A MEASURED
 * DECISION rather than a shortcut.
 *
 * A CSS spinner was built first: one span, a border and a border-radius,
 * currentColor so it needed no scheme rule, its box reserved with `visibility`
 * so the button could not resize under the cursor. Then it was watched.
 *
 * WHAT THE MEASUREMENT SHOWED. Both scans behind this button run synchronously
 * on the main thread, which is what makes the staged-against-exhaustive
 * comparison like-for-like and is not up for revision. Twelve clipped
 * screenshots of the spinner were taken across a 1.4-second blocked window in
 * HeadlessChrome 149.0.7827.55 on Linux x86_64, and ALL TWELVE WERE
 * BYTE-IDENTICAL — one distinct frame out of twelve. The rotation does not
 * survive the block: it freezes mid-turn.
 *
 * A frozen wheel is worse than no wheel. It is the visual vocabulary of a
 * crashed page, and it would be showing exactly when the page is working
 * hardest. So the rotation was dropped and the element with it, rather than
 * shipping a static ring that reads as a hang.
 *
 * What is left is the state itself, which needs no motion to be legible: the
 * label changes, the button is disabled, aria-busy is set, and this rule makes
 * the disabled state visible — css.css styles no :disabled at all, so without
 * it a disabled button is pixel-identical to a live one.
 */
.orbit-sieve--running {
  opacity: 0.65;
  cursor: progress;
}

.orbit-table {
  width: 100%;
  max-width: 640px;
  border-collapse: collapse;
  margin: 0.75rem 0;
}

.orbit-table caption {
  text-align: left;
  font-size: 0.9rem;
  opacity: 0.8;
  padding-bottom: 0.35rem;
}

.orbit-table th,
.orbit-table td {
  padding: 0.35rem 0.5rem;
  border-bottom: 1px solid var(--border, #2a3240);
  text-align: left;
}

.orbit-table td {
  font-variant-numeric: tabular-nums;
}

/* The globe is square and the readout wraps, so the only thing a narrow
 * viewport needs is for the controls to stop trying to sit on one line. The
 * canvas already scales by max-width. */
@media (max-width: 40rem) {
  .orbit-controls p {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.25rem;
  }

  .orbit-slider {
    max-width: 100%;
  }
}
