* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    font-family: Arial, sans-serif;
    background: #f4f7fb;
    color: #111827;
}

.container {
    max-width: 980px;
    margin: auto;
    padding: 40px 20px;
}

.hidden {
    display: none !important;
}

/* =========================================================
   HERO / INTRO
========================================================= */

.hero {
    max-width: 920px;
    margin: 70px auto 40px;
    text-align: left;
    background: #ffffff;
    border-radius: 28px;
    padding: 42px;
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.08);
}

.heroBadge {
    display: inline-block;
    font-size: 14px;
    font-weight: 700;
    color: #2563eb;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    padding: 8px 12px;
    border-radius: 999px;
    margin-bottom: 18px;
}

.hero h1 {
    font-size: 44px;
    margin: 0 0 12px;
    color: #0f172a;
}

.heroLead {
    font-size: 22px;
    font-weight: 700;
    color: #111827;
}

.hero p {
    font-size: 17px;
    line-height: 1.65;
    color: #374151;
}

.heroDivider {
    height: 1px;
    background: #e5e7eb;
    margin: 28px 0;
}

.heroGridIntro {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin: 24px 0;
}

.heroGridIntro div {
    background: #f8fafc;
    border-left: 4px solid #2563eb;
    padding: 12px 14px;
    border-radius: 12px;
    font-weight: 600;
    color: #111827;
}

.heroSection {
    margin-top: 28px;
}

.heroSection h3 {
    margin-bottom: 10px;
    color: #0f172a;
}

.heroImportant {
    margin: 28px 0;
    background: #fff7ed;
    border-left: 4px solid #f97316;
    padding: 16px;
    border-radius: 14px;
    color: #7c2d12;
    line-height: 1.5;
}

/* =========================================================
   BUTTONS
========================================================= */

button {
    background: #2563eb;
    color: #ffffff;
    border: none;
    border-radius: 12px;
    padding: 14px 24px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 700;
    transition: 0.15s ease;
}

button:hover {
    background: #1d4ed8;
}

button:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.primaryWide {
    display: block;
    width: 100%;
    margin-top: 22px;
    padding: 16px 22px;
}

/* =========================================================
   QUESTION FLOW
========================================================= */

#questionContainer {
    background: #ffffff;
    border-radius: 24px;
    padding: 32px;
    box-shadow: 0 14px 35px rgba(15, 23, 42, 0.07);
}

#questionText {
    font-size: 24px;
    margin-bottom: 25px;
}

.stageLabel {
    display: inline-block;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #2563eb;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    padding: 7px 11px;
    border-radius: 999px;
    margin-bottom: 16px;
}

.phaseIntro {
    margin: 14px 0 18px;
    padding: 16px;
    background: #f8fafc;
    border-left: 4px solid #2563eb;
    border-radius: 14px;
    color: #334155;
    font-size: 15px;
    line-height: 1.55;
}

.questionCounter {
    font-size: 15px;
    font-weight: 700;
    color: #64748b;
    margin-bottom: 12px;
}

.questionMain {
    font-size: 24px;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.35;
}

.questionHelper {
    margin-top: 14px;
    padding: 14px 16px;
    background: #f8fafc;
    border-left: 4px solid #2563eb;
    border-radius: 14px;
    color: #334155;
    font-size: 16px;
    line-height: 1.55;
}

.answerOption {
    display: block;
    width: 100%;
    margin-bottom: 12px;
    padding: 15px 16px;
    border-radius: 14px;
    border: 1px solid #dbe3ef;
    background: #ffffff;
    color: #111827;
    cursor: pointer;
    text-align: left;
    font-weight: 600;
}

.answerOption:hover {
    background: #eff6ff;
    border-color: #bfdbfe;
    color: #111827;
}

.answerOption.selected {
    background: #dbeafe;
    color: #0f172a;
    border-color: #2563eb;
}

.answerInput,
textarea {
    width: 100%;
    border-radius: 14px;
    border: 1px solid #dbe3ef;
    padding: 14px 16px;
    margin-bottom: 12px;
    font-size: 16px;
    color: #111827;
    background: #ffffff;
}

textarea {
    height: 100px;
    resize: vertical;
}

.answerInput:focus,
textarea:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.14);
}

/* =========================================================
   PROGRESS
========================================================= */

.progress {
    width: 100%;
    height: 10px;
    background: #dbe3ef;
    border-radius: 999px;
    overflow: hidden;
    margin-top: 30px;
}

#progressBar {
    width: 0%;
    height: 100%;
    background: #2563eb;
    transition: width 0.25s ease;
}

/* =========================================================
   RESULTS GENERAL
========================================================= */

#resultContainer {
    margin-top: 40px;
}

.reportHero {
    background: #ffffff;
    border-radius: 24px;
    padding: 30px;
    margin-bottom: 20px;
    box-shadow: 0 14px 35px rgba(15, 23, 42, 0.07);
}

.reportHero h2 {
    margin: 0 0 12px;
    color: #0f172a;
    font-size: 30px;
}

