/*
  YellowWeb — дизайн-система «Смета».
  Единый файл для всех публичных страниц сайта (главная, блог, кейсы,
  политика конфиденциальности, реквизиты, 404). Админка (/admin-panel/)
  использует отдельный стек на Tailwind и этот файл не подключает.

  Метафора: сайт-студия подаёт коммерческое предложение так же, как
  выдаёт клиенту — в виде сметы/счёта. Пунктирные «лидеры» между
  названием и ценой, круглая печать-штамп, кейсы как «оплаченные счета»
  с галочками, таймлайн вместо карточек, форма как бумажная анкета.
*/

:root {
  --paper: #F2EEE4;
  --paper-raised: #FBF8F0;
  --ink: #1B2340;
  --ink-soft: #5C6280;
  --gold: #C98A1F;
  /* Тот же золотой, но затемнённый — специально для текста (ссылки, лейблы):
     #C98A1F на --paper/--paper-raised даёт ~2.8:1, ниже порога WCAG AA
     (4.5:1 для обычного текста). #8A6216 на тех же фонах — 4.7–5.2:1.
     В тёмной теме исходный --gold уже проходит AA с большим запасом (8.4:1),
     поэтому там оба токена совпадают. */
  --gold-text: #8A6216;
  --gold-ink: #1B1206;
  --stamp: #B0432E;
  --line: rgba(27,35,64,0.16);
  --line-strong: rgba(27,35,64,0.34);
  --success: #2E7D46;
}
:root:not([data-theme="light"]) {
  @media (prefers-color-scheme: dark) {
    --paper:#181A22; --paper-raised:#20232E; --ink:#EDEAE0; --ink-soft:#A7ABC0;
    --gold:#E0AC48; --gold-text:#E0AC48; --gold-ink:#1B1206; --stamp:#D8664F;
    --line:rgba(237,234,224,0.16); --line-strong:rgba(237,234,224,0.34);
    --success: #5FCB7F;
  }
}
:root[data-theme="dark"] {
  --paper:#181A22; --paper-raised:#20232E; --ink:#EDEAE0; --ink-soft:#A7ABC0;
  --gold:#E0AC48; --gold-text:#E0AC48; --gold-ink:#1B1206; --stamp:#D8664F;
  --line:rgba(237,234,224,0.16); --line-strong:rgba(237,234,224,0.34);
  --success: #5FCB7F;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: 'Inter', system-ui, sans-serif; font-size: 16px; line-height: 1.55;
}
a { color: inherit; }
img { max-width: 100%; display: block; }
.serif { font-family: 'Fraunces', serif; }
.wrap { max-width: 1140px; margin: 0 auto; padding: 0 28px; }
@media (max-width: 640px) { .wrap { padding: 0 18px; } }

::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 4px; }

a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible,
.cta:focus-visible, .chip:focus-visible {
  outline: 2px solid var(--gold); outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important; animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important; scroll-behavior: auto !important;
  }
}

