/* TNS x EDP2 Explorer — design system.
   Cool Rubin greys (rubinobservatory.org neutrals), Windsor-style Fraunces headings over Inter text, and
   Rubin Observatory teal as the main colour: primary actions, active navigation, key numbers, links, focus
   and the sky map.
   Band colours are reserved for data; the brand teal is never drawn inside a lightcurve plot. */

:root {
  --page: #F4F6F7;            /* cool grey, close to Rubin neutral-10 (#F5F5F5) */
  --card: #FFFFFF;
  --fill: #EBEFF1;            /* quiet fills: tracks, inputs, hover */
  --fill-2: #E0E4E8;          /* ~ Rubin neutral-15/20 */
  --line: rgba(16, 34, 44, 0.10);
  --line-strong: rgba(16, 34, 44, 0.18);
  --ink: #12191D;
  --ink-2: #3A4348;
  --muted: #5B656B;           /* 5.5:1 on --page */
  --faint: #9EA4A9;           /* decoration only, never text (Rubin neutral-40) */
  --brand: #058B8C;           /* Rubin teal-400 (the rubinobservatory.org nav band): fills and marks, no small text */
  --accent: #117273;          /* Rubin turquoise-80 (their link colour): text and buttons, 5.3:1 on --page */
  --accent-hover: #0C4A47;    /* Rubin teal-600 (their header band) */
  --accent-ink: #FFFFFF;
  --accent-soft: rgba(5, 139, 140, 0.11);
  --focus: rgba(5, 139, 140, 0.55);
  --private: #A3261F;
  --private-ink: #FFFFFF;
  --warn: #8A5300;            /* "diagnostic" badges: text and border only */
  --bar: rgba(244, 246, 247, 0.76);
  --shadow-sm: 0 1px 2px rgba(16, 34, 44, 0.05);
  --shadow: 0 1px 2px rgba(16, 34, 44, 0.05), 0 8px 24px rgba(16, 34, 44, 0.06);
  --shadow-lg: 0 2px 6px rgba(16, 34, 44, 0.07), 0 24px 64px rgba(16, 34, 44, 0.16);
  --skeleton: #E8ECEE;
  --skeleton-hi: #F3F5F6;
  --plot-window: rgba(16, 34, 44, 0.045);
  --plot-disc: #12191D;
  --dot-data: #058B8C;
  --dot-none: #C2C8CC;
  /* classifier calls (Classifications card, Classifiers page): data colours, never the brand teal */
  --clf-ia: #C9611F; --clf-sn: #2F6FB3; --clf-snx: #4C8C5A; --clf-oth: #6F7A82; --clf-nia: #B39A6B;

  --font: "Inter", ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --display: "Fraunces", "Windsor", "Cooper Std", ui-serif, Georgia, serif;   /* Windsor-style soft old-style, headings only */
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  /* type scale: 12 / 14 / 16 / 20 / 28 / 48 (display clamps up to 64) */
  --t-xs: 12px; --t-sm: 14px; --t-md: 16px; --t-lg: 20px; --t-xl: 28px; --t-2xl: 48px;
  --r-sm: 8px; --r-md: 12px; --r-lg: 18px; --r-pill: 999px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --dur: 160ms;
  --bar-h: 60px;
  --strip-h: 0px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --page: #0E1214; --card: #151A1D; --fill: #1D2327; --fill-2: #262E33;
    --line: rgba(225, 238, 244, 0.09); --line-strong: rgba(225, 238, 244, 0.17);
    --ink: #EDF1F3; --ink-2: #CBD3D7; --muted: #95A0A6; --faint: #56616A;
    --brand: #00BEBF; --accent: #00BEBF; --accent-hover: #30E0E3; --accent-ink: #0E1214; --accent-soft: rgba(0, 190, 191, 0.14); --focus: rgba(0, 190, 191, 0.6);
    --private: #B3342B; --bar: rgba(14, 18, 20, 0.74); --warn: #E3B35A;
    --shadow-sm: none; --shadow: 0 1px 0 rgba(225, 238, 244, 0.03) inset; --shadow-lg: 0 24px 64px rgba(0, 0, 0, 0.6);
    --skeleton: #182023; --skeleton-hi: #20282C;
    --plot-window: rgba(225, 238, 244, 0.05); --plot-disc: #EDF1F3; --dot-data: #00BEBF; --dot-none: #434C52;
    --clf-ia: #E0803F; --clf-sn: #5B97D6; --clf-snx: #6FB27D; --clf-oth: #8C979E; --clf-nia: #CDB98F;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --page: #0E1214; --card: #151A1D; --fill: #1D2327; --fill-2: #262E33;
  --line: rgba(225, 238, 244, 0.09); --line-strong: rgba(225, 238, 244, 0.17);
  --ink: #EDF1F3; --ink-2: #CBD3D7; --muted: #95A0A6; --faint: #56616A;
  --brand: #00BEBF; --accent: #00BEBF; --accent-hover: #30E0E3; --accent-ink: #0E1214; --accent-soft: rgba(0, 190, 191, 0.14); --focus: rgba(0, 190, 191, 0.6);
  --private: #B3342B; --bar: rgba(14, 18, 20, 0.74); --warn: #E3B35A;
  --shadow-sm: none; --shadow: 0 1px 0 rgba(225, 238, 244, 0.03) inset; --shadow-lg: 0 24px 64px rgba(0, 0, 0, 0.6);
  --skeleton: #182023; --skeleton-hi: #20282C;
  --plot-window: rgba(225, 238, 244, 0.05); --plot-disc: #EDF1F3; --dot-data: #00BEBF; --dot-none: #434C52;
  --clf-ia: #E0803F; --clf-sn: #5B97D6; --clf-snx: #6FB27D; --clf-oth: #8C979E; --clf-nia: #CDB98F;
  color-scheme: dark;
}
html.is-private { --strip-h: 28px; }

/* ------------------------------------------------------------------ base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--bar-h) + var(--strip-h) + 16px); }
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column;
  background: var(--page); color: var(--ink);
  font: 400 var(--t-sm)/1.5 var(--font);
  font-feature-settings: "cv11", "ss01";
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
a { color: var(--accent); text-decoration: none; text-underline-offset: 3px; }
a:hover { text-decoration: underline; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 6px; }
h1, h2, h3, h4, p { margin: 0; }
.num, td.num, .tabular { font-variant-numeric: tabular-nums; }
.team-head h2, .section-head h2, .hero h1, .feat h3, .results-head h1, .empty h3, .obj-title h1,
.host-head h2, .lc-head h2, .prose h1, .prose h2 {
  font-optical-sizing: none; font-variation-settings: "opsz" 36, "SOFT" 100, "WONK" 1;   /* Windsor-like: low contrast, soft */
}
.mono { font-family: var(--mono); font-size: 0.93em; letter-spacing: -0.01em; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.muted { color: var(--muted); }
.skip-link { position: fixed; left: 12px; top: -60px; z-index: 100; background: var(--card); color: var(--ink); padding: 8px 14px; border-radius: var(--r-sm); box-shadow: var(--shadow-lg); }
.skip-link:focus { top: 12px; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition-duration: 1ms !important; animation-duration: 1ms !important; animation-iteration-count: 1 !important; } }

/* ------------------------------------------------------------------ private strip + top bar */
.private-strip {
  position: sticky; top: 0; z-index: 60; height: var(--strip-h);
  display: flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--private); color: var(--private-ink);
  font-size: var(--t-xs); font-weight: 600; letter-spacing: 0.01em; padding: 0 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.private-strip svg { width: 13px; height: 13px; flex: none; }
