:root {
  --bg: #f6f4ee; --surface: #ffffff; --ink: #14201a; --muted: #5b675f; --line: #e2ded2;
  --brand: #0f5132; --brand-ink: #ffffff; --accent: #ffd23f; --accent-tint: #fff6d1;
  --ok: #157347; --ok-tint: #e3f4ea; --wait: #8a5a00; --wait-tint: #fff1cc; --bad: #b42318; --bad-tint: #fde7e4;
  --r: 14px; --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.5 var(--font); }
a { color: var(--brand); }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: .04em; }

.top { display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: .9rem clamp(1rem, 4vw, 2rem); background: var(--brand); color: var(--brand-ink); }
.brand { display: inline-flex; align-items: center; gap: .6rem; color: inherit; text-decoration: none; font-size: 1.15rem; }
.brand img { border-radius: 8px; box-shadow: 0 0 0 1px rgba(255,255,255,.25); }
.brand b { font-weight: 800; }
.link { background: none; border: 0; color: inherit; font: inherit; text-decoration: underline; cursor: pointer; padding: .3rem; }

.main { max-width: 68rem; margin: 0 auto; padding: 0 clamp(1rem, 4vw, 2rem) 2rem; display: grid; gap: 1.5rem; }
.hero { padding: 2rem 0 .5rem; max-width: 44rem; }
.eyebrow { margin: 0 0 .4rem; color: var(--brand); font-weight: 700; text-transform: uppercase; letter-spacing: .06em; font-size: .8rem; }
.hero h1 { margin: 0 0 .75rem; font-size: clamp(1.8rem, 5vw, 2.8rem); line-height: 1.1; letter-spacing: -.02em; }
.lead { margin: 0 0 1rem; color: var(--muted); font-size: 1.05rem; }
.banner { margin: .5rem 0 0; padding: .7rem .9rem; border-radius: 10px; background: var(--accent-tint);
  border: 1px solid #f1dd8a; font-size: .95rem; }
.banner--demo { background: #e8ecff; border-color: #c9d1fb; }

.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr)); gap: 1.25rem; align-items: start; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 1.25rem; display: grid; gap: .75rem; }
.card h2, .how h2 { margin: 0; font-size: 1.3rem; }
.sub { margin: 0; color: var(--muted); font-size: .95rem; }
.hint { color: var(--muted); margin-top: -.4rem; }

.seg { display: grid; grid-template-columns: 1fr 1fr; gap: .25rem; padding: .25rem; background: var(--bg); border-radius: 12px; }
.seg button { border: 0; background: none; padding: .65rem .4rem; border-radius: 9px; font: 600 .92rem var(--font); color: var(--muted); cursor: pointer; }
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.12); }

.field { display: grid; gap: .3rem; font-weight: 600; font-size: .92rem; }
.input { width: 100%; padding: .75rem .85rem; border: 1px solid #cfc9b8; border-radius: 10px; background: #fff;
  font: 1rem var(--font); color: var(--ink); }
.input:focus, .btn:focus-visible, .seg button:focus-visible, .link:focus-visible { outline: 3px solid var(--accent); outline-offset: 1px; }
.input--big { font-size: 1.5rem; font-weight: 700; }

.quote { display: grid; gap: .35rem; padding: .9rem 1rem; border-radius: 12px; background: var(--bg); }
.quote:empty { display: none; }
.quote__row { display: flex; justify-content: space-between; gap: 1rem; }
.quote__total { border-top: 1px solid var(--line); padding-top: .5rem; font-size: 1.2rem; }
.quote__total b { color: var(--brand); }
.quote__note { margin: .2rem 0 0; color: var(--muted); font-size: .88rem; }
.quote__note--bad { color: var(--bad); }

.track { display: grid; gap: .75rem; }
.btn { padding: .8rem 1rem; border: 0; border-radius: 10px; background: var(--brand); color: var(--brand-ink);
  font: 700 1rem var(--font); cursor: pointer; }
.btn:disabled { opacity: .6; cursor: wait; }
.msg { margin: 0; padding: .7rem .9rem; border-radius: 10px; font-size: .95rem; }
.msg--bad { background: var(--bad-tint); color: var(--bad); }
.msg--wait { background: var(--wait-tint); color: var(--wait); font-weight: 600; }

