@font-face { font-family: "Onest"; font-weight: 400 800; font-display: swap; src: url("assets/onest-cyr.woff2") format("woff2"); unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Onest"; font-weight: 400 800; font-display: swap; src: url("assets/onest-lat.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122; }

:root {
  --accent: #1b4dff;
  --accent-dark: #1338be;
  --accent-soft: #e6edff;
  --bg: #f3f6fb;
  --card: #ffffff;
  --ink: #0f172a;
  --muted: #526077;
  --line: #dde4f0;
  --good: #108952;
  --good-bg: #e7f7ef;
  --bad: #c2410c;
  --bad-bg: #fff1ec;
  --r: 18px;
  --shadow: 0 2px 6px rgb(15 23 42 / 0.05), 0 12px 28px rgb(15 23 42 / 0.06);
  font: 16px/1.45 "Onest", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); -webkit-tap-highlight-color: transparent; }
button, a { font: inherit; color: inherit; cursor: pointer; text-decoration: none; }
img { display: block; max-width: 100%; }
.ico { width: 1.15em; height: 1.15em; flex: none; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }

.screen { max-width: 460px; margin: 0 auto; padding: 14px 16px 164px; min-height: 100dvh; animation: fadeIn .22s ease both; }
@keyframes fadeIn { from { opacity: 0; } }

/* Шапка */
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.brand { display: flex; align-items: center; gap: 9px; font-weight: 800; font-size: 17px; letter-spacing: -.015em; }
.brand-mark { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 10px; background: var(--accent); color: #fff; font-size: 17px; box-shadow: 0 4px 12px rgb(27 77 255 / .28); }
.tag-pill { padding: 5px 10px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-dark); font-size: 12px; font-weight: 700; letter-spacing: .01em; }

