:root {
  --bg: #f4efe8;
  --bg-deep: #e8dfd4;
  --surface: rgba(255, 252, 247, 0.76);
  --surface-strong: rgba(255, 252, 247, 0.93);
  --line: rgba(98, 74, 48, 0.14);
  --text: #231b15;
  --muted: #675748;
  --accent: #8c5f31;
  --accent-strong: #6f441c;
  --danger: #a33b2f;
  --danger-soft: rgba(163, 59, 47, 0.12);
  --shadow: 0 24px 80px rgba(55, 36, 19, 0.12);
  --radius-xl: 32px;
  --radius-lg: 24px;
  --radius-md: 18px;
  --space-1: 0.375rem;
  --space-2: 0.75rem;
  --space-3: 1rem;
  --space-4: 1.5rem;
  --space-5: 2rem;
  --space-6: 3rem;
  --max-width: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  font-size: 16px;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(173, 131, 88, 0.18), transparent 35%),
    radial-gradient(circle at right center, rgba(113, 80, 51, 0.14), transparent 30%),
    linear-gradient(180deg, #f8f3ed 0%, var(--bg) 52%, var(--bg-deep) 100%);
  font-family:
    "Inter", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
}

.site-shell {
  position: relative;
  overflow: hidden;
}

.aurora {
  position: fixed;
  inset: auto;
  width: 42rem;
  height: 42rem;
  border-radius: 999px;
  filter: blur(80px);
  opacity: 0.45;
  pointer-events: none;
  z-index: 0;
  animation: drift 16s ease-in-out infinite alternate;
}

.aurora-left {
  top: -14rem;
  left: -14rem;
  background: rgba(155, 117, 71, 0.22);
}

.aurora-right {
  top: 10rem;
  right: -12rem;
  background: rgba(138, 101, 60, 0.15);
  animation-duration: 21s;
}

.layout {
  position: relative;
  z-index: 1;
}

.eyebrow,
.panel-kicker,
.kicker,
.meta-label,
.section-note,
summary {
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.74rem;
}

.eyebrow,
.panel-kicker,
.kicker,
.section-note,
.meta-label {
  color: var(--muted);
}

.layout {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: var(--space-5) var(--space-4) var(--space-6);
  display: grid;
  gap: var(--space-4);
}

.card {
  position: relative;
  background: linear-gradient(180deg, var(--surface-strong), var(--surface));
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  backdrop-filter: blur(22px);
}

.hero {
  border-radius: var(--radius-xl);
  padding: clamp(1.5rem, 4vw, 3rem);
  display: grid;
  gap: var(--space-4);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.36), transparent 40%),
    linear-gradient(145deg, transparent, rgba(140, 95, 49, 0.08));
  pointer-events: none;
}

.hero-copy {
  width: 100%;
}

h2 {
  font-family:
    "Iowan Old Style", "Palatino Linotype", "Book Antiqua", "Times New Roman", serif;
  font-weight: 600;
  letter-spacing: -0.03em;
}

.hero-ip {
  margin: 0;
  font-family:
    "SFMono-Regular", "Cascadia Mono", "Fira Code", "Menlo", "Consolas",
    "Liberation Mono", monospace;
  font-weight: 600;
  font-size: clamp(2.05rem, 5.6vw, 3.5rem);
  letter-spacing: -0.02em;
  line-height: 0.93;
  overflow-wrap: anywhere;
}

.hero-ip-split {
  display: grid;
  gap: 0.2em;
  font-size: clamp(1.58rem, 4.55vw, 3.75rem);
  line-height: 0.9;
  overflow-wrap: normal;
}

.hero-ip-line {
  display: block;
  white-space: nowrap;
}

.hero-ip-muted {
  color: var(--muted);
  opacity: 0.62;
}

.hero-ip-line-secondary {
  opacity: 0.92;
}

.hero-text {
  margin: 1rem 0 0;
  max-width: 42rem;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.7;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
}

.live-probes {
  margin-top: 1.5rem;
  display: grid;
  gap: 1rem;
}

.probe-grid {
  display: flex;
  width: 100%;
  align-items: stretch;
  flex-wrap: nowrap;
  gap: 1rem;
}

.probe-card {
  min-width: 0;
  flex: 1 1 0;
  padding: 1rem 1.05rem;
  padding-right: 3rem;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.56);
  border: 1px solid rgba(98, 74, 48, 0.12);
  position: relative;
  display: grid;
  gap: 0.45rem;
}

.probe-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  min-width: 0;
}

.probe-card:last-child {
  flex-grow: 1.35;
}

