.v5-results-grid {
    width: 100%;
    max-width: min(920px, 100%);
    margin-right: auto;
    margin-left: auto;
    color: #111;
    background: #fff;
    container-type: inline-size;
}

.v5-results-grid,
.v5-results-grid * {
    box-sizing: border-box;
}

.v5-results-grid [hidden] {
    display: none !important;
}

.v5-results-grid__start {
    display: grid;
    place-items: center;
    padding: clamp(16px, 4svh, 36px) 0;
}

.v5-results-grid__assessment {
    animation: v5-results-grid-unfold 220ms ease-out;
    transform-origin: top center;
}

.v5-results-grid__start-button,
.v5-results-grid__arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #111;
    border-radius: 4px;
    background: #111;
    color: #fff;
    cursor: pointer;
    font: inherit;
    transition: background-color 160ms ease, color 160ms ease, opacity 160ms ease;
}

.v5-results-grid__start-button {
    min-width: 132px;
    min-height: 54px;
    font-size: 18px;
    font-weight: 500;
    line-height: 1;
    padding: 14px 28px;
    text-align: center;
}

.v5-results-grid__start-button:hover,
.v5-results-grid__start-button:focus,
.v5-results-grid__arrow:hover,
.v5-results-grid__arrow:focus {
    background: #fff;
    color: #111;
}

@keyframes v5-results-grid-unfold {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }

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

.v5-results-grid__progress {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 48px;
    gap: clamp(8px, 1.4cqw, 12px);
    align-items: center;
    margin-bottom: clamp(8px, 1.8cqw, 16px);
}

.v5-results-grid__progress-track {
    width: 100%;
    height: 8px;
    overflow: hidden;
    border-radius: 999px;
    background: #e5e1da;
}

.v5-results-grid__progress-fill {
    width: 0;
    height: 100%;
    border-radius: inherit;
    background: #111;
    transition: width 180ms ease;
}

.v5-results-grid__progress-label {
    color: #222;
    font-size: 14px;
    line-height: 1;
    text-align: right;
}

.v5-results-grid__screen {
    display: grid;
    gap: clamp(8px, 1.6cqw, 14px);
}

.v5-results-grid__meta {
    color: #555;
    font-size: 14px;
    line-height: 1.3;
}

.v5-results-grid__image {
    display: block;
    width: auto;
    max-width: 100%;
    max-height: min(68svh, 720px);
    height: auto;
    margin-right: auto;
    margin-left: auto;
    border: 1px solid #ece7df;
    object-fit: contain;
}

.v5-results-grid__answers {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: clamp(8px, 1.5cqw, 12px);
    margin: 0;
    padding: 0;
    border: 0;
}

.v5-results-grid__answers legend {
    grid-column: 1 / -1;
    margin: 0 0 2px;
    padding: 0;
    color: #333;
    font-size: 15px;
    font-weight: 500;
    line-height: 1.3;
}

.v5-results-grid__choice {
    display: flex;
    min-height: clamp(42px, 6svh, 52px);
    align-items: center;
    justify-content: center;
    margin: 0;
    border: 1px solid #cfc8bd;
    border-radius: 4px;
    background: #fff;
    color: #111;
    cursor: pointer;
    font: inherit;
    gap: 10px;
    line-height: 1.2;
    padding: clamp(8px, 1.5cqw, 12px);
}

.v5-results-grid__choice:has(input:checked) {
    border-color: #111;
    box-shadow: inset 0 0 0 1px #111;
}

.v5-results-grid__choice input {
    position: absolute;
    opacity: 0;
}

.v5-results-grid__box {
    display: inline-flex;
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
    border: 1px solid #777;
    border-radius: 2px;
}

.v5-results-grid__choice input:checked + .v5-results-grid__box::after {
    width: 10px;
    height: 10px;
    margin: auto;
    background: #111;
    content: "";
}

.v5-results-grid__message {
    min-height: 1.4em;
    margin: clamp(8px, 1.6cqw, 12px) 0;
    color: #7c241f;
    font-size: 15px;
    line-height: 1.35;
}

.v5-results-grid__nav {
    display: flex;
    justify-content: space-between;
    gap: 12px;
}