.topbar {
  position: sticky; top: var(--strip-h); z-index: 50; height: var(--bar-h);
  background: var(--bar);
  -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--line);
  box-shadow: inset 0 3px 0 var(--brand);   /* Rubin band */
}
.topbar-inner { max-width: 1440px; height: 100%; margin: 0 auto; padding: 0 24px; display: flex; align-items: center; gap: 24px; }
.wordmark { display: inline-flex; align-items: baseline; gap: 7px; color: var(--ink); font-weight: 650; font-size: 15px; letter-spacing: -0.015em; white-space: nowrap; }
.wordmark:hover { text-decoration: none; }
.wordmark .wm-x { color: var(--brand); font-weight: 500; }
.wordmark .wm-sub { color: var(--muted); font-weight: 500; }
.nav { display: flex; gap: 4px; }
.nav a { color: var(--muted); font-weight: 500; padding: 6px 12px; border-radius: var(--r-pill); transition: color var(--dur) var(--ease), background var(--dur) var(--ease); }
.nav a:hover { color: var(--ink); text-decoration: none; background: var(--fill); }
.nav a[aria-current="page"] { color: var(--accent); background: var(--accent-soft); }
.bar-spacer { flex: 1; }
.searchbtn {
  display: inline-flex; align-items: center; gap: 10px; width: 280px; height: 36px; padding: 0 10px 0 12px;
  border: 1px solid var(--line); border-radius: var(--r-pill); background: var(--card); color: var(--muted);
  cursor: text; text-align: left; transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.searchbtn:hover { border-color: var(--line-strong); }
.searchbtn svg { width: 15px; height: 15px; flex: none; }
.searchbtn .ph { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kbd { font: 500 11px/1 var(--font); color: var(--muted); border: 1px solid var(--line); border-radius: 5px; padding: 3px 5px; background: var(--fill); }
.iconbtn { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: var(--r-pill); border: 0; background: transparent; color: var(--ink-2); cursor: pointer; transition: background var(--dur) var(--ease); }
.iconbtn:hover { background: var(--fill); }
.iconbtn svg { width: 18px; height: 18px; }
.mode-badge { font-size: var(--t-xs); font-weight: 600; color: var(--muted); border: 1px dashed var(--line-strong); padding: 2px 9px; border-radius: var(--r-pill); white-space: nowrap; }
/* Team access: a quiet lock button, a small password dialog and a notice toast (team.js). */
.teambtn { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px 0 10px; border-radius: var(--r-pill); border: 1px solid var(--line); background: transparent; color: var(--muted); font-size: 13px; font-weight: 500; white-space: nowrap; cursor: pointer; transition: color var(--dur) var(--ease), background var(--dur) var(--ease), border-color var(--dur) var(--ease); }
.teambtn:hover { color: var(--ink); background: var(--fill); border-color: var(--line-strong); }
.teambtn svg { width: 15px; height: 15px; flex: none; }
.team-dlg { position: fixed; z-index: 80; left: 50%; top: 14vh; transform: translateX(-50%); width: min(440px, calc(100vw - 32px)); max-height: calc(100vh - 28vh); overflow: auto; padding: 24px; box-shadow: var(--shadow-lg); animation: pop 180ms var(--ease); }
.team-head { display: flex; align-items: center; gap: 10px; }
.team-head svg { width: 20px; height: 20px; color: var(--muted); flex: none; }
.team-head h2 { font: 600 26px/1.15 var(--display); letter-spacing: -0.02em; }
.team-text { margin: 12px 0 20px; color: var(--ink-2); line-height: 1.55; }
.team-lbl { display: block; margin-bottom: 6px; color: var(--muted); font-size: var(--t-xs); font-weight: 500; }
.team-dlg .input { height: 40px; font-size: 15px; }
.team-err { margin-top: 8px; color: var(--private); font-size: 13px; font-weight: 500; }
.team-remember { display: flex; align-items: center; gap: 8px; margin-top: 18px; color: var(--ink-2); cursor: pointer; }
.team-hint { margin: 4px 0 0 24px; color: var(--muted); font-size: var(--t-xs); }
.team-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 24px; }
.toast { position: fixed; z-index: 85; left: 50%; bottom: 20px; transform: translateX(-50%); width: max-content; max-width: min(560px, calc(100vw - 32px)); display: flex; align-items: flex-start; gap: 10px; padding: 12px 10px 12px 16px; background: var(--card); color: var(--ink); border: 1px solid var(--line-strong); border-radius: var(--r-md); box-shadow: var(--shadow-lg); font-size: 13px; line-height: 1.45; animation: fade 160ms var(--ease); }
.toast > svg { width: 15px; height: 15px; flex: none; margin-top: 2px; color: var(--muted); }
.toast-x { display: inline-grid; place-items: center; width: 24px; height: 24px; flex: none; border: 0; border-radius: 6px; background: none; color: var(--muted); cursor: pointer; }
.toast-x:hover { background: var(--fill); color: var(--ink); }
.toast-x svg { width: 14px; height: 14px; }

/* ------------------------------------------------------------------ layout */
main { flex: 1; width: 100%; min-width: 0; }
main:focus { outline: none; }
.wrap { max-width: 1440px; margin: 0 auto; padding: 0 24px; }
.view { animation: fade-in 220ms var(--ease); }
@keyframes fade-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.footer { border-top: 1px solid var(--line); margin-top: 64px; }
.footer-inner { max-width: 1440px; margin: 0 auto; padding: 24px; display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; color: var(--muted); font-size: var(--t-xs); }
.footer a { color: var(--ink-2); }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow); min-width: 0; }
.section { margin-top: 64px; }
.section-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 24px; margin-bottom: 20px; }
.section-head h2 { font: 600 var(--t-xl)/1.15 var(--display); letter-spacing: -0.015em; }
.section-head p { color: var(--muted); max-width: 64ch; }
.eyebrow { font-size: var(--t-xs); font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); }

/* ------------------------------------------------------------------ buttons, pills, inputs */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 36px; padding: 0 16px;
  border-radius: var(--r-pill); border: 1px solid var(--line-strong); background: var(--card); color: var(--ink);
  font-weight: 500; font-size: var(--t-sm); white-space: nowrap; cursor: pointer; text-decoration: none;
  transition: background var(--dur) var(--ease), border-color var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.btn:hover { background: var(--fill); text-decoration: none; }
