:root {
  --bg: #0a1628;
  --bg-soft: #10203a;
  --panel: rgba(255, 255, 255, 0.08);
  --border: rgba(255, 255, 255, 0.14);
  --text: #ffffff;
  --muted: rgba(255, 255, 255, 0.72);
  --gold: #d4af37;
  --shadow: 0 24px 64px rgba(0, 0, 0, 0.28);
  --radius-xl: 28px;
  --radius-lg: 18px;
  --reading: #4d8eff;
  --math: #3dc97b;
  --science: #ff9f43;
  --grammar: #8f63ff;
  --speed: #ff5d73;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(212, 175, 55, 0.18), transparent 28%),
    radial-gradient(circle at top right, rgba(77, 142, 255, 0.14), transparent 22%),
    linear-gradient(180deg, #0a1628 0%, #0b1930 55%, #081221 100%);
  font-family: "Inter", sans-serif;
}

a {
  color: inherit;
}

.page-shell,
.site-footer {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.page-shell {
  padding: 28px 0 48px;
}

.hero-panel,
.card {
  border: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.05));
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow);
}

.hero-panel {
  border-radius: var(--radius-xl);
  padding: 28px;
  position: relative;
  overflow: hidden;
}

.hero-panel::after {
  content: "";
  position: absolute;
  inset: auto -80px -100px auto;
  width: 280px;
  height: 280px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(212, 175, 55, 0.2), transparent 68%);
}

