/* =========================================================
   QUIZ (only) — style for quiz.html
   Uses main.css buttons/typography; adds quiz layout + checkbox cards
========================================================= */

body[data-page="quiz"] main { padding: 28px 0 56px; }

.quiz-top{
  display: grid;
  grid-template-columns: 1.2fr .8fr;
  gap: 18px;
  align-items: end;
  margin-bottom: 16px;
}
.quiz-top__desc{ margin: 8px 0 0; }

.quiz-progress{
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.78);
  box-shadow: var(--shadow);
  padding: 14px 14px 12px;
}
.quiz-progress__row{
  display:flex;
  justify-content: space-between;
  align-items:center;
  gap:12px;
  margin-bottom:10px;
}
.quiz-progress__label{ font-weight: 800; }
.quiz-progress__bar{
  height: 10px;
  border-radius: 999px;
  background: rgba(16,38,66,.10);
  overflow: hidden;
}
.quiz-progress__fill{
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(45,126,247,.85), rgba(122,76,244,.78));
  box-shadow: 0 10px 18px rgba(45,126,247,.18);
}

.quiz-shell{ margin-top: 14px; }

.q-card{
  position: relative;
  border-radius: 26px;
  border: 1px solid rgba(16,38,66,.10);
  background:
    radial-gradient(900px 520px at 18% 10%, rgba(45,126,247,.10), transparent 62%),
    radial-gradient(900px 560px at 88% 20%, rgba(122,76,244,.09), transparent 64%),
    linear-gradient(180deg, rgba(255,255,255,.92), rgba(255,255,255,.78));
  box-shadow: var(--shadow2);
  padding: 20px;
  overflow: hidden;
}

.q-head{ margin-bottom: 14px; }
.q-badge{
  display:inline-flex;
  align-items:center;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(45,126,247,.10);
  border: 1px solid rgba(45,126,247,.16);
  color: rgba(29,42,58,.78);
  font-weight: 800;
  font-size: .92rem;
}
.q-title{
  margin: 10px 0 6px;
  font-size: clamp(1.25rem, 2.2vw, 1.6rem);
  letter-spacing: -0.2px;
}
.q-sub{ margin: 0; max-width: 78ch; }

.q-options{
  display:grid;
  gap: 10px;
  margin-top: 14px;
}

/* option card */
.q-opt{
  display:flex;
  align-items:flex-start;
  gap: 12px;
  padding: 14px 14px;
  border-radius: 18px;
  border: 1px solid rgba(16,38,66,.10);
  background: rgba(255,255,255,.82);
  cursor: pointer;
  transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease, background .12s ease;
}
.q-opt:hover{
  transform: translateY(-1px);
  box-shadow: 0 14px 26px rgba(16,38,66,.10);
  border-color: rgba(45,126,247,.20);
  background: rgba(255,255,255,.92);
}

.q-input{
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.q-box{
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  border-radius: 7px;
  border: 2px solid rgba(29,42,58,.22);
  background: rgba(255,255,255,.90);
  box-shadow: 0 1px 0 rgba(255,255,255,.85) inset;
  margin-top: 2px;
  position: relative;
}

.q-text{
  font-weight: 650;
  color: rgba(29,42,58,.88);
  line-height: 1.4;
}

/* checked state (checkbox-looking) */
.q-opt.is-checked{
  border-color: rgba(45,126,247,.35);
  background: rgba(45,126,247,.08);
  box-shadow: 0 18px 34px rgba(45,126,247,.14);
}
.q-opt.is-checked .q-box{
  border-color: rgba(45,126,247,.70);
  background: rgba(45,126,247,.12);
}
.q-opt.is-checked .q-box::after{
  content:"";
  position:absolute;
  left: 6px;
  top: 2px;
  width: 6px;
  height: 12px;
  border-right: 3px solid rgba(45,126,247,.95);
  border-bottom: 3px solid rgba(45,126,247,.95);
  transform: rotate(40deg);
}

/* navigation */
.q-nav{
  display:flex;
  justify-content: space-between;
  align-items:center;
  gap: 12px;
  margin-top: 16px;
  flex-wrap: wrap;
}
.q-nav--last{ justify-content: flex-start; gap: 12px; }
.q-next[disabled]{
  opacity: .55;
  cursor: not-allowed;
}
.q-fineprint{ margin: 14px 0 0; }

.quiz-bottom-note{
  margin-top: 14px;
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.72);
}

/* responsive */
@media (max-width: 980px){
  .quiz-top{ grid-template-columns: 1fr; }
  .q-card{ padding: 16px; border-radius: 22px; }
  .q-opt{ padding: 12px 12px; }
}
