/* ══════════════════════════════════
   TEST SCREEN
══════════════════════════════════ */
#test {
  flex-direction: column;
  min-height: 100dvh;
}

/* Sticky header */
.test-header {
  position: sticky;
  top: 0;
  z-index: 200;
  background: var(--white);
  border-bottom: 1px solid var(--warm-gray);
  padding: 0 1.25rem;
  height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 1rem;
  box-shadow: var(--shadow-sm);
}

.test-logo {
  font-family: 'DM Serif Display', serif;
  font-size: 1.35rem;
  color: var(--accent);
  flex-shrink: 0;
  text-decoration: none;
}

.progress-area { flex: 1; display: flex; flex-direction: column; gap: 0.25rem; }

.progress-track {
  height: 4px;
  background: var(--warm-gray);
  border-radius: 2px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--teal));
  border-radius: 2px;
  width: 0;
  transition: width 0.35s ease;
}
.progress-label {
  font-size: 0.72rem;
  color: var(--mid-gray);
  display: flex;
  justify-content: space-between;
}

.btn-back-home {
  flex-shrink: 0;
  background: none;
  border: 1px solid var(--warm-gray);
  color: var(--mid-gray);
  font-size: 0.78rem;
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius);
  transition: all 0.15s;
}
.btn-back-home:hover { border-color: var(--accent); color: var(--accent); }

/* Unanswered chips bar */
.unanswered-bar {
  position: sticky;
  top: var(--header-h);
  z-index: 190;
  background: #fff3f3;
  border-bottom: 1px solid #ffd5d5;
  padding: 0.5rem 1.25rem;
  display: none;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
}
.unanswered-bar.visible { display: flex; }
.unanswered-label {
  font-size: 0.75rem;
  color: var(--danger);
  font-weight: 500;
  margin-right: 0.3rem;
  flex-shrink: 0;
}
.q-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px; height: 28px;
  border-radius: 50%;
  background: #fff;
  border: 1.5px solid var(--unanswered);
  color: var(--unanswered);
  font-size: 0.7rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s;
}
.q-chip:hover { background: var(--unanswered); color: #fff; }

/* Questions container */
.questions-wrap {
  flex: 1;
  overflow-y: auto;
  padding: 1.5rem 1.25rem calc(var(--footer-h) + 1rem);
}

.questions-list {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* Question card */
.q-card {
  background: var(--white);
  border: 1px solid var(--warm-gray);
  border-radius: var(--radius);
  padding: 1.25rem 1.25rem 1rem;
  box-shadow: var(--shadow-sm);
  scroll-margin-top: 0;
  transition: border-color 0.2s;
}
.q-card.answered { border-left: 3px solid var(--teal); }
.q-card.unanswered-highlight {
  border-color: var(--unanswered);
  box-shadow: 0 0 0 2px rgba(231,76,60,0.1);
}
.q-card.special-card { border-left: 3px solid var(--gold); }

.q-header {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.75rem;
}

.q-badge {
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  padding: 0.2rem 0.55rem;
  border-radius: 100px;
  flex-shrink: 0;
}
.q-badge-num { background: var(--off-white); color: var(--mid-gray); }
.q-badge-special { background: #fef9e7; color: var(--gold); border: 1px solid #f7dc6f55; }
.q-badge-dim { background: #f0f4f8; color: var(--accent); display: none; }

.q-text {
  font-size: 0.93rem;
  line-height: 1.75;
  color: var(--dark-gray);
  margin-bottom: 1rem;
}

/* Options */
.options { display: flex; flex-direction: column; gap: 0.5rem; }

.opt-label {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.7rem 0.9rem;
  border: 1.5px solid var(--warm-gray);
  border-radius: var(--radius);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  -webkit-tap-highlight-color: transparent;
}
.opt-label:hover { border-color: var(--accent-light); background: #f0f5fa; }
.opt-label input[type="radio"] { display: none; }
.opt-label.selected {
  border-color: var(--accent);
  background: #eef4fb;
}

.opt-key {
  flex-shrink: 0;
  width: 22px; height: 22px;
  border-radius: 50%;
  border: 1.5px solid var(--warm-gray);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--mid-gray);
  margin-top: 0.1rem;
  transition: all 0.15s;
}
.opt-label.selected .opt-key {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--white);
}
.opt-label.selected .opt-check { display: inline; }

.opt-text { font-size: 0.87rem; line-height: 1.6; color: var(--dark-gray); }
.opt-label.selected .opt-text { color: var(--accent); }

/* Sticky footer */
.test-footer {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 200;
  background: var(--white);
  border-top: 1px solid var(--warm-gray);
  height: var(--footer-h);
  padding: 0 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  box-shadow: 0 -2px 12px rgba(0,0,0,0.06);
}

.footer-hint { font-size: 0.8rem; color: var(--mid-gray); flex: 1; min-width: 0; }

.btn-submit {
  flex-shrink: 0;
  background: var(--accent);
  color: var(--white);
  padding: 0.7rem 1.6rem;
  border-radius: var(--radius);
  font-size: 0.88rem;
  font-weight: 500;
  transition: background 0.18s, opacity 0.18s, transform 0.15s;
}
.btn-submit:hover:not(:disabled) { background: var(--accent-light); transform: translateY(-1px); }
.btn-submit:disabled {
  background: var(--warm-gray);
  color: var(--mid-gray);
  cursor: not-allowed;
}

/* ── Responsive ── */
@media (min-width: 700px) {
  .q-badge-dim { display: inline-flex; }
}