.btn:active { transform: scale(0.98); }
.btn:disabled { opacity: 0.4; cursor: default; transform: none; }
.btn svg { width: 16px; height: 16px; flex: none; }
.btn-primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn-accent { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn-accent:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn-quiet { border-color: transparent; background: transparent; color: var(--ink-2); }
.btn-quiet:hover { background: var(--fill); }
.btn-sm { height: 30px; padding: 0 12px; font-size: 13px; }
.btn-lg { height: 44px; padding: 0 22px; font-size: 15px; }
.linkbtn { border: 0; background: none; padding: 0; color: var(--accent); cursor: pointer; font-size: 13px; font-weight: 500; }
.linkbtn:hover { text-decoration: underline; }

.pill { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: var(--r-pill); background: var(--fill); color: var(--ink-2); font-size: var(--t-xs); font-weight: 600; white-space: nowrap; }
.pill.outline { background: transparent; border: 1px solid var(--line-strong); }
.pill.private { background: var(--private); color: var(--private-ink); }
.pill.diag { background: transparent; border: 1px solid currentColor; color: var(--warn); }
.pill.debass { background: var(--accent-soft); color: var(--accent); }
a.pill { text-decoration: none; transition: filter var(--dur) var(--ease), border-color var(--dur) var(--ease); }
a.pill:hover { text-decoration: none; filter: brightness(0.96); }
a.pill.outline:hover { border-color: var(--accent); color: var(--ink); }
.typ.ddf { color: var(--accent); font-weight: 500; }
.pfx { color: var(--muted); font-weight: 500; }

.input, .select {
  height: 36px; width: 100%; min-width: 0; padding: 0 12px; border-radius: var(--r-md);
  border: 1px solid var(--line-strong); background: var(--card); color: var(--ink); font: inherit; font-size: var(--t-sm);
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.input::placeholder { color: var(--muted); opacity: 0.85; }
.input:focus, .select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.input.invalid { border-color: var(--private); box-shadow: 0 0 0 3px rgba(163, 38, 31, 0.12); }
.input-sm { height: 30px; padding: 0 10px; font-size: 13px; border-radius: var(--r-sm); }
.select { appearance: none; -webkit-appearance: none; padding-right: 30px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 6l4 4 4-4' fill='none' stroke='%236B6A64' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center; background-size: 14px; }
input[type="checkbox"] { accent-color: var(--accent); width: 16px; height: 16px; margin: 0; flex: none; cursor: pointer; }

/* segmented pill control */
.seg { display: inline-flex; padding: 3px; gap: 2px; background: var(--fill); border-radius: var(--r-pill); }
.seg label { position: relative; }
.seg input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.seg span { display: inline-flex; align-items: center; height: 28px; padding: 0 12px; border-radius: var(--r-pill); font-size: 13px; font-weight: 500; color: var(--muted); cursor: pointer; white-space: nowrap; transition: background var(--dur) var(--ease), color var(--dur) var(--ease), box-shadow var(--dur) var(--ease); }
.seg span:hover { color: var(--ink); }
.seg input:checked + span { background: var(--card); color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,.08), 0 0 0 1px var(--line); }
.seg input:focus-visible + span { outline: 2px solid var(--focus); outline-offset: 1px; }
.seg.sm span { height: 24px; padding: 0 10px; font-size: 12px; }

/* toggle chip (checkbox styled as pill) */
.toggle { position: relative; display: inline-flex; }
.toggle input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.toggle span { display: inline-flex; align-items: center; gap: 7px; height: 30px; padding: 0 12px; border-radius: var(--r-pill); border: 1px solid var(--line-strong); font-size: 13px; font-weight: 500; color: var(--muted); cursor: pointer; user-select: none; white-space: nowrap; transition: all var(--dur) var(--ease); }
.toggle span::before { content: ""; width: 7px; height: 7px; border-radius: 50%; border: 1.5px solid currentColor; transition: all var(--dur) var(--ease); }
.toggle input:checked + span { color: var(--ink); border-color: var(--ink); }
.toggle input:checked + span::before { background: currentColor; }
.toggle input:disabled + span { opacity: 0.4; cursor: default; }
.toggle input:focus-visible + span { outline: 2px solid var(--focus); outline-offset: 2px; }
.toggle .n { color: var(--muted); font-weight: 400; }

/* legend chip for sources/bands */
.lchip { position: relative; display: inline-flex; }
.lchip input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.lchip span { display: inline-flex; align-items: center; gap: 7px; height: 30px; padding: 0 12px 0 10px; border-radius: var(--r-pill); background: var(--fill); font-size: 13px; font-weight: 500; color: var(--ink); cursor: pointer; user-select: none; white-space: nowrap; transition: opacity var(--dur) var(--ease), background var(--dur) var(--ease); }
.lchip span:hover { background: var(--fill-2); }
.lchip input:not(:checked) + span { opacity: 0.38; background: transparent; box-shadow: inset 0 0 0 1px var(--line-strong); }
.lchip input:focus-visible + span { outline: 2px solid var(--focus); outline-offset: 2px; }
.lchip .n { color: var(--muted); font-weight: 400; font-size: 12px; }
.lchip svg { width: 13px; height: 13px; flex: none; overflow: visible; }
.sw { width: 10px; height: 10px; border-radius: 3px; flex: none; }

/* ------------------------------------------------------------------ skeletons */
.sk { position: relative; overflow: hidden; background: var(--skeleton); border-radius: var(--r-md); }
.sk::after { content: ""; position: absolute; inset: 0; transform: translateX(-100%); background: linear-gradient(90deg, transparent, var(--skeleton-hi), transparent); animation: shimmer 1.4s infinite; }
@keyframes shimmer { to { transform: translateX(100%); } }
.sk-line { height: 12px; border-radius: 6px; }
html:not([data-route="home"]) #boot-home { display: none; }
html[data-route="home"] #boot-generic { display: none; }
.boot-generic { padding: 48px 0; display: grid; gap: 16px; }

/* ------------------------------------------------------------------ home */
.hero { padding: 88px 0 24px; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 32px 64px; align-items: end; }
.hero h1 { font: 650 clamp(40px, 5.2vw, 68px)/1.02 var(--display); letter-spacing: -0.03em; text-wrap: balance; }
.hero h1 em { font-style: italic; }
.hero .lede { font: 400 var(--t-lg)/1.55 var(--font); color: var(--ink-2); max-width: 44ch; text-wrap: pretty; }
.hero-search { grid-column: 1 / -1; margin-top: 24px; max-width: 760px; }
.hero-actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.spot { position: relative; }
.spot-field {
  display: flex; align-items: center; gap: 12px; height: 60px; padding: 0 20px;
  background: var(--card); border: 1px solid var(--line-strong); border-radius: var(--r-pill); box-shadow: var(--shadow);
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.spot-field:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft), var(--shadow); }
.spot-field svg { width: 20px; height: 20px; color: var(--muted); flex: none; }
.spot-field input { flex: 1; min-width: 0; height: 100%; border: 0; background: transparent; color: var(--ink); font: 400 18px/1 var(--font); letter-spacing: -0.01em; }
.spot-field input:focus { outline: none; }
.spot-field input::placeholder { color: var(--muted); }
.suggest {
  position: absolute; left: 0; right: 0; top: calc(100% + 8px); z-index: 40; padding: 6px; margin: 0; list-style: none;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-lg); max-height: 420px; overflow: auto;
}
.suggest li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 16px; align-items: center; padding: 10px 14px; border-radius: var(--r-md); cursor: pointer; }
.suggest li[aria-selected="true"] { background: var(--fill); }
.suggest .s-name { font-weight: 600; letter-spacing: -0.01em; }
.suggest .s-meta { color: var(--muted); font-size: 13px; text-align: right; white-space: nowrap; }
.suggest .s-sub { grid-column: 1 / -1; color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.suggest .s-action .s-name { font-weight: 500; }
.suggest mark { background: none; color: var(--ink); text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.suggest .s-empty { color: var(--muted); cursor: default; }

.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-top: 56px; }
.stat { padding: 24px; }
.stat .v { font: 500 44px/1 var(--font); letter-spacing: -0.035em; font-variant-numeric: tabular-nums; color: var(--accent); }
.stat .k { margin-top: 10px; font-weight: 500; }
.stat .d { margin-top: 2px; color: var(--muted); font-size: 13px; }
.stat .sk { height: 44px; width: 60%; }

.map-card { padding: 20px 20px 12px; }
.map-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 24px; padding: 0 4px 8px; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 18px; color: var(--ink-2); font-size: 13px; }
.legend .li { display: inline-flex; align-items: center; gap: 7px; }
.legend .dot { width: 8px; height: 8px; border-radius: 50%; }
.skymap { height: 540px; }
.skymap .sk { height: 100%; border-radius: var(--r-md); }
.sky-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; padding: 0 4px 14px; margin-bottom: 10px; border-bottom: 1px solid var(--line); }
.sky-tools .seg b.n, .tchip .n { font-weight: 500; color: var(--faint); margin-left: 6px; font-variant-numeric: tabular-nums; }
.sky-tools .seg input:checked + span b.n { color: var(--muted); }
.tchips { display: flex; flex-wrap: wrap; gap: 6px; }
.tchip { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; border-radius: var(--r-pill); border: 1px solid var(--line-strong); background: var(--card); color: var(--ink-2); font: 500 13px var(--font); cursor: pointer; white-space: nowrap; transition: background var(--dur) var(--ease), color var(--dur) var(--ease), border-color var(--dur) var(--ease); }
.tchip:hover { border-color: var(--accent); color: var(--ink); }
.tchip[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.tchip[aria-pressed="true"] .n { color: inherit; opacity: .8; }
.tchip.zero { color: var(--faint); }
.tchip.priv[aria-pressed="true"] { background: var(--private); border-color: var(--private); color: var(--private-ink); }
.tchip.priv:not([aria-pressed="true"]) { border-style: dashed; }
.tchip.locked { color: var(--muted); border-style: dashed; }
.tchip.locked svg { width: 13px; height: 13px; }
.legend a.go { color: var(--accent); font-weight: 600; }
.legend a.go svg { width: 13px; height: 13px; }
.legend .linkbtn { color: var(--muted); }
.hist-card { padding: 20px 24px 16px; }
.dhist { width: 100%; height: 200px; display: block; }
.dhist .bar { fill: var(--brand); opacity: 0.85; transition: opacity var(--dur) var(--ease); cursor: pointer; }
.dhist .bar:hover, .dhist .bar.hot { opacity: 1; fill: var(--accent-hover); }
.dhist .win { fill: var(--plot-window); }
.dhist text { fill: var(--muted); font: 500 11px var(--font); font-variant-numeric: tabular-nums; }
.dhist .axis { stroke: var(--line-strong); }
.dhist .grid { stroke: var(--line); }

.src-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.src-card { display: flex; flex-direction: column; gap: 12px; padding: 20px; color: var(--ink); transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease), border-color var(--dur) var(--ease); }
.src-card:hover { text-decoration: none; transform: translateY(-2px); border-color: var(--line-strong); box-shadow: var(--shadow-lg); }
.src-card .top { display: flex; align-items: center; gap: 10px; }
.src-card .top svg { width: 14px; height: 14px; }
.src-card h3 { font-size: var(--t-md); font-weight: 600; letter-spacing: -0.01em; }
.src-card p { color: var(--muted); font-size: 13px; line-height: 1.5; flex: 1; }
.src-card .nums { display: flex; gap: 20px; font-variant-numeric: tabular-nums; }
.src-card .nums b { display: block; font-size: var(--t-lg); font-weight: 600; letter-spacing: -0.02em; }
.src-card .nums span { color: var(--muted); font-size: 12px; }
.cov { height: 4px; border-radius: 2px; background: var(--fill-2); overflow: hidden; }
.cov i { display: block; height: 100%; background: var(--ink); border-radius: 2px; }
.src-card .go { color: var(--muted); font-size: 13px; font-weight: 500; display: inline-flex; align-items: center; gap: 6px; }
.src-card:hover .go { color: var(--accent); }
.src-card .go svg { width: 14px; height: 14px; }

