.pfo-mmpi-settings {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.pfo-mmpi-settings__overview,
.pfo-mmpi-settings__layout {
    display: grid;
    gap: 16px;
}

.pfo-mmpi-settings__overview {
    grid-template-columns: minmax(0, 1fr) minmax(260px, 340px);
}

.pfo-mmpi-settings__layout {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.pfo-mmpi-settings__block {
    background: var(--pfo-surface-muted);
    border: 1px solid var(--pfo-border);
    border-radius: 8px;
    padding: 16px;
}

.pfo-mmpi-settings__block h3,
.pfo-mmpi-test h3 {
    color: var(--pfo-primary);
    font-family: "Poppins", "Roboto", Arial, sans-serif;
    line-height: 1.25;
    margin: 0 0 12px;
}

.pfo-mmpi-settings__block h3 {
    font-size: 18px;
}

.pfo-mmpi-settings__description {
    background: #ffffff;
}

.pfo-mmpi-settings__description p,
.pfo-mmpi-settings__block > p {
    color: var(--pfo-text);
    font-size: 15px;
    margin: 0;
}

.pfo-mmpi-settings__description p + p {
    margin-top: 10px;
}

.pfo-mmpi-settings__params dl,
.pfo-mmpi-technical,
.pfo-mmpi-interpretation-list {
    display: grid;
    gap: 10px;
    margin: 0;
}

.pfo-mmpi-settings__params dl div {
    align-items: start;
    background: #ffffff;
    border: 1px solid var(--pfo-border);
    border-radius: 8px;
    display: grid;
    gap: 8px;
    grid-template-columns: 92px minmax(0, 1fr);
    padding: 10px;
}

.pfo-mmpi-settings__params dt,
.pfo-mmpi-technical dt {
    color: var(--pfo-muted);
    font-size: 13px;
}

.pfo-mmpi-settings__params dd,
.pfo-mmpi-technical dd {
    color: var(--pfo-text);
    font-size: 14px;
    margin: 0;
    overflow-wrap: anywhere;
}

.pfo-mmpi-settings__params dd {
    color: var(--pfo-primary);
    font-family: "Poppins", "Roboto", Arial, sans-serif;
    font-weight: 700;
}

.pfo-mmpi-technical div,
.pfo-mmpi-interpretation-list div {
    background: #ffffff;
    border: 1px solid var(--pfo-border);
    border-radius: 8px;
    display: grid;
    gap: 4px;
    padding: 12px;
}

.pfo-mmpi-interpretation-list strong {
    color: var(--pfo-primary);
    font-family: "Poppins", "Roboto", Arial, sans-serif;
}

.pfo-mmpi-interpretation-list span {
    color: var(--pfo-text);
    font-size: 14px;
}

.pfo-mmpi-settings__steps {
    margin: 0;
    padding-left: 22px;
}

.pfo-mmpi-settings__steps li {
    color: var(--pfo-text);
    font-size: 15px;
}

.pfo-mmpi-settings__steps li + li {
    margin-top: 8px;
}

.pfo-mmpi-scale-table th:first-child,
.pfo-mmpi-scale-table td:first-child,
.pfo-mmpi-scale-table th:nth-child(3),
.pfo-mmpi-scale-table td:nth-child(3),
.pfo-mmpi-scale-table th:nth-child(4),
.pfo-mmpi-scale-table td:nth-child(4) {
    text-align: center;
    white-space: nowrap;
}

.pfo-mmpi-scale-table td:nth-child(2),
.pfo-mmpi-result__table td:nth-child(2) {
    display: grid;
    gap: 3px;
}

.pfo-mmpi-scale-table td:nth-child(2) strong,
.pfo-mmpi-result__table td:nth-child(2) strong {
    color: var(--pfo-primary);
    font-family: "Poppins", "Roboto", Arial, sans-serif;
}

.pfo-mmpi-scale-table td:nth-child(2) span,
.pfo-mmpi-result__table td:nth-child(2) span {
    color: var(--pfo-muted);
    font-size: 13px;
}

.pfo-mmpi-test {
    gap: 18px;
    margin: 0 auto;
    max-width: 1120px;
    width: min(100%, 1120px);
}

.pfo-mmpi-test h2 {
    font-size: 24px;
    line-height: 1.2;
    margin-bottom: 0;
}

.pfo-mmpi-test h3 {
    font-size: 20px;
}

.pfo-mmpi-panel {
    display: flex;
    flex-direction: column;
    gap: 14px;
    width: 100%;
}

.pfo-mmpi-panel[hidden] {
    display: none !important;
}

.pfo-mmpi-start-meta,
.pfo-mmpi-result__metrics {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.pfo-mmpi-start-meta > div,
.pfo-mmpi-result__metrics > div {
    background: #ffffff;
    border: 1px solid var(--pfo-border);
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
    padding: 12px;
}

.pfo-mmpi-start-meta span,
.pfo-mmpi-result__metrics span {
    color: var(--pfo-muted);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0;
    text-transform: uppercase;
}

.pfo-mmpi-start-meta strong,
.pfo-mmpi-result__metrics strong {
    color: var(--pfo-primary);
    font-family: "Poppins", "Roboto", Arial, sans-serif;
    font-size: 18px;
    line-height: 1.2;
    overflow-wrap: anywhere;
}

.pfo-mmpi-demo-gender {
    display: grid;
    gap: 6px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.pfo-mmpi-demo-gender label {
    cursor: pointer;
    min-width: 0;
    position: relative;
}

.pfo-mmpi-demo-gender input {
    height: 1px;
    opacity: 0;
    position: absolute;
    width: 1px;
}

.pfo-mmpi-demo-gender span {
    align-items: center;
    background: var(--pfo-surface-muted);
    border: 1px solid var(--pfo-border);
    border-radius: 7px;
    color: var(--pfo-text);
    display: inline-flex;
    font-family: "Poppins", "Roboto", Arial, sans-serif;
    font-size: 14px;
    font-weight: 700;
    justify-content: center;
    min-height: 34px;
    padding: 0 8px;
    text-align: center;
    transition: background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, color 0.15s ease;
    width: 100%;
}

.pfo-mmpi-demo-gender label:hover span,
.pfo-mmpi-demo-gender label:focus-within span {
    border-color: var(--pfo-accent);
    box-shadow: 0 0 0 3px rgba(0, 174, 220, 0.14);
}

.pfo-mmpi-demo-gender input:checked + span {
    background: var(--pfo-primary);
    border-color: var(--pfo-primary);
    color: #ffffff;
}

.pfo-mmpi-demo-gender input:disabled + span {
    cursor: default;
    opacity: 0.72;
}

.pfo-mmpi-run__layout {
    align-items: stretch;
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin: 0 auto;
    max-width: 880px;
    width: min(100%, 880px);
}

.pfo-mmpi-question-list {
    display: grid;
    gap: 14px;
}

.pfo-mmpi-question {
    align-items: center;
    background: #ffffff;
    border: 1px solid var(--pfo-border);
    border-radius: 8px;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
    display: grid;
    gap: 22px;
    justify-items: stretch;
    margin: 0;
    min-height: 270px;
    min-width: 0;
    padding: 28px 22px;
}

.pfo-mmpi-question.is-answered {
    border-color: rgba(2, 122, 72, 0.24);
}

.pfo-mmpi-question legend {
    display: grid;
    font-family: "Poppins", "Roboto", Arial, sans-serif;
    gap: 14px;
    line-height: 1.3;
    margin: 0;
    padding: 0;
    text-align: center;
    width: 100%;
}

.pfo-mmpi-question__text {
    color: var(--pfo-text);
    font-size: 26px;
    font-weight: 700;
    line-height: 1.35;
    margin: 0 auto;
    max-width: 760px;
}

.pfo-mmpi-choice-list {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin: 0 auto;
    max-width: 680px;
    width: 100%;
}

.pfo-mmpi-choice-list label {
    align-items: center;
    background: var(--pfo-surface-muted);
    border: 1px solid var(--pfo-border);
    border-radius: 8px;
    cursor: pointer;
    display: inline-flex;
    justify-content: center;
    min-height: 62px;
    padding: 0;
    position: relative;
    transition: background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.pfo-mmpi-choice-list label:hover,
.pfo-mmpi-choice-list label:focus-within {
    border-color: var(--pfo-accent);
    box-shadow: 0 0 0 3px rgba(0, 174, 220, 0.14);
}

.pfo-mmpi-choice-list input {
    height: 1px;
    opacity: 0;
    position: absolute;
    width: 1px;
}

.pfo-mmpi-choice-list span {
    align-items: center;
    border-radius: 7px;
    color: var(--pfo-text);
    display: inline-flex;
    font-family: "Poppins", "Roboto", Arial, sans-serif;
    font-size: 17px;
    font-weight: 700;
    height: 100%;
    justify-content: center;
    min-height: 60px;
    width: 100%;
}

.pfo-mmpi-choice-list input:checked + span {
    background: var(--pfo-primary);
    color: #ffffff;
}

.pfo-mmpi-choice-list label:has(input:checked) {
    border-color: var(--pfo-primary);
}

.pfo-mmpi-question-nav-panel {
    background: #ffffff;
    border: 1px solid var(--pfo-border);
    border-radius: 8px;
    display: grid;
    gap: 12px;
    min-width: 0;
    overflow: hidden;
    padding: 12px;
}

.pfo-mmpi-question-nav-panel__head {
    background: var(--pfo-surface-muted);
    border: 1px solid var(--pfo-border);
    border-radius: 8px;
    display: grid;
    gap: 4px;
    padding: 10px;
}

.pfo-mmpi-question-nav-panel__head > div {
    align-items: center;
    display: flex;
    gap: 10px;
    justify-content: space-between;
}

.pfo-mmpi-question-nav-panel__head > div > span {
    color: var(--pfo-muted);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
}

.pfo-mmpi-question-nav-panel__head strong {
    color: var(--pfo-primary);
    font-family: "Poppins", "Roboto", Arial, sans-serif;
    font-size: 16px;
}

.pfo-mmpi-question-nav-panel__legend {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 12px;
}

.pfo-mmpi-question-nav-panel__legend span {
    align-items: center;
    color: var(--pfo-muted);
    display: inline-flex;
    font-size: 12px;
    gap: 5px;
}

.pfo-mmpi-question-nav-panel__legend i {
    border: 1px solid var(--pfo-border);
    border-radius: 4px;
    display: inline-block;
    height: 10px;
    width: 10px;
}

.pfo-mmpi-question-nav-panel__legend i.is-current {
    background: var(--pfo-primary);
    border-color: var(--pfo-primary);
}

.pfo-mmpi-question-nav-panel__legend i.is-answered {
    background: var(--pfo-success-bg);
    border-color: rgba(2, 122, 72, 0.28);
}

.pfo-mmpi-question-nav {
    display: grid;
    gap: 5px;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    max-height: 220px;
    overflow-y: auto;
    padding-right: 2px;
}

.pfo-mmpi-question-nav__item {
    align-items: center;
    appearance: none;
    background: var(--pfo-surface-muted);
    border: 1px solid var(--pfo-border);
    border-radius: 7px;
    color: var(--pfo-text);
    cursor: pointer;
    display: inline-flex;
    font-family: "Poppins", "Roboto", Arial, sans-serif;
    font-size: 12px;
    font-weight: 700;
    justify-content: center;
    min-height: 32px;
    min-width: 0;
    padding: 0;
    transition: background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, color 0.15s ease;
}

.pfo-mmpi-question-nav__item:hover,
.pfo-mmpi-question-nav__item:focus-visible {
    border-color: var(--pfo-accent);
    box-shadow: 0 0 0 3px rgba(0, 174, 220, 0.14);
    outline: none;
}

.pfo-mmpi-question-nav__item.is-answered {
    background: var(--pfo-success-bg);
    border-color: rgba(2, 122, 72, 0.28);
    color: var(--pfo-success);
}

.pfo-mmpi-question-nav__item.is-current {
    background: var(--pfo-primary);
    border-color: var(--pfo-primary);
    color: #ffffff;
}

.pfo-mmpi-question-nav__item:disabled {
    cursor: default;
    opacity: 0.72;
}

.pfo-mmpi-feedback,
.pfo-mmpi-result__interpretation {
    background: #ffffff;
    border: 1px solid var(--pfo-border);
    border-radius: 8px;
    color: var(--pfo-text);
    margin: 0;
    padding: 14px;
}

.pfo-mmpi-feedback {
    color: var(--pfo-muted);
}

.pfo-mmpi-feedback.is-error {
    background: var(--pfo-error-bg);
    border-color: rgba(180, 35, 24, 0.28);
    color: var(--pfo-error);
}

.pfo-mmpi-feedback.is-success {
    background: var(--pfo-success-bg);
    border-color: rgba(2, 122, 72, 0.28);
    color: var(--pfo-success);
}

.pfo-mmpi-actions {
    display: grid;
    gap: 10px;
    grid-template-columns: minmax(120px, 0.8fr) minmax(150px, 1fr) minmax(190px, 1.1fr);
    margin-left: auto;
    max-width: 600px;
    width: 100%;
}

.pfo-mmpi-result {
    display: flex;
    flex-direction: column;
    gap: 14px;
    width: 100%;
}

.pfo-table.pfo-mmpi-result__table {
    table-layout: fixed;
    min-width: 0;
}

.pfo-mmpi-result__table th,
.pfo-mmpi-result__table td {
    box-sizing: border-box;
    padding: 10px 8px;
    vertical-align: top;
}

.pfo-mmpi-result__table td {
    font-size: 14px;
    line-height: 1.4;
    overflow-wrap: anywhere;
}

.pfo-mmpi-result__table td:nth-child(2) {
    display: table-cell;
}

.pfo-mmpi-result__table td:nth-child(2) strong,
.pfo-mmpi-result__table td:nth-child(2) span {
    display: block;
}

.pfo-mmpi-result__table td:nth-child(2) span {
    margin-top: 3px;
}

.pfo-mmpi-result__table th:first-child {
    width: 6%;
}

.pfo-mmpi-result__table th:nth-child(2) {
    width: 18%;
}

.pfo-mmpi-result__table th:nth-child(3) {
    width: 8%;
}

.pfo-mmpi-result__table th:nth-child(4) {
    width: 6%;
}

.pfo-mmpi-result__table th:nth-child(5) {
    width: 20%;
}

.pfo-mmpi-result__table th:nth-child(6) {
    width: 42%;
}

.pfo-table.pfo-mmpi-result__table:not(.pfo-table--compact) td:first-child {
    min-width: 0;
}

.pfo-mmpi-result__table th:first-child,
.pfo-mmpi-result__table td:first-child,
.pfo-mmpi-result__table th:nth-child(3),
.pfo-mmpi-result__table td:nth-child(3),
.pfo-mmpi-result__table th:nth-child(4),
.pfo-mmpi-result__table td:nth-child(4) {
    text-align: center;
    white-space: nowrap;
}

.pfo-mmpi-result__table th:nth-child(5),
.pfo-mmpi-result__table td:nth-child(5) {
    text-align: center;
    white-space: normal;
}

.pfo-mmpi-result__table td:nth-child(6) {
    min-width: 0;
    white-space: normal;
}

.pfo-mmpi-result__table tr.is-high td {
    background: var(--pfo-error-bg);
}

.pfo-mmpi-result__table tr.is-elevated td,
.pfo-mmpi-result__table tr.is-moderate td {
    background: #fff7ed;
}

.pfo-mmpi-result__table tr.is-low td {
    background: #eef6ff;
}

@media (max-width: 900px) {
    .pfo-mmpi-settings__overview,
    .pfo-mmpi-settings__layout {
        grid-template-columns: 1fr;
    }

    .pfo-mmpi-question-nav {
        grid-template-columns: repeat(8, minmax(0, 1fr));
        max-height: 260px;
    }
}

@media (max-width: 620px) {
    .pfo-mmpi-start-meta,
    .pfo-mmpi-run__top,
    .pfo-mmpi-result__metrics {
        grid-template-columns: 1fr;
    }

    .pfo-mmpi-choice-list {
        grid-template-columns: 1fr;
    }

    .pfo-mmpi-question {
        min-height: 0;
        padding: 16px;
    }

    .pfo-mmpi-question__text {
        font-size: 19px;
    }

    .pfo-mmpi-demo-gender {
        grid-template-columns: 1fr;
    }

    .pfo-mmpi-question-nav {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }

    .pfo-mmpi-actions {
        grid-template-columns: 1fr;
        max-width: none;
    }

    .pfo-mmpi-actions .pfo-button {
        width: 100%;
    }
}
