/* The Sky: home page */
.hero { position: relative; z-index: 1; min-height: 100vh; min-height: 100svh; overflow: hidden; }
#stars { position: fixed; inset: 0; width: 100%; height: 100%; display: block; pointer-events: none; z-index: 0; }
.stage { position: absolute; inset: 0; z-index: 1; }
#orrery { position: absolute; inset: 0; width: 100%; height: 100%; display: block; cursor: grab; touch-action: pan-y; outline: none; }
#orrery.grabbing { cursor: grabbing; }
#orrery:focus-visible { outline: 2px solid var(--gold-hi); outline-offset: -4px; }

.hero-copy { position: absolute; z-index: 2; left: clamp(20px, 4vw, 56px); top: clamp(28px, 7vh, 72px); max-width: min(560px, 46vw); pointer-events: none; }
.hero-copy h1 { font-size: clamp(2.1rem, 4.6vw, 4rem); line-height: 1.04; font-weight: 500; letter-spacing: -0.025em; text-wrap: balance; }
:lang(hi) .hero-copy h1 { line-height: 1.25; letter-spacing: 0; }
.hero-copy .sub { margin: 18px 0 0; color: var(--muted); font-size: 1.02rem; max-width: 30rem; }

.zoom { position: absolute; z-index: 3; left: clamp(20px, 4vw, 56px); top: 50%; transform: translateY(-50%); display: flex; flex-direction: column; gap: 8px; }
.zoom button {
  width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line-strong); background: var(--panel);
  backdrop-filter: blur(12px); cursor: pointer; font: 400 20px/1 var(--sans); color: var(--text);
}
.zoom button:hover { border-color: var(--gold); color: var(--gold-hi); }

/* telemetry */
.telemetry {
  position: absolute; z-index: 3; right: 24px; top: 24px; bottom: 196px; width: 340px; padding: 18px 18px 8px; overflow-y: auto; overscroll-behavior: contain;
  scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, 0.25) transparent;
}
.telemetry h2 { font: 600 11px/1 var(--mono); letter-spacing: .2em; text-transform: uppercase; color: var(--muted); margin: 0 0 12px; }
.telemetry section { padding-bottom: 14px; margin-bottom: 12px; border-bottom: 1px solid var(--line); }
.telemetry section:last-child { border-bottom: 0; margin-bottom: 0; }
.moon-block { display: flex; align-items: center; gap: 16px; }
.moon-block canvas { width: 64px; height: 64px; flex: 0 0 64px; }
.moon-block strong { display: block; font-weight: 500; font-size: 1.15rem; }
.moon-block span { color: var(--muted); font: 400 13px var(--mono); }
.moon-wrap h2 { margin-bottom: 10px; }
dl.pan { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 7px 14px; font-size: 14px; }
dl.pan dt { color: var(--muted); }
dl.pan dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; }
.pan-place { margin: 12px 0 0; color: var(--muted); font-size: 12px; }
.detail { background: rgba(232, 194, 122, 0.08); border: 1px solid rgba(232, 194, 122, 0.35) !important; border-radius: 12px; padding: 14px 14px 12px !important; position: relative; }
.detail .d-name { font-size: 1.4rem; font-weight: 500; }
.detail .d-sign { margin-top: 2px; font-family: var(--mono); font-size: 14px; color: var(--gold-hi); }
.detail .d-nak { margin-top: 6px; font-size: 14px; }
.detail .d-flags { margin-top: 6px; color: var(--gold); font: 500 12px var(--mono); letter-spacing: .06em; text-transform: uppercase; min-height: 1em; }
.detail .d-lon { margin-top: 6px; color: var(--muted); font: 400 12px var(--mono); }
.detail-close { position: absolute; right: 8px; top: 8px; width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--line-strong); background: transparent; cursor: pointer; line-height: 1; }
.detail-close:hover { border-color: var(--gold); color: var(--gold-hi); }
ul.grahas { list-style: none; margin: 0; padding: 0; }
.graha-row {
  display: grid; grid-template-columns: 1.15fr 1.1fr auto 14px; gap: 8px; width: calc(100% + 16px); padding: 6px 8px; margin: 0 -8px; text-align: left; align-items: center;
  background: transparent; border: 0; border-radius: 8px; cursor: pointer; font-size: 14px;
}
.graha-row:hover { background: rgba(255, 255, 255, 0.06); }
.graha-row.on { background: rgba(232, 194, 122, 0.14); }
.graha-row .g-name { font-weight: 500; }
.graha-row .g-sign { color: var(--muted); }
.graha-row .g-deg { font: 400 13px var(--mono); }
.graha-row .g-flag { font: 700 11px var(--mono); color: var(--gold); text-align: center; }
.panel.stale .pan, .panel.stale .grahas { opacity: .45; transition: opacity .2s; }
.telemetry .hint { color: var(--muted); font-size: 13px; margin: 0 0 6px; }