.feat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.feat { display: flex; flex-direction: column; gap: 10px; padding: 20px; color: var(--ink); transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease), border-color var(--dur) var(--ease); }
.feat:hover { text-decoration: none; transform: translateY(-2px); border-color: var(--line-strong); box-shadow: var(--shadow-lg); }
.feat .row1 { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.feat h3 { font: 600 26px/1.1 var(--display); letter-spacing: -0.02em; }
.feat .meta { color: var(--muted); font-size: 13px; }
.feat .spark { height: 64px; width: 100%; }
.feat .spark .sk { height: 100%; }
.feat .foot { display: flex; flex-wrap: wrap; gap: 6px; }

/* ------------------------------------------------------------------ explore */
.explore { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 32px; align-items: start; padding-top: 32px; }
.rail { position: sticky; top: calc(var(--bar-h) + var(--strip-h) + 16px); max-height: calc(100vh - var(--bar-h) - var(--strip-h) - 32px); overflow: auto; overscroll-behavior: contain; padding: 0 4px 24px 0; scrollbar-width: thin; }
.rail-head { display: flex; align-items: center; justify-content: space-between; padding: 4px 0 12px; }
.rail-head h2 { font-size: var(--t-md); font-weight: 600; letter-spacing: -0.01em; }
.rail-close { display: none; }
.rail-search { position: relative; margin-bottom: 8px; }
.rail-search svg { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); width: 15px; height: 15px; color: var(--muted); pointer-events: none; }
.rail-search .input { padding-left: 34px; border-radius: var(--r-pill); background: var(--card); }
.facet { border-bottom: 1px solid var(--line); }
.facet-h { display: flex; align-items: center; gap: 8px; width: 100%; padding: 14px 2px; border: 0; background: none; cursor: pointer; text-align: left; font-weight: 600; font-size: var(--t-sm); color: var(--ink); }
.facet-h .ct { min-width: 18px; height: 18px; padding: 0 6px; border-radius: 9px; background: var(--accent); color: var(--accent-ink); font-size: 11px; font-weight: 600; display: inline-grid; place-items: center; }
.facet-h .chev { margin-left: auto; width: 16px; height: 16px; color: var(--muted); transition: transform var(--dur) var(--ease); }
.facet-h[aria-expanded="false"] .chev { transform: rotate(-90deg); }
.facet-b { padding: 0 2px 16px; }
.facet-note { color: var(--muted); font-size: 12px; margin: 6px 0 0; line-height: 1.45; }
.opt-list { display: flex; flex-direction: column; gap: 1px; }
.opt { display: flex; align-items: center; gap: 10px; padding: 5px 8px; margin: 0 -8px; border-radius: var(--r-sm); cursor: pointer; transition: background var(--dur) var(--ease); }
.opt:hover { background: var(--fill); }
.opt .l { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.opt .n { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.opt.zero .l, .opt.zero .n { opacity: 0.45; }
.opt svg { width: 12px; height: 12px; flex: none; }
.facet-find { margin-bottom: 8px; }
.facet-more { margin-top: 6px; }
.facet-tools { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 8px; }

.nfacet { padding: 0 8px; }
.nfacet .hist { display: block; width: 100%; height: 44px; }
.nfacet .hist .bg { fill: var(--fill-2); }
.nfacet .hist .fg { fill: var(--brand); opacity: 0.8; }
.nfacet .hist .fg.out { opacity: 0.18; }
.range { position: relative; height: 22px; margin: 2px 0 6px; }
.range .track { position: absolute; left: 0; right: 0; top: 10px; height: 2px; border-radius: 1px; background: var(--fill-2); }
.range .fill { position: absolute; top: 10px; height: 2px; background: var(--accent); border-radius: 1px; }
.range input[type="range"] { position: absolute; left: -8px; right: -8px; width: calc(100% + 16px); top: 0; height: 22px; margin: 0; background: none; pointer-events: none; -webkit-appearance: none; appearance: none; }
.range input[type="range"]::-webkit-slider-runnable-track { background: none; height: 22px; }
.range input[type="range"]::-moz-range-track { background: none; }
.range input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; pointer-events: auto; width: 16px; height: 16px; margin-top: 3px; border-radius: 50%; background: var(--card); border: 1.5px solid var(--accent); box-shadow: 0 1px 3px rgba(0,0,0,.18); cursor: grab; transition: transform var(--dur) var(--ease); }
.range input[type="range"]::-moz-range-thumb { pointer-events: auto; width: 14px; height: 14px; border-radius: 50%; background: var(--card); border: 1.5px solid var(--accent); box-shadow: 0 1px 3px rgba(0,0,0,.18); cursor: grab; }
.range input[type="range"]:active::-webkit-slider-thumb { transform: scale(1.12); cursor: grabbing; }
.range input[type="range"]:focus { outline: none; }
.range input[type="range"]:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 4px var(--accent-soft), 0 0 0 1.5px var(--accent); }
.range input[type="range"]:focus-visible::-moz-range-thumb { box-shadow: 0 0 0 4px var(--accent-soft); }
.nf-inputs { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 8px; align-items: center; }
.nf-inputs .dash { color: var(--muted); }
.nf-read { display: flex; justify-content: space-between; color: var(--muted); font-size: 12px; margin-top: 6px; font-variant-numeric: tabular-nums; }
.tabs-mini { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 10px; }
.pos-grid { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 8px; align-items: center; }
.pos-grid label { color: var(--muted); font-size: 13px; }

