body {
    font-family: Arial, sans-serif;
    background-color: #fcf4e0;
    color: #015077;
    max-width: 800px;
    margin: 40px auto;
    padding: 30px;
    overflow-wrap: anywhere;
}

h1 {
    font-size: 36px;
    margin-bottom: 15px;
}

h2 {
    font-size: 24px;
    margin-top: 30px;
}

p {
    font-size: 18px;
    line-height: 1.6;
}

li {
    font-size: 17px;
    line-height: 1.6;
    margin-bottom: 5px;
}

button {
    box-sizing: border-box;
    max-width: 100%;
    min-height: 45px;
    font-size: 18px;
    padding: 12px 24px;
    margin-top: 20px;
    cursor: pointer;
}
.hidden {
    display: none;
}

.welcome-footer {
    margin-top: 32px;
    font-size: 13px;
    line-height: 1.6;
    color: #526b75;
    text-align: center;
}

.assessment-progress {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
}

.progress-track {
    flex: 1;
    min-width: 0;
    height: 12px;
    background-color: #fffdf7;
    border: 1px solid #5191a5;
    border-radius: 8px;
    overflow: hidden;
}

.progress-fill {
    width: 20%;
    height: 100%;
    background-color: #5191a5;
}

.progress-percentage {
    flex-shrink: 0;
    min-width: 5ch;
    text-align: right;
    font-weight: bold;
}

.rating-group {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-bottom: 30px;
}

.rating-button {
    flex-shrink: 0;
    width: 45px;
    height: 45px;
    padding: 0;
    margin: 0;
    font-size: 16px;
    cursor: pointer;
}

.rating-button.selected {
    background-color: #5191a5;
    color: white;
    border: 2px solid #5191a5;
    font-weight: bold;
}
button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.commitment-field {
    margin-top: 20px;
}

.commitment-field label {
    display: block;
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 8px;
}

.commitment-field input,
.commitment-field textarea {
    display: block;
    box-sizing: border-box;
    width: 100%;
    padding: 12px;
    font-family: inherit;
    font-size: 18px;
    line-height: 1.5;
    color: #015077;
    background-color: #fffdf7;
    border: 1px solid #5191a5;
    border-radius: 4px;
}

.commitment-field textarea {
    resize: vertical;
    min-height: 120px;
}

.commitment-field input:focus,
.commitment-field textarea:focus {
    outline: 2px solid #015077;
    outline-offset: 2px;
}

.commitment-field [aria-invalid="true"] {
    border: 2px solid #a33c20;
}

#commitmentMessage:empty {
    display: none;
}

/* Results presentation only; assessment and progress styles stay unchanged. */
#resultsScreen > h1 {
    margin-top: 0;
    margin-bottom: 24px;
}

#resultsScreen h2 {
    margin: 0 0 16px;
    font-size: 22px;
    line-height: 1.3;
}

#resultsScreen p {
    margin: 0 0 16px;
}

#resultsScreen section > p:last-child {
    margin-bottom: 0;
}

#resultsScreen .result-summary,
#resultsScreen .result-card {
    padding: 28px;
    border-radius: 10px;
    margin-bottom: 28px;
}

#resultsScreen .result-summary {
    background-color: #015077;
    color: #fffdf7;
}

.overall-result-details {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 32px;
    align-items: start;
    margin: 24px 0 8px;
}

#resultsScreen .overall-result-details strong {
    display: block;
    font-size: 15px;
    margin-bottom: 8px;
}

.score-value,
#overallProfile {
    display: block;
    font-weight: bold;
    line-height: 1.2;
}

.score-value {
    font-size: 42px;
    font-variant-numeric: tabular-nums;
}

#overallProfile {
    font-size: 30px;
}

#resultsScreen .focus-card {
    background-color: #fffdf7;
    border: 1px solid #5191a5;
    border-left: 5px solid #015077;
}

#focusAreaResult {
    font-size: 22px;
    font-weight: bold;
    line-height: 1.4;
}

#resultsScreen .result-section {
    margin: 32px 0;
}

#reflectionQuestions {
    list-style: decimal;
    padding-left: 28px;
    margin: 0;
}

#reflectionQuestions li {
    padding: 12px 0 12px 8px;
    margin: 0;
    font-size: 18px;
    line-height: 1.6;
}

#reflectionQuestions li + li {
    border-top: 1px solid #d5dedc;
}

#reflectionQuestions li::marker {
    font-weight: bold;
}

#resultsScreen .action-card {
    background-color: #e8f0f2;
    border: 1px solid #5191a5;
}

#resultsScreen .action-card h2 {
    font-size: 18px;
    margin-bottom: 12px;
}

#recommendedActionTitle {
    font-size: 28px;
    line-height: 1.3;
    margin: 0 0 16px;
}

#resultsScreen .next-up-section {
    padding: 4px 0 24px;
    border-bottom: 1px solid #b8cccf;
}

#resultsScreen .next-up-section h2 {
    font-size: 18px;
    margin-bottom: 8px;
}

#resultsScreen #nextUpResult {
    font-size: 16px;
}

#areaResults {
    padding: 0;
    margin: 0;
    list-style: none;
    border: 1px solid #b8cccf;
    border-radius: 8px;
    overflow: hidden;
    background-color: #fffdf7;
}

#areaResults li {
    margin: 0;
    padding: 16px 20px;
    font-variant-numeric: tabular-nums;
}

#areaResults li + li {
    border-top: 1px solid #d5dedc;
}

#resultsScreen #commitmentSection {
    margin-top: 44px;
    padding: 32px 28px;
    border-top: 4px solid #015077;
    border-radius: 0 0 10px 10px;
    background-color: #e8f0f2;
}

#resultsScreen #commitmentHeading {
    font-size: 26px;
}

#commitmentForm button {
    background-color: #015077;
    color: #fffdf7;
    border: 1px solid #015077;
    border-radius: 4px;
    font-weight: bold;
}

#commitmentForm button:focus-visible {
    outline: 2px solid #015077;
    outline-offset: 3px;
}

#resultsScreen #commitmentMessage {
    margin: 16px 0 0;
}

@media (max-width: 600px) {
    #resultsScreen .result-summary,
    #resultsScreen .result-card,
    #resultsScreen #commitmentSection {
        padding: 22px 18px;
    }

    .overall-result-details {
        grid-template-columns: minmax(0, 1fr);
        gap: 4px;
        margin-top: 20px;
    }

    .score-value {
        font-size: 36px;
    }

    #overallProfile,
    #recommendedActionTitle {
        font-size: 26px;
    }

    #areaResults li {
        padding: 14px 16px;
    }
}

/* Give smaller screens more room for the assessment content. */
@media (max-width: 600px) {
    body {
        margin: 20px auto;
        padding: 16px;
    }

    h1 {
        font-size: 28px;
    }

    h3 {
        line-height: 1.5;
    }

    ul {
        padding-left: 24px;
    }

    /* Keep all five ratings together, with the labels above them. */
    .rating-group {
        display: grid;
        grid-template-columns: repeat(5, minmax(45px, 1fr));
        gap: 8px;
    }

    .rating-group span:first-child {
        grid-column: 1 / 3;
        grid-row: 1;
    }

    .rating-group span:last-child {
        grid-column: 4 / 6;
        grid-row: 1;
        text-align: right;
    }

    .rating-button {
        grid-row: 2;
        width: 100%;
    }

    button:not(.rating-button) {
        display: block;
        width: 100%;
        margin-top: 12px;
    }
}
