/* Zložené úročenie – "vrstvy rastu": vstupy ako farebne kódované dlaždice, výsledok ako vrstvený graf rastu (vklady + výnos) */
:root{--cg-dep:#0d9488;--cg-gain:#d97706;--cg-gain-soft:rgba(217,119,6,.16);--cg-dep-soft:rgba(13,148,136,.16)}
@media(prefers-color-scheme:dark){:root{--cg-dep:#5eead4;--cg-gain:#fbbf24;--cg-gain-soft:rgba(251,191,36,.18);--cg-dep-soft:rgba(94,234,212,.15)}}
.pro-form[data-pro="compound"]{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.7rem;padding:1.1rem}
.pro-form[data-pro="compound"]>.zhead,.pro-form[data-pro="compound"]>.presets,.pro-form[data-pro="compound"]>.adv,.pro-form[data-pro="compound"]>.zstick{grid-column:1/-1}
.pro-form[data-pro="compound"]>.zhead{margin:0}
.pro-form[data-pro="compound"] .presets{margin:0;display:flex;gap:0;border:1px solid var(--line);border-radius:12px;overflow:hidden;background:var(--soft);width:max-content;max-width:100%}
.pro-form[data-pro="compound"] .presets .chip{border:0;border-radius:0;margin:0;background:transparent;min-height:40px;padding:.35rem .9rem;font-size:.86rem;border-right:1px solid var(--line)}
.pro-form[data-pro="compound"] .presets .chip:last-child{border-right:0}
.pro-form[data-pro="compound"] .presets .chip[aria-pressed="true"]{background:var(--cg-dep);color:var(--card);font-weight:700}
.pro-form[data-pro="compound"]>.field{margin:0;position:relative;background:var(--soft);border:1px solid var(--line);border-radius:14px;padding:.75rem .8rem .7rem;overflow:hidden}
.pro-form[data-pro="compound"]>.field::before{content:"";position:absolute;left:0;top:0;bottom:0;width:4px;background:var(--cg-dep)}
.pro-form[data-pro="compound"]>#f-rate::before{background:var(--cg-gain)}
.pro-form[data-pro="compound"]>#f-years::before{background:linear-gradient(var(--cg-dep),var(--cg-gain))}
.pro-form[data-pro="compound"]>.field>label{display:block;font-size:.74rem;font-weight:700;text-transform:uppercase;letter-spacing:.06em;color:var(--mut);margin:0 0 .3rem;line-height:1.25}
.pro-form[data-pro="compound"]>.field .field-unit{display:flex;align-items:baseline;gap:.35rem;border-bottom:2px solid var(--line);transition:border-color .15s}
.pro-form[data-pro="compound"]>.field .field-unit:focus-within{border-bottom-color:var(--cg-dep)}
.pro-form[data-pro="compound"]>#f-rate .field-unit:focus-within{border-bottom-color:var(--cg-gain)}
.pro-form[data-pro="compound"]>.field input{border:0;background:transparent;padding:.15rem 0;min-height:44px;font-size:1.45rem;font-weight:750;letter-spacing:-.01em;border-radius:0;box-shadow:none}
.pro-form[data-pro="compound"]>.field input:focus{box-shadow:none}
.pro-form[data-pro="compound"]>.field input:focus-visible{outline:2px solid var(--acc);outline-offset:2px;border-radius:4px}
.pro-form[data-pro="compound"]>.field .unit{background:none;border:0;padding:0;font-weight:600;font-size:.9rem;color:var(--mut)}
.pro-form[data-pro="compound"]>.field input{-moz-appearance:textfield;appearance:textfield}
.pro-form[data-pro="compound"]>.field input::-webkit-inner-spin-button,.pro-form[data-pro="compound"]>.field input::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}
.pro-form[data-pro="compound"] .adv{margin:0}
.pro-form[data-pro="compound"] .adv .field{margin:.6rem 0 0}
@media(min-width:720px){.pro-form[data-pro="compound"]{grid-template-columns:repeat(4,minmax(0,1fr))}}
/* výsledok */
.pro-form[data-pro="compound"]~.result{padding:1.1rem 1.2rem 1.2rem}
.pro-form[data-pro="compound"]~.result .result-caption{font-size:.74rem;text-transform:uppercase;letter-spacing:.09em;font-weight:700;color:var(--mut)}
.pro-form[data-pro="compound"]~.result .result-value{font-size:clamp(2rem,7vw,2.9rem);font-weight:800;letter-spacing:-.025em;color:var(--fg);margin:.15rem 0 0}
.pro-form[data-pro="compound"]~.result #r-chart .years{display:none}
.pro-form[data-pro="compound"]~.result #r-chart{margin:.2rem 0 0}
.pro-form[data-pro="compound"]~.result .legend{flex-wrap:wrap;gap:.4rem 1rem}
.pro-form[data-pro="compound"]~.result .legend .k-main::before{background:var(--cg-dep)}
.pro-form[data-pro="compound"]~.result .legend .k-tax::before{background:var(--cg-gain)}
.cg-plot{position:relative;margin:.9rem 0 .5rem;touch-action:pan-y}
.cg-plot svg{display:block;width:100%;overflow:visible}
.cg-plot .g-grid{stroke:var(--line);stroke-width:1}
.cg-plot .g-ylab{fill:var(--mut);font-size:11px;font-variant-numeric:tabular-nums}
.cg-plot .g-xlab{fill:var(--mut);font-size:11px;font-variant-numeric:tabular-nums}
.cg-plot .a-dep{fill:url(#cgDep)}
.cg-plot .a-gain{fill:url(#cgGain)}
.cg-plot .l-dep{fill:none;stroke:var(--cg-dep);stroke-width:2;stroke-dasharray:5 4}
.cg-plot .l-val{fill:none;stroke:var(--cg-gain);stroke-width:3;stroke-linejoin:round;stroke-linecap:round}
.cg-plot .dot{fill:var(--card);stroke:var(--cg-gain);stroke-width:3}
.cg-plot .brk{fill:none;stroke:var(--cg-gain);stroke-width:1.5}
.cg-plot .cross{stroke:var(--fg);stroke-width:1;stroke-dasharray:2 3;opacity:.55}
.cg-plot .cdot{fill:var(--cg-gain);stroke:var(--card);stroke-width:2}
.cg-tip{position:absolute;top:0;transform:translateX(-50%);pointer-events:none;background:var(--fg);color:var(--bg);font-size:.78rem;font-weight:650;line-height:1.3;padding:.3rem .55rem;border-radius:8px;white-space:nowrap;font-variant-numeric:tabular-nums;box-shadow:var(--sh)}
.cg-tip[hidden]{display:none}
.cg-tip small{display:block;font-weight:500;opacity:.8}
.pro-form[data-pro="compound"]~.result .breakdown{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.6rem;margin:.9rem 0 .4rem}
.pro-form[data-pro="compound"]~.result .breakdown>div:last-child:nth-child(odd){grid-column:1/-1}
@media(min-width:720px){.pro-form[data-pro="compound"]~.result .breakdown{grid-template-columns:repeat(auto-fit,minmax(150px,1fr))}.pro-form[data-pro="compound"]~.result .breakdown>div:last-child:nth-child(odd){grid-column:auto}}
.pro-form[data-pro="compound"]~.result .breakdown>div{display:block;border:1px solid var(--line);border-top:4px solid var(--mut);border-radius:12px;padding:.6rem .8rem;background:var(--soft)}
.pro-form[data-pro="compound"]~.result .breakdown>div:nth-child(1){border-top-color:var(--cg-dep)}
.pro-form[data-pro="compound"]~.result .breakdown>div:nth-child(2){border-top-color:var(--cg-gain)}
.pro-form[data-pro="compound"]~.result .breakdown dt{font-size:.8rem;line-height:1.3}
.pro-form[data-pro="compound"]~.result .breakdown dd{text-align:left;font-size:1.15rem;margin-top:.2rem}