.brand-row,
.brand-lockup,
.quiz-topbar,
.timer-row,
.quiz-actions,
.confidence-wrap,
.lead-success {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.brand-mark,
.hero-copy h1,
.section-intro h2,
.verdict-text {
  font-family: "Poppins", sans-serif;
}

.brand-mark {
  color: var(--gold);
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.brand-subtitle,
.brand-link,
.hero-copy p,
.section-intro p,
.supporting-copy,
.field span,
.timer-meta span,
.site-footer,
.question-counter,
.verdict-label,
.metric-card small {
  color: var(--muted);
}

.brand-link {
  text-decoration: none;
  border-bottom: 1px solid rgba(212, 175, 55, 0.4);
}

.hero-copy {
  max-width: 760px;
  margin-top: 26px;
}

.eyebrow,
.section-kicker,
.dimension-badge,
.processing-chip {
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.eyebrow,
.section-kicker {
  border: 1px solid rgba(212, 175, 55, 0.35);
  background: rgba(212, 175, 55, 0.12);
  color: #f2d67a;
  text-transform: uppercase;
}

.hero-copy h1 {
  margin: 16px 0 14px;
  font-size: clamp(2.2rem, 5vw, 4rem);
  line-height: 1.02;
}

.hero-copy p,
.section-intro p,
.reasoning-list {
  line-height: 1.7;
}

.app-shell {
  margin-top: 24px;
}

.screen {
  display: none;
}

.screen.active {
  display: block;
}

.card {
  border-radius: var(--radius-xl);
  padding: 26px;
}

.section-intro h2 {
  margin: 14px 0 8px;
  font-size: clamp(1.5rem, 3vw, 2.3rem);
}

.field-grid,
.checkbox-grid,
.radio-grid,
.results-grid,
.benchmark-grid,
.dimension-labels {
  display: grid;
  gap: 18px;
}

.field-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.checkbox-grid,
.radio-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.results-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.field,
.field-group {
  display: grid;
  gap: 10px;
}

.field-group {
  margin: 22px 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px;
}

.field-group legend {
  padding: 0 10px;
  color: var(--text);
  font-weight: 700;
}

input,
select,
button {
  font: inherit;
}

input,
select {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  padding: 14px 16px;
}

input::placeholder {
  color: rgba(255, 255, 255, 0.45);
}

select option {
  color: #0a1628;
}

.checkbox-grid label,
.radio-grid label {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.04);
}

.conditional-grid {
  margin-bottom: 24px;
}

.hidden {
  display: none !important;
}

.form-error {
  min-height: 1.3em;
  color: #ffb3b3;
  margin: 0 0 14px;
}

.btn-primary,
.btn-secondary,
.btn-whatsapp,
.option-btn {
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease, border-color 180ms ease;
}

.btn-primary,
.btn-secondary,
.btn-whatsapp {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 52px;
  border-radius: 999px;
  text-decoration: none;
  cursor: pointer;
}

.btn-primary {
  padding: 0 26px;
  color: #0a1628;
  border: 0;
  background: linear-gradient(135deg, #d4af37, #f3db86);
  font-weight: 800;
  box-shadow: 0 14px 28px rgba(212, 175, 55, 0.25);
}

.btn-secondary {
  padding: 0 22px;
  color: var(--text);
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.22);
}

.btn-whatsapp {
  padding: 0 22px;
  color: #fff;
  border: 0;
  background: #25d366;
  font-weight: 700;
}

.btn-primary:hover,
.btn-secondary:hover,
.btn-whatsapp:hover,
.option-btn:hover {
  transform: translateY(-1px);
}

.btn-primary:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

.question-counter {
  margin: 0 0 10px;
}

.progress-rail,
.confidence-meter,
.processing-bar {
  width: 100%;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.08);
}

.progress-rail {
  height: 10px;
}

.progress-fill,
.confidence-fill,
.processing-fill {
  width: 0;
  height: 100%;
  border-radius: inherit;
}

.progress-fill,
.processing-fill {
  background: linear-gradient(90deg, #d4af37, #f5df8c);
}

.confidence-fill {
  background: linear-gradient(90deg, #59d98e, #d4af37);
}

.badge-reading { background: rgba(77, 142, 255, 0.18); color: #8cb6ff; }
.badge-math { background: rgba(61, 201, 123, 0.18); color: #86efac; }
.badge-science { background: rgba(255, 159, 67, 0.2); color: #ffbb78; }
.badge-grammar { background: rgba(143, 99, 255, 0.22); color: #ccb6ff; }
.badge-speed { background: rgba(255, 93, 115, 0.18); color: #ffb3c0; }

.timer-row {
  margin: 24px 0 22px;
}

.timer-pill {
  min-width: 130px;
  padding: 12px 16px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(89, 217, 142, 0.14);
  text-align: right;
}

.timer-pill.warning {
  background: rgba(245, 196, 81, 0.18);
}

.timer-pill.danger {
  background: rgba(240, 107, 107, 0.2);
}

.question-panel,
.memory-sequence,
.stimulus,
.dimension-pill,
.metric-card,
.weakest-callout {
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
}

.question-panel {
  padding: 24px;
}

.memory-sequence,
.stimulus,
.metric-card,
.weakest-callout {
  padding: 18px;
}

.memory-sequence {
  margin-bottom: 18px;
  border-left: 4px solid var(--speed);
}

.stimulus {
  margin-bottom: 18px;
  border-left: 4px solid var(--gold);
  overflow-x: auto;
}

.question-text {
  margin: 0 0 18px;
  font-size: clamp(1.2rem, 2.6vw, 1.65rem);
  line-height: 1.45;
}

.options {
  display: grid;
  gap: 12px;
}

.option-btn {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  padding: 16px;
  text-align: left;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 14px;
  align-items: start;
  cursor: pointer;
}

.option-btn.selected {
  border-color: rgba(212, 175, 55, 0.65);
  background: rgba(212, 175, 55, 0.12);
}

.option-letter {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  background: rgba(255, 255, 255, 0.1);
  font-weight: 800;
}

.quiz-actions {
  margin-top: 20px;
}

.processing-card {
  text-align: center;
  padding-top: 56px;
  padding-bottom: 56px;
}

.processing-bar {
  height: 14px;
  margin: 22px auto 24px;
  max-width: 760px;
}

.processing-dimensions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
}

.processing-chip {
  border: 1px solid var(--border);
  color: var(--muted);
}

.processing-chip.active {
  background: rgba(212, 175, 55, 0.16);
  border-color: rgba(212, 175, 55, 0.55);
  color: #f5df8c;
}

.verdict-card {
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.18), rgba(255, 255, 255, 0.06));
}

.verdict-label {
  margin: 10px 0 0;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.verdict-text {
  margin: 8px 0 14px;
  color: var(--gold);
  font-size: clamp(2.5rem, 5vw, 4.2rem);
}

.confidence-wrap {
  align-items: end;
  margin-bottom: 16px;
}

.confidence-copy {
  min-width: 200px;
}

.confidence-meter {
  height: 12px;
}

.dimension-pill {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 16px;
}

.reasoning-list {
  margin: 0;
  padding-left: 20px;
}

.weakest-card {
  background: linear-gradient(180deg, rgba(240, 107, 107, 0.16), rgba(255, 255, 255, 0.05));
}

.weakest-callout {
  background: rgba(240, 107, 107, 0.14);
  border-color: rgba(240, 107, 107, 0.35);
}

.lead-form {
  margin-bottom: 16px;
}

.site-footer {
  padding-top: 6px;
  padding-bottom: 30px;
  text-align: center;
  font-size: 0.95rem;
}

.stimulus table {
  width: 100%;
  border-collapse: collapse;
}

.stimulus th,
.stimulus td {
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  text-align: left;
}

.stimulus svg {
  max-width: 100%;
  height: auto;
}

@media (max-width: 960px) {
  .results-grid,
  .field-grid,
  .checkbox-grid,
  .radio-grid {
    grid-template-columns: 1fr;
  }

  .brand-row,
  .brand-lockup,
  .quiz-topbar,
  .timer-row,
  .quiz-actions,
  .confidence-wrap,
  .lead-success {
    flex-direction: column;
    align-items: stretch;
  }

  .dimension-badge,
  .timer-pill {
    width: fit-content;
  }
}

@media (max-width: 640px) {
  .page-shell,
  .site-footer {
    width: min(100% - 20px, 1180px);
  }

  .page-shell {
    padding-top: 14px;
  }

  .hero-panel,
  .card {
    padding: 20px;
    border-radius: 22px;
  }

  .option-btn {
    grid-template-columns: 1fr;
  }

  .option-letter {
    width: 30px;
    height: 30px;
  }

  .btn-primary,
  .btn-secondary,
  .btn-whatsapp {
    width: 100%;
  }
}