.results-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 24px; margin-bottom: 16px; }
.results-head h1 { font: 650 var(--t-2xl)/1 var(--display); letter-spacing: -0.03em; }
.rcount { color: var(--muted); font-size: var(--t-md); margin-top: 10px; font-variant-numeric: tabular-nums; }
.rcount b { color: var(--ink); font-weight: 600; }
.rtools { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.rtools .select { width: auto; max-width: 230px; height: 36px; border-radius: var(--r-pill); padding-left: 14px; }
.filters-btn { display: none; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 16px; min-height: 0; }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 6px 0 12px; border-radius: var(--r-pill); background: var(--card); border: 1px solid var(--line-strong); font-size: 13px; color: var(--ink); max-width: 100%; }
.chip .ck { color: var(--muted); }
.chip .cv { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chip button { display: inline-grid; place-items: center; width: 20px; height: 20px; border: 0; border-radius: 50%; background: transparent; color: var(--muted); cursor: pointer; padding: 0; flex: none; }
.chip button:hover { background: var(--fill); color: var(--ink); }
.chip button svg { width: 12px; height: 12px; }

.table-card { overflow: hidden; }
.table-wrap { overflow: auto; max-height: calc(100vh - var(--bar-h) - var(--strip-h) - 220px); min-height: 240px; }
table.data { border-collapse: separate; border-spacing: 0; width: 100%; font-size: 13.5px; }
table.data th, table.data td { padding: 11px 14px; text-align: left; white-space: nowrap; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.data thead th { position: sticky; top: 0; z-index: 2; background: var(--card); font-weight: 500; font-size: var(--t-xs); color: var(--muted); padding-top: 14px; padding-bottom: 10px; box-shadow: inset 0 -1px 0 var(--line-strong); border-bottom: 0; }
table.data th.num, table.data td.num { text-align: right; }
table.data tbody tr { transition: background 80ms linear; }
table.data.clickable tbody tr { cursor: pointer; }
table.data tbody tr:hover, table.data tbody tr:hover td.fix { background: var(--fill); }
table.data tbody tr.sel td { background: var(--accent-soft); }
table.data tbody tr:last-child td { border-bottom: 0; }
table.data .fix { position: sticky; left: 0; z-index: 1; background: var(--card); }
table.data thead th.fix { z-index: 3; }
table.data td.name { font-weight: 600; letter-spacing: -0.01em; }
table.data td.name a { color: var(--ink); }
table.data td.name .pfx { font-size: 12px; margin-right: 5px; }
.sortbtn { display: inline-flex; align-items: center; gap: 4px; border: 0; background: none; padding: 0; cursor: pointer; color: inherit; font: inherit; text-align: inherit; }
.sortbtn:hover { color: var(--ink); }
th[aria-sort="ascending"] .sortbtn, th[aria-sort="descending"] .sortbtn { color: var(--ink); }
.sortbtn .arrow { width: 10px; font-size: 9px; }
.th-sub { display: block; font-weight: 400; font-size: 11px; color: var(--muted); opacity: 0.85; margin-top: 1px; }
td .zero { color: var(--faint); }
td .rng { display: block; font-size: 11px; color: var(--muted); margin-top: 1px; }
/* Every results row has the same height, whether or not a cell carries an MJD range line. */
#rtable tbody td { height: 56px; }
td .typ { color: var(--ink-2); }
td .none { color: var(--faint); }
.empty { padding: 64px 24px; text-align: center; color: var(--muted); }
td > .empty { position: sticky; left: 0; box-sizing: border-box; width: min(720px, 100%); max-width: 90vw; }   /* stays in view in a wide, scrolling table */
.empty h3 { font: 600 var(--t-lg) var(--display); color: var(--ink); margin-bottom: 6px; }
.pager { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: space-between; padding: 12px 16px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }
.pager .pg { display: flex; gap: 6px; align-items: center; }
.pager .select { width: auto; height: 30px; border-radius: var(--r-pill); font-size: 13px; }

.popover { position: absolute; z-index: 45; min-width: 240px; max-height: 70vh; overflow: auto; padding: 8px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-lg); }
.popover .opt { margin: 0; }
.popover h4 { font-size: var(--t-xs); color: var(--muted); font-weight: 600; padding: 6px 8px 4px; text-transform: uppercase; letter-spacing: 0.06em; }
.pop-anchor { position: relative; }

.scrim { position: fixed; inset: 0; z-index: 70; background: rgba(8, 14, 18, 0.38); -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px); animation: fade 160ms var(--ease); }
@keyframes fade { from { opacity: 0; } }
.sheet-foot { display: none; }