.probe-value {
  display: block;
  font-size: clamp(1.18rem, 2.25vw, 1.55rem);
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.probe-status {
  position: absolute;
  top: 50%;
  right: 1.05rem;
  transform: translateY(-50%);
  width: 1.35rem;
  min-width: 1.35rem;
  height: 1.35rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

.probe-spinner,
.probe-error-toggle {
  position: absolute;
  inset: 0;
}

.probe-spinner {
  border-radius: 999px;
  border: 2px solid rgba(98, 74, 48, 0.14);
  border-top-color: var(--accent);
  animation: spin 0.85s linear infinite;
}

.probe-status[data-status="success"] .probe-spinner,
.probe-status[data-status="error"] .probe-spinner {
  display: none;
}

.probe-error-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 999px;
  padding: 0;
  background: var(--danger);
  color: #fffaf5;
  box-shadow: 0 10px 24px rgba(163, 59, 47, 0.22);
  font-size: 0.84rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
}

.probe-status[data-status="error"] .probe-error-toggle {
  display: inline-flex;
}

.probe-error-toggle:focus-visible {
  outline: 2px solid rgba(163, 59, 47, 0.34);
  outline-offset: 2px;
}

.probe-error-popover {
  position: absolute;
  top: calc(100% + 0.55rem);
  right: 0;
  z-index: 3;
  width: min(18rem, calc(100vw - 4rem));
  padding: 0.72rem 0.8rem;
  border-radius: 0.9rem;
  background: rgba(45, 24, 20, 0.94);
  color: #fff4ec;
  box-shadow: 0 18px 36px rgba(32, 16, 14, 0.3);
  font-size: 0.78rem;
  line-height: 1.45;
}

.probe-error-popover::before {
  content: "";
  position: absolute;
  top: -0.35rem;
  right: 0.45rem;
  width: 0.7rem;
  height: 0.7rem;
  background: inherit;
  transform: rotate(45deg);
}

.probe-line {
  display: block;
}

.probe-line-secondary {
  opacity: 0.92;
}

.probe-value-split {
  display: block;
}

.probe-value-split .probe-line {
  display: inline;
}

.probe-value-split .probe-line-secondary::before {
  content: ":";
}

.hero-subtle {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.5;
}

.meta-chip {
  min-width: 10rem;
  padding: 1rem 1.05rem;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.56);
  border: 1px solid rgba(98, 74, 48, 0.12);
  display: grid;
  gap: 0.3rem;
}

.meta-value {
  font-size: 1rem;
  line-height: 1.3;
  word-break: break-word;
}

.details {
  border-radius: var(--radius-lg);
  padding: var(--space-4);
}

.detail-card {
  border-radius: var(--radius-md);
  border: 1px solid rgba(98, 74, 48, 0.12);
  background: rgba(255, 255, 255, 0.56);
  overflow: hidden;
}

.detail-card-full + .detail-card-secondary {
  margin-top: 1rem;
}

.table {
  overflow: hidden;
}

.table-row {
  display: grid;
  grid-template-columns: minmax(0, 13rem) minmax(0, 1fr);
  gap: 0.75rem;
  padding: 0.95rem 1.1rem;
  border-bottom: 1px solid rgba(98, 74, 48, 0.08);
}

.table-row:last-child {
  border-bottom: 0;
}

.table-key {
  color: var(--muted);
  font-size: 0.92rem;
}

.table-value {
  font-family:
    "SFMono-Regular", "JetBrains Mono", "Consolas", "Liberation Mono", monospace;
  font-size: 0.9rem;
  word-break: break-word;
}

.table-value-empty {
  color: var(--muted);
  opacity: 0.72;
}

.empty-state {
  padding: 1rem 1.1rem 1.2rem;
  color: var(--muted);
  line-height: 1.6;
}

@keyframes drift {
  from {
    transform: translate3d(0, 0, 0) scale(1);
  }
  to {
    transform: translate3d(2.5rem, 1rem, 0) scale(1.08);
  }
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 900px) {
  .probe-grid {
    flex-wrap: wrap;
  }

  .probe-card,
  .probe-card:last-child {
    flex: 1 1 100%;
  }
}

@media (max-width: 640px) {
  .layout {
    padding-left: var(--space-3);
    padding-right: var(--space-3);
    padding-top: var(--space-4);
    padding-bottom: var(--space-5);
  }

  .hero,
  .details {
    padding: 1.25rem;
  }

  .hero-ip {
    font-size: clamp(1.7rem, 9.3vw, 2rem);
    line-height: 0.92;
  }

  .hero-ip-split {
    font-size: clamp(1.22rem, 7.05vw, 2.38rem);
    line-height: 0.88;
  }

  .table-row {
    grid-template-columns: 1fr;
  }

  .meta-chip {
    width: 100%;
  }

  .probe-value {
    font-size: 1.1rem;
  }

  .probe-value-split {
    display: grid;
    gap: 0.15rem;
  }

  .probe-value-split .probe-line {
    display: block;
  }

  .probe-value-split .probe-line-secondary::before {
    content: "";
  }

  .probe-error-popover {
    right: -0.15rem;
    width: min(16rem, calc(100vw - 3.5rem));
  }
}

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