/* ============ Asteroid Tracker — shared base ============
   Loaded by every page before its own stylesheet: the colour tokens, the site
   navigation and footer, and focus rings. Page stylesheets hold layout only. */
:root {
  --bg: #07090f;
  --bg2: #0b0e17;
  --panel: #0e1220;
  --card: #121729;
  --line: #1e2540;
  --text: #d7ddee;
  --muted: #8591b3;
  --accent: #58c7ff;     /* icy blue — orbits, selection, playhead */
  --accent2: #2a7fff;
  --blue: #4da3ff;
  --hazard: #ff5470;     /* PHA / inside-Moon */
  --red: #ff5470;
  --warn: #ffb347;       /* amber */
  --green: #46e0c0;      /* teal — distant / safe / live */
  --moon: #c9d2e8;
  --rock: #b9a98f;
  --font: "SF Mono", "Cascadia Code", "JetBrains Mono", Menlo, Consolas, monospace;
}

/* keyboard focus: a visible ring on the dark navy (the browser default is a thin blue line) */
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------- site navigation: same links, labels and order on every page ---------- */
.site-nav { display: flex; align-items: center; gap: 6px; }
.site-nav a {
  font-family: var(--font); font-size: 12px; white-space: nowrap; text-decoration: none;
  color: var(--muted); padding: 6px 11px; border: 1px solid transparent; border-radius: 6px;
}
.site-nav a:hover { color: var(--accent); border-color: var(--line); text-decoration: none; }
.site-nav a[aria-current="page"] { color: var(--text); border-color: var(--line); background: rgba(88,199,255,.06); }
.site-nav a.primary { color: #06101c; background: var(--accent); border-color: var(--accent); font-weight: 700; }
.site-nav a.primary:hover { background: #7cd4ff; color: #06101c; }
.site-nav a.primary[aria-current="page"] { color: #06101c; }
/* phones: the whole menu stays reachable as a sideways-scrolling row */
@media (max-width: 640px) {
  .site-nav { overflow-x: auto; scrollbar-width: none; max-width: 100%; }
  .site-nav::-webkit-scrollbar { display: none; }
  .site-nav a { padding: 10px 12px; }
}

/* ---------- shared footer (catalog, profiles, guide, 404) ---------- */
.site-footer {
  max-width: 1100px; margin: 40px auto 0; padding: 22px 22px 48px;
  border-top: 1px solid var(--line); color: var(--muted); font-family: var(--font); font-size: 12px;
}
.site-footer nav { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-bottom: 10px; }
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--accent); }

/* links inside running text are underlined — colour alone doesn't set them apart */
p a:not([class]), figcaption a, li p a { text-decoration: underline; text-underline-offset: 2px; }

/* a button that reads as an inline link (acts on the page rather than navigating) */
button.linklike { background: none; border: none; padding: 0; font: inherit; color: var(--accent); cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }

/* skip link: hidden until focused from the keyboard */
.skip-link {
  position: absolute; left: 8px; top: -60px; z-index: 100; padding: 8px 14px; border-radius: 6px;
  background: var(--accent); color: #06101c; font-family: var(--font); font-size: 13px; font-weight: 700;
}
.skip-link:focus { top: 8px; text-decoration: none; }

/* visitors who ask the OS for less motion: stop CSS animation and smooth scrolling */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important; animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important; scroll-behavior: auto !important;
  }
}
