.goal-page .dashboard-shell { gap: 24px; }
.goal-hero { position: relative; isolation: isolate; display: grid; grid-template-columns: minmax(0,1.45fr) minmax(270px,.65fr); gap: clamp(26px,5vw,64px); overflow: hidden; border: 1px solid var(--line); border-radius: 20px; background: linear-gradient(135deg,#f6fcfa 0%,var(--surface) 58%,#fff8e7 100%); padding: clamp(28px,5vw,60px); box-shadow: var(--shadow); }
.goal-hero::after { content:""; position:absolute; z-index:-1; width:440px; height:440px; right:-230px; bottom:-280px; border:1px solid rgba(var(--primary-green-rgb),.16); border-radius:50%; box-shadow:0 0 0 70px rgba(var(--primary-green-rgb),.035),0 0 0 140px rgba(166,106,0,.025); }
.goal-hero h1 { max-width:700px; margin:8px 0 14px; color:var(--heading); font-size:clamp(2.45rem,5vw,4.6rem); line-height:1; letter-spacing:-.05em; }
.goal-hero-lead { max-width:760px; margin:0; color:var(--text); font-size:clamp(1.08rem,2vw,1.3rem); line-height:1.65; }
.goal-hero-lead + p { max-width:670px; line-height:1.7; }
.goal-cta,.goal-calculate { display:inline-flex; align-items:center; justify-content:center; min-height:50px; border:0; border-radius:10px; background:var(--accent); color:#fff; padding:13px 20px; font-weight:800; text-decoration:none; box-shadow:0 10px 24px rgba(var(--primary-green-rgb),.2); }
.goal-cta { margin-top:18px; }
.goal-hero-visual { align-self:center; display:grid; gap:8px; border:1px solid rgba(var(--primary-green-rgb),.18); border-radius:18px; background:rgba(255,255,255,.78); padding:24px; box-shadow:var(--small-shadow); }
.goal-hero-visual span { color:var(--muted); font-size:.72rem; font-weight:900; letter-spacing:.13em; }
.goal-hero-visual strong { color:var(--heading); font-size:1.7rem; }
.goal-hero-visual i { position:relative; width:3px; height:32px; margin:3px 0 3px 12px; background:linear-gradient(var(--accent),var(--gold)); }
.goal-hero-visual i::after { content:""; position:absolute; left:50%; bottom:-2px; width:9px; height:9px; transform:translateX(-50%) rotate(45deg); border-right:2px solid var(--gold); border-bottom:2px solid var(--gold); }
.goal-hero-visual small { margin-top:10px; color:var(--muted); line-height:1.45; }

.goal-calculator,.goal-guide { width:min(100%,var(--page-container-max)); }
.goal-calculator { border:1px solid var(--line); border-radius:20px; background:var(--surface); padding:clamp(20px,4vw,42px); box-shadow:var(--shadow); }
.goal-calculator-heading { max-width:780px; margin-bottom:24px; }
.goal-calculator-heading h2,.goal-results-heading h2 { margin:5px 0 8px; color:var(--heading); font-size:clamp(1.55rem,3vw,2.25rem); }
.goal-calculator-heading p:last-child { margin:0; line-height:1.65; }
.goal-form { border:1px solid var(--line); border-radius:16px; background:linear-gradient(180deg,var(--surface-tint),var(--surface)); padding:clamp(18px,3vw,28px); }
.goal-form-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:20px; }
.goal-form .field { min-width:0; }
.goal-form label { color:var(--heading); font-size:.9rem; font-weight:800; }
.goal-form label > span { color:var(--muted); font-size:.78rem; font-weight:600; }
.goal-form .input-wrap { margin-top:8px; border:1px solid var(--line); border-radius:10px; background:var(--surface); }
.goal-name-field { grid-column:1/-1; }
.goal-name-field .input-wrap { max-width:620px; }
.goal-presets { display:flex; flex-wrap:wrap; gap:6px; margin-top:8px; }
.goal-presets button { min-height:31px; border:1px solid var(--line); border-radius:999px; background:var(--surface); color:var(--muted); padding:5px 11px; font-size:.77rem; font-weight:750; }
.goal-presets button:hover { border-color:var(--active-border); color:var(--accent-dark); }
.field-hint { display:block; margin-top:6px; color:var(--muted); }
.goal-form-message { display:none; margin:16px 0 0; border-radius:8px; background:#fff2ef; color:var(--danger); padding:10px 12px; }
.goal-form-message:not(:empty) { display:block; }
.goal-calculate { width:100%; margin-top:22px; font-size:1rem; }
.goal-calculate span { margin-left:8px; font-size:1.25rem; }

.goal-results { display:grid; gap:22px; margin-top:36px; scroll-margin-top:20px; }
.goal-results[hidden] { display:none; }
.goal-results-heading { display:flex; align-items:end; justify-content:space-between; gap:18px; }
.goal-results-heading p,.goal-results-heading h2 { margin-bottom:0; }
.goal-results-heading > span { flex:0 0 auto; max-width:260px; overflow:hidden; border:1px solid rgba(var(--primary-green-rgb),.18); border-radius:999px; background:var(--accent-soft); color:var(--accent-dark); padding:8px 13px; font-size:.8rem; font-weight:800; text-overflow:ellipsis; white-space:nowrap; }
.goal-dashboard { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; }
.goal-metric { min-width:0; border:1px solid var(--line); border-radius:14px; background:var(--surface); padding:19px; box-shadow:var(--small-shadow); }
.goal-metric > span,.goal-metric > strong,.goal-metric > small { display:block; }
.goal-metric > span { color:var(--muted); font-size:.8rem; font-weight:750; line-height:1.35; }
.goal-metric > strong { overflow-wrap:anywhere; margin:8px 0 5px; color:var(--heading); font-size:clamp(1.3rem,2.4vw,1.85rem); letter-spacing:-.03em; }
.goal-metric > small { color:var(--muted); line-height:1.4; }
.goal-primary { border-color:rgba(var(--primary-green-rgb),.25); background:linear-gradient(145deg,var(--accent-soft),var(--surface)); }
.goal-primary > strong,.goal-sip > strong { color:var(--accent-dark); }
.goal-sip { border-color:rgba(166,106,0,.22); background:linear-gradient(145deg,var(--gold-soft),var(--surface)); }
.goal-metric.is-surplus { border-color:rgba(var(--primary-green-rgb),.28); background:var(--accent-soft); }
.goal-metric.is-gap > strong { color:var(--gold); }

.goal-journey { border:1px solid var(--line); border-radius:16px; background:linear-gradient(115deg,#f2faf7,var(--surface) 65%,#fff8e7); padding:clamp(20px,3vw,30px); }
.goal-journey-heading { display:flex; align-items:end; justify-content:space-between; gap:20px; }
.goal-journey-heading h3,.goal-journey-heading p { margin:0; }
.goal-journey-heading h3 { color:var(--heading); font-size:1.4rem; }
.goal-journey-heading > p { max-width:520px; text-align:right; line-height:1.55; }
.journey-steps { display:grid; grid-template-columns:repeat(7,auto); align-items:center; justify-content:space-between; gap:8px; margin-top:26px; }
.journey-steps article { min-width:0; }
.journey-steps i { display:grid; width:26px; height:26px; place-items:center; border-radius:50%; background:var(--accent-soft); color:var(--accent-dark); font-size:.72rem; font-style:normal; font-weight:900; }
.journey-steps span,.journey-steps strong { display:block; }
.journey-steps span { margin-top:8px; color:var(--muted); font-size:.76rem; }
.journey-steps strong { overflow-wrap:anywhere; margin-top:3px; color:var(--heading); font-size:1rem; }
.journey-steps b { color:var(--active-border); font-size:1.35rem; }
.goal-progress { overflow:hidden; height:11px; margin-top:24px; border-radius:999px; background:#dce6e2; }
.goal-progress span { display:block; width:0; height:100%; border-radius:inherit; background:linear-gradient(90deg,var(--accent),#57ad98); transition:width .45s ease; }
.goal-progress-labels { display:flex; justify-content:space-between; gap:12px; margin-top:8px; color:var(--muted); font-size:.76rem; }
.goal-progress-labels strong { color:var(--accent-dark); }
.planned-sip-note { margin-top:18px; border:1px dashed var(--active-border); border-radius:10px; background:rgba(var(--soft-green-rgb),.4); padding:13px 15px; line-height:1.6; }
.goal-meaning { display:grid; grid-template-columns:auto 1fr; gap:18px; align-items:start; border:1px solid rgba(166,106,0,.2); border-left:5px solid var(--gold); border-radius:14px; background:var(--gold-soft); padding:clamp(20px,3vw,28px); }
.goal-meaning-mark { display:grid; width:46px; height:46px; place-items:center; border-radius:50%; background:var(--surface); color:var(--gold); font-size:1.45rem; }
.goal-meaning h3 { margin:4px 0 8px; color:var(--heading); }
.goal-meaning p:last-child { max-width:900px; margin:0; line-height:1.7; }
.goal-comparison { min-width:0; border:1px solid var(--line); border-radius:16px; padding:clamp(16px,3vw,24px); }
.goal-comparison > div:first-child { display:flex; align-items:end; justify-content:space-between; gap:18px; margin-bottom:16px; }
.goal-comparison h3,.goal-comparison p { margin:0; }
.goal-comparison h3 { color:var(--heading); }
.goal-comparison p { max-width:430px; text-align:right; }
.goal-comparison table { min-width:760px; }
.goal-trust { margin:0; border:1px solid rgba(var(--primary-green-rgb),.14); border-radius:10px; background:rgba(var(--soft-green-rgb),.4); padding:14px 16px; font-size:.9rem; line-height:1.6; }

.goal-guide { border:1px solid var(--line); border-radius:20px; background:var(--surface); padding:clamp(24px,5vw,50px); box-shadow:var(--shadow); }
.goal-guide > h2 { max-width:850px; margin:42px 0 12px; color:var(--heading); font-size:clamp(1.5rem,3vw,2.1rem); }
.goal-guide > h2:first-of-type { margin-top:8px; }
.goal-guide > p { max-width:920px; line-height:1.75; }
.goal-guide a { color:var(--accent-dark); font-weight:700; }
.goal-guide p a { display:inline-block; padding:2px 0; }
.goal-explain-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; margin:20px 0; }
.goal-explain-grid article { border:1px solid var(--line); border-radius:14px; background:var(--surface-tint); padding:22px; }
.goal-explain-grid h3 { margin:7px 0; color:var(--heading); }
.goal-explain-grid p:last-child { margin:0; line-height:1.6; }
.goal-formulas { display:grid; gap:10px; margin:20px 0 28px; }
.goal-formulas article { display:grid; grid-template-columns:auto minmax(0,1fr); gap:15px; align-items:start; border:1px solid var(--line); border-radius:12px; background:var(--surface-tint); padding:18px; }
.goal-formulas article > span { display:grid; width:30px; height:30px; place-items:center; border-radius:50%; background:var(--accent-soft); color:var(--accent-dark); font-size:.78rem; font-weight:900; }
.goal-formulas h3 { margin:2px 0 9px; color:var(--heading); font-size:1rem; }
.goal-formulas code { display:block; overflow-wrap:anywhere; border:1px solid rgba(var(--primary-green-rgb),.12); border-radius:8px; background:var(--surface); color:var(--accent-dark); padding:10px 12px; font-size:.88rem; line-height:1.55; }
.goal-formulas p { margin:9px 0 0; line-height:1.6; }
.goal-types { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; }
.goal-types article { border:1px solid var(--line); border-radius:12px; background:var(--surface-tint); padding:18px; }
.goal-types h3 { margin:0 0 7px; color:var(--heading); }
.goal-types p { margin:0; line-height:1.6; }
.goal-next-step { margin-top:34px; border:1px solid rgba(var(--primary-green-rgb),.2); border-radius:16px; background:var(--accent-soft); padding:clamp(20px,3vw,28px); }
.goal-next-step h2 { margin:0 0 8px; color:var(--heading); }
.goal-next-step p { margin:0; line-height:1.7; }
.goal-guide .content-grid { margin-top:16px; }

:root[data-theme="dark"] .goal-hero { background:linear-gradient(135deg,#12362f,var(--surface) 58%,#342913); }
:root[data-theme="dark"] .goal-hero-visual,:root[data-theme="dark"] .goal-metric { background:rgba(18,48,44,.9); }
:root[data-theme="dark"] .goal-journey { background:linear-gradient(115deg,#123a34,var(--surface) 65%,#332a15); }
:root[data-theme="dark"] .goal-form .input-wrap,:root[data-theme="dark"] .goal-presets button { background:var(--surface); }
@media (max-width:900px) { .goal-hero { grid-template-columns:1fr; } .goal-hero-visual { max-width:520px; } .goal-dashboard { grid-template-columns:repeat(2,minmax(0,1fr)); } .goal-types { grid-template-columns:repeat(2,minmax(0,1fr)); } .journey-steps { grid-template-columns:1fr; align-items:start; } .journey-steps b { transform:rotate(90deg); transform-origin:left center; margin-left:10px; } }
@media (max-width:680px) { .goal-hero,.goal-calculator,.goal-guide { border-radius:14px; } .goal-form-grid,.goal-explain-grid,.goal-types { grid-template-columns:1fr; } .goal-name-field { grid-column:auto; } .goal-results-heading,.goal-journey-heading,.goal-comparison > div:first-child { align-items:start; flex-direction:column; } .goal-journey-heading > p,.goal-comparison p { text-align:left; } }
@media (max-width:460px) { .goal-hero h1 { font-size:2.45rem; } .goal-dashboard { grid-template-columns:1fr; } .goal-metric { padding:16px; } .goal-meaning { grid-template-columns:1fr; } }
