/* AstroQ — one stylesheet for every page.
   Palette from the subject: the night sky (void), stellar colours by temperature (gold = a K star, blue = an O/B star),
   and the two narrow-band lines observers know best: [O III] 500.7 nm (live, now) and H-alpha 656.3 nm (anomaly). */
:root {
  --void: #04060c;
  --deep: #0a1020;
  --deep-2: #0e1630;
  --deep-3: #141e3e;
  --rim: #1c2647;
  --rim-2: #2b3866;
  --ink: #e9edf7;
  --dim: #a3adc8;
  --faint: #6f7a9b;
  --gold: #f2c879;
  --gold-2: #ffdca0;
  --gold-ink: #1b1407;
  --oiii: #5fe0c8;
  --halpha: #ff6b5b;
  --amber: #f0a35b;
  --blue: #9db4ff;
  --display: "Spectral", "Noto Serif KR", "Iowan Old Style", Georgia, serif;
  --ui: "IBM Plex Sans KR", -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", "Segoe UI", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --s-1: 13px; --s0: 15px; --s1: 17px; --s2: 21px; --s3: 26px; --s4: 33px; --s5: 41px; --s6: 52px; --s7: 66px; --s8: 84px;
  --wrap: 1240px;
  --gut: 24px;
  --r-s: 8px; --r-m: 12px; --r-l: 20px;
  color-scheme: dark;
}
@media (max-width: 720px) { :root { --gut: 16px; --s5: 33px; --s6: 38px; --s7: 44px; --s8: 52px; } }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; } }
body { margin: 0; background: var(--void); color: var(--ink); font: 400 var(--s0)/1.6 var(--ui); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
:lang(ko) body, body:lang(ko) { word-break: keep-all; overflow-wrap: anywhere; }
a { color: var(--gold-2); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
img, svg, canvas { display: block; max-width: 100%; }
::selection { background: rgba(242, 200, 121, .35); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 6px; }
code, pre, kbd { font-family: var(--mono); font-size: .92em; }
h1, h2, h3, h4 { margin: 0; font-weight: 400; }
p { margin: 0; }
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gut); }
.sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.num { font-variant-numeric: tabular-nums; }
.dim { color: var(--dim); }
.faint { color: var(--faint); }

/* ── type ─────────────────────────────────────────────── */
.display { font-family: var(--display); font-weight: 300; letter-spacing: -0.012em; line-height: 1.08; }
.h-hero { font-size: var(--s7); max-width: 15ch; }
:lang(ko) .h-hero { font-size: calc(var(--s7) * .86); line-height: 1.18; letter-spacing: -0.02em; max-width: 17ch; }
.h-sec { font-size: var(--s5); max-width: 22ch; }
:lang(ko) .h-sec { font-size: calc(var(--s5) * .9); line-height: 1.25; letter-spacing: -0.015em; }
.lead { font-size: var(--s1); color: var(--dim); max-width: 62ch; line-height: 1.65; }
.h3 { font-family: var(--display); font-weight: 500; font-size: var(--s2); line-height: 1.3; }

/* ── controls ─────────────────────────────────────────── */
.btn { --bg: var(--deep-3); --fg: var(--ink); --bd: var(--rim-2);
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 46px; padding: 12px 22px;
  border-radius: var(--r-m); border: 1px solid var(--bd); background: var(--bg); color: var(--fg);
  font: 500 var(--s0)/1.2 var(--ui); cursor: pointer; text-decoration: none !important; white-space: nowrap;
  transition: background .15s, border-color .15s, transform .15s; }
.btn:hover { --bg: #1a2650; --bd: #3a4a82; }
.btn:active { transform: translateY(1px); }
.btn.primary { --bg: var(--gold); --fg: var(--gold-ink); --bd: var(--gold); font-weight: 600; }
.btn.primary:hover { --bg: var(--gold-2); --bd: var(--gold-2); }
.btn.ghost { --bg: transparent; --bd: transparent; padding: 10px 14px; }
.btn.ghost:hover { --bg: rgba(255,255,255,.05); }
.btn.small { min-height: 36px; padding: 8px 14px; font-size: var(--s-1); border-radius: var(--r-s); }
.btn[disabled] { opacity: .5; cursor: not-allowed; }

.chip { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; min-height: 36px; border-radius: 999px;
  border: 1px solid var(--rim-2); background: rgba(10, 16, 32, .55); color: var(--ink); font: 400 var(--s-1)/1.2 var(--ui);
  cursor: pointer; white-space: nowrap; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); transition: border-color .15s, background .15s; }
