:root {
  color-scheme: dark;
  --bg: #08111f;
  --bg-2: #111c31;
  --surface: rgba(8, 17, 31, 0.72);
  --surface-strong: rgba(17, 28, 49, 0.9);
  --surface-border: rgba(135, 181, 255, 0.14);
  --text: #eef4ff;
  --muted: #9fb2d4;
  --primary: #3cc6ff;
  --primary-dark: #1e88ff;
  --secondary: rgba(170, 220, 255, 0.12);
  --shadow: 0 30px 80px rgba(0, 0, 0, 0.35);
  --radius-xl: 28px;
  --radius-md: 12px;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: "IBM Plex Sans", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(60, 198, 255, 0.24), transparent 22%),
    radial-gradient(circle at 85% 15%, rgba(83, 114, 255, 0.22), transparent 18%),
    radial-gradient(circle at bottom right, rgba(16, 214, 162, 0.18), transparent 20%),
    linear-gradient(160deg, #050b15, var(--bg) 40%, var(--bg-2));
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(122,175,255,0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(122,175,255,0.07) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,0.65), transparent 80%);
}
.page-shell { width: min(1180px, calc(100% - 32px)); margin: 0 auto; padding: 40px 0 64px; }
.hero {
  display: flex; justify-content: space-between; gap: 24px; align-items: flex-start;
  margin-bottom: 28px; padding: 30px; border-radius: var(--radius-xl);
  background: radial-gradient(circle at top right, rgba(60, 198, 255, 0.18), transparent 30%), linear-gradient(135deg, rgba(8, 17, 31, 0.86), rgba(19, 32, 57, 0.84));
  border: 1px solid var(--surface-border); box-shadow: var(--shadow); overflow: hidden; position: relative;
}
.hero::after {
  content: "";
  position: absolute;
  width: 240px;
  height: 240px;
  right: -40px;
  top: -80px;
  background: radial-gradient(circle, rgba(60, 198, 255, 0.34), transparent 70%);
  filter: blur(10px);
}
.hero h1, .section-heading h2, .section-heading h3 { margin: 0; font-family: "Space Grotesk", sans-serif; }
.hero h1 { font-size: clamp(2rem, 4vw, 3.7rem); line-height: 1.02; max-width: 14ch; }
.eyebrow { margin: 0 0 10px; letter-spacing: 0.14em; text-transform: uppercase; font-size: 0.78rem; color: #7fd8ff; font-weight: 700; }
.hero-copy, .section-heading p, .stat span, .summary-stat span { color: var(--muted); }
.hero-copy { max-width: 62ch; font-size: 1.02rem; line-height: 1.6; margin-top: 14px; }
.hero-copy-wrap { position: relative; z-index: 1; }
.hero-pills { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.hero-pills span { padding: 8px 12px; border-radius: 999px; background: rgba(255,255,255,0.08); border: 1px solid rgba(127,216,255,0.18); color: #d9f3ff; font-size: 0.9rem; }
.hero-badge {
  min-width: 280px; padding: 18px; border-radius: 22px; background: linear-gradient(180deg, rgba(255,255,255,0.08), rgba(255,255,255,0.03));
  color: #fff7ee; display: grid; gap: 10px; border: 1px solid rgba(127,216,255,0.18); position: relative; z-index: 1;
}
.hero-badge span { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.12em; color: rgba(201,231,255,0.78); }
.hero-badge p { margin: 8px 0 0; color: var(--muted); font-size: 0.92rem; }
.layout { display: grid; gap: 22px; }
.card { background: var(--surface); border: 1px solid var(--surface-border); border-radius: var(--radius-xl); box-shadow: var(--shadow); backdrop-filter: blur(18px); padding: 28px; }
.section-heading { margin-bottom: 20px; }
.section-heading.compact { margin-bottom: 14px; }
.setup-form, .answer-form, .followup-form { display: grid; gap: 18px; }
.grid { display: grid; gap: 16px; }
.two-up { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.three-up { grid-template-columns: repeat(3, minmax(0, 1fr)); }
label { display: grid; gap: 8px; font-weight: 600; }
input, textarea, select, button { font: inherit; }
input, textarea, select { width: 100%; border: 1px solid rgba(135,181,255,0.14); background: var(--surface-strong); color: var(--text); border-radius: var(--radius-md); padding: 14px 16px; }
input:focus, textarea:focus, select:focus { outline: none; border-color: rgba(60,198,255,0.85); box-shadow: 0 0 0 4px rgba(60,198,255,0.14); }
textarea { resize: vertical; min-height: 120px; }
.toggle-row { display: flex; flex-wrap: wrap; gap: 18px; }
.checkbox { display: flex; align-items: center; gap: 10px; font-weight: 500; }
.checkbox input { width: 18px; height: 18px; margin: 0; }
.button-row { display: flex; flex-wrap: wrap; gap: 12px; }
button { border: none; border-radius: 999px; padding: 13px 20px; font-weight: 700; cursor: pointer; transition: transform 140ms ease, box-shadow 140ms ease, opacity 140ms ease; }
button:hover:not(:disabled) { transform: translateY(-1px); }
.primary { background: linear-gradient(135deg, var(--primary), var(--primary-dark)); color: white; box-shadow: 0 12px 28px rgba(30,136,255,0.28); }
.secondary { background: var(--secondary); color: var(--text); border: 1px solid rgba(135,181,255,0.16); }
.stats-bar { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 22px; }
.stat, .summary-stat { padding: 16px; border-radius: 20px; background: linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.03)); border: 1px solid rgba(135,181,255,0.12); }
.stat strong, .summary-stat strong { display: block; margin-top: 8px; font-size: 1.4rem; font-family: "Space Grotesk", sans-serif; }
.question-panel { padding: 22px; border-radius: 22px; background: radial-gradient(circle at top right, rgba(60,198,255,0.12), transparent 30%), linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.03)); border: 1px solid rgba(135,181,255,0.12); margin-bottom: 18px; }
.question-panel h3 { margin-top: 0; font-family: "Space Grotesk", sans-serif; }
.choice-list { display: grid; gap: 12px; margin-top: 18px; }
.choice-item {
  display: grid;
  grid-template-columns: auto auto 1fr;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.025));
  border: 1px solid rgba(135,181,255,0.12);
  cursor: pointer;
  transition: border-color 140ms ease, background 140ms ease, transform 140ms ease, box-shadow 140ms ease;
}
.choice-item:hover {
  border-color: rgba(135,181,255,0.24);
  background: linear-gradient(180deg, rgba(255,255,255,0.07), rgba(255,255,255,0.04));
  transform: translateY(-1px);
}
.choice-item input {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: #3cc6ff;
}
.choice-letter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background: rgba(60,198,255,0.12);
  border: 1px solid rgba(60,198,255,0.18);
  color: #d9f6ff;
  font-weight: 700;
  font-size: 0.9rem;
}
.choice-text {
  color: var(--text);
  line-height: 1.45;
  font-weight: 500;
}
.choice-item:has(input:checked) {
  border-color: rgba(60,198,255,0.55);
  background: linear-gradient(180deg, rgba(60,198,255,0.16), rgba(30,136,255,0.08));
  box-shadow: 0 12px 28px rgba(12, 45, 99, 0.24);
}
.choice-item:has(input:checked) .choice-letter {
  background: linear-gradient(135deg, #3cc6ff, #1e88ff);
  color: white;
  border-color: transparent;
}
.answer-form.compact-answer label {
  display: none;
}
.answer-form.compact-answer {
  gap: 0;
}
.result-panel, .followup-panel { margin-top: 18px; padding: 20px; border-radius: 22px; background: rgba(255,255,255,0.04); border: 1px solid rgba(135,181,255,0.12); }
.result-panel.correct { border-color: rgba(79,227,176,0.3); background: rgba(14,84,66,0.22); }
.result-panel.incorrect { border-color: rgba(255,115,115,0.28); background: rgba(96,32,32,0.24); }
.result-grid { display: grid; gap: 10px; }
.result-title { font-size: 1.15rem; font-weight: 700; }
.result-chip { display: inline-flex; align-items: center; width: fit-content; border-radius: 999px; padding: 7px 12px; font-size: 0.9rem; font-weight: 700; }
.result-chip.correct { color: #bbffe4; background: rgba(79,227,176,0.12); }
.result-chip.incorrect { color: #ffd0d0; background: rgba(255,115,115,0.12); }
.followup-messages { display: grid; gap: 12px; margin-bottom: 14px; }
.message { padding: 13px 14px; border-radius: 16px; border: 1px solid rgba(135,181,255,0.12); background: rgba(255,255,255,0.05); white-space: pre-wrap; }
.message.user { background: rgba(60,198,255,0.09); }
.summary-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-bottom: 18px; }
.summary-stat.accent { background: linear-gradient(135deg, #12335f, #1e88ff); color: white; }
.summary-stat.accent span { color: rgba(230,244,255,0.82); }
.hidden { display: none; }
@media (max-width: 900px) {
  .hero { flex-direction: column; }
  .two-up, .three-up, .stats-bar, .summary-grid { grid-template-columns: 1fr; }
}