.v5-results-grid__arrow {
    min-width: clamp(48px, 8cqw, 58px);
    min-height: clamp(42px, 6svh, 48px);
    font-size: 22px;
    line-height: 1;
    padding: 8px clamp(14px, 2.4cqw, 18px);
}

.v5-results-grid__arrow:disabled {
    cursor: not-allowed;
    opacity: 0.36;
}

.v5-results-grid__arrow span:not([aria-hidden]) {
    font-size: 15px;
    font-weight: 500;
}

.v5-results-grid__bridge,
.v5-results-grid__dob-intro,
.v5-results-grid__dob,
.v5-results-grid__result {
    display: grid;
    gap: 24px;
    padding: 28px 0;
}

.v5-results-grid__bridge h3,
.v5-results-grid__dob-intro h3,
.v5-results-grid__dob h3,
.v5-results-grid__result h2,
.v5-results-grid__result-row h3 {
    margin: 0;
    color: #111;
    font-size: 26px;
    font-weight: 500;
    line-height: 1.2;
    letter-spacing: 0;
}

.v5-results-grid__bridge p,
.v5-results-grid__dob-intro p {
    margin: 0;
    color: #111;
    font-size: 17px;
    line-height: 1.45;
}

.v5-results-grid__dob {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.v5-results-grid__dob-intro {
    grid-column: 1 / -1;
    padding-bottom: 8px;
}

.v5-results-grid__dob-panel {
    display: grid;
    gap: 14px;
}

.v5-results-grid__date-row {
    display: grid;
    grid-template-columns: minmax(76px, 0.7fr) minmax(130px, 1fr) minmax(96px, 0.8fr);
    gap: 12px;
    align-items: end;
}

.v5-results-grid__date-row label {
    display: grid;
    gap: 6px;
    color: #222;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.3;
}

.v5-results-grid__date-row select,
.v5-results-grid__date-row input {
    width: 100%;
    min-height: 48px;
    margin: 0;
    border: 1px solid #cfcfcf;
    border-radius: 4px;
    background-color: #fff;
    color: #111;
    font: inherit;
    line-height: 1.2;
    padding: 10px 12px;
}

.v5-results-grid__grid-head,
.v5-results-grid__result-row {
    display: grid;
    grid-template-columns: minmax(120px, 0.8fr) minmax(0, 1fr) minmax(0, 1fr) minmax(190px, 1.1fr);
    gap: 14px;
    align-items: center;
}

.v5-results-grid__grid-head {
    color: #111;
    font-size: 17px;
    font-weight: 500;
    line-height: 1.25;
}

.v5-results-grid__grid-head span {
    text-align: center;
}

.v5-results-grid__result-row {
    min-height: 88px;
    border: 1px solid #e4ded4;
    border-radius: 4px;
    padding: 12px;
}

.v5-results-grid__person-block,
.v5-results-grid__match-block {
    display: grid;
    gap: 8px;
}

.v5-results-grid__person-block {
    justify-items: center;
}

.v5-results-grid__person-block > span {
    display: none;
}

.v5-results-grid__symbols {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: flex-start;
    justify-content: center;
}

.v5-results-grid__symbol {
    display: grid;
    min-width: 56px;
    justify-items: center;
    gap: 4px;
    color: #111;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.2;
    text-align: center;
}

.v5-results-grid__symbol img {
    display: block;
    width: 48px;
    height: 48px;
    object-fit: contain;
    object-position: center;
}

.v5-results-grid__symbol.is-wave {
    min-width: 92px;
}

.v5-results-grid__symbol.is-wave img {
    width: 86px;
    height: 86px;
}

.v5-results-grid__empty {
    color: #111;
    font-size: 18px;
    line-height: 1.25;
}

.v5-results-grid__match-block p,
.v5-results-grid__match-block li {
    margin: 0;
    color: #111;
    font-size: 15px;
    line-height: 1.4;
}

.v5-results-grid__match-block ul {
    display: grid;
    gap: 6px;
    margin: 0;
    padding-left: 18px;
}

.v5-results-grid__match-block strong {
    font-weight: 500;
}

.v5-results-grid__integrated {
    display: grid;
    gap: 18px;
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid #e4ded4;
}

.v5-results-grid__integrated h3 {
    margin: 0;
    color: #111;
    font-size: 26px;
    font-weight: 500;
    line-height: 1.2;
    letter-spacing: 0;
}

.v5-results-grid__integrated-table {
    display: grid;
    gap: 14px;
}

.v5-results-grid__integrated-row {
    display: grid;
    grid-template-columns: 112px minmax(84px, 1fr) auto minmax(168px, 1.35fr) auto minmax(84px, 1fr);
    gap: 12px;
    align-items: center;
}

.v5-results-grid__integrated-row > strong {
    color: #111;
    font-size: 16px;
    font-weight: 500;
    line-height: 1.25;
}

.v5-results-grid__integrated-group {
    display: flex;
    min-height: 68px;
    align-items: center;
    justify-content: center;
    gap: 7px;
}

.v5-results-grid__integrated-symbol {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.v5-results-grid__integrated-symbol img {
    display: block;
    width: 48px;
    height: 48px;
    object-fit: contain;
    object-position: center;
}

.v5-results-grid__integrated-symbol.is-wave img {
    width: 86px;
    height: 86px;
}

.v5-results-grid__integrated-separator {
    color: #111;
    font-size: 18px;
    line-height: 1;
    text-align: center;
}

.v5-results-grid__integrated-summary {
    display: grid;
    gap: 8px;
    margin-top: 4px;
    color: #111;
    font-size: 17px;
    line-height: 1.4;
    text-align: center;
}

.v5-results-grid__integrated-summary p {
    margin: 0;
}

.v5-results-grid__result-actions {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 28px;
}

.v5-results-grid__result-action {
    display: inline-flex;
    width: 50px;
    height: 50px;
    align-items: center;
    justify-content: center;
    border: 1px solid #111;
    border-radius: 4px;
    background: #111;
    color: #fff;
    cursor: pointer;
    font: inherit;
    font-size: 22px;
    line-height: 1;
    transition: background-color 160ms ease, color 160ms ease;
}

.v5-results-grid__result-action:hover,
.v5-results-grid__result-action:focus {
    background: #fff;
    color: #111;
}

@media (max-width: 780px) {
    .v5-results-grid__dob {
        grid-template-columns: 1fr;
    }

    .v5-results-grid__grid-head {
        display: none;
    }

    .v5-results-grid__result-row {
        grid-template-columns: 1fr;
        align-items: start;
    }

    .v5-results-grid__person-block > span {
        display: block;
        color: #111;
        font-size: 14px;
        font-weight: 500;
        line-height: 1.25;
    }

    .v5-results-grid__person-block + .v5-results-grid__person-block {
        margin-top: 18px;
    }

    .v5-results-grid__match-block {
        margin-top: 20px;
    }

    .v5-results-grid__integrated {
        margin-top: 34px;
        padding-top: 28px;
    }

    .v5-results-grid__integrated-row {
        grid-template-columns: 84px 62px 8px 136px 8px 62px;
        gap: 6px;
    }

    .v5-results-grid__integrated-group {
        min-height: 58px;
        gap: 3px;
    }

    .v5-results-grid__integrated-symbol img {
        width: 38px;
        height: 38px;
    }

    .v5-results-grid__integrated-symbol.is-wave img {
        width: 56px;
        height: 56px;
    }

    .v5-results-grid__integrated-row > strong {
        font-size: 14px;
    }
}

@media (max-width: 520px) {
    .v5-results-grid__progress {
        grid-template-columns: minmax(0, 1fr) 42px;
    }

    .v5-results-grid__image {
        max-height: 58svh;
    }

    .v5-results-grid__bridge h3,
    .v5-results-grid__dob-intro h3,
    .v5-results-grid__dob h3,
    .v5-results-grid__result h2,
    .v5-results-grid__result-row h3 {
        font-size: 22px;
    }

    .v5-results-grid__date-row {
        grid-template-columns: 1fr;
    }

    .v5-results-grid__symbol img {
        width: 44px;
        height: 44px;
    }

    .v5-results-grid__symbol.is-wave {
        min-width: 76px;
    }

    .v5-results-grid__symbol.is-wave img {
        width: 72px;
        height: 72px;
    }

    .v5-results-grid__integrated h3 {
        font-size: 22px;
    }

    .v5-results-grid__integrated-table {
        overflow-x: auto;
        padding-bottom: 2px;
    }

    .v5-results-grid__integrated-row {
        min-width: 366px;
    }
}
