/* ПравоЩит — основные стили. Mobile-first. */
:root {
  --ink: #0f1b2d;
  --ink-2: #1d2a40;
  --text: #1d2433;
  --muted: #5d6677;
  --line: #e4e0d6;
  --line-2: #d6d1c4;
  --paper: #f7f5f0;
  --card: #ffffff;
  --accent: #c2410c;
  --accent-h: #a5370a;
  --accent-soft: #fdf0e8;
  --ok: #15803d;
  --ok-soft: #e8f6ed;
  --err: #b91c1c;
  --err-soft: #fdecec;
  --info: #1e40af;
  --info-soft: #eaf0fd;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 1px 2px rgba(15, 27, 45, .06), 0 6px 20px rgba(15, 27, 45, .06);
  --shadow-lg: 0 18px 50px rgba(15, 27, 45, .16);
  --serif: "PT Serif", Georgia, "Times New Roman", serif;
  --sans: Inter, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --header-h: 64px;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); }
body { margin: 0; font: 16px/1.6 var(--sans); color: var(--text); background: var(--paper); -webkit-font-smoothing: antialiased; }
img, svg { max-width: 100%; }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--accent-h); }
h1, h2, h3 { line-height: 1.2; color: var(--ink); overflow-wrap: break-word; hyphens: auto; -webkit-hyphens: auto; }
.a-card-title, .doc-locked h3, .db-head h3, .aside-link, .udoc-text b { overflow-wrap: break-word; hyphens: auto; -webkit-hyphens: auto; }
code { overflow-wrap: anywhere; }
h1 { font-family: var(--serif); font-size: clamp(1.75rem, 1.2rem + 2.4vw, 2.6rem); margin: 0 0 .5rem; letter-spacing: -.01em; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid rgba(194, 65, 12, .45); outline-offset: 2px; }
.icon { width: 1.2em; height: 1.2em; flex: none; vertical-align: -.22em; }
.skip { position: absolute; left: -999px; top: 0; background: var(--ink); color: #fff; padding: 8px 12px; z-index: 100; }
.skip:focus { left: 8px; }
.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 820px; }
.center { text-align: center; }
.muted { color: var(--muted); }
.tiny { font-size: .82rem; }
.d-block { display: block; }
.mono, code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .9em; }
.nowrap { white-space: nowrap; }
.hide-sm { display: none !important; }
.show-sm { display: inline-flex; }
@media (min-width: 720px) { .hide-sm { display: inline-flex !important; } .show-sm { display: none !important; } }

