:root {
  --ink: #17221f;
  --muted: #6c7773;
  --paper: #f6f7f3;
  --card: #ffffff;
  --line: #dfe5df;
  --green: #2b7967;
  --green-dark: #1d5a4d;
  --mint: #d9eee6;
  --blue: #9bb9d1;
  --shadow: 0 12px 30px rgba(28, 53, 45, 0.07);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
.results-table { width: 100%; margin-top: 18px; border-collapse: collapse; font-size: 12px; }
.results-table th, .results-table td { padding: 8px; text-align: left; border-bottom: 1px solid var(--line); }
.results-table caption { text-align: left; color: var(--muted); }
input[aria-invalid="true"] { outline: 2px solid #a33e33; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: Inter, ui-sans-serif, system-ui, -apple-system, sans-serif; line-height: 1.5; }
button, input { font: inherit; } button { cursor: pointer; }
.topbar { height: 74px; display: flex; align-items: center; justify-content: space-between; padding: 0 clamp(22px, 5vw, 76px); border-bottom: 1px solid var(--line); background: rgba(246, 247, 243, .94); }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); font-size: 18px; font-weight: 750; text-decoration: none; }
.brand-mark { display: grid; width: 30px; height: 30px; place-items: center; border-radius: 9px; background: var(--green); color: white; font-weight: 800; }
.model-status { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .06em; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: #62ad7c; box-shadow: 0 0 0 4px #dcefe0; }
.app-shell { max-width: 1380px; margin: 0 auto; padding: 62px clamp(22px, 5vw, 76px) 50px; }
.hero { display: flex; align-items: flex-end; justify-content: space-between; gap: 32px; margin-bottom: 48px; }
.eyebrow, .section-kicker { margin: 0 0 9px; color: var(--green); font-size: 10px; font-weight: 700; letter-spacing: .13em; text-transform: uppercase; }
h1, h2, h3, p { margin-top: 0; } h1 { max-width: 650px; margin-bottom: 12px; font-size: clamp(39px, 5vw, 65px); line-height: 1.03; letter-spacing: -.055em; }
h2 { margin-bottom: 0; font-size: 24px; letter-spacing: -.04em; } h3 { margin-bottom: 0; font-size: 17px; letter-spacing: -.025em; }
.hero-copy { max-width: 560px; margin-bottom: 0; color: var(--muted); font-size: 17px; }
.hero-note { display: flex; max-width: 250px; align-items: flex-start; gap: 10px; padding: 13px 15px; border: 1px solid #c9ded5; border-radius: 12px; background: #eaf4ef; color: var(--green-dark); font-size: 12px; line-height: 1.4; }
.hero-note span:first-child, .assumptions-icon { display: grid; width: 23px; height: 23px; flex: 0 0 auto; place-items: center; border-radius: 50%; background: var(--mint); color: var(--green-dark); font-weight: 800; }
.workspace { display: grid; grid-template-columns: 325px minmax(0, 1fr); gap: 42px; align-items: start; }
.card { border: 1px solid var(--line); border-radius: 17px; background: var(--card); box-shadow: var(--shadow); }
.controls-card { position: sticky; top: 20px; padding: 26px 25px 23px; }
.section-heading, .results-heading, .card-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; }
.household-badge, .chart-note { margin-top: 5px; padding: 6px 9px; border-radius: 7px; background: #f0f4ef; color: var(--green-dark); font-size: 9px; white-space: nowrap; }
.chart-actions { display: flex; align-items: center; gap: 9px; }
.secondary-button { padding: 7px 10px; border: 1px solid #c5d9d0; border-radius: 7px; background: white; color: var(--green-dark); font-size: 10px; font-weight: 700; }
.secondary-button:hover:not(:disabled) { border-color: var(--green); background: #eaf4ef; }
.secondary-button:disabled { cursor: not-allowed; opacity: .45; }
fieldset { margin: 27px 0 0; padding: 0 0 23px; border: 0; border-bottom: 1px solid var(--line); } legend { padding: 0; font-size: 13px; font-weight: 700; }
.fieldset-help { margin: 4px 0 15px; color: var(--muted); font-size: 10px; }
.input-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 12px 0; }
.population-presets { margin: 0 0 18px; }
.preset-label { display: block; margin-bottom: 7px; color: var(--muted); font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.preset-buttons { display: flex; gap: 6px; }
.preset-button { flex: 1; padding: 8px 5px; border: 1px solid var(--line); border-radius: 7px; background: #f7f9f6; color: var(--muted); font-size: 11px; font-weight: 700; }
.preset-button:hover { border-color: #a9c9bd; color: var(--green-dark); }
.preset-button.active { border-color: var(--green); background: #eaf4ef; color: var(--green-dark); }
.preset-note { margin: 7px 0 0; color: var(--muted); font-size: 9px; line-height: 1.35; }
.input-row label, .field-group label { font-size: 12px; font-weight: 600; }
.percent-input, .money-input { display: flex; height: 38px; align-items: center; gap: 5px; padding: 0 10px; border: 1px solid var(--line); border-radius: 8px; background: #fbfcfa; color: var(--muted); font-size: 11px; }
.percent-input input, .money-input input { width: 82px; border: 0; outline: 0; background: transparent; color: var(--ink); font-weight: 650; text-align: right; }
.money-input input { width: 100%; text-align: left; } .money-input span:last-child { white-space: nowrap; }
.value-input { display: flex; width: 100%; height: 38px; align-items: center; justify-content: space-between; gap: 5px; padding: 0 10px; border: 1px solid var(--line); border-radius: 8px; background: #fbfcfa; color: var(--muted); font-size: 11px; }
.value-input input { width: 100%; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--ink); font-weight: 650; }
.total-status { margin: 15px 0 0; color: var(--green); font-size: 11px; font-weight: 700; } .total-status.invalid { color: #a33e33; }
.field-group { margin-top: 17px; } .field-group label { display: block; margin-bottom: 7px; } .money-input { width: 100%; } .money-input input { min-width: 0; }
.form-error { margin: 15px 0 -10px; color: #a33e33; font-size: 11px; }
.primary-button { display: flex; width: 100%; align-items: center; justify-content: space-between; margin-top: 28px; padding: 13px 15px; border: 0; border-radius: 9px; background: var(--green); color: white; font-weight: 700; transition: background .2s, transform .2s; }
.primary-button:hover { background: var(--green-dark); transform: translateY(-1px); } .primary-button:disabled { cursor: wait; opacity: .7; }
.text-button { display: block; margin: 12px auto 0; padding: 0; border: 0; background: transparent; color: var(--green); font-size: 11px; font-weight: 700; } .text-button:hover { color: var(--green-dark); text-decoration: underline; }
.results-heading { margin: 4px 0 20px; align-items: flex-end; } .result-status { margin: 0 0 2px; color: var(--muted); font-size: 10px; }
.chart-tabs { display: flex; align-items: flex-end; gap: 4px; margin: 0; padding: 0 0 0 12px; position: relative; z-index: 2; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; }
.chart-tabs::-webkit-scrollbar { display: none; }
.tab-button { flex: 0 0 auto; margin-bottom: -1px; padding: 11px 21px 10px; border: 1px solid var(--line); border-bottom: 0; border-radius: 12px 12px 0 0; background: #e9efeb; color: var(--muted); font-size: 12px; font-weight: 700; }
.tab-button:hover:not(:disabled):not(.active) { background: #f0f4f1; color: var(--green-dark); }
.tab-button.active { position: relative; background: var(--card); color: var(--green-dark); }
.tab-button:disabled { cursor: not-allowed; opacity: .45; }
.tab-panel { padding: 22px; border: 1px solid var(--line); border-radius: 0 17px 17px 17px; background: var(--card); box-shadow: var(--shadow); }
.tab-panel[hidden] { display: none; }
.yearly-panel { min-height: 205px; }
.headline-card { display: flex; align-items: flex-start; gap: 15px; margin: 18px 0; padding: 23px; border: 1px solid #bcdccd; border-radius: 17px; background: #eaf4ef; }
.headline-icon { display: grid; width: 39px; height: 39px; flex: 0 0 auto; place-items: center; border-radius: 11px; background: var(--green); color: white; font-size: 22px; font-weight: 700; }
.headline-card h2 { margin-bottom: 5px; color: var(--green-dark); } .headline-card p:last-child { margin: 0; color: var(--muted); font-size: 12px; }
.chart-card { padding: 24px 23px 18px; margin: 18px 0;} .chart-wrap { position: relative; height: 360px; margin-top: 20px; } .chart-footnote { margin: 11px 0 0; color: var(--muted); font-size: 10px; }
.results-table-card { margin-top: 18px; padding: 22px 23px 18px; box-shadow: none; }
.results-table { width: 100%; margin-top: 15px; border-collapse: collapse; font-size: 12px; }
.results-table th, .results-table td { padding: 10px 8px; border-bottom: 1px solid var(--line); text-align: left; }
.results-table th { color: var(--muted); font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
.results-table td:not(:first-child), .results-table th:not(:first-child) { text-align: right; }
.results-table tr:last-child td { border-bottom: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.metric-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 18px; }
.metric-card { min-height: 126px; padding: 20px; border: 1px solid var(--line); border-radius: 14px; background: white; } .metric-label { display: block; color: var(--muted); font-size: 11px; }
.metric-card strong { display: block; margin: 10px 0 4px; font-size: 27px; letter-spacing: -.05em; } .metric-support { color: var(--muted); font-size: 10px; }
.assumptions-card { display: flex; align-items: flex-start; gap: 13px; margin-top: 18px; padding: 18px 20px; box-shadow: none; } .assumptions-card p { max-width: 700px; margin: 5px 0 0; color: var(--muted); font-size: 11px; line-height: 1.5; }
.footer { display: flex; max-width: 1380px; justify-content: space-between; margin: 0 auto; padding: 0 clamp(22px, 5vw, 76px) 35px; color: #9aa39f; font-size: 9px; text-transform: uppercase; letter-spacing: .05em; }
@media (max-width: 980px) { .workspace { grid-template-columns: 280px minmax(0, 1fr); gap: 22px; } }
@media (max-width: 720px) { .topbar { height: 62px; } .model-status { display: none; } .app-shell { padding-top: 40px; } .hero { display: block; margin-bottom: 35px; } .hero-note { margin-top: 22px; } .workspace { display: block; } .controls-card { position: static; margin-bottom: 38px; } .results-heading { display: block; } .result-status { margin-top: 9px; } .metric-grid { grid-template-columns: 1fr; } .footer { display: block; line-height: 2; } }
