/* Калькулятор финмодели франшизы — /franshiza/raschet/ */
.fm-head{margin-bottom:18px}
.fm-head h1{margin-bottom:10px}
.fm{margin-top:0}
.fm-grid{display:grid;grid-template-columns:350px minmax(0,1fr);gap:20px;align-items:start}
.fm-ctl{position:sticky;top:84px;display:flex;flex-direction:column;gap:18px;padding:20px}
.fm-f{display:flex;flex-direction:column;gap:8px;margin:0;min-width:0}
.fm-grid>*,.fm-bottom>*{min-width:0}
.fm-f>span{font-weight:700;font-size:15px}
.fm-f>span b{color:var(--red)}
.fm-f small,.fm-more small{color:var(--muted);font-size:13px;line-height:1.4}
.fm-f select,.fm-more input{width:100%;font:inherit;font-size:16px;padding:11px 12px;border:1px solid var(--line2);border-radius:12px;background:var(--card);color:var(--ink)}
.fm-f select:focus,.fm-more input:focus{outline:2px solid var(--red);outline-offset:1px}
#fm-z{--p:12%;-webkit-appearance:none;appearance:none;width:100%;height:8px;border-radius:8px;margin:8px 0 2px;background:linear-gradient(90deg,var(--red) var(--p),var(--line) var(--p));cursor:pointer}
#fm-z::-webkit-slider-thumb{-webkit-appearance:none;width:26px;height:26px;border-radius:50%;background:#fff;border:3px solid var(--red);box-shadow:0 2px 8px rgba(0,0,0,.2)}
#fm-z::-moz-range-thumb{width:22px;height:22px;border-radius:50%;background:#fff;border:3px solid var(--red)}
.fm-z-marks{display:flex;flex-wrap:wrap;gap:6px}
.fm-z-marks button{border:1px solid var(--line2);background:var(--card);color:var(--ink2);border-radius:999px;padding:5px 10px;font:inherit;font-size:13px;cursor:pointer}
.fm-z-marks button:hover{border-color:var(--red);color:var(--red)}
.fm-scs{display:grid;grid-template-columns:1fr;gap:6px}
.fm-sc{min-width:0;display:flex;flex-direction:row;align-items:baseline;justify-content:space-between;gap:8px;text-align:left;border:1.5px solid var(--line2);background:var(--card);color:var(--ink);border-radius:12px;padding:10px 14px;font:inherit;cursor:pointer;transition:border-color .15s,background .15s}
.fm-sc b{font-size:15px}
.fm-sc span{font-size:13px;color:var(--muted)}
.fm-sc:hover{border-color:var(--red)}
.fm-sc.on{border-color:var(--red);background:var(--red);color:#fff}
.fm-sc.on span{color:rgba(255,255,255,.85)}
.fm-sc[data-sc=neg].on{background:#4A4D55;border-color:#4A4D55}
.fm-sc[data-sc=opt].on{background:#1D8A4E;border-color:#1D8A4E}
.fm-more{border-top:1px solid var(--line);padding-top:12px}
.fm-more summary{cursor:pointer;font-weight:700;color:var(--red)}
.fm-more label{display:flex;flex-direction:column;gap:5px;font-size:14px;margin-top:12px}
.fm-more .btn{margin-top:12px;width:100%}
.fm-res{display:flex;flex-direction:column;gap:16px;min-width:0}
.fm-kpis{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:10px}
.fm-kpi{display:flex;flex-direction:column;gap:4px;padding:14px}
.fm-kpi span{font-size:13px;color:var(--muted);line-height:1.3}
.fm-kpi b{font-size:clamp(18px,1.7vw,22px);line-height:1.15;white-space:nowrap}
.fm-kpi small{font-size:12.5px;color:var(--muted);line-height:1.35}
.fm-kpi.k-good b{color:#1D8A4E}.fm-kpi.k-mid b{color:#B7791F}.fm-kpi.k-bad b{color:var(--red)}
.fm-chart{padding:16px 16px 8px}
.fm-chart-h{display:flex;flex-wrap:wrap;justify-content:space-between;align-items:baseline;gap:6px 16px;margin-bottom:6px}
.fm-chart h2,.fm-cmp h2,.fm-tbl h2{font-size:18px;margin:0}
.fm-leg{font-size:13px;color:var(--muted);display:flex;align-items:center;gap:6px}
.fm-leg i{display:inline-block;width:12px;height:12px;border-radius:3px;margin-left:8px}
.l-rev{background:var(--red)}.l-cost{background:#9AA0AA}.l-pb{background:#1D8A4E;border-radius:50%!important}
.fm-chart svg{display:block;width:100%;height:auto}
.fm-ax{font-size:11px;fill:var(--muted)}
.fm-yr{font-weight:700;fill:var(--ink2)}
.fm-grid line,.fm-chart .fm-grid{stroke:var(--line);stroke-width:1}
.fm-chart .fm-zero{stroke:var(--ink2);stroke-width:1.2}
.fm-sep{stroke:var(--line2);stroke-dasharray:4 4}
.b-rev{fill:var(--red)}.b-cost{fill:#9AA0AA}
.c-line{fill:none;stroke:var(--ink);stroke-width:2.5}
.c-area{fill:var(--red);opacity:.08}
.c-pos{fill:#1D8A4E}.c-neg{fill:var(--red)}
.c-pb{fill:none;stroke:#1D8A4E;stroke-width:3}
.fm-pbt{font-size:13px;font-weight:700;fill:#1D8A4E;paint-order:stroke;stroke:var(--card);stroke-width:5px;stroke-linejoin:round}
.fm-tw{overflow-x:auto;-webkit-overflow-scrolling:touch;margin:10px -4px 0}
.fm-t{width:100%;border-collapse:collapse;font-size:14px;font-variant-numeric:tabular-nums}
.fm-t th,.fm-t td{padding:8px 10px;text-align:right;white-space:nowrap;border-bottom:1px solid var(--line)}
.fm-t th:first-child,.fm-t td:first-child{text-align:left}
.fm-t thead th{font-size:12.5px;color:var(--muted);font-weight:600}
.fm-t td small{color:var(--muted);font-size:12px}
.fm-t .neg{color:var(--red)}.fm-t .pos{color:#1D8A4E}
.fm-yrow th{background:var(--bg);font-size:13px;color:var(--ink2);text-align:left}
.fm-sum td{font-weight:700;border-bottom:2px solid var(--line2)}
.fm-cmp tr[data-sc]{cursor:pointer}
.fm-cmp tr[data-sc]:hover td{background:var(--bg)}
.fm-cmp tr.on td{background:var(--red-soft)}
.fm-cmp tr.on td:first-child{box-shadow:inset 3px 0 0 var(--red)}
.fm-tbl summary{cursor:pointer;list-style:none;display:flex;align-items:center;gap:8px}
.fm-tbl summary::-webkit-details-marker{display:none}
.fm-tbl summary::after{content:'▾';color:var(--muted)}
.fm-tbl:not([open]) summary::after{content:'▸'}
.fm-start{display:grid;grid-template-columns:1fr 1fr;gap:6px 28px;margin-top:16px}
.fm-start h3{font-size:15px;margin:6px 0}
.fm-start ul{list-style:none;padding:0;margin:0 0 8px}
.fm-start h3:nth-of-type(1){grid-column:1}.fm-start ul:nth-of-type(1){grid-column:1;grid-row:2}
.fm-start h3:nth-of-type(2){grid-column:2;grid-row:1}.fm-start ul:nth-of-type(2){grid-column:2;grid-row:2}
.fm-start li{display:flex;justify-content:space-between;gap:12px;padding:5px 0;border-bottom:1px dashed var(--line);font-size:14px}
.fm-start li b{white-space:nowrap}
.fm-bottom{display:grid;grid-template-columns:minmax(0,1.3fr) minmax(0,1fr);gap:20px;align-items:start}
.fm-how ul{padding-left:18px;margin:10px 0}
.fm-how li{margin:8px 0;line-height:1.5}
.fm-disc{font-size:13px;color:var(--muted)}
.fm-lead .form{display:flex;flex-direction:column;gap:12px;margin-top:12px}
.fm-lead label{display:flex;flex-direction:column;gap:5px;font-size:14px}
@media (max-width:1180px){.fm-kpis{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media (max-width:980px){.fm-grid,.fm-bottom{grid-template-columns:minmax(0,1fr)}.fm-ctl{position:static}}
@media (max-width:640px){.fm-kpis{grid-template-columns:1fr 1fr}.fm-kpi:first-child{grid-column:1/-1}.fm-start{grid-template-columns:1fr}.fm-start h3:nth-of-type(2),.fm-start ul:nth-of-type(2){grid-column:1;grid-row:auto}}
