:root {
  color-scheme: dark;
  --paper: #0b1518;
  --ink: #edf6f4;
  --soft: #91aba9;
  --line: #294448;
  --accent: #8be9ce;
  font-family: system-ui, sans-serif;
  background: var(--paper);
  color: var(--ink);
}
* { box-sizing: border-box; }
body { margin: 0; }
.scene {
  min-height: 100svh;
  padding: clamp(24px, 4vw, 60px);
  display: flex;
  flex-direction: column;
  max-width: 1800px;
  margin-inline: auto;
}
.mast { display: flex; align-items: center; gap: 10px; font: 500 17px ui-monospace, monospace; letter-spacing: -.5px; }
.mast img { transform: translateY(.5px); }
.mast .wordmark { color: var(--ink); }
.mast .suffix { color: var(--soft); }
.content { display: grid; grid-template-columns: 1fr 1.1fr; align-items: center; flex: 1; gap: 20px; padding-block: 55px; }
.intro { position: relative; z-index: 1; }
.kicker { color: var(--accent); font: 12px ui-monospace, monospace; letter-spacing: 2px; text-transform: uppercase; margin: 0 0 22px; }
h1 { font-size: clamp(44px, 6.5vw, 100px); font-weight: 500; line-height: 1.04; letter-spacing: -.055em; margin: 0; }
.copy { color: var(--soft); font-size: 16px; line-height: 1.8; margin: 26px 0 0; }
.observatory { min-width: 0; }
.sky { position: relative; width: 100%; height: clamp(320px, 42vw, 570px); }
.drawing, .stars { position: absolute; inset: 0; width: 100%; height: 100%; }
.drawing { overflow: visible; pointer-events: none; }
.drawing polyline { fill: none; stroke: var(--accent); stroke-width: 1.1; opacity: .42; }
.drawing circle { fill: var(--soft); opacity: .2; }
.star {
  position: absolute;
  width: 44px;
  height: 44px;
  transform: translate(-50%, -50%);
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--ink);
  cursor: crosshair;
  border-radius: 50%;
  -webkit-tap-highlight-color: transparent;
}
.star::before { content: ''; position: absolute; width: 4px; height: 4px; top: 20px; left: 20px; background: currentColor; border-radius: 50%; box-shadow: 0 0 10px color-mix(in srgb, var(--accent) 45%, transparent); }
.star:nth-child(3n)::before { width: 6px; height: 6px; left: 19px; top: 19px; }
.star:hover, .star:focus-visible { color: var(--accent); }
.star:hover::before, .star:focus-visible::before { box-shadow: 0 0 0 7px color-mix(in srgb, var(--accent) 17%, transparent), 0 0 24px 1px var(--accent); }
.star:focus-visible { outline: 1px solid var(--accent); outline-offset: -4px; }
.caption { min-height: 40px; display: flex; align-items: baseline; gap: 24px; padding: 12px 24px 0; font: 13px ui-monospace, monospace; }
.index { color: var(--soft); font-variant-numeric: tabular-nums; }
.name { color: var(--accent); letter-spacing: 2px; text-transform: uppercase; }
footer { display: flex; align-items: center; justify-content: space-between; gap: 24px; color: var(--soft); font: 13px/1.6 ui-monospace, monospace; }
.next { flex-shrink: 0; border: 1px solid var(--line); border-radius: 4px; padding: 13px 19px; background: transparent; color: var(--ink); font: 14px ui-monospace, monospace; cursor: pointer; }
.next:hover { background: color-mix(in srgb, var(--accent) 8%, transparent); border-color: var(--accent); }
.next:focus-visible { outline: 2px solid var(--accent); outline-offset: 5px; }
@media (max-width: 720px) {
  .content { grid-template-columns: 1fr; gap: 16px; padding-block: 48px 26px; }
  h1 { font-size: clamp(44px, 9vw, 65px); }
  .sky { height: clamp(280px, 65vw, 420px); }
  .caption { padding-inline: 6px; }
  footer { flex-wrap: wrap; gap: 18px; }
}

.scene { position: relative; isolation: isolate; }
.universe { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none; color: var(--accent); }
.content { gap: 30px; }
.constellation-name { color: var(--soft); letter-spacing: 2px; text-transform: uppercase; font-size: 12px; }
.caption { min-height: 46px; }
.star-tooltip {
  position: absolute;
  display: none;
  max-width: calc(100% - 20px);
  padding: 6px 9px;
  border-radius: 3px;
  background: color-mix(in srgb, var(--paper) 94%, transparent);
  color: var(--accent);
  font: 13px/1.5 ui-monospace, monospace;
  overflow-wrap: anywhere;
  pointer-events: none;
  z-index: 2;
}
.star-tooltip.visible { display: block; }
.star.is-active { color: var(--accent); }
.stars .star::before { width: var(--size, 4px); height: var(--size, 4px); left: calc(22px - var(--size, 4px) / 2); top: calc(22px - var(--size, 4px) / 2); }
.star-announcement { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
@media (max-width: 720px) {
  .content { gap: 24px; }
  .caption { gap: 18px; }
}
