/* ==========================================================================
   Дизайн-система: тёплая «бумага» + глубокий изумруд + золото («сейф/банк»).
   Шрифты системные (без внешних запросов — GDPR/скорость). Заголовки — serif.
   ========================================================================== */
:root {
  --paper: #f7f5ef;
  --paper-2: #efece3;
  --card: #ffffff;
  --ink: #10201a;
  --ink-2: #33453e;
  --muted: #5f6f68;
  --line: #e2ded2;
  --line-2: #d3cebf;
  --brand: #0b6e4f;
  --brand-2: #095a41;
  --brand-3: #0e8a63;
  --brand-soft: #e2f1e9;
  --gold: #d9a43a;
  --gold-2: #b98722;
  --gold-soft: #fbf1dc;
  --deep: #0b1d17;
  --deep-2: #12302a;
  --danger: #b42318;
  --danger-soft: #fdecea;
  --warn: #a54a06;
  --warn-soft: #fef3e4;
  --info: #1f4fbf;
  --info-soft: #e9effc;
  --radius: 14px;
  --radius-sm: 10px;
  --radius-lg: 22px;
  --shadow: 0 1px 2px rgba(16, 32, 26, .05), 0 10px 30px rgba(16, 32, 26, .07);
  --shadow-lg: 0 2px 4px rgba(16, 32, 26, .06), 0 24px 60px rgba(16, 32, 26, .14);
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Noto Sans Devanagari", "Nirmala UI", sans-serif;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, "Noto Serif", serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  --container: 1180px;
  --gutter: 20px;
}
html[lang="hi"] { --serif: var(--font); }
/* деванагари: разрядка и капс ломают лигатуры */
html[lang="hi"] .eyebrow, html[lang="hi"] .footer-h, html[lang="hi"] .table th, html[lang="hi"] .qf,
html[lang="hi"] .bubble-role, html[lang="hi"] .m-bubble b, html[lang="hi"] .display, html[lang="hi"] .display-sm { letter-spacing: 0; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--paper); color: var(--ink); font-family: var(--font);
  font-size: 16px; line-height: 1.6; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img, svg { max-width: 100%; }
