:root {
  color-scheme: dark;
  --night: #080e1d;
  --night-2: #0e1730;
  --ink: #edf1f8;
  --muted: #9eaac1;
  --line: rgba(184, 199, 226, .2);
  --silver: #c8d4e8;
  --amber: #d7a35a;
  --panel: rgba(14, 23, 48, .78);
  --error: #ffb7a9;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { background: var(--night); }
body {
  margin: 0;
  min-width: 0;
  overflow-x: hidden;
  color: var(--ink);
  background:
    linear-gradient(rgba(255,255,255,.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.018) 1px, transparent 1px),
    var(--night);
  background-size: 32px 32px;
  line-height: 1.5;
}
button, input, select { font: inherit; }
button { cursor: pointer; }
a { color: inherit; }

.observatory-bar {
  width: min(1280px, calc(100% - 40px));
  min-height: 68px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--line);
}
.wordmark { display: flex; align-items: center; gap: 10px; font-weight: 750; text-decoration: none; }
.wordmark img { border-radius: 8px; }
.preview-flag, .not-live {
  color: var(--amber);
  font: 700 11px/1.2 ui-monospace, SFMono-Regular, Consolas, monospace;
  letter-spacing: .1em;
  text-transform: uppercase;
}

main { width: min(1280px, calc(100% - 40px)); margin: 0 auto; }
.intro {
  position: relative;
  min-height: 390px;
  display: grid;
  grid-template-columns: minmax(0, 760px) 1fr;
  align-items: center;
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}
.intro::after {
  content: "";
  position: absolute;
  width: 560px;
  height: 560px;
  right: -180px;
  top: -245px;
  border: 1px solid rgba(200, 212, 232, .15);
  border-radius: 50%;
  box-shadow: 0 0 0 84px rgba(200,212,232,.025), 0 0 0 168px rgba(200,212,232,.018);
}
.intro-copy { position: relative; z-index: 1; padding: 64px 0; }
.overline {
  margin: 0 0 18px;
  color: var(--amber);
  font: 700 12px/1.3 ui-monospace, SFMono-Regular, Consolas, monospace;
  letter-spacing: .16em;
  text-transform: uppercase;
}
h1, h2 { font-family: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif; font-weight: 400; }
h1 { margin: 0; max-width: 760px; font-size: clamp(48px, 7vw, 92px); line-height: .91; letter-spacing: -.045em; }
.lede { max-width: 650px; margin: 28px 0 20px; color: var(--silver); font-size: clamp(17px, 2vw, 20px); }
.privacy-note {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
}
.privacy-note span { color: #76bfa2; font-size: 9px; }
.orbit-mark {
  position: relative;
  justify-self: center;
  width: 180px;
  height: 180px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--muted);
  font: 700 10px ui-monospace, SFMono-Regular, Consolas, monospace;
}
.orbit-mark::before, .orbit-mark::after { content: ""; position: absolute; background: var(--line); }
.orbit-mark::before { left: 50%; top: -16px; bottom: -16px; width: 1px; }
.orbit-mark::after { top: 50%; left: -16px; right: -16px; height: 1px; }
.orbit-mark span { position: absolute; left: 14px; top: 76px; }
.orbit-mark b { position: absolute; left: 86px; top: -26px; color: var(--amber); }
.orbit-mark i { position: absolute; width: 6px; height: 6px; left: 86px; top: 86px; border-radius: 50%; background: var(--silver); box-shadow: 0 0 16px var(--silver); }

