:root {
  --bg: #f4efe7;
  --bg-strong: #e7d9c5;
  --surface: rgba(255, 251, 245, 0.88);
  --surface-strong: rgba(255, 251, 245, 0.98);
  --surface-outline: rgba(67, 48, 26, 0.1);
  --text: #1b1712;
  --text-soft: #5f5649;
  --accent: #146356;
  --accent-strong: #0d4f44;
  --accent-wash: rgba(20, 99, 86, 0.09);
  --danger: #8f3f2b;
  --shadow: 0 30px 80px rgba(47, 33, 17, 0.14);
  --radius-xl: 32px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --max-width: 1120px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.75), transparent 28%),
    radial-gradient(circle at 85% 14%, rgba(20, 99, 86, 0.14), transparent 20%),
    linear-gradient(180deg, #f7f2ea 0%, #f3ecdf 44%, #eee5d5 100%);
  font-family: "Plus Jakarta Sans", sans-serif;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(57, 43, 29, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(57, 43, 29, 0.03) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.8), transparent 90%);
}

.page-shell {
  width: min(calc(100% - 2rem), var(--max-width));
  margin: 0 auto;
  padding: 2rem 0 4rem;
}

.site-header {
  display: grid;
  gap: 1rem;
  align-items: end;
  margin-bottom: 2rem;
  animation: fade-up 0.7s ease both;
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.brand-mark {
  width: 3.75rem;
  height: 3.75rem;
  display: inline-grid;
  place-items: center;
  border-radius: 1.15rem;
  background: linear-gradient(135deg, #173d37, #268776);
  color: #f7f5f0;
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.2rem;
  font-weight: 700;
  box-shadow: 0 18px 35px rgba(20, 99, 86, 0.22);
}

.brand-kicker,
.eyebrow,
.detail-label,
.spotlight-label {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--text-soft);
}

.site-header h1,
.result-heading {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
  letter-spacing: -0.04em;
}

.site-header h1 {
  font-size: clamp(2rem, 3vw, 3rem);
}

.site-intro {
  margin: 0;
  max-width: 44rem;
  color: var(--text-soft);
  font-size: 1rem;
  line-height: 1.7;
}

.hero-panel {
  display: grid;
  gap: 1.2rem;
  grid-template-columns: minmax(0, 1.55fr) minmax(280px, 0.85fr);
  padding: clamp(1.3rem, 2vw, 2rem);
  border: 1px solid var(--surface-outline);
  border-radius: var(--radius-xl);
  background:
    linear-gradient(145deg, rgba(255, 252, 247, 0.98), rgba(249, 244, 236, 0.86)),
    var(--surface);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
  animation: fade-up 0.9s ease 0.08s both;
}

.hero-copy,
.hero-aside,
.details-grid {
  min-width: 0;
}

.status-text,
.meta-note,
.detail-help {
  color: var(--text-soft);
  line-height: 1.6;
}

.status-text {
  margin: 0.8rem 0 0;
}

.ip-wrap {
  margin: 1rem 0 1.4rem;
  padding: 1rem 1.15rem;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, rgba(19, 51, 46, 0.97), rgba(14, 93, 78, 0.92));
  overflow: hidden;
}

.ip-value {
  margin: 0;
  color: #f8faf7;
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(1.8rem, 4vw, 3.9rem);
  line-height: 1.05;
  letter-spacing: -0.05em;
  overflow-wrap: anywhere;
}

.ip-value[data-state="loading"] {
  opacity: 0.68;
}

.ip-value[data-state="error"] {
  color: #ffd8ca;
}

.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
}

.button {
  appearance: none;
  border: none;
  border-radius: 999px;
  padding: 0.9rem 1.2rem;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: transform 180ms ease, background-color 180ms ease, color 180ms ease, opacity 180ms ease;
}

.button:hover,
.button:focus-visible {
  transform: translateY(-1px);
}

.button:focus-visible {
  outline: 3px solid rgba(20, 99, 86, 0.18);
  outline-offset: 3px;
}

.button:disabled {
  opacity: 0.52;
  cursor: not-allowed;
  transform: none;
}

.button.primary {
  background: var(--accent);
  color: #f7faf8;
}

.button.primary:hover,
.button.primary:focus-visible {
  background: var(--accent-strong);
}

.button.secondary {
  background: rgba(27, 23, 18, 0.06);
  color: var(--text);
}

.button.secondary:hover,
.button.secondary:focus-visible {
  background: rgba(27, 23, 18, 0.11);
}

.meta-note {
  margin: 1rem 0 0;
  max-width: 38rem;
  font-size: 0.94rem;
}

.hero-aside {
  display: grid;
  gap: 1rem;
}

.spotlight-card,
.detail-card {
  padding: 1.1rem 1.1rem 1rem;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(67, 48, 26, 0.08);
  background: var(--surface-strong);
}

.spotlight-card {
  min-height: 8.9rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.spotlight-value,
.detail-value {
  margin: 0.5rem 0 0;
  font-size: 1.1rem;
  line-height: 1.45;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.details-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 1rem;
  animation: fade-up 1s ease 0.16s both;
}

.detail-card {
  position: relative;
  overflow: hidden;
}

.detail-card::after {
  content: "";
  position: absolute;
  inset: auto -20% -45% auto;
  width: 9rem;
  height: 9rem;
  border-radius: 50%;
  background: var(--accent-wash);
  pointer-events: none;
}

.detail-help {
  position: relative;
  margin: 0.6rem 0 0;
  font-size: 0.92rem;
}

.is-muted {
  color: var(--text-soft);
  font-weight: 600;
}

.is-error {
  color: var(--danger);
}

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(18px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 820px) {
  .page-shell {
    width: min(calc(100% - 1.25rem), var(--max-width));
    padding-top: 1.15rem;
  }

  .hero-panel,
  .details-grid {
    grid-template-columns: 1fr;
  }

  .spotlight-card {
    min-height: auto;
  }

  .ip-wrap {
    padding: 0.95rem 1rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
