@import url('https://fonts.googleapis.com/css2?family=DM+Mono:wght@400;500&family=Manrope:wght@400;500;600;700;800&display=swap');

:root {
  color-scheme: dark;
  --ink: #ecf7f4;
  --muted: #89a7a5;
  --dim: #527270;
  --bg: #071317;
  --panel: #0a1b20;
  --panel-soft: #0c2227;
  --line: rgba(139, 194, 188, .16);
  --line-strong: rgba(139, 194, 188, .3);
  --accent: #51e3c2;
  --accent-strong: #8fffe6;
  --danger: #ff8c79;
  --warning: #f5c96a;
  --mono: 'DM Mono', ui-monospace, SFMono-Regular, Consolas, monospace;
  --sans: 'Manrope', 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }

html { min-width: 320px; background: var(--bg); }

body {
  position: relative;
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  color: var(--ink);
  background:
    radial-gradient(circle at 77% 20%, rgba(32, 117, 108, .19), transparent 33rem),
    radial-gradient(circle at 42% 92%, rgba(21, 82, 78, .12), transparent 28rem),
    var(--bg);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}

.ambient-grid {
  position: fixed;
  z-index: -1;
  inset: 0;
  opacity: .22;
  background-image:
    linear-gradient(rgba(110, 164, 158, .04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(110, 164, 158, .04) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: linear-gradient(to bottom, transparent, #000 20%, #000 80%, transparent);
}

button, input { font: inherit; }
button { cursor: pointer; }

.topbar {
  height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(24px, 4vw, 64px);
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: inherit;
  text-decoration: none;
}

.brand-mark { width: 38px; height: 38px; }
.brand-mark circle, .brand-mark path { fill: none; stroke: var(--accent); stroke-width: 1.4; }
.brand-mark circle:last-child { fill: var(--accent); stroke: none; }
.brand span { display: flex; align-items: baseline; gap: 8px; }
.brand strong { font-size: 17px; letter-spacing: .14em; }
.brand small { color: var(--muted); font: 500 10px/1 var(--mono); letter-spacing: .14em; }

.live-state {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--muted);
  font: 500 11px/1 var(--mono);
  letter-spacing: .08em;
  text-transform: uppercase;
}

.live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--warning);
  box-shadow: 0 0 0 5px rgba(245, 201, 106, .08);
}

.live-state.online .live-dot { background: var(--accent); box-shadow: 0 0 0 5px rgba(81, 227, 194, .08); }
.live-state.offline .live-dot { background: var(--danger); box-shadow: 0 0 0 5px rgba(255, 140, 121, .08); }

.lookup-shell {
  min-height: calc(100vh - 124px);
  display: grid;
  grid-template-columns: minmax(350px, 440px) 1fr;
}

.query-panel {
  display: flex;
  flex-direction: column;
  padding: clamp(42px, 6vh, 74px) clamp(28px, 4vw, 62px);
  border-right: 1px solid var(--line);
  background: rgba(7, 19, 23, .78);
}

.eyebrow {
  margin: 0 0 16px;
  color: var(--accent);
  font: 500 11px/1.2 var(--mono);
  letter-spacing: .16em;
}

.intro h1 {
  max-width: 420px;
  margin: 0;
  font-size: clamp(39px, 4vw, 59px);
  line-height: .98;
  letter-spacing: -.055em;
}

