:root {
  color-scheme: dark;
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  background: transparent;
  color: #f8fafc;
}

* {
  box-sizing: border-box;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  display: grid;
  place-items: center;
  padding: clamp(24px, 5vw, 96px);
  background:
    radial-gradient(circle at top left, rgb(14 116 144 / 35%), transparent 42%),
    linear-gradient(145deg, #08111f, #111827 55%, #07101d);
}

.test-card {
  width: min(1240px, 100%);
  border: 2px solid #475569;
  border-radius: 28px;
  padding: clamp(28px, 4vw, 64px);
  background: rgb(15 23 42 / 94%);
  box-shadow: 0 30px 90px rgb(0 0 0 / 45%);
}

.eyebrow,
.phase,
dt {
  color: #94a3b8;
  font-size: clamp(0.85rem, 1.2vw, 1.1rem);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.status-row {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 20px 0 44px;
  font-size: clamp(1rem, 1.5vw, 1.35rem);
}

.state-badge {
  min-width: 112px;
  border-radius: 999px;
  padding: 10px 18px;
  text-align: center;
  color: #020617;
  background: #fde047;
  font-weight: 800;
}

body[data-state="ready"] .state-badge {
  background: #4ade80;
}

body[data-state="stale"] .state-badge {
  background: #fb923c;
}

body[data-state="error"] .state-badge {
  color: #fff;
  background: #dc2626;
}

h1 {
  max-width: 22ch;
  margin: 12px 0 18px;
  font-size: clamp(2.4rem, 5vw, 5.5rem);
  line-height: 1.02;
}

.detail {
  max-width: 58ch;
  margin: 0;
  color: #cbd5e1;
  font-size: clamp(1.2rem, 2vw, 2rem);
  line-height: 1.45;
}

.utf8-sample {
  min-height: 1.5em;
  color: #67e8f9;
  font-size: clamp(1rem, 1.6vw, 1.5rem);
}

.counter-line {
  font-size: clamp(1.1rem, 1.8vw, 1.6rem);
}

.diagnostics {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
  margin: 48px 0 0;
}

.diagnostics div {
  min-width: 0;
  border: 1px solid #334155;
  border-radius: 14px;
  padding: 14px;
  background: #0f172a;
}

dd {
  overflow: hidden;
  margin: 8px 0 0;
  color: #f8fafc;
  font-variant-numeric: tabular-nums;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 900px) {
  .diagnostics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .status-row {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
