.financial-health-panel { margin: 28px 0; padding: 28px; }
.financial-health-panel [hidden] { display: none !important; }
.fhs-panel-header { display: flex; justify-content: space-between; gap: 20px; align-items: start; }
.fhs-panel-header h2 { margin: 0 0 8px; }
.fhs-panel-header p { margin: 0; color: var(--text-secondary, #616161); }
.fhs-local-badge { white-space: nowrap; padding: 6px 10px; border-radius: 999px; background: #e8f5e9; color: #1b5e20; font-size: .8rem; font-weight: 700; }
.fhs-profile-form { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) auto; gap: 14px; align-items: end; margin: 24px 0; }
.fhs-profile-form label { display: grid; gap: 6px; font-weight: 600; }
.fhs-profile-form small { font-weight: 400; color: #616161; }
.fhs-profile-form input { width: 100%; box-sizing: border-box; padding: 10px; }
.fhs-output { display: grid; grid-template-columns: 150px 1fr; gap: 28px; align-items: start; }
.fhs-result-score { width: 130px; height: 130px; display: grid; place-items: center; border-radius: 50%; background: var(--primary, #1565c0); color: #fff; font-size: 2.6rem; font-weight: 800; }
.fhs-result-score::after { content: '/100'; font-size: .8rem; display: block; margin-top: -38px; }
.fhs-components { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.fhs-components li { display: grid; grid-template-columns: 1fr auto; gap: 6px 16px; }
.fhs-components progress { grid-column: 1 / -1; width: 100%; accent-color: var(--primary, #1565c0); }
.fhs-actions-wrap { grid-column: 1 / -1; background: #f5f9ff; padding: 18px; border-radius: 10px; }
.fhs-actions-wrap h3 { margin-top: 0; }
.fhs-actions { margin-bottom: 0; padding-left: 22px; }
.fhs-disclaimer { grid-column: 1 / -1; color: #616161; font-size: .8rem; }
.fhs-empty { padding: 14px; background: #fff8e1; border-radius: 8px; }

/* Full report view, built on the app shell tokens rather than the Stitch page. */
.fhs-analysis-page { width: min(1180px, 100%); margin: 0 auto; padding: 24px 0 48px; display: grid; gap: 28px; }
.fhs-analysis-toolbar { display: flex; align-items: center; justify-content: flex-end; gap: 16px; }
.fhs-analysis-toolbar .link-btn { display: inline-flex; align-items: center; gap: 6px; }
.fhs-analysis-toolbar .material-symbols-outlined { font-size: 18px; }
.fhs-analysis-hero { display: grid; grid-template-columns: minmax(0, 1fr) 220px; align-items: center; gap: 32px; padding: 32px; background: var(--stitch-surface-deep, #111418); border: 1px solid var(--stitch-surface-light, #1b2026); border-radius: 8px; }
.fhs-analysis-hero-copy { min-width: 0; }
.fhs-analysis-eyebrow { margin: 0 0 10px; color: var(--stitch-primary, #88d982); font-size: 11px; font-weight: 800; letter-spacing: .1em; line-height: 1.2; }
.fhs-analysis-hero h1, .fhs-analysis-section h2 { margin: 0; color: var(--stitch-on-surface, #e0e4da); font-family: var(--stitch-font-headline, inherit); }
.fhs-analysis-hero h1 { font-size: clamp(28px, 4vw, 44px); line-height: 1.1; }
.fhs-analysis-hero-copy > p:not(.fhs-analysis-eyebrow) { max-width: 650px; margin: 14px 0 0; color: var(--stitch-on-surface-variant, #bfcaba); font-size: 16px; line-height: 1.6; }
.fhs-analysis-status { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 22px; color: var(--stitch-on-surface, #e0e4da); }
.fhs-status-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--stitch-success, #10b981); box-shadow: 0 0 0 4px rgba(16,185,129,.12); }
.fhs-analysis-updated { color: var(--stitch-on-surface-variant, #bfcaba); font-size: 13px; }
.fhs-analysis-score-wrap { position: relative; width: 190px; aspect-ratio: 1; justify-self: center; }
.fhs-analysis-score-ring { display: block; width: 100%; height: 100%; transform: rotate(-90deg); }
.fhs-score-ring-track, .fhs-score-ring-value { fill: none; stroke-width: 8; }
.fhs-score-ring-track { stroke: var(--stitch-surface-light, #1b2026); }
.fhs-score-ring-value { stroke: var(--stitch-primary, #88d982); stroke-linecap: round; stroke-dasharray: 0 100; pathLength: 100; transition: stroke-dasharray .45s ease; }
.fhs-analysis-score-value { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; color: var(--stitch-on-surface, #e0e4da); }
.fhs-analysis-score-value strong { font-family: var(--stitch-font-data, monospace); font-size: 48px; line-height: 1; }
.fhs-analysis-score-value span { margin-top: 8px; color: var(--stitch-on-surface-variant, #bfcaba); font-size: 12px; letter-spacing: .1em; }
.fhs-analysis-section { display: grid; gap: 16px; }
.fhs-analysis-section-heading { display: flex; align-items: end; justify-content: space-between; gap: 16px; border-bottom: 1px solid var(--stitch-surface-light, #1b2026); padding-bottom: 12px; }
.fhs-analysis-section h2 { font-size: 24px; }
.fhs-analysis-section-note { color: var(--stitch-on-surface-variant, #bfcaba); font-size: 12px; }
.fhs-analysis-metrics { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.fhs-metric-card, .fhs-action-card { min-width: 0; border: 1px solid var(--stitch-surface-light, #1b2026); background: var(--stitch-surface-deep, #111418); border-radius: 6px; }
.fhs-metric-card { display: flex; flex-direction: column; gap: 14px; padding: 16px; }
.fhs-metric-heading { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 8px; color: var(--stitch-on-surface-variant, #bfcaba); font-size: 12px; }
.fhs-metric-heading strong { color: var(--stitch-on-surface, #e0e4da); font-family: var(--stitch-font-data, monospace); font-size: 18px; }
.fhs-metric-icon { color: var(--stitch-primary, #88d982); font-size: 18px; }
.fhs-metric-bar { height: 3px; overflow: hidden; background: var(--stitch-surface-light, #1b2026); }
.fhs-metric-bar-fill { display: block; height: 100%; transition: width .35s ease; }
.fhs-metric-bar-fill.good { background: var(--stitch-success, #10b981); }
.fhs-metric-bar-fill.warn { background: #f59e0b; }
.fhs-metric-bar-fill.low { background: #f43f5e; }
.fhs-metric-status { font-size: 11px; font-weight: 800; }
.fhs-metric-status.good { color: var(--stitch-success, #10b981); }
.fhs-metric-status.warn { color: #f59e0b; }
.fhs-metric-status.low { color: #f43f5e; }
.fhs-analysis-actions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.fhs-action-card { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px; padding: 18px 18px 16px 20px; overflow: hidden; }
.fhs-action-card::before { content: ''; position: absolute; inset: 0 auto 0 0; width: 3px; background: var(--stitch-primary, #88d982); }
.fhs-action-emergency::before, .fhs-action-debt::before { background: #f43f5e; }
.fhs-action-savings::before, .fhs-action-long_term::before { background: #f59e0b; }
.fhs-action-icon { color: var(--stitch-primary, #88d982); font-size: 22px; }
.fhs-action-card h3 { margin: 0; color: var(--stitch-on-surface, #e0e4da); font-size: 16px; line-height: 1.3; }
.fhs-action-card p { margin: 7px 0 0; color: var(--stitch-on-surface-variant, #bfcaba); font-size: 13px; line-height: 1.55; }
.fhs-action-link { grid-column: 2; justify-self: start; margin-top: 6px; padding: 0; border: 0; background: transparent; color: var(--stitch-primary, #88d982); font-size: 12px; font-weight: 700; cursor: pointer; }
.fhs-analysis-data-note { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 16px 18px; border: 1px solid var(--stitch-surface-light, #1b2026); color: var(--stitch-on-surface-variant, #bfcaba); }
.fhs-analysis-data-note > .material-symbols-outlined { color: var(--stitch-primary, #88d982); }
.fhs-analysis-data-note strong { display: block; color: var(--stitch-on-surface, #e0e4da); font-size: 13px; }
.fhs-analysis-data-note p { margin: 4px 0 0; font-size: 12px; line-height: 1.5; }
.fhs-analysis-data-note .btn-secondary { white-space: nowrap; }
.fhs-analysis-empty { margin: 0; padding: 18px; border: 1px dashed var(--stitch-outline-variant, #40493d); color: var(--stitch-on-surface-variant, #bfcaba); }
@media (max-width: 800px) {
  .fhs-profile-form { grid-template-columns: 1fr; }
  .fhs-output { grid-template-columns: 1fr; }
  .fhs-result-score { margin-inline: auto; }
  .fhs-panel-header { flex-direction: column; }
  .fhs-analysis-page { padding: 16px 0 32px; gap: 22px; }
  .fhs-analysis-hero { grid-template-columns: 1fr; padding: 22px 18px; gap: 20px; }
  .fhs-analysis-hero h1 { font-size: 30px; }
  .fhs-analysis-score-wrap { width: 150px; }
  .fhs-analysis-section-heading { align-items: start; flex-direction: column; gap: 8px; }
  .fhs-analysis-metrics, .fhs-analysis-actions { grid-template-columns: 1fr; }
  .fhs-analysis-data-note { grid-template-columns: auto minmax(0, 1fr); }
  .fhs-analysis-data-note .btn-secondary { grid-column: 2; justify-self: start; }
}
