/* Калькулятор экономии: светлый стиль Apple. Подключается после styles.css */
.s-hero { padding: clamp(36px, 6vw, 72px) 0 28px; background: var(--bg); }


/* поиск и уровень исполнителя */
.controls { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.savings .search { display: flex; align-items: center; gap: 10px; flex: 1 1 240px; padding: 0 18px; background: #e8e8ed; border-radius: 980px; min-height: 44px; }
.savings .search input { flex: 1; border: 0; background: transparent; font: inherit; color: var(--ink); min-height: 42px; min-width: 0; outline: none; }
.savings .search:focus-within { background: #fff; box-shadow: 0 0 0 4px var(--ring-soft), inset 0 0 0 1px var(--accent); }
.search-icon { color: #86868b; display: inline-flex; }
.tier { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.tier-label { font-size: 14px; color: var(--muted); }
.tier-btns { display: inline-flex; padding: 3px; background: #e8e8ed; border-radius: 980px; }
.tier-btns button { border: 0; background: transparent; color: var(--ink); font: inherit; font-size: 14px; padding: 7px 16px; border-radius: 980px; cursor: pointer; min-height: 36px; }
.tier-btns button.on { background: #fff; font-weight: 600; box-shadow: 0 1px 4px rgba(0, 0, 0, .14); }

/* направления */
.cats { display: flex; flex-wrap: wrap; gap: 8px; }
.cats button { border: 0; background: #e8e8ed; color: var(--ink); font: inherit; font-size: 14px; padding: 7px 14px; border-radius: 980px; cursor: pointer; min-height: 36px; display: inline-flex; align-items: center; gap: 6px; }
.cats button:hover { background: #dcdce1; }
.cats button.on { background: var(--ink); color: #fff; }
.cats .ic { display: none; }
.cats .cnt { font-size: 12px; min-width: 20px; height: 20px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; background: rgba(0, 0, 0, .12); padding: 0 6px; }
.cats button.on .cnt { background: rgba(255, 255, 255, .28); }
.quick-actions { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 16px 0; }
.picked-hint { color: var(--muted); font-size: 15px; }
.picked-hint b { color: var(--ink); }

/* карточки задач */
.savings .grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.savings .card { padding: 20px; gap: 10px; cursor: pointer; position: relative; box-shadow: var(--shadow); transition: transform .18s ease, box-shadow .18s ease; }
.savings .card:hover { transform: translateY(-2px); box-shadow: var(--shadow-hover); }
.savings .card:focus-visible { outline: 3px solid var(--ring); outline-offset: 2px; }
.savings .card.on { box-shadow: 0 0 0 2px var(--accent), var(--shadow); }
.card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.savings .card h3 { margin: 0; font-size: 18px; line-height: 1.25; }
.savings .card p { font-size: 14px; line-height: 1.4; }
.tick { flex: none; width: 26px; height: 26px; border-radius: 50%; border: 2px solid #c7c7cc; color: transparent; font-size: 13px; display: inline-flex; align-items: center; justify-content: center; transition: all .15s ease; }
.card:hover .tick { border-color: var(--accent); }
.card.on .tick { background: var(--accent); border-color: var(--accent); color: #fff; }
.prices { display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: baseline; }
.prices .old { color: var(--muted); text-decoration: line-through; font-size: 15px; }
.prices .arrow { color: var(--muted); font-size: 13px; }
.prices .new { font-size: 21px; font-weight: 700; letter-spacing: -0.02em; color: var(--ink); }
.prices .per { width: 100%; font-size: 13px; color: var(--muted); }
.verdict-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.verdict { font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 980px; }
.verdict::first-letter { text-transform: uppercase; }
.v-self { background: var(--ok-bg); color: var(--ok); }
.v-mixed { background: var(--mid-bg); color: var(--mid); }
.v-give { background: var(--bad-bg); color: var(--bad); }
.my-hours { font-size: 12px; color: var(--muted); }
.qty { display: none; align-items: center; gap: 8px; margin-top: 4px; padding-top: 12px; border-top: 1px solid var(--line-soft); }
.card.on .qty { display: flex; }
.qty button { width: 32px; height: 32px; border-radius: 50%; border: 0; background: #e8e8ed; color: var(--ink); font-size: 18px; line-height: 1; cursor: pointer; }
.qty button:hover { background: #dcdce1; }
.qty input { width: 56px; height: 34px; text-align: center; font: inherit; font-size: 15px; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink); }
.qty .row-saved { margin-left: auto; font-weight: 600; font-size: 14px; color: var(--ok); }
.row-saved.neg, .top-list .val.neg { color: var(--bad); }
.empty { color: var(--muted); padding: 20px 4px; }

/* ИИ-стек */
.stack { margin-top: 28px; background: #fff; border-radius: 24px; padding: 24px; box-shadow: var(--shadow); }
.stack-head { display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 16px; }
.stack-title { font-size: 22px; margin: 0 0 4px; letter-spacing: -0.02em; }
.stack-sub { margin: 0; font-size: 14px; color: var(--muted); max-width: 520px; }
.stack-actions { display: flex; align-items: center; gap: 12px; }
.stack-sum { font-size: 20px; font-weight: 700; letter-spacing: -0.02em; white-space: nowrap; }
.stack-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.tool { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; background: var(--alt); border-radius: 16px; border: 2px solid transparent; cursor: pointer; position: relative; transition: border-color .15s ease, background .15s ease; }
.tool:hover { background: #ececf0; }
.tool.on { border-color: var(--accent); background: #fff; }
.tool.faded { opacity: .55; }
.tool.faded:hover { opacity: .9; }
.tool input { position: absolute; opacity: 0; pointer-events: none; }
.tool input:focus-visible + .tool-box { outline: 3px solid var(--ring); outline-offset: 2px; }
.tool-box { flex: none; width: 22px; height: 22px; border-radius: 50%; border: 2px solid #c7c7cc; color: transparent; font-size: 12px; display: inline-flex; align-items: center; justify-content: center; margin-top: 1px; }
.tool.on .tool-box { background: var(--accent); border-color: var(--accent); color: #fff; }
.tool-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.tool-top { display: flex; justify-content: space-between; gap: 8px; }
.tool-name { font-size: 15px; font-weight: 600; }
.tool-price { font-size: 13px; color: var(--muted); white-space: nowrap; }
.tool-note { font-size: 13px; color: var(--muted); line-height: 1.35; }
.tool-chips { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.tool-chip { font-size: 11px; padding: 2px 8px; border-radius: 980px; background: #e8e8ed; color: #424245; }
.tool-flag { font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 980px; background: var(--accent-soft); color: var(--ink); flex: none; }
.disclaimer { font-size: 13px; color: var(--muted); margin: 14px 4px 0; line-height: 1.45; }

/* итоговая панель */
.panel-title { font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.saved { font-size: clamp(40px, 5vw, 56px); font-weight: 700; letter-spacing: -0.035em; line-height: 1.05; margin: 8px 0 4px; font-variant-numeric: tabular-nums; }
.saved.neg, .stat-num.neg { color: var(--bad); }
.saved.bump { animation: bump .4s cubic-bezier(.22, 1, .36, 1); }
@keyframes bump { 0% { transform: scale(1); } 40% { transform: scale(1.04); } 100% { transform: scale(1); } }
.bars { padding: 20px 0; margin-top: 18px; border-top: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); }
.bar-row + .bar-row { margin-top: 16px; }
.bar-head { display: flex; justify-content: space-between; gap: 10px; font-size: 14px; margin-bottom: 6px; }
.bar-head b { font-variant-numeric: tabular-nums; }
.track { display: flex; height: 8px; border-radius: 4px; background: #e8e8ed; overflow: hidden; }
.fill { height: 100%; width: 0; transition: width .5s cubic-bezier(.22, 1, .36, 1); }
.fill-market { background: #c7c7cc; }
.fill-ai { background: var(--accent); }
.fill-time { background: #9a9aa0; }
.bar-legend { display: flex; gap: 14px; margin-top: 8px; font-size: 12px; color: var(--muted); }
.lg { display: inline-flex; align-items: center; gap: 6px; }
.lg::before { content: ''; width: 8px; height: 8px; border-radius: 50%; }
.lg-ai::before { background: var(--accent); }
.lg-time::before { background: #9a9aa0; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 20px 0; text-align: center; }
.stat-num { display: block; font-size: 24px; font-weight: 700; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.stat-cap { font-size: 12px; color: var(--muted); line-height: 1.25; display: block; }
.assume { padding-top: 4px; }
.assume-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 12px; font-size: 14px; }
.assume input[type="number"] { width: 108px; height: 38px; padding: 0 12px; font: inherit; font-size: 15px; text-align: right; background: var(--alt); border: 1px solid transparent; border-radius: 12px; color: var(--ink); }
.assume input[type="number"]:focus { background: #fff; border-color: var(--accent); outline: none; box-shadow: 0 0 0 4px var(--ring-soft); }
.assume-hint { display: flex; justify-content: space-between; gap: 8px; margin: -4px 0 12px; font-size: 12px; color: var(--muted); }
.assume-hint button { border: 0; background: none; color: var(--ink); font: inherit; font-size: 12px; cursor: pointer; padding: 0; text-decoration: underline; }
.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; }
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch-track { position: relative; width: 46px; height: 28px; border-radius: 14px; background: #d1d1d6; transition: background .2s ease; flex: none; }
.switch-knob { position: absolute; top: 2px; left: 2px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 2px 5px rgba(0, 0, 0, .25); transition: transform .2s ease; }
.switch input:checked + .switch-track { background: #1d1d1f; }
.switch input:checked + .switch-track .switch-knob { transform: translateX(18px); }
.switch input:focus-visible + .switch-track { outline: 3px solid var(--ring); outline-offset: 2px; }
.switch-label { font-size: 14px; }
.rate-field { display: inline-flex; align-items: center; gap: 6px; }
.rate-field input { width: 84px !important; }
.rate-unit { font-size: 13px; color: var(--muted); }
.verdict-box { margin: 6px 0 4px; padding: 14px 16px; border-radius: 16px; background: var(--alt); }
.verdict-cap { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.verdict-text { margin: 4px 0 0; font-size: 14px; line-height: 1.45; }
.v-box-self { background: var(--ok-bg); }
.v-box-mixed { background: var(--mid-bg); }
.v-box-give { background: var(--bad-bg); }
.projection { padding: 16px 0 6px; border-top: 1px solid var(--line-soft); margin-top: 14px; }
.proj-line { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; }
.proj-line + .proj-line { margin-top: 8px; }
.proj-line b { font-weight: 600; font-variant-numeric: tabular-nums; text-align: right; }
.proj-line.muted b { font-weight: 500; }
.top { padding-top: 14px; }
.top-title { font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.top-list { list-style: none; margin: 8px 0 0; padding: 0; }
.top-list li { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-top: 1px solid var(--line-soft); font-size: 14px; }
.top-list li:first-child { border-top: 0; }
.top-list .val { font-weight: 600; color: var(--ok); white-space: nowrap; font-variant-numeric: tabular-nums; }
.top-empty { color: var(--muted); }

/* шапка калькулятора и каталог */
.s-hero { border-bottom: 1px solid var(--line-soft); }
.s-hero h1 { max-width: 880px; font-size: clamp(30px, 5vw, 54px); }
.s-hero .lead { max-width: 640px; }
.layout { display: block; padding-top: 6px; padding-bottom: 36px; }

/* итог: закреплён сверху, считается сразу при выборе задач */
.sum-sticky { position: sticky; top: 60px; z-index: 9; padding: 8px 0 6px; pointer-events: none; }
.sum-wrap { position: relative; }
.panel { position: relative; pointer-events: auto; background: rgba(255, 255, 255, .94); -webkit-backdrop-filter: saturate(180%) blur(16px); backdrop-filter: saturate(180%) blur(16px); border-radius: 22px; padding: 12px 18px; box-shadow: 0 6px 28px rgba(0, 0, 0, .12), 0 0 0 1px rgba(0, 0, 0, .05); }
.sum-bar { display: flex; align-items: center; gap: 18px; }
.sum-main { flex: 1 1 auto; min-width: 0; }
.sum-main .saved { margin: 2px 0 0; font-size: clamp(30px, 4.6vw, 42px); }
.sum-quick { display: flex; gap: 24px; }
.sum-quick .stat { text-align: center; }
.sum-quick .stat-num { font-size: 22px; }
.sum-toggle { flex: none; }
.sum-more { position: absolute; left: 0; right: 0; top: calc(100% + 8px); max-height: calc(100vh - 170px); overflow: auto; padding: 20px 22px 22px; background: #fff; border-radius: 22px; box-shadow: 0 18px 50px rgba(0, 0, 0, .18), 0 0 0 1px rgba(0, 0, 0, .05); }
.sum-more[hidden] { display: none; }
.sum-more .bars { margin-top: 0; padding-top: 0; border-top: 0; }
.sum-more > .btn { margin-top: 14px; }
@media (max-width: 760px) { .sum-sticky { top: 0; padding-top: max(6px, env(safe-area-inset-top)); } .sum-more { max-height: calc(100vh - 120px); } }
@media (max-width: 560px) { .sum-quick { display: none; } .panel { padding: 10px 14px; border-radius: 18px; } .sum-bar { gap: 10px; } }

/* значок процентов на карточке задачи */
.card-head { align-items: center; }
.card-head h3 { flex: 1; min-width: 0; }
.pct { flex: none; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 10px; background: var(--hero-bg); }
.pct svg { width: 17px; height: 17px; fill: none; stroke: #fff; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* призыв внизу: открываете бизнес */
.biz-cta { padding-bottom: 56px; }
.biz-box { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 20px; align-items: center; padding: clamp(22px, 4vw, 36px); background: #fff; border-radius: 28px; box-shadow: var(--shadow); }
.biz-box h2 { margin: 0 0 6px; font-size: clamp(24px, 3.4vw, 32px); }
.biz-box p { margin: 0; max-width: 520px; color: var(--muted); }
@media (max-width: 760px) { .biz-box { grid-template-columns: minmax(0, 1fr); } .biz-box .btn { width: 100%; } }
/* подсказки и «+ сумма» */
.toast { position: fixed; left: 50%; bottom: 24px; z-index: 60; transform: translate(-50%, 16px); background: rgba(29, 29, 31, .92); color: #fff; padding: 12px 22px; border-radius: 980px; font-size: 14px; opacity: 0; pointer-events: none; transition: opacity .2s ease, transform .2s ease; max-width: calc(100vw - 32px); text-align: center; }
.toast.on { opacity: 1; transform: translate(-50%, 0); }
.float-gain { position: fixed; z-index: 40; pointer-events: none; font-weight: 700; font-size: 15px; color: var(--ink); transform: translate(-50%, 0); animation: floatUp 1.1s ease-out forwards; }
@keyframes floatUp { 0% { opacity: 0; transform: translate(-50%, 0); } 15% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -46px); } }
@media (prefers-reduced-motion: reduce) { .saved.bump, .float-gain { animation: none; } }
