:root {
  --bg: #ede7dd;
  --bg-alt: #e4ddd1;
  --surface: rgba(250, 247, 241, 0.94);
  --surface-strong: rgba(255, 252, 247, 0.98);
  --surface-soft: rgba(239, 233, 223, 0.72);
  --surface-outline: rgba(25, 37, 61, 0.14);
  --rule: rgba(25, 37, 61, 0.08);
  --text: #172032;
  --text-soft: #5e687a;
  --accent: #2957c8;
  --accent-strong: #1d46ac;
  --accent-soft: #dce6ff;
  --success: #177245;
  --danger: #b44a3e;
  --shadow: 0 24px 60px rgba(40, 33, 22, 0.12);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 14px;
  --max-width: 1120px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.48), transparent 24%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-alt) 100%);
  font-family: "Manrope", sans-serif;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, transparent 0, transparent calc(50% - 560px), rgba(23, 32, 50, 0.035) calc(50% - 560px), rgba(23, 32, 50, 0.035) calc(50% - 559px), transparent calc(50% - 559px), transparent calc(50% + 559px), rgba(23, 32, 50, 0.035) calc(50% + 559px), rgba(23, 32, 50, 0.035) calc(50% + 560px), transparent calc(50% + 560px));
}

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

.site-header {
  display: grid;
  gap: 1.1rem;
  align-items: start;
  margin-bottom: 1.8rem;
  animation: fade-up 0.7s ease both;
  padding-bottom: 1.1rem;
  border-bottom: 1px solid var(--rule);
}

.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: 1rem;
  border: 1px solid rgba(41, 87, 200, 0.18);
  background: var(--surface-strong);
  color: var(--accent-strong);
  font-family: "JetBrains Mono", monospace;
  font-size: 1.2rem;
  font-weight: 700;
  box-shadow: 0 12px 28px rgba(34, 46, 74, 0.08);
}

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

.site-header h1,
.result-heading {
  margin: 0;
  font-family: "JetBrains Mono", monospace;
  letter-spacing: -0.03em;
}

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

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

.hero-panel {
  display: grid;
  gap: 1.1rem;
  grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.95fr);
  padding: clamp(1.35rem, 2vw, 1.9rem);
  border: 1px solid var(--surface-outline);
  border-radius: var(--radius-xl);
  background: var(--surface);
  box-shadow: var(--shadow);
  animation: fade-up 0.9s ease 0.08s both;
  position: relative;
  overflow: hidden;
}

.hero-panel::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 5px;
  background: linear-gradient(90deg, var(--accent) 0%, #5f83d8 65%, #adc0f7 100%);
  pointer-events: none;
}

.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.7rem 0 0;
}

.ip-wrap {
  margin: 1rem 0 1.4rem;
  padding: 1.15rem 1.2rem;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(23, 32, 50, 0.12);
  background: #1a2438;
  overflow: hidden;
  position: relative;
}

.ip-wrap::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 0.45rem;
  background: linear-gradient(180deg, var(--accent), #7ca0f1);
  pointer-events: none;
}

.ip-value {
  position: relative;
  margin: 0;
  color: #f5f7fb;
  font-family: "JetBrains Mono", monospace;
  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: #ffe0d8;
}

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

.button {
  appearance: none;
  border: 1px solid rgba(25, 37, 61, 0.12);
  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(41, 87, 200, 0.18);
  outline-offset: 3px;
}

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

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

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

.button.secondary {
  background: rgba(255, 255, 255, 0.62);
  color: var(--text);
}

.button.secondary:hover,
.button.secondary:focus-visible {
  background: rgba(255, 255, 255, 0.9);
}

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

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

.spotlight-card,
.detail-card {
  padding: 1.15rem 1.15rem 1rem;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(25, 37, 61, 0.1);
  background: var(--surface-strong);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

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

.spotlight-value,
.detail-value {
  margin: 0.5rem 0 0;
  font-size: 1.08rem;
  line-height: 1.45;
  font-weight: 700;
  overflow-wrap: anywhere;
  font-family: "JetBrains Mono", monospace;
}

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

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

.detail-card::after {
  content: "";
  position: absolute;
  left: 1.15rem;
  right: 1.15rem;
  top: 0;
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(41, 87, 200, 0.95), rgba(41, 87, 200, 0.18));
  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;
  }
}
