.pda-test-page {
    min-height: calc(100vh - 140px);
    padding: 70px 0 50px;
    color: var(--pda-text);
    background: #fff7f5;
}

.pda-test-shell {
    width: min(calc(100% - 40px), 780px);
    margin-inline: auto;
}

.pda-test {
    margin-top: 12px;
}

.pda-test__header {
    padding-bottom: 20px;
}

.pda-test__name {
    margin: 0;
    color: var(--pda-green);
    font-size: .96rem;
    font-weight: 400;
    line-height: 1.5;
}

.pda-test__body {
    padding: 0;
}

.pda-test__question {
    max-width: 720px;
    margin: 0 0 28px;
    color: var(--pda-text);
    font-family: var(--pda-font-display);
    font-size: clamp(1.82rem, 3vw, 2.35rem);
    font-weight: 400;
    line-height: 1.18;
    letter-spacing: -.012em;
}

.pda-test__answers {
    display: grid;
    gap: 12px;
}

.pda-answer {
    position: relative;
    width: 100%;
    min-height: 60px;
    padding: 17px 52px 17px 20px;
    border: 1px solid #eadfd9;
    border-radius: 14px;
    color: var(--pda-text);
    background: #fff;
    font: 400 1.04rem/1.48 var(--pda-font-body);
    text-align: left;
    cursor: pointer;
    transition:
        border-color 150ms ease,
        background 150ms ease,
        transform 150ms ease;
}

.pda-answer::after {
    content: "→";
    position: absolute;
    top: 50%;
    right: 19px;
    color: var(--pda-gold);
    font-size: 1.05rem;
    transform: translateY(-50%);
}

.pda-answer:hover {
    border-color: rgba(191, 155, 48, .55);
    background: #fffdfa;
    transform: translateY(-1px);
}

.pda-answer:focus-visible {
    outline: 3px solid rgba(255, 179, 162, .38);
    outline-offset: 2px;
    border-color: var(--pda-coral-deep);
}

.pda-answer:disabled {
    cursor: wait;
    opacity: .72;
}

.pda-answer.is-selected {
    border-color: var(--pda-gold);
    background: #fff9ea;
}

.pda-test__progress {
    position: relative;
    width: 100%;
    height: 26px;
    margin-top: 30px;
    overflow: hidden;
    border-radius: 999px;
    background: #f0e5e1;
}

.pda-test__progress-bar {
    position: absolute;
    inset: 0 auto 0 0;
    width: 0;
    border-radius: inherit;
    background: linear-gradient(
        90deg,
        rgba(255, 179, 162, .72),
        rgba(191, 155, 48, .72)
    );
    transition: width 240ms ease;
    opacity: 0.2;
}

.pda-test__progress-count {
    position: absolute;
    inset: 0;
    z-index: 1;
    display: grid;
    place-items: center;
    color: #5f5752;
    font-size: .82rem;
    font-weight: 500;
    letter-spacing: .02em;
}

.pda-test-loader,
.pda-test-error {
    max-width: 620px;
    margin: 58px auto;
    padding: 50px 28px;
    text-align: center;
}

.pda-test-loader[hidden],
.pda-test-error[hidden],
.pda-test[hidden] {
    display: none !important;
}

.pda-spinner {
    width: 48px;
    height: 48px;
    margin: 0 auto 20px;
    border: 4px solid #eee4df;
    border-top-color: var(--pda-gold);
    border-radius: 50%;
    animation: pda-spin .8s linear infinite;
}

.pda-test-loader h2,
.pda-test-error h2 {
    margin: 0 0 10px;
    color: var(--pda-text);
    font-family: var(--pda-font-display);
    font-size: 1.7rem;
    font-weight: 400;
}

.pda-test-loader p,
.pda-test-error p {
    margin: 0;
    color: var(--pda-muted);
    font-size: 1.02rem;
    line-height: 1.65;
}

.pda-test-error .pda-btn {
    margin-top: 24px;
}

@keyframes pda-spin {
    to {
        transform: rotate(360deg);
    }
}

@media (max-width: 640px) {
    .pda-test-page {
        padding: 16px 0 54px;
    }

    .pda-test-shell {
        width: min(calc(100% - 24px), 780px);
    }

    .pda-test {
        margin-top: 6px;
    }

    .pda-test__header {
        padding-bottom: 16px;
    }

    .pda-test__name {
        font-size: .92rem;
    }

    .pda-test__question {
        margin-bottom: 23px;
        font-size: clamp(1.72rem, 7.2vw, 2.08rem);
        line-height: 1.2;
    }

    .pda-answer {
        min-height: 62px;
        padding: 17px 46px 17px 16px;
        font-size: 1.01rem;
    }

    .pda-answer::after {
        right: 16px;
    }

    .pda-test__progress {
        height: 24px;
        margin-top: 24px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .pda-test__progress-bar,
    .pda-answer {
        transition: none;
    }

    .pda-spinner {
        animation-duration: 1.6s;
    }
}
