/* =====================================================
   MoneyMatters — Homepage Diagnostic (Financial Health Score)
   Loaded only on index.html. Extends site-base.css tokens/components.
   ===================================================== */

#diagnostic-hero .hero-step[hidden] { display: none !important; }

#diagnostic-hero[data-active-step="choice"] .hero-visual { display: none !important; }
#diagnostic-hero[data-active-step="choice"] .hero-text {
    max-width: 920px !important;
    text-align: center !important;
    grid-column: 1 / -1 !important;
    margin: 0 auto !important;
}
#diagnostic-hero[data-active-step="choice"] .hero-text .hero-sub { margin-left: auto !important; margin-right: auto !important; }

/* --- Step headlines (email / quiz / verify / results use h2, not h1) --- */
#diagnostic-hero .hero-text h2 {
    font-family: var(--mm-serif) !important;
    font-size: clamp(30px, 3.6vw, 42px) !important;
    line-height: 1.12 !important;
    margin: 0 0 16px !important;
    color: var(--mm-charcoal) !important;
    font-weight: 500 !important;
    letter-spacing: -0.02em !important;
}

/* --- Entry cards (choice step) --- */
#diagnostic-hero .entry-grid {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 28px !important;
    max-width: 820px !important;
    margin: 40px auto 0 !important;
    text-align: left !important;
}
#diagnostic-hero button.connect-card {
    border: 1px solid rgba(98, 169, 116, 0.25) !important;
    font: inherit !important;
    cursor: pointer !important;
    width: 100% !important;
    box-sizing: border-box !important;
}
#diagnostic-hero .connect-card:hover {
    transform: translateY(-4px);
    border-color: var(--mm-green);
    box-shadow: var(--mm-shadow-lg);
}
#diagnostic-hero button.connect-card .connect-btn { align-self: flex-start !important; }
@media (max-width: 640px) {
    #diagnostic-hero .entry-grid { grid-template-columns: 1fr !important; }
}

/* --- Email step --- */
#diagnostic-hero .diagnostic-form { max-width: 420px; }
#diagnostic-hero .diagnostic-error {
    color: #B3432B;
    font-size: 14px;
    margin-top: 10px;
}
#diagnostic-hero .step-back {
    display: inline-block;
    margin-top: 18px;
    background: none;
    border: none;
    color: var(--mm-text-muted);
    font-family: var(--mm-sans);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    padding: 0;
}
#diagnostic-hero .step-back:hover { color: var(--mm-green-deep); }

/* --- Quiz step --- */
#diagnostic-hero .quiz-progress { max-width: 480px; margin-bottom: 20px; }
#diagnostic-hero .quiz-progress-label {
    display: block;
    font-family: var(--mm-sans);
    font-size: 12px;
    font-weight: 700;
    color: var(--mm-green-deep);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 8px;
}
#diagnostic-hero .quiz-progress-bar {
    width: 100%;
    height: 6px;
    background: var(--mm-border);
    border-radius: 6px;
    overflow: hidden;
}
#diagnostic-hero .quiz-progress-fill {
    height: 100%;
    background: var(--mm-green);
    border-radius: 6px;
    transition: width 0.35s ease;
}
#diagnostic-hero .quiz-answers {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 480px;
    margin-top: 24px;
}
#diagnostic-hero .quiz-answer-btn {
    display: block;
    width: 100%;
    text-align: left;
    padding: 16px 20px;
    background: white;
    border: 1px solid var(--mm-border);
    border-radius: 12px;
    font-family: var(--mm-sans);
    font-size: 16px;
    font-weight: 500;
    color: var(--mm-text);
    cursor: pointer;
    transition: all 0.2s ease;
}
#diagnostic-hero .quiz-answer-btn:hover {
    border-color: var(--mm-green);
    background: var(--mm-green-soft);
    transform: translateY(-2px);
}
#diagnostic-hero .quiz-answer-btn.is-selected {
    border-color: var(--mm-green);
    background: var(--mm-green-soft);
}

/* --- Verify / verifying steps --- */
#diagnostic-hero [data-step="verify"] strong,
#diagnostic-hero [data-step="verify-error"] strong { color: var(--mm-charcoal); }

/* --- Results step --- */
#diagnostic-hero .score-reveal { display: flex; align-items: baseline; gap: 8px; }
#diagnostic-hero .score-number {
    font-family: var(--mm-serif);
    font-size: clamp(64px, 9vw, 104px);
    font-weight: 500;
    color: var(--mm-charcoal);
    line-height: 1;
    letter-spacing: -0.03em;
}
#diagnostic-hero .score-band {
    font-family: var(--mm-sans-display);
    font-size: 18px;
    font-weight: 700;
    color: var(--mm-green-deep);
    margin: 4px 0 20px;
}
#diagnostic-hero .score-breakdown-toggle {
    display: inline-block;
    background: none;
    border: none;
    padding: 0;
    margin-top: 4px;
    color: var(--mm-green-deep);
    font-family: var(--mm-sans);
    font-weight: 700;
    font-size: 15px;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 3px;
}
#diagnostic-hero .score-breakdown {
    list-style: none;
    margin: 20px 0 0;
    padding: 0;
    max-width: 480px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
#diagnostic-hero .score-breakdown li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    background: white;
    border: 1px solid var(--mm-border);
    border-radius: 10px;
    font-family: var(--mm-sans);
    font-size: 14px;
}
#diagnostic-hero .score-breakdown .breakdown-dimension { color: var(--mm-text); font-weight: 600; }
#diagnostic-hero .score-breakdown .breakdown-tag {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 3px 10px;
    border-radius: 20px;
}
#diagnostic-hero .breakdown-tag.strong { background: var(--mm-green-soft); color: var(--mm-green-deep); }
#diagnostic-hero .breakdown-tag.good { background: var(--mm-gold-soft); color: var(--mm-gold); }
#diagnostic-hero .breakdown-tag.attention { background: rgba(179, 67, 43, 0.12); color: #B3432B; }

#diagnostic-hero .next-steps {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 28px;
    margin-top: 32px;
}
#diagnostic-hero .next-steps a {
    font-family: var(--mm-sans);
    font-weight: 700;
    font-size: 15px;
    color: var(--mm-charcoal);
    text-decoration: none;
    border-bottom: 2px solid var(--mm-gold);
    padding-bottom: 2px;
}
#diagnostic-hero .next-steps a:hover { color: var(--mm-green-deep); border-color: var(--mm-green); }

/* --- Score-band curve retint (reuses existing SVG motif, no new artwork) --- */
.hero-visual--band-starting .curve-stroke { stroke: var(--mm-text-soft) !important; }
.hero-visual--band-starting .curve-dot { fill: var(--mm-text-soft) !important; }
.hero-visual--band-needs-work .curve-stroke-3 { stroke: var(--mm-gold) !important; }
.hero-visual--band-solid .curve-stroke-1, .hero-visual--band-solid .curve-stroke-2 { stroke: var(--mm-green) !important; }
.hero-visual--band-thriving .curve-stroke-1, .hero-visual--band-thriving .curve-stroke-2 { stroke: var(--mm-green-deep) !important; }
.hero-visual--band-thriving .curve-dot-1, .hero-visual--band-thriving .curve-dot-3 { fill: var(--mm-gold) !important; }

@media (max-width: 640px) {
    #diagnostic-hero .next-steps { flex-direction: column; gap: 12px; }
}