/* ---------- Кнопки ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5em; padding: .7em 1.15em; border-radius: 10px; border: 1px solid transparent;
  font-weight: 600; font-size: .95rem; line-height: 1.2; text-decoration: none; cursor: pointer; transition: background .15s, border-color .15s, color .15s, transform .05s; white-space: normal; text-align: center; overflow-wrap: anywhere; max-width: 100%; }
.btn:active { transform: translateY(1px); }
.btn-accent { background: var(--accent); color: #fff; }
.btn-accent:hover { background: var(--accent-h); color: #fff; }
.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover { background: var(--ink-2); color: #fff; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line-2); }
.btn-ghost:hover { background: #fff; color: var(--ink); border-color: var(--ink); }
.btn-outline-light { color: #fff; border-color: rgba(255,255,255,.45); background: transparent; }
.btn-outline-light:hover { background: rgba(255,255,255,.1); color: #fff; border-color: #fff; }
.btn-danger { background: var(--err-soft); color: var(--err); border-color: #f5c2c2; }
.btn-danger:hover { background: var(--err); color: #fff; }
.btn-sm { padding: .5em .85em; font-size: .87rem; border-radius: 8px; }
.btn-lg { padding: .9em 1.4em; font-size: 1.02rem; }
.btn-block { width: 100%; }
.icon-btn { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; border: 0; background: transparent; color: inherit; cursor: pointer; text-decoration: none; font-size: 1.05rem; }
.icon-btn:hover { background: rgba(15, 27, 45, .07); color: inherit; }
.icon-btn.danger:hover { background: var(--err-soft); color: var(--err); }
.linklike { background: none; border: 0; padding: 0; color: var(--accent); cursor: pointer; text-decoration: underline; font-size: inherit; }

/* ---------- Шапка ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: var(--ink); color: #fff; box-shadow: 0 1px 0 rgba(255,255,255,.06); }
.header-row { display: flex; align-items: center; gap: 12px; height: var(--header-h); }
.logo { display: inline-flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font-family: var(--serif); font-weight: 700; font-size: 1.2rem; letter-spacing: .01em; }
.logo:hover { color: #fff; }
.logo-mark { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 9px; background: var(--accent); color: #fff; }
.logo-mark .icon { width: 20px; height: 20px; }
.main-nav { display: none; }
.header-actions { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.header-actions .icon-btn { color: #fff; }
.header-actions .icon-btn:hover { background: rgba(255,255,255,.1); }
.header-actions .icon-btn.is-active { background: rgba(194,65,12,.35); }
.map-btn .icon { width: 26px; height: 26px; }
.header-actions .btn-ghost { color: #fff; border-color: rgba(255,255,255,.3); }
.header-actions .btn-ghost:hover { background: rgba(255,255,255,.1); border-color: #fff; color: #fff; }
.account-chip { position: relative; display: inline-flex; align-items: center; gap: 8px; color: #fff; text-decoration: none; padding: 4px 10px 4px 4px; border-radius: 999px; }
.account-chip:hover { background: rgba(255,255,255,.1); color: #fff; }
.avatar { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: #f3e3d6; color: var(--accent); font-weight: 700; font-size: .95rem; }
.avatar-lg { width: 56px; height: 56px; font-size: 1.4rem; }
.pro-dot { position: absolute; left: 28px; top: 4px; width: 10px; height: 10px; border-radius: 50%; background: #22c55e; border: 2px solid var(--ink); }

/* Мобильное меню */
body.nav-open { overflow: hidden; }
body.nav-open .main-nav { display: flex; flex-direction: column; position: fixed; inset: var(--header-h) 0 0 0; background: var(--ink); padding: 12px 16px 32px; overflow-y: auto; gap: 2px; }
.main-nav a { display: flex; align-items: center; gap: 12px; color: #dfe5ef; text-decoration: none; padding: 12px; border-radius: 10px; font-weight: 500; }
.main-nav a:hover, .main-nav a.is-active { background: rgba(255,255,255,.08); color: #fff; }
.main-nav a.is-active { box-shadow: inset 3px 0 0 var(--accent); }
.nav-search { position: relative; margin: 8px 0; }
.nav-search .icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: #8c97a8; }
.nav-search input { width: 100%; padding: 11px 12px 11px 40px; border-radius: 10px; border: 1px solid rgba(255,255,255,.15); background: rgba(255,255,255,.06); color: #fff; }
.nav-search input::placeholder { color: #8c97a8; }
.nav-mobile-account { border-top: 1px solid rgba(255,255,255,.1); margin-top: 8px; padding-top: 8px; }
@media (min-width: 1024px) {
  .burger, .search-toggle { display: none !important; }
  .main-nav { display: flex; align-items: center; gap: 2px; margin-left: 20px; }
  .main-nav a { padding: 8px 12px; font-size: .94rem; }
  .main-nav a.is-active { box-shadow: inset 0 -2px 0 var(--accent); border-radius: 8px 8px 0 0; }
  .main-nav a .icon { display: none; }
  .nav-search { margin: 0 0 0 8px; }
  .nav-search input { width: 17.5em; padding: 8px 12px 8px 36px; font-size: .9rem; text-overflow: ellipsis; }
  .nav-mobile-account { display: none; }
}

/* ---------- Сообщения ---------- */
.flashes { padding-top: 14px; }
.flash { display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; border-radius: 10px; margin-bottom: 8px; border: 1px solid; font-size: .95rem; }
.flash .icon { margin-top: 2px; }
.flash span { flex: 1; }
.flash-success { background: var(--ok-soft); border-color: #bfe5cc; color: #0f5d2c; }
.flash-error { background: var(--err-soft); border-color: #f5c2c2; color: #8f1515; }
.flash-info { background: var(--info-soft); border-color: #c7d5f7; color: #1e3a8a; }
.flash-close { background: none; border: 0; font-size: 1.3rem; line-height: 1; cursor: pointer; color: inherit; opacity: .6; padding: 0 4px; }
.notice { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: var(--radius-sm); margin: 0 0 16px; font-size: .95rem; }
.notice .icon { margin-top: 3px; }
.notice p { margin: 4px 0 0; }
.notice-ok { background: var(--ok-soft); color: #0f5d2c; }
.notice-info { background: var(--info-soft); color: #1e3a8a; }

/* ---------- Главная: hero ---------- */
.hero { background: radial-gradient(1200px 400px at 85% -10%, rgba(194,65,12,.35), transparent 60%), linear-gradient(180deg, var(--ink), #16243b); color: #e8ecf3; padding: 40px 0 56px; overflow: hidden; }
.hero h1 { color: #fff; font-size: clamp(2rem, 1.3rem + 3vw, 3.2rem); max-width: 16ch; }
.hero-grid { display: grid; gap: 36px; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: .85rem; color: #f6c9ad; background: rgba(194,65,12,.18); padding: 6px 12px; border-radius: 999px; margin: 0 0 18px; }
.hero-text { font-size: 1.08rem; max-width: 52ch; color: #c9d1de; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 10px; margin: 24px 0; }
.hero-facts { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px 22px; color: #aab4c4; font-size: .92rem; }
.hero-facts b { color: #fff; }
.hero-visual { position: relative; min-height: 300px; }
.hv-card { position: absolute; background: #fff; color: var(--text); border-radius: 16px; box-shadow: var(--shadow-lg); padding: 18px; }
.hv-stop { left: 0; top: 0; width: min(330px, 88%); z-index: 2; }
.hv-badge { display: inline-flex; gap: 8px; align-items: center; font-weight: 700; color: var(--accent); margin-bottom: 10px; }
.hv-line { display: flex; gap: 10px; font-size: .9rem; padding: 6px 0; border-top: 1px dashed var(--line); }
.hv-check { display: grid; place-items: center; flex: none; width: 22px; height: 22px; border-radius: 50%; background: var(--ok-soft); color: var(--ok); }
.hv-check .icon { width: 14px; height: 14px; }
.hv-doc { right: 0; top: 175px; width: min(290px, 78%); font-family: var(--serif); transform: rotate(2.5deg); }
.hv-doc-head { margin-left: 40%; font-size: .78rem; line-height: 1.4; }
.hv-fill { background: #fff3c4; padding: 0 3px; border-radius: 3px; }
.hv-doc-title { text-align: center; font-weight: 700; margin: 14px 0 8px; letter-spacing: .08em; font-size: .85rem; }
.hv-doc-lines i { display: block; height: 7px; background: #eceae4; border-radius: 4px; margin: 7px 0; }
.hv-doc-lines i.short { width: 60%; }
.hv-doc-actions { display: flex; gap: 8px; margin-top: 14px; font-family: var(--sans); }
.hv-doc-actions span { display: inline-flex; gap: 4px; align-items: center; font-size: .75rem; font-weight: 600; padding: 5px 9px; border-radius: 6px; background: var(--ink); color: #fff; }
.hv-doc-actions span:first-child { background: var(--accent); }
@media (min-width: 900px) {
  .hero { padding: 72px 0 84px; }
  .hero-grid { grid-template-columns: 1.15fr .85fr; align-items: center; }
  .hero-visual { min-height: 360px; }
}

/* ---------- Блоки разделов ---------- */
.block { padding: 40px 0 8px; }
.block + .block { border-top: 1px solid var(--line); }
.block-head { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 16px; }
.block-icon { display: grid; place-items: center; flex: none; width: 48px; height: 48px; border-radius: 12px; background: color-mix(in srgb, var(--sec, var(--accent)) 12%, #fff); color: var(--sec, var(--accent)); }
.block-icon .icon { width: 26px; height: 26px; }
.block-title-wrap { flex: 1; min-width: 0; }
.block-title { font-family: var(--serif); font-size: clamp(1.4rem, 1.1rem + 1.2vw, 1.9rem); margin: 0; }
.block-title a { color: var(--ink); text-decoration: none; }
.block-title a:hover { color: var(--sec, var(--accent)); }
.block-desc { margin: 4px 0 0; color: var(--muted); max-width: 70ch; }
.block-all { align-items: center; gap: 6px; font-weight: 600; text-decoration: none; color: var(--sec, var(--accent)); white-space: nowrap; padding-top: 8px; }
.block > .block-all { margin: 16px 0 8px; }
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 14px; margin: 0 -16px; padding-left: 16px; padding-right: 16px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { display: inline-flex; align-items: center; gap: 7px; flex: none; padding: 8px 14px; border-radius: 999px; background: #fff; border: 1px solid var(--line); color: var(--ink); text-decoration: none; font-size: .9rem; font-weight: 500; }
.chip:hover { border-color: var(--sec, var(--accent)); color: var(--sec, var(--accent)); }
.chip .icon { color: var(--sec, var(--accent)); }
.chip-count { font-size: .78rem; color: var(--muted); background: var(--paper); border-radius: 999px; padding: 0 7px; }
@media (min-width: 720px) { .chips { flex-wrap: wrap; margin: 0; padding-left: 0; padding-right: 0; } }

/* ---------- Карточки статей ---------- */
.a-grid { display: grid; gap: 14px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .a-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .a-grid { grid-template-columns: repeat(4, 1fr); } .group .a-grid, .section-body .a-grid { grid-template-columns: repeat(3, 1fr); } }
.a-list { display: grid; gap: 10px; }
.a-card { position: relative; display: flex; flex-direction: column; gap: 8px; padding: 18px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); color: var(--text); text-decoration: none; transition: border-color .15s, box-shadow .15s, transform .15s; overflow: hidden; }
.a-card::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--sec, var(--accent)); opacity: 0; transition: opacity .15s; }
.a-card:hover { border-color: var(--line-2); box-shadow: var(--shadow); transform: translateY(-2px); color: var(--text); }
.a-card:hover::before { opacity: 1; }
.a-card-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.a-card-sec { display: inline-flex; align-items: center; gap: 6px; font-size: .78rem; font-weight: 600; color: var(--sec, var(--accent)); text-transform: uppercase; letter-spacing: .04em; }
.a-card-sec .icon { width: 15px; height: 15px; }
.a-card-title { font-family: var(--serif); font-weight: 700; font-size: 1.12rem; line-height: 1.3; color: var(--ink); }
.a-card-sub { font-size: .9rem; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.a-card-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; padding-top: 4px; }
.a-list .a-card { flex-direction: column; }
.koap-chip, .docs-chip { display: inline-flex; align-items: center; gap: 5px; font-size: .78rem; padding: 3px 8px; border-radius: 6px; font-weight: 500; }
.koap-chip { background: #fbeee6; color: #8a2d07; }
.docs-chip { background: #eef1f6; color: var(--ink-2); }
.koap-chip .icon, .docs-chip .icon { width: 13px; height: 13px; }
.tag { display: inline-flex; align-items: center; gap: 4px; font-size: .72rem; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: #eef1f6; color: var(--ink-2); }
.tag-free { background: var(--ok-soft); color: var(--ok); }
.tag-red { background: var(--err-soft); color: var(--err); }
.tag-lock { background: transparent; color: #9aa3b2; padding: 0; }
.tag-lock .icon { width: 16px; height: 16px; }

/* ---------- Как это работает / CTA ---------- */
.section-h { font-family: var(--serif); font-size: clamp(1.4rem, 1.1rem + 1vw, 1.8rem); margin: 0 0 20px; }
.how { background: #fff; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 48px 0; margin-top: 40px; }
.how-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 20px; }
@media (min-width: 800px) { .how-steps { grid-template-columns: repeat(3, 1fr); gap: 28px; } }
.how-steps h3 { margin: 10px 0 6px; font-size: 1.08rem; }
.how-steps p { margin: 0; color: var(--muted); font-size: .95rem; }
.how-n { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: var(--ink); color: #fff; font-weight: 700; font-family: var(--serif); }
.cta-band { display: flex; flex-direction: column; gap: 16px; align-items: flex-start; margin: 40px auto; padding: 28px; border-radius: 18px; background: var(--ink); color: #dce3ee; }
.cta-band h2 { color: #fff; font-family: var(--serif); margin: 0 0 6px; }
.cta-band p { margin: 0; }
@media (min-width: 800px) { .cta-band { flex-direction: row; align-items: center; justify-content: space-between; padding: 36px 40px; } }

/* ---------- Заголовки страниц ---------- */
.page-head { padding: 28px 0 18px; border-bottom: 1px solid var(--line); background: #fff; }
.page-head-sm { padding: 22px 0; }
.page-head-row { display: flex; gap: 16px; align-items: flex-start; }
.page-head .lead { margin: 0; color: var(--muted); font-size: 1.05rem; max-width: 65ch; }
.page-head .chips { margin-top: 14px; padding-bottom: 0; }
.crumbs { display: flex; flex-wrap: wrap; gap: 6px; font-size: .86rem; color: var(--muted); margin-bottom: 12px; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--accent); }
.section-body { padding: 28px 16px 48px; }
.group { margin-bottom: 36px; }
.group-title { display: flex; align-items: center; gap: 10px; font-size: 1.25rem; margin: 0 0 4px; }
.group-title .icon { color: var(--sec, var(--accent)); }
.group-desc { margin: 0 0 14px; }
.empty { text-align: center; padding: 48px 16px; color: var(--muted); }
.empty .icon { width: 40px; height: 40px; color: var(--line-2); }
.empty-sm { padding: 24px 8px; }

/* ---------- Статья ---------- */
.article-page { padding: 24px 0 56px; }
.article-grid { display: grid; gap: 32px; }
@media (min-width: 1024px) {
  .article-grid { grid-template-columns: minmax(0, 1fr) 300px; gap: 48px; }
  .article-aside { position: sticky; top: calc(var(--header-h) + 20px); align-self: start; }
}
.article-main { min-width: 0; max-width: 760px; }
.article-title { font-size: clamp(1.8rem, 1.2rem + 2.4vw, 2.7rem); }
.article-sub { font-size: 1.15rem; color: var(--muted); margin: 0 0 14px; line-height: 1.5; }
.article-meta { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: .86rem; color: var(--muted); margin-bottom: 22px; }
.article-meta span, .article-meta a { display: inline-flex; align-items: center; gap: 6px; }
.article-meta a { color: var(--accent); text-decoration: none; font-weight: 600; }
.threat { border: 1px solid #f1d2bf; background: linear-gradient(180deg, #fff6f0, #fff); border-radius: var(--radius); padding: 16px 18px; margin: 0 0 24px; }
.threat-head { display: flex; align-items: center; gap: 8px; font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--accent); }
.threat-koap { font-family: var(--serif); font-weight: 700; font-size: 1.15rem; color: var(--ink); margin: 6px 0 4px; }
.threat-list { margin: 6px 0 0; padding: 0; list-style: none; }
.threat-list li { position: relative; padding-left: 18px; margin: 3px 0; }
.threat-list li::before { content: ""; position: absolute; left: 2px; top: .62em; width: 7px; height: 7px; border-radius: 2px; background: var(--accent); }

/* Типографика статьи */
.prose { font-size: 1.07rem; line-height: 1.72; overflow-wrap: break-word; }
.prose > :first-child { margin-top: 0; }
.prose p { margin: 0 0 1em; }
.prose h2 { font-family: var(--serif); font-size: 1.55rem; margin: 1.8em 0 .6em; }
.prose h3 { font-size: 1.2rem; margin: 1.5em 0 .5em; }
.prose ul, .prose ol { padding-left: 1.4em; margin: 0 0 1em; }
.prose li { margin: .35em 0; }
.prose blockquote { margin: 1.2em 0; padding: .4em 0 .4em 1.1em; border-left: 3px solid var(--accent); font-family: var(--serif); font-size: 1.12rem; color: var(--ink-2); }
.prose table { width: 100%; border-collapse: collapse; margin: 1em 0; font-size: .95rem; display: block; overflow-x: auto; }
.prose th, .prose td { border: 1px solid var(--line); padding: 8px 10px; text-align: left; vertical-align: top; }
.prose th { background: #faf8f3; }
.prose .callout, .prose .callout-tip, .prose .callout-warn { border-radius: var(--radius-sm); padding: 14px 16px 14px 46px; margin: 1.3em 0; position: relative; font-size: 1rem; }
.prose .callout::before, .prose .callout-tip::before, .prose .callout-warn::before { position: absolute; left: 14px; top: 13px; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: .85rem; color: #fff; }
.prose .callout { background: var(--info-soft); }
.prose .callout::before { content: "!"; background: var(--info); }
.prose .callout-tip { background: var(--ok-soft); }
.prose .callout-tip::before { content: "✓"; background: var(--ok); }
.prose .callout-warn { background: #fff4e5; }
.prose .callout-warn::before { content: "!"; background: #d97706; }
.prose .callout > :last-child, .prose .callout-tip > :last-child, .prose .callout-warn > :last-child { margin-bottom: 0; }

/* Пейвол как в РБК: текст затухает */
.teaser { position: relative; max-height: 11em; overflow: hidden; user-select: none; }
.teaser::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(247,245,240,0) 0%, rgba(247,245,240,.85) 55%, var(--paper) 100%); }
.paywall { position: relative; text-align: center; background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 28px 20px; box-shadow: var(--shadow); margin: -8px 0 32px; }
.paywall-icon { display: inline-grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); margin-bottom: 8px; }
.paywall-icon .icon { width: 26px; height: 26px; }
.paywall h2 { font-family: var(--serif); margin: 4px 0 8px; font-size: 1.5rem; }
.paywall p { margin: 0 auto 14px; color: var(--muted); max-width: 46ch; }
.paywall-list { list-style: none; padding: 0; margin: 0 auto 20px; text-align: left; max-width: 440px; display: grid; gap: 8px; font-size: .95rem; }
.paywall-list li { display: flex; gap: 10px; align-items: flex-start; }
.paywall-list .icon { color: var(--ok); margin-top: 3px; }
.paywall-cta { display: flex; flex-direction: column; gap: 10px; align-items: center; }
@media (min-width: 640px) { .paywall { padding: 36px 40px; } .paywall-cta { flex-direction: row; justify-content: center; } }

/* Документы */
.documents { margin-top: 40px; }
.documents-h { display: flex; align-items: center; gap: 10px; font-family: var(--serif); font-size: 1.5rem; margin: 0 0 16px; }
.documents-h .icon { color: var(--accent); }
.doc-type { display: inline-block; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--accent); background: var(--accent-soft); padding: 3px 8px; border-radius: 6px; }
.doc-locked { background: #fff; border: 1px dashed var(--line-2); border-radius: var(--radius); padding: 18px; margin-bottom: 12px; }
.doc-locked h3 { margin: 8px 0 4px; font-size: 1.1rem; }
.doc-locked p { margin: 0 0 12px; color: var(--muted); font-size: .94rem; }
.doc-locked-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; font-size: .87rem; color: var(--muted); }
.doc-locked-foot span { display: inline-flex; align-items: center; gap: 6px; }

.doc-builder { background: #fff; border: 1px solid var(--line); border-radius: 18px; margin-bottom: 20px; overflow: clip; box-shadow: var(--shadow); }
.db-head { padding: 18px 18px 0; }
.db-head h3 { font-size: 1.2rem; margin: 8px 0 4px; }
.db-head p { margin: 0; color: var(--muted); font-size: .94rem; }
.db-tabs { display: flex; gap: 4px; margin: 14px 18px 0; padding: 4px; background: var(--paper); border-radius: 10px; }
.db-tabs button { flex: 1; border: 0; background: transparent; padding: 9px; border-radius: 8px; font-weight: 600; font-size: .9rem; color: var(--muted); cursor: pointer; }
.db-tabs button.is-active { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.db-grid { display: grid; }
.db-form { padding: 18px; display: grid; gap: 14px; align-content: start; }
.db-preview-wrap { display: none; padding: 18px; background: #f1eee6; }
.doc-builder.show-preview .db-form { display: none; }
.doc-builder.show-preview .db-preview-wrap { display: block; }
@media (min-width: 900px) {
  .db-tabs { display: none; }
  .db-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); }
  .db-preview-wrap, .doc-builder.show-preview .db-form { display: grid; }
  .db-preview-wrap { align-content: start; border-left: 1px solid var(--line); }
  .db-preview-wrap .paper { position: sticky; top: calc(var(--header-h) + 16px); max-height: calc(100vh - var(--header-h) - 60px); overflow: auto; }
}
.db-preview-label { display: flex; align-items: center; gap: 6px; font-size: .8rem; color: var(--muted); margin-bottom: 10px; }
.db-progress { display: grid; gap: 6px; font-size: .82rem; color: var(--muted); }
.db-progress-bar { height: 6px; border-radius: 6px; background: var(--paper); overflow: hidden; }
.db-progress-bar i { display: block; height: 100%; background: var(--ok); transition: width .25s; }
.db-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding-top: 4px; }
.db-actions .btn { width: 100%; min-width: 0; padding-left: .5em; padding-right: .5em; }
.db-actions .db-print { grid-column: 1 / -1; background: #fff; }
/* На телефоне кнопки дублируются под предпросмотром и «прилипают» к низу экрана */
.db-actions-preview { position: sticky; bottom: 0; z-index: 3; margin: 14px -18px -18px; padding: 12px 18px calc(12px + env(safe-area-inset-bottom)); background: rgba(241,238,230,.96); backdrop-filter: blur(6px); border-top: 1px solid var(--line); }

@media (min-width: 900px) { .db-actions-preview { display: none; } }
.db-note { font-size: .8rem; color: var(--muted); margin: 0; }
.field.has-error input, .field.has-error textarea, .field.has-error select { border-color: var(--err); background: #fffafa; }

/* «Бумажный» лист предпросмотра */
.paper { background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.1), 0 10px 30px rgba(0,0,0,.06); padding: 28px 22px 32px 30px; font-family: "Times New Roman", "PT Serif", Georgia, serif; font-size: 14px; line-height: 1.5; color: #111; border-radius: 3px; }
.paper-sm { font-size: 12.5px; }
.paper .d-right { margin-left: 45%; }
.paper .d-title { text-align: center; font-weight: 700; margin: 16px 0 8px; letter-spacing: .04em; }
.paper .d-center { text-align: center; }
.paper .d-p { text-align: justify; text-indent: 2.2em; margin: 0 0 4px; hyphens: auto; }
.paper .d-gap { height: 10px; }
.paper .ph { background: #fff3c4; border-radius: 2px; color: #8a6d00; padding: 0 2px; }
.paper .ph-filled { background: #e7f6ec; color: inherit; }
@media (max-width: 480px) { .paper { padding: 18px 14px 22px 18px; font-size: 13px; } .paper .d-right { margin-left: 30%; } }

.disclaimer { display: flex; gap: 10px; align-items: flex-start; font-size: .84rem; color: var(--muted); border-top: 1px solid var(--line); padding-top: 16px; margin-top: 32px; }
.disclaimer .icon { margin-top: 2px; flex: none; }
.aside-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin-bottom: 16px; }
.aside-title { font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: 8px; }
.aside-doc, .aside-link { display: flex; gap: 8px; align-items: flex-start; padding: 8px 0; border-top: 1px solid var(--line); color: var(--ink); text-decoration: none; font-size: .93rem; line-height: 1.4; }
.aside-doc:first-of-type, .aside-link:first-of-type { border-top: 0; }
.aside-doc .icon { color: var(--accent); margin-top: 1px; }
.aside-link { flex-direction: column; gap: 2px; }
.aside-link small { color: var(--muted); font-size: .78rem; }
.aside-doc:hover, .aside-link:hover { color: var(--accent); }

/* ---------- Формы ---------- */
.field { display: grid; gap: 6px; min-width: 0; }
.field label { font-size: .88rem; font-weight: 600; color: var(--ink-2); }
.field .req { color: var(--accent); }
.field input:not([type=checkbox]):not([type=radio]):not([type=color]), .field select, .field textarea,
.search-inline input, .search-inline select, .inline-form input, .table input:not([type=checkbox]) {
  width: 100%; padding: 11px 12px; border: 1px solid var(--line-2); border-radius: 9px; background: #fff; font-size: 16px; transition: border-color .15s, box-shadow .15s; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(194,65,12,.15); }
.field textarea { resize: vertical; min-height: 44px; }
.hint { color: var(--muted); font-size: .8rem; }
.field-row { display: grid; gap: 14px; }
@media (min-width: 640px) { .field-row { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); } }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: .9rem; cursor: pointer; }
.check input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--accent); flex: none; }
.pw-wrap { position: relative; }
.pw-toggle { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); background: none; border: 0; padding: 8px; color: var(--muted); cursor: pointer; }
.pw-wrap input { padding-right: 44px !important; }

/* ---------- Авторизация ---------- */
.auth-wrap { display: grid; place-items: center; padding: 32px 16px 56px; }
.auth-card { width: 100%; max-width: 440px; background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 26px 22px; display: grid; gap: 16px; box-shadow: var(--shadow); }
.auth-card h1 { font-size: 1.8rem; margin: 0; }
.auth-card > p { margin: -8px 0 0; }
.auth-links { display: flex; justify-content: space-between; gap: 10px; font-size: .92rem; }
@media (min-width: 520px) { .auth-card { padding: 34px 32px; } }

/* ---------- Подписка ---------- */
.pricing { padding: 28px 16px 56px; }
.plan-card { display: grid; gap: 24px; background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 24px 20px; box-shadow: var(--shadow); margin-bottom: 20px; }
@media (min-width: 800px) { .plan-card { grid-template-columns: 1fr 1fr; padding: 32px; gap: 36px; } }
.plan-name { font-weight: 700; color: var(--accent); text-transform: uppercase; letter-spacing: .06em; font-size: .85rem; }
.plan-price { font-family: var(--serif); font-size: 2.6rem; font-weight: 700; color: var(--ink); line-height: 1.1; margin: 6px 0; }
.plan-price span { font-family: var(--sans); font-size: 1rem; font-weight: 500; color: var(--muted); margin-left: 6px; }
.plan-features { list-style: none; padding: 0; margin: 14px 0 0; display: grid; gap: 8px; }
.plan-features li { display: flex; gap: 10px; align-items: flex-start; }
.plan-features .icon { color: var(--ok); margin-top: 3px; }
.plan-pay { display: grid; gap: 14px; align-content: start; }
.pay-methods { border: 0; padding: 0; margin: 0; display: grid; gap: 8px; }
.pay-methods legend { font-weight: 600; font-size: .88rem; margin-bottom: 6px; padding: 0; }
.pay-method { display: block; cursor: pointer; }
.pay-method input { position: absolute; opacity: 0; }
.pay-method span { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border: 1.5px solid var(--line-2); border-radius: 10px; font-weight: 600; transition: border-color .15s, background .15s; }
.pay-method small { margin-left: auto; font-weight: 400; color: var(--muted); font-size: .8rem; }
.pay-method input:checked + span { border-color: var(--accent); background: var(--accent-soft); }
.pay-method input:focus-visible + span { outline: 3px solid rgba(194,65,12,.4); }
.faq { margin-top: 40px; }
.faq details { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 0 16px; margin-bottom: 8px; }
.faq summary { padding: 14px 0; font-weight: 600; cursor: pointer; }
.faq details p { margin: 0 0 14px; color: var(--muted); }

/* ---------- Личный кабинет ---------- */
.acc-hello { display: flex; align-items: center; gap: 14px; }
.acc-hello h1 { font-size: 1.5rem; margin: 0; }
.acc-hello p { margin: 2px 0 0; font-size: .9rem; }
.acc-grid { display: grid; gap: 20px; padding-top: 20px; padding-bottom: 56px; }
.acc-nav { display: flex; gap: 4px; overflow-x: auto; margin: 0 -16px; padding: 0 16px 4px; scrollbar-width: none; }
.acc-nav::-webkit-scrollbar { display: none; }
.acc-nav a, .acc-nav button { display: inline-flex; align-items: center; gap: 8px; flex: none; padding: 9px 14px; border-radius: 10px; color: var(--ink-2); text-decoration: none; font-weight: 500; font-size: .93rem; background: #fff; border: 1px solid var(--line); cursor: pointer; }
.acc-nav a.is-active { background: var(--ink); color: #fff; border-color: var(--ink); }
.acc-nav form { flex: none; }
@media (min-width: 900px) {
  .acc-grid { grid-template-columns: 240px minmax(0, 1fr); gap: 28px; }
  .acc-nav { flex-direction: column; margin: 0; padding: 0; position: sticky; top: calc(var(--header-h) + 20px); align-self: start; }
  .acc-nav a, .acc-nav button { background: transparent; border-color: transparent; width: 100%; }
  .acc-nav a:hover, .acc-nav button:hover { background: #fff; }
  .acc-nav a.is-active:hover { background: var(--ink); }
}
.acc-content { min-width: 0; display: grid; gap: 16px; align-content: start; }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.card.form { display: grid; gap: 14px; }
.card-h { font-size: 1.15rem; margin: 0 0 4px; }
.card-label { display: flex; align-items: center; gap: 8px; font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin-bottom: 8px; }
.cards-2 { display: grid; gap: 16px; }
@media (min-width: 700px) { .cards-2 { grid-template-columns: 1fr 1fr; } }
.big-num { font-family: var(--serif); font-size: 2.1rem; font-weight: 700; color: var(--ink); line-height: 1.1; }
.big-num small { font-family: var(--sans); font-size: .95rem; font-weight: 500; color: var(--muted); }
.card p { margin: 6px 0 12px; }
.status { display: inline-flex; align-items: center; gap: 5px; font-size: .8rem; font-weight: 600; padding: 2px 9px; border-radius: 999px; white-space: nowrap; }
.status-ok { background: var(--ok-soft); color: var(--ok); }
.status-off { background: #eef1f6; color: var(--muted); }
.status-wait { background: #fff4e5; color: #b45309; }
.status-muted { background: #f2f2f2; color: #777; }
.simple-list { list-style: none; padding: 0; margin: 0; }
.simple-list li { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 9px 0; border-top: 1px solid var(--line); font-size: .93rem; }
.simple-list li:first-child { border-top: 0; }
.dl { display: grid; grid-template-columns: 1fr; gap: 2px 18px; margin: 0 0 18px; }
.dl dt { color: var(--muted); font-size: .85rem; margin-top: 8px; }
.dl dd { margin: 0; }
@media (min-width: 600px) { .dl { grid-template-columns: 170px 1fr; } .dl dt { margin-top: 0; padding: 7px 0; } .dl dd { padding: 7px 0; } }
.row-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.methods { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 8px; }
.method { display: flex; align-items: center; gap: 12px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; flex-wrap: wrap; }
.method.is-default { border-color: #bfe5cc; background: #fbfefc; }
.method-ic { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 10px; background: var(--paper); color: var(--ink); }
.method-title { flex: 1; min-width: 140px; font-weight: 600; display: grid; }
.method-title small { font-weight: 400; color: var(--muted); font-size: .8rem; }
.bind-grid { display: grid; gap: 12px; margin-top: 12px; }
@media (min-width: 640px) { .bind-grid { grid-template-columns: 1fr 1fr; } }
.bind-option { display: grid; gap: 8px; align-content: start; justify-items: start; padding: 16px; border: 1px solid var(--line); border-radius: 12px; }
.bind-option small { color: var(--muted); font-size: .84rem; }
.bind-ic { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 10px; background: var(--accent-soft); color: var(--accent); }

/* Таблицы (на телефоне — карточками) */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.table th { text-align: left; font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 600; padding: 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table .num { text-align: right; }
.err-text { display: block; color: var(--err); font-size: .8rem; }
@media (max-width: 719px) {
  .table thead { display: none; }
  .table, .table tbody, .table tr, .table td { display: block; width: 100%; }
  .table tr { border: 1px solid var(--line); border-radius: 12px; margin-bottom: 10px; padding: 6px 12px; background: #fff; }
  .table td { border: 0; padding: 6px 0; display: flex; justify-content: space-between; gap: 12px; text-align: right; }
  .table td[data-label]::before { content: attr(data-label); color: var(--muted); font-size: .82rem; text-align: left; flex: none; }
  .table td:not([data-label]) { justify-content: flex-end; }
  .table .num { text-align: right; }
}

/* ---------- Результат оплаты ---------- */
.result-page { padding: 48px 16px 72px; }
.result { text-align: center; background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 36px 22px; box-shadow: var(--shadow); }
.result h1 { font-size: 1.8rem; }
.result p { color: var(--muted); max-width: 50ch; margin: 0 auto 18px; }
.result-icon { display: inline-grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; background: #eef1f6; color: var(--ink); margin-bottom: 12px; }
.result-icon .icon { width: 32px; height: 32px; }
.result-ok .result-icon { background: var(--ok-soft); color: var(--ok); }
.result-fail .result-icon { background: var(--err-soft); color: var(--err); }
.result-wait .result-icon { background: #fff4e5; color: #b45309; }
.result-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
body.bare { background: #eceae4; }
.demo-pay { min-height: 100vh; display: grid; place-items: center; padding: 16px; }
.demo-pay-card { width: 100%; max-width: 400px; background: #fff; border-radius: 18px; box-shadow: var(--shadow-lg); padding: 22px; display: grid; gap: 16px; }
.demo-banner { display: flex; gap: 8px; align-items: flex-start; background: #fff4e5; color: #92400e; font-size: .85rem; padding: 10px 12px; border-radius: 10px; }
.demo-pay-head { display: flex; gap: 12px; align-items: center; }
.demo-pay-head .logo-mark { color: #fff; }
.demo-amount { font-family: var(--serif); font-size: 2.4rem; font-weight: 700; color: var(--ink); }
.demo-method { display: flex; gap: 10px; align-items: center; padding: 12px; border: 1px solid var(--line); border-radius: 10px; font-weight: 600; }
.demo-actions { display: grid; gap: 8px; }

/* Поиск */
.search-big { position: relative; display: flex; gap: 8px; margin-top: 12px; }
.search-big .icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.search-big input { flex: 1; min-width: 0; padding: 13px 12px 13px 44px; border: 1px solid var(--line-2); border-radius: 10px; font-size: 16px; }

/* ---------- Подвал ---------- */
.site-footer { background: var(--ink); color: #aab4c4; padding: 40px 0 20px; font-size: .92rem; margin-top: 40px; }
.footer-grid { display: grid; gap: 24px; grid-template-columns: 1fr 1fr; }
.footer-grid > div:first-child { grid-column: 1 / -1; }
@media (min-width: 900px) { .footer-grid { grid-template-columns: 1.5fr 1fr 1fr 1fr; } .footer-grid > div:first-child { grid-column: auto; } }
.footer-grid a { display: block; color: #d3d9e3; text-decoration: none; padding: 3px 0; }
.footer-grid a:hover { color: #fff; }
.footer-grid .logo { display: inline-flex; margin-bottom: 8px; }
.footer-title { color: #fff; font-weight: 600; margin-bottom: 8px; }
.muted-light { color: #8c97a8; margin: 0; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.08); margin-top: 28px; padding-top: 16px; font-size: .8rem; color: #7e8999; }
.footer-bottom p { margin: 4px 0; }

/* Печать документа из предпросмотра */
@media print {
  body.printing > *:not(.print-sheet) { display: none !important; }
  body.printing .print-sheet { display: block !important; box-shadow: none; padding: 0; font-size: 13pt; }
}
.print-sheet { display: none; }

/* ---------- Мои документы ---------- */
.udocs { list-style: none; padding: 0; margin: 14px 0; display: grid; gap: 10px; }
.udoc { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; padding: 14px; border: 1px solid var(--line); border-radius: 12px; }
.udoc-main { display: flex; gap: 12px; flex: 1 1 320px; min-width: 0; color: var(--ink); text-decoration: none; }
.udoc-main:hover b { color: var(--accent); }
.udoc-ic { display: grid; place-items: center; flex: none; width: 42px; height: 42px; border-radius: 10px; background: var(--accent-soft); color: var(--accent); }
.udoc-text { display: grid; gap: 3px; min-width: 0; justify-items: start; }
.udoc-text b { line-height: 1.3; }
.udoc-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.btn.is-disabled { opacity: .55; cursor: not-allowed; }
.udoc-view-head { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.udoc-view-head .card-h { margin-top: 8px; }
.udoc-toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 12px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin-bottom: 16px; position: sticky; top: var(--header-h); background: #fff; z-index: 4; }
.udoc-dl { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; flex: 1 1 260px; max-width: 360px; }
.udoc-dl .btn { width: 100%; }
.udoc-del { margin-left: auto; }
.udoc-paper-wrap { background: #f1eee6; padding: 16px; border-radius: 10px; }
.acc-content .doc-builder { margin-bottom: 0; }
@media (max-width: 480px) { .udoc-paper-wrap { padding: 8px; margin: 0 -8px; } }

/* ---------- Карта постов ДПС ---------- */
.map-head { background: #fff; border-bottom: 1px solid var(--line); padding: 16px 0 12px; }
.map-head h1 { font-size: clamp(1.4rem, 1.1rem + 1.2vw, 2rem); margin-bottom: 4px; }
.map-head p { margin: 0; font-size: .92rem; max-width: 70ch; }
.map-head-row { display: flex; flex-wrap: wrap; gap: 10px 24px; align-items: flex-end; justify-content: space-between; }
.map-legend { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: .82rem; color: var(--muted); }
.map-legend li { display: inline-flex; align-items: center; gap: 6px; }
.lg-pin { width: 13px; height: 18px; flex: none; }
.map-wrap { position: relative; height: calc(100vh - var(--header-h) - 96px); height: calc(100dvh - var(--header-h) - 96px); min-height: 440px; }
.dps-map { position: absolute; inset: 0; background: #e8e4da; }
.map-error { padding: 40px 16px; text-align: center; color: var(--muted); }
.map-tools { position: absolute; z-index: 5; right: 12px; top: 12px; display: flex; gap: 8px; align-items: center; }
.map-add { box-shadow: var(--shadow-lg); }
.map-round { background: #fff; box-shadow: var(--shadow); width: 44px; height: 44px; }
.map-round:hover { background: #fff; color: var(--accent); }
.map-cross { display: none; position: absolute; left: 50%; top: 50%; z-index: 4; transform: translate(-50%, -100%); color: var(--accent); pointer-events: none; filter: drop-shadow(0 3px 4px rgba(0,0,0,.35)); }
.map-cross .icon { width: 46px; height: 46px; fill: #fff; }
.is-adding .map-cross { display: block; }
.is-adding .map-tools { display: none; }
.map-sheet { position: absolute; z-index: 6; left: 8px; right: 8px; bottom: 8px; background: #fff; border-radius: 16px; box-shadow: var(--shadow-lg); padding: 16px 16px calc(16px + env(safe-area-inset-bottom)); max-height: 70%; overflow-x: hidden; overflow-y: auto; box-sizing: border-box; }
.map-sheet[hidden] { display: none; }
.map-sheet p { margin: 4px 0 12px; font-size: .9rem; }
@media (min-width: 800px) {
  .map-sheet { left: 16px; right: auto; bottom: auto; top: 16px; width: 400px; max-width: calc(100% - 32px); }
  .map-sheet-add { top: auto; bottom: 24px; left: 50%; transform: translateX(-50%); }
  .map-tools { right: 16px; top: 16px; }
}
.map-sheet-close { position: absolute; right: 8px; top: 6px; width: 36px; height: 36px; border: 0; background: none; font-size: 1.6rem; line-height: 1; color: var(--muted); cursor: pointer; }
.ps-title { font-family: var(--serif); font-weight: 700; font-size: 1.2rem; color: var(--ink); margin-bottom: 8px; padding-right: 30px; }
.ps-row { display: flex; gap: 10px; align-items: flex-start; padding: 6px 0; font-size: .93rem; line-height: 1.4; border-top: 1px dashed var(--line); }
.ps-row:first-of-type { border-top: 0; }
.ps-ic { flex: none; width: 22px; text-align: center; }
.ps-ok .ps-ic { color: var(--ok); font-weight: 700; }
.ps-warn { color: #9a4a06; }
.ps-warn .ps-ic { color: #d97706; font-weight: 700; }
.ps-note { margin-top: 10px; font-size: .86rem; background: var(--paper); border-radius: 8px; padding: 8px 10px; color: var(--ink-2); }
.ps-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; }
.ps-actions .btn { width: 100%; min-width: 0; padding-left: .6em; padding-right: .6em; }
.ps-actions .btn-block { grid-column: 1 / -1; }
.ps-actions .btn[disabled] { opacity: .5; cursor: not-allowed; }
.map-toast { position: absolute; z-index: 7; left: 50%; top: 70px; transform: translateX(-50%); width: max-content; max-width: calc(100% - 24px); background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 10px; font-size: .9rem; box-shadow: var(--shadow-lg); text-align: center; }
.map-toast.is-err { background: #8f1515; }
.map-toast.is-ok { background: #0f5d2c; }
@media (hover: none) { .hide-touch { display: none; } }
body:has(.map-wrap) .site-footer { margin-top: 0; }

/* Анонс карты на главной */
.map-promo { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; justify-content: space-between; margin: 32px 0 8px; padding: 20px 22px; border-radius: 16px; background: linear-gradient(120deg, #fff, #fdf0e8); border: 1px solid #f1d2bf; }
.map-promo h2 { margin: 0 0 4px; font-family: var(--serif); font-size: 1.35rem; }
.map-promo p { margin: 0; color: var(--muted); max-width: 60ch; }
.map-promo .block-icon { background: #fff; }
.map-promo-text { display: flex; gap: 14px; align-items: flex-start; flex: 1 1 360px; }
@media (max-width: 640px) {
  .map-head { padding: 10px 0 8px; }
  .map-head p { display: none; }
  .map-head h1 { font-size: 1.3rem; margin: 0; }
  .map-wrap { height: calc(100vh - var(--header-h) - 104px); height: calc(100dvh - var(--header-h) - 104px); min-height: 380px; }
  .map-legend { font-size: .76rem; gap: 4px 10px; }
  .map-add span { display: none; }
  .map-add { width: 48px; height: 48px; padding: 0; border-radius: 50%; }
  .map-add .icon { width: 24px; height: 24px; }
}

/* Выбор города, булавки, окно геолокации */
.map-head-side { display: grid; gap: 8px; justify-items: start; }
.city-select { display: inline-flex; align-items: center; gap: 8px; font-size: .88rem; font-weight: 600; color: var(--ink-2); }
.city-select span { display: inline-flex; align-items: center; gap: 4px; }
.city-select .icon { color: var(--accent); }
.city-select select { padding: 7px 30px 7px 10px; border: 1px solid var(--line-2); border-radius: 9px; background: #fff; font-size: 15px; font-weight: 600; color: var(--ink); max-width: 220px; }
.tag-lg { font-size: .75rem; padding: 3px 10px; vertical-align: middle; margin-left: 6px; font-family: var(--sans); }
.dps-pin-num { width: 34px; height: 33px; line-height: 33px; text-align: center; font: 700 11px/33px Inter, Arial, sans-serif; color: #0f1b2d; }
.geo-modal { position: absolute; inset: 0; z-index: 20; background: rgba(15, 27, 45, .45); display: grid; place-items: center; padding: 12px; }
.geo-modal[hidden] { display: none; }
.geo-box { position: relative; width: 100%; max-width: 460px; max-height: 100%; overflow: auto; background: #fff; border-radius: 18px; padding: 22px 20px 18px; box-shadow: var(--shadow-lg); }
.geo-box h2 { font-family: var(--serif); font-size: 1.3rem; margin: 8px 30px 8px 0; }
.geo-box p { margin: 0 0 10px; font-size: .95rem; }
.geo-icon { display: inline-grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; background: var(--info-soft); color: var(--info); }
.geo-icon .icon { width: 24px; height: 24px; }
.geo-steps { margin: 6px 0 12px; padding-left: 1.3em; display: grid; gap: 8px; font-size: .93rem; line-height: 1.45; }
.geo-actions { display: grid; gap: 8px; margin-top: 6px; }
@media (max-width: 640px) {
  .map-head-row { gap: 8px; }
  .map-head-side { width: 100%; grid-template-columns: auto; }
  .geo-modal { place-items: end center; padding: 0; }
  .geo-box { border-radius: 18px 18px 0 0; padding-bottom: calc(18px + env(safe-area-inset-bottom)); }
}
/* Узкие телефоны: в шапке помещаются логотип, карта ДПС, кабинет/подписка и меню (поиск — внутри меню) */
@media (max-width: 440px) {
  .header-row { gap: 6px; }
  .header-actions { gap: 2px; }
  .header-actions .search-toggle { display: none; }
  .logo { font-size: 1.05rem; gap: 8px; }
  .logo-mark { width: 30px; height: 30px; }
  .header-actions .btn-sm { padding: .45em .7em; }
}
@media (max-width: 360px) { .logo-text { display: none; } }

/* ---------- Баллы ---------- */
.points-card { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; text-decoration: none; color: inherit; background: linear-gradient(120deg, #fff, #fff6e8); border-color: #f3dcb5; }
.points-card .card-label { margin-bottom: 0; }
.points-card-ic { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 12px; background: #fde9c8; color: #b45309; }
.points-card-cta { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; font-weight: 600; color: var(--accent); }
.points-hero { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 12px; }
.points-hero p { margin: 4px 0 0; }
.redeem-grid { display: grid; gap: 12px; margin-top: 12px; }
@media (min-width: 560px) { .redeem-grid { grid-template-columns: 1fr 1fr; } }
.redeem { display: grid; gap: 8px; padding: 16px; border: 1.5px solid #f3dcb5; border-radius: 12px; background: #fffbf3; }
.redeem.is-short { border-color: var(--line); background: #fff; }
.redeem-price { display: inline-flex; align-items: center; gap: 6px; font-family: var(--serif); font-size: 1.4rem; font-weight: 700; color: var(--ink); }
.redeem-price .icon { color: #d97706; }
.pts-plus { color: var(--ok); white-space: nowrap; }
.pts-minus { color: var(--muted); white-space: nowrap; }
.points-offer { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; padding: 16px 20px; border-radius: 14px; background: linear-gradient(120deg, #fff, #fff6e8); border: 1px solid #f3dcb5; margin-bottom: 20px; }
.points-offer b { display: inline-flex; align-items: center; gap: 6px; }
.points-offer .icon { color: #d97706; }
.points-offer p { margin: 2px 0 0; color: var(--muted); font-size: .92rem; }
.map-points { display: inline-flex; align-items: center; gap: 6px; font-size: .85rem; font-weight: 600; color: #92400e; background: #fff4e0; border-radius: 999px; padding: 4px 10px; text-decoration: none; }
.map-points .icon { color: #d97706; width: 16px; height: 16px; }
.map-head-main { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; }
.map-head-main p { flex-basis: 100%; }
/* Телефон: карточка поста и окна всегда видны у нижнего края экрана */
@media (max-width: 799px) {
  .map-sheet { position: fixed; z-index: 60; max-height: 62vh; max-height: 62dvh; }
  .geo-modal { position: fixed; z-index: 70; }
  .map-toast { position: fixed; z-index: 65; top: calc(var(--header-h) + 10px); }
  .ps-actions .btn { font-size: .88rem; padding: .7em .4em; gap: .35em; }
}

/* Кнопка подписки в шапке: полный текст на широких экранах, короткий — на узких */
.sub-btn { white-space: nowrap; flex: none; }
.sub-btn .sub-long { display: none; }
@media (min-width: 1100px) { .sub-btn .sub-long { display: inline; } .sub-btn .sub-short { display: none; } }
