.vocabulary-test {
    box-sizing: border-box;
    margin: 0 auto;
    max-width: 680px;
    padding: 18px 12px 28px;
    scroll-margin-top: 76px;
    width: 100%;
}

.vocabulary-test__intro,
.vocabulary-test__step,
.vocabulary-test__result {
    background: rgb(224 246 255 / 94%);
    border: 2px solid #8ed7ff;
    border-radius: 8px;
    box-sizing: border-box;
}

.vocabulary-test__intro {
    padding: 16px;
}

.vocabulary-test__intro[hidden],
.vocabulary-test__progress[hidden],
.vocabulary-test__steps[hidden] {
    display: none;
}

.vocabulary-test__eyebrow,
.vocabulary-test__step-head > div > span,
.vocabulary-test__result > header > span {
    color: #009688;
    display: block;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 1px;
    margin-bottom: 5px;
    text-transform: uppercase;
}

.vocabulary-test h1,
.vocabulary-test h2,
.vocabulary-test h3,
.vocabulary-test p {
    margin-top: 0;
}

.vocabulary-test h1 {
    color: #174ea6;
    font-size: 28px;
    line-height: 1.08;
    margin-bottom: 8px;
}

.vocabulary-test__intro p,
.vocabulary-test__step-head p,
.vocabulary-test__result-explanation,
.vocabulary-test__result-summary p {
    color: #285d73;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.35;
    margin-bottom: 0;
}

.vocabulary-test__progress {
    align-items: center;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin: 12px 4px;
}

.vocabulary-test__progress-step {
    align-items: center;
    display: flex;
    justify-content: center;
    position: relative;
}

.vocabulary-test__progress-step::before,
.vocabulary-test__progress-step::after {
    background: #b9d8e8;
    content: "";
    height: 4px;
    position: absolute;
    top: 50%;
    width: 50%;
}

.vocabulary-test__progress-step::before {
    left: 0;
}

.vocabulary-test__progress-step::after {
    right: 0;
}

.vocabulary-test__progress-step:first-child::before,
.vocabulary-test__progress-step:last-child::after {
    display: none;
}

.vocabulary-test__progress-step i {
    background: #fff;
    border: 3px solid #8fb2c5;
    border-radius: 50%;
    box-sizing: border-box;
    height: 28px;
    position: relative;
    width: 28px;
    z-index: 1;
}

.vocabulary-test__progress-step b {
    color: #60869b;
    font-size: 12px;
    left: 50%;
    line-height: 1;
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
}

.vocabulary-test__progress-step--active i {
    border-color: #ffb300;
    box-shadow: 0 0 0 4px rgb(255 179 0 / 18%);
}

.vocabulary-test__progress-step--active b {
    color: #c56d00;
}

.vocabulary-test__progress-step--done i,
.vocabulary-test__progress-step--done::before,
.vocabulary-test__progress-step--done::after {
    background: #20c91c;
    border-color: #20c91c;
}

.vocabulary-test__progress-step--done b {
    color: #fff;
}

.vocabulary-test__intro-notes {
    border-top: 1px solid #abd8ec;
    color: #174ea6;
    display: flex;
    flex-direction: column;
    font-size: 14px;
    gap: 4px;
    line-height: 1.35;
    margin-top: 14px;
    padding-top: 12px;
}

.vocabulary-test__intro-notes span {
    color: #4d7080;
    font-size: 13px;
    font-weight: 700;
}

.vocabulary-test__start {
    margin-top: 16px;
    width: 100%;
}

.vocabulary-test__step {
    padding: 14px;
}

.vocabulary-test__step[hidden],
.vocabulary-test__result[hidden],
.vocabulary-test__error[hidden],
.vocabulary-test__repeat-notice[hidden],
.vocabulary-test__actions[hidden] {
    display: none;
}

.vocabulary-test__step-head {
    align-items: flex-start;
    display: flex;
    gap: 10px;
    justify-content: space-between;
}

.vocabulary-test__step-head h2,
.vocabulary-test__result h2 {
    color: #174ea6;
    font-size: 22px;
    line-height: 1.15;
    margin-bottom: 5px;
}

