/* Проверка договоров — стили без сборки. Сначала десктоп, ниже 1024 / 720 px — планшет и телефон. */

@font-face { font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("/static/fonts/inter-cyrillic-wght-normal.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("/static/fonts/inter-latin-wght-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  --bg: #f6f7f9;
  --card: #ffffff;
  --fg: #0f172a;
  --fg-2: #334155;
  --muted: #556070;
  --border: #e3e6eb;
  --line: #eef0f3;
  --accent: #1e3a8a;
  --accent-hover: #1e40af;
  --accent-soft: #eef2fb;
  --accent-border: #c9d3ea;
  --crit: #b42318; --crit-bg: #fef3f2; --crit-dot: #d92d20; --crit-border: #fecdca;
  --warn: #b54708; --warn-bg: #fffaeb; --warn-dot: #f79009; --warn-border: #fedf89;
  --ok: #067647;   --ok-bg: #ecfdf3;   --ok-dot: #17b26a;   --ok-border: #abefc6;
  --info: #175cd3; --info-bg: #eff8ff; --info-dot: #2e90fa; --info-border: #b2ddff;
  --radius: 16px;
  --font: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  --serif: Georgia, "Noto Serif", "Times New Roman", serif;
  --shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 24px 48px -28px rgba(15, 23, 42, .2);
  --topbar-h: 68px;
  --nav-h: 64px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--topbar-h) + 16px); }
body { margin: 0; min-height: 100vh; font-family: var(--font); color: var(--fg); background: var(--bg);
  line-height: 1.5; -webkit-font-smoothing: antialiased; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }
