* {
    box-sizing: border-box;
}

.iq-test {
    --iq-orange: #ff9900;
    --iq-orange-dark: #e27f00;
    --iq-navy: #003366;
    --iq-blue: #5d7899;
    --iq-bg: #f4f7f9;
    --iq-text: #162538;
    --iq-muted: #68788c;
    --iq-line: #dce6ef;
    --iq-card: #ffffff;
    min-height: 100vh;
    background:
        linear-gradient(180deg, rgba(0, 51, 102, 0.05) 0%, rgba(244, 247, 249, 0) 320px),
        var(--iq-bg);
    color: var(--iq-text);
    font-family: "DM Sans", Arial, sans-serif;
}

.iq-test__shell {
    padding: 72px 0 86px;
}

.iq-test__container {
    width: min(100% - 40px, 1080px);
    margin: 0 auto;
}

.iq-test__intro {
    display: grid;
    gap: 14px;
    max-width: 760px;
    margin: 0 auto 34px;
    text-align: center;
}

.iq-test__eyebrow {
    justify-self: center;
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    border: 1px solid rgba(255, 153, 0, 0.28);
    border-radius: 999px;
    background: rgba(255, 153, 0, 0.11);
    color: var(--iq-navy);
    padding: 6px 14px;
    font-size: 0.78rem;
    font-weight: 800;
    line-height: 1;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.iq-test__title {
    margin: 0;
    color: var(--iq-navy);
    font-family: Poppins, "DM Sans", Arial, sans-serif;
    font-size: clamp(2.4rem, 6vw, 4.6rem);
    font-weight: 900;
    line-height: 0.98;
    letter-spacing: 0;
}

.iq-test__subtitle {
    max-width: 680px;
    margin: 0 auto;
    color: var(--iq-blue);
    font-size: clamp(1rem, 2vw, 1.14rem);
    line-height: 1.65;
}

.iq-test__card {
    position: relative;
    overflow: hidden;
    width: min(100%, 920px);
    min-height: 560px;
    margin: 0 auto;
    border: 1px solid rgba(0, 51, 102, 0.08);
    border-radius: 12px;
    background: var(--iq-card);
    box-shadow: 0 24px 70px rgba(0, 51, 102, 0.13);
}

.iq-test__progress {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 2;
    height: 7px;
    background: #e8eef4;
}

.iq-test__progress-bar {
    display: block;
    width: 0;
    height: 100%;
    border-radius: 0 999px 999px 0;
    background: linear-gradient(90deg, var(--iq-orange) 0%, var(--iq-navy) 100%);
    transition: width 0.36s ease;
}

.iq-test__screen {
    min-height: 560px;
    padding: 42px;
}

.iq-test__screen[hidden] {
    display: none;
}

.iq-test__start-grid {
    min-height: 476px;
    display: grid;
    grid-template-columns: 1.12fr 0.88fr;
    gap: 34px;
    align-items: center;
}

.iq-test__start-copy {
    padding-right: 12px;
}

.iq-test__kicker {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    border-radius: 999px;
    background: rgba(0, 51, 102, 0.08);
    color: var(--iq-navy);
    padding: 5px 12px;
    font-size: 0.74rem;
    font-weight: 900;
    line-height: 1;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.iq-test__heading {
    margin: 18px 0 12px;
    color: var(--iq-navy);
    font-family: Poppins, "DM Sans", Arial, sans-serif;
    font-size: clamp(1.75rem, 4vw, 2.9rem);
    font-weight: 900;
    line-height: 1.05;
    letter-spacing: 0;
}

.iq-test__text {
    max-width: 520px;
    margin: 0;
    color: var(--iq-muted);
    font-size: 1.02rem;
    line-height: 1.65;
}

.iq-test__form {
    display: grid;
    gap: 16px;
    padding: 28px;
    border: 1px solid var(--iq-line);
    border-radius: 12px;
    background: #fbfdff;
}

.iq-test__mode {
    display: grid;
    gap: 10px;
    margin: 0;
    padding: 14px;
    border: 1px solid rgba(0, 51, 102, 0.1);
    border-radius: 12px;
    background: #eef5fb;
}

.iq-test__choice {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 36px;
    color: var(--iq-navy);
    font-size: 0.94rem;
    font-weight: 800;
    cursor: pointer;
}

.iq-test__choice input {
    width: 18px;
    height: 18px;
    accent-color: var(--iq-orange);
}

.iq-test__person {
    display: grid;
    gap: 14px;
    padding: 16px;
    border: 1px solid var(--iq-line);
    border-radius: 12px;
    background: #ffffff;
}

.iq-test__company {
    display: grid;
    gap: 14px;
    max-height: 0;
    overflow: hidden;
    padding: 0 16px;
    border: 1px solid transparent;
    border-radius: 12px;
    background: #ffffff;
    box-shadow: 0 0 0 rgba(0, 51, 102, 0);
    opacity: 0;
    pointer-events: none;
    transform: translateY(-4px);
    transition:
        max-height 0.28s ease,
        padding 0.28s ease,
        border-color 0.28s ease,
        box-shadow 0.28s ease,
        opacity 0.2s ease,
        transform 0.28s ease;
}

.iq-test__company.is-open {
    max-height: 320px;
    padding: 16px;
    border-color: var(--iq-line);
    box-shadow: 0 8px 22px rgba(0, 51, 102, 0.05);
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.iq-test__company[hidden] {
    display: none;
}

.iq-test__form-title {
    margin: 0;
    color: var(--iq-navy);
    font-size: 1rem;
    font-weight: 900;
    line-height: 1.25;
}

.iq-test__field {
    display: grid;
    gap: 8px;
}

.iq-test__label {
    color: var(--iq-navy);
    font-size: 0.88rem;
    font-weight: 800;
}

.iq-test__input {
    width: 100%;
    min-height: 54px;
    border: 1.5px solid #cfdae6;
    border-radius: 12px;
    background: #ffffff;
    color: var(--iq-text);
    font: inherit;
    font-size: 1.05rem;
    font-weight: 800;
    padding: 12px 16px;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.iq-test__input:focus {
    border-color: var(--iq-orange);
    box-shadow: 0 0 0 4px rgba(255, 153, 0, 0.16);
}

.iq-test__error {
    margin: -4px 0 0;
    color: #b42318;
    font-size: 0.88rem;
    font-weight: 700;
}

.iq-test__button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 52px;
    border: 0;
    border-radius: 12px;
    padding: 13px 22px;
    font: inherit;
    font-size: 0.94rem;
    font-weight: 900;
    line-height: 1;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.iq-test__button--primary {
    background: linear-gradient(135deg, var(--iq-orange) 0%, var(--iq-orange-dark) 100%);
    color: #ffffff;
    box-shadow: 0 14px 28px rgba(255, 153, 0, 0.26);
}

.iq-test__button--primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 36px rgba(255, 153, 0, 0.34);
}

.iq-test__stage {
    min-height: 476px;
    display: flex;
    flex-direction: column;
    transition: opacity 0.18s ease, transform 0.18s ease;
}

.iq-test__stage.is-leaving {
    opacity: 0;
    transform: translateY(8px);
}

.iq-test__stage.is-entering {
    animation: iq-test-fade 0.24s ease both;
}

.iq-test__topline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 28px;
}

.iq-test__counter,
.iq-test__score-pill {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    border-radius: 999px;
    padding: 6px 12px;
    font-size: 0.78rem;
    font-weight: 900;
    line-height: 1;
}

.iq-test__counter {
    background: rgba(93, 120, 153, 0.12);
    color: var(--iq-blue);
}

.iq-test__score-pill {
    background: rgba(255, 153, 0, 0.12);
    color: var(--iq-orange-dark);
}

.iq-test__question {
    margin: 0 0 18px;
    color: var(--iq-navy);
    font-family: Poppins, "DM Sans", Arial, sans-serif;
    font-size: clamp(1.45rem, 3vw, 2.35rem);
    font-weight: 900;
    line-height: 1.16;
    letter-spacing: 0;
}

.iq-test__description {
    display: grid;
    gap: 14px;
    margin-bottom: 24px;
    color: var(--iq-muted);
    font-size: 1.04rem;
    line-height: 1.55;
}

.iq-test__description p {
    margin: 0;
}

.iq-test__media {
    display: block;
    max-width: min(100%, 520px);
    max-height: 260px;
    object-fit: contain;
    margin: 0 auto;
    border: 1px solid var(--iq-line);
    border-radius: 12px;
    background: #ffffff;
    padding: 12px;
}

.iq-test__options {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-top: auto;
}

.iq-test__option {
    width: 100%;
    min-height: 68px;
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 14px;
    align-items: center;
    border: 1.5px solid #d6e0ea;
    border-radius: 12px;
    background: #ffffff;
    color: var(--iq-text);
    padding: 14px 16px;
    text-align: left;
    font: inherit;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(0, 51, 102, 0.06);
    transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.iq-test__option:hover,
.iq-test__option:focus-visible {
    border-color: var(--iq-navy);
    background: #f5f9fd;
    color: var(--iq-navy);
    box-shadow: 0 14px 26px rgba(0, 51, 102, 0.11);
    transform: translateY(-1px);
    outline: none;
}

.iq-test__option.is-selected {
    border-color: var(--iq-orange);
    background: rgba(255, 153, 0, 0.12);
}

.iq-test__option:disabled {
    cursor: default;
    transform: none;
}

.iq-test__option-letter {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: rgba(0, 51, 102, 0.08);
    color: var(--iq-navy);
    font-size: 0.9rem;
    font-weight: 900;
}

.iq-test__option:hover .iq-test__option-letter,
.iq-test__option:focus-visible .iq-test__option-letter {
    background: var(--iq-navy);
    color: #ffffff;
}

.iq-test__option.is-selected .iq-test__option-letter {
    background: var(--iq-orange);
    color: #ffffff;
}

.iq-test__option-body {
    min-width: 0;
    color: inherit;
    font-size: 1rem;
    font-weight: 800;
    line-height: 1.35;
}

.iq-test__option-img {
    display: block;
    width: 100%;
    max-width: 142px;
    max-height: 86px;
    object-fit: contain;
}

.iq-test__option--image {
    min-height: 116px;
}

.iq-test__result {
    min-height: 476px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.iq-test__result-number {
    margin: 18px 0 6px;
    color: var(--iq-navy);
    font-family: Poppins, "DM Sans", Arial, sans-serif;
    font-size: clamp(4rem, 11vw, 7rem);
    font-weight: 900;
    line-height: 0.9;
    letter-spacing: 0;
}

.iq-test__result-title {
    margin: 0 0 10px;
    color: var(--iq-orange-dark);
    font-size: clamp(1.35rem, 3vw, 2rem);
    font-weight: 900;
    line-height: 1.18;
}

.iq-test__result-text {
    max-width: 560px;
    margin: 0;
    color: var(--iq-muted);
    font-size: 1.04rem;
    line-height: 1.65;
}

.iq-test__result-grid {
    width: min(100%, 520px);
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin: 28px 0;
}

.iq-test__metric {
    border: 1px solid var(--iq-line);
    border-radius: 12px;
    background: #fbfdff;
    padding: 16px;
}

.iq-test__metric-label {
    display: block;
    margin-bottom: 6px;
    color: var(--iq-blue);
    font-size: 0.78rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.iq-test__metric-value {
    color: var(--iq-navy);
    font-size: 1.15rem;
    font-weight: 900;
}

@keyframes iq-test-fade {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 760px) {
    .iq-test__shell {
        padding: 46px 0 60px;
    }

    .iq-test__container {
        width: min(100% - 28px, 620px);
    }

    .iq-test__card,
    .iq-test__screen,
    .iq-test__stage,
    .iq-test__result,
    .iq-test__start-grid {
        min-height: auto;
    }

    .iq-test__screen {
        padding: 30px 20px 24px;
    }

    .iq-test__start-grid {
        grid-template-columns: 1fr;
        gap: 22px;
    }

    .iq-test__form {
        padding: 20px;
    }

    .iq-test__topline {
        align-items: flex-start;
        flex-direction: column;
        gap: 10px;
        margin-bottom: 20px;
    }

    .iq-test__options {
        grid-template-columns: 1fr;
    }

    .iq-test__option {
        min-height: 62px;
    }

    .iq-test__option--image {
        min-height: 104px;
    }

    .iq-test__media {
        max-height: 210px;
    }

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