/* ═══════════════════════ ШАПКА / НАВИГАЦИЯ ═══════════════════════ */
header.site-header { border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--paper); z-index: 50; }
nav.site-nav { display: flex; align-items: center; gap: 20px; padding: 18px 0; }
.brand { font-family: 'Fraunces', serif; font-weight: 600; font-size: 19px; display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.brand img { height: 26px; width: auto; border-radius: 4px; }
.brand .dot { color: var(--gold); }
.navlinks { display: flex; gap: 26px; font-size: 14px; color: var(--ink-soft); margin-left: 12px; }
.navlinks a { text-decoration: none; white-space: nowrap; }
.navlinks a:hover, .navlinks a.active { color: var(--ink); }
.nav-cta { margin-left: auto; display: flex; align-items: center; gap: 10px; }
@media (max-width: 860px) { .navlinks { display: none; } }

.theme-toggle {
  width: 38px; height: 38px; border: 1px solid var(--line-strong); border-radius: 3px;
  background: transparent; color: var(--ink); cursor: pointer; font-size: 15px;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
  font-family: 'Fraunces', serif;
}
.theme-toggle:hover { border-color: var(--gold); color: var(--gold); }

.burger {
  display: none; width: 38px; height: 38px; border: 1px solid var(--line-strong);
  border-radius: 3px; background: transparent; color: var(--ink); cursor: pointer;
  align-items: center; justify-content: center; flex-shrink: 0;
}
.burger span { display: block; width: 16px; height: 1.5px; background: currentColor; position: relative; }
.burger span::before, .burger span::after { content: ""; position: absolute; left: 0; width: 16px; height: 1.5px; background: currentColor; transition: transform .2s ease; }
.burger span::before { top: -5px; } .burger span::after { top: 5px; }
.burger.open span { background: transparent; }
.burger.open span::before { transform: translateY(5px) rotate(45deg); }
.burger.open span::after { transform: translateY(-5px) rotate(-45deg); }
@media (max-width: 860px) { .burger { display: flex; } .nav-cta .cta.desktop-only { display: none; } }

#mobile-menu { max-height: 0; overflow: hidden; transition: max-height .3s ease; border-top: 1px solid transparent; }
#mobile-menu.open { max-height: 360px; border-top-color: var(--line); }
#mobile-menu .inner { padding: 14px 0 20px; display: flex; flex-direction: column; gap: 2px; }
#mobile-menu a { padding: 10px 4px; font-size: 15px; text-decoration: none; color: var(--ink); border-bottom: 1px dotted var(--line); }
#mobile-menu .cta { margin-top: 12px; }

/* ═══════════════════════ КНОПКИ ═══════════════════════ */
.cta {
  font-size: 14.5px; font-weight: 500; text-decoration: none; padding: 13px 22px;
  border-radius: 3px; transition: opacity .15s ease, background .15s ease; cursor: pointer;
  border: none; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: inherit;
}
.cta.primary { background: var(--gold); color: var(--gold-ink); }
.cta.primary:hover { opacity: .85; }
.cta.ghost { border: 1px solid var(--line-strong); color: var(--ink); background: transparent; }
.cta.ghost:hover { background: var(--paper-raised); }
.cta.small { padding: 9px 16px; font-size: 13.5px; }
.cta.block { width: 100%; }
.cta:disabled { opacity: .55; cursor: not-allowed; }
.cta-row { display: flex; gap: 14px; flex-wrap: wrap; }

.cta.btn-loading { position: relative; color: transparent !important; }
.cta.btn-loading::after {
  content: ""; position: absolute; width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid rgba(0,0,0,.25); border-top-color: var(--gold-ink);
  animation: spin .7s linear infinite;
}
.cta.ghost.btn-loading::after { border: 2px solid var(--line-strong); border-top-color: var(--ink); }
@keyframes spin { to { transform: rotate(360deg); } }

/* ═══════════════════════ HERO ═══════════════════════ */
.hero {
  padding: 64px 0 56px; display: grid; grid-template-columns: 1.2fr 1fr; gap: 54px;
  position: relative;
}
@media (max-width: 900px) { .hero { grid-template-columns: 1fr; padding: 44px 0 36px; gap: 32px; } }

.hero-photo { position: absolute; inset: 0; z-index: -1; overflow: hidden; }
.hero-photo img { width: 100%; height: 100%; object-fit: cover; }
.hero-photo::after { content: ""; position: absolute; inset: 0; background: var(--paper); opacity: .92; }

.badge-live {
  display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--ink-soft);
  border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px; margin-bottom: 20px;
}
.badge-live .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--success); animation: pulse-dot 2s ease-in-out infinite; }
@keyframes pulse-dot { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }

.doc-ref { font-size: 13px; color: var(--ink-soft); margin-bottom: 16px; letter-spacing: .01em; }
h1.hero-h1 {
  font-family: 'Fraunces', serif; font-weight: 600; font-size: clamp(32px, 4.4vw, 52px);
  line-height: 1.1; margin: 0 0 20px; letter-spacing: -0.01em;
}
h1.hero-h1 .accent { color: var(--gold-text); font-style: italic; }
.hero-desc { max-width: 48ch; font-size: 17px; color: var(--ink-soft); margin: 0 0 28px; }

/* ═══════════════════════ СМЕТА / ДОКУМЕНТ-СТРОКИ ═══════════════════════ */
.invoice { background: var(--paper-raised); border: 1px solid var(--line); position: relative; }
.invoice-head { padding: 16px 20px; border-bottom: 1px solid var(--line); font-family: 'Fraunces', serif; font-size: 15px; display: flex; justify-content: space-between; align-items: baseline; }
.invoice-head span { font-family: 'Inter', sans-serif; font-size: 12px; color: var(--ink-soft); }
.invoice-body { padding: 4px 20px 18px; }