a { color: var(--brand); text-underline-offset: 3px; }
a:hover { color: var(--brand-2); }
p { margin: 0 0 1em; }
h1, h2, h3, h4 { margin: 0 0 .5em; line-height: 1.2; color: var(--ink); }
ul, ol { padding-left: 1.2em; }
hr { border: 0; border-top: 1px solid var(--line); margin: 18px 0; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; border-radius: 4px; }
[hidden] { display: none !important; }
.ico { width: 1.15em; height: 1.15em; flex: none; vertical-align: -.2em; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); }
.narrow { max-width: 820px; }
.center { text-align: center; }
.right { text-align: right; }
.muted { color: var(--muted); }
.small { font-size: .88rem; }
.mono { font-family: var(--mono); font-size: .92em; letter-spacing: .02em; }
.prewrap { white-space: pre-wrap; overflow-wrap: anywhere; }
.mt { margin-top: 32px; }
.stack > * + * { margin-top: 12px; }
.stack-lg > * + * { margin-top: 20px; }
.skip-link { position: absolute; left: -9999px; top: 8px; z-index: 100; background: var(--ink); color: #fff; padding: 8px 14px; border-radius: 8px; }
.skip-link:focus { left: 8px; }

/* ---------- типографика ---------- */
.display { font-family: var(--serif); font-weight: 600; font-size: clamp(2.3rem, 5.2vw, 4rem); line-height: 1.04; letter-spacing: -.02em; margin-bottom: 18px; }
.display-sm { font-family: var(--serif); font-weight: 600; font-size: clamp(2rem, 4vw, 3rem); line-height: 1.1; letter-spacing: -.015em; }
.h1 { font-family: var(--serif); font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 600; letter-spacing: -.01em; }
.h2 { font-family: var(--serif); font-size: clamp(1.5rem, 2.6vw, 2.1rem); font-weight: 600; letter-spacing: -.01em; }
.h3 { font-size: 1.15rem; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.h4 { font-size: 1rem; font-weight: 700; }
.lead { font-size: clamp(1.05rem, 1.6vw, 1.22rem); color: var(--ink-2); max-width: 62ch; }
.lead-sm { font-size: 1.06rem; color: var(--ink-2); }
.eyebrow { display: block; text-transform: uppercase; letter-spacing: .12em; font-size: .78rem; font-weight: 700; color: var(--brand); margin-bottom: 14px; }

/* ---------- кнопки ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid transparent;
  border-radius: 999px; padding: 11px 20px; font: inherit; font-weight: 650; font-size: .96rem; line-height: 1.2;
  cursor: pointer; text-decoration: none; transition: background .15s, border-color .15s, color .15s, transform .15s, box-shadow .15s;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--brand); color: #fff; box-shadow: 0 6px 16px rgba(11, 110, 79, .22); }
.btn-primary:hover { background: var(--brand-2); color: #fff; }
.btn-gold { background: var(--gold); color: var(--deep); box-shadow: 0 8px 22px rgba(217, 164, 58, .3); }
.btn-gold:hover { background: #e7b64f; color: var(--deep); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line-2); }
.btn-ghost:hover { background: var(--card); border-color: var(--ink-2); color: var(--ink); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #8f1c13; color: #fff; }
.btn-danger-ghost { background: transparent; color: var(--danger); border-color: #efb8b2; }
.btn-danger-ghost:hover { background: var(--danger-soft); color: var(--danger); }
.btn-sm { padding: 8px 14px; font-size: .88rem; }
.btn-xs { padding: 5px 10px; font-size: .8rem; }
.btn-lg { padding: 14px 26px; font-size: 1.02rem; }
.btn-block { width: 100%; }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 12px; }
.inline-form { display: inline; }
.link-btn { background: none; border: 0; padding: 0; font: inherit; color: inherit; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.text-link { display: inline-flex; align-items: center; gap: 6px; font-weight: 650; text-decoration: none; }
.text-link:hover { text-decoration: underline; }

/* ---------- шапка ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(247, 245, 239, .86); backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px); border-bottom: 1px solid rgba(226, 222, 210, .7); }
.header-inner { display: flex; align-items: center; gap: 24px; height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.18rem; letter-spacing: -.01em; color: var(--ink); text-decoration: none; }
.brand:hover { color: var(--ink); }
.brand-light, .brand-light:hover { color: #fff; }
.logo-mark { width: 32px; height: 32px; flex: none; }
.main-nav { display: flex; gap: 4px; margin-left: 8px; }
.main-nav a { padding: 8px 12px; border-radius: 999px; color: var(--ink-2); text-decoration: none; font-weight: 550; font-size: .95rem; }
.main-nav a:hover, .main-nav a[aria-current] { background: var(--paper-2); color: var(--ink); }
.header-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.nav-toggle { display: none; background: none; border: 1px solid var(--line-2); border-radius: 10px; width: 42px; height: 42px; align-items: center; justify-content: center; cursor: pointer; color: var(--ink); }
.nav-toggle .ico-close { display: none; }
.nav-toggle[aria-expanded="true"] .ico-open { display: none; }
.nav-toggle[aria-expanded="true"] .ico-close { display: block; }
.mobile-nav { border-top: 1px solid var(--line); background: var(--paper); padding: 8px 0 16px; }
.mobile-nav a, .mobile-nav .link-btn { display: block; padding: 11px 4px; color: var(--ink); text-decoration: none; font-weight: 600; border-bottom: 1px solid var(--line); width: 100%; text-align: left; }

.profile-menu { position: relative; }
.profile-menu summary { list-style: none; cursor: pointer; position: relative; display: block; border-radius: 50%; }
.profile-menu summary::-webkit-details-marker { display: none; }
.avatar { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: var(--deep); color: var(--gold); font-weight: 800; font-size: 1rem; }
.profile-menu summary:hover .avatar, .profile-menu[open] .avatar { box-shadow: 0 0 0 3px var(--brand-soft); }
.avatar-dot { position: absolute; top: 0; right: 0; width: 11px; height: 11px; border-radius: 50%; background: var(--gold); border: 2px solid var(--paper); }
.profile-pop { position: absolute; right: 0; top: calc(100% + 8px); z-index: 60; min-width: 240px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-lg); padding: 6px; }
.profile-who { display: grid; padding: 10px 12px 12px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.profile-who span { color: var(--muted); font-size: .85rem; overflow: hidden; text-overflow: ellipsis; }
.profile-pop a, .profile-pop button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 12px; border-radius: 8px; color: var(--ink); text-decoration: none; font: inherit; font-size: .94rem; background: none; border: 0; cursor: pointer; text-align: left; }
.profile-pop a:hover, .profile-pop button:hover { background: var(--paper-2); }
.profile-pop .ico { color: var(--muted); }
.lang-switch { position: relative; }
.lang-switch summary { list-style: none; display: inline-flex; align-items: center; gap: 6px; padding: 8px 10px; border-radius: 999px; cursor: pointer; font-weight: 650; font-size: .88rem; color: var(--ink-2); }
.lang-switch summary::-webkit-details-marker { display: none; }
.lang-switch summary:hover { background: var(--paper-2); }
.lang-switch ul { position: absolute; right: 0; top: calc(100% + 6px); margin: 0; padding: 6px; list-style: none; background: var(--card); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-lg); min-width: 170px; z-index: 60; }
.lang-switch li a { display: block; padding: 8px 12px; border-radius: 8px; color: var(--ink); text-decoration: none; }
.lang-switch li a:hover, .lang-switch li a[aria-current] { background: var(--brand-soft); }

/* ---------- флеш-сообщения ---------- */
.flash-wrap { padding-top: 16px; display: grid; gap: 8px; }
.flash { padding: 12px 16px; border-radius: var(--radius-sm); border: 1px solid; font-weight: 550; overflow-wrap: anywhere; }
.flash-success { background: var(--brand-soft); border-color: #b5dcc8; color: #0b4f39; }
.flash-error { background: var(--danger-soft); border-color: #f3c0ba; color: var(--danger); }
.flash-info { background: var(--info-soft); border-color: #c7d5f5; color: #183f97; }
.flash-dev { background: #fff8e1; border-color: #f0d68a; color: #6b5200; font-family: var(--mono); font-size: .85rem; }

/* ---------- секции ---------- */
.section { padding: 88px 0; }
.section-tight { padding: 40px 0 72px; }
.section-tint { background: var(--paper-2); }
.section-dark { background: radial-gradient(1200px 500px at 90% -10%, #1b4a3d 0%, transparent 60%), var(--deep); color: #dfe9e4; }
.section-dark h2, .section-dark h3 { color: #fff; }
.section-head { max-width: 720px; margin: 0 0 40px; }
.page-head { padding: 64px 0 24px; }
.page-head-sm { padding: 48px 0 8px; }

/* ---------- hero ---------- */
.hero { padding: 56px 0 72px; background:
  radial-gradient(900px 480px at 100% 0%, rgba(14, 138, 99, .12), transparent 60%),
  radial-gradient(700px 400px at 0% 100%, rgba(217, 164, 58, .12), transparent 60%); }
.hero-grid { display: grid; grid-template-columns: 1.08fr .92fr; gap: 56px; align-items: center; }
.quick { margin-top: 28px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 18px; box-shadow: var(--shadow); }
.quick-title { font-weight: 750; margin: 0 0 12px; }
.quick-grid { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: 12px; align-items: end; }
.qf { display: grid; gap: 4px; font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.qf select, .qf input { text-transform: none; letter-spacing: 0; }
.amount-combo { display: flex; border: 1px solid var(--line-2); border-radius: var(--radius-sm); background: var(--card); overflow: hidden; }
.amount-combo input { border: 0; min-width: 0; flex: 1; border-radius: 0; }
.amount-combo select { border: 0; border-left: 1px solid var(--line); border-radius: 0; width: auto; background-color: var(--paper); }
.qf-btn { height: 46px; }
.quick-note { margin: 12px 0 0; font-size: .84rem; color: var(--muted); }

/* mock комнаты сделки в hero */
.hero-visual { position: relative; }
.hero-visual::before { content: ""; position: absolute; inset: 8% -6% -6% 10%; background: linear-gradient(135deg, var(--brand) 0%, var(--deep-2) 100%); border-radius: 32px; transform: rotate(3deg); opacity: .95; }
.mock { position: relative; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); padding: 20px; }
.mock-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.mock-title { display: grid; }
.mock-ref { font-family: var(--mono); font-size: .75rem; color: var(--muted); }
.mock-title strong { font-size: 1.1rem; }
.mock-sub { font-size: .84rem; color: var(--muted); }
.mock-feed { display: grid; gap: 9px; margin-top: 14px; }
.m-row { display: flex; }
.m-row.mine { justify-content: flex-end; }
.m-bubble { max-width: 82%; padding: 9px 13px; border-radius: 14px; font-size: .88rem; line-height: 1.4; background: var(--paper); border: 1px solid var(--line); }
.m-bubble b { display: block; font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 2px; }
.m-agent { background: var(--gold-soft); border-color: #f0dcae; }
.m-agent b { color: var(--gold-2); }
.m-buyer { background: var(--brand-soft); border-color: #c3e2d2; }
.m-buyer b { color: var(--brand); }
.m-seller b { color: var(--info); }
.m-file { display: inline-flex; align-items: center; gap: 4px; font-family: var(--mono); font-size: .76rem; background: #fff; border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; margin-top: 4px; }
.m-sys { justify-self: center; display: inline-flex; align-items: center; gap: 6px; font-size: .8rem; font-weight: 700; color: var(--brand); background: var(--brand-soft); border-radius: 999px; padding: 5px 12px; }
.m-gold { color: var(--gold-2); background: var(--gold-soft); }
@media (prefers-reduced-motion: no-preference) {
  .mock-feed > * { opacity: 0; transform: translateY(8px); animation: rise .5s ease forwards; }
  .mock-feed > *:nth-child(1) { animation-delay: .2s; }
  .mock-feed > *:nth-child(2) { animation-delay: .7s; }
  .mock-feed > *:nth-child(3) { animation-delay: 1.2s; }
  .mock-feed > *:nth-child(4) { animation-delay: 1.7s; }
  .mock-feed > *:nth-child(5) { animation-delay: 2.2s; }
  .mock-feed > *:nth-child(6) { animation-delay: 2.7s; }
}
@keyframes rise { to { opacity: 1; transform: none; } }

/* ---------- прогресс сделки ---------- */
.progress { list-style: none; display: grid; grid-template-columns: repeat(5, 1fr); gap: 0; padding: 0; margin: 26px 0 0; counter-reset: s; }
.progress li { position: relative; display: grid; justify-items: center; gap: 6px; text-align: center; font-size: .82rem; color: var(--muted); font-weight: 600; }
.progress li::before { content: ""; position: absolute; top: 15px; left: -50%; width: 100%; height: 2px; background: var(--line-2); z-index: 0; }
.progress li:first-child::before { display: none; }
.progress .dot { position: relative; z-index: 1; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--card); border: 2px solid var(--line-2); font-weight: 700; font-size: .85rem; color: var(--muted); }
.progress li.done::before, .progress li.current::before { background: var(--brand); }
.progress li.done .dot { background: var(--brand); border-color: var(--brand); color: #fff; }
.progress li.current .dot { border-color: var(--brand); color: var(--brand); box-shadow: 0 0 0 5px var(--brand-soft); }
.progress li.current { color: var(--ink); }
.progress li.alert .dot { border-color: var(--danger); color: var(--danger); box-shadow: 0 0 0 5px var(--danger-soft); }
.progress-mini { margin: 14px 0 4px; }
.progress-mini .dot { width: 14px; height: 14px; border-width: 2px; }
.progress-mini li::before { top: 6px; }
.progress-mini .lbl { font-size: .7rem; }

/* ---------- полоса доверия ---------- */
.trust-strip { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--card); }
.trust-grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.trust-item { display: flex; gap: 14px; padding: 26px 22px; }
.trust-item + .trust-item { border-left: 1px solid var(--line); }
.trust-item > .ico { width: 26px; height: 26px; color: var(--brand); margin-top: 2px; }
.trust-item h2 { font-size: 1rem; margin-bottom: 4px; font-family: var(--font); }
.trust-item p { margin: 0; font-size: .9rem; color: var(--muted); }

/* ---------- шаги ---------- */
.steps { list-style: none; padding: 0; margin: 0 0 32px; display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; }
.step { position: relative; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 18px; }
.step-num { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--deep); color: var(--gold); font-weight: 800; font-family: var(--serif); font-size: 1.1rem; margin-bottom: 14px; }
.step h3 { font-size: 1.02rem; }
.step p { margin: 0; font-size: .92rem; color: var(--muted); }

.timeline { list-style: none; padding: 0; margin: 0; position: relative; }
.timeline::before { content: ""; position: absolute; left: 21px; top: 10px; bottom: 10px; width: 2px; background: linear-gradient(var(--brand), var(--gold)); }
.timeline li { position: relative; display: grid; grid-template-columns: 44px 1fr; gap: 20px; padding: 0 0 32px; }
.tl-num { position: relative; z-index: 1; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--card); border: 2px solid var(--brand); color: var(--brand); font-weight: 800; font-family: var(--serif); font-size: 1.2rem; }
.timeline p { color: var(--ink-2); }

/* ---------- карточки ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); min-width: 0; }
.cards { display: grid; gap: 18px; }
.cards-2 { grid-template-columns: repeat(2, 1fr); }
.cards-3 { grid-template-columns: repeat(3, 1fr); }
.cards-4 { grid-template-columns: repeat(4, 1fr); }
.card p { color: var(--ink-2); }
.card-link { text-decoration: none; color: inherit; transition: transform .15s, box-shadow .15s, border-color .15s; }
.card-link:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: var(--line-2); color: inherit; }
.card-link p { margin: 0; font-size: .94rem; color: var(--muted); }
.card-icon { display: inline-grid; place-items: center; width: 46px; height: 46px; border-radius: 12px; background: var(--brand-soft); color: var(--brand); margin-bottom: 14px; }
.card-icon .ico { width: 24px; height: 24px; }
.case { display: flex; flex-direction: column; align-items: flex-start; }
.case .text-link { margin-top: auto; }
.chip { display: inline-flex; align-items: center; gap: 6px; background: var(--paper-2); border: 1px solid var(--line); color: var(--ink-2); border-radius: 999px; padding: 3px 10px; font-size: .8rem; font-weight: 650; }
.chip-ok { background: var(--brand-soft); border-color: #bfe0cf; color: #0b4f39; }
.chip-warn { background: var(--warn-soft); border-color: #f6d3a8; color: var(--warn); }

.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.side-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; border-top: 4px solid var(--brand); }
.side-card-alt { border-top-color: var(--gold); }
.side-card h3, .side-card .h3 { display: flex; align-items: center; gap: 10px; }
.checks { list-style: none; padding: 0; margin: 0 0 8px; display: grid; gap: 10px; }
.checks li { display: flex; gap: 10px; align-items: flex-start; }
.checks .ico { color: var(--brand); margin-top: 3px; }
.checks-light li { color: #dfe9e4; }
.checks-light .ico { color: var(--gold); }

.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: rgba(255, 255, 255, .08); border-radius: var(--radius-lg); overflow: hidden; }
.feature { background: var(--deep); padding: 30px; }
.feature .ico { width: 28px; height: 28px; color: var(--gold); margin-bottom: 14px; }
.feature h3 { font-size: 1.08rem; }
.feature p { margin: 0; color: #a9bdb4; font-size: .94rem; }

.fees-teaser { display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; }
.rate-card { background: var(--deep); color: #fff; border-radius: var(--radius-lg); padding: 30px; box-shadow: var(--shadow-lg); }
.rate-label { color: #a9bdb4; font-weight: 650; }
.rate-big { display: block; font-family: var(--serif); font-size: 4rem; line-height: 1; color: var(--gold); margin: 6px 0 18px; }
.rate-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; font-size: .92rem; }
.rate-list li { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; border-bottom: 1px dashed rgba(255, 255, 255, .12); color: #cfddd6; }
.rate-list b { color: #fff; }

.faq-list { display: grid; gap: 10px; }
.faq-item { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-sm); }
.faq-item summary { list-style: none; cursor: pointer; padding: 16px 18px; font-weight: 700; display: flex; justify-content: space-between; gap: 14px; align-items: center; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary .ico { transition: transform .2s; color: var(--muted); }
.faq-item[open] summary .ico { transform: rotate(180deg); }
.faq-item p { padding: 0 18px 16px; margin: 0; color: var(--ink-2); }
.faq-group { margin-top: 32px; }

.cta-band { background: linear-gradient(120deg, var(--brand) 0%, var(--deep-2) 100%); color: #fff; padding: 64px 0; }
.cta-inner { display: flex; justify-content: space-between; align-items: center; gap: 28px; flex-wrap: wrap; }
.cta-band h2 { color: #fff; margin-bottom: 6px; }
.cta-band p { margin: 0; color: #cfe6dc; }

.callout { display: flex; gap: 16px; align-items: flex-start; background: var(--card); border: 1px solid var(--line); border-left: 4px solid var(--brand); border-radius: var(--radius); padding: 20px 22px; }
.callout > .ico { width: 26px; height: 26px; color: var(--brand); margin-top: 2px; }
.callout p:last-child { margin-bottom: 0; }
.callout-warn { border-left-color: var(--gold); background: var(--gold-soft); }
.callout-warn > .ico { color: var(--gold-2); }
.callout-info { border-left-color: var(--info); background: var(--info-soft); display: block; }
.banner { align-items: center; margin-bottom: 24px; flex-wrap: wrap; }
.banner p { margin: 0; flex: 1; min-width: 200px; }

.status-list { display: grid; gap: 12px; margin: 0; }
.status-list > div { display: grid; grid-template-columns: 220px 1fr; gap: 16px; align-items: center; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px 16px; }
.status-list dd { margin: 0; color: var(--ink-2); }

/* ---------- бейджи статусов ---------- */
.badge { display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; padding: 3px 10px; font-size: .78rem; font-weight: 700; background: var(--paper-2); color: var(--ink-2); border: 1px solid var(--line); white-space: nowrap; }
.badge-lg { font-size: .92rem; padding: 7px 14px; }
.badge-green, .badge-funds_secured, .badge-completed, .badge-kyc-verified { background: var(--brand-soft); color: #0b4f39; border-color: #bfe0cf; }
.badge-awaiting_agreement, .badge-kyc-none { background: var(--paper-2); color: var(--ink-2); }
.badge-awaiting_payment, .badge-kyc-pending { background: var(--gold-soft); color: #7a5410; border-color: #f0dcae; }
.badge-inspection, .badge-accepted { background: var(--info-soft); color: #183f97; border-color: #c7d5f5; }
.badge-disputed, .badge-hot, .badge-kyc-rejected { background: var(--danger-soft); color: var(--danger); border-color: #f3c0ba; }
.badge-refunded, .badge-cancelled { background: #eeeeea; color: #5d5d57; }

/* ---------- формы ---------- */
.form { display: grid; gap: 16px; }
.field { display: grid; gap: 6px; min-width: 0; align-content: start; }
.field > span, .seg legend { font-weight: 650; font-size: .92rem; color: var(--ink-2); }
.field em { font-style: normal; color: var(--muted); font-weight: 500; }
input, select, textarea {
  width: 100%; font: inherit; color: var(--ink); background: var(--card); border: 1px solid var(--line-2);
  border-radius: var(--radius-sm); padding: 11px 13px; transition: border-color .15s, box-shadow .15s;
}
textarea { resize: vertical; min-height: 44px; }
select { appearance: none; -webkit-appearance: none; padding-right: 36px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%235f6f68' stroke-width='1.8' fill='none' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 13px center; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); }
input:disabled { background: var(--paper); color: var(--muted); }
input[type="checkbox"], input[type="radio"] { width: 18px; height: 18px; padding: 0; accent-color: var(--brand); flex: none; margin-top: 3px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field-sm { max-width: 150px; }
.field-row:has(.field-sm) { grid-template-columns: 1fr auto; }
.hint { color: var(--muted); font-size: .82rem; }
.err { color: var(--danger); font-size: .84rem; font-weight: 600; }
.has-error input, .has-error select, .has-error textarea { border-color: var(--danger); }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: .93rem; color: var(--ink-2); cursor: pointer; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.seg { border: 0; padding: 0; margin: 0; min-width: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.seg legend { margin-bottom: 8px; padding: 0; width: 100%; }
.seg label { position: relative; cursor: pointer; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg label span { display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px; border: 1px solid var(--line-2); border-radius: 999px; font-weight: 600; font-size: .9rem; background: var(--card); transition: all .15s; }
.seg input:checked + span { border-color: var(--brand); background: var(--brand-soft); color: #0b4f39; box-shadow: inset 0 0 0 1px var(--brand); }
.seg input:focus-visible + span { outline: 3px solid var(--gold); outline-offset: 2px; }
.seg-lg label { flex: 1; }
.seg-lg label span { width: 100%; justify-content: center; padding: 14px; border-radius: var(--radius-sm); font-size: 1rem; }
.file-pick { position: relative; display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; cursor: pointer; font-weight: 600; font-size: .9rem; color: var(--brand); }
.file-pick input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.file-pick .hint { width: 100%; font-weight: 500; }
.inline-row { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; }
.inline-row .field { flex: 1; min-width: 160px; }

/* ---------- таблицы ---------- */
.table-wrap { overflow-x: auto; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.table { width: 100%; border-collapse: collapse; font-size: .93rem; }
.table th { text-align: left; font-size: .76rem; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); font-weight: 700; padding: 12px 14px; border-bottom: 1px solid var(--line); background: var(--paper); white-space: nowrap; }
.table td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table .num { text-align: right; white-space: nowrap; }
.table a { font-weight: 600; }
.row-hot td { background: #fffaf0; }
.card .table { font-size: .95rem; }
.fee-table td, .fee-table th { padding: 12px 4px; background: none; white-space: normal; overflow-wrap: anywhere; }
.fee-table th.num { width: 1%; white-space: nowrap; }

/* ---------- калькулятор ---------- */
.fees-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; align-items: start; }
.calc { display: grid; gap: 16px; }
.calc-out { display: grid; gap: 0; margin: 0; background: var(--paper); border-radius: var(--radius-sm); padding: 6px 16px; }
.calc-out > div { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.calc-out > div:last-child { border-bottom: 0; }
.calc-out dt { color: var(--muted); font-weight: 600; }
.calc-out dd { margin: 0; font-weight: 800; font-variant-numeric: tabular-nums; }

/* ---------- auth ---------- */
.auth-wrap { padding: 56px var(--gutter) 88px; display: grid; place-items: center; }
.auth-card { width: 100%; max-width: 560px; padding: 36px; }
.auth-alt { text-align: center; margin: 22px 0 0; color: var(--muted); }

/* ---------- кабинет ---------- */
.app-head { padding: 36px 0 8px; }
.app-head-inner { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; flex-wrap: wrap; }
.app-head-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.back-link { display: inline-block; font-size: .9rem; font-weight: 600; text-decoration: none; margin-bottom: 10px; color: var(--muted); }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; margin-bottom: 30px; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; display: grid; gap: 4px; text-decoration: none; color: inherit; }
.stat span { color: var(--muted); font-size: .86rem; font-weight: 650; }
.stat b { font-size: 1.9rem; font-family: var(--serif); line-height: 1; }
.stat-hot { border-color: #f0dcae; background: var(--gold-soft); }
a.stat:hover { border-color: var(--line-2); color: inherit; }
.empty { text-align: center; padding: 48px 24px; display: grid; justify-items: center; gap: 6px; }
.empty > .ico { width: 44px; height: 44px; color: var(--brand); }

.new-tx-grid { display: grid; grid-template-columns: 1fr 340px; gap: 22px; align-items: start; }
.summary { display: grid; gap: 16px; }
.sticky { position: sticky; top: 88px; }

.tx-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.tx-head .h1, .tx-head .h2 { margin-bottom: 4px; overflow-wrap: anywhere; }
.tx-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 22px; align-items: start; }
.tx-main, .tx-aside { display: grid; gap: 20px; min-width: 0; }
.next-card { border-top: 4px solid var(--brand); }
.next-card > p:last-child { margin-bottom: 0; }
.eyebrow .ico { margin-right: 6px; }
.wait, .ok-text, .warn-text { position: relative; padding-left: 28px; }
.wait > .ico, .ok-text > .ico, .warn-text > .ico { position: absolute; left: 0; top: .22em; }
.wait > .ico { color: var(--gold-2); }
.ok-text > .ico { color: var(--brand); }
.warn-text { color: var(--danger); font-weight: 600; }
.private-card { background: var(--gold-soft); border: 1px dashed #e2c27a; border-radius: var(--radius-sm); padding: 16px; margin: 14px 0; }
.private-head { display: flex; align-items: center; gap: 8px; font-weight: 750; font-size: .9rem; margin-bottom: 8px; flex-wrap: wrap; }
.private-body { font-family: var(--mono); font-size: .92rem; white-space: pre-wrap; overflow-wrap: anywhere; background: rgba(255, 255, 255, .7); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; margin: 0 0 8px; }
.private-form summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 10px; font-weight: 700; flex-wrap: wrap; }
.private-form summary::-webkit-details-marker { display: none; }
.private-form summary > span:first-child { display: inline-flex; align-items: center; gap: 8px; }
.private-form[open] summary { margin-bottom: 12px; }
.dispute { margin-top: 14px; }
.dispute summary { list-style: none; display: inline-flex; }
.dispute summary::-webkit-details-marker { display: none; }
.dispute[open] summary { margin-bottom: 12px; }
.sub-card { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px 14px; margin: 12px 0; background: var(--paper); }
.sub-card summary { cursor: pointer; font-weight: 700; }
.sub-card[open] summary { margin-bottom: 12px; }
.kv { display: grid; gap: 0; margin: 0; }
.kv > div { display: flex; justify-content: space-between; gap: 14px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.kv > div:last-child { border-bottom: 0; }
.kv dt { color: var(--muted); font-size: .9rem; }
.kv dd { margin: 0; font-weight: 650; text-align: right; overflow-wrap: anywhere; }
.kv-strong dd { color: var(--brand); font-weight: 800; }
.parties { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.parties li, .party { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: .94rem; overflow-wrap: anywhere; }
.party { padding: 10px 0; border-bottom: 1px solid var(--line); display: block; }
.party .bubble-role { margin-right: 6px; }

/* лента и чат */
.room { padding: 0; overflow: hidden; }
.room-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; padding: 18px 22px; border-bottom: 1px solid var(--line); }
.room-head .h3 { margin: 0; }
.feed { display: flex; flex-direction: column; gap: 10px; padding: 20px 22px; max-height: 620px; overflow-y: auto; background:
  linear-gradient(var(--paper), var(--paper)); scroll-behavior: smooth; }
.feed-event { align-self: center; text-align: center; max-width: 92%; }
.feed-event-pill { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; justify-content: center; background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 5px 12px; font-size: .82rem; font-weight: 650; color: var(--ink-2); }
.ev-payment_confirmed .feed-event-pill, .ev-released .feed-event-pill, .ev-delivery_accepted .feed-event-pill, .ev-auto_accepted .feed-event-pill { background: var(--brand-soft); border-color: #bfe0cf; color: #0b4f39; }
.ev-disputed .feed-event-pill { background: var(--danger-soft); border-color: #f3c0ba; color: var(--danger); }
.feed-private .feed-event-pill { background: var(--gold-soft); border-color: #f0dcae; color: #7a5410; }
.feed-meta { color: var(--muted); font-weight: 500; font-size: .76rem; }
.feed-note { font-size: .84rem; color: var(--ink-2); margin: 4px 0 0; }
.bubble-row { display: flex; }
.bubble-row.mine { justify-content: flex-end; }
.bubble { max-width: min(82%, 560px); background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 10px 14px; box-shadow: 0 1px 2px rgba(16, 32, 26, .04); }
.mine .bubble { background: var(--brand-soft); border-color: #c3e2d2; }
.from-agent .bubble { background: var(--gold-soft); border-color: #f0dcae; }
.bubble-private { border-style: dashed; }
.bubble-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 4px; }
.bubble-name { font-size: .8rem; font-weight: 650; }
.bubble-role { display: inline-block; font-size: .68rem; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; border-radius: 6px; padding: 2px 7px; background: var(--paper-2); color: var(--ink-2); }
.role-buyer { background: #d5ecdf; color: #0b4f39; }
.role-seller { background: #dde6fb; color: #183f97; }
.role-agent { background: #f6e3b4; color: #6e4b0c; }
.bubble-text { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.bubble-img { display: block; margin-top: 8px; }
.bubble-img img { display: block; max-height: 260px; border-radius: 10px; border: 1px solid var(--line); }
.bubble-file { display: inline-flex; align-items: center; gap: 8px; margin-top: 8px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); text-decoration: none; font-weight: 600; font-size: .88rem; }
.bubble-file small { color: var(--muted); font-weight: 500; }
.feed-reload { text-align: center; margin: 0; padding: 8px; background: var(--gold-soft); font-weight: 700; }
.chat-form { border-top: 1px solid var(--line); padding: 14px 22px 16px; display: grid; gap: 10px; background: var(--card); }
.chat-form textarea { min-height: 52px; }
.chat-actions { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.file-pick-sm span { max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-form .small { margin: 0; }

.settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; align-items: start; }
.contact-grid { display: grid; grid-template-columns: 1.4fr .8fr; gap: 26px; align-items: start; }
.contact-side { display: grid; gap: 18px; }
.info-row { display: flex; gap: 14px; }
.info-row > .ico { width: 24px; height: 24px; color: var(--brand); margin-top: 4px; }
.info-row p, .info-row h2 { margin: 0; }

/* юр. документы */
.legal-grid { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 40px; align-items: start; }
.legal-nav { position: sticky; top: 88px; }
.legal-nav nav { display: grid; gap: 2px; }
.legal-nav a { padding: 8px 12px; border-radius: 8px; text-decoration: none; color: var(--ink-2); font-weight: 600; font-size: .92rem; }
.legal-nav a:hover { background: var(--paper-2); }
.legal-nav a[aria-current] { background: var(--brand-soft); color: #0b4f39; }
.legal-doc { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(22px, 4vw, 44px); max-width: 860px; }
.legal-doc section { scroll-margin-top: 90px; }
.legal-doc h2 { margin-top: 32px; }
.legal-doc p, .legal-doc li { color: var(--ink-2); }
.legal-doc li { margin-bottom: 6px; }
.toc { background: var(--paper); border-radius: var(--radius-sm); padding: 16px 20px; margin: 20px 0; }
.toc ol { margin: 0; columns: 2; column-gap: 28px; font-size: .92rem; }
.toc li { break-inside: avoid; margin-bottom: 4px; }

.error-page { padding: 96px 0; }
.error-code { font-family: var(--serif); font-size: 5rem; line-height: 1; color: var(--gold); margin-bottom: 12px; }

/* ---------- подвал ---------- */
.site-footer { background: var(--deep); color: #a9bdb4; padding: 64px 0 28px; font-size: .93rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 32px; }
.footer-brand p { margin: 14px 0 0; max-width: 34ch; }
.footer-h { color: #fff; font-size: .8rem; text-transform: uppercase; letter-spacing: .12em; font-family: var(--font); margin-bottom: 14px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.site-footer a { color: #cfddd6; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.footer-bottom { margin-top: 44px; padding-top: 22px; border-top: 1px solid rgba(255, 255, 255, .1); display: flex; justify-content: space-between; gap: 18px; flex-wrap: wrap; font-size: .84rem; }
.footer-bottom p { margin: 0; }

.cookie-note { position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 80; max-width: 640px; margin: 0 auto; display: flex; align-items: center; gap: 16px; background: var(--deep); color: #dfe9e4; border-radius: var(--radius); padding: 14px 18px; box-shadow: var(--shadow-lg); font-size: .9rem; }
.cookie-note p { margin: 0; flex: 1; }
.cookie-note a { color: var(--gold); }

/* ---------- админка ---------- */
body.admin { display: grid; grid-template-columns: 250px minmax(0, 1fr); min-height: 100vh; }
.adm-side { background: var(--deep); color: #cfddd6; padding: 22px 16px; position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 14px; }
.adm-role { font-size: .82rem; color: #8ea69b; margin: 0; }
.adm-side nav { display: grid; gap: 2px; }
.adm-side nav a { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; color: #cfddd6; text-decoration: none; font-weight: 600; font-size: .94rem; }
.adm-side nav a:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.adm-side nav a[aria-current] { background: rgba(217, 164, 58, .16); color: var(--gold); }
.adm-side-foot { margin-top: auto; display: grid; gap: 10px; font-size: .9rem; }
.adm-side-foot a, .adm-side-foot .link-btn { color: #a9bdb4; }
.adm-main { padding: 28px clamp(16px, 3vw, 40px) 60px; min-width: 0; }
.adm-main .flash-wrap { padding: 0 0 16px; max-width: none; }
.filters { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 18px; }
.filters input, .filters select { width: auto; min-width: 200px; flex: 1; max-width: 340px; }
.todo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.todo-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; font-size: .9rem; }
.todo-list li { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.todo-list b { margin-left: auto; }
.message-body { background: var(--paper); border-radius: var(--radius-sm); padding: 16px; margin: 18px 0; }
.muted-card { opacity: .6; }
.qr-box { display: inline-block; background: #fff; padding: 10px; border: 1px solid var(--line); border-radius: var(--radius-sm); margin: 12px 0; }
.qr-box svg { display: block; }
.flag { width: 20px; height: 15px; border-radius: 2px; object-fit: cover; box-shadow: 0 0 0 1px rgba(0, 0, 0, .08); vertical-align: -2px; flex: none; }
.cpick { position: relative; }
.cpick-native { position: absolute !important; opacity: 0; pointer-events: none; width: 1px !important; height: 1px; bottom: 0; left: 12px; }
.cpick-btn { width: 100%; display: flex; align-items: center; gap: 10px; text-align: left; font: inherit; color: var(--ink); background: var(--card) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%235f6f68' stroke-width='1.8' fill='none' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right 13px center; border: 1px solid var(--line-2); border-radius: var(--radius-sm); padding: 11px 36px 11px 13px; cursor: pointer; min-height: 46px; }
.cpick-btn:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); }
.cpick-btn span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cpick-ph { color: var(--muted); }
.has-error .cpick-btn { border-color: var(--danger); }
.cpick-pop { position: absolute; z-index: 40; left: 0; min-width: max(100%, 290px); max-width: calc(100vw - 32px); top: calc(100% + 6px); background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-sm); box-shadow: var(--shadow-lg); padding: 8px; }
.cpick-search { margin-bottom: 6px; }
.cpick-list { list-style: none; margin: 0; padding: 0; max-height: 280px; overflow-y: auto; }
.cpick-list li { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; cursor: pointer; font-size: .95rem; }
.cpick-list li:hover, .cpick-list li.active { background: var(--brand-soft); }
.cpick-empty { margin: 8px 10px; color: var(--muted); font-size: .9rem; }
.otp-input { font-family: var(--mono); font-size: 1.4rem; letter-spacing: .3em; text-align: center; }

/* ---------- адаптив ---------- */
@media (max-width: 1080px) {
  .main-nav { display: none; }
  .nav-toggle { display: inline-flex; }
  .steps { grid-template-columns: repeat(3, 1fr); }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { max-width: 560px; }
  .trust-grid { grid-template-columns: 1fr 1fr; }
  .trust-item:nth-child(3) { border-left: 0; }
  .trust-item:nth-child(n+3) { border-top: 1px solid var(--line); }
  .cards-4 { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .tx-grid, .new-tx-grid { grid-template-columns: 1fr; }
  .sticky { position: static; }
  body.admin { grid-template-columns: 1fr; }
  .adm-side { position: static; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; }
  .adm-side nav { display: flex; flex-wrap: wrap; }
  .adm-side-foot { margin: 0 0 0 auto; display: flex; }
}
@media (max-width: 820px) {
  .section { padding: 64px 0; }
  .cards-3, .cards-2, .two-col, .fees-grid, .fees-teaser, .settings-grid, .contact-grid, .features { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr 1fr; }
  .legal-grid { grid-template-columns: 1fr; gap: 20px; }
  .legal-nav { position: static; }
  .legal-nav nav { display: flex; flex-wrap: wrap; gap: 6px; }
  .toc ol { columns: 1; }
  .status-list > div { grid-template-columns: 1fr; gap: 6px; }
}
@media (max-width: 600px) {
  :root { --gutter: 16px; }
  .hide-sm { display: none; }
  .header-inner { gap: 10px; }
  .brand span { font-size: 1.05rem; }
  .hero { padding: 32px 0 48px; }
  .quick-grid, .field-row, .cards-4, .trust-grid, .steps, .footer-grid { grid-template-columns: 1fr; }
  .field-row:has(.field-sm) { grid-template-columns: 1fr; }
  .field-sm { max-width: none; }
  .trust-item + .trust-item { border-left: 0; border-top: 1px solid var(--line); }
  .progress .lbl { font-size: .68rem; }
  .progress .dot { width: 26px; height: 26px; font-size: .75rem; }
  .progress li::before { top: 12px; }
  .progress-mini .dot { width: 14px; height: 14px; }
  .progress-mini li::before { top: 6px; }
  .card { padding: 18px; }
  .auth-card { padding: 24px 18px; }
  .feed { padding: 14px; max-height: 520px; }
  .bubble { max-width: 92%; }
  .chat-form, .room-head { padding-left: 14px; padding-right: 14px; }
  .cookie-note { flex-direction: column; align-items: stretch; text-align: left; }
  .hero-visual::before { inset: 6% -3% -4% 6%; }
  .table th, .table td { padding: 10px; }
}

/* ==========================================================================
   Профиль, депозит, аватары, переключатель темы
   ========================================================================== */
.theme-toggle { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line-2); background: transparent; color: var(--ink-2); cursor: pointer; }
.theme-toggle:hover { background: var(--paper-2); color: var(--ink); }
.theme-toggle .ico-sun { display: none; }
html[data-theme="dark"] .theme-toggle .ico-sun { display: block; }
html[data-theme="dark"] .theme-toggle .ico-moon { display: none; }
img.avatar { object-fit: cover; padding: 0; }
.profile-card { display: grid; gap: 22px; }
.profile-top { display: flex; gap: 22px; align-items: center; flex-wrap: wrap; }
.profile-avatar { width: 112px; height: 112px; border-radius: 50%; object-fit: cover; flex: none; box-shadow: 0 0 0 4px var(--card), 0 0 0 5px var(--line); }
.profile-avatar-empty { display: grid; place-items: center; background: var(--deep); color: var(--gold); font-family: var(--serif); font-size: 2.8rem; font-weight: 700; }
.profile-avatar-sm { width: 72px; height: 72px; font-size: 1.8rem; }
.profile-id .h1 { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 6px; }
.profile-id p { margin: 0 0 4px; }
.verified-badge { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--brand); color: #fff; flex: none; }
.verified-badge .ico { width: 16px; height: 16px; stroke-width: 3; }
.verified-sm { width: 18px; height: 18px; margin-left: 4px; vertical-align: -3px; }
.verified-sm .ico { width: 11px; height: 11px; }
.kyc-line { display: inline-flex; align-items: center; gap: 6px; font-weight: 650; color: var(--muted); }
.kyc-ok { color: var(--brand); }
.profile-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin: 0; }
.profile-stats > div { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 14px 16px; }
.profile-stats dt { color: var(--muted); font-size: .84rem; font-weight: 650; }
.profile-stats dd { margin: 4px 0 0; font-weight: 750; font-size: 1.1rem; display: flex; align-items: center; gap: 8px; }
.deposit-box { display: flex; gap: 16px; align-items: flex-start; border: 1px solid var(--gold); background: var(--gold-soft); border-radius: var(--radius); padding: 18px 20px; }
.deposit-box > .ico { width: 28px; height: 28px; color: var(--gold-2); margin-top: 4px; }
.deposit-box p { margin: 0; }
.deposit-label { font-weight: 700; color: var(--gold-2); text-transform: uppercase; letter-spacing: .08em; font-size: .78rem; }
.deposit-amount { font-family: var(--serif); font-size: 2rem; font-weight: 700; line-height: 1.2; }
.profile-note { display: flex; gap: 6px; align-items: flex-start; margin: 0; }
.user-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); }
@media (max-width: 1080px) { .user-grid { grid-template-columns: 1fr; } }
.field-row-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 820px) { .field-row-3 { grid-template-columns: 1fr; } }
.dates-box { margin: 4px 0; }
.dates-box .field-row-3 { grid-template-columns: 1fr; gap: 12px; }
.dates-box legend { padding: 0 6px; }
.step-num-sm { width: 28px; height: 28px; font-size: .95rem; margin: 0; flex: none; }
.upload-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 600px) { .upload-grid { grid-template-columns: 1fr; } }
.upload { position: relative; display: grid; justify-items: center; gap: 6px; text-align: center; border: 2px dashed var(--line-2); border-radius: var(--radius); padding: 22px 14px; background: var(--paper); cursor: pointer; transition: border-color .15s, background .15s; }
.upload:hover { border-color: var(--brand); background: var(--brand-soft); }
.upload .ico { width: 28px; height: 28px; color: var(--brand); }
.upload span { color: var(--muted); font-size: .84rem; overflow-wrap: anywhere; }
.upload input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.upload.has-file { border-style: solid; border-color: var(--brand); }
.upload.has-file span { color: var(--brand); font-weight: 650; }
.upload.has-error { border-color: var(--danger); }
.liveness-code { display: inline-grid; justify-items: center; background: var(--deep); color: #fff; border-radius: var(--radius); padding: 12px 26px; margin: 4px 0 8px; }
.liveness-code small { color: #a9bdb4; font-size: .78rem; }
.liveness-code b { font-family: var(--mono); font-size: 2.2rem; letter-spacing: .25em; color: var(--gold); }
.doc-types label span { font-size: .86rem; }
.kyc-file img, .kyc-file video { display: block; width: 100%; max-height: 520px; object-fit: contain; border-radius: var(--radius-sm); background: #000; }
.kyc-checklist { gap: 6px; }
.staff-badge { display: inline-flex; align-items: center; gap: 6px; background: var(--gold-soft); color: var(--gold-2); border: 1px solid var(--gold); border-radius: 999px; padding: 4px 12px; font-weight: 700; font-size: .86rem; margin: 2px 0 6px !important; }
.badge-staff { background: var(--gold-soft); color: var(--gold-2); border-color: var(--gold); }
.or-divider { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: .86rem; margin: 18px 0 6px; }
.or-divider::before, .or-divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.pk-del summary { list-style: none; }
.pk-del summary::-webkit-details-marker { display: none; }
.pk-del[open] { flex-basis: 100%; }
.sessions { list-style: none; padding: 0; margin: 0 0 12px; display: grid; gap: 10px; }
.session { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--paper); }
.session-current { border-color: var(--brand); }
.session .small { margin-top: 3px; }
.warn-inline { color: var(--danger); }
.avatar-edit { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
html[lang="hi"] .deposit-label { letter-spacing: 0; }

/* ==========================================================================
   Тёмная тема (data-theme="dark" ставит static/js/theme.js до отрисовки)
   ========================================================================== */
html[data-theme="dark"] {
  color-scheme: dark;
  --paper: #0d1411;
  --paper-2: #121c18;
  --card: #16211c;
  --ink: #e6eee9;
  --ink-2: #c3d0c9;
  --muted: #8ea39a;
  --line: #24322c;
  --line-2: #33453d;
  --brand: #1f9d72;
  --brand-2: #23b283;
  --brand-3: #2cc592;
  --brand-soft: #123528;
  --gold: #e0b04a;
  --gold-2: #e7be65;
  --gold-soft: #2e2512;
  --deep: #07100c;
  --deep-2: #0f2620;
  --danger: #f2766b;
  --danger-soft: #3a1917;
  --warn: #f0a55a;
  --warn-soft: #36260f;
  --info: #86a8ff;
  --info-soft: #172240;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 10px 30px rgba(0, 0, 0, .25);
  --shadow-lg: 0 2px 4px rgba(0, 0, 0, .35), 0 24px 60px rgba(0, 0, 0, .45);
}
html[data-theme="dark"] .site-header { background: rgba(13, 20, 17, .86); border-bottom-color: var(--line); }
html[data-theme="dark"] .btn-primary { box-shadow: 0 6px 16px rgba(0, 0, 0, .35); }
html[data-theme="dark"] .btn-primary, html[data-theme="dark"] .btn-primary:hover { color: #fff; }
html[data-theme="dark"] .btn-ghost { color: var(--ink); }
html[data-theme="dark"] .flash-success { border-color: #1f5a44; color: #a8e2c7; }
html[data-theme="dark"] .flash-error { border-color: #6b2a25; color: #ffb4ab; }
html[data-theme="dark"] .flash-info { border-color: #2c3f73; color: #b9cbff; }
html[data-theme="dark"] .flash-dev { background: #2e2512; border-color: #5c4a1f; color: #f3d98f; }
html[data-theme="dark"] .m-agent, html[data-theme="dark"] .from-agent .bubble,
html[data-theme="dark"] .feed-private .feed-event-pill, html[data-theme="dark"] .private-card { border-color: #5c4a1f; }
html[data-theme="dark"] .m-buyer, html[data-theme="dark"] .mine .bubble { border-color: #1f5a44; }
html[data-theme="dark"] .m-file, html[data-theme="dark"] .private-body { background: rgba(0, 0, 0, .25); }
html[data-theme="dark"] .chip-ok, html[data-theme="dark"] .badge-green, html[data-theme="dark"] .badge-funds_secured,
html[data-theme="dark"] .badge-completed, html[data-theme="dark"] .badge-kyc-verified,
html[data-theme="dark"] .ev-payment_confirmed .feed-event-pill, html[data-theme="dark"] .ev-released .feed-event-pill,
html[data-theme="dark"] .ev-delivery_accepted .feed-event-pill, html[data-theme="dark"] .ev-auto_accepted .feed-event-pill,
html[data-theme="dark"] .seg input:checked + span, html[data-theme="dark"] .legal-nav a[aria-current] { border-color: #1f5a44; color: #a8e2c7; }
html[data-theme="dark"] .chip-warn { border-color: #5c3d17; }
html[data-theme="dark"] .badge-awaiting_payment, html[data-theme="dark"] .badge-kyc-pending,
html[data-theme="dark"] .feed-private .feed-event-pill, html[data-theme="dark"] .stat-hot { border-color: #5c4a1f; color: #f3d98f; }
html[data-theme="dark"] .badge-inspection, html[data-theme="dark"] .badge-accepted { border-color: #2c3f73; color: #b9cbff; }
html[data-theme="dark"] .badge-disputed, html[data-theme="dark"] .badge-hot, html[data-theme="dark"] .badge-kyc-rejected,
html[data-theme="dark"] .ev-disputed .feed-event-pill { border-color: #6b2a25; color: #ffb4ab; }
html[data-theme="dark"] .badge-refunded, html[data-theme="dark"] .badge-cancelled { background: #202a26; color: #9aa9a2; }
html[data-theme="dark"] .role-buyer { background: #123528; color: #a8e2c7; }
html[data-theme="dark"] .role-seller { background: #172240; color: #b9cbff; }
html[data-theme="dark"] .role-agent { background: #2e2512; color: #f3d98f; }
html[data-theme="dark"] .row-hot td { background: #1d1a10; }
html[data-theme="dark"] .section-dark, html[data-theme="dark"] .site-footer, html[data-theme="dark"] .rate-card,
html[data-theme="dark"] .feature, html[data-theme="dark"] .cookie-note, html[data-theme="dark"] .adm-side { background-color: var(--deep); }
html[data-theme="dark"] .section-dark { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
html[data-theme="dark"] .step-num { background: var(--brand-soft); }
html[data-theme="dark"] .verified-badge { color: #fff; }
html[data-theme="dark"] .qr-box { background: #fff; }  /* QR должен быть тёмным на белом, иначе телефон не прочтёт */
html[data-theme="dark"] .flag { box-shadow: 0 0 0 1px rgba(255, 255, 255, .12); }
html[data-theme="dark"] select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%238ea39a' stroke-width='1.8' fill='none' stroke-linecap='round'/%3E%3C/svg%3E"); }

/* Админка → Почта */
.mail-providers { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }
.mail-providers label span { width: 100%; height: 100%; flex-direction: column; align-items: flex-start; gap: 2px; border-radius: var(--radius-sm); padding: 12px 14px; }
.mail-providers label span small { font-weight: 500; font-size: .8rem; color: var(--muted); }
.guide-steps { padding-left: 1.3em; }
.guide-steps li { padding-left: 4px; }
.guide-steps code, .card code { overflow-wrap: anywhere; }
.mail-advanced { margin-top: 6px; border-top: 1px solid var(--line); padding-top: 12px; }
.mail-advanced summary { cursor: pointer; font-weight: 650; margin-bottom: 10px; }
.mail-ok { color: var(--brand); font-weight: 600; }
.btn-danger-text { color: var(--danger); }
.btn-danger-text:hover { color: var(--danger); border-color: var(--danger); }
.mail-status { display: block; }

/* KYC: запись видео на странице — во время записи на весь экран, всё видно без прокрутки */
.rec-start { display: grid; gap: 6px; justify-items: start; }
.rec-status { margin: 0; }
.rec-stage { position: fixed; inset: 0; z-index: 200; background: #050a08; color: #fff; display: flex; flex-direction: column; height: 100vh; height: 100dvh; }
.rec-stage[hidden] { display: none; }
.rec-view { position: relative; flex: 1 1 auto; min-height: 0; width: 100%; max-width: 960px; margin: 0 auto; overflow: hidden; background: #000; }
.rec-view video { width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); display: block; }
.rec-oval { position: absolute; left: 50%; top: 55%; height: 64%; max-width: 86%; aspect-ratio: 3 / 4; transform: translate(-50%, -50%); border-radius: 50%;
  border: 3px dashed rgba(255, 255, 255, .85); box-shadow: 0 0 0 100vmax rgba(8, 18, 13, .4); transition: border-color .2s; pointer-events: none; }
.rec-oval.is-ok { border: 4px solid #3ddc97; }
.rec-oval.is-bad { border-color: #f5b14c; }
.rec-top { position: absolute; left: 0; right: 0; top: 0; padding: calc(14px + env(safe-area-inset-top)) 16px 34px; text-align: center; pointer-events: none;
  background: linear-gradient(rgba(0, 0, 0, .78), rgba(0, 0, 0, .45) 65%, transparent); }
.rec-prompt { font-size: clamp(1.2rem, 5.2vw, 1.6rem); font-weight: 800; line-height: 1.25; margin: 0; min-height: 1.25em; color: #fff; text-shadow: 0 1px 4px rgba(0, 0, 0, .6); }
.rec-hint { color: #ffc56b; font-weight: 650; margin: 6px 0 0; min-height: 1.3em; font-size: clamp(.9rem, 3.8vw, 1rem); text-shadow: 0 1px 3px rgba(0, 0, 0, .6); }
.rec-badge { position: absolute; left: 12px; bottom: 12px; display: inline-flex; align-items: center; gap: 6px; background: rgba(0, 0, 0, .55); color: #fff;
  font-size: .78rem; font-weight: 700; padding: 4px 10px; border-radius: 999px; letter-spacing: .04em; }
.rec-badge i { width: 9px; height: 9px; border-radius: 50%; background: #ff4d4d; animation: rec-blink 1s steps(2, start) infinite; }
.rec-badge b { font-family: var(--mono); font-weight: 600; }
@keyframes rec-blink { to { visibility: hidden; } }
.rec-arrow { position: absolute; top: 55%; display: flex; gap: 2px; transform: translateY(-50%); pointer-events: none; }
.rec-arrow i { width: 26px; height: 26px; border-left: 6px solid #fff; border-bottom: 6px solid #fff; border-radius: 3px; opacity: .2;
  filter: drop-shadow(0 1px 3px rgba(0, 0, 0, .5)); animation: rec-chev 1.2s infinite; }
.rec-arrow-left { left: 5%; }
.rec-arrow-left i { transform: rotate(45deg); }
.rec-arrow-left i:nth-child(3) { animation-delay: 0s; } .rec-arrow-left i:nth-child(2) { animation-delay: .2s; } .rec-arrow-left i:nth-child(1) { animation-delay: .4s; }
.rec-arrow-right { right: 5%; }
.rec-arrow-right i { transform: rotate(-135deg); }
.rec-arrow-right i:nth-child(1) { animation-delay: 0s; } .rec-arrow-right i:nth-child(2) { animation-delay: .2s; } .rec-arrow-right i:nth-child(3) { animation-delay: .4s; }
@keyframes rec-chev { 0%, 100% { opacity: .15; } 40% { opacity: 1; } }
.rec-panel { flex: 0 0 auto; width: 100%; max-width: 960px; margin: 0 auto; display: grid; gap: 10px; padding: 10px 14px calc(12px + env(safe-area-inset-bottom)); }
.rec-bar { height: 5px; border-radius: 99px; background: rgba(255, 255, 255, .16); overflow: hidden; }
.rec-bar span { display: block; height: 100%; width: 0; background: #3ddc97; transition: width .12s linear; }
.rec-steps { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.rec-steps li { font-size: .8rem; font-weight: 600; padding: 4px 10px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .28); color: rgba(255, 255, 255, .7); }
.rec-steps li.is-active { border-color: #3ddc97; color: #fff; box-shadow: inset 0 0 0 1px #3ddc97; }
.rec-steps li.is-ok, .rec-steps li.is-done { background: rgba(61, 220, 151, .18); border-color: transparent; color: #a8f0cf; }
.rec-steps li.is-ok::before, .rec-steps li.is-done::before { content: "✓ "; }
.rec-steps li.is-skip { text-decoration: line-through; opacity: .6; }
.rec-actions { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
[data-rec-upload-toggle] { justify-self: start; color: var(--muted); }
@media (max-width: 640px) { .rec-arrow i { width: 20px; height: 20px; border-width: 5px; } .rec-oval { height: 58%; } }
@media (min-width: 961px) { .rec-view { border-radius: 0 0 var(--radius) var(--radius); } }
.lv-steps { list-style: none; padding: 0; margin: 4px 0 8px; display: grid; gap: 4px; font-size: .9rem; }
.lv-ok { color: var(--brand-2); }
.lv-bad { color: var(--danger); }
html[data-theme="dark"] .lv-ok { color: #a8e2c7; }

/* KYC: пошаговый мастер */
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.kyc-wizard.wiz-on .kyc-step:not(.is-current) { display: none; }
.kyc-step h2:focus { outline: none; }
.kyc-progress ol { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.kyc-progress li { font-size: .78rem; font-weight: 650; color: var(--muted); }
.kyc-progress li::before { content: ""; display: block; height: 5px; border-radius: 99px; background: var(--line); margin-bottom: 6px; transition: background .2s; }
.kyc-progress li.is-done::before, .kyc-progress li.is-current::before { background: var(--brand); }
.kyc-progress li.is-current { color: var(--ink); }
.kyc-progress p { margin: 6px 0 0; }
@media (max-width: 520px) { .kyc-progress li span { display: none; } }
.wiz-nav { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 6px; }
.wiz-nav-final { justify-content: space-between; }
.doc-cards { border: 0; padding: 0; margin: 0; min-width: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.doc-card { position: relative; cursor: pointer; }
.doc-card input { position: absolute; opacity: 0; pointer-events: none; }
.doc-card-body { display: grid; justify-items: center; text-align: center; gap: 4px; height: 100%; padding: 12px 10px 14px; border: 1px solid var(--line-2);
  border-radius: var(--radius); background: var(--card); transition: border-color .15s, box-shadow .15s, transform .15s; }
.doc-card-body b { font-size: .92rem; line-height: 1.25; }
.doc-card-body small { font-size: .76rem; color: var(--muted); line-height: 1.3; }
.doc-card:hover .doc-card-body { border-color: var(--ink-2); transform: translateY(-1px); }
.doc-card input:checked + .doc-card-body { border-color: var(--brand); box-shadow: inset 0 0 0 1px var(--brand), var(--shadow); background: var(--brand-soft); }
.doc-card input:focus-visible + .doc-card-body { outline: 3px solid var(--gold); outline-offset: 2px; }
.doc-cards.has-error .doc-card-body { border-color: var(--danger); }
.kyc-art { width: 100%; max-width: 120px; height: auto; display: block; }
.kyc-howto { display: flex; align-items: center; gap: 14px; }
.kyc-howto .kyc-art { flex: 0 0 96px; }
.kyc-howto p { margin: 0; }
/* цвета иллюстраций */
.ka-shadow { fill: rgba(0, 0, 0, .08); }
.ka-cover { fill: #1f3a5f; } .ka-cover-edge { fill: #18304f; }
.ka-gold { fill: #d9b25f; } .ka-gold-line { fill: none; stroke: #d9b25f; stroke-width: 2; }
.ka-card { fill: #eef4f0; stroke: #b9cfc3; stroke-width: 1.5; }
.ka-card-dl { fill: #fbeef3; stroke: #e5bfcd; } .ka-card-rp { fill: #edf2fb; stroke: #bccbe6; }
.ka-band { fill: #2f7a5b; }
.ka-photo { fill: #c9d9e8; } .ka-face { fill: #7d93a8; }
.ka-line { fill: #b7c3cc; } .ka-chip { fill: #d9b25f; } .ka-stamp { fill: none; stroke: #c76b6b; stroke-width: 2; stroke-dasharray: 4 3; }
.ka-page { fill: #fbfaf4; } .ka-page-solid { stroke: #d7d3c4; stroke-width: 1.5; } .ka-fold { stroke: #d7d3c4; stroke-width: 1.5; }
.ka-car path { fill: #c24f74; } .ka-wheel { fill: #3a3a3a; }
.ka-house path { fill: none; stroke: #3b62b5; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.ka-bg { fill: var(--brand-soft); }
html[data-theme="dark"] .ka-card { fill: #22302a; stroke: #3c5247; } html[data-theme="dark"] .ka-card-dl { fill: #34252b; stroke: #5a3d48; }
html[data-theme="dark"] .ka-card-rp { fill: #232c3b; stroke: #3d4b66; } html[data-theme="dark"] .ka-page { fill: #2b2b26; }
html[data-theme="dark"] .ka-line { fill: #5d6b73; } html[data-theme="dark"] .ka-photo { fill: #3a4c5c; } html[data-theme="dark"] .ka-face { fill: #8aa3b9; }
/* слоты фото */
.photo-slot { display: grid; gap: 10px; padding: 14px; border: 1.5px dashed var(--line-2); border-radius: var(--radius); background: var(--card); }
.photo-slot.has-file { border-style: solid; border-color: var(--brand); }
.photo-slot.has-error { border-color: var(--danger); }
.photo-slot-main { display: flex; align-items: center; gap: 12px; min-width: 0; }
.photo-slot-text { display: grid; gap: 2px; min-width: 0; }
.photo-slot-text span { overflow-wrap: anywhere; }
.photo-ph { flex: 0 0 64px; height: 64px; border-radius: var(--radius-sm); background: var(--paper-2); display: grid; place-items: center; color: var(--muted); }
.photo-ph .ico { width: 28px; height: 28px; }
.photo-thumb { flex: 0 0 auto; width: 96px; height: 64px; object-fit: cover; border-radius: var(--radius-sm); background: var(--paper-2); }
.photo-actions { margin-top: 0; }
.file-btn { position: relative; cursor: pointer; }
.file-btn input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.file-btn:focus-within { outline: 3px solid var(--gold); outline-offset: 2px; }
/* камера для фото */
body.cam-open { overflow: hidden; }
.cam-modal { position: fixed; inset: 0; z-index: 200; background: #050a08; display: flex; flex-direction: column; height: 100vh; height: 100dvh; }
.cam-modal[hidden] { display: none; }
.cam-box { flex: 1 1 auto; min-height: 0; width: 100%; max-width: 960px; margin: 0 auto; display: flex; flex-direction: column; }
.cam-view { position: relative; flex: 1 1 auto; min-height: 0; overflow: hidden; background: #000; display: grid; place-items: center; }
.cam-view video { width: 100%; height: 100%; object-fit: contain; display: block; }
.cam-view video.is-mirrored { transform: scaleX(-1); }
.cam-frame { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); border: 3px solid rgba(255, 255, 255, .9); border-radius: 14px;
  box-shadow: 0 0 0 100vmax rgba(0, 0, 0, .35); pointer-events: none; }
.cam-frame-card { width: 78%; aspect-ratio: 85.6 / 54; }
.cam-frame-page { width: 70%; aspect-ratio: 125 / 88; }
.cam-frame-selfie { height: 78%; aspect-ratio: 4 / 5; border-radius: 45% 45% 18px 18px; border-style: dashed; }
.cam-hint { color: #e8efe9; text-align: center; margin: 0; padding: 12px 16px 0; font-weight: 600; }
.cam-actions { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px; padding: 12px 16px calc(14px + env(safe-area-inset-bottom)); }
.cam-actions [data-cam-cancel] { justify-self: start; }
.cam-actions [data-cam-flip] { justify-self: end; }
.cam-shutter { width: 68px; height: 68px; border-radius: 50%; border: 4px solid #fff; background: rgba(255, 255, 255, .25); cursor: pointer; flex: 0 0 auto;
  box-shadow: inset 0 0 0 4px rgba(0, 0, 0, .35); transition: transform .1s; }
.cam-shutter:active { transform: scale(.92); }
.cam-shutter:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }
.btn-light { color: #fff; border-color: rgba(255, 255, 255, .45); }
.btn-light:hover { color: #fff; background: rgba(255, 255, 255, .1); border-color: #fff; }
@media (max-width: 640px) { .cam-frame-card { width: 90%; } .cam-frame-page { width: 88%; } }
/* видео: экран «Отлично» */
.rec-done { display: grid; justify-items: center; text-align: center; gap: 6px; padding: 18px 8px 6px; }
.rec-done h3, .rec-done p { margin: 0; }
.rec-done-icon { width: 72px; height: 72px; border-radius: 50%; display: grid; place-items: center; background: var(--brand); color: #fff;
  box-shadow: 0 0 0 10px var(--brand-soft); animation: rec-pop .35s ease-out; margin-bottom: 8px; }
.rec-done-icon .ico { width: 38px; height: 38px; stroke-width: 3; }
@keyframes rec-pop { from { transform: scale(.6); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.kyc-section { padding-top: 16px; }
@media (max-width: 560px) {
  .doc-cards { grid-template-columns: 1fr; gap: 8px; }
  .doc-card-body { display: grid; grid-template-columns: 76px 1fr; grid-template-rows: auto auto; justify-items: start; text-align: left; column-gap: 12px; row-gap: 2px; padding: 10px 12px; align-items: center; }
  .doc-card-body .kyc-art { grid-row: 1 / span 2; max-width: 76px; }
  .doc-card-body b { align-self: end; }
  .doc-card-body small { align-self: start; }
  .kyc-howto .kyc-art { flex-basis: 72px; }
  .photo-actions .btn { flex: 1 1 auto; justify-content: center; }
}
.rec-stage .rec-top .rec-prompt { color: #fff; }
.rec-stage .rec-top .rec-hint { color: #ffc56b; }
.kyc-wizard > .cam-modal, .kyc-step > .rec-stage { margin: 0; }
@media (min-width: 761px) { .doc-cards { grid-template-columns: repeat(5, 1fr); gap: 8px; } .doc-card-body { padding: 10px 6px 12px; } }

/* аватар: выбор области */
.crop-modal { position: fixed; inset: 0; z-index: 210; background: rgba(5, 10, 8, .72); display: grid; place-items: center; padding: 16px; margin: 0; }
.crop-modal[hidden] { display: none; }
.crop-box { width: min(400px, 100%); background: var(--card); color: var(--ink); border-radius: var(--radius-lg); padding: 20px; display: grid; gap: 12px; box-shadow: var(--shadow-lg); }
.crop-box h3, .crop-box p { margin: 0; }
.crop-stage { position: relative; width: 100%; aspect-ratio: 1; overflow: hidden; border-radius: var(--radius); background: #111; touch-action: none; cursor: grab; user-select: none; }
.crop-stage:active { cursor: grabbing; }
.crop-stage:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }
.crop-stage img { position: absolute; left: 0; top: 0; max-width: none; transform-origin: 0 0; pointer-events: none; }
.crop-ring { position: absolute; inset: 0; border-radius: 50%; box-shadow: 0 0 0 100vmax rgba(0, 0, 0, .5); border: 2px solid rgba(255, 255, 255, .9); pointer-events: none; }
.crop-zoom { display: flex; align-items: center; gap: 10px; color: var(--muted); }
.crop-zoom input { flex: 1; accent-color: var(--brand); }
.crop-actions { display: flex; justify-content: space-between; gap: 10px; }

/* чат сделки: звук, кому писать, личные сообщения */
.room-tools { display: inline-flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.chat-to { display: inline-flex; align-items: center; gap: 6px; font-size: .85rem; color: var(--muted); }
.chat-to select { font-size: .85rem; padding: 5px 8px; border-radius: 8px; }
.chat-form.is-private textarea { border-color: var(--gold); box-shadow: 0 0 0 2px var(--gold-soft); }
.chip-private { display: inline-flex; align-items: center; gap: 4px; background: var(--gold-soft); color: #7a5410; border-color: #f0dcae; }
.chip-private .ico { width: 12px; height: 12px; }
html[data-theme="dark"] .chip-private { color: #f3d48a; border-color: #5a4a22; }
.next-card-done h2 { color: var(--brand); }
.next-card-closed { border-top-color: var(--line-2); }
html[data-theme="dark"] .next-card-done h2 { color: #7fd3ab; }

/* админка: блокировка, настройки писем */
.callout-danger { border-left-color: var(--danger); background: var(--danger-soft); }
.callout-danger > .ico { color: var(--danger); }
.ban-card { border-top: 3px solid var(--danger); }
.ban-card h2 { display: flex; align-items: center; gap: 8px; color: var(--danger); }
.mail-pref span { font-weight: 600; font-size: .86rem; }
.break { word-break: break-all; }
