/* Test interface — uses the site's Fira Sans, ink, surface and yellow accent tokens. */
.test-page { padding-block: clamp(2.75rem, 6vw, 4.5rem); }
.test-shell { max-width: 900px; margin-inline: auto; }
.test-panel {
  padding: clamp(1.2rem, 3vw, 2.2rem);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  box-shadow: var(--shadow);
}
.test-panel[hidden], .test-page [hidden] { display: none !important; }
.test-panel__heading { margin-bottom: 1.15rem; }
.test-panel__heading h2 { font-size: clamp(1.5rem, 3vw, 2rem); margin-bottom: .65rem; }
.test-panel__heading p { color: var(--ink-soft); margin: 0; }
.test-language-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .8rem;
  margin-top: 1.5rem;
}
.test-language {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 4.1rem;
  padding: .9rem 1rem;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--surface);
  color: var(--ink);
  font: 600 1.05rem/1.3 var(--sans);
  cursor: pointer;
  transition: border-color .15s ease, background-color .15s ease, transform .15s ease;
}
.test-language:hover { border-color: var(--accent-deep); background: rgba(255,196,0,.10); transform: translateY(-1px); }
.test-language:focus-visible { outline: 3px solid var(--accent-deep); outline-offset: 3px; }
.test-error { color: #b42318; margin-top: 1rem; font-weight: 600; }
.test-topline { display: flex; gap: 1rem; align-items: flex-start; justify-content: space-between; margin-bottom: 1rem; }
.test-topline__main { min-width: 0; }
.test-topline h2 { font-size: clamp(1.45rem, 3vw, 2rem); margin-bottom: .5rem; }
.test-topline p { color: var(--ink-soft); margin: 0; }
.test-back {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  min-height: 2.65rem;
  padding: .55rem .9rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  font: 600 .9rem/1.2 var(--sans);
  cursor: pointer;
}
.test-back:hover { border-color: var(--accent-deep); background: rgba(255,196,0,.10); }
.test-instructions { color: var(--ink-soft); margin: 1.1rem 0 1.3rem; }
.test-instructions p { margin: .25rem 0; }
.test-progress {
  position: sticky;
  top: 4rem;
  z-index: 15;
  margin: 0 calc(-1 * clamp(1.2rem, 3vw, 2.2rem)) 1.25rem;
  padding: .8rem clamp(1.2rem, 3vw, 2.2rem);
  background: rgba(255,255,255,.97);
  border-block: 1px solid var(--line);
  box-shadow: 0 5px 15px rgba(16,28,38,.06);
  backdrop-filter: blur(8px);
}
.test-progress__label { color: var(--ink-soft); font-size: .9rem; margin-bottom: .45rem; }
.test-progress__track { height: .55rem; border-radius: 999px; background: #e6e7e2; overflow: hidden; }
.test-progress__fill { width: 0; height: 100%; border-radius: inherit; background: var(--accent-deep); transition: width .18s ease; }
.test-question {
  min-width: 0;
  margin: 0;
  padding: 1.35rem 0;
  border: 0;
  border-top: 1px solid var(--line);
}
.test-question__title {
  display: block;
  width: 100%;
  margin: 0 0 .75rem;
  padding: 0;
  color: var(--ink);
  font: 600 1.08rem/1.45 var(--sans);
}
.test-option {
  display: flex;
  align-items: flex-start;
  gap: .75rem;
  min-width: 0;
  margin: .55rem 0;
  padding: .8rem .9rem;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: #fff;
  cursor: pointer;
  line-height: 1.5;
  transition: border-color .12s ease, background-color .12s ease;
}
.test-option:hover { border-color: var(--accent-deep); background: rgba(255,196,0,.06); }
.test-option:has(input:checked) { border-color: var(--accent-deep); background: rgba(255,196,0,.12); }
.test-option input { flex: none; width: 1.1rem; height: 1.1rem; margin: .15rem 0 0; accent-color: var(--accent-deep); }
.test-option span { min-width: 0; overflow-wrap: anywhere; }
.test-submit-row { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; padding-top: 1.3rem; border-top: 1px solid var(--line); }
.test-submit-row .btn { border: 0; cursor: pointer; font: 600 1rem/1.2 var(--sans); }
.test-submit-row .btn:hover { color: var(--ink); }
.test-result-score { margin: .1rem 0 .5rem; font: 700 clamp(1.8rem, 4vw, 2.5rem)/1.2 var(--cond); }
.test-result-status { margin: 0 0 1.5rem; font-weight: 600; }
.test-result-status.is-passed { color: #16803c; }
.test-result-status.is-failed { color: #b42318; }
.test-review-title { margin: 1.75rem 0 .5rem; font-size: 1.35rem; }
.test-review-question { padding: 1.25rem 0; border-top: 1px solid var(--line); }
.test-review-question h3 { margin-bottom: .7rem; font: 600 1.03rem/1.45 var(--sans); }
.test-review-option {
  margin: .45rem 0;
  padding: .7rem .85rem;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.test-review-option.is-correct { border-color: #16a34a; background: #ecfdf3; }
.test-review-option.is-wrong { border-color: #dc2626; background: #fef2f2; }
.test-answer-note { margin: .55rem 0 0; font-size: .92rem; font-weight: 600; line-height: 1.5; overflow-wrap: anywhere; }
.test-answer-note.is-good { color: #16803c; }
.test-answer-note.is-bad { color: #b42318; }
.test-review-finish { margin-top: 1.5rem; }
@media (max-width: 42rem) {
  .test-language-grid { grid-template-columns: 1fr; }
  .test-topline { align-items: flex-start; }
  .test-back { padding: .55rem .7rem; font-size: .82rem; }
  .test-progress { top: 4rem; }
  .test-question__title { font-size: 1rem; }
  .test-option { padding: .8rem .75rem; }
}
@media (prefers-reduced-motion: reduce) {
  .test-language, .test-option, .test-progress__fill { transition: none; }
}