:root {
    --navy: #15213d;
    --mint: #86e7ca;
    --paper: #f6f6f2;
    --white: #ffffff;
    --gray: #6e7890;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: Arial, sans-serif;
    color: var(--navy);
    background-color: var(--paper);
}

.site-header {
    width: calc(100% - 40px);
    max-width: 1200px;
    margin: 20px auto;
    padding: 14px 18px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    background-color: var(--white);
    border: 1px solid #dfe3e7;
    border-radius: 18px;
    box-shadow: 0 10px 30px rgba(21, 33, 61, 0.08);
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-mark {
    width: 44px;
    height: 44px;

    display: flex;
    align-items: center;
    justify-content: center;

    color: var(--white);
    background-color: var(--navy);
    border-radius: 12px;
    font-weight: bold;
}

.brand h1 {
    margin: 0;
    font-size: 16px;
}

.brand p {
    margin: 3px 0 0;
    color: var(--gray);
    font-size: 11px;
}

.privacy-label {
    padding: 8px 12px;
    color: #167861;
    background-color: #e8f8f2;
    border-radius: 20px;
    font-size: 11px;
    font-weight: bold;
}

main {
    width: calc(100% - 40px);
    max-width: 1200px;
    margin: 0 auto;
}

.hero {
    max-width: 850px;
    padding: 90px 0 70px;
}

.eyebrow {
    margin: 0 0 16px;
    color: #167861;
    font-size: 12px;
    font-weight: bold;
    letter-spacing: 2px;
}

.hero h2 {
    margin: 0;
    font-family: Georgia, serif;
    font-size: clamp(48px, 6vw, 78px);
    font-weight: normal;
    line-height: 1;
    letter-spacing: -3px;
}

.hero h2 span {
    color: #167861;
}

.hero-text {
    max-width: 680px;
    margin: 26px 0;
    color: var(--gray);
    font-size: 18px;
    line-height: 1.7;
}

.start-button {
    padding: 14px 20px;
    color: var(--white);
    background-color: var(--navy);
    border: none;
    border-radius: 12px;
    font-weight: bold;
    cursor: pointer;
}

.start-button:hover {
    background-color: #26365f;
}

.safety-note {
    padding: 18px 22px;
    display: flex;
    gap: 8px;

    color: #5f522d;
    background-color: #fff7df;
    border: 1px solid #eadba9;
    border-radius: 16px;
    font-size: 13px;
}

.explorer {
    padding: 100px 0 80px;
    scroll-margin-top: 20px;
}

.section-heading h2 {
    margin: 0;
    font-family: Georgia, serif;
    font-size: 44px;
    font-weight: normal;
    letter-spacing: -1px;
}

.section-heading>p:last-child {
    margin: 14px 0 0;
    color: var(--gray);
    line-height: 1.6;
}

.form-card {
    padding: 28px;
    background-color: var(--white);
    border: 1px solid #dfe3e7;
    border-radius: 22px;
    box-shadow: 0 15px 40px rgba(21, 33, 61, 0.08);
}

.step-heading {
    display: flex;
    align-items: flex-start;
    gap: 14px;
}

.step-heading>span {
    width: 32px;
    height: 32px;

    display: flex;
    align-items: center;
    justify-content: center;

    color: #167861;
    background-color: #e8f8f2;
    border-radius: 9px;
    font-weight: bold;
}

.step-heading h3 {
    margin: 0;
    font-size: 20px;
}

.step-heading p {
    margin: 5px 0 0;
    color: var(--gray);
    font-size: 13px;
}

.symptom-grid {
    margin-top: 28px;

    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.selection-footer {
    margin-top: 28px;
    padding: 16px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    background-color: #eaf0fc;
    border-radius: 14px;
}

.selection-footer p {
    margin: 0;
    font-size: 13px;
}

#reveal-button {
    padding: 12px 16px;
    color: var(--white);
    background-color: var(--navy);
    border: none;
    border-radius: 10px;
    font-weight: bold;
    cursor: pointer;
}

#reveal-button:disabled {
    color: #969dad;
    background-color: #dfe3e9;
    cursor: not-allowed;
}

.symptom-group h4 {
    margin: 0 0 12px;
}

.symptom-options {
    display: grid;
    gap: 8px;
}

.symptom-option {
    min-height: 50px;
    padding: 10px 12px;

    display: flex;
    align-items: flex-start;
    gap: 10px;

    background-color: #fafafa;
    border: 1px solid #e1e5e8;
    border-radius: 11px;
    cursor: pointer;
}