.doc-row { display: flex; align-items: baseline; gap: 8px; padding: 11px 0; border-bottom: 1px dotted var(--line-strong); font-size: 14px; }
.doc-row:last-child { border-bottom: none; }
.doc-row .doc-name { white-space: nowrap; }
.doc-row .doc-leader { flex: 1; border-bottom: 1px dotted var(--line); transform: translateY(-4px); min-width: 12px; }
.doc-row .doc-value { white-space: nowrap; color: var(--ink-soft); font-variant-numeric: tabular-nums; }

.doc-row.large { padding: 20px 0; border-top: 1px solid var(--line); border-bottom: none; }
.doc-row.large:first-of-type { border-top: none; }
.doc-row.large + .doc-row.large { }
.doc-row.large .doc-name { font-size: 18px; font-weight: 500; }
.doc-row.large .doc-value { font-size: 15px; }
.doc-row.large .doc-leader { transform: translateY(-6px); }
.doc-rows-wrap .doc-row.large:last-child { border-bottom: 1px solid var(--line); }
.doc-desc { font-size: 14px; color: var(--ink-soft); margin-top: 6px; max-width: 60ch; }
.doc-row-body { display: flex; flex-direction: column; flex: 1; }
@media (max-width: 600px) { .doc-row.large { flex-wrap: wrap; } .doc-row.large .doc-leader { display: none; } }

.stamp {
  position: absolute; right: 16px; bottom: -16px; width: 88px; height: 88px; border-radius: 50%;
  border: 2px solid var(--stamp); color: var(--stamp); display: flex; align-items: center; justify-content: center;
  text-align: center; font-family: 'Fraunces', serif; font-size: 11px; font-weight: 600; line-height: 1.2;
  transform: rotate(-9deg); background: var(--paper);
}
/* На узких экранах .hero складывается в одну колонку (см. брейкпоинт .hero
   выше), и абсолютный оффсет -16px начинает перекрывать последнюю строку
   сметы вместо того, чтобы висеть в пустом месте под блоком, как на
   десктопе. Убираем absolute-позиционирование — штамп уходит в обычный
   поток под сметой, без пересчёта конкретных пикселей под каждую высоту. */
@media (max-width: 900px) {
  .stamp { position: static; margin: 16px auto 0; }
}

/* ═══════════════════════ СТАТИСТИКА ═══════════════════════ */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.stat { padding: 32px 22px; border-left: 1px solid var(--line); text-align: center; }
.stat:first-child { border-left: none; }
.stat b { display: block; font-family: 'Fraunces', serif; font-size: clamp(24px, 3vw, 34px); color: var(--gold-text); font-weight: 600; }
.stat span { font-size: 12.5px; color: var(--ink-soft); }
@media (max-width: 700px) { .stats { grid-template-columns: repeat(2, 1fr); } .stat { border-left: none; border-top: 1px solid var(--line); } .stat:nth-child(1), .stat:nth-child(2) { border-top: none; } }

/* ═══════════════════════ СЕКЦИИ ═══════════════════════ */
section.doc-section { padding: 56px 0; border-bottom: 1px solid var(--line); }
.section-head { margin-bottom: 32px; }
.section-label { font-size: 13px; color: var(--gold-text); font-weight: 600; margin-bottom: 6px; }
h2.doc-h2 { font-family: 'Fraunces', serif; font-size: clamp(22px, 2.6vw, 30px); margin: 0; font-weight: 600; }
.section-sub { color: var(--ink-soft); font-size: 15.5px; margin: 10px 0 0; max-width: 60ch; }

/* ═══════════════════════ КЕЙСЫ-КВИТАНЦИИ (тизер) ═══════════════════════ */
.receipts { display: flex; flex-direction: column; }
.receipt { display: flex; gap: 16px; align-items: center; padding: 18px 0; border-top: 1px solid var(--line); text-decoration: none; color: inherit; }
.receipt:last-child { border-bottom: 1px solid var(--line); }
.check { width: 26px; height: 26px; border-radius: 50%; border: 1.5px solid var(--stamp); color: var(--stamp); display: flex; align-items: center; justify-content: center; font-size: 14px; flex-shrink: 0; align-self: flex-start; margin-top: 2px; }
.receipt-body { flex: 1; min-width: 0; }
.receipt-title { font-size: 16.5px; font-weight: 500; }
.receipt-title .u { text-decoration: none; border-bottom: 1px solid var(--line-strong); }
.receipt:hover .u { border-bottom-color: var(--gold); color: var(--gold); }
.receipt-tag { font-size: 12.5px; color: var(--gold-text); margin-top: 4px; }
/* Мини-превью кейса в компактном списке на главной — то же изображение,
   что и на /cases/, просто маленькое: даёт узнать проект по картинке, а не
   только по названию, не ломая ряд-«квитанцию» с чек-маркой. */