.reportHero p {
    color: #475569;
    line-height: 1.6;
}

.resultSection {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 20px;
    padding: 24px;
    margin: 18px 0;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.05);
}

.resultSection h3 {
    margin-top: 0;
    margin-bottom: 12px;
    color: #0f172a;
    font-size: 22px;
}

.resultSection h4 {
    color: #0f172a;
    margin-top: 0;
}

.cleanList {
    padding-left: 22px;
    line-height: 1.65;
    color: #1f2937;
}

.cleanList li {
    margin-bottom: 8px;
}

.muted {
    color: #64748b;
    line-height: 1.55;
}

/* =========================================================
   STAGE MAP
========================================================= */

.stageMap {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-top: 18px;
}

.stageMapItem {
    border: 1px solid #e5e7eb;
    background: #f8fafc;
    border-radius: 14px;
    padding: 12px;
    opacity: 0.75;
    color: #334155;
}

.stageMapItem.active {
    opacity: 1;
    background: #eff6ff;
    border-color: #bfdbfe;
    color: #0f172a;
}

.stageMapItem span {
    display: inline-flex;
    width: 24px;
    height: 24px;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #2563eb;
    color: #ffffff;
    margin-right: 6px;
    font-size: 13px;
    font-weight: 800;
}

/* =========================================================
   RESULT CARDS / GRIDS
========================================================= */

.heroGrid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-top: 18px;
}

.heroGrid > div,
.metricCard,
.miniPanel,
.transitionCard > div:not(.transitionArrow) {
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    color: #111827;
    border-radius: 16px;
    padding: 16px;
}

.metricGrid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.metricCard span {
    display: block;
    font-size: 30px;
    font-weight: 800;
    margin: 8px 0;
    color: #2563eb;
}

.metricCard small {
    color: #64748b;
}

.transitionCard {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 14px;
    margin-top: 12px;
}

.transitionCard small {
    display: block;
    color: #64748b;
    margin-bottom: 6px;
}

.transitionArrow {
    font-size: 30px;
    color: #2563eb;
    font-weight: 800;
    text-align: center;
}

.twoColGrid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

/* =========================================================
   CHIPS / DETAILS / TABLES
========================================================= */

.chipGrid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.chip {
    border-radius: 999px;
    padding: 8px 12px;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #1e3a8a;
    font-size: 14px;
    font-weight: 700;
}

.detailsBlock {
    margin: 18px 0;
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    padding: 16px 18px;
    background: #ffffff;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.04);
}

.detailsBlock summary {
    cursor: pointer;
    font-weight: 800;
    color: #0f172a;
}

.detailsInner {
    margin-top: 14px;
}

.tableLike {
    display: grid;
    gap: 8px;
}

.tableRow {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 0;
    border-bottom: 1px solid #e5e7eb;
    color: #334155;
}

.tableRow:last-child {
    border-bottom: none;
}

.tableRow b {
    color: #0f172a;
    text-align: right;
}

pre,
.softPre,
.questionCard pre {
    white-space: pre-wrap;
    word-break: break-word;
    overflow-x: auto;
    background: #f8fafc;
    color: #111827;
    padding: 16px;
    border-radius: 14px;
    line-height: 1.55;
    font-family: inherit;
    font-size: 15px;
}

/* =========================================================
   EVIDENCE BLOCKS
========================================================= */

.evidenceBlock {
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 16px;
    margin: 14px 0;
}

.evidenceBlock h4 {
    margin: 0 0 12px;
    color: #0f172a;
}

.evidenceItem {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 10px 0;
    border-bottom: 1px solid #e5e7eb;
}

.evidenceItem:last-child {
    border-bottom: none;
}

.evidenceItem b {
    color: #111827;
}

.evidenceItem span {
    color: #475569;
    text-align: right;
}

/* =========================================================
   CHAT / STAGE 3
========================================================= */

.chatBox {
    display: none;
    margin-top: 40px;
    background: #ffffff;
    border-radius: 22px;
    padding: 22px;
    box-shadow: 0 14px 35px rgba(15, 23, 42, 0.07);
}

.chatIntro {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 18px;
    padding: 20px;
    margin-top: 20px;
}

.chatIntro h3 {
    margin-top: 0;
    color: #0f172a;
}

.chatIntro p {
    color: #334155;
    line-height: 1.6;
}

#chatMessages {
    min-height: 200px;
    margin-bottom: 20px;
}

.chatMessage {
    margin-bottom: 15px;
    padding: 13px 15px;
    border-radius: 14px;
    line-height: 1.5;
}

.user {
    background: #dbeafe;
    color: #0f172a;
}

.bot {
    background: #f3f4f6;
    color: #111827;
}

.uploadPanel {
    background: #f8fafc;
    border: 1px solid #dbeafe;
    border-radius: 16px;
    padding: 14px;
    margin-bottom: 18px;
}

.uploadTitle {
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 6px;
}

