.test-page [hidden] { display: none !important; }
.test-container { width: min(100% - 40px, 820px); }
.test-hero { padding: 68px 0 74px; }
.test-hero h1 { max-width: 780px; margin: 14px 0 24px; font-size: clamp(2.45rem, 5.5vw, 4.5rem); line-height: 1.02; }
.test-lead { max-width: 740px; margin: 0 0 14px; color: var(--muted); font-size: 1.08rem; }
.test-meta { margin: 24px 0 12px; color: var(--terracotta); font-weight: 800; }
.test-intro-note { max-width: 680px; margin: 0 0 28px; padding: 16px 18px; border-left: 4px solid var(--terracotta); background: var(--white); color: var(--muted); font-size: .94rem; }
.test-workspace { min-height: 650px; }
.test-progress { margin-bottom: 28px; }
.test-progress p { margin: 0 0 10px; color: var(--green); font-weight: 800; }
.test-progress-track { height: 8px; overflow: hidden; border-radius: 999px; background: var(--sage); }
.test-progress-track span { display: block; width: 10%; height: 100%; border-radius: inherit; background: var(--terracotta); transition: width .25s ease; }
.test-form { padding: 30px; border: 1px solid var(--line); border-radius: 26px; background: var(--white); box-shadow: var(--shadow); }
.test-question { animation: test-fade .22s ease; }
.test-fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
.test-fieldset legend { width: 100%; margin-bottom: 12px; padding: 0; color: var(--ink); font-family: Georgia, "Times New Roman", serif; font-size: clamp(1.55rem, 3vw, 2.05rem); line-height: 1.18; }
.test-hint { margin: 0 0 18px; color: var(--muted); font-size: .94rem; }
.test-options { display: grid; gap: 12px; margin-top: 22px; }
.test-answer { position: relative; display: block; cursor: pointer; }
.test-answer input { position: absolute; width: 1px; height: 1px; margin: 0; opacity: 0; }
.test-answer-copy { min-height: 62px; display: flex; align-items: center; padding: 15px 18px 15px 52px; border: 1px solid var(--line); border-radius: 16px; background: var(--paper-light); color: var(--ink); transition: border-color .2s ease, background .2s ease, box-shadow .2s ease; }
.test-answer-copy::before { content: ""; position: absolute; left: 18px; top: 50%; width: 18px; height: 18px; border: 2px solid #8da295; border-radius: 50%; background: var(--white); transform: translateY(-50%); }
.test-answer:hover .test-answer-copy { border-color: var(--green); background: var(--sage); }
.test-answer input:checked + .test-answer-copy { border-color: var(--green); background: var(--sage); box-shadow: inset 0 0 0 1px var(--green); font-weight: 750; }
.test-answer input:checked + .test-answer-copy::before { border: 5px solid var(--green); }
.test-answer input:focus-visible + .test-answer-copy { outline: 3px solid rgba(30, 89, 64, .28); outline-offset: 3px; }
.test-validation { margin: 18px 0 0; color: #8d3d2d; font-weight: 700; }
.test-controls { display: flex; justify-content: space-between; gap: 12px; margin-top: 26px; }
.test-controls .button { min-width: 132px; }
.test-controls .button:disabled { cursor: not-allowed; opacity: .45; transform: none; }
.test-results { padding-block: 70px; }
.test-result-card { padding: 32px; border: 1px solid var(--line); border-radius: 26px; background: var(--white); box-shadow: var(--shadow); }
.test-result-card h2 { margin: 0 0 22px; font-family: Georgia, "Times New Roman", serif; font-size: clamp(2rem, 4vw, 3rem); font-weight: 500; line-height: 1.08; }
.test-result-card h3 { margin: 28px 0 14px; font-size: 1.2rem; }
.test-result-card p { color: var(--muted); }
.test-result-card ul { padding-left: 22px; }
.test-result-card li + li { margin-top: 9px; }
.test-result-actions { margin-top: 28px; }
.test-important { margin: 26px 0; padding: 20px 22px; border-left: 4px solid var(--terracotta); background: var(--sage); }
.test-important p:last-child { margin-bottom: 0; }
.test-save-result { margin-top: 24px; padding: 28px 30px; border-radius: 24px; background: var(--green); color: var(--white); }
.test-save-result h2 { margin: 0 0 12px; color: var(--white); font-family: Georgia, "Times New Roman", serif; font-size: 2rem; font-weight: 500; }
.test-save-result p { color: #e5eee8; }
.test-save-result .button { margin-top: 8px; border-color: var(--white); background: var(--white); color: var(--ink); }
.test-save-result .button:hover { background: var(--paper); color: var(--ink); }
.test-restart { margin-top: 22px; }
.test-disclaimer { padding-block: 56px; }
.test-disclaimer h2 { margin-top: 0; }
.test-disclaimer p { color: var(--muted); }
.test-disclaimer a { color: var(--green); font-weight: 750; }
@keyframes test-fade { from { opacity: .45; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }

@media (max-width: 600px) {
  .test-container { width: min(100% - 28px, 820px); }
  .test-hero { padding: 42px 0 52px; }
  .test-hero h1 { font-size: clamp(2.25rem, 11vw, 3rem); }
  .test-workspace { min-height: 0; padding-block: 46px; }
  .test-form, .test-result-card { padding: 22px 18px; border-radius: 20px; }
  .test-answer-copy { min-height: 64px; padding: 14px 14px 14px 48px; }
  .test-answer-copy::before { left: 16px; }
  .test-controls { align-items: stretch; flex-direction: column-reverse; }
  .test-controls .button { width: 100%; }
  .test-results { padding-block: 48px; }
  .test-result-actions { align-items: stretch; flex-direction: column; }
  .test-result-actions .button { width: 100%; }
  .test-save-result { padding: 24px 20px; }
  .test-save-result .button { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .test-question { animation: none; }
  .test-progress-track span { transition: none; }
}