.chip:hover { border-color: var(--gold); background: rgba(242, 200, 121, .08); }
.chip[aria-pressed="true"] { border-color: var(--gold); background: rgba(242, 200, 121, .14); color: var(--gold-2); }
.chip .k { color: var(--faint); font-size: 12px; }

.field { display: flex; align-items: stretch; gap: 0; border-radius: var(--r-m); border: 1px solid var(--rim-2); background: rgba(10, 16, 32, .78);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); transition: border-color .15s, box-shadow .15s; }
.field:focus-within { border-color: var(--gold); box-shadow: 0 0 0 4px rgba(242, 200, 121, .12); }
.field input, .field textarea { flex: 1; min-width: 0; background: transparent; border: 0; outline: 0; color: var(--ink); font: 400 var(--s1)/1.4 var(--ui); padding: 14px 18px; }
.field input::placeholder, .field textarea::placeholder { color: var(--faint); }
.field .btn { margin: 5px; min-height: 44px; }
.input { width: 100%; background: var(--deep); border: 1px solid var(--rim-2); border-radius: var(--r-s); color: var(--ink); font: 400 var(--s0)/1.4 var(--ui); padding: 12px 14px; }
.input:focus { border-color: var(--gold); outline: 0; box-shadow: 0 0 0 3px rgba(242,200,121,.12); }

/* custom range (time controls, speeds) */
.range { -webkit-appearance: none; appearance: none; width: 100%; height: 28px; background: transparent; cursor: pointer; }
.range::-webkit-slider-runnable-track { height: 4px; border-radius: 4px; background: linear-gradient(90deg, var(--gold) var(--p, 50%), var(--rim-2) var(--p, 50%)); }
.range::-moz-range-track { height: 4px; border-radius: 4px; background: var(--rim-2); }
.range::-moz-range-progress { height: 4px; border-radius: 4px; background: var(--gold); }
.range::-webkit-slider-thumb { -webkit-appearance: none; width: 18px; height: 18px; margin-top: -7px; border-radius: 50%; background: var(--ink); border: 3px solid var(--gold); }
.range::-moz-range-thumb { width: 14px; height: 14px; border-radius: 50%; background: var(--ink); border: 3px solid var(--gold); }

.seg { display: inline-flex; padding: 4px; gap: 4px; border-radius: var(--r-m); background: var(--deep); border: 1px solid var(--rim); }
.seg button { border: 0; background: transparent; color: var(--dim); font: 500 var(--s-1)/1 var(--ui); padding: 10px 14px; border-radius: 8px; cursor: pointer; min-height: 36px; }
.seg button[aria-selected="true"] { background: var(--deep-3); color: var(--ink); box-shadow: inset 0 0 0 1px var(--rim-2); }
.seg button:hover { color: var(--ink); }

/* status words: ok / absent / unavailable are three different answers */
.st { display: inline-flex; align-items: center; gap: 6px; font: 500 12px/1 var(--ui); padding: 5px 9px; border-radius: 6px; white-space: nowrap; }
.st::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.st.ok { color: var(--oiii); background: rgba(95, 224, 200, .1); }
.st.absent { color: var(--dim); background: rgba(163, 173, 200, .1); }
.st.unavailable { color: var(--amber); background: rgba(240, 163, 91, .12); }
.st.live::before { animation: pulse 1.6s ease-in-out infinite; }
.st.anom { color: var(--halpha); background: rgba(255, 107, 91, .12); }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .25; } }

