:root {
  color-scheme: dark;
  --bg: #080e1a;
  --surface: #111c30;
  --border: #293c58;
  --text: #e7edf8;
  --muted: #b0bed5;
  --accent: #a9d4ff;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  line-height: 1.6;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); }
a { color: var(--accent); text-underline-offset: .2em; }
a:hover { color: white; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible { outline: 3px solid #ffd38a; outline-offset: 4px; }
header { border-bottom: 1px solid var(--border); padding: 1.4rem max(1.2rem, calc((100% - 1280px) / 2)); background: #0c1424; }
.brand { display: inline-block; font-size: 1.5rem; color: var(--text); font-weight: 700; text-decoration: none; overflow-wrap: anywhere; }
nav { display: flex; flex-wrap: wrap; gap: .4rem 1.4rem; margin-top: .8rem; }
nav a { text-decoration: none; padding: .3rem 0; }
nav a[aria-current] { color: white; border-bottom: 2px solid var(--accent); }
main { max-width: 1280px; margin: auto; padding: 2rem 1.2rem 4rem; min-height: 65vh; }
footer { padding: 2rem 1.2rem; text-align: center; border-top: 1px solid var(--border); color: var(--muted); }
h1 { font-size: clamp(2rem, 5vw, 3.4rem); line-height: 1.2; overflow-wrap: anywhere; }
h2 { line-height: 1.3; margin-top: 2rem; }
h3 { margin: 0 0 .4rem; font-size: 1.05rem; overflow-wrap: anywhere; }
p { max-width: 85ch; }
.hero { display: flex; align-items: center; gap: 3rem; padding: 3rem 0; background: radial-gradient(circle at 80% 15%, #a9d4ff 0 1px, transparent 2px), radial-gradient(circle at 55% 80%, #b0bed5 0 1px, transparent 2px), radial-gradient(ellipse at top right, #203357 0%, transparent 65%); }
.hero-copy { flex: 1; min-width: 0; }
.hero h1 { max-width: 28ch; font-size: clamp(1.75rem, 3.5vw, 2.75rem); margin: .5rem 0 1.5rem; letter-spacing: -.025em; }
.hero-copy > p:not(.eyebrow) { color: var(--muted); font-size: 1.1rem; }
.hero-image { flex: 1; min-width: 0; margin: 0; overflow: hidden; border: 1px solid var(--border); border-radius: 1rem; background: #030710; box-shadow: 0 1rem 3rem #0005; }
.hero-image > a { display: block; }
.hero-image img { display: block; width: 100%; height: clamp(240px, 30vw, 420px); object-fit: contain; }
.hero-image figcaption { display: grid; gap: .25rem; padding: 1.2rem; background: var(--surface); }
.hero-image figcaption > a { font-size: 1.2rem; font-weight: 600; overflow-wrap: anywhere; }
.hero-image figcaption > span:last-child { color: var(--muted); font-size: .88rem; }
.archive-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .5rem 1rem; margin: 0 0 2rem; padding: .65rem .8rem; border: 1px solid var(--border); border-radius: .65rem; background: var(--surface); }
.archive-stats > div { display: flex; flex-direction: column; align-items: flex-start; gap: .15rem; padding: .25rem .35rem; min-width: 0; }
.archive-stats dt { font-size: .85rem; }
.archive-stats dd { margin: 0; font-size: 1.2rem; font-weight: 700; color: var(--accent); }
.eyebrow { text-transform: uppercase; letter-spacing: .2em; font-size: .8rem; color: var(--accent); }
.summary { color: var(--muted); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: 1.2rem; }
.card, .panel { background: var(--surface); border: 1px solid var(--border); border-radius: .65rem; overflow: hidden; }
.card a { display: block; height: 100%; text-decoration: none; color: var(--text); }
.card a:hover { background: #192943; }
.card img { display: block; width: 100%; height: 220px; object-fit: contain; background: #030710; }
.card-body, .panel { padding: 1.1rem; }
.card p { margin: 0; color: var(--muted); font-size: .88rem; }
.panel h2 { margin-top: 0; }
section { margin-bottom: 2.2rem; }
.section-links { display: flex; flex-wrap: wrap; gap: .8rem; margin: 1.5rem 0; }
.button, button { display: inline-block; border: 1px solid #597b9f; border-radius: .4rem; padding: .65rem 1rem; background: #183655; color: white; text-decoration: none; cursor: pointer; font: inherit; }
.button:hover, button:hover { background: #245078; }
.button-secondary { background: transparent; }
.notice { padding: 1rem; background: var(--surface); border-left: 3px solid var(--accent); }
.full-image { display: block; max-width: 100%; width: auto; max-height: none; height: auto; margin: 1rem auto; }
dl { display: grid; grid-template-columns: minmax(100px, 190px) 1fr; gap: .5rem 1rem; }
dt { color: var(--muted); }
dd { margin: 0; overflow-wrap: anywhere; }
.preserve { white-space: pre-wrap; }
.orbital-parameters { max-width: 100%; white-space: nowrap; overflow-x: auto; }
.mpc-observations { max-width: 100%; overflow-x: auto; padding: 1rem; background: var(--surface); border: 1px solid var(--border); border-radius: .4rem; font-size: .85rem; }
.orbital-parameters:focus-visible, .mpc-observations:focus-visible { outline: 3px solid #ffd38a; outline-offset: 4px; }
label { display: block; margin: .7rem 0 .3rem; }
input, select { background: var(--surface); color: var(--text); border: 1px solid #6e829f; padding: .7rem; border-radius: .35rem; font: inherit; }
input { width: 100%; min-width: 0; }
.search-controls { display: flex; gap: .6rem; max-width: 800px; }
.result { border-bottom: 1px solid var(--border); padding: 1rem 0; }
.result h2 { font-size: 1.15rem; margin: 0; }
.result p { margin: .3rem 0; color: var(--muted); overflow-wrap: anywhere; }
.skip { position: absolute; left: 1rem; top: -100px; padding: .6rem; background: var(--surface); z-index: 2; }
.skip:focus { top: 1rem; }
@media (min-width: 1100px) {
  .archive-stats { grid-template-columns: repeat(7, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .hero { flex-direction: column; align-items: stretch; gap: 1.5rem; padding: 1.5rem 0; }
  .hero-image img { height: auto; max-height: 420px; }
}
@media (max-width: 560px) {
  main { padding-top: 1rem; }
  dl { grid-template-columns: 1fr; gap: .2rem; }
  dd { margin-bottom: .7rem; }
  .archive-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .archive-stats dd { margin-bottom: 0; }
  .search-controls { flex-wrap: wrap; }
  .search-controls button { width: 100%; }
}