/* ------------------------------------------------------------------ object */
.obj-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 24px 0 8px; }
.crumbs { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; }
.crumbs a { color: var(--muted); font-weight: 500; }
.crumbs a:hover { color: var(--ink); }
.crumbs svg { width: 12px; height: 12px; }
.prevnext { display: flex; align-items: center; gap: 8px; }
.prevnext .pos { color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; margin-right: 4px; }
.obj-hero { padding: 32px 0 8px; }
.obj-title { display: flex; flex-wrap: wrap; align-items: baseline; gap: 12px 20px; }
.obj-title h1 { font: 650 clamp(44px, 6vw, 76px)/0.95 var(--display); letter-spacing: -0.035em; }
.obj-title h1 .pfx { font: 500 0.36em/1 var(--font); letter-spacing: 0.02em; color: var(--muted); vertical-align: 0.9em; margin-right: 0.35em; }
.obj-title h1.dp2-id { font-size: clamp(30px, 4vw, 48px); overflow-wrap: anywhere; }   /* 18-digit DP2 diaObjectIds */
.obj-title .tags { display: flex; gap: 8px; align-items: center; transform: translateY(-8px); }
.coords { display: flex; flex-wrap: wrap; gap: 8px 24px; margin-top: 20px; }
.coord { display: inline-flex; align-items: center; gap: 8px; color: var(--ink-2); }
.coord .lbl { color: var(--muted); font-size: 12px; font-weight: 500; }
.coords.rids { margin-top: 10px; }
.rids .coord { flex-wrap: wrap; row-gap: 2px; }
.copy { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: var(--r-sm); border: 0; background: transparent; color: var(--muted); cursor: pointer; transition: background var(--dur) var(--ease), color var(--dur) var(--ease); }
.copy:hover { background: var(--fill); color: var(--ink); }
.copy svg { width: 14px; height: 14px; }
.copy.done { color: var(--accent); }
.facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 0; margin-top: 32px; border-top: 1px solid var(--line); }
.facts > div { padding: 16px 20px 16px 0; border-bottom: 1px solid var(--line); min-width: 0; }
.facts dt { color: var(--muted); font-size: 12px; font-weight: 500; margin-bottom: 4px; }
.facts dd { margin: 0; overflow-wrap: anywhere; }
.facts dd .sub { color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.facts.private-facts { margin-top: 0; }
.private-label { display: flex; align-items: center; gap: 8px; margin-top: 28px; color: var(--private); font-size: 12px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; }
:root[data-theme="dark"] .private-label, :root[data-theme="dark"] .team-err { color: #E0776E; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .private-label, :root:not([data-theme="light"]) .team-err { color: #E0776E; } }
.links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.links a { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 14px; border-radius: var(--r-pill); background: var(--fill); color: var(--ink); font-size: 13px; font-weight: 500; transition: background var(--dur) var(--ease); }
.links a:hover { background: var(--fill-2); text-decoration: none; }
.links a svg { width: 13px; height: 13px; color: var(--muted); }

/* host galaxy card (diagnostic products; object.js hostCardHtml) */
.host-card { margin-top: 40px; padding: 24px; }
.host-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.host-head h2 { font: 600 var(--t-xl)/1 var(--display); letter-spacing: -0.02em; margin-right: 4px; }
.host-body { display: grid; grid-template-columns: minmax(0, 400px) minmax(0, 1fr); gap: 24px 32px; margin-top: 20px; align-items: start; }
.host-fig { margin: 0; }
.host-fig img, .host-noimg { display: block; width: 100%; height: auto; aspect-ratio: 1; border-radius: var(--r-md); background: #000; }
.host-noimg { display: grid; place-items: center; background: var(--fill); color: var(--muted); font-size: 13px; }
.host-fig figcaption { margin-top: 10px; color: var(--muted); font-size: 12.5px; line-height: 1.5; }
.host-facts { margin-top: 0; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.host-fit h3 { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 22px 0 8px; font-size: var(--t-md); font-weight: 600; }
table.host-post th, table.host-post td { padding: 8px 10px; }
@media (max-width: 480px) { table.host-post th, table.host-post td { padding: 8px 6px; font-size: 12.5px; } table.host-post { width: 100%; } }
table.host-post thead th { position: static; box-shadow: none; }
.host-note { margin-top: 10px; color: var(--ink-2); font-size: 13px; line-height: 1.5; }
.host-note.muted { color: var(--muted); }
.host-card .links { margin-top: 16px; }
.host-sub { margin: 26px 0 10px; font-size: var(--t-md); font-weight: 600; }
.host-cands { margin-top: 20px; }
.host-cands summary { cursor: pointer; font-weight: 600; font-size: 13.5px; color: var(--ink-2); }
.host-cands table { margin-top: 10px; }
.host-cands tr.muted td { color: var(--muted); }
.rail-group { display: flex; align-items: center; gap: 8px; margin: 24px 0 0; color: var(--muted); font-size: 12px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; }
.rail-group .pill { text-transform: none; letter-spacing: 0; height: 20px; font-size: 11px; }

.lc-card { margin-top: 40px; padding: 24px 24px 12px; }
.lc-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; }
.lc-head h2 { font: 600 var(--t-xl)/1 var(--display); letter-spacing: -0.02em; }
.lc-ctl { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.lc-legend { display: flex; flex-wrap: wrap; gap: 8px 28px; margin-top: 20px; }
.lc-legend .grp { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.lc-legend .gl { color: var(--muted); font-size: 12px; font-weight: 500; margin-right: 4px; }
.lc-opts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.lc-plot { width: 100%; height: 580px; margin-top: 8px; }
.lc-msg { height: 100%; display: grid; place-items: center; color: var(--muted); text-align: center; padding: 24px; }
.spec-plot { height: 520px; }
.spec-legend { gap: 8px 10px; }
.sp-item { display: inline-flex; align-items: center; gap: 2px; max-width: 100%; min-width: 0; }
.spec-legend .lchip { min-width: 0; }
.spec-legend .lchip span { white-space: normal; height: auto; min-height: 30px; padding-top: 5px; padding-bottom: 5px; line-height: 1.35; }
.spec-legend .lchip .sw { align-self: center; }
.spl { font-weight: 500; white-space: normal; }
.spl .n { font-size: 12px; margin-left: 2px; }
.sp-file { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; color: var(--muted); }
.sp-file:hover { background: var(--fill); color: var(--accent); }
.sp-file svg { width: 13px; height: 13px; }
.lc-foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 24px; padding: 8px 0 4px; color: var(--muted); font-size: 12.5px; font-variant-numeric: tabular-nums; }
.tick-legend { display: inline-flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; }
.tk-item { white-space: nowrap; display: inline-flex; align-items: center; gap: 4px; }
.tk { display: inline-block; width: 2px; height: 10px; border-radius: 1px; }
.pts { margin-top: 16px; border-top: 1px solid var(--line); }
.pts > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 8px; padding: 14px 0; font-weight: 500; }
.pts > summary::-webkit-details-marker { display: none; }
.pts > summary svg { width: 16px; height: 16px; color: var(--muted); transition: transform var(--dur) var(--ease); transform: rotate(-90deg); }
.pts[open] > summary svg { transform: none; }
.pts .table-wrap { max-height: 460px; border: 1px solid var(--line); border-radius: var(--r-md); }
.hovercard { position: fixed; z-index: 90; pointer-events: none; max-width: 300px; padding: 10px 12px; background: var(--card); color: var(--ink); border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: var(--shadow-lg); font-size: 12.5px; line-height: 1.45; font-variant-numeric: tabular-nums; }
.hovercard .hc-t { display: flex; align-items: center; gap: 7px; font-weight: 600; margin-bottom: 3px; }
.hovercard .hc-r { color: var(--ink-2); }
.hovercard .hc-m { color: var(--muted); }
.hovercard .hc-n { color: var(--muted); font-style: italic; margin-top: 3px; overflow-wrap: anywhere; }

/* ------------------------------------------------------------------ about (editorial) */
.prose { max-width: 68ch; margin: 0 auto; padding: 72px 0 0; font-size: var(--t-md); line-height: 1.7; color: var(--ink-2); }
.prose .eyebrow { margin-bottom: 16px; }
.prose h1 { font: 650 clamp(40px, 5vw, 60px)/1.05 var(--display); letter-spacing: -0.03em; color: var(--ink); margin-bottom: 24px; text-wrap: balance; }
.prose .lede { font: 400 20px/1.55 var(--font); color: var(--ink-2); margin-bottom: 8px; }
.prose h2 { font: 600 var(--t-xl)/1.2 var(--display); letter-spacing: -0.02em; color: var(--ink); margin: 56px 0 16px; }
.prose h3 { font-size: var(--t-md); font-weight: 600; color: var(--ink); margin: 28px 0 8px; }
.prose p { margin: 0 0 16px; }
.prose ul { margin: 0 0 16px; padding-left: 22px; }
.prose li { margin: 6px 0; }
.prose li::marker { color: var(--faint); }
.prose .note { font-size: var(--t-sm); color: var(--muted); }
.prose .callout { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 20px 24px; margin: 24px 0; font-size: var(--t-sm); }
.prose .callout.private { border-color: var(--private); }
.prose table.data { font-size: 13.5px; }
.prose .table-card { margin: 16px 0 24px; }
.prose .table-wrap { max-height: none; min-height: 0; }
.prose table.data td { white-space: normal; vertical-align: top; }
.prose table.data td.num { white-space: nowrap; }
.stat-key { font-family: var(--mono); font-size: 12px; color: var(--ink-2); }
.stat-group td { font-weight: 600; color: var(--ink); background: var(--fill); }
.stat-indent { padding-left: 32px !important; }
.src-mark { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; color: var(--ink); }
.src-mark svg { width: 13px; height: 13px; }

/* ------------------------------------------------------------------ spotlight overlay */
.spotlight-dlg { position: fixed; z-index: 80; left: 50%; top: 14vh; transform: translateX(-50%); width: min(680px, calc(100vw - 32px)); animation: pop 180ms var(--ease); }
@keyframes pop { from { opacity: 0; transform: translate(-50%, 6px) scale(0.985); } }
.spotlight-dlg .spot-field { box-shadow: var(--shadow-lg); }
.spotlight-dlg .suggest { position: static; margin-top: 8px; }
.spot-hint { margin-top: 10px; text-align: center; color: rgba(255,255,255,.8); font-size: 12px; text-shadow: 0 1px 2px rgba(0,0,0,.4); }

/* ------------------------------------------------------------------ responsive */
@media (max-width: 1100px) {
  .explore { grid-template-columns: 264px minmax(0, 1fr); gap: 24px; }
  .searchbtn { width: 220px; }
}
@media (max-width: 900px) {
  .hero { grid-template-columns: minmax(0, 1fr); padding-top: 56px; gap: 20px; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .explore { grid-template-columns: minmax(0, 1fr); padding-top: 24px; }
  .filters-btn { display: inline-flex; }
  .rail {
    position: fixed; z-index: 75; left: 0; right: 0; bottom: 0; top: auto; max-height: 86vh; height: 86vh;
    background: var(--card); border-radius: 20px 20px 0 0; box-shadow: var(--shadow-lg);
    padding: 8px 20px 0; transform: translateY(105%); transition: transform 260ms var(--ease); visibility: hidden;
    display: flex; flex-direction: column;
  }
  .rail.open { transform: none; visibility: visible; }
  .rail::before { content: ""; display: block; width: 40px; height: 4px; border-radius: 2px; background: var(--fill-2); margin: 4px auto 8px; flex: none; }
  .rail .rail-body { flex: 1; overflow: auto; overscroll-behavior: contain; padding-bottom: 16px; }
  .rail-close { display: inline-grid; }
  .sheet-foot { display: block; padding: 12px 0 calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); flex: none; }
  .sheet-foot .btn { width: 100%; }
  .table-wrap { max-height: 70vh; }
  .searchbtn { width: 36px; padding: 0; justify-content: center; border-color: transparent; background: transparent; }
  .searchbtn .ph, .searchbtn .kbd { display: none; }
  .host-body { grid-template-columns: minmax(0, 1fr); }
  .host-fig { max-width: 400px; }
  .teambtn { width: 36px; height: 36px; padding: 0; justify-content: center; border-color: transparent; }
  .teambtn .tb-l { display: none; }
  .teambtn svg { width: 17px; height: 17px; }
}
@media (max-width: 640px) {
  .wrap, .topbar-inner, .footer-inner { padding-left: 16px; padding-right: 16px; }
  .topbar-inner { gap: 8px; }
  .wordmark .wm-sub { display: none; }
  .nav a { padding: 6px 9px; }
  .mode-badge { display: none; }
  .hero { padding-top: 40px; }
  .hero h1 { font-size: 40px; }
  .spot-field { height: 52px; padding: 0 16px; }
  .spot-field input { font-size: 16px; }
  .stats { gap: 12px; margin-top: 40px; }
  .stat { padding: 18px; }
  .stat .v { font-size: 32px; }
  .section { margin-top: 48px; }
  .skymap { height: 260px; }
  .map-card, .hist-card { padding: 16px 12px 8px; }
  .lc-card { padding: 16px 14px 8px; margin-top: 28px; }
  .host-card { padding: 16px 14px; margin-top: 28px; }
  .lc-plot { height: 420px; }
  .obj-title .tags { transform: none; }
  .results-head h1 { font-size: 36px; }
  .facts { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .facts > div { padding-right: 12px; }
  .private-strip { font-size: 11px; justify-content: flex-start; }
}
/* Narrow screens: the nav shrinks and scrolls sideways instead of widening the page. */
@media (max-width: 760px) {
  .nav { flex: 0 1 auto; min-width: 0; overflow-x: auto; scrollbar-width: none; -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 16px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 16px), transparent); }
  .nav::-webkit-scrollbar { display: none; }
  .nav a { flex: none; }
  .bar-spacer { min-width: 0; }
}
/* Compact top bar on phones: fixed-size icon buttons, and the wordmark doubles as the Home link. */
@media (max-width: 480px) {
  .topbar-inner { gap: 4px; }
  .searchbtn, .iconbtn, .teambtn { flex: none; width: 32px; height: 32px; }
  .nav a[data-nav="home"] { display: none; }
}
@media (max-width: 350px) {
  .wordmark { display: none; }
  .nav a[data-nav="home"] { display: inline-block; }
}
@media (max-width: 400px) {
  .facts { grid-template-columns: minmax(0, 1fr); }
  .nav a { padding: 6px 7px; font-size: 13px; }
}

/* ------------------------------------------------------------------ Rubin first? (Home) */
.lead-card { padding: 20px 24px 16px; }
.rf-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.rf-chip { display: inline-flex; align-items: baseline; gap: 8px; padding: 8px 14px; border-radius: var(--r-md); background: var(--fill); color: var(--ink-2); font-size: 13px; text-decoration: none; transition: background var(--dur) var(--ease); }
.rf-chip b { font: 650 20px/1 var(--display); color: var(--ink); font-variant-numeric: tabular-nums; }
.rf-chip:hover { background: var(--fill-2); color: var(--ink); }
.rf-chip.rf-earlier b, .rf-chip.rf-rubin b { color: var(--accent); }
.lead-panel + .lead-panel { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.lead-h { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 16px; font-size: 13px; margin-bottom: 4px; }
.lead-t { font-weight: 600; color: var(--ink); display: inline-flex; align-items: center; gap: 6px; }
.lead-s { color: var(--ink-2); }
.lead-s b { color: var(--accent); }
.private-panel .lead-t { color: var(--private); }
.private-panel .lead-s b { color: var(--private); }
.lhist { height: 170px; }
.lhist .zero { stroke: var(--ink-2); stroke-dasharray: 3 3; }
.lhist .bar.over { opacity: 0.55; }
.lhist.priv .bar { fill: var(--private); }
.lhist.priv .bar:hover { fill: var(--private); opacity: 1; }
.pill.rubin { background: var(--accent-soft); color: var(--accent); height: 20px; }
.lead-pos { color: var(--accent); font-weight: 600; }

/* ------------------------------------------------------------------ Images card */
.img-card { margin-top: 24px; padding: 24px; }
.img-row { display: flex; flex-wrap: wrap; gap: 20px 28px; align-items: flex-start; margin-top: 16px; }
.img-fig { margin: 0; max-width: 100%; }
.img-fig figcaption { margin-top: 8px; font-size: 12.5px; color: var(--muted); max-width: 380px; line-height: 1.45; }
.img-fig figcaption b { color: var(--ink-2); font-weight: 600; }
.imgbox { position: relative; width: 240px; height: 240px; max-width: 100%; border-radius: var(--r-md); overflow: hidden; background: #000; }
.imgbox img { display: block; width: 100%; height: 100%; object-fit: cover; }
.img-fig.dp2 .imgbox { width: 160px; height: 160px; }
.imgbox .sk { width: 100%; height: 100%; }
.reticle { position: absolute; left: 50%; top: 50%; width: 34px; height: 34px; transform: translate(-50%, -50%); pointer-events: none; overflow: visible; }
.reticle path { stroke: #FF46A0; stroke-width: 1.6; fill: none; }
.strip { display: flex; gap: 4px; }
.strip .tile { position: relative; width: 120px; height: 120px; background-size: 300% 100%; background-repeat: no-repeat; image-rendering: pixelated; border-radius: var(--r-sm); background-color: #000; }
.strip .tile span { position: absolute; left: 6px; bottom: 5px; font-size: 11px; font-weight: 600; color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,.8); }
.img-fig .neg { color: var(--warn); }
.img-fig .priv { color: var(--private); font-weight: 600; }
.img-fig.dp2 figcaption { max-width: 200px; }
@media (max-width: 480px) {
  .img-card { padding: 16px 12px; }
  .strip .tile { width: calc((100vw - 74px) / 3); height: calc((100vw - 74px) / 3); }
  .imgbox { width: min(240px, calc(100vw - 56px)); height: min(240px, calc(100vw - 56px)); }
}

/* ------------------------------------------------------------------ Classifications card */
.clf-card { margin-top: 24px; padding: 24px; }
.clf-lede, .clf-foot { font-size: 13.5px; color: var(--ink-2); margin: 8px 0 14px; max-width: 80ch; }
.clf-foot { margin: 14px 0 0; color: var(--muted); }
.clf-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.clf-grid { border-collapse: separate; border-spacing: 3px; font-size: 12px; }
.clf-grid th { font-weight: 500; color: var(--muted); font-variant-numeric: tabular-nums; text-align: center; min-width: 22px; }
.clf-grid th.lab { text-align: left; font-weight: 600; color: var(--ink); padding-right: 10px; min-width: 150px; max-width: 220px; white-space: nowrap; position: sticky; left: 0; background: var(--card); z-index: 1; }
.clf-grid th.lab small { display: block; font-weight: 400; color: var(--muted); font-size: 11px; }
.clf-grid th.lab a { color: var(--ink); text-decoration: none; }
.clf-grid th.lab a:hover { color: var(--accent); }
.clf-grid th.lab .pill { height: 18px; font-size: 10.5px; margin-top: 2px; }
.clf-grid td { width: 22px; height: 26px; padding: 0; border-radius: 4px; background: var(--fill); position: relative; }
.clf-grid td.c-none { background: transparent; box-shadow: inset 0 0 0 1px var(--line); }
.clf-grid td > i { position: absolute; inset: 0; border-radius: 4px; }
.clf-grid td.latest { box-shadow: 0 0 0 1.5px var(--ink-2); }
.clf-grid td.stack { display: table-cell; background: transparent; }
.clf-grid td.stack i { position: static; display: block; width: 100%; border-radius: 0; }
.clf-grid td.stack { overflow: hidden; }
.clf-grid tr.mdb td.stack { height: 34px; }
.clf-grid td.stack { vertical-align: top; }
.clf-grid td.stack i:first-child { border-radius: 4px 4px 0 0; }
.clf-grid td.stack i:last-child { border-radius: 0 0 4px 4px; }
.c-I > i, i.c-I, .clf-legend i.c-I, .callpill.c-I { background: var(--clf-ia); }
.c-S > i, i.c-S, .clf-legend i.c-S, .callpill.c-S { background: var(--clf-sn); }
.c-N > i, i.c-N, .clf-legend i.c-N, .callpill.c-N { background: var(--clf-snx); }
.c-O > i, i.c-O, .clf-legend i.c-O, .callpill.c-O { background: var(--clf-oth); }
.c-n > i, i.c-n, .clf-legend i.c-n, .callpill.c-n { background: var(--clf-nia); }
.clf-grid td.conf { background: var(--fill); }
.clf-grid td.conf > i { top: auto; left: 30%; right: 30%; height: 50%; background: var(--ink); border-radius: 2px 2px 0 0; }
.clf-grid tr.mdb td.conf { height: 30px; }
.clf-legend i.conf-key { width: 12px; background: linear-gradient(to right, var(--fill) 30%, var(--ink) 30%, var(--ink) 70%, var(--fill) 70%); }
.clf-legend .lg-h { font-weight: 600; color: var(--ink); }
.clf-legend .lg-h:not(:first-child) { margin-left: 8px; }
.clf-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 12px 0 16px; font-size: 12.5px; color: var(--ink-2); align-items: center; }
.clf-legend span { display: inline-flex; align-items: center; gap: 6px; }
.clf-legend i { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }
.callpill { display: inline-flex; align-items: center; height: 22px; padding: 0 9px; border-radius: var(--r-pill); color: #fff; font-size: 12px; font-weight: 600; white-space: nowrap; }
.clf-latest { max-height: none; min-height: 0; }
.clf-latest td.mono { font-size: 12.5px; }

/* ------------------------------------------------------------------ Classifiers page */
.prose.wide { max-width: 1120px; }
.prose.wide > p, .prose.wide > ul, .prose.wide > .sc-legend { max-width: 78ch; }
.sc-legend { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 13px; align-items: center; margin: 20px 0 8px; }
.sc-legend span { display: inline-flex; gap: 6px; align-items: center; }
.sc-legend i { width: 14px; height: 14px; border-radius: 3px; background: color-mix(in srgb, var(--accent) calc(var(--acc) * 100% - 40%), var(--fill)); }
.sc-table th, .sc-table td { text-align: center; }
.sc-table th.qh { border-bottom: 1px solid var(--line-strong); color: var(--ink); font-weight: 600; }
.sc-table th.lab { text-align: left; min-width: 190px; white-space: normal; }
.sc-table th.lab small { display: block; font-weight: 400; color: var(--muted); font-size: 11.5px; line-height: 1.35; }
.sc-table td.sc { background: color-mix(in srgb, var(--accent) calc(var(--acc) * 60% - 20%), transparent); }
.sc-table td.sc b { display: block; font-size: 15px; color: var(--ink); font-variant-numeric: tabular-nums; }
.sc-table td.sc small { display: block; font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.sc-table td.sc.few { opacity: 0.55; }
.sc-table td.sc-na, .sc-table td.sc-none { color: var(--faint); font-size: 12px; }

/* ------------------------------------------------------------------ Data page */
.codebox { position: relative; margin: 12px 0 20px; }
.codebox pre { margin: 0; padding: 16px 18px; padding-right: 96px; border-radius: var(--r-md); background: var(--fill); overflow-x: auto; font: 12.5px/1.6 var(--mono); color: var(--ink); }
.codebox .copy-code { position: absolute; top: 8px; right: 8px; }
details.colref { margin: 8px 0; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--card); }
details.colref summary { cursor: pointer; padding: 10px 14px; list-style: none; display: flex; align-items: center; gap: 8px; font-size: 14px; }
details.colref summary::-webkit-details-marker { display: none; }
details.colref summary svg { width: 14px; height: 14px; transition: transform var(--dur) var(--ease); }
details.colref[open] summary svg { transform: rotate(90deg); }
details.colref table { margin: 0 14px 12px; width: calc(100% - 28px); font-size: 13px; }
details.colref td.mono { white-space: nowrap; font-size: 12.5px; }
.refs li { font-size: 15px; }
@media (max-width: 480px) {
  .codebox pre { padding-right: 18px; padding-top: 44px; }
  .clf-card, .lead-card { padding: 16px 12px; }
  .clf-grid th.lab { min-width: 118px; max-width: 130px; white-space: normal; }
}
.salt-card { margin-top: 40px; padding: 24px; }   /* DP2 SALT fit (team only) */

/* home: DP2 SALT tier cards fill the row and show the TNS / DP2-only split */
.salt-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 860px) { .salt-grid { grid-template-columns: 1fr; } }
.salt-tier p { flex: 0 0 auto; }
.salt-bar { height: 6px; border-radius: 3px; background: var(--line-strong); overflow: hidden; margin-top: auto; }
.salt-bar i { display: block; height: 100%; background: var(--dot-data); border-radius: 3px 0 0 3px; }
.salt-split { display: flex; justify-content: space-between; gap: 12px; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.salt-split b { color: var(--ink); font-weight: 600; }

/* Explore: link uses team-only (Rubin DP2) filters and the visitor has not unlocked team access */
.team-need { display: flex; gap: 12px; align-items: flex-start; margin: 4px 0 14px; padding: 12px 16px; border: 1px solid var(--private); border-radius: var(--r-lg);
  background: var(--card); font-size: var(--t-sm); line-height: 1.5; }
.team-need .ico { color: var(--private); flex: none; margin-top: 2px; }
.team-need .btn { margin-left: 6px; }

/* Candidate-galaxy redshift audit */
.hp-page { padding-bottom: 32px; }
.hp-counts { display:grid; grid-template-columns:repeat(auto-fit,minmax(210px,1fr)); gap:12px; margin:20px 0 32px; }
.hp-counts .stat { display:flex; flex-direction:column; gap:8px; padding:18px; }
.hp-counts strong { font-size:28px; font-variant-numeric:tabular-nums; color:var(--accent); }
.hp-counts span { color:var(--muted); font-size:13px; }
.hp-notice,.hp-access { padding:20px 24px; margin:24px 0; border-left:3px solid var(--brand); }
.hp-notice p,.hp-access p { margin-bottom:0; }
.hp-sub { display:block; font-weight:400; font-size:11.5px; color:var(--muted); margin-top:5px; max-width:280px; }
.hp-search { display:flex; flex-direction:column; gap:7px; font-size:13px; max-width:520px; }
.hp-search input { padding:10px 12px; border:1px solid var(--line); border-radius:var(--r-md); background:var(--card); color:var(--ink); font:inherit; }
.hp-object-table { max-height:650px !important; }
.hp-object-table details p { font-size:12px; margin:10px 0; min-width:270px; }
