@import url('data:text/css,');

:root {
  --ink: #f4efe5;
  --muted: #96948d;
  --night: #090b0f;
  --panel: rgba(21, 23, 27, .72);
  --line: rgba(244, 239, 229, .14);
  --amber: #e7a74c;
  --amber-soft: #ffd38c;
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--night); }
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 78% 38%, rgba(66, 53, 31, .20), transparent 28%),
    radial-gradient(circle at 18% 72%, rgba(32, 43, 59, .18), transparent 30%),
    var(--night);
  overflow: hidden;
}
button, input { font: inherit; }
button { color: inherit; }
#starfield { position: fixed; inset: 0; width: 100%; height: 100%; opacity: .72; pointer-events: none; }

.site-header, footer {
  position: absolute; left: 50%; z-index: 2; display: flex; align-items: center; justify-content: space-between;
  width: calc(100% - clamp(48px, 10vw, 160px)); transform: translateX(-50%);
}
.site-header { top: 0; height: clamp(88px, 10vh, 112px); }
.wordmark { display: inline-flex; align-items: center; gap: 13px; color: var(--ink); text-decoration: none; }
.brand-orbit { width: clamp(44px, 3.2vw, 58px); height: clamp(44px, 3.2vw, 58px); overflow: visible; }
.brand-orbit ellipse { fill: none; stroke: rgba(244,239,229,.38); stroke-width: 1; }
.brand-core { fill: var(--amber-soft); filter: drop-shadow(0 0 7px var(--amber)); }
.brand-moon { fill: var(--amber); filter: drop-shadow(0 0 5px var(--amber)); }
.brand-type { display: flex; align-items: baseline; font-size: clamp(23px, 1.8vw, 31px); letter-spacing: -.055em; line-height: 1; }
.brand-type strong { font-weight: 750; }
.brand-type em { color: var(--muted); font-style: normal; font-weight: 450; }
.about-button, .back { border: 0; background: none; cursor: pointer; }
.about-button { color: var(--muted); font-size: 13px; }
.about-button:hover, .back:hover { color: var(--ink); }
.header-actions { display: flex; align-items: center; gap: clamp(18px, 3vw, 42px); }
.atlas-link { color: var(--muted); font-size: 12px; text-decoration: none; transition: color .2s; }
.atlas-link:hover { color: var(--ink); }
.atlas-link span { display: inline-grid; min-width: 25px; height: 17px; margin-left: 5px; place-items: center; border: 1px solid rgba(231,167,76,.35); border-radius: 20px; color: var(--amber-soft); font-size: 8px; }