.result { display: grid; gap: .5rem; padding: 1rem; border-radius: 12px; border: 1px solid var(--line); background: #fcfbf7; }
.result__head { display: flex; justify-content: space-between; align-items: center; gap: .5rem; }
.result__amount { font-size: 1.6rem; font-weight: 800; letter-spacing: -.01em; }
.pill { white-space: nowrap; padding: .2rem .6rem; border-radius: 99px; font-size: .82rem; font-weight: 700; }
.pill--ok { background: var(--ok-tint); color: var(--ok); }
.pill--go, .pill--wait { background: var(--wait-tint); color: var(--wait); }
.pill--off { background: #eceae3; color: var(--muted); }
.steps { list-style: none; margin: .3rem 0 0; padding: 0; display: grid; gap: .1rem; }
.steps li { position: relative; padding: .35rem 0 .35rem 1.8rem; color: var(--muted); display: grid; }
.steps li::before { content: ""; position: absolute; left: .3rem; top: .65rem; width: .8rem; height: .8rem; border-radius: 50%;
  border: 2px solid #c9c3b2; background: #fff; }
.steps li.done { color: var(--ink); font-weight: 600; }
.steps li.done::before { background: var(--ok); border-color: var(--ok); }
.steps small { font-weight: 400; color: var(--muted); }

.how ol { list-style: none; counter-reset: s; margin: .75rem 0 0; padding: 0; display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr)); gap: 1rem; }
.how li { counter-increment: s; display: grid; gap: .25rem; padding: 1rem 1rem 1rem 3.2rem; position: relative;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); }
.how li::before { content: counter(s); position: absolute; left: 1rem; top: 1rem; width: 1.7rem; height: 1.7rem; border-radius: 50%;
  display: grid; place-items: center; background: var(--accent); color: var(--ink); font-weight: 800; }
.how li span { color: var(--muted); font-size: .95rem; }
.card--safe ul { margin: 0; padding-left: 1.2rem; display: grid; gap: .3rem; }

.foot { max-width: 68rem; margin: 0 auto; padding: 1rem clamp(1rem, 4vw, 2rem) 2.5rem; color: var(--muted); font-size: .9rem; }
.foot p { margin: .2rem 0; }

/* ---------- app ---------- */
.topnav { display: flex; align-items: center; gap: 1rem; }
.topnav a { color: inherit; font-weight: 600; text-decoration: none; }
.link--dark { color: var(--brand); padding: 0; }
.stack { display: grid; gap: .8rem; align-content: start; }
.narrow { max-width: 30rem; width: 100%; margin: 1.5rem auto 0; }
.h2 { margin: 0; font-size: 1.5rem; }
.h3 { margin: .5rem 0 0; font-size: 1.1rem; }
.bad { color: var(--bad); margin: 0; }
.bad:empty { display: none; }
select.input { appearance: none; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%235b675f' stroke-width='2'/%3E%3C/svg%3E") no-repeat right .9rem center; padding-right: 2.2rem; }
.amount { position: relative; }
.amount .input { padding-right: 4.5rem; }
.unit { position: absolute; right: 1rem; top: 50%; transform: translateY(-50%); font-weight: 700; color: var(--muted); }
.phone { display: grid; grid-template-columns: 7.5rem 1fr; gap: .5rem; }
.input--code { font-size: 1.6rem; letter-spacing: .4em; text-align: center; }
.btn--big { padding: 1rem; font-size: 1.05rem; width: 100%; }
a.btn { display: inline-block; text-decoration: none; }
.chipbtn { margin-left: .5rem; padding: .25rem .6rem; border-radius: 99px; border: 1px solid var(--line); background: #fff;
  font: 600 .8rem var(--font); color: var(--brand); cursor: pointer; vertical-align: middle; }
.paybox { border: 2px solid var(--accent); }
.bigpay { font-size: 2rem; font-weight: 800; letter-spacing: -.01em; }
.payto { display: grid; gap: .2rem; padding: .8rem 1rem; border-radius: 12px; background: var(--bg); }
.payto b { font-size: 1.1rem; word-break: break-word; }
.back { color: var(--brand); text-decoration: none; font-weight: 600; margin-top: 1rem; display: inline-block; }
.row { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-top: 1.25rem; }
.list { list-style: none; margin: 0; padding: 0; display: grid; gap: .6rem; }
.list a { display: grid; grid-template-columns: 1fr auto; gap: .2rem .8rem; padding: .9rem 1rem; border-radius: var(--r);
  background: var(--surface); border: 1px solid var(--line); color: inherit; text-decoration: none; }
.list .pill { grid-row: 1 / span 2; grid-column: 2; align-self: center; }
.list__sub { color: var(--muted); font-size: .88rem; }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: .4rem 1rem; margin: 0; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; font-weight: 600; }
.demo-code { display: block; margin-top: .4rem; color: #3343a8; }
#toast { position: fixed; left: 50%; bottom: 1.25rem; transform: translateX(-50%); z-index: 9; }
.toast { background: var(--ink); color: #fff; padding: .7rem 1rem; border-radius: 10px; box-shadow: 0 10px 30px rgba(0,0,0,.25); }
.toast--bad { background: var(--bad); }
[hidden] { display: none !important; }
.topnav a, .topnav .link { white-space: nowrap; }
@media (max-width: 30rem) { .top { padding-inline: .9rem; } .topnav { gap: .7rem; font-size: .9rem; } .brand { gap: .45rem; } .brand span { font-size: .98rem; white-space: nowrap; } .brand img { width: 28px; height: 28px; } }
