:root {
  color-scheme: dark;
  --bg: #05080f;
  --card: rgb(12 16 28 / 0.72);
  --border: rgb(255 255 255 / 0.12);
  --text: #e8ecf6;
  --muted: #a3acc2;
  --accent: #7aa2ff;
  --ok: #5fd39a;
  --no: #ff7a8a;
  --radius: 14px;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  line-height: 1.5;
}

*, *::before, *::after { box-sizing: border-box; }

html, body { margin: 0; min-height: 100%; background: var(--bg); color: var(--text); }

#bg {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  display: block;
  z-index: 0;
}

.card {
  position: relative;
  z-index: 1;
  width: min(560px, calc(100% - 2rem));
  margin: clamp(1rem, 8vh, 5rem) auto;
  padding: 1.75rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  backdrop-filter: blur(14px) saturate(1.2);
  box-shadow: 0 20px 60px rgb(0 0 0 / 0.45);
}

h1 { margin: 0 0 0.25rem; font-size: 1.75rem; letter-spacing: -0.01em; }
h2 { margin: 1.5rem 0 0.6rem; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }
.lede { margin: 0; color: var(--muted); }

.badges { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0; padding: 0; list-style: none; }
.badges li {
  padding: 0.25rem 0.7rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 0.85rem;
  color: var(--muted);
}
.badges li::before { content: "…"; margin-right: 0.4rem; }
.badges li.yes { color: var(--text); border-color: color-mix(in srgb, var(--ok) 50%, transparent); }
.badges li.yes::before { content: "✓"; color: var(--ok); }
.badges li.no { border-color: color-mix(in srgb, var(--no) 40%, transparent); }
.badges li.no::before { content: "✕"; color: var(--no); }

.controls { display: flex; flex-wrap: wrap; align-items: end; gap: 0.75rem; }
.controls label { display: grid; gap: 0.25rem; font-size: 0.85rem; color: var(--muted); }

select, button {
  font: inherit;
  color: var(--text);
  border-radius: 8px;
  border: 1px solid var(--border);
  background: rgb(255 255 255 / 0.06);
  padding: 0.45rem 0.7rem;
}

button {
  cursor: pointer;
  background: var(--accent);
  border-color: transparent;
  color: #081024;
  font-weight: 600;
}
button:hover:not(:disabled) { filter: brightness(1.1); }
button:disabled { opacity: 0.55; cursor: progress; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.results { width: 100%; margin-top: 1rem; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.results caption { caption-side: bottom; text-align: left; padding-top: 0.4rem; font-size: 0.8rem; color: var(--muted); }
.results th, .results td { padding: 0.4rem 0; border-bottom: 1px solid var(--border); }
.results th { text-align: left; font-weight: 400; color: var(--muted); }
.results td { text-align: right; }

details { margin-bottom: 0.75rem; font-size: 0.9rem; }
summary { cursor: pointer; color: var(--muted); }
pre {
  margin: 0.5rem 0 0;
  padding: 0.75rem;
  max-height: 16rem;
  overflow: auto;
  background: rgb(0 0 0 / 0.35);
  border-radius: 8px;
  font-size: 0.8rem;
}

.status { min-height: 1.5em; margin: 1.25rem 0 0; font-size: 0.9rem; color: var(--muted); }
.status.ok { color: var(--ok); }
.status.error { color: var(--no); }

@media (prefers-reduced-transparency: reduce) {
  .card { backdrop-filter: none; background: rgb(12 16 28 / 0.96); }
}
