/* ============================================================
   FINANCIAL HEALTH CHECK CALCULATOR
   ============================================================ */

/* Make calculator full-width on its page — bypass narrow container */
.fhc-tool .fhc-result-shell ~ * { } /* no-op safety */
body .section .container:has(> .fhc-tool) {
    max-width: 100% !important;
    padding-left: 24px !important;
    padding-right: 24px !important;
    overflow-x: hidden;
}
body:has(.fhc-tool) { overflow-x: hidden; }
.fhc-intro { max-width: 720px; margin: 0 auto; }
.fhc-intro-card {
    background: #fff; border-radius: 18px; padding: 40px 36px; text-align: center;
    box-shadow: 0 12px 32px rgba(15,23,42,0.08); border: 1px solid #f1f5f9;
}
.fhc-intro-icon {
    width: 72px; height: 72px; border-radius: 50%; background: #fef2f2; color: #dc2626;
    font-size: 32px; display: inline-flex; align-items: center; justify-content: center;
    margin-bottom: 18px;
}
.fhc-intro-card h2 { font-size: 1.8rem; color: #0f172a; margin-bottom: 12px; line-height: 1.25; }
.fhc-intro-card > p { color: #64748b; font-size: 0.98rem; line-height: 1.65; margin-bottom: 24px; max-width: 520px; margin-left: auto; margin-right: auto; }
.fhc-intro-features {
    list-style: none; padding: 0; margin: 0 auto 28px; max-width: 460px;
    display: grid; grid-template-columns: 1fr 1fr; gap: 10px 16px; text-align: left;
}
.fhc-intro-features li { display: flex; align-items: center; gap: 8px; font-size: 0.88rem; color: #334155; }
.fhc-intro-features li i { color: #16a34a; font-size: 14px; }

/* Progress bar — horizontal line connecting step circles */
.fhc-tool { max-width: 100%; margin: 0; }
.fhc-progress {
    margin-bottom: 32px;
    position: relative;
}
.fhc-progress-bar {
    background: #e2e8f0;
    height: 4px;
    border-radius: 99px;
    position: absolute;
    top: 17px;        /* centered through 26px step circle (padding 6px + half circle 13px - half bar 2px) */
    left: 12.5%;      /* start at center of step 1 (1 of 4 columns) */
    right: 12.5%;     /* end at center of step 4 */
    overflow: hidden;
    z-index: 1;
}
.fhc-progress-fill {
    background: linear-gradient(90deg, #dc2626, #ef4444);
    height: 100%;
    border-radius: 99px;
    transition: width 0.4s ease;
}
.fhc-progress-steps {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
    position: relative;
    z-index: 2;
}
.fhc-progress-step {
    text-align: center; font-size: 0.75rem; color: #94a3b8; font-weight: 600;
    padding-top: 6px; transition: color 0.3s ease;
    display: flex; flex-direction: column; align-items: center; gap: 4px;
    line-height: 1.3;
}
.fhc-progress-step span {
    display: inline-flex; width: 26px; height: 26px; border-radius: 50%; background: #fff;
    border: 2px solid #e2e8f0;
    color: #94a3b8; align-items: center; justify-content: center; font-weight: 700;
    transition: all 0.3s ease; font-size: 0.78rem;
    position: relative; z-index: 2;
}
.fhc-progress-step.active span {
    background: #dc2626; color: #fff; border-color: #dc2626;
}
.fhc-progress-step.completed span {
    background: #16a34a; color: #fff; border-color: #16a34a;
}
.fhc-progress-step.active { color: #dc2626; }
.fhc-progress-step.active span { background: #dc2626; color: #fff; }
.fhc-progress-step.completed span { background: #16a34a; color: #fff; }

/* Step content */
.fhc-step { display: none; animation: fhcFadeIn 0.4s ease; }
.fhc-step.active { display: block; }
@keyframes fhcFadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

.fhc-step-header {
    background: #fff; border-radius: 14px 14px 0 0; padding: 24px 28px;
    border: 1px solid #f1f5f9; border-bottom: none;
}
.fhc-step-header h3 { font-size: 1.3rem; color: #0f172a; margin: 0 0 6px; }
.fhc-step-header h3 i { color: #dc2626; margin-right: 8px; }
.fhc-step-header p { color: #64748b; font-size: 0.88rem; margin: 0; }

.fhc-grid {
    background: #fff; border-radius: 0 0 14px 14px; padding: 28px;
    border: 1px solid #f1f5f9; border-top: none;
    display: grid; grid-template-columns: 1fr 1fr; gap: 18px 22px;
}
.fhc-field-wide { grid-column: 1 / -1; }
.fhc-field label { display: block; font-weight: 600; color: #0f172a; font-size: 0.88rem; margin-bottom: 7px; text-transform: capitalize; }
.fhc-field input, .fhc-field select {
    width: 100%; padding: 11px 14px; border: 1px solid #e2e8f0; border-radius: 8px;
    font-size: 0.95rem; color: #1e293b; background: #fff;
    transition: border-color 0.2s ease, box-shadow 0.2s ease; font-family: inherit;
    text-transform: capitalize;
}
.fhc-field input:focus, .fhc-field select:focus {
    outline: none; border-color: #dc2626; box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

/* Valid (filled correctly) state — green border + check icon */
.fhc-field.is-valid { position: relative; }
.fhc-field.is-valid input,
.fhc-field.is-valid select {
    border-color: #16a34a;
    background-color: #f0fdf4;
    padding-right: 38px;
}
.fhc-field.is-valid input:focus,
.fhc-field.is-valid select:focus {
    border-color: #16a34a;
    box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.12);
}
.fhc-field.is-valid::after {
    content: '✓';
    position: absolute;
    right: 14px;
    top: 43px;
    width: 20px;
    height: 20px;
    background: #16a34a;
    color: #fff;
    border-radius: 50%;
    font-size: 12px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    line-height: 1;
}
/* Hide native dropdown arrow when field is valid (check icon replaces it) */
.fhc-field.is-valid select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: none;
}
.fhc-field small { display: block; font-size: 0.75rem; color: #94a3b8; margin-top: 5px; }
.fhc-checkboxes { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px 14px; }
.fhc-checkboxes label {
    font-weight: 500; cursor: pointer; display: flex; align-items: center; gap: 8px; padding: 9px 12px;
    border: 1px solid #e2e8f0; border-radius: 8px; transition: all 0.2s ease; font-size: 0.85rem;
}
.fhc-checkboxes label:has(input:checked) { border-color: #dc2626; background: #fef2f2; color: #dc2626; }
.fhc-checkboxes input { width: auto; }

/* Nav buttons */
.fhc-nav { display: flex; justify-content: space-between; margin-top: 24px; gap: 12px; }
.fhc-nav .btn { padding: 12px 28px; font-size: 0.95rem; }
.fhc-nav .btn:first-child:not(:last-child) { margin-right: auto; }

/* Step 4 subcards (Insurance / Goals containers) */
.fhc-subcard {
    background: #fff; border: 1px solid #e2e8f0; border-radius: 12px; margin: 0 0 18px;
    overflow: hidden;
}
.fhc-subcard:last-child { margin-bottom: 0; }
.fhc-subcard-head {
    padding: 14px 20px; font-weight: 700; color: #0f172a; font-size: 1rem;
    border-bottom: 1px solid #f1f5f9; background: #fafbfc; text-transform: capitalize;
}
.fhc-subcard-head i { color: #dc2626; margin-right: 8px; }
.fhc-subcard-body { padding: 20px 22px; }

/* Yes/No question grid */
.fhc-yn-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.fhc-yn-q { font-weight: 700; color: #0f172a; font-size: 0.95rem; margin-bottom: 10px; text-transform: capitalize; }
.fhc-req { color: #dc2626; }
.fhc-yn-options { display: flex; flex-direction: column; gap: 8px; }
.fhc-yn-opt {
    display: flex; align-items: center; gap: 10px; padding: 9px 14px;
    border: 1px solid #e2e8f0; border-radius: 8px; cursor: pointer;
    font-size: 0.9rem; font-weight: 500; color: #334155; transition: all 0.2s ease;
    text-transform: capitalize;
}
.fhc-yn-opt:hover { border-color: #cbd5e1; background: #f8fafc; }
.fhc-yn-opt:has(input:checked) {
    border-color: #dc2626; background: #fef2f2; color: #dc2626; font-weight: 700;
}
.fhc-yn-opt input[type="radio"] { width: 16px; height: 16px; accent-color: #dc2626; }
.fhc-yn-amount {
    margin-top: 12px; padding-top: 12px; border-top: 1px dashed #e2e8f0;
}
.fhc-yn-amount label {
    display: block; font-weight: 600; color: #0f172a; font-size: 0.82rem; margin-bottom: 6px;
}
.fhc-yn-amount input {
    width: 100%; padding: 9px 12px; border: 1px solid #e2e8f0; border-radius: 6px;
    font-size: 0.92rem;
}
.fhc-yn-amount input:focus {
    outline: none; border-color: #dc2626; box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}
.fhc-yn-amount small { display: block; font-size: 0.72rem; color: #94a3b8; margin-top: 5px; }

/* Consent checkbox */
.fhc-consent {
    display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px;
    background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 8px; margin-top: 16px;
    cursor: pointer; font-size: 0.88rem; color: #334155; text-transform: capitalize;
}
.fhc-consent:has(input:checked) { background: #fef2f2; border-color: #dc2626; }
.fhc-consent input[type="checkbox"] {
    width: 18px; height: 18px; accent-color: #dc2626; cursor: pointer; margin-top: 1px; flex-shrink: 0;
}

/* Step 4 grid override (subcards layout differently) */
.fhc-step[data-step="4"] .fhc-grid {
    padding: 0; border: none; background: transparent; display: block;
}

/* Responsive */
@media (max-width: 768px) {
    .fhc-yn-grid { grid-template-columns: 1fr; gap: 18px; }
}

/* Results */
.fhc-results-card {
    background: #fff; border-radius: 18px; padding: 40px;
    box-shadow: 0 12px 32px rgba(15,23,42,0.08); border: 1px solid #f1f5f9;
    max-width: 980px; margin: 0 auto;
}
.fhc-score-hero {
    display: grid; grid-template-columns: 200px 1fr; gap: 32px; align-items: center;
    padding-bottom: 32px; border-bottom: 1px solid #f1f5f9; margin-bottom: 32px;
}
.fhc-score-circle { position: relative; width: 200px; height: 200px; }
.fhc-score-circle svg { transform: rotate(-90deg); width: 100%; height: 100%; }
.fhc-score-bg { fill: none; stroke: #f1f5f9; stroke-width: 10; }
.fhc-score-fg { fill: none; stroke-width: 10; stroke-linecap: round; transition: stroke-dasharray 1s ease; }
.fhc-score-value {
    position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); text-align: center;
}
.fhc-score-num { font-size: 3.2rem; font-weight: 800; color: #0f172a; line-height: 1; display: block; }
.fhc-score-out { font-size: 0.95rem; color: #94a3b8; font-weight: 600; }
.fhc-score-info h2 { font-size: 1.6rem; color: #0f172a; margin: 8px 0 8px; }
.fhc-score-info p { color: #475569; font-size: 0.95rem; line-height: 1.6; margin: 0; }
.fhc-score-grade {
    display: inline-block; color: #fff; padding: 5px 14px; border-radius: 99px; font-size: 12px;
    font-weight: 700; text-transform: uppercase; letter-spacing: 0.6px;
}

.fhc-section-h { font-size: 1.2rem; color: #0f172a; margin: 0 0 18px; padding-top: 8px; }

.fhc-dims { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 32px; }
.fhc-dim {
    background: #f8fafc; border-radius: 10px; padding: 16px 18px; border: 1px solid #f1f5f9;
}
.fhc-dim-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.fhc-dim-label { font-weight: 700; color: #0f172a; font-size: 0.92rem; }
.fhc-dim-label small { color: #94a3b8; font-weight: 500; }
.fhc-dim-score { font-weight: 800; font-size: 1.05rem; }
.fhc-dim-bar { background: #e2e8f0; height: 6px; border-radius: 99px; overflow: hidden; margin-bottom: 10px; }
.fhc-dim-fill { height: 100%; border-radius: 99px; transition: width 1s ease; }
.fhc-dim-details { display: flex; flex-direction: column; gap: 3px; font-size: 0.78rem; color: #64748b; }
.fhc-dim-details strong { color: #334155; font-weight: 600; }

.fhc-recs { display: flex; flex-direction: column; gap: 12px; margin-bottom: 32px; }
.fhc-rec {
    display: flex; gap: 14px; padding: 16px 18px; background: #fafbfc;
    border-left: 4px solid #dc2626; border-radius: 0 10px 10px 0;
}
.fhc-rec-icon {
    width: 42px; height: 42px; border-radius: 10px;
    display: flex; align-items: center; justify-content: center; flex-shrink: 0; font-size: 18px;
}
.fhc-rec-body h4 { font-size: 1rem; color: #0f172a; margin: 0 0 4px; font-weight: 700; }
.fhc-rec-body p { color: #475569; font-size: 0.88rem; line-height: 1.55; margin: 0; }

.fhc-plan { display: flex; flex-direction: column; gap: 12px; margin-bottom: 36px; }
.fhc-plan-step {
    display: flex; gap: 14px; align-items: flex-start; padding: 14px 18px;
    background: #fff7ed; border-radius: 10px; border: 1px solid #fed7aa;
}
.fhc-plan-num {
    width: 32px; height: 32px; border-radius: 50%; background: #dc2626; color: #fff;
    display: flex; align-items: center; justify-content: center; font-weight: 800; flex-shrink: 0;
}
.fhc-plan-body { font-size: 0.92rem; color: #334155; line-height: 1.55; }
.fhc-plan-body strong { color: #c2410c; }

.fhc-results-cta { text-align: center; padding-top: 24px; border-top: 1px solid #f1f5f9; }
.fhc-results-cta h3 { font-size: 1.25rem; color: #0f172a; margin-bottom: 8px; }
.fhc-results-cta p { color: #64748b; margin-bottom: 18px; }

/* Explainer box (Understanding Your Score) */
.fhc-explainer {
    display: flex; gap: 14px; align-items: flex-start;
    background: #fef2f2; border-left: 4px solid #dc2626; border-radius: 8px;
    padding: 16px 18px; margin: 0 0 32px; font-size: 0.88rem; color: #7f1d1d; line-height: 1.6;
}
.fhc-explainer-icon { color: #dc2626; font-size: 18px; flex-shrink: 0; padding-top: 2px; }
.fhc-explainer-body strong { font-weight: 700; }

/* Disclaimer box */
.fhc-disclaimer {
    display: flex; gap: 14px; align-items: flex-start;
    background: #fef3c7; border-left: 4px solid #f59e0b; border-radius: 8px;
    padding: 16px 18px; margin: 0 0 32px; font-size: 0.86rem; color: #78350f; line-height: 1.6;
}
.fhc-disclaimer-icon { color: #d97706; font-size: 18px; flex-shrink: 0; padding-top: 2px; }
.fhc-disclaimer strong { color: #92400e; font-weight: 700; }

/* ============================================================
   NEW RESULT LAYOUT — Sidebar + Tabs + Main Area
   ============================================================ */
.fhc-result-shell {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 0;
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 12px 32px rgba(15,23,42,0.08);
    border: 1px solid #f1f5f9;
    width: 100%;
    max-width: 100%;
    margin: 0;
    min-height: 600px;
}

/* Sidebar — RED theme matching website */
.fhc-side {
    background: linear-gradient(180deg, #dc2626 0%, #b91c1c 100%);
    color: #fff;
    padding: 32px 26px;
}
.fhc-side h3 {
    color: #fff;
    font-size: 1.1rem;
    margin: 0 0 22px;
    line-height: 1.3;
    font-weight: 700;
}
.fhc-side ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 22px;
}
.fhc-side li {
    display: flex;
    gap: 14px;
    align-items: flex-start;
}
.fhc-side li i {
    font-size: 18px;
    color: #fecaca;
    width: 24px;
    text-align: center;
    flex-shrink: 0;
    padding-top: 2px;
}
.fhc-side li strong {
    display: block;
    font-size: 0.92rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 4px;
    line-height: 1.3;
}
.fhc-side li span {
    display: block;
    font-size: 0.78rem;
    color: rgba(255,255,255,0.9);
    line-height: 1.5;
}

/* Main area */
.fhc-main { padding: 28px 32px 24px; }

/* Tabs */
.fhc-tabs {
    display: flex;
    border-bottom: 1px solid #e2e8f0;
    margin-bottom: 28px;
    gap: 4px;
}
.fhc-tab {
    flex: 1;
    background: none;
    border: none;
    padding: 14px 18px;
    font-size: 0.92rem;
    font-weight: 600;
    color: #64748b;
    cursor: pointer;
    transition: all 0.2s ease;
    border-bottom: 3px solid transparent;
    margin-bottom: -1px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.fhc-tab:hover { color: #dc2626; }
.fhc-tab.active {
    color: #dc2626;
    border-bottom-color: #dc2626;
}
.fhc-tab i { font-size: 14px; }

/* Tab panels */
.fhc-tab-panel { display: none; }
.fhc-tab-panel.active { display: block; }

/* Top Results: Score + Breakdown side by side */
.fhc-results-top {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 28px;
    margin-bottom: 24px;
}

.fhc-score-box {
    text-align: center;
    padding: 24px 16px;
    background: #fff;
    border-radius: 12px;
    border: 1px solid #f1f5f9;
}
.fhc-score-box h3 {
    font-size: 1.05rem;
    color: #0f172a;
    margin: 0 0 18px;
    font-weight: 700;
    line-height: 1.3;
}
.fhc-score-box .fhc-score-circle {
    width: 170px;
    height: 170px;
    margin: 0 auto 14px;
}
.fhc-score-box .fhc-score-num {
    font-size: 2.6rem;
    font-weight: 800;
    color: #0f172a;
}
.fhc-score-box .fhc-score-grade {
    display: inline-block;
    color: #fff;
    padding: 6px 18px;
    border-radius: 99px;
    font-size: 12px;
    font-weight: 700;
}

.fhc-breakdown-box {
    background: #fff;
    border-radius: 12px;
    border: 1px solid #f1f5f9;
    padding: 22px 24px;
}
.fhc-breakdown-box h3 {
    font-size: 1.05rem;
    color: #0f172a;
    margin: 0 0 18px;
    font-weight: 700;
}

/* Horizontal bars in breakdown */
.fhc-bars {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.fhc-bar { }
.fhc-bar-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
    font-size: 0.84rem;
}
.fhc-bar-label { color: #334155; font-weight: 600; }
.fhc-bar-label small { color: #94a3b8; font-weight: 500; }
.fhc-bar-score { font-weight: 700; }
.fhc-bar-track {
    height: 6px;
    background: #e2e8f0;
    border-radius: 99px;
    overflow: hidden;
}
.fhc-bar-fill {
    height: 100%;
    border-radius: 99px;
    transition: width 1s ease;
}

/* Recommendation intro paragraph */
.fhc-rec-intro {
    color: #64748b;
    font-size: 0.92rem;
    margin: -10px 0 16px;
}

/* Priority badge inside recommendation title */
.fhc-rec-prio {
    display: inline-block;
    color: #fff;
    padding: 2px 8px;
    border-radius: 99px;
    font-size: 10px;
    font-weight: 700;
    margin-left: 8px;
    text-transform: lowercase;
    vertical-align: middle;
    letter-spacing: 0.3px;
}

/* Next Steps list */
.fhc-next-list {
    list-style: none;
    padding: 0;
    margin: 0 0 28px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.fhc-next-list li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 14px;
    background: #f0fdf4;
    border-radius: 8px;
    border-left: 3px solid #16a34a;
    font-size: 0.9rem;
    color: #334155;
}
.fhc-next-list li i {
    color: #16a34a;
    font-size: 14px;
    margin-top: 3px;
    flex-shrink: 0;
}

/* Bottom footer */
.fhc-results-foot {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding-top: 18px;
    border-top: 1px solid #f1f5f9;
}
.fhc-foot-note {
    text-align: center;
    color: #94a3b8;
    font-size: 12.5px;
    margin: 16px 0 0;
}

/* Empty state for Results/Action tabs before calculation */
.fhc-empty-state {
    text-align: center;
    padding: 60px 30px;
    color: #94a3b8;
}
.fhc-empty-state i {
    font-size: 48px;
    color: #cbd5e1;
    margin-bottom: 14px;
    display: block;
}
.fhc-empty-state p {
    font-size: 0.95rem;
    color: #64748b;
    margin: 0;
}

/* Responsive */
@media (max-width: 900px) {
    .fhc-result-shell { grid-template-columns: 1fr; }
    .fhc-side { padding: 22px 20px; }
    .fhc-results-top { grid-template-columns: 1fr; }
    .fhc-main { padding: 22px 18px; }

    /* Compact progress bar with bg pill — applies tablet & mobile */
    .fhc-progress {
        padding: 8px;
        background: #f8fafc;
        border-radius: 12px;
        margin-bottom: 22px;
        position: relative;
    }
    .fhc-progress-steps {
        gap: 4px;
        align-items: start;
    }
    .fhc-progress-step {
        padding-top: 6px;
        font-size: 0.7rem;
        line-height: 1.25;
        gap: 5px;
    }
    .fhc-progress-step span {
        width: 28px;
        height: 28px;
        font-size: 0.82rem;
        background: #fff;
        border: 2px solid #e2e8f0;
    }
    .fhc-progress-bar {
        /* Exact math:
           padding 8 (progress) + padding 6 (step) = 14 (circle top edge)
           + 14 (half of 28px circle) = 28 (circle center)
           - 1.5 (half of 3px bar) = 26.5 (bar top for visual center)
           Using 26.5px so bar center sits exactly on circle center */
        top: 26.5px;
        height: 3px;
        left: 12.5%;
        right: 12.5%;
    }
    /* Remove box-shadow on active circle that creates optical illusion */
    .fhc-progress-step.active span {
        box-shadow: none;
    }
}

@media (max-width: 768px) {
    /* Tabs — equal split fit on mobile */
    .fhc-tabs {
        gap: 0;
        margin-bottom: 20px;
    }
    .fhc-tab {
        flex: 1;
        min-width: 0;
        padding: 12px 6px;
        font-size: 0.78rem;
        gap: 5px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .fhc-tab i { font-size: 12px; flex-shrink: 0; }
}

@media (max-width: 420px) {
    /* Very small phones: hide icons, show only text */
    .fhc-tab i { display: none; }
    .fhc-tab {
        font-size: 0.76rem;
        padding: 11px 4px;
        gap: 0;
    }
}
@media (max-width: 480px) {
    .fhc-results-foot { flex-direction: column; }
    .fhc-results-foot .btn { width: 100%; justify-content: center; }
}

/* Responsive */
@media (max-width: 768px) {
    .fhc-grid, .fhc-checkboxes, .fhc-dims, .fhc-intro-features { grid-template-columns: 1fr; }

    /* Active/inactive opacity treatment (sizing inherited from 900px breakpoint) */
    .fhc-progress-step {
        opacity: 0.55;
        transition: opacity 0.3s ease;
        word-break: keep-all;
        hyphens: auto;
    }
    .fhc-progress-step.active,
    .fhc-progress-step.completed {
        opacity: 1;
    }
    /* No box-shadow on active circle to avoid optical center-shift */
    .fhc-progress-step.active span {
        box-shadow: none;
    }

    .fhc-score-hero { grid-template-columns: 1fr; text-align: center; justify-items: center; }
    .fhc-score-circle { width: 160px; height: 160px; }
    .fhc-score-num { font-size: 2.6rem; }
    .fhc-results-card { padding: 24px 18px; }
    .fhc-intro-card { padding: 28px 22px; }
    .fhc-intro-card h2 { font-size: 1.4rem; }
    .fhc-nav { flex-direction: column-reverse; }
    .fhc-nav .btn { width: 100%; justify-content: center; }
}

/* Mobile fix — prevent horizontal overflow */
@media (max-width: 768px) {
    body .section .container:has(> .fhc-tool) {
        padding-left: 12px !important;
        padding-right: 12px !important;
    }
    .fhc-tool, .fhc-result-shell {
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
        box-sizing: border-box;
    }
    .fhc-main {
        padding: 18px 14px !important;
        width: 100%;
        box-sizing: border-box;
        overflow-x: hidden;
    }
    .fhc-side { padding: 18px 16px; }
    .fhc-step-header { padding: 18px 14px; }
    .fhc-step-header h3 { font-size: 1.05rem; }
    .fhc-step-header p { font-size: 0.82rem; }
    .fhc-grid {
        padding: 18px 14px;
        gap: 14px 12px;
        width: 100%;
        box-sizing: border-box;
    }
    .fhc-field {
        width: 100%;
        box-sizing: border-box;
        min-width: 0;
    }
    .fhc-field input, .fhc-field select {
        width: 100%;
        box-sizing: border-box;
        min-width: 0;
        font-size: 16px; /* prevents iOS auto-zoom */
    }
}

/* Even smaller — very small phones */
@media (max-width: 400px) {
    .fhc-progress-steps { gap: 2px; }
    .fhc-progress-step {
        font-size: 0.62rem;
    }
    .fhc-progress-step span {
        width: 24px;
        height: 24px;
        font-size: 0.72rem;
    }
    .fhc-progress-bar {
        /* Math: padding 8 + step pad 6 = 14 (circle top)
           + half circle 12 = 26 (circle center)
           - half bar 1.5 = 24.5 (bar top) */
        top: 24.5px;
    }
}
