/* Токены сняты с berekebank.kz (страница «Тарифные планы», 2026-11-18) */
:root {
  --bg: #f7f7f7;
  --card: #fff;
  --text: #1a1a1a;
  --muted: #6b6b6b;
  --green: #00bb00;
  --green-soft: #e5f7e5;
  --blue: #023dff;
  --purple: #ab73ff;
  --blue-soft: #e6ecff;
  --blue-mid: #8aa6ff;
  --line: #e6e6e6;
  --track: #e3e3e3;
  --font: Roboto, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-head: "Roboto Condensed", Roboto, system-ui, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--text); font: 16px/24px var(--font); }
button { font: inherit; color: inherit; cursor: pointer; }

.app { max-width: 520px; margin: 0 auto; padding: 0 max(16px, env(safe-area-inset-left, 0px)) 24px max(16px, env(safe-area-inset-right, 0px)); }
.top { height: 56px; display: flex; align-items: center; padding-top: env(safe-area-inset-top, 0px); }
.top-title { font: 500 18px/24px var(--font); }
h1 { font: 500 32px/36px var(--font-head); margin: 0 0 8px; text-wrap: balance; }
.hero { background: var(--blue); color: #fff; border-radius: 32px 32px 32px 0; padding: 24px 20px; margin-bottom: 16px; }
.hero .lead { margin: 0; opacity: .92; }

#cards { display: grid; gap: 12px; }
.card { background: var(--card); border-radius: 16px; padding: 16px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.card-head h2 { display: flex; align-items: center; gap: 10px; margin: 0; font: 500 22px/28px var(--font-head); }
.card-head svg { width: 24px; height: 24px; flex: none; color: var(--blue); }

.slider + .slider { margin-top: 18px; }
.row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.row label { color: var(--text); }
.row output { font: 500 20px/24px var(--font-head); white-space: nowrap; }
.minmax { display: flex; justify-content: space-between; color: var(--muted); font-size: 13px; }

input[type=range] { -webkit-appearance: none; appearance: none; width: 100%; height: 28px; margin: 6px 0 0; background: transparent; cursor: pointer; --p: 0%; }
input[type=range]::-webkit-slider-runnable-track { height: 6px; border-radius: 6px; background: linear-gradient(to right, var(--blue) var(--p), var(--track) var(--p)); }
input[type=range]::-moz-range-track { height: 6px; border-radius: 6px; background: var(--track); }
input[type=range]::-moz-range-progress { height: 6px; border-radius: 6px; background: var(--blue); }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 26px; height: 26px; margin-top: -10px; border-radius: 13px; background: #fff; border: 3px solid var(--blue); box-shadow: 0 1px 3px rgba(0, 0, 0, .2); }
input[type=range]::-moz-range-thumb { width: 20px; height: 20px; border-radius: 13px; background: #fff; border: 3px solid var(--blue); }
input[type=range]:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; border-radius: 8px; }

.switch { display: flex; align-items: center; gap: 10px; font-weight: 500; cursor: pointer; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch i { position: relative; width: 52px; height: 32px; border-radius: 16px; background: #d4d4d4; transition: background .15s; flex: none; }
.switch i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 26px; height: 26px; border-radius: 13px; background: #fff; transition: transform .15s; }
.switch input:checked + i { background: var(--green); }
.switch input:checked + i::after { transform: translateX(20px); }
.switch input:focus-visible + i { outline: 2px solid var(--blue); outline-offset: 2px; }
.fx-body[hidden] { display: none; }
.fx-body { display: grid; gap: 18px; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { padding: 10px 18px; border-radius: 40px; border: 0; background: var(--bg); }
.chip[aria-pressed=true], .chip.on { background: var(--green-soft); outline: 2px solid var(--green); }
.chip small { display: block; color: var(--muted); font-size: 12px; line-height: 16px; }
.chip.period { text-align: left; border-radius: 16px; padding: 10px 16px; }
.hint { color: var(--muted); font-size: 13px; line-height: 18px; margin: 10px 0 0; }

.result { display: grid; gap: 12px; margin-top: 12px; scroll-margin-top: 8px; padding-bottom: 150px; }
.best { border: 2px solid var(--purple); position: relative; padding-top: 52px; }
.badge { position: absolute; top: 0; left: 0; right: 0; background: var(--purple); color: #fff; text-align: center; padding: 8px; font-size: 16px; border-radius: 14px 14px 0 0; }
.best h2 { font: 500 28px/32px var(--font-head); margin: 0; }
.best .price { font: 500 40px/48px var(--font-head); }
.best .price small { font: 400 16px/24px var(--font); color: var(--muted); }
.best p { margin: 8px 0 0; }
.best .sub { color: var(--muted); font-size: 14px; }
h3.sec { font: 500 20px/24px var(--font-head); margin: 8px 0 0; }
.stack { display: grid; gap: 10px; }
.tcard { background: var(--card); border-radius: 16px; padding: 14px 16px; }
.tcard.top { background: var(--green-soft); }
.tcard.off, .tcard.off .tsub { color: #a3a3a3; }
.trow { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.trow b { font: 500 20px/24px var(--font-head); }
.tsub { color: var(--muted); font-size: 13px; line-height: 18px; margin-top: 2px; }
.note { color: var(--muted); font-size: 13px; line-height: 18px; margin: 0; }

.btn { display: flex; align-items: center; justify-content: center; height: 56px; padding: 0 28px; border: 0; border-radius: 40px; background: var(--green); color: #fff; font-size: 18px; text-decoration: none; width: 100%; }
.btn:active { filter: brightness(.95); }
.btn.secondary { background: var(--card); color: var(--text); }
.actions { display: grid; gap: 10px; margin-top: 4px; }

.bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 5; background: var(--card); border-radius: 24px 24px 0 0; box-shadow: 0 -2px 12px rgba(0, 0, 0, .08); padding: 14px max(16px, env(safe-area-inset-left, 0px)) max(14px, env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-right, 0px)); }
.bar-in { max-width: 520px; margin: 0 auto; display: grid; gap: 10px; }
.bar-info { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; }
.bar-info small { display: block; color: var(--muted); font-size: 13px; line-height: 16px; }
.bar-info b { font: 500 26px/30px var(--font-head); }
.bar-info .p { text-align: right; }
.bar-info .p b { font-size: 28px; white-space: nowrap; }

@media (prefers-reduced-motion: reduce) { .switch i, .switch i::after { transition: none; } }
@media (min-width: 560px) { .bar { border-radius: 24px; left: 50%; right: auto; width: 520px; transform: translateX(-50%); bottom: 12px; } }

.sec { font: 500 20px/24px var(--font-head); margin: 0 0 8px; }
.legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: 13px; color: var(--muted); margin-bottom: 10px; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
i.b { background: var(--blue); }
i.x { background: var(--blue-mid); }
.cmps { display: grid; gap: 10px; }
.cmp { display: block; width: 100%; text-align: left; border: 2px solid transparent; background: var(--bg); border-radius: 14px; padding: 10px 12px; }
.cmp.sel { border-color: var(--blue); background: var(--blue-soft); }
.cmp.off { color: #a3a3a3; background: var(--bg); cursor: default; }
.cmp-top { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 6px; }
.cmp-top b { font: 500 18px/22px var(--font-head); }
.cmp-top em { font: 400 12px/16px var(--font); font-style: normal; color: #067a00; background: var(--green-soft); border-radius: 8px; padding: 2px 8px; margin-left: 6px; }
.cmp-top span { font-weight: 500; white-space: nowrap; }
.cmp-sub { font-size: 13px; }
.trk { height: 10px; border-radius: 10px; background: var(--track); overflow: hidden; }
.fill { height: 100%; display: flex; border-radius: 10px; overflow: hidden; }
.fill i { display: block; height: 100%; }
.cmp.sel .trk { background: #fff; }
.analysis { padding: 0; overflow: hidden; scroll-margin-top: 8px; }
.an-head { background: var(--blue); color: #fff; padding: 16px; border-radius: 0 0 0 0; }
.an-head small { opacity: .85; }
.an-head h2 { font: 500 28px/32px var(--font-head); margin: 0; }
.an-total { font: 500 36px/44px var(--font-head); }
.an-total small { font: 400 16px/24px var(--font); }
.analysis > :not(.an-head) { margin-left: 16px; margin-right: 16px; }
.analysis h4 { font: 500 18px/24px var(--font-head); margin: 18px 16px 8px; }
.verdict { margin-top: 14px; margin-bottom: 0; }
.analysis .row { padding: 6px 0; border-bottom: 1px solid var(--line); }
.analysis .row.cur { background: var(--blue-soft); margin: 0 -8px; padding: 6px 8px; border-radius: 8px; }
.save { color: #067a00; font-style: normal; font-weight: 400; }
.meter { margin-bottom: 12px; }
.meter .row { border: 0; padding: 0 0 4px; font-size: 14px; }
.meter .fill { background: var(--blue); }
.meter.over .fill { background: #e8590c; }
.meter small { color: #c2410c; }
.analysis .hint { margin-bottom: 16px; }
