/* Roman Atlas — design system. Dark-only by design (deep-space imagery), solid overlays (no backdrop blur). */
/* Fonts: self-hosted (Fontsource, latin subset, SIL OFL 1.1 — see /fonts/LICENSES.txt). */
@font-face { font-family: "Inter"; font-style: normal; font-weight: 400; font-display: swap; src: url(/fonts/inter-latin-400-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 500; font-display: swap; src: url(/fonts/inter-latin-500-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 600; font-display: swap; src: url(/fonts/inter-latin-600-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 700; font-display: swap; src: url(/fonts/inter-latin-700-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "JetBrains Mono"; font-style: normal; font-weight: 400; font-display: swap; src: url(/fonts/jetbrains-mono-latin-400-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "JetBrains Mono"; font-style: normal; font-weight: 500; font-display: swap; src: url(/fonts/jetbrains-mono-latin-500-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Instrument Serif"; font-style: normal; font-weight: 400; font-display: swap; src: url(/fonts/instrument-serif-latin-400-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Instrument Serif"; font-style: italic; font-weight: 400; font-display: swap; src: url(/fonts/instrument-serif-latin-400-italic.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
:root {
  --bg: #030409;
  --bg-2: #070a14;
  --bg-3: #0c1020;
  --panel: rgba(9, 12, 24, 0.9);
  --panel-solid: #0a0d1a;
  --dim-overlay: rgba(2, 3, 8, 0.86);
  --line: rgba(150, 170, 230, 0.14);
  --line-2: rgba(150, 170, 230, 0.26);
  --text: #e9ecf5;
  --text-2: #c5cbdb;
  --muted: #8e97ad;
  --faint: #5c6579;
  --violet: #b48cff;
  --violet-2: #8b5cf6;
  --ir: #ffb547;
  --cyan: #5ee7ff;
  --rose: #ff6f91;
  --green: #6ee7a8;
  --radius: 12px;
  --radius-sm: 8px;
  --gutter: clamp(16px, 4vw, 48px);
  --max: 1320px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --serif: "Instrument Serif", "Iowan Old Style", Georgia, serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --ease: cubic-bezier(0.2, 0.7, 0.1, 1);
  color-scheme: dark;
}

*,
*::before,
*::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 16px/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, svg, video, canvas { display: block; max-width: 100%; }
a { color: var(--text); text-decoration-color: rgba(180, 140, 255, 0.5); text-underline-offset: 3px; }
a:hover { color: #fff; text-decoration-color: var(--violet); }
button { font: inherit; color: inherit; }
h1, h2, h3 { line-height: 1.12; margin: 0 0 0.5em; font-weight: 600; letter-spacing: -0.01em; }
h1 { font-family: var(--serif); font-weight: 400; font-size: clamp(2.2rem, 5vw, 4rem); letter-spacing: -0.015em; }
h2 { font-size: clamp(1.35rem, 2.4vw, 1.9rem); }
h2.sm { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.16em; color: var(--muted); font-weight: 600; }
h3 { font-size: 1.05rem; }
em { font-family: var(--serif); font-style: italic; font-weight: 400; color: #fff; }
h2 em { font-size: 1.08em; }
p { margin: 0 0 1em; }
code, kbd { font-family: var(--mono); font-size: 0.86em; background: var(--bg-3); border: 1px solid var(--line); border-radius: 5px; padding: 0.08em 0.4em; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--violet); color: #000; padding: 8px 14px; border-radius: 8px; }
.skip:focus { left: 8px; }
:focus-visible { outline: 2px solid var(--violet); outline-offset: 3px; border-radius: 4px; }
.muted { color: var(--muted); }
.fine { font-size: 0.82rem; color: var(--muted); }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.kicker { font: 600 0.74rem/1.4 var(--font); text-transform: uppercase; letter-spacing: 0.22em; color: var(--violet); margin-bottom: 1em; }
.lede { font-size: clamp(1.05rem, 1.6vw, 1.25rem); color: var(--text-2); max-width: 68ch; }

/* ---------------------------------------------------------------- top bar */
.topbar {
  position: fixed; inset: 0 0 auto 0; z-index: 50; height: 60px;
  display: flex; align-items: center; gap: 24px; padding: 0 var(--gutter);
  background: linear-gradient(to bottom, rgba(3, 4, 9, 0.92), rgba(3, 4, 9, 0));
  transition: background 0.3s var(--ease), border-color 0.3s;
  border-bottom: 1px solid transparent;
}
.topbar.scrolled { background: rgba(3, 4, 9, 0.96); border-bottom-color: var(--line); }
.brand { font: 400 0.86rem/1 var(--font); letter-spacing: 0.32em; text-decoration: none; color: var(--text); white-space: nowrap; }
.brand b { font-weight: 800; color: #fff; }
.nav { display: flex; gap: 4px; margin-right: auto; }
.nav a { padding: 8px 12px; border-radius: 999px; text-decoration: none; color: var(--muted); font-size: 0.9rem; font-weight: 500; transition: color 0.2s, background 0.2s; }
.nav a:hover { color: var(--text); background: rgba(255, 255, 255, 0.05); }
.nav a[aria-current] { color: #fff; background: rgba(180, 140, 255, 0.14); }
.topbar-right { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.met { display: inline-flex; align-items: center; gap: 8px; font: 500 0.78rem/1 var(--mono); color: var(--text-2); text-decoration: none; padding: 7px 12px; border: 1px solid var(--line); border-radius: 999px; background: rgba(9, 12, 24, 0.7); }
.met .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 0 rgba(110, 231, 168, 0.6); animation: pulse 2.4s infinite; }
.met-label { color: var(--muted); font-family: var(--font); letter-spacing: 0.06em; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(110, 231, 168, 0.55); } 70% { box-shadow: 0 0 0 8px rgba(110, 231, 168, 0); } 100% { box-shadow: 0 0 0 0 rgba(110, 231, 168, 0); } }
.search-btn { display: inline-flex; align-items: center; gap: 8px; padding: 7px 10px 7px 12px; border-radius: 999px; border: 1px solid var(--line); background: rgba(9, 12, 24, 0.7); color: var(--muted); cursor: pointer; font-size: 0.86rem; }
.search-btn:hover { color: var(--text); border-color: var(--line-2); }
.search-btn kbd { padding: 0 6px; font-size: 0.72rem; }
.menu-btn { display: none; width: 40px; height: 40px; border: 1px solid var(--line); border-radius: 50%; background: rgba(9, 12, 24, 0.7); cursor: pointer; flex-direction: column; justify-content: center; align-items: center; gap: 5px; }
.menu-btn span { width: 16px; height: 1.5px; background: var(--text); display: block; transition: transform 0.25s; }
body.menu-open .menu-btn span:first-child { transform: translateY(3.25px) rotate(45deg); }
body.menu-open .menu-btn span:last-child { transform: translateY(-3.25px) rotate(-45deg); }

@media (max-width: 1080px) {
  .met-label { display: none; }
  .nav a { padding: 8px 9px; font-size: 0.86rem; }
}
@media (max-width: 920px) {
  .nav { position: fixed; inset: 60px 0 auto 0; flex-direction: column; gap: 0; padding: 12px var(--gutter) 24px; background: var(--panel-solid); border-bottom: 1px solid var(--line); transform: translateY(-120%); transition: transform 0.35s var(--ease); margin: 0; }
  .nav a { padding: 14px 4px; border-radius: 0; border-bottom: 1px solid var(--line); font-size: 1.05rem; }
  body.menu-open .nav { transform: none; }
  .menu-btn { display: inline-flex; }
  .search-btn span, .search-btn kbd { display: none; }
  .met { display: none; }
}

/* ---------------------------------------------------------------- buttons */
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 11px 18px; border-radius: 999px; border: 1px solid var(--line-2); background: rgba(12, 16, 32, 0.8); color: var(--text); text-decoration: none; font-weight: 600; font-size: 0.92rem; cursor: pointer; transition: transform 0.2s var(--ease), background 0.2s, border-color 0.2s; }
.btn:hover { transform: translateY(-1px); border-color: var(--violet); color: #fff; }
.btn.primary { background: linear-gradient(135deg, #c3a2ff, #8b5cf6); border-color: transparent; color: #0b0614; }
.btn.primary:hover { color: #000; box-shadow: 0 8px 30px -8px rgba(180, 140, 255, 0.7); }
.btn.ghost { background: transparent; }
.hero-cta, .actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 18px 0; }

/* ---------------------------------------------------------------- layout */
main { min-height: 60vh; }
.band { padding: clamp(40px, 7vw, 96px) var(--gutter); max-width: calc(var(--max) + 2 * var(--gutter)); margin: 0 auto; }
.band.tight { padding-top: 16px; padding-bottom: 40px; }
.band-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.band-head a { color: var(--muted); text-decoration: none; font-size: 0.92rem; white-space: nowrap; }
.band-head a:hover { color: var(--violet); }
.band.split, .split-text { display: grid; grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); gap: clamp(24px, 5vw, 72px); align-items: start; }
.split-text { grid-template-columns: minmax(0, 1.4fr) minmax(260px, 0.8fr); margin-top: 28px; }
@media (max-width: 860px) { .band.split, .split-text { grid-template-columns: 1fr; } }
.page-head { padding: 108px var(--gutter) 24px; max-width: calc(var(--max) + 2 * var(--gutter)); margin: 0 auto; }
.page-head h1 { max-width: 22ch; }
.page-head.article h1 { max-width: 26ch; }
.crumbs { font-size: 0.82rem; color: var(--muted); margin-bottom: 14px; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--text); }
.prose { max-width: 70ch; color: var(--text-2); font-size: 1.04rem; }
.prose h2 { color: var(--text); margin-top: 1.6em; font-size: 1.3rem; }
.prose ul { padding-left: 1.2em; }
.prose li { margin-bottom: 0.4em; }

/* ---------------------------------------------------------------- hero (home) */
.hero { position: relative; min-height: min(100vh, 980px); display: flex; align-items: flex-end; padding: 120px var(--gutter) clamp(40px, 6vw, 72px); overflow: hidden; isolation: isolate; }
#hero-sky { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -2; }
.hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; animation: heroDrift 40s ease-in-out infinite alternate; }
@keyframes heroDrift { from { transform: scale(1.04); } to { transform: scale(1.14) translate(-1.5%, -1%); } }
.hero::after { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(120% 80% at 20% 100%, rgba(3, 4, 9, 0.95) 10%, rgba(3, 4, 9, 0.35) 55%, rgba(3, 4, 9, 0) 80%), linear-gradient(to top, var(--bg) 0%, rgba(3, 4, 9, 0) 40%); }
.hero-inner { max-width: var(--max); width: 100%; margin: 0 auto; }
.hero h1 { font-size: clamp(2.6rem, 6.2vw, 5.6rem); line-height: 0.98; max-width: 15ch; margin-bottom: 0.32em; }
.hero h1 em { color: transparent; background: linear-gradient(100deg, #e7dcff 10%, var(--violet) 45%, var(--ir) 95%); -webkit-background-clip: text; background-clip: text; padding-right: 0.06em; }
.hero .lede { max-width: 60ch; }

.telemetry { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin: 28px 0 0; max-width: 980px; }
.telemetry > div { background: rgba(6, 8, 17, 0.88); padding: 14px 16px; }
.telemetry dt { font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.16em; color: var(--muted); margin-bottom: 6px; }
.telemetry dd { margin: 0; font: 500 1.05rem/1.3 var(--mono); color: #fff; font-variant-numeric: tabular-nums; }
.telemetry.wide { max-width: none; margin-top: 24px; }
.telemetry.big { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: none; margin: 0; }
.telemetry.big dd { font-size: clamp(1rem, 1.5vw, 1.3rem); }
@media (max-width: 720px) { .telemetry { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---------------------------------------------------------------- cards & grid */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(232px, 1fr)); gap: clamp(10px, 1.4vw, 18px); }
.card { display: flex; flex-direction: column; text-decoration: none; color: var(--text); border-radius: var(--radius); background: var(--bg-2); border: 1px solid var(--line); overflow: hidden; transition: transform 0.35s var(--ease), border-color 0.25s, box-shadow 0.35s; position: relative; }
.card figure { margin: 0; aspect-ratio: 4 / 3; background: #05060c; overflow: hidden; position: relative; }
.card img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.8s var(--ease), opacity 0.4s; }
.card:hover { transform: translateY(-3px); border-color: var(--line-2); box-shadow: 0 18px 40px -20px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(180, 140, 255, 0.15); }
.card:hover img { transform: scale(1.05); }
.card-meta { padding: 12px 14px 14px; display: grid; gap: 4px; }
.card-meta h3 { font-size: 0.94rem; font-weight: 600; margin: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-meta time { font-size: 0.78rem; color: var(--muted); }
.tag { font: 600 0.64rem/1 var(--font); text-transform: uppercase; letter-spacing: 0.14em; color: var(--violet); }
.cat-roman .tag { color: var(--ir); }
.cat-simulations .tag { color: var(--cyan); }
.cat-spacecraft .tag { color: #9fb4ff; }
.cat-illustrations .tag { color: var(--rose); }
.cat-related .tag { color: var(--green); }
.cat-roman { border-color: rgba(255, 181, 71, 0.35); }
.play { position: absolute; inset: 50% auto auto 50%; width: 52px; height: 52px; margin: -26px 0 0 -26px; border-radius: 50%; background: rgba(3, 4, 9, 0.75); border: 1px solid rgba(255, 255, 255, 0.4); }
.play::after { content: ""; position: absolute; left: 20px; top: 16px; border: 10px solid transparent; border-left: 15px solid #fff; border-right: 0; }
.card.hidden { display: none; }
/* Photo series: a stacked-deck edge and a count badge */
.card .count { position: absolute; right: 10px; bottom: 10px; padding: 4px 10px 4px 26px; border-radius: 999px; background: rgba(3, 4, 9, 0.82); border: 1px solid rgba(255, 255, 255, 0.22); color: #fff; font: 600 0.74rem/1.3 var(--font); letter-spacing: 0.02em; }
.card .count::before { content: ""; position: absolute; left: 9px; top: 50%; width: 10px; height: 8px; margin-top: -5px; border: 1.5px solid currentColor; border-radius: 2px; box-shadow: 3px -3px 0 -1.5px rgba(3, 4, 9, 0.82), 3px -3px 0 0 currentColor; }
.card[data-n] { box-shadow: 5px 5px 0 -1px var(--bg-2), 5px 5px 0 0 var(--line), 10px 10px 0 -1px var(--bg), 10px 10px 0 0 rgba(150, 170, 230, 0.1); }
.empty { color: var(--muted); padding: 40px 0; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 22px 0 6px; }
.chips a { padding: 7px 14px; border-radius: 999px; border: 1px solid var(--line); text-decoration: none; color: var(--text-2); font-size: 0.86rem; background: var(--bg-2); }
.chips a span { color: var(--faint); margin-left: 4px; font-variant-numeric: tabular-nums; }
.chips a:hover { border-color: var(--line-2); color: #fff; }
.chips a[aria-current] { background: rgba(180, 140, 255, 0.16); border-color: rgba(180, 140, 255, 0.5); color: #fff; }
.filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 16px; }
.filters input, .filters select { background: var(--bg-2); border: 1px solid var(--line); color: var(--text); border-radius: 999px; padding: 10px 16px; font: inherit; font-size: 0.92rem; }
.search-inline { flex: 1 1 320px; max-width: 560px; }
.filters input { width: 100%; }
.result-count { color: var(--muted); font-size: 0.86rem; margin-left: auto; }
.more-wrap { display: flex; justify-content: center; margin: 28px 0 10px; }
.more-list { margin-top: 18px; color: var(--muted); }
.more-list summary { cursor: pointer; font-size: 0.9rem; }
.years { color: var(--muted); }
.years a { text-decoration: none; color: var(--text-2); }

/* ---------------------------------------------------------------- explore cards / surveys */
.exp { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.exp-card { position: relative; padding: 28px 22px 26px; border-radius: var(--radius); border: 1px solid var(--line); background: linear-gradient(160deg, rgba(180, 140, 255, 0.08), rgba(9, 12, 24, 0.6) 40%); text-decoration: none; min-height: 220px; transition: border-color 0.25s, transform 0.35s var(--ease); }
.exp-card:hover { border-color: rgba(180, 140, 255, 0.5); transform: translateY(-3px); }
.exp-card h3 { font-family: var(--serif); font-weight: 400; font-size: 1.7rem; margin: 18px 0 8px; }
.exp-card p { color: var(--muted); font-size: 0.92rem; margin: 0; }
.exp-n { font: 500 0.75rem var(--mono); color: var(--violet); }
@media (max-width: 1000px) { .exp { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .exp { grid-template-columns: 1fr; } }
.surveys { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.survey { display: block; padding: 22px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--bg-2); text-decoration: none; transition: border-color 0.2s; }
.survey:hover { border-color: rgba(255, 181, 71, 0.5); }
.survey .abbr { font: 500 0.78rem var(--mono); color: var(--ir); }
.survey h3, .survey h2 { margin: 10px 0 6px; font-size: 1.1rem; }
.survey p { color: var(--text-2); font-size: 0.92rem; }
.surveys.big { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }

/* ---------------------------------------------------------------- FOV figure, timeline, facts */
.fov { margin: 0; background: radial-gradient(70% 90% at 30% 50%, rgba(139, 92, 246, 0.08), transparent), var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.fov svg { width: 100%; height: auto; }
.fov .lbl { fill: var(--text-2); font: 500 12px var(--font); }
.fov .note { fill: var(--muted); font: 400 11px var(--font); }
.fov figcaption { color: var(--muted); font-size: 0.86rem; margin-top: 8px; }
.timeline { list-style: none; margin: 0; padding: 0 0 0 22px; border-left: 1px solid var(--line-2); }
.timeline li { position: relative; padding: 0 0 22px 18px; }
.timeline li::before { content: ""; position: absolute; left: -29px; top: 5px; width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--faint); background: var(--bg); }
.timeline li.done::before { background: var(--violet); border-color: var(--violet); }
.timeline li.now::before { border-color: var(--ir); box-shadow: 0 0 0 5px rgba(255, 181, 71, 0.15); }
.timeline time { font: 500 0.74rem var(--mono); color: var(--muted); }
.timeline h3 { margin: 4px 0; font-size: 1rem; }
.timeline p { color: var(--text-2); font-size: 0.92rem; margin: 0; }
.timeline li.next h3 { color: var(--text-2); }
.facts { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin: 0; align-self: start; }
.facts > div { display: grid; grid-template-columns: 130px 1fr; gap: 12px; background: var(--bg-2); padding: 12px 16px; }
.facts dt { color: var(--muted); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.08em; padding-top: 2px; }
.facts dd { margin: 0; font-size: 0.94rem; color: var(--text); }
.facts dd span { display: block; color: var(--muted); font-size: 0.84rem; }
@media (max-width: 520px) { .facts > div { grid-template-columns: 1fr; gap: 2px; } }

.news { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.news a { display: grid; grid-template-columns: 96px 1fr; gap: 14px; padding: 14px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--bg-2); text-decoration: none; height: 100%; }
.news a:hover { border-color: var(--line-2); }
.news img { width: 96px; height: 96px; object-fit: cover; border-radius: var(--radius-sm); }
.news time { font: 500 0.74rem var(--mono); color: var(--muted); }
.news h3 { font-size: 0.98rem; margin: 4px 0; }
.news p { font-size: 0.86rem; color: var(--muted); margin: 0; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

.faq details { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; list-style: none; padding: 18px 36px 18px 0; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: 14px; font-size: 1.5rem; color: var(--violet); transition: transform 0.25s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq summary h3 { margin: 0; font-size: 1.05rem; font-weight: 500; }
.faq p { color: var(--text-2); max-width: 75ch; padding-bottom: 12px; }
.sources { max-width: calc(var(--max) + 2 * var(--gutter)); margin: 0 auto; padding: 8px var(--gutter) 56px; }
.sources h2 { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.16em; color: var(--muted); }
.sources ul { padding-left: 1.1em; color: var(--muted); font-size: 0.9rem; }
.sources a { color: var(--text-2); }
.plain { padding-left: 1.1em; color: var(--text-2); }
.plain.cols { columns: 2 280px; }

/* ---------------------------------------------------------------- item page */
.item { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(320px, 1fr); gap: clamp(20px, 3vw, 44px); padding: 84px var(--gutter) 24px; max-width: 1600px; margin: 0 auto; }
.item-media { position: sticky; top: 76px; align-self: start; }
.item-img { display: block; width: 100%; padding: 0; border: 1px solid var(--line); background: #020309; border-radius: var(--radius); overflow: hidden; cursor: zoom-in; position: relative; }
.item-img img { width: 100%; height: auto; max-height: calc(100vh - 110px); object-fit: contain; margin: 0 auto; }
.zoom-hint { position: absolute; right: 12px; bottom: 12px; font: 600 0.72rem var(--font); letter-spacing: 0.12em; text-transform: uppercase; padding: 7px 11px; border-radius: 999px; background: rgba(3, 4, 9, 0.8); border: 1px solid var(--line-2); opacity: 0; transition: opacity 0.25s; }
.item-img:hover .zoom-hint, .item-img:focus-visible .zoom-hint { opacity: 1; }
.item-video { width: 100%; border-radius: var(--radius); background: #000; }
.item-body h1 { font-size: clamp(1.9rem, 3.4vw, 2.8rem); }
.item-sub { color: var(--muted); font-size: 0.9rem; display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.item-body .prose { font-size: 1rem; }
.item-body .facts { margin: 22px 0; }
.downloads { list-style: none; padding: 0; display: grid; gap: 6px; }
.downloads a { display: flex; gap: 10px; justify-content: space-between; padding: 10px 14px; border: 1px solid var(--line); border-radius: var(--radius-sm); text-decoration: none; background: var(--bg-2); font-size: 0.9rem; }
.downloads span { color: var(--muted); font-family: var(--mono); font-size: 0.8rem; }
.source { font-size: 0.86rem; color: var(--muted); word-break: break-word; }
.pager { display: flex; justify-content: space-between; gap: 12px; margin-top: 26px; flex-wrap: wrap; }
.pager a { color: var(--muted); text-decoration: none; font-size: 0.9rem; max-width: 48%; }
.pager a:hover { color: var(--text); }
@media (max-width: 960px) { .item { grid-template-columns: 1fr; } .item-media { position: static; } }

/* ---------------------------------------------------------------- viewer (deep zoom) */
.viewer { position: fixed; inset: 0; z-index: 90; background: #010205; display: grid; grid-template-columns: 1fr 360px; animation: fadeIn 0.25s var(--ease); }
.viewer[hidden] { display: none; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.viewer-stage { position: relative; min-width: 0; }
.viewer-osd { position: absolute !important; inset: 0; width: 100%; height: 100%; }
.viewer-side { background: var(--panel-solid); border-left: 1px solid var(--line); padding: 72px 24px 24px; overflow-y: auto; }
.viewer-side h2 { font-family: var(--serif); font-weight: 400; font-size: 1.8rem; }
.viewer-side p { color: var(--text-2); font-size: 0.94rem; }
.viewer-bar { position: absolute; top: 14px; left: 14px; right: 14px; display: flex; gap: 8px; z-index: 3; align-items: center; }
.viewer-bar .grow { flex: 1; }
.vbtn { width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--line-2); background: rgba(3, 4, 9, 0.82); color: #fff; cursor: pointer; display: inline-grid; place-items: center; font-size: 1.1rem; line-height: 1; text-decoration: none; }
.vbtn:hover { border-color: var(--violet); }
.vbtn.wide { width: auto; padding: 0 14px; border-radius: 999px; font-size: 0.82rem; font-weight: 600; }
.viewer-nav { position: absolute; top: 50%; z-index: 3; transform: translateY(-50%); }
.viewer-nav.prev { left: 14px; }
.viewer-nav.next { right: 14px; }
.viewer-loading { position: absolute; inset: auto 0 18px 0; text-align: center; color: var(--muted); font-size: 0.82rem; z-index: 2; pointer-events: none; }
@media (max-width: 860px) { .viewer { grid-template-columns: 1fr; grid-template-rows: 1fr auto; } .viewer-side { padding: 16px 18px; max-height: 34vh; border-left: 0; border-top: 1px solid var(--line); } .viewer-side h2 { font-size: 1.3rem; } }
body.viewer-open { overflow: hidden; }
body.viewer-open .topbar { display: none; }

/* ---------------------------------------------------------------- search palette */
.palette { position: fixed; inset: 0; z-index: 95; background: var(--dim-overlay); display: grid; place-items: start center; padding: 12vh 16px 16px; }
.palette[hidden] { display: none; }
.palette-box { width: min(680px, 100%); background: var(--panel-solid); border: 1px solid var(--line-2); border-radius: 16px; overflow: hidden; box-shadow: 0 40px 120px -20px rgba(0, 0, 0, 0.9); }
.palette input { width: 100%; padding: 20px 22px; background: transparent; border: 0; border-bottom: 1px solid var(--line); color: var(--text); font: 400 1.15rem var(--font); outline: none; }
.palette ul { list-style: none; margin: 0; padding: 6px; max-height: 56vh; overflow-y: auto; }
.palette li a { display: grid; grid-template-columns: 56px 1fr; gap: 12px; align-items: center; padding: 8px 10px; border-radius: 10px; text-decoration: none; }
.palette li a[aria-selected="true"], .palette li a:hover { background: rgba(180, 140, 255, 0.12); }
.palette img, .palette .ph { width: 56px; height: 42px; object-fit: cover; border-radius: 6px; background: var(--bg-3); }
.palette .ph { display: grid; place-items: center; color: var(--violet); font: 500 0.7rem var(--mono); }
.palette strong { display: block; font-weight: 500; font-size: 0.95rem; }
.palette small { color: var(--muted); font-size: 0.78rem; }
.palette-foot { padding: 10px 16px; border-top: 1px solid var(--line); color: var(--muted); font-size: 0.76rem; display: flex; gap: 14px; flex-wrap: wrap; }
.help { position: fixed; inset: 0; z-index: 96; background: var(--dim-overlay); display: grid; place-items: center; padding: 16px; }
.help[hidden] { display: none; }
.help-box { background: var(--panel-solid); border: 1px solid var(--line-2); border-radius: 16px; padding: 26px 28px; width: min(460px, 100%); }
.help-box dl { display: grid; grid-template-columns: auto 1fr; gap: 10px 16px; margin: 0; }
.help-box dd { margin: 0; color: var(--text-2); }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 99; background: var(--panel-solid); border: 1px solid var(--line-2); padding: 10px 18px; border-radius: 999px; font-size: 0.9rem; animation: fadeIn 0.2s; }

/* ---------------------------------------------------------------- footer */
.site-footer { border-top: 1px solid var(--line); margin-top: 40px; padding: 48px var(--gutter) 56px; background: linear-gradient(to bottom, var(--bg), #020307); }
.foot-grid { max-width: var(--max); margin: 0 auto; display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.2fr; gap: 32px; }
.site-footer h2 { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.18em; color: var(--muted); margin-bottom: 12px; }
.site-footer ul { list-style: none; padding: 0; margin: 0 0 20px; display: grid; gap: 7px; }
.site-footer a { color: var(--text-2); text-decoration: none; font-size: 0.92rem; }
.site-footer a:hover { color: #fff; }
.site-footer p { color: var(--muted); font-size: 0.9rem; max-width: 52ch; }
.foot-about .brand { display: inline-block; margin-bottom: 16px; }
.sibs span { display: block; color: var(--faint); font-size: 0.78rem; }
@media (max-width: 860px) { .foot-grid { grid-template-columns: 1fr 1fr; } .foot-about { grid-column: 1 / -1; } }

/* ---------------------------------------------------------------- sky app */
body.sky-page .site-footer { margin-top: 0; }
.sky-app { position: relative; height: 100vh; height: 100dvh; min-height: 520px; overflow: hidden; background: #000; touch-action: none; user-select: none; }
#sky { width: 100%; height: 100%; cursor: grab; outline: none; }
#sky.dragging { cursor: grabbing; }
.sky-labels { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.sky-labels span { position: absolute; transform: translate(-50%, -50%); font: 500 11px var(--font); letter-spacing: 0.18em; text-transform: uppercase; color: rgba(160, 180, 255, 0.5); white-space: nowrap; }
.sky-labels span.t { color: rgba(255, 210, 140, 0.85); letter-spacing: 0.04em; text-transform: none; font-size: 12px; }
.sky-labels span.sun { color: #ffd27a; letter-spacing: 0.06em; text-transform: none; font-size: 12px; }
.sky-labels span.img { color: #fff; letter-spacing: 0.02em; text-transform: none; font-size: 12px; text-shadow: 0 1px 4px #000; }
.sky-loader { position: absolute; inset: 0; display: grid; place-content: center; gap: 14px; text-align: center; background: #000; z-index: 5; transition: opacity 0.6s; }
.sky-loader.done { opacity: 0; pointer-events: none; }
.sky-loader-t { color: var(--muted); font: 500 0.8rem var(--mono); }
.sky-hud { position: absolute; inset: 60px 0 0 0; pointer-events: none; }
.sky-hud > * { pointer-events: auto; }
.sky-title { position: absolute; left: var(--gutter); top: 14px; pointer-events: none; }
.sky-title h1 { font-size: clamp(1.6rem, 3vw, 2.4rem); margin: 0; }
.sky-title p { color: var(--muted); font-size: 0.82rem; margin: 4px 0 0; }
.sky-tools { position: absolute; right: var(--gutter); top: 16px; display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; max-width: 60vw; }
.sky-tools button { padding: 9px 14px; border-radius: 999px; border: 1px solid var(--line-2); background: rgba(3, 4, 9, 0.82); color: var(--text); font-size: 0.84rem; font-weight: 500; cursor: pointer; }
.sky-tools button:hover, .sky-tools button[aria-pressed="true"], .sky-tools button[aria-expanded="true"] { border-color: var(--violet); background: rgba(139, 92, 246, 0.25); }
.sky-layers { position: absolute; right: var(--gutter); top: 66px; width: 300px; padding: 14px 16px; border-radius: var(--radius); border: 1px solid var(--line-2); background: var(--panel); display: grid; gap: 8px; font-size: 0.86rem; color: var(--text-2); }
.sky-layers label { display: flex; gap: 8px; align-items: center; cursor: pointer; }
.sky-layers input[type="checkbox"] { accent-color: var(--violet); }
.sky-layers .date { flex-wrap: wrap; border-top: 1px solid var(--line); padding-top: 10px; margin-top: 4px; }
.sky-layers input[type="date"] { background: var(--bg-3); color: var(--text); border: 1px solid var(--line); border-radius: 6px; padding: 4px 8px; font: inherit; }
.sky-card { position: absolute; left: var(--gutter); bottom: 28px; width: min(380px, calc(100vw - 2 * var(--gutter))); background: var(--panel); border: 1px solid var(--line-2); border-radius: var(--radius); overflow: hidden; }
.sky-card img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: #05060c; }
.sky-card .in { padding: 14px 16px 16px; }
.sky-card h2 { font-size: 1.05rem; margin: 4px 0 6px; }
.sky-card p { color: var(--text-2); font-size: 0.86rem; margin: 0 0 10px; }
.sky-card .row { display: flex; gap: 8px; flex-wrap: wrap; }
.sky-card .btn { padding: 8px 14px; font-size: 0.82rem; }
.sky-card .x { position: absolute; top: 8px; right: 8px; }
.sky-coords { position: absolute; right: var(--gutter); bottom: 24px; font: 500 0.74rem var(--mono); color: var(--muted); text-align: right; pointer-events: none; text-shadow: 0 1px 3px #000; }
.sky-search { position: absolute; left: 50%; top: 14px; transform: translateX(-50%); width: min(520px, calc(100vw - 32px)); background: var(--panel-solid); border: 1px solid var(--line-2); border-radius: 14px; overflow: hidden; z-index: 4; }
.sky-search input { width: 100%; padding: 14px 18px; border: 0; border-bottom: 1px solid var(--line); background: transparent; color: var(--text); font: inherit; outline: none; }
.sky-search ul { list-style: none; margin: 0; padding: 6px; max-height: 50vh; overflow: auto; }
.sky-search button { width: 100%; text-align: left; padding: 9px 12px; border-radius: 8px; border: 0; background: transparent; cursor: pointer; color: var(--text); }
.sky-search button:hover, .sky-search button[aria-selected="true"] { background: rgba(180, 140, 255, 0.12); }
.sky-search small { color: var(--muted); display: block; }
.sky-caption { position: absolute; left: 50%; bottom: 34px; transform: translateX(-50%); width: min(640px, calc(100vw - 32px)); text-align: center; background: var(--panel); border: 1px solid var(--line-2); border-radius: 14px; padding: 14px 18px; }
.sky-caption h2 { font-family: var(--serif); font-weight: 400; font-size: 1.5rem; margin: 0 0 4px; }
.sky-caption p { color: var(--text-2); font-size: 0.92rem; margin: 0 0 10px; }
.sky-caption .row { display: flex; gap: 8px; justify-content: center; }
.sky-info { max-width: 980px; }
.noscript { position: absolute; inset: 0; display: grid; place-items: center; }
@media (max-width: 760px) {
  .sky-tools { left: var(--gutter); right: var(--gutter); top: 74px; justify-content: flex-start; max-width: none; }
  .sky-tools button { padding: 7px 11px; font-size: 0.78rem; }
  .sky-layers { left: var(--gutter); right: var(--gutter); width: auto; top: 160px; }
  .sky-title p { display: none; }
}

/* ---------------------------------------------------------------- mission */
.mc-grid { display: grid; grid-template-columns: minmax(300px, 0.8fr) minmax(0, 1.4fr); gap: 18px; }
.panel { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.progress { height: 6px; background: var(--bg-3); border-radius: 999px; overflow: hidden; margin: 18px 0 10px; }
.progress span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--violet-2), var(--ir)); border-radius: inherit; transition: width 1s var(--ease); }
#orbit { width: 100%; height: clamp(320px, 42vw, 520px); border-radius: var(--radius-sm); background: radial-gradient(60% 80% at 25% 50%, rgba(94, 231, 255, 0.05), transparent), #020309; cursor: grab; touch-action: none; }
.legend { display: flex; gap: 16px; font-size: 0.78rem; color: var(--muted); margin-top: 10px; flex-wrap: wrap; }
.legend span::before { content: ""; display: inline-block; width: 18px; height: 2px; vertical-align: middle; margin-right: 6px; }
.lg-past::before { background: var(--violet); }
.lg-future::before { background: repeating-linear-gradient(90deg, var(--violet) 0 4px, transparent 4px 7px); }
.lg-moon::before { background: repeating-linear-gradient(90deg, #6b7488 0 2px, transparent 2px 5px); }
.model-stage { position: relative; aspect-ratio: 4 / 3; border-radius: var(--radius-sm); background: radial-gradient(60% 60% at 50% 40%, #11162a, #020309); display: grid; place-items: center; overflow: hidden; }
.model-stage canvas { position: absolute; inset: 0; width: 100% !important; height: 100% !important; }
.model-progress { position: absolute; bottom: 12px; left: 0; right: 0; text-align: center; font: 500 0.78rem var(--mono); color: var(--muted); }
@media (max-width: 900px) { .mc-grid { grid-template-columns: 1fr; } }

/* ---------------------------------------------------------------- tours */
.tours { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }
.tour-card { position: relative; display: block; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); aspect-ratio: 16 / 10; text-decoration: none; background: var(--bg-2); }
.tour-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
.tour-card:hover img { transform: scale(1.06); }
.tour-card div { position: absolute; inset: auto 0 0 0; padding: 60px 20px 18px; background: linear-gradient(to top, rgba(2, 3, 8, 0.95), rgba(2, 3, 8, 0)); }
.tour-card h2 { font-family: var(--serif); font-weight: 400; font-size: 1.8rem; margin: 0 0 4px; }
.tour-card p { color: var(--text-2); font-size: 0.9rem; margin: 0 0 6px; }
.tour-card span { font: 500 0.74rem var(--mono); color: var(--violet); }
body.tour-page .topbar { display: none; }
.tour-app { position: relative; height: 100vh; height: 100dvh; background: #000; overflow: hidden; }
.tour-stage { position: absolute; inset: 0; }
.tour-stage .slide { position: absolute; inset: -4%; opacity: 0; transition: opacity 2.2s ease; }
.tour-stage .slide.on { opacity: 1; }
.tour-stage img { width: 100%; height: 100%; object-fit: cover; transform-origin: center; will-change: transform; }
.tour-stage .slide.contain img { object-fit: contain; }
.tour-stage .slide .bg { position: absolute; inset: 0; background-size: cover; background-position: center; filter: brightness(0.35) saturate(1.2); transform: scale(1.2); }
.tour-ui { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: space-between; transition: opacity 0.6s; background: linear-gradient(to bottom, rgba(0, 0, 0, 0.6), transparent 18%, transparent 60%, rgba(0, 0, 0, 0.82)); }
.tour-app.idle .tour-ui { opacity: 0; cursor: none; }
.tour-app.idle .tour-caption { opacity: 1; }
.tour-top { display: flex; align-items: center; gap: 18px; padding: 18px var(--gutter); }
.tour-name { color: var(--text-2); font-size: 0.9rem; }
.tour-btns { margin-left: auto; display: flex; gap: 8px; }
.tour-btns button, .tour-btns a { padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line-2); background: rgba(0, 0, 0, 0.6); color: var(--text); font-size: 0.82rem; cursor: pointer; text-decoration: none; }
.tour-btns [aria-pressed="true"] { border-color: var(--violet); background: rgba(139, 92, 246, 0.3); }
.tour-caption { position: absolute; left: var(--gutter); bottom: 96px; max-width: min(720px, 80vw); transition: opacity 0.8s; }
.tour-caption .tag { color: var(--ir); }
.tour-caption h2 { font-family: var(--serif); font-weight: 400; font-size: clamp(2rem, 4.4vw, 3.8rem); line-height: 1.02; margin: 8px 0 10px; text-shadow: 0 2px 24px rgba(0, 0, 0, 0.8); }
.tour-caption p { color: var(--text-2); font-size: clamp(0.95rem, 1.3vw, 1.1rem); text-shadow: 0 1px 12px #000; max-width: 62ch; }
.tour-caption a { font-size: 0.86rem; color: var(--violet); }
.tour-caption.swap { opacity: 0; }
.tour-bottom { display: flex; align-items: center; gap: 10px; padding: 18px var(--gutter) 22px; }
.tour-bottom button { width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--line-2); background: rgba(0, 0, 0, 0.6); color: #fff; cursor: pointer; font-size: 1rem; }
.tour-progress { flex: 1; height: 3px; background: rgba(255, 255, 255, 0.15); border-radius: 999px; overflow: hidden; }
.tour-progress span { display: block; height: 100%; width: 0; background: var(--violet); }
.tour-count { font: 500 0.78rem var(--mono); color: var(--muted); min-width: 60px; text-align: right; }
.tour-start { position: absolute; inset: 0; display: grid; place-content: center; gap: 10px; text-align: center; background: rgba(0, 0, 0, 0.55); border: 0; color: #fff; cursor: pointer; font: 400 clamp(2rem, 5vw, 3.4rem) var(--serif); z-index: 5; }
.tour-start span { display: inline-grid; place-items: center; width: 92px; height: 92px; margin: 0 auto 6px; border-radius: 50%; background: linear-gradient(135deg, #c3a2ff, #8b5cf6); color: #0b0614; font-size: 2rem; }
.tour-start small { font: 400 0.95rem var(--font); color: var(--text-2); max-width: 50ch; }
.tour-start[hidden] { display: none; }
.tour-list ol { columns: 2 320px; color: var(--text-2); }
.tour-list time { color: var(--faint); font-size: 0.8rem; }
body.kiosk .tour-ui { opacity: 0 !important; }
body.kiosk .site-footer, body.kiosk .tour-list { display: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}