main { position: relative; z-index: 1; width: 100%; height: 100dvh; min-height: 0; padding: clamp(94px, 12vh, 132px) clamp(32px, 7vw, 120px) clamp(54px, 7vh, 78px); }
.hero { display: grid; width: 100%; max-width: 1600px; height: 100%; margin: auto; grid-template-columns: minmax(0, 1.55fr) minmax(300px, .65fr); gap: clamp(54px, 8vw, 150px); align-items: center; }
.hero-copy { width: 100%; max-width: 930px; }
.eyebrow { display: flex; align-items: center; gap: 11px; color: var(--amber-soft); text-transform: uppercase; letter-spacing: .18em; font-size: 10px; font-weight: 700; }
.eyebrow span { width: 22px; height: 1px; background: var(--amber); }
h1, h2 { margin: 0; font-family: Georgia, "Times New Roman", serif; font-weight: 400; letter-spacing: -.055em; }
h1 { margin-top: 24px; font-size: clamp(58px, min(6.5vw, 11vh), 112px); line-height: .92; }
h1 em { color: var(--amber-soft); font-weight: 400; }
.intro { max-width: 580px; margin: clamp(24px, 3.5vh, 34px) 0 clamp(30px, 4.5vh, 46px); color: #b5b1a9; font-family: Georgia, serif; font-size: clamp(17px, 1.7vw, 21px); line-height: 1.5; }
.search-form { max-width: 720px; }
.search-form label { display: block; margin-bottom: 10px; color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .11em; }
.input-wrap { display: flex; padding: 7px; border: 1px solid rgba(244,239,229,.24); border-radius: 2px; background: rgba(6,8,11,.62); backdrop-filter: blur(12px); transition: border .2s, box-shadow .2s; }
.input-wrap:focus-within { border-color: var(--amber); box-shadow: 0 0 0 1px rgba(231,167,76,.15), 0 14px 60px rgba(0,0,0,.25); }
input { min-width: 0; flex: 1; height: 58px; padding: 0 20px; border: 0; outline: 0; color: var(--ink); background: transparent; font-family: Georgia, serif; font-size: 24px; }
input::placeholder { color: #555650; }
.search-submit { position: relative; display: flex; width: 100%; min-height: 66px; margin-top: 11px; align-items: center; justify-content: center; border: 1px solid #ffd38c; border-radius: 2px; padding: 0 28px; overflow: hidden; color: #15130f; background: linear-gradient(110deg, #e7a74c, #ffd38c 58%, #f0b65d); box-shadow: 0 12px 36px rgba(231,167,76,.13); font-size: 13px; font-weight: 800; letter-spacing: .025em; cursor: pointer; transition: box-shadow .22s, transform .22s, filter .22s; }
.search-submit::before { content: ''; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 20%, rgba(255,255,255,.35) 48%, transparent 75%); transform: translateX(-130%); transition: transform .55s ease; }
.search-submit:hover { filter: brightness(1.06); box-shadow: 0 16px 48px rgba(231,167,76,.22); transform: translateY(-2px); }
.search-submit:hover::before { transform: translateX(130%); }
.search-submit:active { transform: translateY(0); }
.search-submit:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.search-submit .arrow { position: absolute; right: 25px; }
.atlas-cta { display: grid; min-height: 74px; margin-top: 11px; grid-template-columns: 52px 1fr 30px; align-items: center; gap: 15px; padding: 9px 18px 9px 12px; border: 1px solid rgba(244,239,229,.18); color: var(--ink); background: linear-gradient(100deg, rgba(24,27,32,.82), rgba(13,15,19,.58)); text-decoration: none; backdrop-filter: blur(12px); transition: border-color .22s, background .22s, transform .22s; }
.atlas-cta:hover { border-color: rgba(231,167,76,.55); background: linear-gradient(100deg, rgba(34,31,27,.88), rgba(16,18,22,.68)); transform: translateY(-2px); }
.atlas-cta-graphic { position: relative; display: block; width: 52px; height: 52px; border-radius: 50%; background: radial-gradient(circle, rgba(231,167,76,.1), transparent 65%); }
.atlas-earth { position: absolute; left: 50%; top: 50%; width: 7px; height: 7px; margin: -3.5px; border-radius: 50%; background: #8ab9cc; box-shadow: 0 0 10px #8ab9cc; }
.atlas-ring { position: absolute; left: 50%; top: 50%; border: 1px solid rgba(244,239,229,.22); border-radius: 50%; transform: translate(-50%,-50%) rotate(-22deg); }
.atlas-ring.one { width: 27px; height: 13px; }
.atlas-ring.two { width: 45px; height: 24px; transform: translate(-50%,-50%) rotate(31deg); }
.atlas-object { position: absolute; right: 4px; top: 15px; width: 5px; height: 5px; border-radius: 50%; background: var(--amber); box-shadow: 0 0 8px var(--amber); }
.atlas-cta-copy { display: flex; min-width: 0; flex-direction: column; }
.atlas-cta-copy small { margin-bottom: 4px; color: var(--muted); font-size: 8px; text-transform: uppercase; letter-spacing: .13em; }
.atlas-cta-copy strong { font-family: Georgia, serif; font-size: 20px; font-weight: 400; letter-spacing: -.02em; }
.atlas-cta-copy em { display: inline-grid; min-width: 29px; height: 18px; margin-left: 5px; place-items: center; border-radius: 20px; color: #17140f; background: var(--amber-soft); font-family: ui-sans-serif, system-ui, sans-serif; font-size: 8px; font-style: normal; font-weight: 800; vertical-align: 3px; }
.atlas-cta-arrow { color: var(--amber-soft); font-size: 21px; text-align: right; transition: transform .22s; }
.atlas-cta:hover .atlas-cta-arrow { transform: translateX(4px); }
.arrow { font-size: 18px; font-weight: 400; }
.recent-panel { position: relative; width: 100%; max-width: 440px; max-height: 100%; padding: clamp(22px, 2.4vw, 34px); border: 1px solid var(--line); background: linear-gradient(145deg, rgba(25,27,31,.8), rgba(10,12,15,.58)); box-shadow: 0 30px 100px rgba(0,0,0,.22); backdrop-filter: blur(16px); }
.recent-panel::before { content: ''; position: absolute; top: -1px; left: 32px; width: 62px; height: 1px; background: var(--amber); box-shadow: 0 0 12px rgba(231,167,76,.45); }
.recent-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin-bottom: 18px; }
.recent-heading .eyebrow { margin: 0 0 10px; font-size: 8px; }
.recent-heading h2 { font-size: clamp(28px, 2.4vw, 38px); letter-spacing: -.035em; }
.live-indicator { display: inline-flex; align-items: center; gap: 6px; padding-top: 5px; color: var(--muted); font-size: 9px; text-transform: uppercase; letter-spacing: .13em; }
.live-indicator i { width: 5px; height: 5px; border-radius: 50%; background: #84b88a; box-shadow: 0 0 8px #84b88a; animation: pulse 2s ease-in-out infinite; }
.recent-list { margin: 0; padding: 0; border-top: 1px solid var(--line); list-style: none; }
.recent-list li { border-bottom: 1px solid rgba(244,239,229,.085); }
.recent-list button { width: 100%; min-height: clamp(38px, 4.2vh, 49px); display: grid; grid-template-columns: 25px 1fr auto; align-items: center; gap: 10px; padding: 0 3px; border: 0; color: var(--ink); background: transparent; text-align: left; cursor: pointer; transition: color .18s, padding .18s, background .18s; }
.recent-list button:hover { padding-left: 8px; color: var(--amber-soft); background: rgba(255,255,255,.025); }
.recent-rank { color: #555650; font-size: 9px; font-variant-numeric: tabular-nums; }
.recent-name { overflow: hidden; font-family: Georgia, serif; font-size: clamp(14px, 1.1vw, 17px); text-overflow: ellipsis; white-space: nowrap; }
.recent-catalog { color: #666761; font-size: 8px; text-transform: uppercase; letter-spacing: .08em; }
.recent-empty { padding: 22px 3px; color: var(--muted); font-family: Georgia, serif; font-size: 14px; }
.recent-rule { margin: 16px 0 0; color: #555650; font-size: 8px; line-height: 1.5; text-transform: uppercase; letter-spacing: .09em; }
@keyframes pulse { 50% { opacity: .35; transform: scale(.78); } }
.hidden { display: none !important; }
.loading { display: grid; height: 100%; place-content: center; text-align: center; }
.loading p { margin: 28px 0 5px; font-family: Georgia, serif; font-size: 25px; }
.loading small { color: var(--muted); }
.scanner { width: 80px; height: 80px; margin: auto; border: 1px solid var(--line); border-radius: 50%; position: relative; }
.scanner::before, .scanner::after { content: ''; position: absolute; inset: 12px; border: 1px solid var(--line); border-radius: 50%; }
.scanner::after { inset: 28px; background: var(--amber); border: 0; box-shadow: 0 0 22px var(--amber); }
.scanner span { position: absolute; left: 50%; top: 50%; width: 50%; height: 1px; background: linear-gradient(90deg, var(--amber), transparent); transform-origin: left; animation: scan 1.4s linear infinite; }
@keyframes scan { to { transform: rotate(360deg); } }

.result { display: grid; height: 100%; grid-template-columns: 1.05fr .95fr; gap: clamp(48px, 7vw, 100px); padding: clamp(28px, 5vh, 58px) 0; align-items: center; overflow-y: auto; scrollbar-width: thin; }
.back { padding: 8px 0; margin-bottom: clamp(24px, 4vh, 46px); color: var(--muted); font-size: 12px; }
.catalog { margin: 35px 0 2px; color: var(--muted); font-size: 13px; letter-spacing: .12em; }
.result h2, .message h2 { color: var(--amber-soft); font-size: clamp(60px, 7vw, 96px); line-height: 1; }
.object-type { color: var(--muted); font-size: 13px; }
.match-note { max-width: 540px; margin: 18px 0 0; padding: 13px 16px; border-left: 1px solid var(--amber); color: #aaa69e; background: rgba(231,167,76,.055); font-family: Georgia, serif; font-size: 13px; line-height: 1.55; }
.distance-block { margin-top: clamp(30px, 5vh, 52px); }
.distance-block p { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .12em; }
.distance-block strong { display: block; font-family: Georgia, serif; font-size: clamp(42px, 5vw, 66px); font-weight: 400; letter-spacing: -.04em; }
.distance-block > span { color: var(--amber); font-size: 12px; }
.equivalents { display: flex; gap: 34px; margin-top: 35px; padding-top: 24px; border-top: 1px solid var(--line); }
.equivalents div { display: flex; flex-direction: column; }
.equivalents span { font-family: Georgia, serif; font-size: 21px; }
.equivalents small { margin-top: 4px; color: var(--muted); font-size: 9px; text-transform: uppercase; letter-spacing: .08em; }

.orbit-card { width: 100%; max-width: 500px; justify-self: end; padding: 18px; border: 1px solid var(--line); background: var(--panel); backdrop-filter: blur(12px); }
.orbit-visual { position: relative; aspect-ratio: 1; overflow: hidden; background: radial-gradient(circle, rgba(231,167,76,.06), transparent 55%); }
.sun { position: absolute; left: 50%; top: 50%; width: 12px; height: 12px; margin: -6px; border-radius: 50%; background: #ffd07d; box-shadow: 0 0 30px 6px rgba(255,186,74,.45); }
.earth-orbit, .object-orbit { position: absolute; left: 50%; top: 50%; border: 1px solid rgba(244,239,229,.17); border-radius: 50%; transform: translate(-50%,-50%) rotate(-9deg); }
.earth-orbit { width: 39%; height: 39%; }
.object-orbit { width: 82%; height: 55%; animation: breathe 8s ease-in-out infinite alternate; }
.earth, .object-dot { position: absolute; left: 50%; top: -4px; width: 7px; height: 7px; border-radius: 50%; background: #8ab9cc; box-shadow: 0 0 10px #8ab9cc; }
.object-dot { left: auto; right: 5%; top: 77%; width: 8px; height: 8px; background: var(--amber); box-shadow: 0 0 16px var(--amber); }
.crosshair { position: absolute; background: rgba(244,239,229,.035); }
.crosshair.x { left: 0; right: 0; top: 50%; height: 1px; }
.crosshair.y { top: 0; bottom: 0; left: 50%; width: 1px; }
@keyframes breathe { to { transform: translate(-50%,-50%) rotate(-3deg) scale(1.025); } }
.facts { display: grid; grid-template-columns: repeat(3,1fr); gap: 10px; padding-top: 18px; border-top: 1px solid var(--line); }
.facts div { display: flex; flex-direction: column; }
.facts small { color: var(--muted); font-size: 9px; text-transform: uppercase; letter-spacing: .08em; }
.facts span { margin-top: 7px; font-family: Georgia, serif; font-size: 15px; }
.citation { margin: 22px 0 0; color: #aaa69e; font-family: Georgia, serif; font-size: 13px; line-height: 1.55; }
.source { margin: 18px 0 0; color: #5d5e59; font-size: 9px; }

.message { display: flex; height: 100%; max-width: 780px; padding: clamp(38px, 8vh, 90px) 0; flex-direction: column; justify-content: center; }
.message h2 { margin: 28px 0; }
.message > p:not(.eyebrow) { color: #aaa69e; font-family: Georgia, serif; font-size: 19px; line-height: 1.6; }
.matches { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.matches button { border: 1px solid var(--line); padding: 12px 16px; color: var(--ink); background: rgba(255,255,255,.03); cursor: pointer; }

footer { bottom: 0; height: clamp(46px, 6vh, 62px); color: #555650; font-size: 9px; text-transform: uppercase; letter-spacing: .12em; }
dialog { width: min(530px, calc(100% - 32px)); padding: 42px; border: 1px solid #393a38; color: var(--ink); background: #111318; box-shadow: 0 25px 120px #000; }
dialog::backdrop { background: rgba(0,0,0,.72); backdrop-filter: blur(5px); }
dialog h2 { margin: 24px 0; color: var(--amber-soft); font-size: 43px; }
dialog p { color: #aaa69e; line-height: 1.65; }
.dialog-close { position: absolute; top: 13px; right: 16px; border: 0; color: var(--muted); background: none; font-size: 24px; cursor: pointer; }

@media (max-width: 900px) {
  body { display: block; min-height: 100dvh; overflow-x: hidden; overflow-y: auto; }
  .site-header { position: relative; left: auto; width: calc(100% - 28px); height: 78px; margin: auto; transform: none; }
  .brand-orbit { width: 42px; height: 42px; }
  .brand-type { font-size: 23px; }
  .about-button { min-height: 44px; padding: 0 2px 0 18px; }
  .header-actions { gap: 12px; }
  .atlas-link { font-size: 0; }
  .atlas-link::before { content: 'Atlas'; font-size: 12px; }
  main { width: calc(100% - 28px); height: auto; min-height: calc(100dvh - 78px); margin: auto; padding: 0; }
  .hero { display: grid; min-height: calc(100dvh - 78px); height: auto; padding: clamp(44px, 7vh, 70px) 0 72px; grid-template-columns: 1fr; gap: 64px; align-items: start; }
  .hero-copy { align-self: center; }
  .eyebrow { font-size: 9px; line-height: 1.4; }
  h1 { margin-top: 22px; font-size: clamp(46px, 13.7vw, 68px); line-height: .95; }
  .intro { margin: 26px 0 36px; font-size: 17px; line-height: 1.5; }
  .search-form label { margin-bottom: 9px; }
  .input-wrap { display: block; }
  input { width: 100%; height: 56px; padding: 0 15px; font-size: 21px; }
  .search-submit { min-height: 60px; margin-top: 10px; padding: 0 18px; }
  .search-submit .arrow { right: 19px; }
  .atlas-cta { min-height: 72px; grid-template-columns: 46px 1fr 24px; gap: 12px; padding-inline: 10px 14px; }
  .atlas-cta-graphic { width: 46px; height: 46px; }
  .atlas-cta-copy strong { font-size: 18px; }
  .recent-panel { max-width: none; padding: 24px 18px; }
  .recent-heading h2 { font-size: 32px; }
  .recent-list button { min-height: 48px; grid-template-columns: 27px 1fr auto; }
  .recent-name { font-size: 17px; }
  .result { display: grid; height: auto; min-height: calc(100dvh - 78px); grid-template-columns: 1fr; gap: 42px; padding: 38px 0 64px; overflow: visible; }
  .back { margin-bottom: 35px; }
  .catalog { margin-top: 26px; }
  .result h2, .message h2 { font-size: clamp(52px, 16vw, 78px); overflow-wrap: anywhere; }
  .distance-block { margin-top: 38px; }
  .distance-block strong { font-size: clamp(36px, 11vw, 52px); overflow-wrap: anywhere; }
  .equivalents { gap: 17px; flex-wrap: wrap; }
  .orbit-card { max-width: none; margin-bottom: 10px; padding: 14px; }
  .facts { gap: 6px; }
  .facts span { font-size: 14px; overflow-wrap: anywhere; }
  .message { min-height: calc(100dvh - 78px); height: auto; padding: 48px 0 70px; justify-content: center; }
  footer { display: none; }
  dialog { padding: 38px 24px 28px; }
  dialog h2 { font-size: 38px; }
}

@media (max-width: 380px) {
  .site-header, main { width: calc(100% - 22px); }
  h1 { font-size: 44px; }
  .brand-type { font-size: 20px; }
  .brand-orbit { width: 38px; height: 38px; }
  .equivalents { display: grid; grid-template-columns: 1fr 1fr; }
  .facts { grid-template-columns: 1fr 1fr; row-gap: 18px; }
}

@media (min-width: 901px) and (max-height: 760px) {
  .site-header { height: 76px; }
  main { padding-top: 76px; padding-bottom: 44px; }
  footer { height: 46px; }
  h1 { font-size: clamp(48px, 10vh, 72px); }
  .intro { margin: 20px 0 26px; font-size: 17px; }
  input { height: 52px; }
  .recent-panel { padding: 18px 24px; }
  .recent-heading { margin-bottom: 10px; }
  .recent-heading h2 { font-size: 27px; }
  .recent-list button { min-height: 34px; }
  .recent-rule { margin-top: 9px; }
  .result { padding: 22px 0; }
  .orbit-card { max-width: 410px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; }
}
