/* ── Reset & base ─────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: #f0f2f5;
  color: #1a1d23;
  min-height: 100vh;
}

/* ── Top bar ─────────────────────────────────── */
.topbar {
  background: #111827;
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 1px 3px rgba(0,0,0,.2);
}

.topbar-inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 17px;
  letter-spacing: -.3px;
}

.logo-icon {
  width: 22px;
  height: 22px;
  color: #60a5fa;
}

.topbar-badge {
  font-size: 12px;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 20px;
  letter-spacing: .2px;
}

.topbar-badge.loading {
  background: rgba(251,191,36,.15);
  color: #fbbf24;
}

.topbar-badge.ready {
  background: rgba(52,211,153,.15);
  color: #34d399;
}

.topbar-badge.error {
  background: rgba(248,113,113,.15);
  color: #f87171;
}

/* ── Layout ──────────────────────────────────── */
.container {
  max-width: 880px;
  margin: 0 auto;
  padding: 32px 24px 64px;
}

/* ── Hero ─────────────────────────────────────── */
.hero {
  margin-bottom: 28px;
}

.hero h1 {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -.5px;
  line-height: 1.2;
  color: #111827;
}

.subtitle {
  margin-top: 8px;
  color: #6b7280;
  font-size: 15px;
  line-height: 1.5;
}

/* ── Input card ──────────────────────────────── */
.input-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  padding: 28px;
  box-shadow: 0 4px 16px rgba(0,0,0,.04);
}

.input-row {
  display: flex;
  gap: 16px;
  align-items: flex-end;
}

.input-group {
  flex: 1;
}

.input-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #4b5563;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: .5px;
}

.input-group input {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid #d1d5db;
  border-radius: 10px;
  font-size: 16px;
  font-family: inherit;
  color: #111827;
  background: #fafbfc;
  transition: border-color .15s, box-shadow .15s;
}

.input-group input:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59,130,246,.15);
  background: #fff;
}

.input-group input::placeholder {
  color: #9ca3af;
}

button#lookupButton {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border: none;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  background: #2563eb;
  color: #fff;
  white-space: nowrap;
  transition: background .15s, transform .1s;
  height: 46px;
}

button#lookupButton:hover:not(:disabled) {
  background: #1d4ed8;
}

button#lookupButton:active:not(:disabled) {
  transform: scale(.97);
}

button#lookupButton:disabled {
  cursor: not-allowed;
  opacity: .45;
}

.btn-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.status-line {
  margin-top: 14px;
  font-size: 13px;
  color: #6b7280;
}

/* ── Result card ─────────────────────────────── */
.result-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  padding: 32px;
  margin-top: 24px;
  box-shadow: 0 4px 16px rgba(0,0,0,.04);
  animation: slideUp .3s ease;
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

.result-heading {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 24px;
  padding-bottom: 14px;
  border-bottom: 1px solid #e5e7eb;
  color: #111827;
}

.result-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.result-section {
  background: #f9fafb;
  border: 1px solid #f3f4f6;
  border-radius: 12px;
  padding: 20px;
}

.section-label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .6px;
  color: #2563eb;
  margin-bottom: 14px;
}

.result-section dl {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.dl-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
}

.dl-row dt {
  font-size: 13px;
  font-weight: 500;
  color: #6b7280;
  flex-shrink: 0;
}

.dl-row dd {
  font-size: 14px;
  font-weight: 600;
  color: #1a1d23;
  text-align: right;
}

.dl-row dd.not-found {
  color: #9ca3af;
  font-weight: 400;
  font-style: italic;
}

.landmark-divider {
  border: none;
  border-top: 1px solid #e5e7eb;
  margin: 10px 0;
}

.coords-bar {
  margin-top: 20px;
  padding: 12px 16px;
  background: #111827;
  color: #94a3b8;
  border-radius: 10px;
  font-size: 13px;
  font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace;
  text-align: center;
  letter-spacing: .3px;
}

.coords-bar span {
  color: #e2e8f0;
}

/* ── Hidden state ────────────────────────────── */
.hidden {
  display: none !important;
}

/* ── Note footer ─────────────────────────────── */
.note {
  margin-top: 28px;
  padding: 16px 20px;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 12px;
  font-size: 13px;
  line-height: 1.6;
  color: #92400e;
}

/* ── Responsive ──────────────────────────────── */
@media (max-width: 640px) {
  .hero h1 {
    font-size: 22px;
  }

  .input-row {
    flex-direction: column;
    align-items: stretch;
  }

  button#lookupButton {
    width: 100%;
    justify-content: center;
  }

  .result-grid {
    grid-template-columns: 1fr;
  }

  .dl-row {
    flex-direction: column;
    gap: 2px;
  }

  .dl-row dd {
    text-align: left;
  }
}