/* ── nav ──────────────────────────────────────────────── */
.nav { position: fixed; inset: 0 0 auto 0; z-index: 50; transition: background .25s, border-color .25s; border-bottom: 1px solid transparent; }
.nav.solid { background: rgba(4, 6, 12, .82); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom-color: var(--rim); }
.nav .wrap { display: flex; align-items: center; gap: 8px; height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); font: 500 19px/1 var(--display); letter-spacing: .01em; margin-right: 18px; text-decoration: none !important; }
.brand svg { width: 26px; height: 26px; }
.nav .links { display: flex; gap: 2px; }
.nav .links a { color: var(--dim); padding: 10px 12px; border-radius: 8px; font-size: var(--s-1); font-weight: 500; text-decoration: none; }
.nav .links a:hover, .nav .links a[aria-current="page"] { color: var(--ink); background: rgba(255,255,255,.05); }
.nav .end { margin-left: auto; display: flex; gap: 6px; align-items: center; }
.nav .lang { color: var(--dim); font-size: var(--s-1); padding: 10px; }
.menu-btn { display: none; }
@media (max-width: 860px) {
  .nav .links { display: none; position: absolute; top: 64px; left: 0; right: 0; flex-direction: column; background: rgba(4,6,12,.96); border-bottom: 1px solid var(--rim); padding: 8px var(--gut) 16px; }
  .nav.open .links { display: flex; }
  .nav .links a { padding: 14px 8px; font-size: var(--s0); }
  .menu-btn { display: inline-flex; }
  .nav .end .hide-sm { display: none; }
}

/* ── sections ─────────────────────────────────────────── */
.sec { padding: 128px 0; position: relative; }
.sec + .sec { padding-top: 40px; }
@media (max-width: 720px) { .sec { padding: 80px 0; } .sec + .sec { padding-top: 24px; } }
.sec-head { display: grid; gap: 18px; margin-bottom: 48px; }
.sec-head .tag { color: var(--oiii); font-size: var(--s-1); font-weight: 500; display: inline-flex; align-items: center; gap: 8px; }
.panel { background: linear-gradient(180deg, rgba(14, 22, 48, .72), rgba(10, 16, 32, .72)); border: 1px solid var(--rim); border-radius: var(--r-l); }
.src { color: var(--faint); font-size: 12px; line-height: 1.5; }
.src a { color: var(--dim); }