.studio {
  display: grid;
  grid-template-columns: minmax(300px, 390px) minmax(0, 1fr);
  gap: clamp(28px, 5vw, 72px);
  padding: 62px 0 80px;
}
.controls {
  align-self: start;
  padding: 26px;
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: 0 26px 80px rgba(0,0,0,.24);
}
.section-label {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 28px 0 15px;
  color: var(--silver);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.section-label:first-child { margin-top: 0; }
.section-label::after { content: ""; height: 1px; flex: 1; background: var(--line); }
.section-label span { color: var(--amber); font-family: ui-monospace, SFMono-Regular, Consolas, monospace; }
.field { min-width: 0; margin-bottom: 14px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field-wide { grid-column: 1 / -1; }
label, legend { display: block; margin-bottom: 7px; color: var(--muted); font-size: 12px; font-weight: 700; }
.optional { color: var(--muted); font-weight: 500; }
input, select {
  width: 100%;
  height: 44px;
  border: 1px solid rgba(184,199,226,.28);
  border-radius: 2px;
  padding: 0 11px;
  background: #0a1226;
  color: var(--ink);
}
input:focus, select:focus, button:focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; }
.coordinates[hidden] { display: none; }
.theme-picker { margin: 0 0 18px; padding: 0; border: 0; }
.theme-picker > label {
  display: inline-flex;
  align-items: center;
  margin: 0 14px 8px 0;
  color: var(--silver);
  cursor: pointer;
}
.theme-picker input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.swatch { width: 18px; height: 18px; margin-right: 7px; border: 2px solid transparent; border-radius: 50%; box-shadow: 0 0 0 1px var(--line); }
.theme-picker input:checked + .swatch { border-color: var(--amber); }
.theme-picker input:focus-visible + .swatch { outline: 2px solid var(--amber); outline-offset: 3px; }
.swatch.midnight { background: #081126; }
.swatch.blueprint { background: #163d58; }
.swatch.ivory { background: #e7e0ce; }
.error { min-height: 20px; margin: 0 0 10px; color: var(--error); font-size: 13px; }
.primary, .secondary {
  min-height: 46px;
  border: 1px solid var(--amber);
  border-radius: 2px;
  padding: 11px 16px;
  font-weight: 800;
}
.primary { width: 100%; background: var(--amber); color: #15100a; }
.primary:hover { background: #e8b66d; }
.secondary { background: transparent; color: var(--silver); }
.secondary:hover { background: rgba(215,163,90,.1); color: #fff; }

.preview-column { min-width: 0; }
.preview-topline, .download-row, .free-note {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.preview-topline { margin-bottom: 12px; color: var(--muted); font: 700 11px/1.5 ui-monospace, SFMono-Regular, Consolas, monospace; letter-spacing: .08em; text-transform: uppercase; }
.preview-topline strong { display: block; color: var(--silver); font-weight: 700; }
.coordinate-readout { text-align: right; }
.map-frame {
  width: min(100%, 760px);
  margin-left: auto;
  aspect-ratio: 4 / 5;
  border: 1px solid var(--line);
  background: #0a1020;
  box-shadow: 0 36px 100px rgba(0,0,0,.38);
}
.map-frame svg { display: block; width: 100%; height: 100%; }
.download-row { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 16px; }
.free-note { margin-top: 24px; padding: 18px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.free-note span:first-child { display: block; color: var(--muted); font-size: 12px; }
.free-note strong { display: block; margin-top: 3px; color: var(--silver); }

.explain { display: grid; grid-template-columns: .8fr 1.2fr; gap: 64px; padding: 72px 0; border-top: 1px solid var(--line); }
.explain h2 { margin: 0; font-size: clamp(34px, 4vw, 54px); line-height: 1; }
.explain ol { display: grid; gap: 22px; margin: 0; padding: 0; list-style: none; }
.explain li { position: relative; padding: 0 0 20px 52px; border-bottom: 1px solid var(--line); }
.explain li > span { position: absolute; left: 0; top: 1px; color: var(--amber); font: 700 12px ui-monospace, SFMono-Regular, Consolas, monospace; }
.explain li strong { font-family: "Iowan Old Style", Georgia, serif; font-size: 20px; font-weight: 400; }
.explain li p { margin: 6px 0 0; color: var(--muted); font-size: 14px; }
.accuracy-note { grid-column: 1 / -1; margin: 0; padding-top: 24px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.search-content { padding: 72px 0; border-top: 1px solid var(--line); }
.search-intro { max-width: 760px; }
.search-content h2 { margin: 0; max-width: 780px; font-size: clamp(34px, 4vw, 54px); line-height: 1.05; }
.search-intro > p:last-child { max-width: 760px; margin: 22px 0 0; color: var(--muted); font-size: 17px; }
.example-card { margin: 34px 0 58px; padding: 24px; border: 1px solid var(--line); background: var(--panel); }
.example-card span { color: var(--amber); font: 700 11px ui-monospace, SFMono-Regular, Consolas, monospace; letter-spacing: .12em; text-transform: uppercase; }
.example-card strong { display: block; margin-top: 8px; font-family: "Iowan Old Style", Georgia, serif; font-size: 24px; font-weight: 400; }
.example-card p { margin: 8px 0 0; color: var(--muted); }
.faq-block { max-width: 860px; }
.faq-block h2 { margin-bottom: 22px; }
.faq-block details { border-top: 1px solid var(--line); }
.faq-block details:last-of-type { border-bottom: 1px solid var(--line); }
.faq-block summary { padding: 18px 0; color: var(--silver); font-weight: 800; cursor: pointer; }
.faq-block details p { margin: -4px 0 20px; color: var(--muted); }
.related-links { display: flex; flex-wrap: wrap; gap: 12px 24px; margin-top: 40px; }
.related-links a { color: var(--amber); font-weight: 750; text-underline-offset: 4px; }
footer { width: min(1280px, calc(100% - 40px)); margin: 0 auto; padding: 28px 0 38px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 20px; color: var(--muted); font-size: 12px; }

@media (max-width: 900px) {
  .intro { grid-template-columns: 1fr; min-height: 0; }
  .orbit-mark { display: none; }
  .studio { grid-template-columns: 1fr; }
  .controls { width: min(100%, 620px); margin: 0 auto; }
  .map-frame { margin: 0 auto; }
  .explain { grid-template-columns: 1fr; gap: 36px; }
}
@media (max-width: 560px) {
  .observatory-bar, main, footer { width: calc(100% - 28px); }
  .preview-flag { max-width: 105px; text-align: right; }
  .intro-copy { padding: 54px 0; }
  h1 { font-size: 48px; }
  .studio { padding: 40px 0 58px; }
  .controls { padding: 20px 16px; }
  .field-row { grid-template-columns: 1fr; gap: 0; }
  .field-wide { grid-column: auto; }
  .preview-topline, .free-note { align-items: flex-start; flex-direction: column; }
  .coordinate-readout { text-align: left; }
  .download-row { display: grid; grid-template-columns: 1fr; }
  .secondary { width: 100%; }
  .explain, .search-content { padding: 54px 0; }
  footer { flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
@media print {
  @page { size: portrait; margin: 0; }
  body { background: #fff; }
  .observatory-bar, .intro, .controls, .preview-topline, .download-row, .free-note, .explain, .search-content, footer { display: none !important; }
  main, .studio, .preview-column, .map-frame { width: 100%; max-width: none; margin: 0; padding: 0; border: 0; box-shadow: none; }
  .studio { display: block; }
  .map-frame { height: 100vh; aspect-ratio: auto; }
  .map-frame svg { width: 100%; height: 100%; }
}