/* Герой до/после */
.hero-card { position: relative; border-radius: 22px; overflow: hidden; background: #fff; box-shadow: var(--shadow); border: 1px solid var(--line); }
.hero-card img { width: 100%; aspect-ratio: 8 / 5; object-fit: cover; }
.hero-card::after { content: ""; position: absolute; top: 0; bottom: 0; left: 50%; width: 2px; background: rgb(255 255 255 / .88); box-shadow: 0 0 8px rgb(15 23 42 / .2); }
.hero-chip { position: absolute; bottom: 10px; display: inline-flex; align-items: center; gap: 5px; padding: 5px 10px; border-radius: 999px; font-size: 12px; font-weight: 750; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.hero-chip.left { left: 10px; background: rgb(15 23 42 / .72); color: #fff; }
.hero-chip.right { right: 10px; background: rgb(255 255 255 / .94); color: var(--good); box-shadow: 0 4px 12px rgb(15 23 42 / .12); }

h1 { font-size: 25px; line-height: 1.14; letter-spacing: -.025em; font-weight: 800; margin: 14px 0 8px; }
.lead { margin: 0 0 12px; font-size: 14.5px; color: var(--muted); line-height: 1.42; }

.trust-row { list-style: none; padding: 0; margin: 0 0 14px; display: flex; flex-wrap: wrap; gap: 6px 12px; font-size: 12.5px; font-weight: 650; color: var(--muted); }
.trust-row li { display: inline-flex; align-items: center; gap: 4px; }
.trust-row .ico { color: var(--good); width: 14px; height: 14px; stroke-width: 2.8; }

.section-label { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin: 8px 0 8px; }

/* Список документов */
.presets { display: grid; gap: 8px; }
.preset-btn { display: flex; align-items: center; gap: 12px; width: 100%; padding: 11px 13px; text-align: left; background: var(--card); border: 2px solid var(--line); border-radius: 16px; box-shadow: 0 1px 2px rgb(15 23 42 / .03); transition: border-color .14s, background .14s, transform .1s; }
.preset-btn:active { transform: scale(.99); }
.preset-btn.on { border-color: var(--accent); background: #f8faff; box-shadow: 0 6px 18px rgb(27 77 255 / .1); }
.mm-box { display: grid; place-items: center; width: 42px; height: 50px; border-radius: 10px; background: var(--accent-soft); color: var(--accent-dark); font-size: 11px; font-weight: 800; flex: none; border: 1.5px dashed rgb(27 77 255 / .4); line-height: 1.1; text-align: center; }
.preset-body { flex: 1; min-width: 0; }
.preset-head { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.preset-head b { font-size: 15.5px; font-weight: 750; }
.preset-badge { padding: 2px 7px; border-radius: 6px; background: var(--good-bg); color: var(--good); font-size: 11px; font-weight: 750; }
.preset-body small { display: block; margin-top: 2px; font-size: 12.5px; color: var(--muted); line-height: 1.3; }
.radio { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line); color: transparent; flex: none; }
.preset-btn.on .radio, .plan-card.on .radio { background: var(--accent); border-color: var(--accent); color: #fff; }

.notice { display: flex; align-items: flex-start; gap: 9px; margin: 10px 0; padding: 11px 13px; border-radius: 14px; background: var(--bad-bg); color: var(--bad); font-size: 14px; font-weight: 600; }

/* Обработка */
.processing { text-align: center; padding-top: 8vh; }
.scan-box { position: relative; width: 196px; height: 248px; margin: 0 auto 20px; border-radius: 24px; overflow: hidden; background: var(--accent-soft); box-shadow: var(--shadow); border: 2px solid var(--accent); }
.scan-box img { width: 100%; height: 100%; object-fit: cover; }
.scan-beam { position: absolute; left: 8%; right: 8%; top: 10%; height: 3px; border-radius: 3px; background: var(--accent); box-shadow: 0 0 14px 3px rgb(27 77 255 / .6); animation: beam 1.8s ease-in-out infinite alternate; }
@keyframes beam { to { top: 88%; } }
.proc-steps { list-style: none; padding: 0; margin: 16px auto 0; max-width: 310px; display: grid; gap: 11px; text-align: left; }
.proc-steps li { display: flex; align-items: center; gap: 10px; font-size: 14.5px; font-weight: 600; color: var(--muted); }
.proc-steps li.on { color: var(--ink); }
.proc-steps .dot { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); flex: none; font-size: 12px; }
.proc-steps li.done .dot { background: var(--good); color: #fff; }

/* Экран результата */
.icon-btn { display: grid; place-items: center; width: 38px; height: 38px; border: 1px solid var(--line); border-radius: 50%; background: var(--card); color: var(--ink); }
.doc-select { flex: 1; height: 38px; padding: 0 12px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--card); font: inherit; font-size: 14px; font-weight: 700; color: var(--ink); }

.paid-banner { display: flex; align-items: flex-start; gap: 11px; padding: 12px 14px; margin-bottom: 12px; border-radius: 16px; background: var(--good-bg); border: 1.5px solid rgb(16 137 82 / .35); }
.paid-banner .ok { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--good); color: #fff; flex: none; }
.paid-banner b { display: block; font-size: 15px; color: #0a5c36; }
.paid-banner small { font-size: 13px; color: #166534; }

.tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 4px; border-radius: 14px; background: #e5ebf5; margin-bottom: 10px; }
.tab-btn { padding: 8px 10px; border: 0; border-radius: 10px; background: transparent; font-size: 13.5px; font-weight: 700; color: var(--muted); }
.tab-btn.on { background: #fff; color: var(--ink); box-shadow: 0 2px 6px rgb(15 23 42 / .08); }

.stage-card { position: relative; padding: 14px; border-radius: 20px; background: linear-gradient(180deg, #e9eef7, #dde5f2); border: 1px solid var(--line); display: grid; place-items: center; min-height: 290px; }
.stage-card img { max-height: 286px; width: auto; border-radius: 8px; background: #fff; box-shadow: 0 10px 28px rgb(15 23 42 / .16); }
.stage-card.busy img { opacity: .55; filter: blur(1px); }
.stage-pill { position: absolute; top: 10px; right: 10px; padding: 4px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 750; background: rgb(15 23 42 / .76); color: #fff; }
.stage-pill.clean { background: var(--good); }

.controls-card { margin-top: 10px; padding: 11px 12px; border-radius: 16px; background: var(--card); border: 1px solid var(--line); display: grid; gap: 9px; }
.ctrl-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.ctrl-row > span { font-size: 13px; font-weight: 700; color: var(--muted); }
.seg-pills { display: flex; gap: 6px; flex-wrap: wrap; }
.pill-btn { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 10px; border: 1.5px solid var(--line); background: #f8fafd; font-size: 13px; font-weight: 650; }
.pill-btn.on { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-dark); }
.swatch { width: 14px; height: 14px; border-radius: 50%; border: 1px solid #cbd5e1; }

.checks-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; }
.chk-card { padding: 10px 12px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); }
.chk-card span { display: flex; align-items: center; gap: 5px; font-size: 12px; color: var(--muted); font-weight: 650; }
.chk-card span .ico { color: var(--good); width: 13px; height: 13px; stroke-width: 3; }
.chk-card.warn { border-color: #fdba74; background: var(--bad-bg); }
.chk-card.warn span, .chk-card.warn span .ico, .chk-card.warn b { color: var(--bad); }
.chk-card b { display: block; margin-top: 2px; font-size: 14px; font-weight: 750; }

/* Нижняя панель */
.bottom { position: fixed; left: 0; right: 0; bottom: 0; z-index: 8; max-width: 460px; margin: 0 auto; padding: 14px 16px calc(12px + env(safe-area-inset-bottom)); background: linear-gradient(rgb(243 246 251 / 0), var(--bg) 26%); display: grid; gap: 8px; }
.cta { display: flex; align-items: center; justify-content: center; gap: 9px; width: 100%; min-height: 54px; padding: 14px 18px; border: 0; border-radius: 16px; background: var(--accent); color: #fff; font-size: 16.5px; font-weight: 750; box-shadow: 0 10px 24px -8px rgb(27 77 255 / .65); transition: transform .1s, opacity .15s; }
.cta:active { transform: scale(.985); }
.cta:disabled { opacity: .65; }
.cta.secondary { background: var(--card); color: var(--accent); border: 2px solid var(--accent); box-shadow: none; min-height: 48px; font-size: 15.5px; }
.cta.green { background: var(--good); box-shadow: 0 10px 22px -8px rgb(16 137 82 / .6); }
.fine { margin: 2px 0 0; font-size: 12px; color: var(--muted); text-align: center; line-height: 1.35; }
.text-btn { display: block; margin: 2px auto 0; padding: 6px 12px; border: 0; background: none; color: var(--muted); font-size: 14px; font-weight: 600; }

/* Пейволл */
.paywall { padding-top: 10px; padding-bottom: 200px; position: relative; }
.paywall .close-btn { position: absolute; right: 16px; top: 12px; width: 34px; height: 34px; border-radius: 50%; border: 0; background: #e4eaf4; color: var(--muted); display: grid; place-items: center; }
.pw-preview { display: flex; align-items: center; gap: 14px; padding: 12px; border-radius: 18px; background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow); margin-right: 42px; }
.pw-preview img { width: 58px; height: 74px; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); }
.pw-preview b { display: block; font-size: 15px; }
.pw-preview small { color: var(--good); font-size: 12.5px; font-weight: 700; }
.pw-bullets { list-style: none; padding: 0; margin: 16px 0; display: grid; gap: 10px; }
.pw-bullets li { display: flex; align-items: flex-start; gap: 10px; font-size: 14.5px; font-weight: 600; }
.pw-bullets .tick { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--good-bg); color: var(--good); flex: none; margin-top: 1px; }

.plans { display: grid; gap: 10px; margin-top: 14px; }
.plan-card { position: relative; display: flex; align-items: center; gap: 12px; width: 100%; padding: 13px 15px; text-align: left; background: var(--card); border: 2px solid var(--line); border-radius: 16px; }
.plan-card.on { border-color: var(--accent); background: #f7faff; }
.plan-badge { position: absolute; right: 12px; top: -10px; padding: 2px 9px; border-radius: 999px; background: var(--ink); color: #fff; font-size: 11px; font-weight: 800; text-transform: uppercase; }
.plan-card b { display: block; font-size: 16px; }
.plan-card small { display: block; font-size: 13px; color: var(--muted); margin-top: 1px; }

/* Скидочная шторка −30% */
.sheet-wrap { position: fixed; inset: 0; z-index: 30; }
.scrim { position: absolute; inset: 0; background: rgb(15 23 42 / .5); }
.discount-sheet { position: absolute; left: 0; right: 0; bottom: 0; max-width: 460px; margin: 0 auto; padding: 24px 20px calc(18px + env(safe-area-inset-bottom)); border-radius: 26px 26px 0 0; background: var(--card); text-align: center; box-shadow: 0 -12px 40px rgb(15 23 42 / .22); animation: slideUp .24s ease both; }
@keyframes slideUp { from { transform: translateY(100%); } }
.disc-pill { display: inline-block; padding: 5px 14px; border-radius: 999px; background: var(--bad-bg); color: var(--bad); font-size: 20px; font-weight: 850; }
.discount-sheet h2 { margin: 10px 0 6px; font-size: 22px; }
.price-pair { display: flex; align-items: baseline; justify-content: center; gap: 12px; margin: 6px 0 16px; }
.price-pair s { font-size: 19px; color: var(--muted); }
.price-pair b { font-size: 34px; font-weight: 850; color: var(--accent); }

/* Ожидание/ошибка оплаты */
.status-screen { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; min-height: 78dvh; gap: 14px; }
.spinner { width: 44px; height: 44px; border-radius: 50%; border: 4px solid var(--accent-soft); border-top-color: var(--accent); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Подвал и управление подпиской */
.foot-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 16px; margin-top: 16px; padding-top: 6px; }
.foot-link { appearance: none; background: none; border: 0; padding: 4px 2px; font: inherit; font-size: 13px; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.sub-card { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 16px; display: grid; gap: 12px; margin-top: 12px; }
.sub-badge { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 999px; font-size: 13px; font-weight: 800; background: #f1f5f9; color: var(--muted); }
.sub-badge[data-status="active"] { background: #dcfce7; color: #166534; }
.sub-badge[data-status="canceled"] { background: #fef3c7; color: #92400e; }
.sub-rows { margin: 0; display: grid; gap: 9px; }
.sub-row { display: flex; justify-content: space-between; gap: 12px; padding-bottom: 8px; border-bottom: 1px solid var(--line); font-size: 14px; }
.sub-row:last-child { border-bottom: 0; padding-bottom: 0; }
.sub-row dt { color: var(--muted); }
.sub-row dd { margin: 0; font-weight: 700; text-align: right; }
.sub-multi { border-top: 1px dashed var(--line); padding-top: 10px; display: grid; gap: 6px; }
.sub-multi-title { margin: 0; font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; }
.sub-multi-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; font-size: 13.5px; }
.sub-multi-list li { display: flex; justify-content: space-between; gap: 10px; }
.sub-note { margin: 0; font-size: 14px; color: var(--muted); line-height: 1.45; }
.cta.danger-outline { background: transparent; color: #b91c1c; border: 1.5px solid rgb(185 28 28 / .35); box-shadow: none; }
.cta.danger { background: #dc2626; color: #fff; box-shadow: none; }

