
:root{
  --navy:#052E4F; --navy2:#0A3E67; --green:#5AAA4B; --green2:#60AE34;
  --blue:#176899; --sky:#B0D8EA; --gold:#E8A017; --bg:#F7F8F4;
  --surface:#fff; --text:#31434D; --muted:#667883; --pink:#DF6C8A;
  --warning:#D88A00; --warning-bg:#FFF4D6; --error:#B83B3B;
  --shadow:0 14px 34px rgba(5,46,79,.16);
}
*{box-sizing:border-box}
html,body{margin:0;min-height:100%;font-family:Inter,ui-rounded,"Trebuchet MS",system-ui,-apple-system,sans-serif;background:linear-gradient(#dff3ff 0,#f7f8f4 58%,#f0f7ef 100%);color:var(--text)}
button{font:inherit}
.game-shell{min-height:100vh;background:
 radial-gradient(circle at 8% 20%,rgba(255,255,255,.92) 0 4%,transparent 18%),
 radial-gradient(circle at 92% 20%,rgba(255,255,255,.78),transparent 22%),
 linear-gradient(180deg,#ccecff 0,#eef8f3 100%);
 position:relative;overflow:hidden}
.game-shell:before,.game-shell:after{content:"";position:fixed;bottom:-160px;width:520px;height:430px;border-radius:50%;background:#88c786;filter:blur(2px);opacity:.3;pointer-events:none}
.game-shell:before{left:-190px}.game-shell:after{right:-220px}
.topbar{height:92px;display:grid;grid-template-columns:220px 1fr 150px;align-items:center;padding:12px 28px;gap:20px;position:relative;z-index:5}
.logo{width:195px;height:70px;object-fit:contain;filter:drop-shadow(0 4px 8px rgba(5,46,79,.12))}
.progress{display:flex;justify-content:center;align-items:flex-start;gap:8px}
.stage{display:flex;flex-direction:column;align-items:center;gap:4px;min-width:105px;color:var(--navy);font-weight:900;font-size:12px;text-align:center;opacity:.62}
.stage .bubble{width:48px;height:48px;border:4px solid #e7eef4;background:white;border-radius:50%;display:grid;place-items:center;font-size:22px;box-shadow:0 3px 8px rgba(5,46,79,.1)}
.stage.active,.stage.done{opacity:1}
.stage.active .bubble{border-color:var(--gold);box-shadow:0 0 0 6px rgba(232,160,23,.12)}
.stage.done .bubble{border-color:#37a567;background:#edf9f0}
.stage-line{width:42px;height:8px;background:#b6d7b3;border-radius:99px;margin-top:20px}
.top-action{justify-self:end}
.btn{border:2px solid var(--navy);border-radius:18px;padding:14px 22px;font-weight:900;cursor:pointer;box-shadow:0 5px 0 rgba(5,46,79,.18);transition:.16s transform,.16s box-shadow,.16s filter;background:white;color:var(--navy)}
.btn:hover{transform:translateY(-2px);filter:brightness(1.02);box-shadow:0 8px 0 rgba(5,46,79,.14)}
.btn:active{transform:translateY(2px);box-shadow:0 2px 0 rgba(5,46,79,.18)}
.btn.primary{background:linear-gradient(#ffd95a,#f7b91e);border-color:#aa6f00;color:#082d52;font-size:20px}
.btn.green{background:linear-gradient(#77cf66,#4eae44);border-color:#347b32;color:#0d3a16}
.btn.secondary{background:#eef7ff;border-color:#2e6d9d}
.btn.small{padding:10px 16px;border-radius:14px;font-size:14px}
.btn:disabled{opacity:.38;cursor:not-allowed;transform:none;box-shadow:none}
.content{max-width:1500px;margin:0 auto;padding:8px 28px 38px;position:relative;z-index:2}
.hero-home{min-height:730px;display:grid;grid-template-columns:1.12fr .88fr;align-items:center;gap:24px}
.home-left{padding:34px}
.home-kicker{display:inline-block;background:#fff3b4;color:var(--navy);font-weight:900;padding:8px 14px;border-radius:99px;margin-bottom:14px}
.home-title{font-size:78px;line-height:.92;margin:0;color:var(--navy);letter-spacing:-3px;text-shadow:0 3px 0 white}
.home-title span{display:block;color:#16945f}
.home-sub{font-size:26px;max-width:650px;font-weight:800;color:#234b63;margin:20px 0 24px}
.home-actions{display:flex;gap:14px;flex-wrap:wrap}
.character-collage{position:relative;height:650px}
.character-collage > img{position:absolute;bottom:0;max-height:600px;object-fit:contain;filter:drop-shadow(0 18px 18px rgba(5,46,79,.18))}
.character-collage > img:nth-child(1){left:-90px;z-index:4}
.character-collage > img:nth-child(2){left:90px;z-index:3}
.character-collage > img:nth-child(3){left:260px;z-index:2}
.card{background:rgba(255,255,255,.95);border:2px solid rgba(5,46,79,.09);border-radius:28px;box-shadow:var(--shadow)}
.panel{background:rgba(255,255,255,.95);border-radius:28px;border:2px solid rgba(5,46,79,.09);box-shadow:var(--shadow)}
.page-title{text-align:center;margin:8px 0 20px}
.page-title h1{font-size:58px;line-height:1;margin:0;color:var(--navy);letter-spacing:-2px}
.page-title h1 .green{color:#117955}.page-title h1 .pink{color:#d42e73}
.page-title p{font-weight:800;color:#284d63;font-size:20px;margin:10px 0}
.character-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:18px}
.character-card{padding:12px;text-align:center;position:relative;overflow:hidden;background:rgba(255,255,255,.94);border:3px solid #f5c13d;border-radius:24px;box-shadow:0 10px 24px rgba(5,46,79,.13)}
.character-card:before{content:"";position:absolute;inset:8px;border:2px solid rgba(232,160,23,.55);border-radius:18px;pointer-events:none}
.character-card img{height:285px;max-width:100%;object-fit:contain;display:block;margin:0 auto}
.character-card h3{font-size:28px;color:var(--navy);margin:0 0 4px}
.character-card .meta{font-weight:800;color:#3d5870;margin-bottom:5px}
.character-card .tag{min-height:42px;font-size:14px;color:#506575}
.character-card .btn{width:96%;margin-top:8px}
.profile-layout{display:grid;grid-template-columns:500px 1fr;gap:30px;align-items:stretch}
.character-stage{min-height:690px;display:flex;align-items:flex-end;justify-content:center;position:relative}
.character-stage img{max-height:690px;max-width:100%;object-fit:contain;filter:drop-shadow(0 18px 18px rgba(5,46,79,.15))}
.profile-panel{padding:28px 32px;align-self:center}
.profile-panel h1{font-size:58px;color:var(--navy);margin:0 0 8px}
.profile-meta{display:inline-flex;gap:14px;background:#ffe0e9;padding:8px 16px;border-radius:99px;font-weight:900;color:var(--navy)}
.profile-copy{font-size:24px;line-height:1.38;font-weight:650;color:#173b58;margin:20px 0}
.two-col{display:grid;grid-template-columns:1fr 1fr;gap:18px}
.softbox{border-radius:22px;padding:18px;background:#fff1f5}
.softbox.gold{background:#fff2bf}
.softbox h3{font-size:27px;margin:0 0 12px;color:var(--navy)}
.money-big{font-size:52px;font-weight:1000;color:var(--navy)}
.actions{display:flex;gap:14px;justify-content:center;margin-top:18px;flex-wrap:wrap}
.money-layout{display:grid;grid-template-columns:440px 1fr;gap:30px;align-items:center}
.money-layout .character-stage{min-height:650px}
.flow-panel{padding:24px 28px}
.flow-row{display:grid;grid-template-columns:76px 1fr 230px;align-items:center;padding:18px;border-radius:22px;margin:12px 0;background:#ecfff1}
.flow-row:nth-child(2){background:#fff1f4}.flow-row:nth-child(3){background:#fff7df}.flow-row:nth-child(4){background:#efffe6}
.flow-icon{font-size:40px}.flow-label{font-size:23px;font-weight:900;color:var(--navy)}.flow-sub{font-size:16px;color:#506575}.flow-value{text-align:right;font-size:42px;font-weight:1000;color:#0f7d4f}.negative{color:#c72d59}
.savings-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:18px}
.alloc-card{padding:22px;text-align:center}
.alloc-card.spend{background:#fff0f4}.alloc-card.emergency{background:#edf8ff}.alloc-card.future{background:#efffed}
.alloc-card h3{font-size:34px;margin:0 0 7px;color:var(--navy)}
.alloc-card p{min-height:48px;font-weight:700}
.stepper{display:grid;grid-template-columns:1fr 1.15fr 1fr;gap:10px;align-items:center;margin:16px 0}
.stepper button{padding:14px;border-radius:16px;border:2px solid #be7800;background:#ffd347;color:#132f4a;font-weight:1000;font-size:18px;cursor:pointer}
.percent{font-size:44px;font-weight:1000;color:var(--navy)}.dollars{font-size:24px;font-weight:900;color:#173b58}
.alloc-status{margin:18px auto 0;max-width:650px;padding:14px 18px;background:white;border-radius:18px;display:flex;justify-content:space-around;font-weight:900;font-size:22px}
.result-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:18px}
.result-card{padding:22px;text-align:center}
.result-card h3{font-size:30px;margin:0 0 10px;color:var(--navy)}
.result-card .amount{font-size:45px;font-weight:1000}
.result-card.pink{background:#fff1f5}.result-card.blue{background:#edf8ff}.result-card.green{background:#efffed}
.invest-highlight{margin-top:16px;padding:20px 26px;background:#fff4cc;border:3px solid #e5b327;border-radius:24px;text-align:center}
.invest-highlight h2{font-size:34px;margin:0;color:var(--navy)}.invest-highlight .amount{font-size:60px;color:#117955;font-weight:1000}
.pause{margin-top:18px;padding:18px 24px;background:var(--warning-bg);border:3px solid var(--warning);border-radius:22px;text-align:center}
.pause h2{font-size:38px;margin:0 0 8px;color:#7a4c00}
.invest-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:12px}
.invest-card{padding:14px;border-radius:20px;background:white;border:2px solid #d9e4ec;box-shadow:0 7px 16px rgba(5,46,79,.09)}
.invest-card h3{font-size:25px;margin:0 0 5px;color:var(--navy)}
.invest-card .desc{font-size:13px;min-height:35px;color:#506575;font-weight:700}
.invest-card .return{font-weight:900;margin:6px 0;color:#0b704c}
.invest-card .stepper{grid-template-columns:1fr 1.2fr 1fr;margin:8px 0 0}
.invest-card .stepper button{padding:9px;font-size:15px}
.invest-card .percent{font-size:29px}.invest-card .dollars{font-size:15px}
.invest-card .risk{font-size:12px;color:#667883;font-weight:800}
.status-row{display:flex;gap:12px;justify-content:flex-end;margin-bottom:12px;flex-wrap:wrap}
.status-pill{background:white;border:2px solid #dfeaf2;border-radius:18px;padding:10px 16px;font-weight:900}
.guardrail{background:#fdecec;border:3px solid var(--error);padding:16px;border-radius:18px;color:#7d2222;font-weight:800;margin:14px 0}
@media(max-width:1100px){
 .topbar{grid-template-columns:170px 1fr 120px;padding:10px 14px}.logo{width:160px}.stage{min-width:80px}.stage-line{width:24px}
 .hero-home{grid-template-columns:1fr}.character-collage{display:none}.home-title{font-size:64px}
 .character-grid{grid-template-columns:repeat(2,1fr)}.profile-layout,.money-layout{grid-template-columns:1fr}.character-stage{min-height:460px}.character-stage img{max-height:450px}
 .invest-grid{grid-template-columns:repeat(2,1fr)}
}
@media(max-width:720px){
 .topbar{grid-template-columns:1fr auto}.progress{display:none}.content{padding:6px 14px 28px}.character-grid,.savings-grid,.result-grid,.two-col{grid-template-columns:1fr}
 .page-title h1{font-size:42px}.profile-panel h1{font-size:42px}.home-title{font-size:52px}.flow-row{grid-template-columns:60px 1fr}.flow-value{grid-column:2;text-align:left}
 .invest-grid{grid-template-columns:1fr}.profile-copy{font-size:20px}
}


/* ===== Phase 2: Report, time jump, retirement and final report ===== */
.screen-enter{animation:mmEnter .34s ease-out both}
@keyframes mmEnter{from{opacity:0;transform:translateY(12px)}to{opacity:1;transform:none}}
.badge-reveal{animation:badgePop .55s cubic-bezier(.2,.9,.25,1.25) both}
@keyframes badgePop{0%{opacity:0;transform:scale(.72) rotate(-3deg)}100%{opacity:1;transform:scale(1) rotate(0)}}
.report-layout{display:grid;grid-template-columns:1fr 290px;gap:18px}
.report-main{padding:24px}
.personality-box{background:#efffed;border:2px solid #b4e2bd;border-radius:22px;padding:16px;text-align:center}
.personality-box img{width:230px;max-height:225px;object-fit:contain}
.personality-box h3{margin:0 0 8px;font-size:22px;color:var(--navy)}
.report-copy{font-size:18px;line-height:1.45;font-weight:700;color:#173b58}
.metrics{display:grid;grid-template-columns:repeat(5,1fr);gap:10px;margin:16px 0}
.metric{background:#f4f8fb;border:2px solid #dce8ef;border-radius:18px;padding:12px;text-align:center}
.metric .label{font-size:13px;font-weight:900;color:#425d70}.metric .num{font-size:28px;font-weight:1000;color:var(--navy);margin-top:4px}
.strategy-chart{display:grid;grid-template-columns:.76fr 1.24fr;gap:14px}
.strategy{background:#fff4f8;border-radius:20px;padding:15px}
.strategy-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:10px}
.strategy-chip{background:white;border:2px solid #e5eaf0;border-radius:15px;padding:11px;text-align:center;font-weight:900}
.chartbox{background:white;border:2px solid #dfe8ef;border-radius:20px;padding:14px}
.chartbox h3{margin:0 0 8px;color:var(--navy)}
.chartbox svg{width:100%;height:235px;display:block}
.timeline-update{display:grid;grid-template-columns:420px 1fr;gap:26px;align-items:center}
.update-art{height:680px;display:flex;justify-content:center;align-items:flex-end}
.update-art img{max-height:650px;max-width:100%;object-fit:contain;filter:drop-shadow(0 18px 18px rgba(5,46,79,.15))}
.update-panel{padding:26px}
.update-panel h1{font-size:56px;line-height:1;margin:0;color:var(--navy)}
.update-panel .agecareer{display:inline-block;margin:12px 0 14px;padding:8px 15px;background:#ffe0e9;border-radius:99px;font-weight:1000}
.big3{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;margin:16px 0}
.bigstat{padding:18px;border-radius:18px;text-align:center;background:#efffed;border:2px solid #d3ead5}
.bigstat:nth-child(2){background:#fff1f5}.bigstat:nth-child(3){background:#edf8ff}
.bigstat .num{font-size:35px;font-weight:1000;color:var(--navy)}
.round2-note{background:#fff7d9;border:2px solid #e6b631;border-radius:18px;padding:12px 16px;font-weight:900;color:#473d1f;margin-bottom:12px}
.revision-banner{background:#fff0f6;border:2px solid #df6c8a;border-radius:18px;padding:12px 16px;font-weight:900;color:#8b2550;margin-bottom:12px}
.compare-table{width:100%;border-collapse:separate;border-spacing:0;overflow:hidden;border-radius:18px;border:2px solid #dbe6ef;background:white}
.compare-table th,.compare-table td{padding:11px 14px;border-bottom:1px solid #e1e8ee;text-align:center;font-weight:800}
.compare-table th:first-child,.compare-table td:first-child{text-align:left}
.compare-table thead th{background:#edf5fc;color:var(--navy);font-size:17px}
.compare-table thead th:last-child{background:#ffe7ef}
.compare-table tbody tr:last-child td{border-bottom:0}
.review-summary{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;margin-top:14px}
.review-stat{border-radius:18px;padding:15px;text-align:center;background:#fff0f5}.review-stat:nth-child(2){background:#efffed}.review-stat:nth-child(3){background:#f0ecff}
.review-stat .num{font-size:32px;font-weight:1000;color:var(--navy)}
.age-reveal{display:grid;grid-template-columns:360px 1fr;gap:22px;align-items:center}
.retire-art{min-height:650px;display:flex;align-items:center;justify-content:center}
.retire-art img{max-width:100%;max-height:620px;object-fit:contain;filter:drop-shadow(0 18px 18px rgba(5,46,79,.16))}
.retire-panel{padding:22px}
.lifestyle{font-size:44px;font-weight:1000;color:var(--navy);background:#fff0a9;border-radius:16px;padding:8px 14px;display:inline-block}
.retirement-cards{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;margin:16px 0}
.ret-card{border-radius:18px;padding:15px;text-align:center}.ret-card:nth-child(1){background:#fff0f5}.ret-card:nth-child(2){background:#e9fff2}.ret-card:nth-child(3){background:#fff4c9}
.ret-card .num{font-size:37px;font-weight:1000;color:var(--navy)}
.ret-grid{display:grid;grid-template-columns:1.25fr .75fr;gap:14px}
.journey-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.journey-chip{border:2px solid #dbe7ef;border-radius:16px;padding:12px;background:white}
.journey-chip b{display:block;color:var(--navy);font-size:18px}
.age-tabs{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;margin-bottom:15px}
.age-tab{border:2px solid #7aa5c6;border-radius:17px;background:#f6fbff;padding:13px;font-size:21px;font-weight:1000;color:var(--navy);cursor:pointer}
.age-tab.active{background:linear-gradient(#53b86e,#2a9160);border-color:#1c7e50;color:white}
.age-cards{display:grid;grid-template-columns:repeat(3,1fr);gap:13px}
.age-card{padding:18px;border:2px solid #dbe6ef;border-radius:20px;background:white}
.age-card.selected{border-color:#37a567;box-shadow:0 0 0 4px rgba(55,165,103,.12)}
.age-card h3{font-size:25px;margin:0 0 8px;color:var(--navy)}
.age-card .asset{font-size:36px;font-weight:1000;color:#147c55}
.bar-chart{display:flex;align-items:flex-end;gap:38px;height:220px;padding:25px 30px 0;border-left:2px solid #cbd8e0;border-bottom:2px solid #cbd8e0}
.bar-wrap{flex:1;text-align:center;font-weight:900}
.bar{width:100%;border-radius:12px 12px 0 0;background:linear-gradient(#6fc98a,#27945f);min-height:5px;transition:.35s height}
.final-report{background:white;border-radius:28px;box-shadow:var(--shadow);overflow:hidden}
.final-hero{display:grid;grid-template-columns:1fr 420px;background:linear-gradient(115deg,#eaf8ff,#fff);min-height:300px}
.final-hero-copy{padding:30px}.final-hero-copy h1{font-size:60px;line-height:1;margin:0;color:var(--navy)}
.final-hero-art{display:flex;justify-content:center;align-items:flex-end;background:linear-gradient(#c9ebff,#eff9f5)}
.final-hero-art img{max-height:315px;max-width:100%;object-fit:contain}
.final-body{padding:24px}
.final-total{background:#efffed;border:2px solid #bfe3c7;border-radius:22px;padding:18px;text-align:center}
.final-total .num{font-size:68px;font-weight:1000;color:#138157}
.final-small-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;margin:14px 0}
.final-small{border-radius:18px;background:#f4f8fb;padding:15px;text-align:center}
.final-small .num{font-size:31px;font-weight:1000;color:#117955}
.keep-grid{display:grid;grid-template-columns:1fr 1fr;gap:16px;margin-top:16px}
.keep-box{border:2px solid #dae6ee;border-radius:20px;padding:18px}
#qrCode{min-height:180px;display:flex;align-items:center;justify-content:center}
#qrCode img,#qrCode canvas{max-width:180px!important;max-height:180px!important}
.result-link{font-size:12px;overflow-wrap:anywhere;background:#f5f7f8;border-radius:10px;padding:8px;margin-top:8px}
.print-only{display:none}
@media(max-width:1100px){
  .report-layout,.timeline-update,.age-reveal,.final-hero{grid-template-columns:1fr}
  .metrics{grid-template-columns:repeat(2,1fr)}.strategy-chart,.ret-grid{grid-template-columns:1fr}
  .update-art,.retire-art{min-height:420px;height:420px}.update-art img,.retire-art img{max-height:400px}
  .age-cards,.review-summary,.retirement-cards,.big3,.final-small-grid,.keep-grid{grid-template-columns:1fr}
  .final-hero-art{min-height:300px}
}
@media print{
  body{background:white}.topbar,.actions,.btn,.age-tabs,.footer-actions{display:none!important}
  .game-shell{background:white}.content{max-width:none;padding:0}.final-report{box-shadow:none;border:0}
  .print-only{display:block}
}

/* Accessibility and final interaction polish */
:focus-visible{outline:4px solid var(--mm-focus,#1D70B7);outline-offset:3px}
button:focus-visible{outline:4px solid #1D70B7;outline-offset:3px}
@media (prefers-reduced-motion: reduce){
  *,*::before,*::after{animation-duration:.001ms!important;animation-iteration-count:1!important;transition-duration:.001ms!important;scroll-behavior:auto!important}
}

/* Shared alignment polish carried into v5 */
.guardrail-actions{margin-top:12px}
.guardrail-actions .btn{margin:0}
.retirement-art-wrap{position:relative;overflow:hidden}
.art-placeholder-badge{position:absolute;left:50%;bottom:14px;transform:translateX(-50%);background:rgba(5,46,79,.92);color:#fff;border:2px solid #fff;border-radius:999px;padding:8px 14px;font-size:13px;font-weight:900;white-space:nowrap;box-shadow:0 5px 14px rgba(0,0,0,.18)}
.emergency-note{margin:14px 0 18px;padding:13px 16px;border-radius:15px;background:#eef7ff;border:2px solid #c7dff0;color:#24485d;font-size:17px}
.lifetime-chart-wrap{width:100%;overflow:hidden}
.lifetime-chart-wrap svg{width:100%;height:auto;display:block}
.chart-legend{display:flex;gap:18px;flex-wrap:wrap;margin:2px 0 8px;font-size:13px;font-weight:850;color:#405667}
.chart-legend span{display:flex;align-items:center;gap:7px}
.legend-line{width:28px;height:4px;border-radius:999px;display:inline-block}
.legend-line.invested{background:#39a65e}
.legend-line.contributed{background:#176899}
.spent-summary{margin:16px 0;padding:14px 16px;border-radius:16px;background:#fff7e7;border:2px solid #efd8a8;color:#614a13;font-size:17px}
.spent-summary span{display:block;margin-top:4px;font-size:13px;color:#786642}
.final-chart{margin-top:16px}
.final-indicators{display:grid;grid-template-columns:repeat(4,1fr);gap:12px;margin:16px 0}
.final-narrative{margin:16px 0}
.final-narrative p{font-size:18px;line-height:1.55;margin-bottom:0}
.age-strip-section{margin:18px 0;padding:18px;border-radius:20px;background:#f7fafc;border:2px solid #dce7ee}
.age-strip-section h3{margin:0 0 12px;color:var(--navy);font-size:24px}
.final-age-strip{display:grid;grid-template-columns:repeat(3,1fr);gap:12px}
.final-age-card{text-align:center;border-radius:16px;background:white;border:2px solid #d8e5ec;padding:14px;font-weight:850;color:#355268}
.final-age-card .age-total{font-size:24px;color:#117955;font-weight:1000;margin:4px 0}
.final-age-card small{display:block;color:#647b89}

@media(max-width:900px){
  .final-indicators{grid-template-columns:repeat(2,1fr)}
}
@media(max-width:620px){
  .final-indicators,.final-age-strip{grid-template-columns:1fr}
  .chart-legend{gap:10px;font-size:12px}
  .art-placeholder-badge{white-space:normal;text-align:center;max-width:85%}
}

@media print{
  @page{margin:0.45in}
  .keep-grid,.art-placeholder-badge,.footer-actions{display:none!important}
  .final-report{font-size:11pt}
  .final-hero{min-height:0;grid-template-columns:1.4fr .6fr;break-inside:avoid}
  .final-hero-art{min-height:180px;max-height:220px}
  .final-hero-art img{max-height:210px}
  .final-body{padding:10px 0}
  .final-total,.final-small-grid,.spent-summary,.final-chart,.final-indicators,.final-narrative,.two-col,.age-strip-section,.final-education-note{break-inside:avoid}
  .final-small-grid{grid-template-columns:repeat(3,1fr)!important}
  .final-indicators{grid-template-columns:repeat(4,1fr)!important}
  .final-age-strip{grid-template-columns:repeat(3,1fr)!important}
  .journey-chip{padding:8px;font-size:10pt}
  .final-narrative p{font-size:10.5pt;line-height:1.35}
  .age-strip-section{padding:10px;margin:10px 0}
  .final-chart{margin-top:10px}
  .lifetime-chart-wrap svg{max-height:220px}
  .two-col{gap:10px}
  .softbox{padding:10px}
  .round2-note{font-size:9.5pt}
}


/* ===== Build v5: classroom-device, accessibility, and responsive polish ===== */
.skip-link{position:fixed;left:16px;top:-80px;z-index:9999;background:#fff;color:var(--navy);border:3px solid var(--navy);border-radius:12px;padding:12px 16px;font-weight:900;box-shadow:var(--shadow)}
.skip-link:focus{top:12px}
.mobile-progress{display:none;color:var(--navy);font-size:14px;font-weight:800;background:rgba(255,255,255,.9);border:2px solid rgba(5,46,79,.12);border-radius:999px;padding:7px 12px;justify-self:center;text-align:center}
.btn,.stepper button,.age-tab{min-height:48px;touch-action:manipulation}
.btn{line-height:1.15}
button{-webkit-tap-highlight-color:transparent}
.table-scroll{width:100%;overflow-x:auto;border-radius:18px;scrollbar-gutter:stable}
.table-scroll:focus-visible{outline:4px solid #1D70B7;outline-offset:3px}
.compare-table{min-width:680px}
.character-card img{aspect-ratio:4/5}
.status-pill{min-width:170px;text-align:center}
#mainContent:focus{outline:none}

@media(max-width:900px){
  .topbar{height:auto;grid-template-columns:1fr auto;grid-template-rows:auto auto;padding:10px 14px 8px;gap:6px 12px}
  .logo{width:155px;height:54px;justify-self:start}
  .progress{display:none}
  .mobile-progress{display:block;grid-column:1/-1;grid-row:2}
  .top-action{grid-column:2;grid-row:1;align-self:center}
  .content{padding-top:12px}
  .hero-home{min-height:auto;padding-top:10px}
  .home-left{padding:22px}
  .home-title{font-size:58px;letter-spacing:-2px}
  .home-sub{font-size:22px}
  .status-row{justify-content:stretch;display:grid;grid-template-columns:repeat(3,1fr)}
  .status-pill{min-width:0}
  .profile-layout,.money-layout{gap:18px}
  .character-stage{min-height:410px}
  .character-stage img{max-height:400px}
}

@media(max-width:720px){
  .topbar{grid-template-columns:1fr auto}
  .content{padding:8px 12px 26px}
  .home-left{padding:14px 4px 20px}
  .home-title{font-size:48px;letter-spacing:-1.5px}
  .home-sub{font-size:20px;line-height:1.35}
  .page-title{margin-top:4px}
  .page-title h1,.profile-panel h1,.update-panel h1,.final-hero-copy h1{font-size:38px;letter-spacing:-1px}
  .page-title p{font-size:17px;line-height:1.35}
  .profile-panel,.flow-panel,.update-panel,.retire-panel,.report-main,.final-body{padding:18px}
  .profile-meta{display:flex;flex-wrap:wrap;justify-content:center}
  .profile-copy{font-size:18px}
  .character-stage{min-height:340px}
  .character-stage img{max-height:335px}
  .character-card img{height:250px}
  .character-card h3{font-size:25px}
  .flow-row{grid-template-columns:52px 1fr;padding:15px}
  .flow-value{font-size:34px}
  .alloc-card h3{font-size:29px}
  .alloc-status{flex-direction:column;gap:5px;text-align:center;font-size:19px}
  .actions{display:grid;grid-template-columns:1fr;width:100%}
  .actions .btn{width:100%}
  .status-row{grid-template-columns:1fr}
  .invest-highlight .amount{font-size:48px}
  .pause h2{font-size:32px}
  .metrics{grid-template-columns:1fr}
  .strategy-grid,.journey-grid{grid-template-columns:1fr}
  .lifestyle{font-size:34px}
  .ret-card .num{font-size:31px}
  .age-tabs{gap:7px}
  .age-tab{font-size:16px;padding:10px 6px}
  .age-card .asset{font-size:30px}
  .bar-chart{gap:12px;padding-left:12px;padding-right:12px}
  .final-total .num{font-size:48px}
  .final-hero-copy{padding:20px}
  .final-hero-art{min-height:240px}
  .final-hero-art img{max-height:250px}
}

@media(max-width:480px){
  .logo{width:135px;height:48px}
  .btn.small{padding:9px 11px;font-size:13px;min-height:44px}
  .mobile-progress{font-size:12px;padding:6px 10px}
  .home-title{font-size:44px}
  .character-card{padding:10px}
  .character-card img{height:220px}
  .money-big{font-size:44px}
  .percent{font-size:38px}
  .dollars{font-size:20px}
  .stepper{gap:6px}
  .stepper button{padding:11px 7px}
  .invest-card .stepper button{min-height:44px}
  .invest-card h3{font-size:23px}
  .final-total .num{font-size:42px}
  .keep-box{padding:14px}
}

@media print{
  .skip-link,.mobile-progress{display:none!important}
}

/* ===== Build v6: approved homepage composition refinement only ===== */
@media(min-width:1101px){
  .topbar{height:86px;grid-template-columns:240px 1fr 150px;padding:8px 30px 6px}
  .logo{width:215px;height:68px}
  .content{max-width:1600px;padding:0 34px 24px}
  .hero-home{
    min-height:calc(100vh - 110px);
    height:auto;
    grid-template-columns:minmax(500px,.88fr) minmax(690px,1.12fr);
    align-items:center;
    gap:10px;
    margin-top:-4px;
  }
  .home-left{padding:6px 10px 24px 34px;align-self:center}
  .home-title{font-size:clamp(72px,5vw,88px)}
  .home-sub{font-size:clamp(22px,1.55vw,27px);max-width:690px;line-height:1.33}
  .character-collage{
    position:relative;
    height:min(650px,calc(100vh - 118px));
    min-height:545px;
    align-self:center;
    overflow:visible;
    margin-top:-8px;
  }
  .hero-character{
    position:absolute;
    bottom:0;
    width:28%;
    height:100%;
    overflow:hidden;
    filter:drop-shadow(0 14px 14px rgba(5,46,79,.14));
    pointer-events:none;
  }
  .hero-character img{
    position:absolute;
    left:50%;
    bottom:-8.7%;
    width:100%;
    height:auto;
    max-height:none;
    object-fit:contain;
    transform:translateX(-50%);
    filter:none;
  }
  .hero-taylor{left:-2%;z-index:2;transform:scale(.96);transform-origin:bottom center}
  .hero-sabrina{left:13.5%;z-index:5;transform:scale(1.01);transform-origin:bottom center}
  .hero-scrooge{left:29%;z-index:3;transform:scale(.94);transform-origin:bottom center}
  .hero-strange{left:44.5%;z-index:4;transform:scale(.96);transform-origin:bottom center}
  .hero-darth{left:60%;z-index:6;transform:scale(1.02);transform-origin:bottom center}
  .hero-lady{left:75.5%;z-index:1;transform:scale(.95);transform-origin:bottom center}
}

@media(min-width:1101px) and (max-height:820px){
  .topbar{height:80px}
  .logo{width:205px;height:62px}
  .content{padding-top:0}
  .hero-home{min-height:calc(100vh - 94px)}
  .character-collage{height:calc(100vh - 104px);min-height:500px;max-height:620px;margin-top:-18px}
  .home-left{padding-top:0;padding-bottom:8px}
  .home-title{font-size:72px}
  .home-sub{font-size:22px;margin:16px 0 20px}
}


/* ===== Build v6.1: live homepage correction after 100% browser QA ===== */
@media(min-width:1101px){
  .topbar{grid-template-columns:285px 1fr 150px;padding-left:30px}
  .logo{width:258px;height:80px}
  .hero-home{
    min-height:calc(100vh - 94px);
    grid-template-columns:minmax(455px,.76fr) minmax(760px,1.24fr);
    gap:4px;
    margin-top:-18px;
  }
  .home-left{padding:0 8px 10px 34px;align-self:center;max-width:650px}
  .home-kicker{font-size:18px;padding:9px 16px;margin-bottom:16px}
  .home-sub{
    font-size:clamp(29px,2vw,36px);
    line-height:1.25;
    max-width:640px;
    margin:0 0 28px;
    color:#173f5d;
  }
  .home-actions{flex-wrap:nowrap;align-items:center}
  .home-actions .btn{white-space:nowrap}
  .character-collage{
    height:min(650px,calc(100vh - 102px));
    min-height:520px;
    margin-top:-12px;
    overflow:visible;
  }
  .hero-character{width:25.5%;height:100%;overflow:visible}
  .hero-character img{
    left:50%;
    bottom:-5.5%;
    width:100%;
    max-height:100%;
    transform:translateX(-50%);
  }
  .hero-taylor{left:-1%;z-index:3;transform:scale(.93);transform-origin:bottom center}
  .hero-sabrina{left:14.5%;z-index:6;transform:scale(1.00);transform-origin:bottom center}
  .hero-scrooge{left:30%;z-index:4;transform:scale(.94);transform-origin:bottom center}
  .hero-strange{left:45.5%;z-index:5;transform:scale(.96);transform-origin:bottom center}
  .hero-darth{left:61%;z-index:7;transform:scale(1.01);transform-origin:bottom center}
  .hero-lady{left:76.5%;z-index:2;transform:scale(.94);transform-origin:bottom center}
}

@media(min-width:1101px) and (max-height:820px){
  .topbar{height:82px;grid-template-columns:265px 1fr 130px}
  .logo{width:240px;height:72px}
  .hero-home{min-height:calc(100vh - 86px);margin-top:-16px}
  .home-left{padding-bottom:0}
  .home-kicker{font-size:16px;margin-bottom:13px}
  .home-sub{font-size:clamp(25px,1.8vw,31px);margin-bottom:22px;max-width:600px}
  .home-actions .btn.primary{font-size:18px;padding:13px 18px}
  .home-actions .btn.secondary{padding:13px 18px}
  .character-collage{height:calc(100vh - 94px);min-height:490px;max-height:610px;margin-top:-14px}
}

/* ===== Build v6.2: approved homepage polish =====
   Scope: homepage desktop composition only. No financial logic or other screens changed. */
@media(min-width:1101px){
  /* Larger brand mark now that the duplicate hero wordmark has been removed. */
  .topbar{
    height:118px;
    grid-template-columns:390px 1fr 130px;
    padding:6px 34px 4px 34px;
    gap:10px;
    align-items:start;
  }
  .logo{
    width:350px;
    height:112px;
    object-fit:contain;
    object-position:left top;
    filter:drop-shadow(0 5px 9px rgba(5,46,79,.13));
  }

  /* Slightly larger stage icons while keeping them clearly secondary to the logo. */
  .progress{
    padding-top:4px;
    gap:12px;
    align-items:flex-start;
  }
  .stage{
    min-width:122px;
    font-size:14px;
    gap:5px;
  }
  .stage .bubble{
    width:58px;
    height:58px;
    border-width:4px;
    font-size:27px;
  }
  .stage-line{
    width:54px;
    height:8px;
    margin-top:25px;
  }
  .stage.active .bubble{box-shadow:0 0 0 7px rgba(232,160,23,.12)}

  .content{
    max-width:1660px;
    padding:0 26px 0;
  }
  .hero-home{
    min-height:calc(100vh - 118px);
    height:calc(100vh - 118px);
    grid-template-columns:minmax(540px,.82fr) minmax(850px,1.18fr);
    gap:0;
    margin-top:-2px;
    align-items:center;
    overflow:hidden;
  }
  .home-left{
    align-self:center;
    padding:0 8px 26px 34px;
    max-width:690px;
    transform:translateY(-28px);
  }
  .home-kicker{
    font-size:20px;
    padding:10px 18px;
    margin-bottom:18px;
  }
  .home-sub{
    font-size:clamp(29px,1.95vw,35px);
    line-height:1.23;
    max-width:650px;
    margin:0 0 30px;
  }
  .home-actions{gap:16px;flex-wrap:nowrap}
  .home-actions .btn{white-space:nowrap}
  .home-actions .btn.primary{font-size:20px;padding:15px 22px}
  .home-actions .btn.secondary{font-size:18px;padding:15px 21px}

  /* Six-character ensemble: larger, tighter, higher, and cropped above embedded name plaques. */
  .character-collage{
    position:relative;
    height:min(650px,calc(100vh - 145px));
    min-height:565px;
    max-height:665px;
    align-self:center;
    overflow:visible;
    margin-top:-88px;
    transform:translateY(-2px);
  }
  .hero-character{
    position:absolute;
    bottom:0;
    width:27%;
    height:100%;
    overflow:hidden;
    pointer-events:none;
    filter:drop-shadow(0 14px 14px rgba(5,46,79,.14));
  }
  .hero-character img{
    position:absolute;
    left:50%;
    bottom:-8.5%;
    width:100%;
    height:auto;
    max-height:108%;
    object-fit:contain;
    transform:translateX(-50%);
    filter:none;
  }
  .hero-taylor{left:-1.5%;z-index:4;transform:scale(1.02);transform-origin:bottom center}
  .hero-sabrina{left:13.3%;z-index:7;transform:scale(1.07);transform-origin:bottom center}
  .hero-scrooge{left:28.3%;z-index:5;transform:scale(1.02);transform-origin:bottom center}
  .hero-strange{left:43.2%;z-index:6;transform:scale(1.04);transform-origin:bottom center}
  .hero-darth{left:58.2%;z-index:8;transform:scale(1.08);transform-origin:bottom center}
  .hero-lady{left:73.2%;z-index:3;transform:scale(1.04);transform-origin:bottom center}
}

@media(min-width:1101px) and (max-height:820px){
  .topbar{height:106px;grid-template-columns:350px 1fr 115px;padding-top:4px}
  .logo{width:320px;height:100px}
  .stage{min-width:108px;font-size:13px}
  .stage .bubble{width:54px;height:54px;font-size:25px}
  .stage-line{width:46px;margin-top:23px}
  .hero-home{
    min-height:calc(100vh - 106px);
    height:calc(100vh - 106px);
    grid-template-columns:minmax(500px,.82fr) minmax(770px,1.18fr);
  }
  .home-left{transform:translateY(-18px);padding-left:24px;max-width:620px}
  .home-kicker{font-size:17px;margin-bottom:14px}
  .home-sub{font-size:clamp(24px,1.75vw,29px);line-height:1.25;max-width:590px;margin-bottom:22px}
  .home-actions .btn.primary{font-size:18px;padding:13px 18px}
  .home-actions .btn.secondary{font-size:17px;padding:13px 18px}
  .character-collage{
    height:calc(100vh - 132px);
    min-height:515px;
    max-height:600px;
    margin-top:-72px;
  }
  .hero-character{width:26.8%}
  .hero-character img{bottom:-9%;max-height:108%}
}

/* ===== Build v6.3: approved homepage scale and overlap refinement =====
   Scope: homepage desktop composition only. No financial logic or other screens changed. */
@media(min-width:1101px){
  /* The logo now carries the page branding, so it is intentionally much larger. */
  .topbar{
    grid-template-columns:560px 1fr 64px;
    height:122px;
    padding:4px 30px 2px 34px;
    overflow:visible;
    align-items:start;
  }
  .logo{
    width:535px;
    height:154px;
    object-fit:contain;
    object-position:left top;
    position:relative;
    z-index:20;
    filter:drop-shadow(0 6px 10px rgba(5,46,79,.14));
  }

  /* Preserve the slightly enlarged stage icons from v6.2. */
  .progress{padding-top:6px;gap:10px}
  .stage{min-width:116px;font-size:14px}
  .stage .bubble{width:60px;height:60px;font-size:28px}
  .stage-line{width:50px;margin-top:26px}

  .content{max-width:1720px;padding:0 18px}
  .hero-home{
    min-height:calc(100vh - 122px);
    height:calc(100vh - 122px);
    grid-template-columns:minmax(510px,.72fr) minmax(900px,1.28fr);
    gap:0;
    overflow:hidden;
    position:relative;
  }
  .home-left{
    position:relative;
    z-index:12;
    align-self:center;
    max-width:675px;
    padding:0 0 22px 34px;
    transform:translateY(-18px);
  }
  .home-kicker{font-size:20px;padding:10px 18px;margin-bottom:18px}
  .home-sub{
    font-size:clamp(29px,1.9vw,35px);
    line-height:1.23;
    max-width:655px;
    margin:0 0 28px;
    text-shadow:0 1px 0 rgba(255,255,255,.6);
  }
  .home-actions{gap:16px;flex-wrap:nowrap}
  .home-actions .btn{white-space:nowrap}

  /* Make the cast a dominant hero element and let Taylor sit slightly behind the copy. */
  .character-collage{
    position:relative;
    z-index:3;
    height:min(720px,calc(100vh - 138px));
    min-height:600px;
    max-height:725px;
    align-self:center;
    overflow:visible;
    margin-top:-104px;
    margin-left:-118px;
    width:calc(100% + 118px);
  }
  .hero-character{
    position:absolute;
    bottom:0;
    width:33%;
    height:100%;
    overflow:hidden;
    pointer-events:none;
    filter:drop-shadow(0 16px 16px rgba(5,46,79,.15));
  }
  .hero-character img{
    position:absolute;
    left:50%;
    bottom:-9.2%;
    width:100%;
    height:auto;
    max-height:116%;
    object-fit:contain;
    transform:translateX(-50%);
    filter:none;
  }
  .hero-taylor{left:-5.5%;z-index:4;transform:scale(1.08);transform-origin:bottom center}
  .hero-sabrina{left:9.5%;z-index:7;transform:scale(1.12);transform-origin:bottom center}
  .hero-scrooge{left:24.5%;z-index:5;transform:scale(1.08);transform-origin:bottom center}
  .hero-strange{left:39.5%;z-index:6;transform:scale(1.10);transform-origin:bottom center}
  .hero-darth{left:54.5%;z-index:8;transform:scale(1.14);transform-origin:bottom center}
  .hero-lady{left:69.5%;z-index:3;transform:scale(1.10);transform-origin:bottom center}
}

@media(min-width:1101px) and (max-height:820px){
  .topbar{height:112px;grid-template-columns:500px 1fr 56px;padding-top:2px}
  .logo{width:480px;height:138px}
  .progress{padding-top:4px}
  .stage{min-width:104px;font-size:13px}
  .stage .bubble{width:56px;height:56px;font-size:26px}
  .stage-line{width:44px;margin-top:24px}
  .hero-home{
    min-height:calc(100vh - 112px);
    height:calc(100vh - 112px);
    grid-template-columns:minmax(490px,.74fr) minmax(820px,1.26fr);
  }
  .home-left{max-width:620px;padding-left:24px;transform:translateY(-10px)}
  .home-kicker{font-size:17px;margin-bottom:14px}
  .home-sub{font-size:clamp(24px,1.75vw,29px);line-height:1.25;max-width:600px;margin-bottom:22px}
  .home-actions .btn.primary{font-size:18px;padding:13px 18px}
  .home-actions .btn.secondary{font-size:17px;padding:13px 18px}
  .character-collage{
    height:calc(100vh - 124px);
    min-height:520px;
    max-height:620px;
    margin-top:-86px;
    margin-left:-102px;
    width:calc(100% + 102px);
  }
  .hero-character{width:32.5%}
  .hero-character img{bottom:-9.4%;max-height:116%}
}

/* ===== Build v6.4: approved homepage alignment refinement =====
   Scope: homepage desktop composition only. No financial logic or other screens changed. */
@media(min-width:1101px){
  /* Enlarge the brand mark by roughly 75% in visible area without reintroducing a duplicate title. */
  .topbar{
    grid-template-columns:560px 1fr 20px;
    height:126px;
    padding:2px 20px 0 34px;
    overflow:visible;
    align-items:start;
  }
  .logo{
    width:620px;
    height:270px;
    object-fit:contain;
    object-position:left top;
    position:relative;
    z-index:30;
    filter:drop-shadow(0 7px 12px rgba(5,46,79,.15));
  }

  /* Anchor the entire progress sequence farther left so AGE 65 cannot clip off-screen. */
  .progress{
    justify-content:flex-start;
    padding-top:6px;
    gap:10px;
    transform:none;
    min-width:0;
  }
  .stage{min-width:112px}
  .stage-line{width:46px}

  /* Lower the copy and CTAs slightly, per live desktop QA. */
  .home-left{
    transform:translateY(32px);
  }

  /* Shift the cast slightly right while preserving the approved Taylor/copy interaction. */
  .character-collage{
    margin-left:-58px;
    width:calc(100% + 58px);
    transform:translateX(34px);
  }
}

/* Typical 1366x768 / 1600x800 classroom-laptop tuning. */
@media(min-width:1101px) and (max-height:820px){
  .topbar{
    height:116px;
    grid-template-columns:500px 1fr 16px;
    padding:0 16px 0 28px;
  }
  .logo{
    width:540px;
    height:240px;
  }
  .progress{
    justify-content:flex-start;
    padding-top:4px;
    gap:8px;
  }
  .stage{min-width:100px;font-size:13px}
  .stage .bubble{width:56px;height:56px;font-size:26px}
  .stage-line{width:40px;margin-top:24px}
  .hero-home{
    min-height:calc(100vh - 116px);
    height:calc(100vh - 116px);
  }
  .home-left{
    transform:translateY(34px);
  }
  .character-collage{
    margin-left:-46px;
    width:calc(100% + 46px);
    transform:translateX(30px);
  }
}