.receipt-thumb { flex-shrink: 0; width: 56px; height: 56px; border-radius: 6px; overflow: hidden; border: 1px solid var(--line); }
.receipt-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
@media (max-width: 460px) { .receipt-thumb { width: 44px; height: 44px; } }

/* ═══════════════════════ КАРТОЧКИ-ДОКУМЕНТЫ (списки кейсов/блога) ═══════════════════════ */
.doc-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
@media (max-width: 860px) { .doc-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .doc-grid { grid-template-columns: 1fr; } }
.doc-card {
  background: var(--paper-raised); border: 1px solid var(--line); text-decoration: none; color: inherit;
  display: flex; flex-direction: column; transition: border-color .15s ease;
}
.doc-card:hover { border-color: var(--line-strong); }
.doc-card .thumb { width: 100%; height: 160px; object-fit: cover; border-bottom: 1px solid var(--line); }
.doc-card .thumb-empty {
  width: 100%; height: 160px; border-bottom: 1px solid var(--line); display: flex; align-items: center;
  justify-content: center; color: var(--line-strong); font-family: 'Fraunces', serif; font-size: 13px;
}
.doc-card .body { padding: 18px 20px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.doc-card .eyebrow { font-size: 11.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .03em; color: var(--gold-text); }
.doc-card h3 { font-family: 'Fraunces', serif; font-size: 17px; font-weight: 600; margin: 0; line-height: 1.3; flex: 1; }
.doc-card .meta { font-size: 12.5px; color: var(--ink-soft); }
.doc-card .go { font-size: 13.5px; font-weight: 500; color: var(--gold-text); margin-top: 4px; }

/* ═══════════════════════ ТАЙМЛАЙН ═══════════════════════ */
.timeline { display: flex; flex-wrap: wrap; gap: 0; }
.tl-step { flex: 1 1 180px; padding: 4px 18px 4px 20px; border-left: 2px solid var(--line-strong); position: relative; }
.tl-step::before { content: ""; position: absolute; left: -6px; top: 4px; width: 10px; height: 10px; border-radius: 50%; background: var(--gold); }
.tl-step .stage { font-size: 12px; color: var(--ink-soft); margin-bottom: 6px; }
.tl-step h3 { font-family: 'Fraunces', serif; font-size: 16.5px; margin: 0 0 6px; font-weight: 600; }
.tl-step p { font-size: 13.5px; color: var(--ink-soft); margin: 0; }
@media (max-width: 700px) { .timeline { flex-direction: column; gap: 22px; } }

/* ═══════════════════════ ОТЗЫВЫ ═══════════════════════ */
.testimonials { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
@media (max-width: 820px) { .testimonials { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .testimonials { grid-template-columns: 1fr; } }
.testimonial { background: var(--paper-raised); border: 1px solid var(--line); padding: 22px; display: flex; flex-direction: column; gap: 12px; }
.testimonial .quote-mark { font-family: 'Fraunces', serif; font-size: 34px; color: var(--gold); line-height: .6; opacity: .5; }
.testimonial p.quote { font-family: 'Fraunces', serif; font-style: italic; font-size: 15.5px; margin: 0; line-height: 1.45; }
.testimonial .who { font-size: 13px; color: var(--ink-soft); border-top: 1px dotted var(--line-strong); padding-top: 12px; display: flex; justify-content: space-between; gap: 10px; }
.testimonial .who b { color: var(--ink); font-weight: 500; font-style: normal; }
.testimonial .stars { color: var(--gold); letter-spacing: 1px; font-size: 12px; }

/* ═══════════════════════ FAQ (без аккордеона) ═══════════════════════ */
.faq-item { padding: 18px 0; border-top: 1px solid var(--line); }
.faq-item:last-child { border-bottom: 1px solid var(--line); }
.faq-q { font-size: 16px; font-weight: 500; margin: 0 0 8px; }
.faq-a { font-size: 14.5px; color: var(--ink-soft); margin: 0; max-width: 64ch; line-height: 1.6; }

/* ═══════════════════════ БЛОГ-СТРОКИ (тизер на главной) ═══════════════════════ */
.blog-row { display: flex; justify-content: space-between; gap: 16px; padding: 15px 0; border-top: 1px solid var(--line); font-size: 15px; text-decoration: none; color: inherit; }
.blog-row:last-of-type { border-bottom: 1px solid var(--line); }
.blog-row .u { text-decoration: none; border-bottom: 1px solid var(--line-strong); }
.blog-row:hover .u { border-bottom-color: var(--gold); color: var(--gold); }
.blog-date { color: var(--ink-soft); font-size: 13px; white-space: nowrap; flex-shrink: 0; }
.blog-more { display: inline-block; margin-top: 18px; font-size: 14px; color: var(--gold-text); text-decoration: none; }
.blog-more:hover { opacity: .8; }

/* ═══════════════════════ ЗАЯВКА / КОНТАКТЫ ═══════════════════════ */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; }
@media (max-width: 820px) { .contact-grid { grid-template-columns: 1fr; gap: 32px; } }
.contact-note { font-size: 14.5px; color: var(--ink-soft); margin: 0 0 22px; max-width: 42ch; }
.contact-list { list-style: none; margin: 0 0 0; padding: 0; font-size: 14.5px; color: var(--ink-soft); display: flex; flex-direction: column; gap: 8px; }
.contact-list b { color: var(--ink); font-weight: 500; }
.contact-list a { text-decoration: none; }
.contact-list a:hover { color: var(--gold-text); }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px 24px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field.full { grid-column: 1 / -1; }
.field label { font-size: 12.5px; color: var(--ink-soft); }
.field label .req { color: var(--stamp); }
.field input, .field textarea, .field select {
  background: transparent; border: none; border-bottom: 1px solid var(--line-strong);
  padding: 8px 2px; font-family: 'Inter', sans-serif; font-size: 15px; color: var(--ink); outline: none;
  border-radius: 0; width: 100%;
}
.field input:focus, .field textarea:focus { border-bottom-color: var(--gold); }
.field input.error, .field textarea.error { border-bottom-color: var(--stamp); }
.field textarea { resize: vertical; min-height: 60px; font-family: 'Inter', sans-serif; }
.field-error { color: var(--stamp); font-size: 12px; margin: 0; }
.form-submit { margin-top: 20px; }

.check-options { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
@media (max-width: 460px) { .check-options { grid-template-columns: 1fr; } }
.check-option { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border: 1px solid var(--line); font-size: 13.5px; cursor: pointer; }
.check-option:hover { border-color: var(--line-strong); }
.check-option input { accent-color: var(--gold); }

.magnet { display: flex; align-items: center; gap: 16px; background: var(--paper-raised); border: 1px solid var(--line); padding: 16px 18px; margin-top: 26px; }
.magnet-icon { width: 32px; height: 32px; border: 1.5px dashed var(--line-strong); border-radius: 3px; display: flex; align-items: center; justify-content: center; font-size: 14px; color: var(--gold); flex-shrink: 0; font-family: 'Fraunces', serif; }
.magnet-text { font-size: 13.5px; color: var(--ink-soft); flex: 1; }
.magnet-text b { color: var(--ink); font-weight: 500; }
.magnet button.link-btn { font-size: 13px; color: var(--gold-text); background: none; border: none; cursor: pointer; font-family: inherit; white-space: nowrap; padding: 0; }
.magnet button.link-btn:hover { text-decoration: underline; }

/* ═══════════════════════ ПРОСТОЙ CALLOUT (Telegram-подписка) ═══════════════════════ */
.alert-box { background: var(--paper-raised); border: 1px solid var(--line); text-align: center; padding: 30px; max-width: 560px; margin: 0 auto; }
.alert-box h3 { font-family: 'Fraunces', serif; font-size: 19px; margin: 0 0 8px; font-weight: 600; }
.alert-box p { color: var(--ink-soft); font-size: 14px; margin: 0 0 20px; line-height: 1.6; }
.alert-box .cta-row { justify-content: center; }

/* ═══════════════════════ МОДАЛЬНЫЕ ОКНА ═══════════════════════ */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 300; background: rgba(0,0,0,.4);
  display: flex; align-items: center; justify-content: center; padding: 16px;
  opacity: 0; pointer-events: none; transition: opacity .2s ease;
}
.modal-backdrop.open { opacity: 1; pointer-events: auto; }
.doc-modal {
  background: var(--paper); border: 1px solid var(--line-strong); max-width: 560px; width: 100%;
  max-height: 90vh; display: flex; flex-direction: column;
  transform: translateY(12px); transition: transform .2s ease;
}
.modal-backdrop.open .doc-modal { transform: translateY(0); }
.doc-modal-head { padding: 16px 20px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; }
.doc-modal-head span { font-family: 'Fraunces', serif; font-size: 15px; }
.doc-modal-close { background: none; border: none; font-size: 20px; line-height: 1; color: var(--ink-soft); cursor: pointer; padding: 4px; }
.doc-modal-close:hover { color: var(--stamp); }
.doc-modal-body { padding: 22px; overflow-y: auto; }
.doc-modal-body p.lead { color: var(--ink-soft); font-size: 14px; margin: -6px 0 18px; }

/* ═══════════════════════ TOAST ═══════════════════════ */
#toast {
  position: fixed; top: 20px; right: 20px; left: 20px; z-index: 400; max-width: 360px; margin-left: auto;
  background: var(--paper-raised); border: 1px solid var(--line-strong); border-left: 4px solid var(--success);
  padding: 14px 16px; display: flex; gap: 12px; align-items: flex-start;
  transform: translateY(-140%); opacity: 0; transition: transform .3s ease, opacity .3s ease;
}
#toast.show { transform: translateY(0); opacity: 1; }
#toast.error { border-left-color: var(--stamp); }
#toast .toast-icon { font-family: 'Fraunces', serif; font-weight: 600; flex-shrink: 0; }
#toast.error .toast-icon { color: var(--stamp); }
#toast:not(.error) .toast-icon { color: var(--success); }
#toast .toast-title { font-weight: 600; font-size: 13.5px; }
#toast .toast-msg { color: var(--ink-soft); font-size: 12.5px; margin-top: 2px; }
#toast .toast-close { margin-left: auto; background: none; border: none; color: var(--ink-soft); cursor: pointer; font-size: 15px; flex-shrink: 0; }

/* ═══════════════════════ COOKIE-БАННЕР ═══════════════════════ */
#cookie-consent {
  position: fixed; left: 20px; right: 20px; bottom: 20px; z-index: 200;
  display: flex; justify-content: center; padding: 0 0 env(safe-area-inset-bottom, 0px);
  transform: translateY(140%); opacity: 0; pointer-events: none;
  transition: transform .4s ease, opacity .3s ease;
}
#cookie-consent.show { transform: translateY(0); opacity: 1; pointer-events: auto; }
.cookie-bar {
  max-width: 640px; margin: 0 auto; background: var(--ink); color: var(--paper);
  border-radius: 4px; padding: 14px 18px; display: flex; align-items: center; justify-content: space-between;
  gap: 16px; font-size: 13.5px; box-shadow: 0 8px 24px rgba(0,0,0,0.25); flex-wrap: wrap;
}
:root:not([data-theme="light"]) { @media (prefers-color-scheme: dark) { .cookie-bar { color: var(--paper); background: #000; } } }
:root[data-theme="dark"] .cookie-bar { color: var(--paper); background: #000; }
.cookie-bar a { color: var(--gold); text-decoration: underline; }
.cookie-bar button { background: var(--gold); color: var(--gold-ink); border: none; border-radius: 3px; padding: 8px 14px; font-size: 13px; font-weight: 500; cursor: pointer; flex-shrink: 0; }

/* ═══════════════════════ ФУТЕР ═══════════════════════ */
footer.site-footer { padding: 52px 0 40px; }
.foot-cols { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; padding-bottom: 36px; border-bottom: 1px solid var(--line); }
@media (max-width: 760px) { .foot-cols { grid-template-columns: 1fr; gap: 28px; } }
.foot-col h4 { font-family: 'Fraunces', serif; font-size: 14.5px; font-weight: 600; margin: 0 0 14px; }
.foot-col p { color: var(--ink-soft); font-size: 13.5px; line-height: 1.6; margin: 0 0 14px; max-width: 34ch; }
.foot-col ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; font-size: 13.5px; color: var(--ink-soft); }
.foot-col ul a { text-decoration: none; }
.foot-col ul a:hover { color: var(--gold-text); }
.foot-socials { display: flex; gap: 10px; }
.foot-socials a {
  width: 32px; height: 32px; border: 1px solid var(--line-strong); border-radius: 3px; display: flex;
  align-items: center; justify-content: center; color: var(--ink-soft); text-decoration: none; font-size: 13px;
}
.foot-socials a:hover { border-color: var(--gold); color: var(--gold); }

.seal { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 20px; padding-top: 32px; }
.seal-ring {
  width: 72px; height: 72px; border-radius: 50%; border: 1.5px dashed var(--line-strong); display: flex;
  align-items: center; justify-content: center; font-family: 'Fraunces', serif; font-size: 10.5px; text-align: center;
  color: var(--ink-soft); line-height: 1.3; flex-shrink: 0;
}
.foot-info { font-size: 13px; color: var(--ink-soft); flex: 1; min-width: 220px; }
.foot-info b { color: var(--ink); font-weight: 500; }
.foot-right { text-align: right; font-size: 13px; color: var(--ink-soft); display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.foot-right a { text-decoration: none; }
.foot-right a:hover { color: var(--gold-text); }
@media (max-width: 480px) { .foot-right { text-align: left; justify-content: flex-start; } }

/* ═══════════════════════ СПИСКИ / ПАГИНАЦИЯ / ФИЛЬТРЫ ═══════════════════════ */
.page-hero { padding: 56px 0 40px; text-align: center; }
.page-hero .section-label { display: block; }
.page-hero h1 { font-family: 'Fraunces', serif; font-weight: 600; font-size: clamp(28px, 3.6vw, 40px); margin: 8px 0 10px; letter-spacing: -0.01em; }
.page-hero p { color: var(--ink-soft); font-size: 16px; max-width: 52ch; margin: 0 auto; }

.chip-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-bottom: 40px; }
.chip { font-size: 13px; font-weight: 500; padding: 8px 16px; border: 1px solid var(--line-strong); text-decoration: none; color: var(--ink); }
.chip.chip-active { background: var(--gold); color: var(--gold-ink); border-color: var(--gold); }
.chip:not(.chip-active):hover { background: var(--paper-raised); }

.pager { display: flex; align-items: center; justify-content: center; gap: 20px; margin-top: 8px; font-size: 14px; }
.pager a { color: var(--gold-text); text-decoration: none; }
.pager a:hover { text-decoration: underline; }
.pager .disabled { color: var(--line-strong); }
.pager .info { color: var(--ink-soft); font-size: 13px; }

.empty-state { text-align: center; padding: 60px 20px; color: var(--ink-soft); border: 1px dashed var(--line-strong); }
.empty-state .glyph { font-family: 'Fraunces', serif; font-size: 32px; color: var(--line-strong); margin-bottom: 12px; }

/* ═══════════════════════ СКЕЛЕТОНЫ ЗАГРУЗКИ ═══════════════════════ */
.skel-line { height: 14px; background: linear-gradient(90deg, var(--paper-raised) 25%, var(--line) 50%, var(--paper-raised) 75%); background-size: 200% 100%; animation: skel-shimmer 1.4s infinite; }
.skel-row { padding: 14px 0; border-top: 1px solid var(--line); }
.skel-row .skel-line { max-width: 60%; }
@keyframes skel-shimmer { 0% { background-position: -200% 0; } 100% { background-position: 200% 0; } }

/* ═══════════════════════ СТАТЬЯ / ЮРИДИЧЕСКИЙ ТЕКСТ ═══════════════════════ */
.doc-prose h2 { font-family: 'Fraunces', serif; font-size: 1.4rem; font-weight: 600; margin: 2rem 0 .8rem; }
.doc-prose h3 { font-family: 'Fraunces', serif; font-size: 1.15rem; font-weight: 600; margin: 1.6rem 0 .6rem; }
.doc-prose h2:first-child, .doc-prose h3:first-child { margin-top: 0; }
.doc-prose p { color: var(--ink-soft); line-height: 1.75; margin-bottom: 1.1rem; }
.doc-prose ul, .doc-prose ol { color: var(--ink-soft); line-height: 1.75; margin-bottom: 1.1rem; padding-left: 1.4rem; }
.doc-prose li { margin-bottom: .4rem; }
.doc-prose a { color: var(--gold-text); text-decoration: underline; text-underline-offset: 2px; }
.doc-prose img { border: 1px solid var(--line); margin: 1.5rem 0; }
.doc-prose blockquote { border-left: 3px solid var(--gold); padding: .25rem 0 .25rem 1.25rem; margin: 1.5rem 0; color: var(--ink-soft); font-style: italic; font-family: 'Fraunces', serif; }
.doc-prose strong { color: var(--ink); }
.doc-updated { color: var(--ink-soft); font-size: 13.5px; margin: 0 0 36px; }

.doc-page-head { padding: 56px 0 8px; }
.doc-page-head h1 { font-family: 'Fraunces', serif; font-weight: 600; font-size: clamp(28px, 3.6vw, 38px); margin: 0 0 8px; letter-spacing: -.01em; }
.doc-page-head p { color: var(--ink-soft); font-size: 15.5px; margin: 0; }
.doc-page-body { padding: 0 0 60px; }

/* ═══════════════════════ СЛУЖЕБНОЕ ═══════════════════════ */
.hp-field { position: absolute; left: -9999px; top: -9999px; width: 1px; height: 1px; overflow: hidden; }

#scroll-top {
  position: fixed; bottom: 24px; right: 24px; z-index: 150; width: 42px; height: 42px;
  background: var(--paper-raised); border: 1px solid var(--line-strong); color: var(--ink);
  cursor: pointer; font-size: 16px; display: flex; align-items: center; justify-content: center;
  opacity: 0; transform: translateY(12px); pointer-events: none; transition: opacity .2s ease, transform .2s ease;
}
#scroll-top.visible { opacity: 1; transform: translateY(0); pointer-events: auto; }
#scroll-top:hover { border-color: var(--gold); color: var(--gold); }

/* ═══════════════════════ 404 ═══════════════════════ */
.error-hero { min-height: 70vh; display: flex; align-items: center; justify-content: center; padding: 60px 0; text-align: center; }
.error-hero .stamp-num {
  width: 150px; height: 150px; border-radius: 50%; border: 2px solid var(--stamp); color: var(--stamp);
  display: flex; align-items: center; justify-content: center; font-family: 'Fraunces', serif; font-weight: 600;
  font-size: 44px; margin: 0 auto 28px; transform: rotate(-6deg);
}
.error-hero h1 { font-family: 'Fraunces', serif; font-size: 26px; margin: 0 0 12px; font-weight: 600; }
.error-hero p { color: var(--ink-soft); max-width: 44ch; margin: 0 auto 28px; line-height: 1.6; }

/* ═══════════════════════ ПЕЧАТЬ ═══════════════════════
   Реквизиты и политику конфиденциальности реально распечатывают
   (бухгалтерия, юристы) — на бумаге не нужны шапка, кнопки, тема,
   cookie-баннер и служебные виджеты, только сам документ, всегда
   чёрным по белому независимо от текущей темы экрана. */
@media print {
  :root, :root[data-theme] {
    --paper: #fff; --paper-raised: #fff; --ink: #000; --ink-soft: #333;
    --gold: #000; --line: #bbb; --line-strong: #888;
  }
  body { background: #fff; }
  header.site-header, footer.site-footer, #cookie-consent, #toast,
  #scroll-top, .modal-backdrop, .badge-live, #mobile-menu,
  .cta, .chip-row, .pager, .doc-modal, a.blog-more { display: none !important; }
  main, .wrap { max-width: none !important; padding: 0 !important; margin: 0 !important; }
  .doc-page-head, .doc-page-body { padding: 0 !important; }
  .doc-row, .doc-row.large { break-inside: avoid; border-color: #ccc; }
  a { color: #000 !important; text-decoration: none !important; }
}

/* ═══════════════════════ ЗВЁЗДНЫЙ РЕЙТИНГ (форма отзыва) ═══════════════════════
   Радио-инпуты в обратном DOM-порядке (5→1) + row-reverse: наведение/выбор
   звезды подсвечивает её и все следующие по DOM (= визуально предыдущие,
   левее) через общий sibling-селектор ~ — без единой строчки JS. */
.star-rating { display: flex; flex-direction: row-reverse; justify-content: flex-end; gap: 2px; }
.star-rating input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.star-rating label { font-size: 30px; line-height: 1; color: var(--line-strong); cursor: pointer; transition: color .12s; }
.star-rating input:checked ~ label,
.star-rating label:hover,
.star-rating label:hover ~ label { color: var(--gold); }
.star-rating input:focus-visible + label { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 3px; }