.symptom-option input {
    margin: 3px 0 0;
    flex-shrink: 0;
}

.symptom-option span {
    display: block;
    line-height: 1.35;
}

.symptom-option:has(input:checked) {
    color: #125f4e;
    background-color: #e8f8f2;
    border-color: #75cdb4;
}

.clinical-context {
    margin-top: 32px;
    padding-top: 28px;
    border-top: 1px solid #e1e5e8;
}

.context-grid {
    margin-top: 20px;

    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.context-field {
    display: flex;
    flex-direction: column;
    gap: 10px;

    font-size: 14px;
    font-weight: bold;
    line-height: 1.4;
}

.context-field select {
    width: 100%;
    padding: 12px 14px;

    color: var(--navy);
    background-color: var(--white);
    border: 1px solid #d8dde3;
    border-radius: 10px;

    font: inherit;
    font-weight: normal;
    cursor: pointer;
}

.context-field select:focus {
    outline: 3px solid rgba(134, 231, 202, 0.35);
    border-color: #75cdb4;
}

.context-questions {
    margin-top: 24px;
    padding: 20px;

    background-color: #f8fafb;
    border: 1px solid #e1e5e8;
    border-radius: 14px;
}

.context-questions h4 {
    margin: 0 0 16px;
}

.question-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.follow-up-panel,
.results-panel {
    margin-top: 32px;
    padding: 28px;

    background-color: var(--white);
    border: 1px solid #dfe3e7;
    border-radius: 22px;
    box-shadow: 0 15px 40px rgba(21, 33, 61, 0.08);

    scroll-margin-top: 20px;
}

.follow-up-heading h2,
.results-panel h2 {
    margin: 0;
    font-family: Georgia, serif;
    font-size: 36px;
    font-weight: normal;
}

.follow-up-heading>p:last-child {
    margin: 12px 0 0;
    color: var(--gray);
    line-height: 1.6;
}

#follow-up-questions {
    margin-top: 24px;

    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.dimension-card {
    padding: 20px;

    background-color: #f8fafb;
    border: 1px solid #dfe3e7;
    border-radius: 14px;
}

.dimension-card h3 {
    margin: 0 0 8px;
}

.dimension-card p {
    margin: 0 0 14px;
    color: var(--gray);
    line-height: 1.5;
}

.dimension-card .context-support {
    padding: 10px 12px;
    color: #125f4e;
    background-color: #e8f8f2;
    border-radius: 9px;
    font-size: 13px;
}

.dimension-card ul {
    margin: 0;
    padding-left: 20px;
    line-height: 1.6;
}

.urgent-note {
    padding: 20px;

    color: #7a1d1d;
    background-color: #fff0f0;
    border: 1px solid #efb4b4;
    border-radius: 14px;
}

.urgent-note h3 {
    margin: 0 0 8px;
}

.urgent-note p {
    margin: 0;
    line-height: 1.6;
}

.results-button {
    margin-top: 20px;
    padding: 13px 18px;

    color: var(--white);
    background-color: var(--navy);
    border: none;
    border-radius: 10px;

    font-weight: bold;
    cursor: pointer;
}

body.follow-up-mode .hero,
body.follow-up-mode .safety-note,
body.follow-up-mode .section-heading,
body.follow-up-mode #symptom-form {
    display: none;
}

body.follow-up-mode .explorer {
    padding: 40px 0 80px;
}

body.follow-up-mode .follow-up-panel {
    margin-top: 0;
}

.back-button {
    margin-bottom: 24px;
    padding: 9px 13px;

    color: var(--navy);
    background-color: transparent;
    border: 1px solid #d8dde3;
    border-radius: 9px;

    font-weight: bold;
    cursor: pointer;
}

.back-button:hover {
    background-color: #f1f4f6;
}