/* time bar */
.timebar {
  position: absolute; z-index: 4; left: clamp(20px, 4vw, 56px); right: clamp(20px, 4vw, 56px); bottom: 24px; padding: 12px 16px 14px;
  display: grid; gap: 10px; transition: border-color .2s;
}
.timebar.busy { border-color: rgba(232, 194, 122, 0.55); }
.tb-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
.t-pill { display: inline-flex; align-items: center; gap: 8px; font: 600 13px var(--mono); letter-spacing: .06em; min-width: 7.5em; }
.t-pill .dotl { width: 8px; height: 8px; border-radius: 50%; background: #5b6075; }
.t-pill.on .dotl { background: var(--ok); box-shadow: 0 0 10px var(--ok); }
.t-local { font: 400 13px var(--mono); color: var(--muted); }
.seg { display: inline-flex; gap: 4px; }
.seg button, .tb-btn {
  background: rgba(255, 255, 255, 0.05); border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; cursor: pointer;
  font: 500 12px var(--mono); color: var(--text); letter-spacing: .04em;
}
.seg button:hover, .tb-btn:hover { border-color: var(--gold); color: var(--gold-hi); }
.tb-btn.on { background: var(--gold); border-color: var(--gold); color: #14100a; }
.tb-btn.go { background: var(--gold); border-color: var(--gold); color: #14100a; font-weight: 700; }
input[type="text"] { min-width: 12em; }
.scrub-wrap { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; font: 400 11px var(--mono); color: var(--muted); }
input[type="range"] { width: 100%; accent-color: var(--gold); height: 28px; background: transparent; }
.place-box { position: relative; }
.place-list {
  position: absolute; z-index: 10; bottom: calc(100% + 6px); left: 0; min-width: 100%; max-width: 360px; margin: 0; padding: 6px; list-style: none;
  background: var(--panel-solid); border: 1px solid var(--line-strong); border-radius: 10px; max-height: 240px; overflow: auto;
}
.place-list button { display: block; width: 100%; text-align: left; padding: 8px 10px; border: 0; background: transparent; border-radius: 6px; cursor: pointer; font-size: 14px; }
.place-list button:hover, .place-list button:focus-visible { background: rgba(232, 194, 122, 0.16); }
.status-line { margin: 0; min-height: 1.2em; font: 400 12px var(--mono); color: var(--muted); }
.status-line.error { color: var(--bad); }
.sky-error { position: absolute; z-index: 5; left: 50%; top: 45%; transform: translateX(-50%); text-align: center; color: var(--bad); background: var(--panel); padding: 14px 20px; border-radius: 12px; }

/* below the fold */
.below { padding: clamp(56px, 9vw, 120px) clamp(20px, 5vw, 64px) 56px; position: relative; z-index: 2; background: linear-gradient(180deg, rgba(4, 5, 10, 0) 0, rgba(4, 5, 10, 0.88) 14%); }
.below h2 { font-size: clamp(1.5rem, 3vw, 2.2rem); margin-bottom: 26px; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 16px; }
.pcard { padding: 24px; text-decoration: none; color: inherit; display: block; transition: border-color .2s, transform .2s, background .2s; position: relative; overflow: hidden; }
.pcard:hover { border-color: rgba(232, 194, 122, 0.6); transform: translateY(-3px); background: rgba(20, 22, 38, 0.8); }
.pcard::after { content: ''; position: absolute; right: -40px; top: -40px; width: 140px; height: 140px; border-radius: 50%; background: radial-gradient(circle, rgba(232, 194, 122, 0.22), transparent 70%); }
.pcard h3 { font-size: 1.15rem; margin: 14px 0 8px; }
.pcard p { margin: 0; color: var(--muted); font-size: 14.5px; }
.apiband { margin-top: 56px; padding: clamp(24px, 4vw, 44px); display: grid; grid-template-columns: 1.1fr 1fr; gap: 28px; align-items: center; }
.apiband h2 { margin-bottom: 12px; }
.apiband p { color: var(--muted); margin: 0 0 20px; max-width: 30rem; }
pre.code { margin: 0; padding: 18px 20px; border-radius: 12px; background: rgba(0, 0, 0, 0.5); border: 1px solid var(--line); overflow: auto; font: 400 13px/1.6 var(--mono); color: #dfe3f2; }
pre.code .k { color: var(--gold-hi); }
pre.code .s { color: #8fd7ff; }

@media (max-width: 1100px) {
  .telemetry { width: 300px; }
  .hero-copy { max-width: 40vw; }
}
@media (max-width: 760px) {
  .hero { min-height: 0; display: flex; flex-direction: column; padding-bottom: 12px; }
  .hero-copy { position: relative; left: auto; top: auto; max-width: none; padding: 26px 20px 0; z-index: 2; order: 0; pointer-events: auto; }
  .hero-copy h1 { font-size: 2rem; }
  .hero-copy .sub { font-size: .95rem; margin-top: 10px; }
  .stage { position: relative; inset: auto; height: 44vh; min-height: 330px; order: 1; }
  .zoom { left: auto; right: 14px; top: auto; bottom: 12px; transform: none; flex-direction: row; }
  .timebar { position: relative; order: 2; left: auto; right: auto; bottom: auto; margin: 0 14px; }
  .telemetry { position: relative; order: 3; right: auto; top: auto; bottom: auto; width: auto; margin: 14px; max-height: none; overflow: visible; }
  .scrub-wrap { grid-template-columns: 1fr; }
  .scrub-wrap span { display: none; }
  .apiband { grid-template-columns: 1fr; }
  input[type="text"] { min-width: 0; width: 100%; }
  .place-box { flex: 1 1 100%; }
}