.intro > p:last-child {
  max-width: 420px;
  margin: 22px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

#lookup-form { margin-top: clamp(36px, 6vh, 60px); }

.kind-switch {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin: 0 0 28px;
  padding: 0;
  border: 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.kind-switch legend {
  width: 100%;
  margin-bottom: 11px;
  color: #bcd0cd;
  font: 500 11px/1.2 var(--mono);
  letter-spacing: .04em;
  text-transform: uppercase;
}

.kind-switch label {
  position: relative;
  min-width: 0;
  padding: 14px 10px 14px 0;
  cursor: pointer;
}

.kind-switch label + label {
  padding-left: 14px;
  border-left: 1px solid var(--line);
}

.kind-switch input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.kind-switch span {
  display: block;
  margin-bottom: 8px;
  color: var(--dim);
  font: 400 9px/1 var(--mono);
}

.kind-switch strong {
  color: var(--muted);
  font-size: 12px;
  letter-spacing: .01em;
  transition: color .16s ease;
}

.kind-switch label:has(input:checked) strong { color: var(--accent); }
.kind-switch label:has(input:checked)::after {
  content: '';
  position: absolute;
  right: 10px;
  bottom: -1px;
  left: 0;
  height: 2px;
  background: var(--accent);
  box-shadow: 0 0 14px rgba(81, 227, 194, .42);
}
.kind-switch label + label:has(input:checked)::after { left: 14px; }
.kind-switch label:focus-within strong { outline: 2px solid var(--accent); outline-offset: 4px; }

.query-field { display: block; }
.query-field > span {
  display: block;
  margin-bottom: 8px;
  color: #bcd0cd;
  font: 500 11px/1.2 var(--mono);
  letter-spacing: .04em;
  text-transform: uppercase;
}

.query-field input {
  width: 100%;
  height: 56px;
  padding: 0 15px;
  color: var(--ink);
  border: 1px solid var(--line-strong);
  border-radius: 3px;
  outline: none;
  background: rgba(11, 35, 40, .72);
  font-size: 15px;
  transition: border-color .16s ease, background .16s ease, box-shadow .16s ease;
}

.query-field input::placeholder { color: #52706f; }
.query-field input:focus {
  border-color: var(--accent);
  background: rgba(13, 42, 46, .96);
  box-shadow: 0 0 0 3px rgba(81, 227, 194, .08);
}
.query-field small {
  display: block;
  min-height: 15px;
  margin-top: 9px;
  color: var(--dim);
  font: 400 10px/1.5 var(--mono);
}

.form-error { margin: 12px 0 0; color: #ffd0c7; font-size: 12px; line-height: 1.5; }

.lookup-button {
  width: 100%;
  min-height: 54px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 22px;
  padding: 0 18px;
  color: #05241e;
  border: 0;
  border-radius: 3px;
  background: var(--accent);
  font-weight: 800;
  font-size: 13px;
  letter-spacing: .02em;
  transition: transform .18s ease, background .18s ease;
}

.lookup-button:hover { transform: translateY(-2px); background: var(--accent-strong); }
.lookup-button:active { transform: translateY(0); }
.lookup-button:disabled { cursor: wait; opacity: .55; transform: none; }
.lookup-button svg { width: 21px; fill: none; stroke: currentColor; stroke-width: 1.8; }

.index-note {
  margin-top: auto;
  padding-top: clamp(44px, 8vh, 78px);
}
.index-note span { color: var(--dim); font: 500 9px/1 var(--mono); letter-spacing: .13em; }
.index-note p { max-width: 380px; margin: 10px 0 0; color: var(--dim); font-size: 11px; line-height: 1.6; }

.result-panel {
  min-width: 0;
  padding: clamp(32px, 5vw, 72px);
  overflow: hidden;
}

.result-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
}
.result-heading h2 { margin: 0; font-size: clamp(24px, 3vw, 40px); letter-spacing: -.045em; }
.result-status {
  padding: 8px 10px;
  border: 1px solid var(--line);
  color: var(--muted);
  font: 500 10px/1 var(--mono);
  letter-spacing: .1em;
  white-space: nowrap;
}
.result-status.searching { color: var(--warning); border-color: rgba(245, 201, 106, .25); }
.result-status.found { color: var(--accent); border-color: rgba(81, 227, 194, .28); }
.result-status.missing { color: var(--danger); border-color: rgba(255, 140, 121, .25); }

.empty-state { margin-top: clamp(30px, 6vh, 70px); }
.signal-field {
  position: relative;
  height: clamp(330px, 48vh, 500px);
  overflow: hidden;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: radial-gradient(circle at 50% 50%, rgba(32, 117, 108, .13), transparent 45%);
}
.signal-field::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at 50% 50%, transparent, rgba(7, 19, 23, .74) 82%);
}
.signal-field svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.signal-ring, .signal-cross, .signal-line { fill: none; stroke: rgba(137, 186, 180, .16); }
.signal-ring { stroke-width: 1; stroke-dasharray: 3 8; }
.ring-a { animation: turn 34s linear infinite; transform-origin: 360px 210px; }
.ring-b { animation: turn 22s linear infinite reverse; transform-origin: 360px 210px; }
.signal-cross { stroke-width: .8; }
.signal-line { stroke: var(--accent); stroke-width: 1.7; stroke-dasharray: 8 10; filter: url('#signal-glow'); animation: trace 10s linear infinite; }
.signal-sweep { fill: rgba(81, 227, 194, .08); transform-origin: 360px 210px; animation: sweep 4.5s linear infinite; }
.signal-point { fill: var(--bg); stroke: var(--accent); stroke-width: 2; }
.point-b { animation: beacon 1.9s ease-in-out infinite; }
.signal-label { position: absolute; z-index: 1; color: var(--dim); font: 500 9px/1 var(--mono); letter-spacing: .13em; }
.label-p { left: 18%; top: 69%; }
.label-c { left: 58%; top: 39%; }
.label-f { right: 17%; top: 46%; }
.signal-core {
  position: absolute;
  z-index: 1;
  top: 50%;
  left: 50%;
  width: 68px;
  height: 68px;
  display: grid;
  place-items: center;
  transform: translate(-50%, -50%);
  border: 1px solid rgba(81, 227, 194, .45);
  border-radius: 50%;
  color: var(--accent);
  background: rgba(7, 19, 23, .9);
  box-shadow: 0 0 36px rgba(81, 227, 194, .12);
  font: 500 12px/1 var(--mono);
  letter-spacing: .12em;
}
.empty-copy { max-width: 580px; margin-top: 30px; }
.empty-copy > span { color: var(--dim); font: 400 9px/1 var(--mono); letter-spacing: .12em; }
.empty-copy h3, .loading-state h3, .not-found-state h3 { margin: 12px 0 8px; font-size: clamp(25px, 3vw, 39px); letter-spacing: -.04em; }
.empty-copy p, .loading-state > p:not(.eyebrow), .not-found-state > p { color: var(--muted); line-height: 1.65; font-size: 14px; }

.loading-state {
  min-height: 540px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.loader {
  position: relative;
  width: 170px;
  height: 170px;
  margin-bottom: 42px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: repeating-radial-gradient(circle, transparent 0 25px, rgba(81, 227, 194, .09) 26px 27px);
}
.loader::before, .loader::after { content: ''; position: absolute; background: var(--line-strong); }
.loader::before { top: 0; bottom: 0; left: 50%; width: 1px; }
.loader::after { right: 0; left: 0; top: 50%; height: 1px; }
.loader i {
  position: absolute;
  inset: 50% 50% 0 50%;
  width: 50%;
  height: 50%;
  background: conic-gradient(from 270deg at 0 0, rgba(81, 227, 194, .42), transparent 38%);
  transform-origin: 0 0;
  animation: sweep 1.5s linear infinite;
}
.loader b { position: absolute; top: 48px; left: 104px; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 18px var(--accent); animation: beacon 1.4s ease-in-out infinite; }
.loading-state > p:not(.eyebrow) { margin: 0; }

.not-found-state {
  min-height: 520px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  animation: rise .35s ease both;
}
.not-found-code { color: var(--danger); font: 500 10px/1 var(--mono); letter-spacing: .14em; }
.not-found-state h3 { max-width: 660px; }
.not-found-state > p { max-width: 600px; margin: 0; }
.suggestions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 30px; }
.suggestion {
  min-height: 42px;
  padding: 0 15px;
  border: 1px solid var(--line-strong);
  border-radius: 3px;
  color: var(--ink);
  background: rgba(11, 35, 40, .58);
  font-size: 12px;
  transition: transform .16s ease, color .16s ease, border-color .16s ease;
}
.suggestion:hover { transform: translateY(-2px); color: var(--accent); border-color: var(--accent); }

.resolved-state { padding-top: clamp(56px, 10vh, 112px); animation: rise .38s ease both; }
.identity-row {
  display: grid;
  grid-template-columns: 112px 1fr;
  gap: 28px;
  align-items: center;
  padding-bottom: 34px;
  border-bottom: 1px solid var(--line);
}
.result-mark {
  width: 112px;
  height: 112px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(81, 227, 194, .46);
  border-radius: 50%;
  color: var(--accent);
  background: radial-gradient(circle, rgba(81, 227, 194, .1), transparent 70%);
  box-shadow: inset 0 0 30px rgba(81, 227, 194, .05), 0 0 40px rgba(81, 227, 194, .06);
  font: 500 34px/1 var(--mono);
}
.identity-copy > span { color: var(--accent); font: 500 10px/1 var(--mono); letter-spacing: .14em; }
.identity-copy h3 { margin: 12px 0 10px; font-size: clamp(34px, 5vw, 66px); line-height: 1; letter-spacing: -.055em; overflow-wrap: anywhere; }
.identity-copy p { margin: 0; color: var(--dim); font: 400 9px/1.4 var(--mono); letter-spacing: .1em; }

.result-details { margin: 0; }
.detail-row {
  display: grid;
  grid-template-columns: minmax(130px, .7fr) minmax(180px, 1.5fr);
  gap: 30px;
  align-items: center;
  min-height: 74px;
  margin: 0;
  border-bottom: 1px solid var(--line);
}
.detail-row dt { color: var(--dim); font: 500 9px/1 var(--mono); letter-spacing: .13em; text-transform: uppercase; }
.detail-row dd { margin: 0; color: var(--ink); font-size: clamp(15px, 2vw, 20px); font-weight: 600; letter-spacing: -.02em; }
.detail-row a { color: inherit; text-decoration-color: rgba(81, 227, 194, .45); text-underline-offset: 5px; }
.detail-row a:hover { color: var(--accent); }

.primary-link {
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 32px;
  padding: 0 18px;
  color: #05241e;
  border-radius: 3px;
  background: var(--accent);
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
  transition: transform .18s ease, background .18s ease;
}
.primary-link:hover { transform: translateY(-2px); background: var(--accent-strong); }
.primary-link svg { width: 21px; fill: none; stroke: currentColor; stroke-width: 1.8; }

footer {
  min-height: 48px;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 16px clamp(24px, 4vw, 64px);
  border-top: 1px solid var(--line);
  color: var(--dim);
  font: 400 9px/1.4 var(--mono);
  letter-spacing: .05em;
}

.reveal { opacity: 0; animation: rise .48s ease forwards; }
.reveal.delay-1 { animation-delay: 80ms; }
.reveal.delay-2 { animation-delay: 160ms; }
.reveal.delay-3 { animation-delay: 240ms; }
[hidden] { display: none !important; }

@keyframes rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
@keyframes trace { to { stroke-dashoffset: -180; } }
@keyframes turn { to { transform: rotate(360deg); } }
@keyframes sweep { to { transform: rotate(360deg); } }
@keyframes beacon { 50% { opacity: .32; transform: scale(.8); } }

@media (max-width: 980px) {
  .lookup-shell { grid-template-columns: 1fr; }
  .query-panel { min-height: 690px; border-right: 0; border-bottom: 1px solid var(--line); }
  .result-panel { min-height: 760px; }
}

@media (max-width: 640px) {
  .topbar { height: 66px; padding-inline: 18px; }
  .brand small { display: none; }
  .live-state { font-size: 9px; }
  .lookup-shell { min-height: calc(100vh - 114px); }
  .query-panel, .result-panel { padding: 36px 20px; }
  .query-panel { min-height: 670px; }
  .intro h1 { font-size: 42px; }
  .signal-field { height: 310px; }
  .identity-row { grid-template-columns: 78px 1fr; gap: 18px; }
  .result-mark { width: 78px; height: 78px; font-size: 26px; }
  .identity-copy h3 { font-size: 37px; }
  .detail-row { grid-template-columns: 105px 1fr; gap: 18px; min-height: 68px; }
  footer { flex-direction: column; }
}

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