.results-actions {
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.results-actions .back-button {
    margin-bottom: 0;
}

.secondary-button {
    padding: 9px 13px;
    color: var(--white);
    background-color: var(--navy);
    border: 1px solid var(--navy);
    border-radius: 9px;
    font-weight: bold;
    cursor: pointer;
}

.secondary-button:hover {
    background-color: #26365f;
}

.follow-up-question-group {
    grid-column: 1 / -1;
    margin: 0;
    padding: 20px;

    background-color: #f8fafb;
    border: 1px solid #dfe3e7;
    border-radius: 14px;
}

.follow-up-question-group legend {
    padding: 0 8px;
    font-size: 17px;
    font-weight: bold;
}

.focused-question-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.focused-question {
    display: flex;
    flex-direction: column;
    gap: 9px;

    font-size: 14px;
    font-weight: bold;
    line-height: 1.4;
}

.focused-question select {
    width: 100%;
    padding: 12px 14px;

    color: var(--navy);
    background-color: var(--white);
    border: 1px solid #d8dde3;
    border-radius: 10px;

    font: inherit;
    font-weight: normal;
    cursor: pointer;
}

body.results-mode .hero,
body.results-mode .safety-note,
body.results-mode .section-heading,
body.results-mode #symptom-form,
body.results-mode .follow-up-panel {
    display: none;
}

body.results-mode .explorer {
    padding: 40px 0 80px;
}

body.results-mode .results-panel {
    margin-top: 0;
}

#results-content {
    margin-top: 24px;
    display: grid;
    gap: 16px;
}

.result-card,
.context-summary {
    padding: 20px;

    background-color: #f8fafb;
    border: 1px solid #dfe3e7;
    border-radius: 14px;
}

.result-card h3,
.context-summary h3 {
    margin: 0 0 10px;
}

.result-card p {
    margin: 8px 0;
    line-height: 1.6;
}

.context-summary ul {
    margin: 0;
    padding-left: 20px;
    line-height: 1.8;
}

.knowledge-section {
    margin-top: 24px;
    padding: 20px;

    background-color: #f8fafb;
    border: 1px solid #dfe3e7;
    border-radius: 14px;
}

.knowledge-section>h3 {
    margin: 0 0 18px;
}

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

.knowledge-card {
    padding: 18px;

    background-color: var(--white);
    border: 1px solid #dfe3e7;
    border-radius: 12px;
}

.knowledge-card h4 {
    margin: 0 0 12px;
    color: #167861;
    font-size: 16px;
}

.knowledge-card ul {
    margin: 0;
    padding-left: 18px;
    line-height: 1.6;
}

.knowledge-card li+li {
    margin-top: 8px;
}

.knowledge-disclaimer {
    margin: 16px 0 0;
    padding: 12px 14px;

    color: #5f522d;
    background-color: #fff7df;
    border: 1px solid #eadba9;
    border-radius: 10px;
    line-height: 1.5;
}

.self-reported-symptom {
    margin-top: 24px;
    padding: 18px;
    background: #f8fafb;
    border: 1px solid #dfe3e7;
    border-radius: 14px;
}

.self-reported-symptom label {
    display: block;
    margin-bottom: 9px;
    color: var(--navy);
    font-size: 14px;
    font-weight: bold;
}

.self-reported-symptom textarea {
    width: 100%;
    padding: 12px 14px;
    resize: vertical;
    color: var(--navy);
    background: var(--white);
    border: 1px solid #d8dde3;
    border-radius: 10px;
    font: inherit;
    line-height: 1.5;
}

.self-reported-symptom textarea:focus {
    outline: 3px solid rgba(134, 231, 202, 0.35);
    border-color: #75cdb4;
}

.self-reported-symptom p {
    margin: 8px 0 0;
    color: var(--gray);
    font-size: 12px;
    line-height: 1.5;
}

.conditional-considerations {
    margin-top: 24px;
    display: grid;
    gap: 12px;
}

.conditional-considerations>h3 {
    margin: 0;
}

.site-footer {
    width: calc(100% - 40px);
    max-width: 1200px;
    margin: 0 auto 36px;
    padding: 20px 0;
    color: var(--gray);
    border-top: 1px solid #dfe3e7;
    font-size: 13px;
    line-height: 1.6;
}

.site-footer p {
    margin: 0 0 8px;
}

.site-footer nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 18px;
}

.site-footer a {
    color: #125f4e;
}

@media (max-width: 760px) {
    .symptom-grid {
        grid-template-columns: 1fr;
    }

    .context-grid {
        grid-template-columns: 1fr;
    }

    .question-grid {
        grid-template-columns: 1fr;
    }

    #follow-up-questions {
        grid-template-columns: 1fr;
    }

    .focused-question-grid {
        grid-template-columns: 1fr;
    }

    .selection-footer {
        align-items: stretch;
        flex-direction: column;
        gap: 14px;
    }

    #reveal-button {
        width: 100%;
    }

    .knowledge-grid {
        grid-template-columns: 1fr;
    }

    .results-actions {
        align-items: stretch;
        flex-direction: column;
    }
}
