/* V3.6-UX2 — one coherent calculator style; brand fonts remain self-hosted. */
#ruhestand{--rp-muted:#52635f;--rp-line:#d6e1dd;--rp-soft:#f2f6f4;--rp-accent:#0f6b66;padding:clamp(48px,7vw,96px) 0;border-top:1px solid var(--rp-line);font-family:var(--f-body);font-size:1rem;line-height:1.6;font-synthesis:none}
#ruhestand [hidden]{display:none!important}
#ruhestand h2{max-width:26ch;margin:12px 0 16px;font-family:var(--f-display);font-weight:600;line-height:1.15}
#ruhestand h3,#ruhestand h4{font-family:var(--f-display);font-weight:600;letter-spacing:-.015em;line-height:1.35;color:var(--ink,#12171b)}
#ruhestand h3{font-size:1.25rem;margin:0 0 16px}
#ruhestand h4{font-size:1.125rem;margin:0 0 16px}
#ruhestand strong,#ruhestand b{font-weight:600}
#ruhestand .rp-intro{max-width:68ch;margin:0 0 32px;color:var(--rp-muted);font-size:1rem;line-height:1.6}
#ruhestand .rp-shell{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:24px;align-items:start}
#ruhestand .rp-panel{min-width:0;padding:clamp(20px,2.5vw,32px);border:1px solid var(--rp-line);border-radius:8px;background:#fff;box-shadow:none}
#ruhestand .rp-panel-intro{margin:-4px 0 24px;color:var(--rp-muted);font-size:1rem;line-height:1.6}
#ruhestand .rp-group,#ruhestand .rp-section{padding-top:24px;margin-top:24px;border-top:1px solid var(--rp-line)}
#ruhestand .rp-group:first-of-type{padding-top:0;margin-top:0;border-top:0}
#ruhestand .rp-field{min-width:0;margin:0 0 24px}
#ruhestand .rp-label{display:flex;align-items:baseline;justify-content:space-between;gap:16px;margin-bottom:8px;font-size:1rem;font-weight:500;line-height:1.5}
#ruhestand .rp-label label{font-weight:500}
#ruhestand .rp-val{font-family:var(--f-body);font-size:1rem;font-weight:600;color:var(--rp-accent);font-variant-numeric:tabular-nums;white-space:nowrap}
#ruhestand .rp-small{display:block;margin:0 0 8px;font-size:1rem;font-weight:400;line-height:1.5;color:var(--rp-muted)}
#ruhestand label.rp-small{color:var(--ink,#12171b);font-weight:500}
#ruhestand input[data-number],#ruhestand input[type=date]{width:100%;min-width:0;box-sizing:border-box;min-height:48px;padding:11px 12px;border:1px solid #71877f;border-radius:6px;background:#fff;color:#172b29;font:400 1rem/1.5 var(--f-body);font-variant-numeric:tabular-nums}
#ruhestand input[type=range]{width:100%;height:48px;margin:0;accent-color:var(--rp-accent);cursor:pointer}
#ruhestand input:focus-visible,#ruhestand summary:focus-visible{outline:3px solid var(--rp-accent);outline-offset:3px}
#ruhestand .rp-row{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;align-items:stretch}
#ruhestand .rp-row.three{grid-template-columns:repeat(3,minmax(0,1fr))}
#ruhestand .rp-row>.rp-field{display:flex;flex-direction:column}
#ruhestand .rp-row>.rp-field>.rp-small,#ruhestand .rp-row>.rp-field>.rp-label{min-height:3em;display:flex;align-items:flex-end}
#ruhestand .rp-row>p{grid-column:1/-1;margin:0 0 24px}
@supports(grid-template-rows:subgrid){
 #ruhestand .rp-row>.rp-field{display:grid;grid-template-rows:subgrid;grid-row:span 3;row-gap:0}
 #ruhestand .rp-row>.rp-field>.rp-small,#ruhestand .rp-row>.rp-field>.rp-label{min-height:0}
 #ruhestand .rp-row>.rp-field>input{align-self:start}
}
#ruhestand .rp-note,#ruhestand .rp-legal,#ruhestand .rp-eligibility,#ruhestand .rp-assumption{font-size:1rem;line-height:1.6;color:var(--rp-muted)}
#ruhestand .rp-note{margin:8px 0 0}
#ruhestand .rp-legal{margin:16px 0 0}
#ruhestand .rp-eligibility{margin:0 0 24px;padding:12px 0 0;border-top:1px solid var(--rp-line)}
#ruhestand .rp-eligibility:empty{display:none}
#ruhestand .rp-eligibility>strong,#ruhestand .rp-eligibility>span{display:block;font-size:1rem}
#ruhestand .rp-eligibility>strong{font-weight:500;color:var(--rp-muted)}
#ruhestand .rp-eligibility>span{margin-top:4px}
#ruhestand .rp-assumption{padding:0 0 0 12px;margin:12px 0 0;border-left:2px solid #a7c8bd;background:transparent}
#ruhestand .rp-check{display:flex;align-items:flex-start;gap:12px;min-height:48px;padding:12px 0;margin:0;font-size:1rem;font-weight:500;line-height:1.5;cursor:pointer}
#ruhestand .rp-check input{flex:0 0 auto;width:24px;height:24px;margin:0;accent-color:var(--rp-accent)}
#ruhestand .rp-details{padding:0;border-top:1px solid var(--rp-line)}
#ruhestand .rp-details summary,#ruhestand .rp-edu-faq summary{box-sizing:border-box;min-height:48px;padding:12px 0;font:500 1rem/1.5 var(--f-body);cursor:pointer}
#ruhestand .rp-details[open]>summary{margin-bottom:12px}
#ruhestand .rp-optimize{margin:24px 0 0;padding-top:24px;border-top:1px solid var(--rp-line)}
#ruhestand .rp-optimize-button{display:inline-flex;align-items:center;justify-content:center;max-width:100%;min-height:48px;box-sizing:border-box;padding:12px 20px;border:1px solid var(--rp-accent);border-radius:6px;background:var(--rp-accent);color:#fff;font:600 1rem/1.5 var(--f-body);text-align:center;cursor:pointer;transition:background .16s}
#ruhestand .rp-optimize-button:hover{background:#0a4f4b}
#ruhestand .rp-optimize-button:focus-visible{outline:3px solid #0a4f4b;outline-offset:3px}
#ruhestand .rp-optimize-button:disabled,#ruhestand .rp-optimize-button:disabled:hover{background:#677c77;border-color:#677c77;cursor:not-allowed}
#ruhestand .rp-optimize-message{margin:12px 0 0;font-size:1rem;font-weight:400;line-height:1.6;color:var(--rp-muted)}
#ruhestand .rp-optimize-message[data-state=changed]{padding:10px 12px;border:0;border-left:2px solid var(--rp-accent);border-radius:0;background:var(--rp-soft);color:#33564b;font-weight:500}
#ruhestand .rp-optimize-message[data-state=invalid],#ruhestand .rp-optimize-message[data-state=failed]{padding:12px;border:1px solid #dba99e;border-radius:6px;background:#fff2ef;color:#842f22}
#ruhestand .rp-optimize-result{margin:16px 0 0;padding:16px;border:1px solid var(--rp-line);border-top:3px solid var(--rp-accent);border-radius:6px;background:#fff;color:var(--ink,#12171b)}
#ruhestand .rp-optimize-result>strong{display:block;margin-bottom:8px;font-size:1.125rem}
#ruhestand .rp-optimize-values{display:grid;grid-template-columns:minmax(0,1fr)}
#ruhestand .rp-optimize-values>div{display:flex;flex-wrap:wrap;align-items:baseline;justify-content:space-between;gap:8px 16px;padding:12px 0;border-bottom:1px solid var(--rp-line)}
#ruhestand .rp-optimize-values>div:last-child{border-bottom:0}
#ruhestand .rp-optimize-values span{font-size:1rem;line-height:1.5;color:var(--rp-muted)}
#ruhestand .rp-optimize-values strong{margin-left:auto;font-size:1.25rem;font-weight:600;color:var(--rp-accent);font-variant-numeric:tabular-nums}
#ruhestand .rp-optimize-result p{margin:12px 0 0;font-size:1rem;line-height:1.6;color:var(--rp-muted)}
#ruhestand .rp-status{margin:0 0 24px;font-size:1rem;line-height:1.6;color:var(--rp-muted)}
#ruhestand .rp-status[data-state=invalid],#ruhestand .rp-field-error{padding:12px;border:1px solid #dba99e;border-left:3px solid #a43c2b;border-radius:6px;background:#fff2ef;color:#842f22;font-size:1rem;line-height:1.5}
#ruhestand .rp-field-error{margin:8px 0 0;font-weight:400;overflow-wrap:anywhere}
#ruhestand input[aria-invalid=true]{border-color:#a43c2b;outline:2px solid #a43c2b;outline-offset:2px}
#ruhestand .rp-warning{margin:16px 0 0;padding:12px;border:1px solid #d6bd8c;border-radius:6px;background:#fff7e9;color:#66491c;font-size:1rem;line-height:1.6}
#ruhestand .rp-kpis{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;margin-bottom:24px;align-items:stretch}
#ruhestand .rp-kpi{display:flex;flex-direction:column;align-items:flex-start;gap:8px;min-width:0;padding:16px;background:var(--rp-soft);border-radius:6px}
#ruhestand .rp-kpi.primary{grid-column:1/-1;padding:24px;background:var(--rp-accent);color:#fff}
#ruhestand .rp-kpi span,#ruhestand .rp-kpi small{font-size:1rem;line-height:1.5;opacity:1}
#ruhestand .rp-kpi span{color:var(--rp-muted)}
#ruhestand .rp-kpi strong{max-width:100%;font:600 clamp(1.5rem,2.5vw,2rem)/1.2 var(--f-body);letter-spacing:-.02em;overflow-wrap:anywhere;font-variant-numeric:tabular-nums}
#ruhestand .rp-kpi.primary strong{font-size:clamp(2rem,4vw,2.75rem)}
#ruhestand .rp-kpi.primary span,#ruhestand .rp-kpi.primary strong,#ruhestand .rp-kpi.primary small{color:#fff}
#ruhestand .rp-kpi small{margin-top:auto;color:var(--rp-muted)}
/* Paired labels share their height so the amounts sit on one baseline. */
#ruhestand .rp-kpi:not(.primary)>span{min-height:3em}
@supports(grid-template-rows:subgrid){
 #ruhestand .rp-kpi:not(.primary){display:grid;grid-row:span 4;grid-template-rows:subgrid;row-gap:8px;align-items:start}
 #ruhestand .rp-kpi:not(.primary)>span{min-height:0}
 #ruhestand .rp-kpi:not(.primary)>small{margin-top:0}
}
#ruhestand .rp-chart{display:block;width:100%;height:230px}
#ruhestand .rp-chartbox{margin-top:24px;padding:16px;border:1px solid var(--rp-line);border-radius:6px}
#ruhestand .rp-charttitle{margin-bottom:12px;font-size:1rem;font-weight:600;line-height:1.5}
#ruhestand .rp-chartnote{margin:8px 0 0;font-size:.875rem;line-height:1.5;color:var(--rp-muted)}
#ruhestand .rp-legend{display:flex;flex-wrap:wrap;gap:8px 16px;margin-top:12px;font-size:1rem;line-height:1.5;color:var(--rp-muted)}
#ruhestand .rp-dot{display:inline-block;width:9px;height:9px;margin-right:6px;border-radius:50%}
#ruhestand .rp-pair{display:flex;flex-wrap:wrap;justify-content:space-between;gap:8px 16px;padding:12px 0;border-bottom:1px solid var(--rp-line);font-size:1rem;line-height:1.5}
#ruhestand .rp-pair strong{max-width:100%;margin-left:auto;text-align:right;overflow-wrap:anywhere;font-variant-numeric:tabular-nums}
#ruhestand #rp-reserve-sub{margin:8px 0 16px;padding:0;color:var(--rp-muted);font-weight:400;background:transparent}
#ruhestand .rp-model-note{margin-top:32px;padding-top:24px;border-top:1px solid var(--rp-line)}
#ruhestand .rp-model-note .rp-note{margin-top:0}
#ruhestand .rp-donuts{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px;margin-top:16px}
#ruhestand .rp-donut-item{min-width:0;text-align:center;display:grid;grid-template-rows:auto auto auto repeat(3,auto) auto;gap:8px;align-content:start}
#ruhestand .rp-donut-title{min-height:3em;font-size:1rem;font-weight:500;line-height:1.5}
#ruhestand .rp-donut-ring{position:relative;display:grid;place-items:center;width:min(100%,170px);aspect-ratio:1;margin:8px auto;border-radius:50%}
#ruhestand .rp-donut-ring:before{content:'';position:absolute;inset:16%;border-radius:50%;background:#fff}
#ruhestand .rp-donut-center{position:relative;z-index:1;font-size:1rem;font-weight:600;font-variant-numeric:tabular-nums;letter-spacing:-.02em}
#ruhestand .rp-donut-average{font-size:1rem;line-height:1.5;color:var(--rp-muted);margin:0}
#ruhestand .rp-donut-values{display:contents;margin:0}
#ruhestand .rp-donut-values>div{padding:8px 0;border-bottom:1px solid var(--rp-line)}
#ruhestand .rp-donut-values dt{font-size:1rem;line-height:1.5;color:var(--rp-muted)}
#ruhestand .rp-donut-values dd{margin:4px 0 0;font-size:1rem;line-height:1.5;font-weight:600;font-variant-numeric:tabular-nums;color:var(--ink);overflow-wrap:anywhere}
#ruhestand .rp-donut-surplus{margin:0;font-size:.875rem;line-height:1.5;color:var(--rp-muted)}
@supports(grid-template-rows:subgrid){#ruhestand .rp-donut-item{grid-template-rows:subgrid;grid-row:span 7}}
#ruhestand .rp-pension-help{margin-top:0}
#ruhestand .rp-pension-help h5{font:600 1rem/1.4 var(--f-body);margin:20px 0 8px}
#ruhestand .rp-pension-help p{margin:8px 0 16px;color:var(--rp-muted)}
#ruhestand .rp-pension-helper-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;margin:16px 0}
#ruhestand .rp-pension-helper-fields label{display:block;margin-bottom:8px}
#ruhestand .rp-pension-helper-fields input{width:100%;min-width:0;min-height:48px;padding:11px 12px;border:1px solid #71877f;border-radius:6px;font:inherit;box-sizing:border-box}
#ruhestand .rp-pension-estimate{display:flex;align-items:baseline;justify-content:space-between;flex-wrap:wrap;gap:8px 16px;padding:16px 0;border-top:1px solid var(--rp-line)}
#ruhestand .rp-pension-estimate output{font-weight:600;font-size:1.25rem;color:var(--rp-accent);font-variant-numeric:tabular-nums}
#ruhestand .rp-pension-help button:disabled{opacity:.55;cursor:default}
#ruhestand .rp-pension-help-message:empty{display:none}
/* Educational content follows the same roles and retains all model caveats. */
#ruhestand .rp-education{margin:0 0 40px}
#ruhestand .rp-edu-heading{max-width:70ch;margin-bottom:24px}
#ruhestand .rp-edu-heading h3{font-size:1.5rem;margin:8px 0 16px}
#ruhestand .rp-edu-heading p,#ruhestand .rp-edu-card p,#ruhestand .rp-edu-faq p,#ruhestand .rp-tax-demo p{font-size:1rem;line-height:1.6;color:var(--rp-muted)}
#ruhestand .rp-edu-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:24px}
#ruhestand .rp-edu-card{min-width:0;padding:24px;border:1px solid var(--rp-line);border-radius:8px;background:#fff}
#ruhestand .rp-edu-icon{display:block;width:auto;height:auto;margin-bottom:12px;padding:0;background:transparent;color:var(--rp-accent);font:500 1rem/1.5 var(--f-body)}
#ruhestand .rp-edu-card h4{font-size:1.125rem;margin:0 0 12px}
#ruhestand .rp-edu-card p{margin:0}
#ruhestand .rp-edu-faq{margin:24px 0;border-top:1px solid var(--rp-line);border-bottom:1px solid var(--rp-line)}
#ruhestand .rp-edu-faq details{padding:0;background:transparent}
#ruhestand .rp-edu-faq details+details{border-top:1px solid var(--rp-line)}
#ruhestand .rp-edu-faq p{margin:0 0 16px;max-width:78ch}
#ruhestand .rp-tax-demo{margin-top:24px;padding:24px;border:1px solid var(--rp-line);border-radius:8px;background:#fff}
#ruhestand .rp-tax-demo h4{font-size:1.125rem;margin-bottom:8px}
#ruhestand .rp-tax-demo>div>p{margin:0 0 24px}
#ruhestand .rp-tax-values{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}
#ruhestand .rp-tax-values>div{display:flex;flex-direction:column;gap:8px;min-width:0;padding:16px;border:1px solid var(--rp-line);border-radius:6px;background:var(--rp-soft)}
#ruhestand .rp-tax-values span,#ruhestand .rp-tax-values small{font-size:1rem;line-height:1.5;color:var(--rp-muted)}
#ruhestand .rp-tax-values .rp-tax-net{font-size:clamp(1.5rem,3vw,2rem);font-weight:600;line-height:1.25;color:#172b29;font-variant-numeric:tabular-nums}
#ruhestand .rp-tax-values .rp-tax-net small{font-weight:400;font-size:1rem}
#ruhestand .rp-tax-card--frv .rp-tax-net{color:var(--rp-accent)}
#ruhestand .rp-tax-track{height:6px;margin:8px 0;background:#dce5e1;border-radius:3px;overflow:hidden}
#ruhestand .rp-tax-track i{display:block;height:100%;border-radius:3px;background:#71837b}
#ruhestand .rp-tax-card--frv .rp-tax-track i{background:var(--rp-accent)}
#ruhestand .rp-tax-benefit{display:flex;align-items:flex-start;gap:12px;margin-top:24px;padding:0;background:transparent;color:#214f46}
#ruhestand .rp-tax-benefit-icon{display:none}
#ruhestand .rp-tax-benefit strong{font-size:1rem;line-height:1.5}
#ruhestand .rp-tax-benefit p{margin:8px 0 0}
#ruhestand .rp-tax-demo .rp-tax-disclaimer{margin:24px 0 0;padding-top:16px;border-top:1px solid var(--rp-line);font-size:1rem}
#ruhestand .rp-edu-next{margin-top:24px;padding:0;border:0;font-size:1rem}
#ruhestand .rp-edu-next p{margin:8px 0 0;font-size:1rem;line-height:1.6;color:var(--rp-muted)}
@media(max-width:1100px){#ruhestand .rp-shell{grid-template-columns:minmax(0,1fr)}}
@media(max-width:700px){#ruhestand .rp-donuts{grid-template-columns:minmax(0,1fr);gap:24px}#ruhestand .rp-donut-item{grid-row:auto;grid-template-rows:auto auto auto repeat(3,auto) auto}#ruhestand .rp-donut-title{min-height:0}#ruhestand .rp-donut-ring{width:160px}#ruhestand .rp-pension-helper-fields{grid-template-columns:minmax(0,1fr)}}
@media(max-width:600px){
 #ruhestand .rp-row,#ruhestand .rp-row.three,#ruhestand .rp-kpis,#ruhestand .rp-edu-grid,#ruhestand .rp-tax-values{grid-template-columns:minmax(0,1fr)}
 #ruhestand .rp-row{gap:0}
 #ruhestand .rp-row>.rp-field{display:flex;grid-row:auto}
 #ruhestand .rp-row>.rp-field>.rp-small,#ruhestand .rp-row>.rp-field>.rp-label{min-height:0}
 #ruhestand .rp-optimize-button{width:100%}
 #ruhestand .rp-kpi.primary{grid-column:auto;padding:20px}
 #ruhestand .rp-kpi:not(.primary){display:flex;grid-row:auto}
 #ruhestand .rp-kpi:not(.primary)>span{min-height:0}
 #ruhestand .rp-chartbox{padding:12px}
 #ruhestand .rp-edu-card,#ruhestand .rp-tax-demo{padding:20px}
 #ruhestand .rp-education{margin-bottom:32px}
}
@media(prefers-reduced-motion:reduce){#ruhestand .rp-optimize-button{transition:none}}

/* 16.1: additional result and optional nominal capital preservation. */
#ruhestand .rp-kpi-help{width:100%;border-top:1px solid var(--rp-line);padding-top:8px}
#ruhestand .rp-kpi-help summary{min-height:44px;display:flex;align-items:center;font-size:.875rem;cursor:pointer;color:var(--rp-accent)}
#ruhestand .rp-kpi-help p{margin:4px 0 0;font-size:.875rem;line-height:1.6;color:var(--rp-muted)}
#ruhestand .rp-preserve-result{padding:16px;border:1px solid var(--rp-line);border-left:3px solid var(--rp-accent);border-radius:6px;background:var(--rp-soft)}
#ruhestand .rp-preserve-result h4{margin:0 0 8px;font-size:1rem}
#ruhestand .rp-preserve-result>strong{font-size:1.5rem;color:var(--rp-accent);overflow-wrap:anywhere}

/* CI 2.1: Zusatzwissen aufklappbar, zentrale Aktion vor den Eingaben. */
#ruhestand .rp-help>summary{min-height:48px;padding:12px 0;font:500 1rem/1.5 var(--f-body);color:var(--rp-accent);cursor:pointer}
#ruhestand .rp-help>summary:focus-visible{outline:3px solid var(--rp-accent);outline-offset:3px}
#ruhestand .rp-help[open]>summary{margin-bottom:8px}
#ruhestand .rp-education{padding:0 24px}
#ruhestand .rp-education>summary{padding:16px 0}
#ruhestand .rp-help-body{padding:8px 0 24px}
#ruhestand .rp-action{margin:0 0 24px;padding:16px;background:#fff;border:1px solid var(--rp-line);border-top:3px solid var(--rp-accent);border-radius:6px}
#ruhestand .rp-action .rp-optimize-button{width:100%}
#ruhestand .rp-action .rp-optimize-message{margin-top:8px}
#ruhestand .rp-optimize-result{scroll-margin-top:100px}
@media(max-width:1100px){
 #ruhestand .rp-action{position:sticky;top:80px;z-index:20;padding:10px;box-shadow:0 5px 16px rgba(6,46,44,.09)}
 #ruhestand .rp-action .rp-optimize-button{padding:10px 8px}
 #ruhestand .rp-action .rp-optimize-message{padding:0;border:0;background:transparent}
 #ruhestand input,#ruhestand summary,#ruhestand .rp-optimize-result{scroll-margin-top:300px}
}
