/* ── Quiz Landing Page ── */

/* ── HERO ── */
.quiz-hero-sub {
  font-size: 1.15rem;
  color: var(--ink-2);
  max-width: 540px;
  line-height: 1.7;
  margin: 0 0 1.8rem;
}

/* ── QUIZ SECTION BACKGROUND ── */
.quiz-section {
  background: var(--surface-2);
  border-block: 1px solid var(--line);
}

.qw-wrap {
  max-width: 720px;
  margin: 0 auto;
}

/* ── LEVEL TABS ── */
.qw-level-tabs {
  display: flex;
  gap: .5rem;
  margin-bottom: 1.75rem;
  flex-wrap: wrap;
}

.qw-level-tab {
  padding: .45rem 1.1rem;
  border-radius: var(--r-pill);
  border: 1.5px solid var(--line);
  background: var(--surface);
  font-size: .88rem;
  font-weight: 600;
  cursor: pointer;
  color: var(--ink-2);
  transition: border-color .15s, background .15s, color .15s;
  box-shadow: var(--shadow-sm);
}

.qw-level-tab:hover:not(.active) {
  border-color: var(--accent);
  color: var(--ink);
}

.qw-level-tab.active {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
  box-shadow: var(--shadow-accent);
}

/* ── TOPIC CHIPS ── */
.qw-topics {
  display: flex;
  flex-wrap: wrap;
  gap: .65rem;
  margin-bottom: .25rem;
}

.qw-topic-card {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .6rem 1.1rem;
  border: 1.5px solid var(--line);
  border-radius: var(--r-pill);
  background: var(--surface);
  cursor: pointer;
  font-family: var(--font-ui);
  font-size: .9rem;
  font-weight: 600;
  color: var(--ink-2);
  box-shadow: var(--shadow-sm);
  transition: border-color .15s, background .15s, color .15s, box-shadow .15s, transform .12s;
}

.qw-topic-card:hover {
  border-color: var(--accent);
  color: var(--ink);
  background: var(--accent-tint);
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}

.qw-topic-card.done {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent-ink);
}

.qw-topic-icon {
  font-size: 1rem;
  line-height: 1;
}

.qw-topic-name {
  font-size: .9rem;
  font-weight: 600;
}

.qw-topic-done {
  font-size: .75rem;
  font-weight: 700;
  color: var(--accent-ink);
  font-family: var(--font-mono);
}

/* ── QUESTION CARD ── */
.qw-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 2rem;
  box-shadow: var(--shadow);
}

.qw-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
  font-size: .82rem;
  color: var(--ink-3);
  font-family: var(--font-mono);
}

.qw-progress-bar {
  height: 5px;
  border-radius: var(--r-pill);
  background: var(--line);
  overflow: hidden;
  margin-bottom: 1.75rem;
}

.qw-progress-fill {
  height: 100%;
  background: var(--accent);
  border-radius: var(--r-pill);
  transition: width .35s ease;
}

.qw-prompt {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 1.4rem;
  line-height: 1.5;
}

.qw-options {
  display: flex;
  flex-direction: column;
  gap: .6rem;
  list-style: none;
  padding: 0;
  margin: 0;
}

.qw-opt {
  width: 100%;
  text-align: left;
  padding: .85rem 1.1rem;
  border: 1.5px solid var(--line);
  border-radius: var(--r);
  background: var(--surface);
  font-size: .97rem;
  font-family: var(--font-ui);
  cursor: pointer;
  color: var(--ink);
  transition: border-color .15s, background .15s;
}

.qw-opt:hover:not(:disabled) {
  border-color: var(--accent);
  background: var(--accent-tint);
}

.qw-opt:disabled { cursor: default; }

.qw-opt.correct {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent-ink);
  font-weight: 600;
}

.qw-opt.wrong {
  border-color: oklch(0.65 0.18 20);
  background: oklch(0.975 0.018 20);
  color: oklch(0.42 0.14 20);
}

.qw-explanation {
  margin-top: 1.1rem;
  padding: .8rem 1rem;
  border-radius: var(--r-sm);
  background: var(--accent-soft);
  font-size: .9rem;
  color: var(--accent-ink);
  line-height: 1.6;
  display: none;
}

.qw-explanation.visible { display: block; }

.qw-next {
  margin-top: 1.3rem;
  display: none;
  padding: .75rem 1.6rem;
  border-radius: var(--r-pill);
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  font-size: .95rem;
  font-family: var(--font-ui);
  border: none;
  cursor: pointer;
  box-shadow: var(--shadow-accent);
  transition: background .15s;
}

.qw-next:hover { background: var(--accent-strong); }
.qw-next.visible { display: inline-flex; }

/* ── LOADING ── */
.qw-loading {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--ink-3);
  font-size: .95rem;
}

/* ── SCORE SCREEN ── */
.qw-wall {
  display: none;
  text-align: center;
  padding: 2.5rem 1.5rem;
}

.qw-wall.visible { display: block; }

.qw-score-badge {
  font-size: 3.5rem;
  font-weight: 800;
  color: var(--ink);
  line-height: 1;
  letter-spacing: -.04em;
  margin-bottom: .4rem;
}

.qw-score-label {
  font-size: 1rem;
  color: var(--ink-2);
  margin-bottom: 1.25rem;
}

.qw-retry {
  margin-top: .25rem;
  font-size: .9rem;
}

.qw-wall-divider {
  width: 100%;
  text-align: center;
  font-size: .82rem;
  color: var(--ink-3);
  margin: 1.4rem 0 .9rem;
  padding-top: 1.4rem;
  border-top: 1px solid var(--line);
}

.qw-wall-note {
  margin-top: .85rem;
  font-size: .82rem;
  color: var(--ink-3);
}

/* ── CONTENT BLOCK ── */
.content-block {
  max-width: 680px;
  margin: 0 auto;
}

.content-block h2 {
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: .8rem;
  color: var(--ink);
}

.content-block p {
  color: var(--ink-2);
  line-height: 1.75;
  margin-bottom: 1rem;
}

/* ── FAQ ── */
.faq-list {
  max-width: 720px;
  margin: 0 auto;
}

.faq-item {
  border-bottom: 1px solid var(--line);
}

.faq-q {
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  padding: 1.2rem 0;
  font-size: 1rem;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  font-family: var(--font-ui);
}

.faq-q .faq-chevron { flex-shrink: 0; transition: transform .2s; color: var(--ink-3); }
.faq-q[aria-expanded="true"] .faq-chevron { transform: rotate(180deg); }

.faq-a {
  display: none;
  padding: 0 0 1.2rem;
  color: var(--ink-2);
  line-height: 1.75;
  font-size: .95rem;
}

.faq-a.open { display: block; }