.uploadHint {
    font-size: 14px;
    color: #475569;
    margin: 0 0 10px;
}

#stage3FileInput {
    display: block;
    margin-bottom: 10px;
}

/* =========================================================
   LEGACY / SMALL CARDS
========================================================= */

.questionCard,
.miniCard {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    padding: 18px;
    margin: 15px 0;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.04);
}

.miniCard {
    border-left: 4px solid #2563eb;
}

/* =========================================================
   RESPONSIVE
========================================================= */

@media (max-width: 800px) {
    .container {
        padding: 24px 14px;
    }

    .hero {
        margin: 30px auto 24px;
        padding: 26px;
        border-radius: 22px;
    }

    .hero h1 {
        font-size: 34px;
    }

    .heroLead {
        font-size: 19px;
    }

    .heroGridIntro,
    .stageMap,
    .heroGrid,
    .metricGrid,
    .twoColGrid,
    .transitionCard {
        grid-template-columns: 1fr;
    }

    .transitionArrow {
        transform: rotate(90deg);
        text-align: center;
    }

    #questionContainer,
    .reportHero,
    .resultSection {
        padding: 22px;
    }

    .questionMain {
        font-size: 21px;
    }

    .evidenceItem,
    .tableRow {
        flex-direction: column;
        gap: 6px;
    }

    .evidenceItem span,
    .tableRow b {
        text-align: left;
    }
}
/* =========================================================
   PREMIUM UX BLOCKS
========================================================= */

.healthScoreCard {
    display: grid;
    grid-template-columns: 1fr 170px;
    gap: 24px;
    align-items: center;
    background: linear-gradient(135deg, #eff6ff 0%, #ffffff 55%, #f8fafc 100%);
    border: 1px solid #bfdbfe;
    border-radius: 26px;
    padding: 28px;
    margin: 20px 0;
    box-shadow: 0 16px 40px rgba(37, 99, 235, 0.10);
}

.scoreLabel {
    color: #2563eb;
    font-weight: 900;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    font-size: 13px;
    margin-bottom: 8px;
}

.scoreValue {
    font-size: 48px;
    font-weight: 900;
    color: #0f172a;
    line-height: 1;
}

.scoreLevel {
    margin-top: 8px;
    font-size: 18px;
    font-weight: 800;
    color: #1e3a8a;
}

.healthScoreCard p {
    color: #475569;
    line-height: 1.55;
    margin-bottom: 0;
}

.scoreRing {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    border: 14px solid #2563eb;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    justify-self: end;
    box-shadow: inset 0 0 0 8px #eff6ff;
}

.scoreRing span {
    font-size: 38px;
    font-weight: 900;
    color: #0f172a;
}

.insightCard {
    background: #0f172a;
    color: #ffffff;
    border-radius: 24px;
    padding: 26px;
    margin: 18px 0;
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.16);
}

.insightCard h3 {
    margin-top: 0;
    color: #ffffff;
}

.insightCard p {
    color: #dbeafe;
    font-size: 17px;
    line-height: 1.65;
    margin-bottom: 0;
}

.positiveGrid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.positiveItem {
    background: #ecfdf5;
    border: 1px solid #bbf7d0;
    color: #14532d;
    border-radius: 14px;
    padding: 13px 15px;
    font-weight: 800;
}

.factorList {
    display: grid;
    gap: 14px;
}

.factorItem {
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 14px;
}

.factorHeader {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 9px;
}

.factorHeader span {
    color: #2563eb;
    font-weight: 900;
}

.factorBar {
    height: 10px;
    background: #e5e7eb;
    border-radius: 999px;
    overflow: hidden;
}

.factorBar div {
    height: 100%;
    background: #2563eb;
    border-radius: 999px;
}

.confidenceBox {
    display: grid;
    gap: 12px;
}

.confidenceBox b {
    font-size: 22px;
    color: #0f172a;
}

.confidenceMeter {
    height: 12px;
    background: #e5e7eb;
    border-radius: 999px;
    overflow: hidden;
}

.confidenceMeter span {
    display: block;
    height: 100%;
    background: #2563eb;
    border-radius: 999px;
}

.timeline {
    display: grid;
    gap: 14px;
}

.timelineItem {
    border-left: 5px solid #2563eb;
    background: #f8fafc;
    border-radius: 16px;
    padding: 16px;
}

.timelineItem b {
    display: block;
    color: #0f172a;
    margin-bottom: 8px;
}

.priorityGrid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
}

.priorityCard {
    background: #f8fafc;
    border: 1px solid #bfdbfe;
    border-radius: 18px;
    padding: 18px;
}

.priorityCard span {
    display: inline-flex;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    align-items: center;
    justify-content: center;
    background: #2563eb;
    color: #ffffff;
    font-weight: 900;
    margin-bottom: 12px;
}

.priorityCard p {
    margin: 0;
    font-weight: 700;
    line-height: 1.5;
    color: #111827;
}

.threeColGrid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
}