.vocabulary-test__step-head > b {
    background: #fff3b8;
    border: 1px solid #ffc83d;
    border-radius: 8px;
    color: #8a5b00;
    flex: 0 0 auto;
    font-size: 11px;
    padding: 6px 8px;
    white-space: nowrap;
}

.vocabulary-test__step-meta {
    align-items: center;
    color: #4f7182;
    display: flex;
    font-size: 12px;
    font-weight: 900;
    justify-content: space-between;
    margin: 14px 2px 8px;
}

.vocabulary-test__word-grid {
    display: grid;
    gap: 8px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.vocabulary-test__word {
    align-items: center;
    background: rgb(255 255 255 / 92%);
    border: 2px solid #d7e9f2;
    border-radius: 8px;
    box-sizing: border-box;
    color: #102c57;
    cursor: pointer;
    display: grid;
    font-size: 14px;
    font-weight: 900;
    gap: 5px;
    grid-template-columns: minmax(0, 1fr) 20px;
    min-height: 48px;
    padding: 7px 8px 7px 10px;
    transition: background-color 0.12s ease, border-color 0.12s ease, transform 0.12s ease;
}

.vocabulary-test__word:hover {
    border-color: #80c9f3;
}

.vocabulary-test__word:active {
    transform: scale(0.98);
}

.vocabulary-test__word > span {
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;
}

.vocabulary-test__word input {
    height: 1px;
    opacity: 0;
    position: absolute;
    width: 1px;
}

.vocabulary-test__word i {
    background: #fff;
    border: 2px solid #b7d3e3;
    border-radius: 50%;
    box-sizing: border-box;
    height: 20px;
    position: relative;
    width: 20px;
}

.vocabulary-test__word i::after {
    border-bottom: 2px solid #fff;
    border-right: 2px solid #fff;
    content: "";
    height: 8px;
    left: 6px;
    opacity: 0;
    position: absolute;
    top: 3px;
    transform: rotate(45deg);
    width: 4px;
}

.vocabulary-test__word:has(input:focus-visible) {
    outline: 3px solid rgb(23 78 166 / 24%);
    outline-offset: 2px;
}

.vocabulary-test__word:has(input:checked) {
    background: #e9ffd8;
    border-color: #69d947;
    color: #087b30;
}

.vocabulary-test__word input:checked + span + i {
    background: #20c91c;
    border-color: #20c91c;
}

.vocabulary-test__word input:checked + span + i::after {
    opacity: 1;
}

.vocabulary-test__actions {
    background: rgb(66 189 234 / 94%);
    bottom: 0;
    display: grid;
    gap: 8px;
    grid-template-columns: minmax(110px, 0.42fr) minmax(0, 1fr);
    margin: 10px -2px 0;
    padding: 9px 2px 4px;
    position: sticky;
    z-index: 4;
}

.vocabulary-test__button {
    align-items: center;
    border-radius: 16px;
    box-sizing: border-box;
    cursor: pointer;
    display: inline-flex;
    font-family: inherit;
    font-size: 14px;
    font-weight: 900;
    justify-content: center;
    letter-spacing: 1px;
    line-height: 1.1;
    min-height: 50px;
    padding: 10px 14px;
    text-align: center;
    text-decoration: none;
}

.vocabulary-test__button--next {
    background: #20c91c;
    border: 2px solid #fff;
    color: #fff;
}

.vocabulary-test__button--back,
.vocabulary-test__button--repeat {
    background: #e8f5ff;
    border: 2px solid #79c8ff;
    color: #174ea6;
}

.vocabulary-test__button:disabled {
    cursor: wait;
    filter: grayscale(0.8);
    opacity: 0.65;
}

.vocabulary-test__result {
    padding: 16px;
    scroll-margin-top: 76px;
}

.vocabulary-test__score {
    align-items: baseline;
    background: #fff;
    border: 2px solid #cce6f4;
    border-radius: 8px;
    display: flex;
    flex-wrap: wrap;
    gap: 5px 8px;
    justify-content: center;
    margin: 12px 0;
    padding: 14px;
    text-align: center;
}

.vocabulary-test__score strong {
    color: #174ea6;
    font-size: 42px;
    line-height: 1;
}

.vocabulary-test__score > span {
    color: #174ea6;
    font-size: 16px;
    font-weight: 900;
}

.vocabulary-test__score p {
    color: #557789;
    flex-basis: 100%;
    font-size: 13px;
    font-weight: 800;
    margin-bottom: 0;
}

.vocabulary-test__scale {
    height: 34px;
    margin: 20px 4px 18px;
    position: relative;
}

.vocabulary-test__scale > div {
    background: #bfe2f2;
    border-radius: 8px;
    height: 8px;
    left: 0;
    position: absolute;
    right: 0;
    top: 0;
}

.vocabulary-test__scale > div::before {
    background: #20c91c;
    border-radius: 8px;
    content: "";
    height: 100%;
    left: 0;
    position: absolute;
    top: 0;
    width: var(--score-percent, 0%);
}

.vocabulary-test__scale i {
    background: #ffb300;
    border: 3px solid #fff;
    border-radius: 50%;
    box-shadow: 0 1px 4px rgb(0 0 0 / 22%);
    height: 18px;
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 18px;
    z-index: 1;
}

.vocabulary-test__scale > span {
    color: #537488;
    font-size: 10px;
    font-weight: 900;
    position: absolute;
    top: 15px;
    transform: translateX(-50%);
    white-space: nowrap;
}

.vocabulary-test__scale > span:first-of-type {
    transform: none;
}

.vocabulary-test__scale > span:last-of-type {
    transform: translateX(-100%);
}

.vocabulary-test__result-summary {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 14px;
}

.vocabulary-test__result-summary article,
.vocabulary-test__breakdown article {
    background: rgb(255 255 255 / 88%);
    border: 1px solid #b9dded;
    border-radius: 8px;
    box-sizing: border-box;
    padding: 11px;
}

.vocabulary-test__result-summary span,
.vocabulary-test__breakdown span {
    color: #628293;
    display: block;
    font-size: 11px;
    font-weight: 900;
    margin-bottom: 4px;
}

.vocabulary-test__result-summary strong {
    color: #174ea6;
    display: block;
    font-size: 17px;
    margin-bottom: 4px;
}

.vocabulary-test__repeat-notice,
.vocabulary-test__error {
    background: #fff0e9;
    border: 2px solid #ff8a65;
    border-radius: 8px;
    color: #a63817;
    font-size: 13px;
    font-weight: 800;
    line-height: 1.35;
    margin: 12px 0 0;
    padding: 11px;
}

.vocabulary-test__breakdown {
    margin-top: 16px;
}

.vocabulary-test__breakdown h3 {
    color: #174ea6;
    font-size: 18px;
    margin-bottom: 8px;
}

.vocabulary-test__breakdown > div {
    display: grid;
    gap: 8px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.vocabulary-test__breakdown strong {
    color: #174ea6;
    display: block;
    font-size: 14px;
    margin-bottom: 4px;
}

.vocabulary-test__breakdown b {
    color: #079a38;
    display: block;
    font-size: 13px;
}

.vocabulary-test__result-actions {
    display: grid;
    gap: 8px;
    margin-top: 16px;
}

.vocabulary-test__seo {
    background: rgb(255 255 255 / 82%);
    border: 1px solid rgb(182 213 255 / 86%);
    border-radius: 8px;
    box-sizing: border-box;
    margin-top: 12px;
    overflow: hidden;
    padding: 0 18px;
}

.vocabulary-test__seo[hidden] {
    display: none;
}

.vocabulary-test__seo-section {
    padding: 18px 0;
}

.vocabulary-test__seo-section + .vocabulary-test__seo-section,
.vocabulary-test__seo-faq,
.vocabulary-test__seo-related {
    border-top: 1px solid rgb(119 199 255 / 38%);
}

.vocabulary-test__seo h2 {
    color: #174ea6;
    font-size: 21px;
    font-weight: 900;
    letter-spacing: 0;
    line-height: 1.15;
    margin: 0 0 9px;
}

.vocabulary-test__seo p {
    color: #244d60;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.48;
    margin: 0;
}

.vocabulary-test__seo p + p {
    margin-top: 9px;
}

.vocabulary-test__seo-facts {
    display: grid;
    gap: 8px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-top: 14px;
}

.vocabulary-test__seo-facts article {
    align-items: center;
    background: rgb(220 244 255 / 76%);
    border: 1px solid rgb(119 199 255 / 44%);
    border-radius: 8px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 78px;
    padding: 9px;
    text-align: center;
}

.vocabulary-test__seo-facts strong {
    color: #009688;
    font-size: 21px;
    font-weight: 900;
    line-height: 1;
}

.vocabulary-test__seo-facts span {
    color: #244d60;
    font-size: 11px;
    font-weight: 800;
    line-height: 1.2;
    margin-top: 5px;
}

.vocabulary-test__seo-ranges {
    display: grid;
    gap: 8px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 13px;
}

.vocabulary-test__seo-ranges article {
    align-items: flex-start;
    background: rgb(220 244 255 / 76%);
    border: 1px solid rgb(119 199 255 / 44%);
    border-radius: 8px;
    box-sizing: border-box;
    display: flex;
    gap: 9px;
    min-height: 90px;
    padding: 11px;
}

.vocabulary-test__seo-ranges article > strong {
    color: #ff7a45;
    flex: 0 0 66px;
    font-size: 14px;
    font-weight: 900;
    line-height: 1.2;
}

.vocabulary-test__seo-ranges b,
.vocabulary-test__seo-ranges span {
    display: block;
}

.vocabulary-test__seo-ranges b {
    color: #174ea6;
    font-size: 14px;
    font-weight: 900;
    line-height: 1.2;
}

.vocabulary-test__seo-ranges span {
    color: #355e70;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.3;
    margin-top: 4px;
}

.vocabulary-test__seo-note {
    background: rgb(255 243 184 / 72%);
    border-left: 4px solid #ffb300;
    border-radius: 5px;
    color: #5f531f;
    font-size: 13px;
    font-weight: 800;
    line-height: 1.4;
    margin-top: 13px;
    padding: 10px 11px;
}

.vocabulary-test__seo-link {
    color: #174ea6;
    display: inline-block;
    font-size: 14px;
    font-weight: 900;
    line-height: 1.35;
    margin-top: 11px;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}

.vocabulary-test__seo-faq {
    padding: 18px 0 6px;
}

.vocabulary-test__seo-faq details {
    border-top: 1px solid rgb(119 199 255 / 38%);
    padding: 12px 0;
}

.vocabulary-test__seo-faq summary {
    color: #174ea6;
    cursor: pointer;
    font-size: 15px;
    font-weight: 900;
    line-height: 1.3;
}

.vocabulary-test__seo-faq details p {
    margin-top: 8px;
}

.vocabulary-test__seo-related {
    display: grid;
    gap: 8px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 18px 0;
}

.vocabulary-test__seo-related a {
    background: rgb(220 244 255 / 76%);
    border: 1px solid rgb(119 199 255 / 44%);
    border-radius: 8px;
    box-sizing: border-box;
    color: #244d60;
    min-height: 86px;
    padding: 11px;
    text-decoration: none;
}

.vocabulary-test__seo-related strong,
.vocabulary-test__seo-related span {
    display: block;
}

.vocabulary-test__seo-related strong {
    color: #174ea6;
    font-size: 14px;
    font-weight: 900;
    line-height: 1.2;
}

.vocabulary-test__seo-related span {
    font-size: 12px;
    font-weight: 700;
    line-height: 1.3;
    margin-top: 5px;
}

@media (max-width: 520px) {
    .vocabulary-test {
        padding: 10px 6px 20px;
    }

    .vocabulary-test__intro,
    .vocabulary-test__step,
    .vocabulary-test__result {
        padding: 12px;
    }

    .vocabulary-test h1 {
        font-size: 24px;
    }

    .vocabulary-test__step-head {
        display: block;
    }

    .vocabulary-test__step-head > b {
        display: inline-block;
        margin-top: 8px;
    }

    .vocabulary-test__word-grid {
        gap: 6px;
    }

    .vocabulary-test__word {
        font-size: 13px;
        min-height: 46px;
        padding-left: 8px;
        padding-right: 6px;
    }

    .vocabulary-test__result-summary {
        grid-template-columns: 1fr;
    }

    .vocabulary-test__seo {
        padding-left: 13px;
        padding-right: 13px;
    }

    .vocabulary-test__seo-ranges,
    .vocabulary-test__seo-related {
        grid-template-columns: 1fr;
    }

    .vocabulary-test__seo-ranges article,
    .vocabulary-test__seo-related a {
        min-height: 0;
    }
}
