:root {
  color-scheme: light;
  --bg: #f3f0e8;
  --panel: #fffdf8;
  --ink: #182230;
  --muted: #667085;
  --line: #ded6c8;
  --brand: #185c53;
  --brand-2: #0b3d37;
  --gold: #b7791f;
  --soft-green: #eaf5ef;
  --soft-gold: #fff4dc;
  --good: #0f7a4f;
  --warn: #9a5b00;
  --bad: #ad2f2f;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; background: radial-gradient(circle at top left, #ffffff 0, var(--bg) 44rem); color: var(--ink); }
.hero { padding: 48px max(24px, calc((100vw - 1180px) / 2)) 48px max(64px, calc((100vw - 1180px) / 2 + 72px)); background: linear-gradient(135deg, #0b3d37, #185c53 62%, #b7791f); color: white; }
.eyebrow, .section-kicker { text-transform: uppercase; letter-spacing: .13em; font-size: .74rem; font-weight: 900; margin: 0 0 8px; }
.eyebrow { opacity: .85; }
.section-kicker { color: var(--gold); }
h1 { margin: 0; font-size: clamp(2.25rem, 5vw, 4.4rem); line-height: .98; max-width: 850px; letter-spacing: -.045em; }
h2, h3 { margin: 0 0 10px; letter-spacing: -.02em; }
p { line-height: 1.55; }
.lede { max-width: 780px; font-size: 1.13rem; color: #edfdf8; }
.hero-card { align-self: end; background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.28); border-radius: 24px; padding: 22px; box-shadow: 0 24px 80px rgba(0,0,0,.16); }
.hero-card strong { display: block; font-size: 1.45rem; line-height: 1.15; margin: 8px 0; }
.hero-label { color: #ffe9b7; font-weight: 900; text-transform: uppercase; letter-spacing: .1em; font-size: .72rem; }
main { max-width: 1180px; margin: 24px auto; padding: 0 24px; }
.panel, .card { background: rgba(255,253,248,.94); border: 1px solid var(--line); border-radius: 24px; box-shadow: 0 16px 45px rgba(60,44,20,.08); }
.panel { padding: 24px; margin-bottom: 22px; }
.top-overview { display: block; margin-bottom: 22px; }
.bank-panel { background: linear-gradient(180deg, #fffdf8, #f7fbf7); }
.bank-take-panel { text-align: center; background: linear-gradient(135deg, #7a2e1f, #b7791f); color: white; border-color: rgba(255,255,255,.18); margin-top: 22px; }
.bank-take-panel .section-kicker { color: #ffe9b7; }
.bank-take-panel h2 { color: white; font-size: clamp(2rem, 5vw, 4rem); line-height: 1; margin: 10px 0 14px; }
.bank-take-panel p { max-width: 850px; margin: 0 auto; color: #fff8ed; }
.overview-stack { display: grid; gap: 18px; }
.story-grid { display: grid; grid-template-columns: 1.3fr .85fr .85fr; gap: 18px; margin-bottom: 22px; }
.story-panel h2 { font-size: clamp(1.7rem, 3vw, 2.5rem); color: var(--brand-2); }
.story-panel.wide { background: linear-gradient(180deg, #fffdf8, #f7fbf7); }
.danger-lite { background: #fff8ed; }
.muted, .hint, small, .section-title p { color: var(--muted); }
.mini-flow { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 18px; }
.mini-flow span { padding: 10px 12px; background: var(--soft-green); border: 1px solid #cae8d7; border-radius: 999px; font-weight: 800; color: var(--brand-2); }
.mini-flow.vertical { align-items: stretch; flex-direction: column; }
.mini-flow b { color: var(--gold); }
.mini-flow.vertical b { text-align: center; }
.section-title { display: flex; align-items: end; justify-content: space-between; gap: 16px; border-bottom: 1px solid var(--line); padding-bottom: 14px; margin-bottom: 18px; }
.section-title.compact { align-items: start; }
.section-title.no-border { border: 0; padding: 4px 2px 12px; }
.grid-form { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.grid-form.simplified { grid-template-columns: repeat(4, minmax(0, 1fr)); }
label { display: grid; gap: 7px; font-weight: 750; color: #344054; font-size: .92rem; }
input, select { width: 100%; border: 1px solid #cabfaf; border-radius: 14px; padding: 11px 12px; font: inherit; color: var(--ink); background: white; }
input:focus, select:focus { outline: 3px solid rgba(24,92,83,.17); border-color: var(--brand); }
.presentation { margin-top: 8px; }
.cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 22px; }
.card { padding: 20px; display: grid; gap: 8px; min-height: 146px; }
.card span { color: var(--muted); font-weight: 850; }
.card strong { font-size: clamp(1.45rem, 2.4vw, 2rem); line-height: 1.05; color: var(--brand-2); }
.card.primary { background: linear-gradient(180deg, #ffffff, #edf8f3); border-color: #b8dfcd; }
.good-card { background: #f0fbf4; }
.dad-card { background: #fff6e5; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; align-items: stretch; }
.roman-panel, .dad-explainer { min-height: 100%; display: flex; flex-direction: column; }
.timing-title { margin-top: auto; padding-top: 28px; }
.loan-list { display: grid; gap: 14px; }
.loan { border: 1px solid var(--line); border-radius: 18px; padding: 16px; background: #fffdfa; }
.loan-head { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.loan-head strong { color: var(--brand-2); }
.loan-head > strong { font-size: 1.2rem; }
.loan-metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 12px; }
.loan-metrics span { display: grid; gap: 2px; padding: 10px; background: #f8f5ee; border-radius: 14px; }
.loan-metrics b { color: var(--brand-2); }
.loan-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.loan-grid label { font-size: .82rem; }
.summary-list { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px 16px; margin: 0; }
.summary-list.large { gap: 14px 18px; }
.summary-list dt { color: var(--muted); display: grid; gap: 3px; align-content: start; }
.summary-list dt span { display: block; }
.summary-list dt small { display: block; font-size: .76rem; line-height: 1.25; color: #8a7560; }
.summary-list dd { margin: 0; font-weight: 900; text-align: right; color: var(--brand-2); overflow-wrap: anywhere; }
.callout { border-left: 4px solid var(--warn); padding: 12px 14px; background: #fff7e6; border-radius: 10px; }
.inflation-box { margin: auto 0 0; padding: 18px; border-radius: 20px; background: linear-gradient(135deg, #fff4dc, #fffdf8); border: 1px solid #edd39c; }
.inflation-box span { color: var(--warn); font-weight: 900; text-transform: uppercase; letter-spacing: .08em; font-size: .72rem; }
.inflation-box strong { display: block; font-size: 2rem; color: #7a4300; margin: 6px 0; }
.error { max-width: 1180px; margin: 0 auto 22px; padding: 16px 20px; background: #fff1f1; color: var(--bad); border: 1px solid #ffc9c9; border-radius: 16px; }
.hidden { display: none !important; }
.table-wrap { overflow: auto; }
table { width: 100%; border-collapse: collapse; font-size: .92rem; }
th, td { padding: 10px 8px; border-bottom: 1px solid var(--line); text-align: right; white-space: nowrap; }
th:first-child, td:first-child { text-align: left; }
th { color: var(--muted); font-size: .8rem; }
.scenario-list { display: grid; gap: 10px; }
.scenario { display: grid; grid-template-columns: .8fr .9fr minmax(190px, auto); gap: 14px; align-items: center; padding: 13px; border-radius: 16px; background: #f8fbf7; border: 1px solid var(--line); }
.timing-panel .scenario-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.timing-panel .scenario { grid-template-columns: 1fr; align-content: start; }
.scenario-date { color: var(--muted); }
.delta.good { color: var(--good); }
.delta.bad { color: var(--bad); }
.family-total-panel { text-align: center; background: linear-gradient(135deg, #0b3d37, #185c53); color: white; border-color: rgba(255,255,255,.18); }
.family-total-panel .section-kicker { color: #ffe9b7; }
.family-total-panel h2 { color: white; }
.family-total-panel > strong { display: block; font-size: clamp(2rem, 5vw, 4rem); line-height: 1; margin: 10px 0 14px; }
.family-total-panel p { max-width: 850px; margin: 0 auto; color: #edfdf8; }
footer { max-width: 1180px; margin: 10px auto 40px; padding: 0 24px; color: var(--muted); }
@media (max-width: 980px) {
  .hero, .split, .cards, .story-grid, .top-overview { grid-template-columns: 1fr; }
  .grid-form, .grid-form.simplified { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  main { padding: 0 14px; }
  .hero { padding: 30px 18px; }
  .grid-form, .grid-form.simplified, .loan-grid, .loan-metrics, .scenario { grid-template-columns: 1fr; }
  .section-title { align-items: start; flex-direction: column; }
}