@media (max-width: 800px) {
    .healthScoreCard,
    .positiveGrid,
    .priorityGrid,
    .threeColGrid {
        grid-template-columns: 1fr;
    }

    .scoreRing {
        justify-self: start;
    }

    .scoreValue {
        font-size: 40px;
    }
}

/* =========================================================
   NUTRIA V2 FINAL UX PATCH
========================================================= */

.scoreTarget {
    margin-top: 16px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: #ecfdf5;
    border: 1px solid #bbf7d0;
    color: #14532d;
    border-radius: 999px;
    padding: 9px 13px;
    font-weight: 800;
}

.scoreTarget span {
    font-size: 13px;
    opacity: 0.85;
}

.targetsTable {
    display: grid;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    overflow: hidden;
    background: #ffffff;
}

.targetsHeader,
.targetsRow {
    display: grid;
    grid-template-columns: 1.2fr 1fr 1fr;
    gap: 12px;
    padding: 13px 15px;
    align-items: center;
}

.targetsHeader {
    background: #eff6ff;
    color: #1e3a8a;
    font-weight: 900;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.targetsRow {
    border-top: 1px solid #e5e7eb;
    color: #334155;
}

.targetsRow b {
    color: #0f172a;
}

.reasoningGrid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
}

.reasoningCard {
    background: #f8fafc;
    border: 1px solid #dbeafe;
    border-radius: 18px;
    padding: 18px;
}

.reasoningFactor {
    display: inline-block;
    background: #2563eb;
    color: #ffffff;
    border-radius: 999px;
    padding: 7px 11px;
    font-size: 13px;
    font-weight: 900;
    margin-bottom: 14px;
}

.reasoningEvidence {
    display: grid;
    gap: 9px;
    margin-bottom: 14px;
}

.reasoningEvidence div {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 10px;
}

.reasoningEvidence b {
    display: block;
    color: #0f172a;
    font-size: 14px;
    margin-bottom: 4px;
}

.reasoningEvidence span {
    color: #475569;
    font-size: 14px;
    line-height: 1.45;
}

.reasoningCard p {
    color: #334155;
    line-height: 1.55;
    margin: 0;
}

.goalGrid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.goalChip {
    background: #f8fafc;
    color: #1e3a8a;
    border: 1px solid #bfdbfe;
    border-radius: 999px;
    padding: 10px 14px;
    font-weight: 800;
}

.goalChip:hover {
    background: #dbeafe;
    color: #0f172a;
}

.priorityChanges {
    border-color: #bfdbfe;
    background: linear-gradient(135deg, #ffffff 0%, #eff6ff 100%);
}

.threeColGrid .miniPanel,
.twoColGrid .miniPanel {
    min-height: 100%;
}

@media (max-width: 800px) {
    .targetsHeader,
    .targetsRow {
        grid-template-columns: 1fr;
        gap: 5px;
    }

    .reasoningGrid {
        grid-template-columns: 1fr;
    }
}

/* =========================================================
   STAGE 2 STORY MODE
========================================================= */

.stage2HeroCard {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 16px;
    align-items: stretch;
    margin: 20px 0;
}

.stage2ProfileCard {
    border-radius: 24px;
    padding: 24px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.06);
}