/* ── hero ─────────────────────────────────────────────── */
.hero { position: relative; height: 100vh; height: 100svh; min-height: 640px; overflow: hidden; background: var(--void); }
.hero canvas.u3d { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; cursor: grab; }
.hero canvas.u3d:active { cursor: grabbing; }
.hero .poster { position: absolute; inset: 0; background: radial-gradient(ellipse at 70% 40%, #101a3a 0%, var(--void) 60%); }
.hero .veil { position: absolute; inset: auto 0 0 0; height: 66%; background: radial-gradient(ellipse 58% 62% at 24% 82%, rgba(4,6,12,.7), transparent 72%), linear-gradient(180deg, transparent, rgba(4,6,12,.6) 58%, var(--void)); pointer-events: none; }
@media (max-width: 860px) { .hero .veil { height: 72%; background: linear-gradient(180deg, transparent, rgba(4,6,12,.78) 42%, var(--void)); } }
.hero .copy { position: absolute; left: 0; right: 0; bottom: 44px; pointer-events: none; }
.hero .copy .wrap { display: grid; gap: 22px; }
.hero .copy .wrap > * { pointer-events: auto; max-width: 720px; }
.hero h1 { text-shadow: 0 2px 24px rgba(0,0,0,.6); }
.hero .sub { font-size: var(--s1); color: var(--dim); max-width: 58ch; text-shadow: 0 1px 12px rgba(0,0,0,.8); }
.hero .chips { display: flex; flex-wrap: wrap; gap: 8px; }
.hero .now { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; color: var(--faint); font-size: 12px; min-height: 18px; }
.hero .now b { color: var(--dim); font-weight: 500; }
.u-labels { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.u-label { position: absolute; left: 0; top: 0; transform: translate(-50%, -50%); white-space: nowrap; font: 400 12px/1 var(--ui); color: rgba(233, 237, 247, .78); padding-left: 12px; text-shadow: 0 0 6px #000, 0 0 2px #000; will-change: transform; }
.u-label::before { content: ""; position: absolute; left: 0; top: 50%; width: 6px; height: 6px; margin-top: -3px; border: 1px solid currentColor; border-radius: 50%; opacity: .8; }
.u-label.big { font-size: 13px; color: var(--gold-2); }
.u-label.teal { color: var(--oiii); }
.u-label.focus { font: 500 14px/1 var(--ui); color: var(--gold-2); padding-left: 18px; }
.u-label.focus::before { width: 12px; height: 12px; margin-top: -6px; left: -3px; border-width: 1.5px; opacity: 1; box-shadow: 0 0 10px rgba(242,200,121,.55); }
.u-tip { position: absolute; z-index: 5; pointer-events: none; background: rgba(10,16,32,.92); border: 1px solid var(--rim-2); border-radius: 10px; padding: 10px 12px; font-size: 12px; line-height: 1.5; max-width: 280px; transform: translate(14px, 14px); }
.u-tip b { color: var(--ink); font-weight: 600; font-size: 13px; }

/* the distance ruler: a log scale from 1 pc to 1 Gpc that is also the zoom control */
.ruler { position: absolute; right: max(var(--gut), calc((100vw - var(--wrap)) / 2 + var(--gut))); top: 108px; bottom: 300px; width: 190px; z-index: 4; user-select: none; touch-action: none; }
.ruler .track { position: absolute; right: 0; top: 0; bottom: 0; width: 34px; cursor: ns-resize; }
.ruler .line { position: absolute; right: 16px; top: 0; bottom: 0; width: 1px; background: linear-gradient(180deg, transparent, var(--rim-2) 6%, var(--rim-2) 94%, transparent); }
.ruler .tick { position: absolute; right: 0; transform: translateY(-50%); display: flex; align-items: center; gap: 10px; flex-direction: row-reverse; cursor: pointer; padding: 4px 0; background: none; border: 0; color: inherit; font: inherit; text-align: right; }
.ruler .tick i { width: 9px; height: 1px; background: var(--faint); margin-right: 12px; flex: none; }
.ruler .tick span { display: grid; gap: 2px; }
.ruler .tick .d { font: 500 12px/1 var(--ui); color: var(--dim); font-variant-numeric: tabular-nums; }
.ruler .tick .w { font: 400 11px/1.2 var(--ui); color: var(--faint); max-width: 150px; }
.ruler .tick:hover .d, .ruler .tick.on .d { color: var(--gold-2); }
.ruler .tick.on .w { color: var(--dim); }
.ruler .tick.on i { background: var(--gold); width: 14px; margin-right: 10px; }
.ruler .knob { position: absolute; right: 9px; width: 15px; height: 15px; margin-top: -7.5px; border-radius: 50%; background: var(--void); border: 2px solid var(--gold); box-shadow: 0 0 0 5px rgba(242,200,121,.12), 0 0 18px rgba(242,200,121,.5); pointer-events: none; }
.ruler .readout { position: absolute; right: 36px; transform: translateY(-50%); font: 500 13px/1 var(--ui); color: var(--gold-2); font-variant-numeric: tabular-nums; pointer-events: none; white-space: nowrap; background: rgba(4,6,12,.7); padding: 4px 6px; border-radius: 6px; }
.ruler .tour { position: absolute; right: 0; bottom: -58px; }
@media (max-width: 860px) {
  /* horizontal ruler under the nav: near on the left, far on the right */
  .ruler { left: var(--gut); right: var(--gut); top: 80px; bottom: auto; height: 46px; width: auto; }
  .ruler .track { left: 0; right: 0; width: auto; cursor: ew-resize; }
  .ruler .line { left: 0; right: 0; top: 50%; bottom: auto; width: auto; height: 1px; background: linear-gradient(90deg, transparent, var(--rim-2) 5%, var(--rim-2) 95%, transparent); }
  .ruler .tick { right: auto; width: 30px; height: 30px; padding: 0; transform: translate(-50%, -50%); justify-content: center; }
  .ruler .tick i, .ruler .tick.on i { width: 1px; height: 9px; margin: 0; }
  .ruler .tick.on i { height: 13px; }
  .ruler .tick > span { position: absolute; top: 26px; left: 50%; transform: translateX(-50%); }
  .ruler .tick .d { font-size: 10px; white-space: nowrap; }
  .ruler .tick .w { display: none; }
  .ruler .tick:nth-of-type(even):not(.on) .d { visibility: hidden; }
  .ruler .knob { right: auto; margin-left: -7.5px; }
  .ruler .readout { right: auto; transform: translate(-50%, -100%); font-size: 12px; }
  .ruler .tour { right: 0; bottom: auto; top: 74px; }
}

/* ── live sky ─────────────────────────────────────────── */
.sky-grid { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); gap: 20px; align-items: stretch; }
@media (max-width: 960px) { .sky-grid { grid-template-columns: 1fr; } }
.globe { position: relative; width: 100%; aspect-ratio: 1 / .86; border-radius: var(--r-l); overflow: hidden; background: radial-gradient(circle at 50% 50%, #0d1530, var(--void) 70%); }
.globe canvas { width: 100%; height: 100%; touch-action: none; cursor: grab; }
.globe .legend { position: absolute; left: 16px; bottom: 14px; display: flex; flex-wrap: wrap; gap: 10px 14px; font-size: 12px; color: var(--dim); max-width: calc(100% - 32px); }
.globe .legend span { display: inline-flex; align-items: center; gap: 6px; }
.globe .legend i { width: 9px; height: 9px; border-radius: 50%; }
@media (max-width: 720px) {
  /* on a phone the legend goes under the globe instead of over it */
  .globe { aspect-ratio: auto; display: flex; flex-direction: column; }
  .globe canvas { aspect-ratio: 1 / .92; height: auto; }
  .globe .legend { position: static; padding: 4px 16px 16px; max-width: none; gap: 8px 12px; font-size: 11.5px; }
}
.globe .overlay { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; padding: 24px; pointer-events: none; }
.feed { display: flex; flex-direction: column; min-height: 420px; max-height: 640px; }
.feed-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 16px 18px; border-bottom: 1px solid var(--rim); }
.feed-list { list-style: none; margin: 0; padding: 6px; overflow: auto; flex: 1; }
.ev { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; padding: 12px; border-radius: 12px; cursor: pointer; }
.ev:hover, .ev.on { background: rgba(255,255,255,.04); }
.ev .kd { grid-row: span 2; width: 10px; height: 10px; border-radius: 50%; margin-top: 6px; }
.ev .t { font-size: var(--s-1); color: var(--ink); line-height: 1.45; }
.ev .m { font-size: 12px; color: var(--faint); display: flex; gap: 10px; flex-wrap: wrap; }
.ev.anom .t { color: #ffd4cf; }
.ev.new { animation: evin .9s ease-out; }
@keyframes evin { from { background: rgba(95,224,200,.14); } to { background: transparent; } }
.empty { padding: 28px 22px; color: var(--dim); display: grid; gap: 10px; font-size: var(--s-1); line-height: 1.6; }
.empty strong { color: var(--ink); font-weight: 500; font-size: var(--s0); }

/* ── ask / object card ────────────────────────────────── */
.ask { display: grid; gap: 18px; }
.ask .chips { display: flex; flex-wrap: wrap; gap: 8px; }
.card { margin-top: 28px; display: grid; gap: 16px; }
.card-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 18px 28px; align-items: end; padding: 28px; }
.card-head h3 { font-family: var(--display); font-weight: 300; font-size: var(--s5); line-height: 1.1; }
.card-head .ids { display: flex; flex-wrap: wrap; gap: 6px 14px; color: var(--dim); font-size: var(--s-1); margin-top: 10px; }
.card-head .pos { text-align: right; color: var(--dim); font-size: var(--s-1); font-variant-numeric: tabular-nums; }
@media (max-width: 720px) { .card-head { grid-template-columns: 1fr; padding: 20px; } .card-head .pos { text-align: left; } }
.card-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 16px; }
.cell { padding: 20px 22px; min-width: 0; }
.cell h4 { font: 500 var(--s-1)/1.3 var(--ui); color: var(--dim); display: flex; justify-content: space-between; gap: 12px; align-items: center; margin-bottom: 14px; }
.c4 { grid-column: span 4; } .c5 { grid-column: span 5; } .c6 { grid-column: span 6; } .c7 { grid-column: span 7; } .c8 { grid-column: span 8; } .c12 { grid-column: span 12; }
@media (max-width: 960px) { .c4, .c5, .c6, .c7, .c8 { grid-column: span 12; } }
.kv { display: grid; grid-template-columns: minmax(84px, max-content) minmax(0, 1fr); gap: 8px 16px; font-size: var(--s-1); }
.kv dt { color: var(--faint); max-width: 180px; overflow-wrap: anywhere; }
.kv .full { grid-column: 1 / -1; max-width: none; }
.kv dd.full { margin-top: -2px; }
.kv dd { margin: 0; color: var(--ink); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.cutout { aspect-ratio: 1; border-radius: var(--r-m); overflow: hidden; background: var(--deep); position: relative; }
.cutout img { width: 100%; height: 100%; object-fit: cover; }
.cutout .cross { position: absolute; inset: 0; pointer-events: none; }
.plot { width: 100%; height: 220px; }
.why { font-size: 12px; color: var(--amber); line-height: 1.5; }
.paper { padding: 10px 0; border-top: 1px solid var(--rim); display: grid; gap: 3px; }
.paper:first-child { border-top: 0; padding-top: 0; }
.paper a { color: var(--ink); font-size: var(--s-1); line-height: 1.45; }
.paper span { color: var(--faint); font-size: 12px; }
.up { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; font-size: var(--s-1); padding: 8px 0; border-top: 1px solid var(--rim); }
.up:first-child { border-top: 0; }

/* ── orrery / light-curve lab ─────────────────────────── */
.duo { display: grid; grid-template-columns: minmax(0, 340px) minmax(0, 1fr); gap: 20px; }
@media (max-width: 960px) { .duo { grid-template-columns: 1fr; } }
.stage { position: relative; min-height: 560px; border-radius: var(--r-l); overflow: hidden; background: radial-gradient(ellipse at 50% 45%, #0d1430, var(--void) 72%); }
.stage canvas { width: 100%; height: 100%; position: absolute; inset: 0; touch-action: none; }
@media (max-width: 720px) { .stage { min-height: 460px; } .stage .tl .plist, .stage .tl .faint { display: none; } }
@media (max-width: 960px) { #systems .duo .stage { order: -1; } #systems .syslist { max-height: 300px; } }
.stage .hud { position: absolute; left: 18px; right: 18px; bottom: 16px; display: flex; gap: 14px; align-items: center; flex-wrap: wrap; font-size: 12px; color: var(--dim); }
.stage .hud .range { width: 160px; }
.stage .tl { position: absolute; left: 18px; top: 16px; font-size: 12px; color: var(--dim); display: grid; gap: 4px; }
.stage .tl b { color: var(--ink); font: 300 var(--s3)/1.1 var(--display); }
.syslist { display: flex; flex-direction: column; max-height: 560px; }
.syslist .list { overflow: auto; padding: 6px; display: grid; gap: 2px; }
.sys { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; padding: 11px 12px; border-radius: 10px; cursor: pointer; border: 0; background: none; color: inherit; text-align: left; font: inherit; }
.sys:hover { background: rgba(255,255,255,.04); }
.sys[aria-pressed="true"] { background: rgba(242,200,121,.1); }
.sys b { font-weight: 500; font-size: var(--s-1); color: var(--ink); }
.sys span { font-size: 12px; color: var(--faint); }
.plist { display: grid; gap: 6px; font-size: 12px; }
.plist .p { display: grid; grid-template-columns: 12px 1fr auto; gap: 10px; align-items: center; }
.plist .p i { width: 10px; height: 10px; border-radius: 50%; }
.lab { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 960px) { .lab { grid-template-columns: 1fr; } }
.lab .cell { padding: 18px; }
.lab canvas { width: 100%; height: 260px; }
.lab .res { font-size: var(--s-1); color: var(--dim); margin-top: 10px; min-height: 44px; }
.lab .res b { color: var(--gold-2); font-weight: 500; font-variant-numeric: tabular-nums; }

/* ── data map ─────────────────────────────────────────── */
.dmap { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.ds { padding: 18px; border-radius: var(--r-m); background: var(--deep); border: 1px solid var(--rim); display: grid; gap: 6px; align-content: start; }
.ds .n { font: 300 var(--s4)/1 var(--display); color: var(--ink); font-variant-numeric: tabular-nums; }
.ds .t { font-size: var(--s-1); color: var(--ink); font-weight: 500; }
.ds .m { font-size: 12px; color: var(--faint); line-height: 1.5; }

/* ── parallax flow ────────────────────────────────────── */
.flow { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; counter-reset: step; }
@media (max-width: 860px) { .flow { grid-template-columns: 1fr 1fr; gap: 20px 0; } }
@media (max-width: 520px) { .flow { grid-template-columns: 1fr; } }
.flow li { list-style: none; position: relative; padding: 0 22px 0 0; display: grid; gap: 10px; align-content: start; }
.flow li .n { font: 300 var(--s6)/1 var(--display); color: var(--gold); font-variant-numeric: tabular-nums; }
.flow li .h { font-weight: 600; color: var(--ink); }
.flow li p { color: var(--dim); font-size: var(--s-1); line-height: 1.6; }
.flow li .arc { position: absolute; top: 26px; right: 22px; left: 72px; height: 1px; background: linear-gradient(90deg, var(--rim-2), transparent); }
.flow li:last-child .arc { display: none; }

/* ── start (api / cli / mcp) ──────────────────────────── */
.start { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 960px) { .start { grid-template-columns: 1fr; } }
.start .cell { display: grid; gap: 12px; align-content: start; }
pre.code { margin: 0; background: #060a16; border: 1px solid var(--rim); border-radius: var(--r-m); padding: 16px 18px; overflow: auto; font-size: 13px; line-height: 1.7; color: #d7deef; white-space: pre; }
pre.code .c { color: var(--faint); }
pre.code .s { color: var(--gold-2); }
.copy-btn { justify-self: start; }

/* ── pricing / limits ─────────────────────────────────── */
.plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 960px) { .plans { grid-template-columns: 1fr; } }
.plan { padding: 26px; display: grid; gap: 14px; align-content: start; }
.plan .price { font: 300 var(--s5)/1 var(--display); }
.plan ul { margin: 0; padding: 0 0 0 18px; color: var(--dim); font-size: var(--s-1); display: grid; gap: 6px; }
.limits { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 40px; color: var(--dim); font-size: var(--s-1); line-height: 1.7; }
@media (max-width: 860px) { .limits { grid-template-columns: 1fr; } }
.limits h4 { color: var(--ink); font-weight: 600; font-size: var(--s0); margin-bottom: 6px; }

/* ── footer ───────────────────────────────────────────── */
.foot { border-top: 1px solid var(--rim); padding: 48px 0 64px; color: var(--faint); font-size: var(--s-1); }
.foot .wrap { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; }
.foot a { color: var(--dim); }
.foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
@media (max-width: 720px) { .foot .wrap { grid-template-columns: 1fr; } }

/* ── app pages (explore, docs, account) ───────────────── */
.page { padding: 104px 0 80px; min-height: 100vh; }
.prose { max-width: 760px; }
.prose h2 { font-family: var(--display); font-weight: 400; font-size: var(--s4); margin: 56px 0 14px; line-height: 1.2; }
.prose h3 { font-weight: 600; font-size: var(--s1); margin: 32px 0 10px; }
.prose p, .prose li { color: var(--dim); line-height: 1.75; }
.prose p + p { margin-top: 12px; }
.prose code { background: var(--deep-2); border: 1px solid var(--rim); padding: 1px 6px; border-radius: 5px; color: var(--ink); }
.prose pre.code code { background: none; border: 0; padding: 0; color: inherit; }
table.t { width: 100%; border-collapse: collapse; font-size: var(--s-1); }
table.t th { text-align: left; color: var(--faint); font-weight: 500; padding: 10px 12px; border-bottom: 1px solid var(--rim-2); white-space: nowrap; }
table.t td { padding: 10px 12px; border-bottom: 1px solid var(--rim); color: var(--ink); vertical-align: top; font-variant-numeric: tabular-nums; }
table.t td.d { color: var(--dim); }
.tbl-wrap { overflow: auto; border: 1px solid var(--rim); border-radius: var(--r-m); }
.docs { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 48px; }
.docs nav { position: sticky; top: 88px; align-self: start; max-height: calc(100vh - 110px); overflow: auto; font-size: var(--s-1); display: grid; gap: 2px; }
.docs nav .g { color: var(--faint); font-size: 12px; margin: 16px 0 6px; }
.docs nav a { color: var(--dim); padding: 6px 10px; border-radius: 6px; }
.docs nav a:hover { color: var(--ink); background: rgba(255,255,255,.04); text-decoration: none; }
@media (max-width: 960px) { .docs { grid-template-columns: 1fr; } .docs nav { position: static; max-height: none; } }
.route { border-top: 1px solid var(--rim); padding: 40px 0; scroll-margin-top: 80px; }
.route h2 { margin: 0 0 8px; font: 500 var(--s2)/1.3 var(--mono); }
.route h2 .m { color: var(--oiii); margin-right: 10px; }
.tabs { display: flex; gap: 4px; margin: 18px 0 8px; }
.ex { display: none; } .ex.on { display: block; }

/* explore layout */
.xp { position: fixed; inset: 64px 0 0 0; display: grid; grid-template-columns: 400px minmax(0, 1fr) 340px; }
.xp > * { min-height: 0; }
.xp .side { border-right: 1px solid var(--rim); overflow: auto; padding: 18px; display: grid; gap: 14px; align-content: start; background: rgba(6,9,20,.92); }
.xp .right { border-left: 1px solid var(--rim); display: flex; flex-direction: column; background: rgba(6,9,20,.92); }
.xp .center { position: relative; display: grid; grid-template-rows: minmax(0, 1fr) auto; }
.xp .view { position: relative; overflow: hidden; }
.xp .view canvas { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; }
.xp .view .switch { position: absolute; top: 14px; left: 14px; z-index: 3; }
.xp .sql { border-top: 1px solid var(--rim); background: rgba(6,9,20,.96); }
.xp .sql summary { cursor: pointer; padding: 12px 16px; color: var(--dim); font-size: var(--s-1); font-weight: 500; list-style: none; display: flex; justify-content: space-between; }
.xp .sql summary::-webkit-details-marker { display: none; }
.xp .sql .body { padding: 0 16px 16px; display: grid; gap: 10px; max-height: 46vh; overflow: auto; }
.xp .sql textarea { min-height: 96px; font: 400 13px/1.6 var(--mono); resize: vertical; }
.xp .card { margin-top: 0; }
.xp .card-head { padding: 18px; grid-template-columns: 1fr; gap: 12px; } .xp .card-head h3 { font-size: var(--s4); overflow-wrap: anywhere; }
.xp .card-head .pos { text-align: left; }
.xp .feed { max-height: none; min-height: 0; }
.xp .card-grid .c4, .xp .card-grid .c5, .xp .card-grid .c6, .xp .card-grid .c7, .xp .card-grid .c8 { grid-column: span 12; }
.xp .cell { padding: 16px; }
@media (max-width: 1180px) { .xp { grid-template-columns: 360px minmax(0, 1fr); } .xp .right { display: none; } }
@media (max-width: 820px) {
  /* phone: search, then the 3D view, then the card and the live feed */
  .xp { position: static; display: flex; flex-direction: column; padding-top: 64px; }
  .xp .side { display: contents; }
  .xp .side > form { order: 0; margin: 16px 16px 0; }
  .xp .side > .chips { order: 1; margin: 12px 16px 16px; }
  .xp .center { order: 2; height: 62vh; }
  .xp #xpcard { order: 3; padding: 16px; }
  .xp .right { order: 4; border: 0; display: flex; max-height: 520px; }
}

.notice { padding: 14px 16px; border-radius: var(--r-m); border: 1px solid rgba(240,163,91,.35); background: rgba(240,163,91,.07); color: #f6d3b0; font-size: var(--s-1); line-height: 1.6; }
.ok-box { padding: 14px 16px; border-radius: var(--r-m); border: 1px solid rgba(95,224,200,.35); background: rgba(95,224,200,.07); color: #c9f5ec; font-size: var(--s-1); line-height: 1.6; }
.meter { height: 8px; border-radius: 8px; background: var(--deep-3); overflow: hidden; }
.meter i { display: block; height: 100%; background: var(--gold); border-radius: 8px; }
.keyrow { display: grid; grid-template-columns: 1fr auto; gap: 6px 16px; align-items: center; padding: 14px 0; border-top: 1px solid var(--rim); }
.secret { font-family: var(--mono); font-size: 13px; background: #060a16; border: 1px dashed var(--gold); border-radius: 10px; padding: 12px 14px; overflow-wrap: anywhere; color: var(--gold-2); }
.noscript, .no3d { padding: 16px; color: var(--dim); }