button { font: inherit; color: inherit; cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .55; }
h1, h2, h3, h4, p, ol, ul, dl, dd { margin: 0; }
ol, ul { padding: 0; list-style: none; }
hr { border: 0; border-top: 1px solid var(--border); margin: 0; }
q { quotes: "«" "»"; }
[x-cloak], [hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ─── Раскладка ───────────────────────────────────────────────────────── */
.container { width: 100%; max-width: 1248px; margin: 0 auto; padding: 0 24px; }
.container.narrow { max-width: 688px; }
.page { padding: 40px 0 72px; min-height: calc(100vh - var(--topbar-h)); }
.stack > * + * { margin-top: 16px; }
.stack-sm > * + * { margin-top: 8px; }
.stack-lg > * + * { margin-top: 24px; }
.stack-xl > * + * { margin-top: 40px; }
.row { display: flex; align-items: center; gap: 8px; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.wrap { flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }
.center { text-align: center; }
.right { text-align: right; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mt-1 { margin-top: 4px; } .mt-2 { margin-top: 8px; }
.muted { color: var(--muted); }
.sm { font-size: 14px; } .xs { font-size: 12px; }
.semibold { font-weight: 600; }
.text-crit { color: var(--crit); } .text-ok { color: var(--ok); }
.mobile-only { display: none !important; }

/* ─── Типографика ─────────────────────────────────────────────────────── */
.serif { font-family: var(--serif); font-weight: 400; letter-spacing: -.01em; }
.display { font-family: var(--serif); font-weight: 400; font-size: 60px; line-height: 1.04; letter-spacing: -.015em; }
.display-sm { font-size: 44px; line-height: 1.08; }
.h1 { font-size: 40px; line-height: 1.1; }
.h2 { font-size: 32px; line-height: 1.15; }
.h3 { font-size: 18px; font-weight: 700; line-height: 1.35; }
.h4 { font-size: 15px; font-weight: 600; }
.lead { font-size: 18px; line-height: 1.55; color: var(--muted); max-width: 540px; }
.lead-sm { font-size: 16px; line-height: 1.6; color: var(--fg-2); }
.eyebrow { font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.eyebrow-accent { color: var(--accent); }
.disclaimer { font-size: 13px; color: var(--muted); }

/* ─── Иконки, спиннер ─────────────────────────────────────────────────── */
.icon { width: 20px; height: 20px; flex-shrink: 0; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.icon-xs { width: 12px; height: 12px; } .icon-sm { width: 16px; height: 16px; }
.spinner { display: inline-block; width: 24px; height: 24px; flex-shrink: 0; border-radius: 999px;
  border: 3px solid #d6def0; border-top-color: var(--accent); animation: spin 1s linear infinite; }
.spinner-sm { width: 20px; height: 20px; }
.spinner-xs { width: 14px; height: 14px; border-width: 2px; vertical-align: -2px; margin-right: 6px; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation-duration: 3s; } }

/* ─── Кнопки ──────────────────────────────────────────────────────────── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px;
  border-radius: 12px; border: 1px solid transparent; font-size: 14px; font-weight: 600; line-height: 1.2;
  text-align: center; transition: background .15s, border-color .15s; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover:not(:disabled) { background: var(--accent-hover); color: #fff; }
.btn-outline { background: var(--card); border-color: var(--border); color: var(--fg); }
.btn-outline:hover:not(:disabled) { background: var(--bg); color: var(--fg); }
.btn-ghost { background: transparent; color: var(--accent); }
.btn-ghost:hover:not(:disabled) { background: var(--accent-soft); }
.btn-danger { background: #fff; border-color: var(--crit-border); color: var(--crit); }
.btn-danger:hover:not(:disabled) { background: var(--crit-bg); color: var(--crit); }
.btn-danger-solid { background: var(--crit); color: #fff; }
.btn-danger-solid:hover:not(:disabled) { background: #912018; color: #fff; }
.btn-soft-ok { background: #fff; border-color: #a6e1c2; color: var(--ok); }
.btn-lg { min-height: 52px; font-size: 15px; border-radius: 14px; padding: 0 22px; }
.btn-sm { min-height: 36px; padding: 0 12px; font-size: 13px; border-radius: 10px; }
.btn-block { display: flex; width: 100%; }
.link { color: var(--accent); font-weight: 600; }
.link.muted { color: var(--muted); }
.chip-btn { display: inline-flex; align-items: center; gap: 6px; min-height: 28px; padding: 0 8px; border: 1px solid var(--border);
  border-radius: 8px; background: #fff; color: var(--muted); font-size: 12px; }

/* ─── Карточки, плашки ────────────────────────────────────────────────── */
.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); }
.card-pad { padding: 20px; }
.card-pad-lg { padding: 24px; }
.card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 18px 20px 10px; }
.card-empty { padding: 4px 20px 20px; font-size: 14px; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 12px;
  font-weight: 600; white-space: nowrap; color: var(--fg-2); background: #f2f4f7; }
.pill.tone-crit { color: var(--crit); background: var(--crit-bg); }
.pill.tone-warn { color: var(--warn); background: var(--warn-bg); }
.pill.tone-ok { color: var(--ok); background: var(--ok-bg); }
.pill.tone-info { color: var(--info); background: var(--info-bg); }
.pill.tone-accent { color: var(--accent); background: var(--accent-soft); }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 999px; flex-shrink: 0; background: #d0d5dd; }
.dot.tone-crit { background: var(--crit-dot); } .dot.tone-warn { background: var(--warn-dot); }
.dot.tone-ok { background: var(--ok-dot); } .dot.tone-info { background: var(--info-dot); }
.alert { border: 1px solid var(--crit-border); background: var(--crit-bg); color: var(--crit); border-radius: 12px; padding: 12px 14px; font-size: 14px; }
.alert-title { font-weight: 700; margin-bottom: 2px; }
.notice { display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-radius: 14px; background: var(--accent-soft);
  border: 1px solid var(--accent-border); color: var(--fg); font-size: 15px; }
.notice:hover { color: var(--fg); background: #e6ecf9; }
.notice-link { display: inline-flex; align-items: center; gap: 4px; color: var(--accent); font-weight: 600; }
.guarantee { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; background: var(--bg);
  font-size: 14px; line-height: 1.45; color: var(--fg-2); }
.guarantee .icon { color: var(--ok); margin-top: 1px; }
.empty { display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; padding: 48px 24px; }
.empty-icon { width: 56px; height: 56px; border-radius: 16px; background: var(--accent-soft); color: var(--accent);
  display: flex; align-items: center; justify-content: center; }
.empty-note { display: flex; gap: 10px; align-items: center; color: var(--ok); font-weight: 600; }

/* Полоса по разделам */
.bar { display: flex; gap: 2px; height: 10px; border-radius: 999px; overflow: hidden; background: var(--line); }
.bar span { display: block; height: 100%; }
.bar-crit { background: var(--crit-dot); } .bar-warn { background: var(--warn-dot); } .bar-ok { background: var(--ok-dot); }
.bar-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 8px; font-size: 13px; color: var(--muted); }
.bar-legend span { display: inline-flex; align-items: center; gap: 6px; }
.bar-legend b { color: var(--fg); }
.bar-legend .dot { width: 8px; height: 8px; }

/* ─── Шапка и навигация ───────────────────────────────────────────────── */
.topbar { position: sticky; top: 0; z-index: 40; background: rgba(255, 255, 255, .92); backdrop-filter: saturate(1.4) blur(8px);
  border-bottom: 1px solid var(--border); }
.topbar-inner { height: var(--topbar-h); display: flex; align-items: center; gap: 40px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--fg); font-weight: 700; font-size: 16px; }
.brand:hover { color: var(--fg); }
.brand-mark { width: 36px; height: 36px; border-radius: 10px; background: var(--accent); color: #fff; display: flex; align-items: center; justify-content: center; }
.topnav { display: flex; gap: 4px; flex: 1; }
.topnav a { padding: 10px 14px; border-radius: 10px; color: var(--fg-2); font-size: 14px; font-weight: 500; }
.topnav a:hover { background: var(--bg); color: var(--fg); }
.topnav a[aria-current="page"] { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.avatar-btn { width: 44px; height: 44px; border-radius: 999px; border: 1px solid var(--border); display: flex; align-items: center;
  justify-content: center; color: var(--fg); background: #fff; }
.avatar-btn.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.bottom-nav { display: none; }

/* ─── Главная ─────────────────────────────────────────────────────────── */
.hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 64px; align-items: center; }
.hero-text > * + * { margin-top: 24px; }
.hero-facts { display: flex; flex-wrap: wrap; gap: 12px 28px; font-size: 14px; color: var(--fg-2); }
.hero-facts li { display: inline-flex; align-items: center; gap: 8px; }
.hero-facts .icon { color: var(--accent); width: 18px; height: 18px; }
.upload-card { background: var(--card); border: 1px solid var(--border); border-radius: 24px; padding: 24px; box-shadow: var(--shadow); }
.upload-card > * + * { margin-top: 16px; }
.dropzone { display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; padding: 48px 24px;
  border: 2px dashed #9aa6c6; border-radius: 18px; background: var(--accent-soft); color: var(--fg); cursor: pointer;
  transition: border-color .15s, background .15s; }
.dropzone:hover, .dropzone.drag { border-color: var(--accent); background: #e6ecf9; }
.dropzone-icon { width: 64px; height: 64px; border-radius: 18px; background: var(--accent); color: #fff; display: flex; align-items: center; justify-content: center; }
.dropzone-icon .icon { width: 30px; height: 30px; }
.dropzone-title { font-size: 20px; font-weight: 600; }
.dropzone-hint { font-size: 15px; color: var(--muted); }
.dropzone-hint u { color: var(--accent); font-weight: 600; text-underline-offset: 3px; }
.dropzone-formats { font-size: 13px; color: var(--muted); }
.uploading { display: flex; align-items: center; gap: 16px; padding: 32px 20px; border-radius: 18px; background: var(--accent-soft); }
#contract-file:focus-visible + .dropzone { outline: 2px solid var(--accent); outline-offset: 2px; }

.split { display: grid; grid-template-columns: 7fr 5fr; gap: 48px; align-items: start; }
.preview-verdict { display: flex; gap: 24px; align-items: center; }
.verdict-chip { padding: 12px 16px; border-radius: 12px; border: 1px solid; }
.verdict-chip small { display: block; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.verdict-chip b { font-size: 20px; }
.verdict-chip.tone-crit { background: var(--crit-bg); border-color: var(--crit-border); color: var(--crit); }
.steps { display: flex; flex-direction: column; gap: 20px; }
.steps li { display: flex; gap: 14px; }
.steps b { font-size: 16px; }
.steps p { font-size: 14px; color: var(--muted); }
.step-num { width: 32px; height: 32px; flex-shrink: 0; border-radius: 999px; background: var(--accent-soft); color: var(--accent);
  font-weight: 700; display: flex; align-items: center; justify-content: center; }
.blocks-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.block-tile { background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 18px; display: flex; flex-direction: column; gap: 4px; }
.block-tile span { font-size: 13px; color: var(--muted); }
.faq-grid { display: grid; grid-template-columns: 4fr 8fr; gap: 48px; }
details > summary { list-style: none; cursor: pointer; }
details > summary::-webkit-details-marker { display: none; }
.chev { color: var(--muted); transition: transform .2s; }
details[open] > summary .chev { transform: rotate(180deg); }
.faq { background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 18px 20px; }
.faq summary { display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: 16px; font-weight: 600; }
.faq p { margin-top: 10px; font-size: 15px; line-height: 1.55; color: var(--muted); }

/* Сравнение «сейчас / как исправить» */
.compare { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.compare > div { padding: 14px; border-radius: 12px; display: flex; flex-direction: column; gap: 6px; font-size: 14px; line-height: 1.5; }
.compare small { font-size: 12px; font-weight: 700; letter-spacing: .02em; color: var(--muted); }
.compare q { font-style: italic; color: var(--fg-2); }
.compare-now { background: var(--bg); }
.compare-fix { background: var(--ok-bg); }
.compare-fix small { color: var(--ok); }
.compare-fix .btn { align-self: flex-start; margin-top: 4px; }
.compare > div:only-child { grid-column: 1 / -1; }
.compare small.text-crit { color: var(--crit); }

/* ─── Оформление и оплата ─────────────────────────────────────────────── */
.stepper { display: flex; align-items: center; justify-content: center; gap: 12px; font-size: 14px; color: var(--muted); }
.stepper li { display: inline-flex; align-items: center; gap: 8px; }
.stepper li span { width: 24px; height: 24px; border-radius: 999px; border: 1px solid #d0d5dd; font-size: 12px;
  display: inline-flex; align-items: center; justify-content: center; }
.stepper li.done { color: var(--ok); font-weight: 600; }
.stepper li.current { color: var(--fg); font-weight: 700; }
.stepper li.current span { background: var(--accent); border-color: var(--accent); color: #fff; }
.stepper li.line { width: 40px; height: 1px; background: #d0d5dd; }
.checkout-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 32px; align-items: start; }
.file-row { display: flex; align-items: center; gap: 14px; }
.file-badge { width: 44px; height: 54px; flex-shrink: 0; border-radius: 8px; background: var(--accent-soft); color: var(--accent);
  font-size: 11px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.choice-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.choice { min-height: 72px; padding: 14px 16px; border-radius: 14px; border: 1px solid var(--border); background: #fff;
  text-align: left; display: flex; flex-direction: column; gap: 2px; }
.choice b { font-size: 15px; }
.choice span { font-size: 13px; color: var(--muted); }
.choice[aria-checked="true"] { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); background: var(--accent-soft); }
.checklist { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 24px; font-size: 14px; color: var(--fg-2); }
.checklist li { display: flex; gap: 8px; }
.checklist .icon { color: var(--ok); width: 18px; height: 18px; }
.credit-box { padding: 16px; border-radius: 14px; background: var(--ok-bg); border: 1px solid var(--ok-border); }
.divider-text { display: flex; align-items: center; gap: 12px; font-size: 13px; color: var(--muted); }
.divider-text::before, .divider-text::after { content: ""; flex: 1; border-top: 1px solid var(--border); }
.plans { display: flex; flex-direction: column; gap: 10px; }
.plan { width: 100%; display: flex; align-items: flex-start; gap: 12px; padding: 14px 16px; border: 1px solid var(--border);
  border-radius: 14px; background: #fff; text-align: left; }
.plan b { display: block; font-size: 15px; }
.plan small { display: block; margin-top: 2px; font-size: 13px; line-height: 1.4; color: var(--muted); }
.plan-radio { width: 20px; height: 20px; flex-shrink: 0; margin-top: 1px; border-radius: 999px; border: 2px solid #98a2b3; background: #fff; }
.plan-price { font-size: 16px; font-weight: 700; white-space: nowrap; }
.plan[aria-checked="true"] { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); background: var(--accent-soft); }
.plan[aria-checked="true"] .plan-radio { border: 6px solid var(--accent); }
.pay-card { position: sticky; top: calc(var(--topbar-h) + 24px); box-shadow: var(--shadow); }
.price { font-size: 24px; font-weight: 700; }
.loading-block { display: flex; align-items: center; gap: 12px; justify-content: center; padding: 24px 0; color: var(--muted); }
#payment-widget-container { min-height: 320px; }

/* ─── Обработка ───────────────────────────────────────────────────────── */
.stages { display: flex; flex-direction: column; gap: 18px; }
.stages li { display: flex; gap: 14px; align-items: flex-start; color: #8a94a6; font-size: 15px; }
.stages li > .icon, .stages li > .spinner, .stages li > i { margin-top: 1px; }
.stages li > i { width: 20px; height: 20px; flex-shrink: 0; border-radius: 999px; border: 2px solid #d0d5dd; }
.stages li.done { color: var(--fg); }
.stages li.done > .icon { color: var(--ok); }
.stages li.current { color: var(--fg); }
.stages small { display: block; font-size: 13px; color: var(--muted); }
.push-offer { display: flex; align-items: center; gap: 16px; padding: 18px 20px; border-radius: 16px; background: var(--accent-soft); }
.push-offer-icon { width: 44px; height: 44px; flex-shrink: 0; border-radius: 12px; background: #fff; color: var(--accent);
  display: flex; align-items: center; justify-content: center; }

/* ─── Результат ───────────────────────────────────────────────────────── */
.crumbs { display: flex; gap: 6px; font-size: 13px; color: var(--muted); min-width: 0; }
.crumbs a { color: var(--muted); }
.result-title-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-top: 12px; }
.meta-line { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; font-size: 13px; color: var(--muted); }
.result-grid { display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 40px; align-items: start; }
.result-aside { position: sticky; top: calc(var(--topbar-h) + 24px); }
.tabs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; padding: 4px; border-radius: 12px; background: #e9ecf1; }
.tabs button { min-height: 40px; border: 0; border-radius: 9px; background: transparent; color: var(--muted); font-size: 14px; font-weight: 500; }
.tabs button[aria-selected="true"] { background: #fff; color: var(--fg); font-weight: 600; box-shadow: 0 1px 3px rgba(15, 23, 42, .12); }
.verdict { border-radius: 16px; padding: 18px; border: 1px solid; display: flex; flex-direction: column; gap: 6px; }
.verdict small { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.verdict b { font-size: 24px; }
.verdict p { font-size: 14px; line-height: 1.5; color: var(--fg); }
.verdict.tone-crit { background: var(--crit-bg); border-color: var(--crit-border); } .verdict.tone-crit b { color: var(--crit); }
.verdict.tone-warn { background: var(--warn-bg); border-color: var(--warn-border); } .verdict.tone-warn b { color: var(--warn); }
.verdict.tone-ok { background: var(--ok-bg); border-color: var(--ok-border); } .verdict.tone-ok b { color: var(--ok); }
.sections-nav { padding: 8px; }
.sections-nav-head { padding: 8px 10px 12px; display: flex; flex-direction: column; gap: 8px; font-size: 13px; font-weight: 600; color: var(--muted); }
.sections-nav a { min-height: 40px; padding: 0 10px; border-radius: 10px; display: flex; align-items: center; gap: 10px; color: var(--fg); font-size: 14px; }
.sections-nav a:hover { background: var(--bg); }
.sections-nav small { font-size: 12px; color: var(--muted); }
.finding h3 { font-size: 18px; }
.block { background: var(--card); border: 1px solid var(--border); border-radius: 14px; }
.block > summary { min-height: 56px; padding: 12px 18px; display: flex; align-items: center; gap: 12px; font-size: 16px; font-weight: 600; }
.block-body { padding: 0 18px 18px 40px; font-size: 15px; line-height: 1.55; color: var(--fg-2); }
.block-finding { padding: 12px 14px; border-radius: 12px; background: var(--bg); display: flex; flex-direction: column; gap: 6px; }
.block-finding q { font-style: italic; font-size: 14px; }
.rows > * + * { border-top: 1px solid var(--line); }
.missing-row { display: grid; grid-template-columns: 260px minmax(0, 1fr) auto; gap: 20px; align-items: start; padding: 16px 20px; }
.missing-row p { font-size: 14px; color: var(--muted); }
.feedback > * + * { margin-top: 14px; }
.feedback-row { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.rate-btn[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.textarea { width: 100%; padding: 12px 14px; border-radius: 12px; border: 1px solid #d0d5dd; font: inherit; font-size: 14px; line-height: 1.45;
  resize: vertical; color: var(--fg); background: #fff; }
.textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.ask-btn { align-self: flex-start; margin-left: -12px; }
.chat-cta { display: flex; align-items: center; gap: 16px; padding: 20px 24px; background: var(--accent-soft); border-color: var(--accent-border); }
.chat-cta-icon { width: 44px; height: 44px; flex-shrink: 0; border-radius: 12px; background: #fff; color: var(--accent);
  display: flex; align-items: center; justify-content: center; }
.checklist.one-col { grid-template-columns: minmax(0, 1fr); }

/* Чат с юристом-ИИ: панель справа (≥1280 px сдвигает страницу, уже — поверх), на телефоне — весь экран */
.chat-panel { position: fixed; top: var(--topbar-h); right: 0; bottom: 0; z-index: 45; width: 440px; margin: 0 !important;
  display: flex; flex-direction: column; background: #fff; border-left: 1px solid var(--border);
  box-shadow: -24px 0 48px -32px rgba(15, 23, 42, .3); }
.chat-backdrop { position: fixed; inset: var(--topbar-h) 0 0 0; z-index: 44; margin: 0 !important; background: rgba(15, 23, 42, .35); }
.chat-head { display: flex; align-items: center; gap: 12px; padding: 12px 12px 12px 20px; border-bottom: 1px solid var(--border); }
.chat-head-icon { width: 36px; height: 36px; flex-shrink: 0; border-radius: 10px; background: var(--accent); color: #fff;
  display: flex; align-items: center; justify-content: center; }
.chat-head-icon .icon { width: 18px; height: 18px; }
.chat-title { font-size: 16px; font-weight: 600; }
.chat-head small { display: block; font-size: 12px; color: var(--muted); }
.icon-btn { width: 40px; height: 40px; flex-shrink: 0; border: 0; border-radius: 10px; background: none; display: flex; align-items: center; justify-content: center; }
.icon-btn:hover { background: var(--bg); }
.chat-body { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.chat-log { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 20px; display: flex; flex-direction: column; gap: 14px; }
.chat-empty { display: flex; flex-direction: column; gap: 14px; font-size: 14px; color: var(--fg-2); }
.suggest { display: flex; flex-wrap: wrap; gap: 8px; }
.suggest button { min-height: 34px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--accent-border); background: var(--accent-soft);
  color: var(--accent); font-size: 13px; text-align: left; }
.suggest button:hover { background: #e6ecf9; }
.msg { max-width: 88%; display: flex; flex-direction: column; gap: 8px; font-size: 14px; line-height: 1.55; }
.msg p { white-space: pre-wrap; overflow-wrap: anywhere; }
.msg-user { align-self: flex-end; padding: 10px 14px; border-radius: 16px 16px 4px 16px; background: var(--accent); color: #fff; }
.msg-ai { align-self: flex-start; max-width: 94%; padding: 12px 16px; border-radius: 16px 16px 16px 4px; background: var(--bg); color: var(--fg); }
.msg-ai .chip-btn { align-self: flex-start; }
.typing { display: inline-flex; gap: 4px; padding: 4px 0; }
.typing i { width: 7px; height: 7px; border-radius: 999px; background: #98a2b3; animation: blink 1.2s infinite both; }
.typing i:nth-child(2) { animation-delay: .2s; } .typing i:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }
.chat-alert { margin: 0 16px 8px; }
.chat-form { display: flex; align-items: flex-end; gap: 8px; padding: 12px 16px 6px; border-top: 1px solid var(--border); }
.chat-form textarea { flex: 1; min-width: 0; min-height: 48px; max-height: 160px; padding: 12px 14px; border-radius: 14px; border: 1px solid #d0d5dd;
  font: inherit; font-size: 14px; line-height: 1.45; resize: none; color: var(--fg); background: #fff; }
.chat-form textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.send-btn { width: 48px; height: 48px; flex-shrink: 0; border: 0; border-radius: 12px; background: var(--accent); color: #fff;
  display: flex; align-items: center; justify-content: center; }
.send-btn:hover:not(:disabled) { background: var(--accent-hover); }
.chat-limit { padding: 14px 20px; border-top: 1px solid var(--border); }
.chat-note { padding: 0 16px 12px; font-size: 12px; color: var(--muted); }
.chat-limit + .chat-note { padding-top: 0; }
.chat-unlock { flex: 1; min-height: 0; overflow-y: auto; padding: 24px 20px; display: flex; flex-direction: column; gap: 18px; }
.chat-unlock #chat-widget-container { min-height: 320px; }
@media (min-width: 1280px) {
  body.chat-open .page, body.chat-open .footer { padding-right: 440px; }
  body.chat-open .result-grid { grid-template-columns: 300px minmax(0, 1fr); gap: 28px; }
  .chat-backdrop { display: none !important; }
}
@media (max-width: 1279px) { body.chat-open { overflow: hidden; } }

.todo { display: flex; gap: 12px; align-items: flex-start; font-size: 15px; line-height: 1.45; cursor: pointer; }
.todo input { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--accent); flex-shrink: 0; }
.todo input:checked + span { color: var(--muted); text-decoration: line-through; }

/* ─── Мои договоры ────────────────────────────────────────────────────── */
.list-table { overflow: hidden; }
.list-head, .list-row { display: grid; grid-template-columns: minmax(0, 2.2fr) minmax(0, 1fr) minmax(0, 1.1fr) minmax(0, 1.3fr) minmax(0, 1fr);
  gap: 16px; align-items: center; padding: 14px 20px; }
.list-head { font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); border-bottom: 1px solid var(--border); }
.list-row { color: var(--fg); font-size: 14px; border-top: 1px solid var(--line); }
.list-head + .list-row { border-top: 0; }
.list-row:hover { background: #fafbfc; color: var(--fg); }
.list-title { font-weight: 600; }

/* ─── Профиль ─────────────────────────────────────────────────────────── */
.identity { display: flex; align-items: center; gap: 20px; padding: 24px 28px; }
.identity-avatar { width: 64px; height: 64px; flex-shrink: 0; border-radius: 999px; background: var(--accent-soft); color: var(--accent);
  font-family: var(--serif); font-size: 30px; display: flex; align-items: center; justify-content: center; }
.identity .pill { white-space: normal; }
.identity-cta { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.stat { background: var(--card); border: 1px solid var(--border); border-radius: 16px; padding: 18px 20px; display: flex; flex-direction: column; gap: 4px; }
.stat small { font-size: 13px; color: var(--muted); }
.stat b { font-size: 30px; font-variant-numeric: tabular-nums; }
.profile-grid { display: grid; grid-template-columns: minmax(0, 8fr) minmax(0, 4fr); gap: 24px; align-items: start; }
.recent-row { display: grid; grid-template-columns: minmax(0, 1fr) 130px 120px 120px; gap: 16px; align-items: center; padding: 14px 20px;
  border-top: 1px solid var(--line); color: var(--fg); font-size: 14px; }
.recent-row:hover { background: #fafbfc; color: var(--fg); }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; padding: 8px 20px; font-size: 12px; font-weight: 600; color: var(--muted); }
.table td { padding: 14px 20px; border-top: 1px solid var(--line); }
.setting { width: 100%; min-height: 64px; padding: 10px 20px; display: flex; gap: 12px; align-items: center; border: 0;
  border-top: 1px solid var(--line); background: none; text-align: left; }
.setting b { display: block; font-size: 14px; }
.setting small { display: block; font-size: 13px; color: var(--muted); }
.setting-link:hover { background: #fafbfc; }
.switch { width: 48px; height: 28px; flex-shrink: 0; border: 0; border-radius: 999px; background: #d0d5dd; position: relative; transition: background .15s; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 999px; background: #fff; transition: transform .15s; }
.switch[aria-checked="true"] { background: var(--accent); }
.switch[aria-checked="true"]::after { transform: translateX(20px); }
.help-card { background: var(--accent-soft); border-color: transparent; }

/* ─── Подвал и документы ──────────────────────────────────────────────── */
.footer { padding: 16px 0; border-top: 1px solid var(--border); background: #fff; font-size: 13px; color: var(--muted); }
.footer-inner { min-height: 32px; display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 8px 24px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 6px 20px; }
.footer-links a { color: var(--muted); }
.footer-links a:hover { color: var(--accent); }
.fineprint { font-size: 12px; line-height: 1.45; color: var(--muted); }
.fineprint a { color: var(--muted); text-decoration: underline; text-underline-offset: 2px; }
.legal { font-size: 15px; line-height: 1.65; color: var(--fg-2); }
.legal > * + * { margin-top: 14px; }
.legal h1 { color: var(--fg); margin-top: 6px; }
.legal h2 { margin-top: 28px; font-size: 18px; font-weight: 700; color: var(--fg); }
.legal ol { list-style: decimal; padding-left: 22px; }
.legal ol li + li { margin-top: 6px; }
.legal a { text-decoration: underline; text-underline-offset: 2px; }
.requisites { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 8px 16px; padding: 16px 18px; border-radius: 12px; background: var(--bg); }
.requisites dt { color: var(--muted); font-size: 14px; }
.requisites dd { color: var(--fg); overflow-wrap: anywhere; }
.legal-nav { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.legal-nav a { padding: 8px 12px; border-radius: 10px; font-size: 14px; color: var(--fg-2); }
.legal-nav a:hover { background: #fff; }
.legal-nav a[aria-current="page"] { background: var(--accent-soft); color: var(--accent); font-weight: 600; }

/* ─── Диалог, тосты ───────────────────────────────────────────────────── */
dialog.modal { width: min(440px, calc(100% - 32px)); border: 0; border-radius: 20px; padding: 24px; box-shadow: var(--shadow); }
dialog.modal > * + * { margin-top: 14px; }
dialog.modal::backdrop { background: rgba(15, 23, 42, .45); }
.toasts { position: fixed; left: 50%; top: 16px; transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column;
  gap: 8px; width: min(380px, calc(100% - 32px)); pointer-events: none; }
.toast { background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 12px 16px; font-size: 14px;
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, .2); }
.toast-title { font-weight: 600; }
.toast.success .toast-title { color: var(--ok); }
.toast.error .toast-title { color: var(--crit); }

/* ─── Окно поддержки ──────────────────────────────────────────────────── */
.modal-support { width: min(480px, calc(100% - 32px)); }
dialog.modal-support > form, dialog.modal-support > .support-done { margin-top: 0; }
.modal-close { position: absolute; top: 14px; right: 14px; width: 36px; height: 36px; display: grid; place-items: center;
  border: 0; border-radius: 10px; background: transparent; color: var(--muted); }
.modal-close:hover { background: var(--bg); color: var(--fg); }
.modal-head { display: flex; gap: 14px; align-items: flex-start; padding-right: 32px; }
.modal-icon { flex-shrink: 0; width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent); }
.modal-icon-ok { width: 56px; height: 56px; border-radius: 50%; margin: 4px auto 0; background: var(--ok-bg); color: var(--ok); }
.modal-icon-ok .icon { width: 26px; height: 26px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field-label { font-size: 14px; font-weight: 600; color: var(--fg-2); }
.field-count { font-weight: 400; color: var(--muted); font-variant-numeric: tabular-nums; }
.field-count.is-full { color: var(--warn); }
.input { width: 100%; min-height: 46px; padding: 0 14px; border-radius: 12px; border: 1px solid #d0d5dd; font: inherit;
  font-size: 15px; color: var(--fg); background: #fff; }
.input::placeholder, .textarea::placeholder { color: #98a2b3; }
.input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.input[aria-invalid="true"], .textarea[aria-invalid="true"] { border-color: var(--crit-dot); }
.input[aria-invalid="true"]:focus, .textarea[aria-invalid="true"]:focus { box-shadow: 0 0 0 3px var(--crit-bg); }
.field-error { font-size: 13px; color: var(--crit); }
.support-topic { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px;
  background: var(--accent-soft); color: var(--accent); font-size: 13px; font-weight: 600; }
.support-meta { display: flex; gap: 8px; align-items: flex-start; padding: 10px 12px; border-radius: 12px;
  background: var(--bg); font-size: 13px; line-height: 1.45; color: var(--muted); }
.support-meta .icon { margin-top: 1px; }
.support-meta code { font-size: 12px; color: var(--fg-2); }
.notice-error { display: flex; gap: 8px; align-items: flex-start; padding: 10px 12px; border-radius: 12px;
  background: var(--crit-bg); border: 1px solid var(--crit-border); color: var(--crit); font-size: 14px; }
.notice-error .icon { margin-top: 2px; }
.support-done { text-align: center; padding: 8px 0 0; }
.support-done .btn { margin-top: 20px; }

/* ═══ Планшет ════════════════════════════════════════════════════════════ */
@media (max-width: 1024px) {
  .display { font-size: 48px; }
  .hero, .split, .checkout-grid, .result-grid, .profile-grid, .faq-grid { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .pay-card, .result-aside { position: static; }
  .blocks-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .result-title-row { flex-direction: column; align-items: flex-start; }
}

/* ═══ Телефон ════════════════════════════════════════════════════════════ */
@media (max-width: 720px) {
  :root { --topbar-h: 56px; }
  /* окно поддержки — выезжает снизу, как шторка */
  dialog.modal-support { width: 100%; max-width: 100%; margin: auto 0 0; border-radius: 20px 20px 0 0; max-height: 92vh;
    overflow-y: auto; padding-bottom: calc(24px + env(safe-area-inset-bottom)); }
  .modal-support .input, .modal-support .textarea { font-size: 16px; } /* без автозума iOS */
  .container { padding: 0 16px; }
  .page { padding: 20px 0 32px; }
  .footer { padding-bottom: calc(var(--nav-h) + 16px + env(safe-area-inset-bottom)); }
  .requisites { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .requisites dd + dt { margin-top: 8px; }
  .mobile-only { display: flex !important; }
  .desktop-only { display: none !important; }
  .topnav, .avatar-btn { display: none; }
  .bottom-nav { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
    height: calc(var(--nav-h) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom);
    background: #fff; border-top: 1px solid var(--border); }
  .bottom-nav a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 11px;
    font-weight: 500; color: var(--muted); }
  .bottom-nav a[aria-current="page"] { color: var(--accent); font-weight: 600; }
  .bottom-nav .icon { width: 22px; height: 22px; }
  .display { font-size: 36px; }
  .display-sm { font-size: 32px; }
  .h1 { font-size: 30px; }
  .h2 { font-size: 26px; }
  .lead { font-size: 16px; }
  .stack-xl > * + * { margin-top: 32px; }
  .card-pad-lg { padding: 18px; }
  .upload-card { padding: 16px; border-radius: 20px; }
  .dropzone { padding: 28px 16px; }
  .blocks-grid { grid-template-columns: minmax(0, 1fr); }
  .preview-verdict, .compare { grid-template-columns: minmax(0, 1fr); display: grid; }
  .choice-grid, .checklist { grid-template-columns: minmax(0, 1fr); }
  .stepper li.line { width: 16px; }
  .missing-row { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .block-body { padding-left: 18px; }
  .list-head { display: none; }
  .list-row { grid-template-columns: minmax(0, 1fr) auto; gap: 6px 12px; padding: 14px 16px; }
  .list-row > :nth-child(1) { grid-column: 1 / -1; }
  .list-row > :nth-child(2), .list-row > :nth-child(4) { display: none; }
  .identity { flex-wrap: wrap; padding: 20px; }
  .identity-cta { align-items: stretch; width: 100%; }
  .recent-row { grid-template-columns: minmax(0, 1fr) auto; }
  .recent-row > :nth-child(2), .recent-row > :nth-child(4) { display: none; }
  .table th:nth-child(1), .table td:nth-child(1) { display: none; }
  .table th, .table td { padding-left: 16px; padding-right: 16px; }
  .push-offer { flex-wrap: wrap; }
  .file-row { flex-wrap: wrap; }
  .file-row .grow { flex-basis: calc(100% - 60px); }
  .sections-nav { display: none; }
  .stat b { font-size: 24px; }
  .chat-cta { flex-wrap: wrap; padding: 18px; }
  .chat-cta .btn { width: 100%; }
  .chat-panel { top: 0; width: 100%; z-index: 60; border-left: 0; padding-bottom: env(safe-area-inset-bottom); }
  .chat-backdrop { display: none !important; }
  .chat-log { padding: 16px; }
  .chat-form textarea { font-size: 16px; } /* без автозума iOS */
}