.stage2ProfileCard.current {
    background: linear-gradient(135deg, #fff7ed 0%, #ffffff 100%);
    border-color: #fed7aa;
}

.stage2ProfileCard.target {
    background: linear-gradient(135deg, #ecfdf5 0%, #ffffff 100%);
    border-color: #bbf7d0;
}

.stage2ProfileCard span {
    display: inline-block;
    font-size: 13px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #2563eb;
    margin-bottom: 10px;
}

.stage2ProfileCard h3 {
    margin: 0 0 12px;
    font-size: 25px;
    color: #0f172a;
}

.stage2ProfileCard p {
    margin: 0;
    color: #475569;
    line-height: 1.6;
}

.stage2Arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 34px;
    font-weight: 900;
    color: #2563eb;
}

.reasoningFlowSection {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
}

.reasoningFlow {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.reasoningNode {
    background: #ffffff;
    border: 1px solid #dbeafe;
    border-radius: 18px;
    padding: 16px;
}

.reasoningNode span {
    display: inline-flex;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    align-items: center;
    justify-content: center;
    background: #2563eb;
    color: #ffffff;
    font-weight: 900;
    margin-bottom: 10px;
}

.reasoningNode b {
    display: block;
    color: #0f172a;
    margin-bottom: 6px;
}

.reasoningNode small {
    color: #475569;
    line-height: 1.45;
}

.stage2MissionSection {
    background: linear-gradient(135deg, #eff6ff 0%, #ffffff 100%);
    border-color: #bfdbfe;
}

.missionGrid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.missionCard {
    background: #ffffff;
    border: 1px solid #bfdbfe;
    border-radius: 22px;
    padding: 22px;
    box-shadow: 0 10px 28px rgba(37, 99, 235, 0.08);
}

.missionMedal {
    font-size: 34px;
    margin-bottom: 12px;
}

.missionCard h4 {
    font-size: 18px;
    line-height: 1.45;
    margin: 0 0 18px;
    color: #0f172a;
}

.missionImpact {
    border-top: 1px solid #e5e7eb;
    padding-top: 12px;
}

.missionImpact span {
    display: block;
    color: #64748b;
    font-size: 13px;
    margin-bottom: 4px;
}

.missionImpact b {
    color: #f59e0b;
    letter-spacing: 0.08em;
}

.benefitGrid,
.targetCardGrid,
.foodCardGrid,
.labGrid,
.qualityGrid {
    display: grid;
    gap: 12px;
}

.benefitGrid {
    grid-template-columns: repeat(3, 1fr);
}

.targetCardGrid {
    grid-template-columns: repeat(3, 1fr);
}

.foodCardGrid {
    grid-template-columns: 1fr;
}

.labGrid {
    grid-template-columns: repeat(3, 1fr);
}

.qualityGrid {
    grid-template-columns: repeat(2, 1fr);
}

.benefitCard,
.targetCard,
.foodCard,
.labCard,
.qualityCard {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    padding: 17px;
}

.benefitCard.high {
    border-color: #bbf7d0;
    background: #ecfdf5;
}

.benefitCard.medium {
    border-color: #bfdbfe;
    background: #eff6ff;
}

.benefitCard span {
    display: inline-block;
    font-weight: 900;
    color: #16a34a;
    margin-bottom: 8px;
}

.benefitCard h4,
.targetCard h4 {
    margin: 0 0 8px;
    color: #0f172a;
}

.benefitCard b {
    display: block;
    margin-bottom: 8px;
    color: #2563eb;
}

.benefitCard p {
    margin: 0;
    color: #475569;
    line-height: 1.45;
}

.targetIcon {
    font-size: 28px;
    margin-bottom: 8px;
}

.targetValues {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.targetValues div {
    background: #f8fafc;
    border-radius: 12px;
    padding: 10px;
}

.targetValues span {
    display: block;
    font-size: 12px;
    color: #64748b;
    margin-bottom: 4px;
}

.targetValues b {
    color: #0f172a;
}

.foodCard.increase {
    background: #ecfdf5;
    border-color: #bbf7d0;
}

.foodCard.reduce {
    background: #fef2f2;
    border-color: #fecaca;
}

.foodCard.good {
    background: #eff6ff;
    border-color: #bfdbfe;
}

.foodCard b {
    display: block;
    color: #0f172a;
    margin-bottom: 6px;
}

.foodCard span {
    display: block;
    color: #334155;
    margin-bottom: 4px;
}

.foodCard small {
    color: #64748b;
}

.phenotypeSection {
    background: linear-gradient(135deg, #ffffff 0%, #fff7ed 100%);
    border-color: #fed7aa;
}

.phenotypeMainCard {
    background: #ffffff;
    border: 1px solid #fed7aa;
    border-radius: 20px;
    padding: 20px;
    margin-bottom: 14px;
}

.phenotypeMainCard span {
    color: #f97316;
    font-size: 13px;
    font-weight: 900;
    text-transform: uppercase;
}

.phenotypeMainCard h4 {
    font-size: 24px;
    margin: 8px 0 10px;
}

.phenotypeMainCard p {
    color: #475569;
    line-height: 1.6;
    margin: 0;
}

.labCard.high {
    background: #eff6ff;
    border-color: #bfdbfe;
}

.labCard.medium {
    background: #f8fafc;
}

.labCard span {
    display: block;
    color: #f59e0b;
    font-weight: 900;
    letter-spacing: 0.06em;
    margin-bottom: 8px;
}

.labCard b {
    display: block;
    color: #0f172a;
    margin-bottom: 4px;
}

.labCard small {
    color: #64748b;
}

.qualityCard b {
    display: block;
    color: #0f172a;
    margin-bottom: 6px;
}

.qualityCard span {
    display: inline-block;
    color: #2563eb;
    font-weight: 900;
    margin-bottom: 8px;
}

.qualityCard p {
    margin: 0;
    color: #475569;
    line-height: 1.45;
}

.stage3Bridge {
    background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 100%);
    color: #ffffff;
}

.stage3Bridge h3 {
    color: #ffffff;
}

.stage3Bridge p {
    color: #dbeafe;
    line-height: 1.65;
}

.stage3Bridge .resultSection {
    color: #111827;
}

@media (max-width: 800px) {
    .stage2HeroCard,
    .reasoningFlow,
    .missionGrid,
    .benefitGrid,
    .targetCardGrid,
    .labGrid,
    .qualityGrid {
        grid-template-columns: 1fr;
    }

    .stage2Arrow {
        transform: rotate(90deg);
    }
}
/* =========================================================
   LIGHT EXPLAINABILITY PATCH
========================================================= */

.explainSection {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
}

.explainGrid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
}

.explainCard {
    border-radius: 18px;
    padding: 18px;
    border: 1px solid #e5e7eb;
    background: #ffffff;
}

.explainCard.info {
    background: #eff6ff;
    border-color: #bfdbfe;
}

.explainCard.warning {
    background: #fff7ed;
    border-color: #fed7aa;
}

.explainCard.danger {
    background: #fef2f2;
    border-color: #fecaca;
}

.explainCard h4 {
    margin: 0 0 10px;
    color: #0f172a;
}

.explainCard ul {
    margin: 0;
    padding-left: 18px;
    color: #334155;
    line-height: 1.55;
}

.explainCard li {
    margin-bottom: 6px;
}

.stage3GoalGrid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.stage3GoalCard {
    background: #ffffff;
    color: #0f172a;
    border: 1px solid #bfdbfe;
    border-radius: 18px;
    padding: 18px;
    text-align: left;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.05);
}

.stage3GoalCard:hover {
    background: #eff6ff;
    border-color: #2563eb;
}

.stage3GoalCard span {
    display: block;
    font-size: 28px;
    margin-bottom: 10px;
}

.stage3GoalCard b {
    display: block;
    margin-bottom: 6px;
    color: #0f172a;
}

.stage3GoalCard small {
    color: #64748b;
    font-weight: 700;
}

@media (max-width: 800px) {
    .explainGrid,
    .stage3GoalGrid {
        grid-template-columns: 1fr;
    }
}

/* =========================================================
   CLINICAL SCALE EXPLANATIONS
========================================================= */

.scaleEvidenceSection {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
}

.scaleDomainBlock {
    margin-top: 22px;
}

.scaleDomainBlock + .scaleDomainBlock {
    padding-top: 22px;
    border-top: 1px solid #e5e7eb;
}

.scaleDomainHeader {
    margin-bottom: 14px;
}

.scaleDomainHeader h4 {
    margin: 0 0 6px;
    font-size: 19px;
}

.scaleDomainHeader p {
    margin: 0;
    color: #64748b;
    line-height: 1.55;
}

.scaleExplanationGrid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.scaleExplanationCard {
    background: #ffffff;
    border: 1px solid #dbeafe;
    border-radius: 20px;
    padding: 20px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
}

.scaleCardHeader {
    padding-bottom: 14px;
    margin-bottom: 14px;
    border-bottom: 1px solid #e5e7eb;
}

.scaleCardHeader h4 {
    margin: 6px 0 0;
    font-size: 19px;
    line-height: 1.35;
}

.scaleLabel {
    display: inline-block;
    color: #2563eb;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 999px;
    padding: 5px 9px;
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.scaleInfoBlock,
.scaleResultBlock,
.scaleMeaningBlock {
    border-radius: 14px;
    padding: 14px;
    margin-top: 12px;
}

.scaleInfoBlock {
    background: #f8fafc;
    border: 1px solid #e5e7eb;
}

.scaleResultBlock {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
}

.scaleMeaningBlock {
    background: #ecfdf5;
    border: 1px solid #bbf7d0;
}

.scaleInfoBlock b,
.scaleResultBlock b,
.scaleMeaningBlock b {
    display: block;
    margin-bottom: 6px;
    color: #0f172a;
}

.scaleInfoBlock p,
.scaleResultBlock p,
.scaleMeaningBlock p {
    margin: 0;
    color: #334155;
    line-height: 1.55;
}


/* =========================================================
   PREVENTIVE SCREENING
========================================================= */

.screeningSection {
    background: linear-gradient(135deg, #eff6ff 0%, #ffffff 100%);
    border-color: #bfdbfe;
}

.screeningHeader h3 {
    margin: 10px 0 10px;
}

.screeningHeader p {
    color: #334155;
    line-height: 1.6;
}

.screeningBadge {
    display: inline-block;
    background: #2563eb;
    color: #ffffff;
    border-radius: 999px;
    padding: 6px 10px;
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.screeningResult,
.screeningInterpretation,
.screeningRecommendations {
    background: #ffffff;
    border: 1px solid #dbeafe;
    border-radius: 16px;
    padding: 16px;
    margin-top: 14px;
}

.screeningResult b,
.screeningInterpretation b {
    display: block;
    color: #0f172a;
    margin-bottom: 6px;
}

.screeningResult p,
.screeningInterpretation p {
    margin: 0;
    color: #334155;
    line-height: 1.55;
}


/* =========================================================
   FACTOR IMPACT LEVELS
========================================================= */

.impactBadge {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 6px 10px;
    font-size: 13px;
    font-weight: 900;
    white-space: nowrap;
}

.impactBadge.veryHigh {
    color: #991b1b;
    background: #fee2e2;
    border: 1px solid #fecaca;
}

.impactBadge.high {
    color: #9a3412;
    background: #ffedd5;
    border: 1px solid #fed7aa;
}

.impactBadge.medium {
    color: #1e3a8a;
    background: #dbeafe;
    border: 1px solid #bfdbfe;
}

.impactBadge.low {
    color: #334155;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
}


/* =========================================================
   ASSESSMENT GROUPS
========================================================= */

.assessmentSubgroup + .assessmentSubgroup {
    margin-top: 22px;
    padding-top: 20px;
    border-top: 1px solid #e5e7eb;
}

.assessmentSubgroup h4 {
    margin-bottom: 6px;
}


/* =========================================================
   METHODOLOGY
========================================================= */

.methodologyNote {
    background: #f8fafc;
    border-style: dashed;
}

.methodologyNote p {
    color: #475569;
    line-height: 1.65;
}


/* =========================================================
   STAGE 3 CLEAN VIEW
========================================================= */

.stage3ProcessingCard {
    display: flex;
    gap: 18px;
    align-items: flex-start;
    background: linear-gradient(135deg, #ecfdf5 0%, #ffffff 100%);
    border-color: #bbf7d0;
}

.stage3ProcessingIcon {
    flex: 0 0 auto;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #16a34a;
    color: #ffffff;
    font-size: 24px;
    font-weight: 900;
}

.stage3ProcessingCard h3 {
    margin-bottom: 8px;
}

.stage3ProcessingCard p {
    margin: 0;
    color: #334155;
    line-height: 1.6;
}

.aiNoticeCard {
    background: #fff7ed;
    border-color: #fed7aa;
}

.aiNoticeCard p {
    color: #7c2d12;
    line-height: 1.6;
}

.stage4Invitation {
    background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 100%);
    border: none;
    color: #ffffff;
}

.stage4Invitation h3 {
    color: #ffffff;
}

.stage4Invitation p {
    color: #dbeafe;
    line-height: 1.65;
}

.stage4Label {
    display: inline-block;
    margin-bottom: 10px;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    color: #ffffff;
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}


/* =========================================================
   CHAT MARKDOWN
========================================================= */

.chatMessage.bot {
    padding: 18px;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
}

.chatMessage.bot h3 {
    margin: 18px 0 8px;
    color: #0f172a;
    font-size: 19px;
    line-height: 1.35;
}

.chatMessage.bot h3:first-child,
.chatMessage.bot h4:first-child,
.chatMessage.bot p:first-child {
    margin-top: 0;
}

.chatMessage.bot h4 {
    margin: 16px 0 7px;
    color: #0f172a;
    font-size: 17px;
}

.chatMessage.bot p {
    margin: 0 0 12px;
    color: #334155;
    line-height: 1.65;
}

.chatMessage.bot p:last-child {
    margin-bottom: 0;
}

.chatMessage.bot ul {
    margin: 8px 0 14px;
    padding-left: 22px;
    color: #334155;
}

.chatMessage.bot li {
    margin-bottom: 7px;
    line-height: 1.55;
}

.chatMessage.bot strong {
    color: #0f172a;
}


/* =========================================================
   RESPONSIVE PATCH
========================================================= */

@media (max-width: 800px) {
    .scaleExplanationGrid {
        grid-template-columns: 1fr;
    }

    .factorHeader {
        flex-direction: column;
        align-items: flex-start;
    }

    .stage3ProcessingCard {
        flex-direction: column;
    }
}

/* =========================================================
   STAGE 2 SCOPE / PERSONALIZATION
========================================================= */

.stage2ScopeNotice {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    background: linear-gradient(135deg, #eff6ff 0%, #ffffff 100%);
    border-color: #bfdbfe;
}

.stage2ScopeIcon {
    flex: 0 0 auto;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #2563eb;
    color: #ffffff;
    font-size: 20px;
    font-weight: 900;
}

.stage2ScopeContent {
    flex: 1;
}

.stage2ScopeContent h3 {
    margin-top: 0;
}

.stage2ScopeContent p {
    color: #334155;
    line-height: 1.65;
}

.stage2ScopeWarning {
    margin: 16px 0;
    padding: 16px 18px;
    background: #fff7ed;
    border: 1px solid #fed7aa;
    border-radius: 14px;
    color: #7c2d12;
    line-height: 1.6;
}


/* =========================================================
   PHENOTYPE EXPLANATION + RECOMMENDATIONS
========================================================= */

.phenotypeIntro {
    margin-bottom: 20px;
}

.phenotypeIntroBadge {
    display: inline-block;
    margin-bottom: 10px;
    padding: 6px 10px;
    border-radius: 999px;
    background: #ffedd5;
    border: 1px solid #fed7aa;
    color: #9a3412;
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.phenotypeIntro p {
    color: #475569;
    line-height: 1.65;
}

.phenotypeDetailsGrid {
    display: grid;
    gap: 16px;
}

.phenotypeDetailCard {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 20px;
    padding: 20px;
}

.phenotypeDetailCard.primary {
    border-color: #fed7aa;
    background: #fffaf5;
}

.phenotypeDetailHeader span {
    display: inline-block;
    color: #f97316;
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.phenotypeDetailHeader h4 {
    margin: 7px 0 14px;
    font-size: 21px;
    color: #0f172a;
}

.phenotypeRecommendations {
    padding-top: 14px;
    border-top: 1px solid #e5e7eb;
}

.phenotypeRecommendations h5 {
    margin: 0 0 10px;
    color: #0f172a;
    font-size: 16px;
}

.phenotypeRecommendations .cleanList {
    margin-bottom: 0;
}

.phenotypeSecondarySignals {
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid #e5e7eb;
}

.phenotypeSecondarySignals h4 {
    margin-bottom: 10px;
}

@media (max-width: 800px) {
    .stage2ScopeNotice {
        flex-direction: column;
    }
}

/* =========================================================
   HERO · SAFETY / ELIGIBILITY
========================================================= */

.heroImportant {
    margin-top: 22px;
    padding: 20px;
    border: 1px solid #dbeafe;
    border-radius: 18px;
    background: #f8fbff;
}

.heroImportantHeader {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.heroImportantIcon {
    flex: 0 0 auto;
    font-size: 20px;
    line-height: 1.3;
}

.heroImportantHeader b {
    display: block;
    margin-bottom: 5px;
    color: #0f172a;
}

.heroImportantHeader p {
    margin: 0;
    color: #475569;
    line-height: 1.55;
}

.heroEligibilityGrid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-top: 16px;
}

.heroEligibilityItem {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 14px;
    border-radius: 14px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
}

.heroEligibilityItem > span {
    flex: 0 0 auto;
}

.heroEligibilityItem b {
    display: block;
    margin-bottom: 4px;
    color: #0f172a;
    font-size: 14px;
}

.heroEligibilityItem p {
    margin: 0;
    color: #64748b;
    font-size: 13px;
    line-height: 1.5;
}

.heroLimitations {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid #e2e8f0;
}

.heroLimitations summary {
    cursor: pointer;
    color: #2563eb;
    font-weight: 700;
    font-size: 14px;
}

.heroLimitationsContent {
    padding-top: 14px;
    color: #475569;
    font-size: 14px;
    line-height: 1.6;
}

.heroLimitationsContent p {
    margin: 0 0 12px;
}

.heroLimitationsContent ul {
    margin: 10px 0 14px;
    padding-left: 21px;
}

.heroLimitationsContent li {
    margin-bottom: 7px;
}

@media (max-width: 800px) {
    .heroEligibilityGrid {
        grid-template-columns: 1fr;
    }
}

/* =========================================================
   STAGE 1 · PREDICTIVE TRANSITION
========================================================= */

.predictiveLoadingCard {
    display: flex;
    align-items: flex-start;
    gap: 22px;
    margin-top: 16px;
    padding: 26px;
    border: 1px solid #bfdbfe;
    border-radius: 22px;
    background:
        linear-gradient(
            135deg,
            #eff6ff 0%,
            #ffffff 55%,
            #f8fafc 100%
        );
}

.predictiveLoadingVisual {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 58px;
    height: 58px;
}

.predictiveSpinner {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 4px solid #dbeafe;
    border-top-color: #2563eb;
    animation: nutriaPredictiveSpin 0.85s linear infinite;
}

@keyframes nutriaPredictiveSpin {
    to {
        transform: rotate(360deg);
    }
}

.predictiveLoadingContent {
    flex: 1;
    min-width: 0;
}

.predictiveLoadingEyebrow {
    display: inline-block;
    margin-bottom: 7px;
    color: #2563eb;
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.predictiveLoadingContent h3 {
    margin: 0 0 10px;
    color: #0f172a;
    font-size: 22px;
    line-height: 1.3;
}

.predictiveLoadingContent p {
    margin: 0;
    color: #475569;
    font-size: 15px;
    line-height: 1.65;
}

.predictiveLoadingStatus {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-top: 17px;
    color: #64748b;
    font-size: 13px;
    font-weight: 600;
}

.predictivePulse {
    width: 9px;
    height: 9px;
    flex: 0 0 auto;
    border-radius: 50%;
    background: #2563eb;
    animation: nutriaPredictivePulse 1.2s ease-in-out infinite;
}

@keyframes nutriaPredictivePulse {
    0%,
    100% {
        opacity: 0.35;
        transform: scale(0.85);
    }

    50% {
        opacity: 1;
        transform: scale(1.1);
    }
}

@media (max-width: 800px) {
    .predictiveLoadingCard {
        gap: 14px;
        padding: 20px;
    }

    .predictiveLoadingVisual {
        width: 46px;
        height: 46px;
    }

    .predictiveSpinner {
        width: 38px;
        height: 38px;
    }

    .predictiveLoadingContent h3 {
        font-size: 20px;
    }
}

/* =========================================================
   STAGE 2 · SAME CURRENT/TARGET PROFILE
========================================================= */

.stage2HeroCardSame {
    grid-template-columns: 1fr;
}

.stage2ProfileCardWide {
    width: 100%;
    box-sizing: border-box;
}