/* ==========================================================================
   budakovpravo.ru — внутренние страницы, новая визуальная система

   Подключается ПОСЛЕ site.css и вместо style.css. Старая таблица к этим
   страницам больше не подключается: она несла тёмные первые экраны,
   колоннаду в фоне и системную антикву — ровно то, от чего уходили.

   Что здесь есть
   --------------
   1. Первый экран страницы (.page-hero) — светлый, без орнамента.
   2. Длинный текст (.legal-text) — мера строки, заголовки, списки,
      таблицы, цитаты, врезки норм.
   3. Карточки и списки: направления, услуги, дела, разборы, цены,
      сроки, отзывы, вопросы.
   4. Конструктор документов.
   5. Модальное окно заявки, которое собирает main.js.

   Токены, шапка, подвал, кнопки и поля формы берутся из site.css —
   здесь они не повторяются.
   ========================================================================== */

/* --------------------------------------------------- 1. Служебное и база */

.skip-link {
  position: absolute;
  left: -9999px;
}
.skip-link:focus {
  left: 16px;
  top: 16px;
  z-index: 200;
  background: var(--ink);
  color: #fff;
  padding: 12px 18px;
  border-radius: 10px;
  text-decoration: none;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.nowrap { white-space: nowrap; }

/* Скрипты прячут карточки и подсказки атрибутом hidden. Он слабее любого
   display в классе, поэтому усиливаем: без этой строки фильтр дел
   переключается, а карточки остаются на экране. */
[hidden] { display: none !important; }

/* Ритм секций. Полный вертикальный шаг из site.css на внутренних
   страницах даёт двойные провалы: секции идут подряд по три-четыре.
   Здесь шаг чуть плотнее, а секции с заливкой получают полный. */
.section { padding-block: calc(var(--pad) * 0.55); }
.section:first-of-type { padding-top: calc(var(--pad) * 0.5); }

.wrap--narrow { max-width: 860px; }

/* Переход по якорю не должен загонять цель под липкую шапку. В site.css
   это правило стоит только на section[id]; на внутренних страницах якоря
   висят и на группах прайса, и на форме заявки. */
[id] { scroll-margin-top: 92px; }

/* Появление блоков при прокрутке. Классы раздаёт main.js. */
.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .5s var(--ease), transform .5s var(--ease);
}
.reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* Заголовки, разобранные main.js на слова и буквы. Без правил ниже
   строка рассыпается: span'ы становятся строчными элементами без ритма. */
.words-up .w { display: inline-block; overflow-wrap: anywhere; }
[data-animate-chars] { overflow-wrap: anywhere; }

.magnet { display: inline-block; }

/* ------------------------------------------------- 2. Первый экран стран. */

.page-hero {
  padding-block: 64px 56px;
  background: var(--paper);
  position: relative;
}
.page-hero h1 {
  font-size: clamp(2.1rem, 4.4vw, 3.4rem);
  max-width: 19ch;
  margin-bottom: 22px;
}
.page-hero .lead {
  font-size: clamp(1.05rem, 1.3vw, 1.18rem);
  color: var(--grey);
  max-width: 62ch;
}
.page-hero--tight { padding-bottom: 36px; }

.breadcrumbs {
  font-size: 0.86rem;
  color: var(--grey);
  margin: 0 0 26px;
}
.breadcrumbs a {
  color: var(--grey);
  text-decoration: none;
  border-bottom: 1px solid transparent;
}
.breadcrumbs a:hover { border-bottom-color: var(--red); color: var(--ink); }
.breadcrumbs span {
  display: inline-block;
  margin: 0 8px;
  color: var(--line);
}

/* Ряд кнопок под лидом. Имя досталось от прайса, но блок общий. */
.price-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 18px;
}

/* Паспорт направления: четыре факта, взятые из текста этой же страницы.
   Раньше карточка свисала на тёмный блок и закрывала шов; шва больше
   нет, поэтому она просто стоит под кнопками. */
.subject-card {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  margin-top: 48px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--r);
  overflow: hidden;
}
.subject-card__item {
  background: var(--paper);
  padding: 24px 22px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.subject-card__value {
  font-family: 'Manrope', 'Manrope Fallback', sans-serif;
  font-weight: 800;
  font-size: clamp(1.35rem, 2.2vw, 1.75rem);
  letter-spacing: -0.03em;
  line-height: 1.05;
}
.subject-card__label {
  font-size: 0.86rem;
  color: var(--grey);
  line-height: 1.4;
}
@media (max-width: 900px) {
  .subject-card { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 460px) {
  .subject-card { grid-template-columns: 1fr; }
  .subject-card__item { padding: 18px 18px; }
}

/* Портрет на странице «Обо мне». Картинка стоит справа от текста и
   растворяется книзу, чтобы не спорить с заголовком. */
.page-hero--portrait { padding-bottom: 0; overflow: hidden; }
.page-hero--portrait .wrap { position: relative; z-index: 2; }
.page-hero--portrait h1 { max-width: 15ch; }
.page-hero--portrait .lead,
.page-hero--portrait .price-cta { max-width: 46ch; }
/* Тот же вырезанный снимок, что на главной: тень уже впечатана в файл,
   фона нет. Тёмная студийная карточка на белой странице читалась
   вставкой из другого сайта. */
/* Текст прижат к верху, а не отцентрован по высоте: при центрировании
   любая смена высоты текста (подмена шрифта, другая длина заголовка)
   сдвигала весь блок на половину разницы — замер показывал скачок
   вёрстки 0,23 на этой странице. */
/* Человеку нужна среда. Вырезанный силуэт на голом белом читался
   наклейкой, а низ обрубался краем секции ровно по голени. Теперь под
   ним та же комната, что на первом экране главной: файл уже в кеше
   после главной, новых картинок не добавилось. Слева та же белая вуаль
   под текст, снизу — растворение в белый, и снимок не обрывается, а
   уходит в страницу. Секция поднята под шапку, как на главной: иначе на
   стыке белой шапки и комнаты шла линия во всю ширину. */
.page-hero--portrait {
  min-height: 640px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  margin-top: calc(var(--head-h) * -1);
  padding-top: calc(var(--head-h) + 44px);
  background-color: #f3f4f6;
  background-image:
    linear-gradient(to bottom,
      rgba(255,255,255,0) 72%,
      rgba(255,255,255,.6) 89%,
      #ffffff 100%),
    linear-gradient(97deg,
      rgba(255,255,255,.96) 0%,
      rgba(255,255,255,.91) 30%,
      rgba(255,255,255,.46) 46%,
      rgba(255,255,255,.08) 56%,
      rgba(255,255,255,0) 63%),
    image-set(url("../img/room-1536.webp") type("image/webp"),
              url("../img/room-1100.jpg") type("image/jpeg"));
  background-size: cover, cover, cover;
  background-position: 50% 0, 50% 42%, 88% 44%;
  background-repeat: no-repeat;
}
.page-hero__photo {
  position: absolute;
  right: max(calc((100vw - var(--wrap)) / 2 - 30px), 0px);
  top: calc(var(--head-h) - 8px);
  bottom: 0;
  z-index: 1;
  pointer-events: none;
}
.page-hero__photo picture {
  display: block;
  height: 100%;
  /* низ растворяется ровно на стыке со следующей секцией */
  -webkit-mask-image: linear-gradient(to bottom, #000 84%, transparent 99%);
  mask-image: linear-gradient(to bottom, #000 84%, transparent 99%);
}
.page-hero__photo img {
  height: 100%;
  width: auto;
  max-width: 42vw;
  object-fit: contain;
  object-position: bottom right;
  /* Тот же снимок, что на главной, и та же беда: в файле вырезки слева
     остался обрезанный чёрный ореол — прозрачность идёт нулём до 8,0 %
     ширины и там же скачком встаёт, на светлом фоне это читается
     вертикальной полоской. Тело начинается с 11,85 %, поэтому перо гасит
     ореол от 7 % до 11,8 % и фигуры не касается. Маска на <img>, а не на
     <picture>: та держит нижнее растворение, вложенность их перемножает. */
  -webkit-mask-image: linear-gradient(to right,
    rgba(0,0,0,0) 0%,
    rgba(0,0,0,0) 7%,
    rgba(0,0,0,.20) 8.4%,
    rgba(0,0,0,.45) 9.4%,
    rgba(0,0,0,.68) 10.3%,
    rgba(0,0,0,.86) 11%,
    rgba(0,0,0,.96) 11.5%,
    rgba(0,0,0,1) 11.8%,
    rgba(0,0,0,1) 100%);
  mask-image: linear-gradient(to right,
    rgba(0,0,0,0) 0%,
    rgba(0,0,0,0) 7%,
    rgba(0,0,0,.20) 8.4%,
    rgba(0,0,0,.45) 9.4%,
    rgba(0,0,0,.68) 10.3%,
    rgba(0,0,0,.86) 11%,
    rgba(0,0,0,.96) 11.5%,
    rgba(0,0,0,1) 11.8%,
    rgba(0,0,0,1) 100%);
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-size: 100% 100%;
  mask-size: 100% 100%;
}
/* 22.10.2026, по просьбе Сергея: шапка «Обо мне» на весь первый экран,
   до блока «Коротко о себе». Высота — как у первого экрана главной
   (до 980 px), портрет растёт вместе с ней (высота 100 % контейнера).
   Текст опущен на треть добавленной высоты, чтобы не висел у верха
   при пустом низе; на 640 px (минимум) отступ прежний. */
@media (min-width: 861px) {
  .page-hero--portrait {
    min-height: min(100svh, 980px);
    padding-top: calc(var(--head-h) + 44px + (min(100svh, 980px) - 640px) / 3);
  }
}

/* Ниже 860 снимок снят, а комната без человека превращалась в тёмное
   пятно за кнопками и в пустой экран высотой 640 px. Поэтому на телефоне
   секция возвращается к белой: подъём под шапку, фон и высота сняты. */
@media (max-width: 860px) {
  .page-hero--portrait {
    margin-top: 0;
    padding-top: 40px;
    padding-bottom: 48px;
    min-height: 0;
    background-color: var(--paper);
    background-image: none;
  }
  .page-hero--portrait .lead,
  .page-hero--portrait .price-cta { max-width: none; }
  .page-hero__photo { display: none; }
}

/* --------------------------------------------------- 3. Заголовки секций */

.section-head { margin-bottom: 44px; }
.section-head h2 { font-size: clamp(1.7rem, 3vw, 2.4rem); max-width: 24ch; }
.section-head p:not(.eyebrow) {
  color: var(--grey);
  max-width: 62ch;
  margin-top: 16px;
}
.section-head--center { text-align: center; }
.section-head--center h2,
.section-head--center p { margin-inline: auto; }

.eyebrow {
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--red);
  margin: 0 0 14px;
}
.eyebrow--center { text-align: center; }
.eyebrow--light { color: var(--red); }

/* ------------------------------------------------------ 4. Длинный текст */

/* Статья набрана в две дорожки: текст держит меру строки (около 72
   знаков — дальше глаз теряет начало следующей), а таблицы, вопросы,
   сканы и врезки расходятся во всю ширину контейнера. Без этого прайс
   и аккордеон вопросов оставались зажатыми в колонку текста, и справа
   зияла пустота. */
.legal-text {
  display: grid;
  grid-template-columns: minmax(0, 72ch) minmax(0, 1fr);
  column-gap: 56px;
  font-size: 1.06rem;
  line-height: 1.68;
}
.legal-text > * { grid-column: 1; min-width: 0; }
.legal-text > .faq__list,
.legal-text > .price-group,
.legal-text > .price-jump,
.legal-text > .case-doc,
.legal-text > .doc-sample,
.legal-text > .subject-card,
.legal-text > .deadlines__list,
.legal-text > table,
.legal-text > .cols-2 { grid-column: 1 / -1; }
.legal-text--wide { grid-template-columns: minmax(0, 88ch) minmax(0, 1fr); }
@media (max-width: 1080px) {
  .legal-text,
  .legal-text--wide { grid-template-columns: minmax(0, 1fr); column-gap: 0; }
}

.legal-text h2 {
  font-size: clamp(1.5rem, 2.4vw, 1.95rem);
  margin: 34px 0 18px;
  max-width: 26ch;
}
.legal-text h3 {
  font-size: clamp(1.15rem, 1.7vw, 1.35rem);
  margin: 18px 0 12px;
}
.legal-text > :first-child { margin-top: 0; }

.legal-text p { margin: 0 0 18px; }
.legal-text a {
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid rgba(163, 33, 27, .45);
  transition: border-color .16s var(--ease), color .16s var(--ease);
}
.legal-text a:hover { color: var(--red); border-bottom-color: var(--red); }
/* Кнопка внутри статьи — это кнопка, а не ссылка в тексте: иначе правило
   выше перекрашивало её надпись в графит поверх красной заливки
   (контраст падал до 2,4 : 1). */
/* 22.10.2026: раньше здесь стояло «.price-cta a { border-bottom: 0 }» —
   у кнопок с контуром (btn--ghost / btn--outline) пропадала нижняя
   граница, рамка «рвалась» снизу. Теперь нижнюю границу кнопке
   возвращаем такой же, как остальные три, а снимаем её только у ссылок
   со стрелкой. */
.legal-text a.link-arrow,
.price-cta a.link-arrow { border-bottom: 0; }
.legal-text a.btn,
.price-cta a.btn,
.deadlines__note a.btn { border-bottom: 1px solid transparent; }
.legal-text a.btn--ghost,
.legal-text a.btn--outline,
.legal-text a.btn--quiet,
.price-cta a.btn--ghost,
.price-cta a.btn--outline,
.price-cta a.btn--quiet,
.deadlines__note a.btn--ghost,
.deadlines__note a.btn--outline,
.deadlines__note a.btn--quiet { border-bottom-color: var(--line); }
.legal-text a.btn--ghost:hover,
.legal-text a.btn--outline:hover,
.legal-text a.btn--quiet:hover,
.price-cta a.btn--ghost:hover,
.price-cta a.btn--outline:hover,
.price-cta a.btn--quiet:hover,
.deadlines__note a.btn--ghost:hover,
.deadlines__note a.btn--outline:hover,
.deadlines__note a.btn--quiet:hover { border-bottom-color: var(--ink); }
.legal-text a.btn--primary,
.price-cta a.btn--primary,
.deadlines__note a.btn--primary { color: #fff; }
.legal-text a.btn--primary:hover,
.price-cta a.btn--primary:hover { color: #fff; }
.legal-text a.link-arrow,
.price-cta a.link-arrow { color: var(--red); }

.legal-text ul,
.legal-text ol { margin: 0 0 22px; padding-left: 0; list-style: none; }
.legal-text li { margin-bottom: 12px; padding-left: 26px; position: relative; }
.legal-text ul > li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 0.72em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--red);
}
.legal-text ol { counter-reset: n; }
.legal-text ol > li { padding-left: 34px; counter-increment: n; }
.legal-text ol > li::before {
  content: counter(n);
  position: absolute;
  left: 0;
  top: 0.1em;
  font-family: 'Manrope', 'Manrope Fallback', sans-serif;
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--red);
  min-width: 24px;
}
.legal-text li > ul,
.legal-text li > ol { margin: 12px 0 0; }

.legal-text blockquote {
  margin: 26px 0;
  padding: 18px 0 18px 24px;
  border-left: 3px solid var(--red);
  color: var(--grey);
  font-size: 1.02rem;
}
.legal-text hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 40px 0;
}
.legal-text code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.92em;
  background: var(--paper-2);
  border-radius: 6px;
  padding: 2px 6px;
}
.legal-text img { border-radius: var(--r); margin: 26px 0; }
.legal-text figcaption,
.legal-text small {
  display: block;
  font-size: 0.86rem;
  color: var(--grey);
  line-height: 1.5;
}

.legal-text table {
  width: 100%;
  border-collapse: collapse;
  margin: 26px 0;
  font-size: 0.98rem;
}
.legal-text th,
.legal-text td {
  text-align: left;
  padding: 13px 14px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.legal-text th {
  font-family: 'Manrope', 'Manrope Fallback', sans-serif;
  font-weight: 700;
  font-size: 0.9rem;
}

.legal-text__meta {
  font-size: 0.88rem;
  color: var(--grey);
  margin-bottom: 26px;
}

/* Два столбца для коротких перечней. */
.cols-2 { columns: 2; column-gap: 44px; }
.cols-2 li { break-inside: avoid; }
@media (max-width: 720px) { .cols-2 { columns: 1; } }

/* Врезка с нормами: не цитата, а справка на полях. */
.norm-note {
  margin: 32px 0;
  padding: 24px 26px;
  background: var(--paper-2);
  border-radius: var(--r);
  border-left: 3px solid var(--red);
}
.norm-note__label {
  display: block;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--red);
  margin-bottom: 12px;
}
.norm-note p { margin: 0 0 10px; font-size: 0.98rem; line-height: 1.55; }
.norm-note p:last-child { margin-bottom: 0; }
.norm-note b { font-family: 'Manrope', 'Manrope Fallback', sans-serif; font-weight: 700; }

/* Пометка «черновик» — видна только мне, на сайте выключена вместе с
   карточками-черновиками. */
.todo-note {
  font-size: 0.88rem;
  color: var(--grey);
  background: var(--paper-2);
  border-radius: var(--r);
  padding: 14px 18px;
}
.todo-note.is-draft { display: none; }
.show-drafts .todo-note.is-draft { display: block; }

/* Образец расчёта или текста документа. */
.doc-sample {
  margin: 26px 0;
  background: var(--paper-2);
  border-radius: var(--r);
  padding: 20px 22px;
  overflow-x: auto;
}
/* Бланк набран тем же Times, что уходит в Word, и не переносится:
   выравнивание строк в заготовке — часть документа. Узкий экран
   прокручивает сам блок, а не страницу. */
.doc-sample pre {
  margin: 0;
  font-family: 'Times New Roman', Times, 'Liberation Serif', serif;
  font-size: 0.82rem;
  line-height: 1.7;
  white-space: pre;
}
/* Шапка образца: срок, куда подавать, основание, пошлина. Четыре
   равных ячейки — это справка, а не текст, и читается она глазом сразу. */
.doc-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 1px;
  margin: 24px 0 28px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--r);
  overflow: hidden;
  font-size: 0.94rem;
}
.doc-meta > div { background: var(--paper); padding: 16px 18px; }
.doc-meta dt { font-size: 0.78rem; color: var(--grey); margin-bottom: 4px; }
.doc-meta dd { margin: 0; font-weight: 500; }

/* Скан документа по делу. */
.case-doc {
  margin: 32px 0;
  background: var(--paper-2);
  border-radius: var(--r);
  padding: 18px;
}
.case-doc--light { background: var(--paper-2); }
.case-doc__sheet {
  display: block;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #fff;
}
.case-doc__sheet img { width: 100%; height: auto; margin: 0; border-radius: 0; }
.case-doc figcaption { margin-top: 14px; }

/* Ссылка-стрелка. */
.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  font-weight: 500;
  color: var(--red);
}
.link-arrow::after {
  content: "→";
  transition: transform .18s var(--ease);
}
.link-arrow:hover::after { transform: translateX(4px); }

/* Кнопки, которых нет в site.css. */
.btn--ghost,
.btn--outline {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}
.btn--ghost:hover,
.btn--outline:hover { border-color: var(--ink); background: var(--paper-2); }

/* ---------------------------------------------- 5. Направления и услуги */

.services__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
}
/* Ступеней пять: в четыре колонки последняя оставалась одна в ряду. */
@media (min-width: 1000px) {
  .services__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.service {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 26px 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: border-color .18s var(--ease), box-shadow .18s var(--ease);
}
.service:hover { border-color: transparent; box-shadow: var(--shadow); }
.service__stage {
  font-size: 0.76rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--red);
}
.service h3 { font-size: 1.2rem; }
.service p { color: var(--grey); font-size: 0.97rem; margin: 0; }

.dir-list {
  display: grid;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--r);
  overflow: hidden;
}
.dir-row {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.4fr) auto;
  align-items: center;
  gap: 12px 28px;
  padding: 22px 24px;
  background: var(--paper);
  text-decoration: none;
  transition: background .16s var(--ease);
}
.dir-row::after {
  content: "→";
  color: var(--red);
  transition: transform .18s var(--ease);
}
.dir-row:hover { background: var(--paper-2); }
.dir-row:hover::after { transform: translateX(4px); }
.dir-row__name {
  font-family: 'Manrope', 'Manrope Fallback', sans-serif;
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
}
.dir-row__note { color: var(--grey); font-size: 0.95rem; }
@media (max-width: 760px) {
  .dir-row { grid-template-columns: 1fr auto; gap: 6px 16px; }
  .dir-row__note { grid-column: 1 / -1; }
}

/* Плитка выбора: страница 404 и перекрёстные ссылки. */
.choice__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
}
.choice__item {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 26px 24px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r);
  text-decoration: none;
  transition: border-color .18s var(--ease), box-shadow .18s var(--ease);
}
.choice__item:hover { border-color: transparent; box-shadow: var(--shadow); }
.choice__item h3 { font-size: 1.15rem; }
.choice__item p { color: var(--grey); font-size: 0.96rem; margin: 0; }
.choice__more {
  margin-top: auto;
  padding-top: 6px;
  color: var(--red);
  font-weight: 500;
  font-size: 0.94rem;
}

/* Шаги работы. */
.process { background: var(--paper-2); }
.process__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
}
.process .step {
  background: var(--paper);
  border-radius: var(--r);
  padding: 26px 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.process .step::before { content: none; }
.step__num {
  font-family: 'Manrope', 'Manrope Fallback', sans-serif;
  font-weight: 800;
  font-size: 0.92rem;
  color: var(--red);
}
.process .step h3 { font-size: 1.12rem; }
.process .step p { color: var(--grey); font-size: 0.96rem; margin: 0; }

/* ------------------------------------------------------------- 6. Цены */

.pricing .legal-text { margin-bottom: 44px; }

.price-jump {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 36px;
}
.price-jump a {
  font-size: 0.92rem;
  text-decoration: none;
  padding: 9px 15px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  transition: border-color .16s var(--ease), background .16s var(--ease);
}
.price-jump a:hover { border-color: var(--ink); background: var(--paper-2); }

.price-group {
  border: 1px solid var(--line);
  border-radius: var(--r);
  overflow: hidden;
  margin-bottom: 26px;
  scroll-margin-top: 100px;
}
.price-group__title {
  padding: 22px 26px;
  background: var(--paper-2);
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 16px;
}
.price-group__title h3 { font-size: 1.2rem; }
.price-group__title span { font-size: 0.9rem; color: var(--grey); }

.price-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px 28px;
  align-items: baseline;
  padding: 20px 26px;
  border-top: 1px solid var(--line);
}
.price-row__name b {
  font-family: 'Manrope', 'Manrope Fallback', sans-serif;
  font-weight: 700;
  font-size: 1.02rem;
  letter-spacing: -0.02em;
}
.price-row__name b a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid rgba(163, 33, 27, .4);
}
.price-row__name b a:hover { color: var(--red); border-bottom-color: var(--red); }
.price-row__name small {
  display: block;
  margin-top: 6px;
  font-size: 0.9rem;
  color: var(--grey);
  line-height: 1.5;
}
.price-row__value {
  font-family: 'Manrope', 'Manrope Fallback', sans-serif;
  font-weight: 800;
  font-size: 1.08rem;
  white-space: nowrap;
  letter-spacing: -0.02em;
}
.price-row__value.is-free { color: var(--red); }
@media (max-width: 620px) {
  .price-row { grid-template-columns: 1fr; }
  .price-row__value { font-size: 1rem; }
}

.price-note {
  font-size: 0.94rem;
  color: var(--grey);
  max-width: 74ch;
  margin-top: 22px;
}
.price-note--top { margin: 0 0 30px; }
.price-note a { color: var(--ink); }

/* ------------------------------------------------------------ 7. Сроки */

.deadlines { background: var(--paper-2); }
.deadlines__head { margin-bottom: 40px; }
.deadlines__head h2 { font-size: clamp(1.7rem, 3vw, 2.4rem); max-width: 22ch; }

.deadlines__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
}
.deadline {
  display: grid;
  grid-template-columns: 190px minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 10px 28px;
  align-items: start;
  background: var(--paper);
  border-radius: var(--r);
  padding: 22px 24px;
  border-left: 3px solid var(--red);
}
.deadline--t2 { border-left-color: #b8493f; }
.deadline--t3 { border-left-color: #c9756c; }
.deadline--t4 { border-left-color: #9aa2ad; }
.deadline--t5 { border-left-color: var(--line); }
.deadline__term {
  font-family: 'Manrope', 'Manrope Fallback', sans-serif;
  font-weight: 800;
  font-size: 1.22rem;
  letter-spacing: -0.03em;
  line-height: 1.15;
}
.deadline__term span {
  display: block;
  margin-top: 6px;
  font-family: 'Golos Text', 'Golos Fallback', sans-serif;
  font-weight: 400;
  font-size: 0.82rem;
  letter-spacing: 0;
  color: var(--grey);
}
.deadline__what { font-weight: 500; }
.deadline__from { color: var(--grey); font-size: 0.95rem; }
@media (max-width: 860px) {
  .deadline { grid-template-columns: 1fr; gap: 8px; }
}

.deadlines__note {
  margin-top: 26px;
  font-size: 0.94rem;
  color: var(--grey);
  max-width: 74ch;
}
.deadlines__note--wide { max-width: none; }

/* ------------------------------------------------------------ 8. Дела */

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 30px;
}
.filters button {
  font: inherit;
  font-size: 0.92rem;
  cursor: pointer;
  padding: 9px 15px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  transition: border-color .16s var(--ease), background .16s var(--ease), color .16s var(--ease);
}
.filters button:hover { border-color: var(--ink); }
/* Плашка режима «одно дело» (22.10.2026). */
.cases-single {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 10px 18px; margin: 0 0 20px; padding: 14px 18px;
  background: var(--red-wash); border-radius: var(--r);
  scroll-margin-top: calc(var(--head-h) + 16px);
  font-size: .95rem;
}
.cases-single[hidden] { display: none; }
.cases-grid.is-single { grid-template-columns: minmax(0, 760px); }
.cases-single { max-width: 760px; }
.cases-single button {
  font: inherit; font-weight: 500; padding: 9px 16px; border-radius: 999px;
  border: 1px solid var(--ink); background: var(--ink); color: #fff; cursor: pointer;
}
.cases-single button:hover { background: var(--red-mark); border-color: var(--red-mark); }
.filters button[aria-pressed="true"] {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}

.cases-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 18px;
}
.case-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 26px 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: border-color .18s var(--ease), box-shadow .18s var(--ease);
}
.case-card:hover { border-color: transparent; box-shadow: var(--shadow); }
/* Переход с отзыва на дело (22.10.2026): карточка не уезжает под шапку,
   а та, на которую пришли по ссылке, подсвечивается. */
.case-card { scroll-margin-top: calc(var(--head-h) + 24px); }
.case-card:target {
  border-color: var(--red-mark);
  box-shadow: 0 0 0 4px rgba(215, 38, 30, .10), var(--shadow);
  animation: case-arrive 1.6s var(--ease) 1;
}
@keyframes case-arrive {
  0%   { box-shadow: 0 0 0 14px rgba(215, 38, 30, .18), var(--shadow); }
  100% { box-shadow: 0 0 0 4px rgba(215, 38, 30, .10), var(--shadow); }
}
@media (prefers-reduced-motion: reduce) { .case-card:target { animation: none; } }
.case-card__review {
  margin: 4px 0 0;
  padding: 16px 0 0;
  border-top: 1px solid var(--line);
}
.case-card__review blockquote {
  margin: 0;
  font-size: .97rem;
  line-height: 1.55;
  font-style: italic;
}
.case-card__review blockquote::before { content: "«"; }
.case-card__review blockquote::after { content: "»"; }
.case-card__review figcaption {
  margin-top: 8px;
  font-size: .86rem;
  color: var(--grey);
}
.case-card__review figcaption a { color: var(--grey); text-decoration: underline; text-underline-offset: 3px; }
.case-card__review figcaption a:hover { color: var(--ink); }
/* Отзыв под делом кликается целиком и ведёт на этот отзыв на «Обо мне»
   (22.10.2026): ::after ссылки растянут на весь блок цитаты. */
.case-card__review--link { position: relative; margin-inline: -12px; padding: 16px 12px 12px; border-radius: 10px; transition: background .18s var(--ease); }
.case-card__review--link:hover { background: var(--red-wash); }
.case-card__review--link figcaption a.case-card__review-go { color: var(--red-mark); text-decoration: none; }
.case-card__review-go::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.case-card__review-go i { display: inline-block; margin-left: 4px; font-style: normal; transition: transform .18s var(--ease); }
.case-card__review--link:hover .case-card__review-go i { transform: translateX(4px); }
.case-card__review--link:has(a:focus-visible) { outline: 2px solid var(--ink); outline-offset: 2px; }
.case-card__tag {
  font-size: 0.76rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--red);
}
.case-card h3 { font-size: 1.14rem; line-height: 1.25; }
.case-card__meta { font-size: 0.9rem; color: var(--grey); margin: 0; }
.case-card p { font-size: 0.97rem; margin: 0; }
/* Карточка дела — описание в трёх частях: что было, что сделал, чем
   кончилось. Метки набраны мелко, чтобы не спорить с заголовком. */
.case-card dl { margin: 0; display: grid; gap: 12px; }
.case-card dt {
  font-size: 0.76rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--grey);
  margin-bottom: 3px;
}
.case-card dd { margin: 0; font-size: 0.96rem; line-height: 1.55; }
.case-card__result {
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}
.case-card__result dt { color: var(--red); }
.case-card__result dd { font-weight: 500; }
.case-card__result b { font-family: 'Manrope', 'Manrope Fallback', sans-serif; font-weight: 700; }
.case-card .case-doc { margin: 4px 0 0; padding: 12px; }
.case-card.is-draft { display: none; }
.show-drafts .case-card.is-draft { display: flex; }

/* ---------------------------------------------------------- 9. Разборы */

.posts { display: grid; gap: 12px; }
.post-row {
  display: grid;
  grid-template-columns: 130px minmax(0, 1fr) auto;
  gap: 10px 28px;
  align-items: start;
  padding: 24px 26px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r);
  text-decoration: none;
  transition: border-color .18s var(--ease), box-shadow .18s var(--ease);
}
.post-row:hover { border-color: transparent; box-shadow: var(--shadow); }
.post-row time { font-size: 0.88rem; color: var(--grey); }
.post-row h3 { font-size: 1.14rem; line-height: 1.25; margin-bottom: 8px; }
.post-row p { color: var(--grey); font-size: 0.96rem; margin: 0; }
.post-row__cat {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--red);
  white-space: nowrap;
}
@media (max-width: 780px) {
  .post-row { grid-template-columns: 1fr auto; }
  .post-row time { grid-row: 2; grid-column: 1 / -1; }
}
@media (max-width: 420px) {
  .post-row { grid-template-columns: 1fr; }
  .post-row__cat { grid-row: 1; }
}

/* -------------------------------------------------------- 10. Отзывы */

.reviews-strip { background: var(--paper-2); padding-block: calc(var(--pad) * 0.62); }
.reviews-strip__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px 24px;
  margin-bottom: 32px;
}
.reviews-strip__head h2 { font-size: clamp(1.5rem, 2.4vw, 2rem); }

.reviews-strip__grid,
.reviews__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
}
.review {
  background: var(--paper);
  border-radius: var(--r);
  padding: 26px 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.reviews .review { border: 1px solid var(--line); }
.review__quote { margin: 0; font-size: 1rem; line-height: 1.6; }
/* Переход с дела на отзыв (22.10.2026): отзыв не уезжает под шапку и подсвечен. */
.review { scroll-margin-top: calc(var(--head-h) + 24px); }
.reviews .review:target { border-color: var(--red-mark); box-shadow: 0 0 0 4px rgba(215, 38, 30, .10); }

/* Отзыв-ссылка (22.10.2026): карточка целиком ведёт на разбор похожей
   ситуации. Ссылка — внизу карточки, её ::after растянут на всю карточку,
   поэтому кликается любое место, а в дереве доступности — одна ссылка. */
.review--link {
  position: relative;
  display: flex;
  flex-direction: column;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), border-color .25s var(--ease);
}
.reviews .review--link:hover { border-color: transparent; }
.review__go {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  font-size: .92rem;
  font-weight: 500;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 0;
}
.review__go::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.review__go i {
  font-style: normal;
  color: var(--red-mark);
  transition: transform .25s var(--ease);
}
.review--link:hover { transform: translateY(-4px); box-shadow: var(--shadow-lift); }
.review--link:hover .review__go i { transform: translateX(5px); }
.review__go:focus-visible { outline: none; }
.review--link:has(.review__go:focus-visible) { outline: 2px solid var(--ink); outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) {
  .review--link, .review__go i { transition: none; }
  .review--link:hover { transform: none; }
}

.review__quote::before { content: "«"; }
.review__quote::after { content: "»"; }
.review__author {
  margin-top: auto;
  font-size: 0.88rem;
  color: var(--grey);
}
.review__author b {
  display: block;
  font-family: 'Manrope', 'Manrope Fallback', sans-serif;
  font-weight: 700;
  font-size: 0.98rem;
  color: var(--ink);
  margin-bottom: 2px;
}
.reviews__source {
  margin-top: 26px;
  font-size: 0.9rem;
  color: var(--grey);
  text-align: center;
}

/* ------------------------------------------------------- 11. Вопросы */

.faq { background: var(--paper-2); }
.faq__list { display: grid; gap: 10px; }
.faq__list details {
  background: var(--paper);
  border-radius: var(--r);
  border: 1px solid var(--line);
  overflow: hidden;
}
.faq__list summary {
  list-style: none;
  cursor: pointer;
  padding: 20px 56px 20px 24px;
  position: relative;
  font-family: 'Manrope', 'Manrope Fallback', sans-serif;
  font-weight: 700;
  font-size: 1.03rem;
  letter-spacing: -0.02em;
  line-height: 1.35;
}
.faq__list summary::-webkit-details-marker { display: none; }
.faq__list summary::after {
  content: "";
  position: absolute;
  right: 24px;
  top: 26px;
  width: 12px;
  height: 12px;
  border-right: 2px solid var(--red);
  border-bottom: 2px solid var(--red);
  transform: rotate(45deg);
  transition: transform .2s var(--ease);
}
.faq__list details[open] summary::after { transform: rotate(-135deg); top: 30px; }
.faq__list summary:hover { color: var(--red); }
.faq__answer {
  padding: 0 24px 22px;
  color: var(--grey);
  line-height: 1.62;
}
.faq__answer a { color: var(--ink); }
.faq__answer p { margin: 0 0 12px; }
.faq__answer p:last-child { margin-bottom: 0; }

/* Секция вопросов внутри светлой страницы не должна перекрашиваться,
   если она уже стоит на серой подложке. */
.faq.section { padding-block: calc(var(--pad) * 0.55); }

/* ------------------------------------------------------ 12. Обо мне */

.bio__inner {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.85fr);
  gap: 40px 64px;
  align-items: start;
}
.bio__text h2 { font-size: clamp(1.6rem, 2.6vw, 2.1rem); }
.bio__text p { margin: 0 0 18px; }
.bio__text a { color: var(--ink); }
.bio__facts {
  margin: 0;
  padding: 26px 24px;
  background: var(--paper-2);
  border-radius: var(--r);
  font-size: 0.96rem;
}
.bio__facts div { margin-bottom: 16px; }
.bio__facts div:last-child { margin-bottom: 0; }
.bio__facts dt {
  font-size: 0.8rem;
  color: var(--grey);
  margin-bottom: 4px;
}
.bio__facts dd { margin: 0; font-weight: 500; }
@media (max-width: 900px) {
  .bio__inner { grid-template-columns: 1fr; gap: 30px; }
}
@media (min-width: 901px) {
  .bio__facts { position: sticky; top: 100px; }
}

/* Блок «Подход». Имена классов остались от нарисованного флага, который
   тут стоял раньше; сейчас в левой колонке фотография. Переименовывать
   не стал: класс упомянут ещё и в печатных правилах внизу файла. */
.flag-section {
  background: var(--paper-2);
  padding-block: calc(var(--pad) * 0.62);
}
.flag-section__inner {
  display: grid;
  grid-template-columns: minmax(0, 0.7fr) minmax(0, 1.3fr);
  gap: 36px 56px;
  align-items: center;
}
/* Снимок вырезан и стоит прямо на подложке секции, как портрет на
   главной: ни рамки, ни тени. Низ растворяется — кадр обрезан по бедро,
   и без растворения шёл бы прямой срез поперёк человека. */
.flag-art picture { display: block; }
.flag-art img {
  width: 100%;
  height: auto;
  display: block;
  -webkit-mask-image: linear-gradient(to bottom, #000 84%, transparent 99%);
  mask-image: linear-gradient(to bottom, #000 84%, transparent 99%);
}
.flag-section__text h2 { font-size: clamp(1.5rem, 2.4vw, 2rem); margin-bottom: 16px; }
.flag-section__text p { color: var(--grey); }
@media (max-width: 860px) {
  .flag-section__inner { grid-template-columns: 1fr; }
  /* На телефоне снимок снят: в одну колонку он занимал пол-экрана и
     ничего не добавлял к тексту. Лицо на этой странице и так есть —
     в первом экране. */
  .flag-art { display: none; }
}

/* ----------------------------------------------------- 13. Контакты */

.contacts__inner {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 40px 64px;
  align-items: start;
}
.contacts__title { font-size: clamp(1.5rem, 2.4vw, 2rem); margin-bottom: 24px; }
.contacts__list { list-style: none; margin: 0 0 26px; padding: 0; }
.contacts__list li {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.contacts__label { font-size: 0.82rem; color: var(--grey); }
.contacts__value { font-weight: 500; }
.contacts__list a {
  color: var(--ink);
  text-decoration: none;
  font-weight: 500;
  border-bottom: 1px solid transparent;
}
.contacts__list a:hover { border-bottom-color: var(--red); }
.contacts__socials { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.contacts__socials a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.9rem;
  text-decoration: none;
  color: var(--ink);
  transition: border-color .16s var(--ease), background .16s var(--ease);
}
.contacts__socials a:hover { border-color: var(--ink); background: var(--paper-2); }
/* Значки нарисованы кодом: сайт не грузит ни одного внешнего файла.
   Без fill:none обе иконки превращаются в чёрные кляксы. */
.contacts__socials svg {
  width: 18px;
  height: 18px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Форма на контактах стоит на белой странице, а не в тёмной секции
   главной: белое на белом не читалось как отдельный блок. */
.contacts .form {
  background: var(--paper-2);
  border: 1px solid var(--line);
}
.contacts .form .field input,
.contacts .form .field textarea,
.contacts .form .field select { background: var(--paper); }
@media (max-width: 900px) {
  .contacts__inner { grid-template-columns: 1fr; gap: 32px; }
}

/* --------------------------------------------- 14. Конструктор док-тов */

.ctor-section { background: var(--paper-2); }
.ctor-desk .wrap > .legal-text { margin-bottom: 36px; }

.ctor-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
  list-style: none;
  margin: 0 0 30px;
  padding: 0;
}
.ctor-steps li {
  background: var(--paper);
  border-radius: var(--r);
  padding: 20px 22px 20px 50px;
  position: relative;
  font-size: 0.97rem;
  color: var(--grey);
}
/* Номер шага стоит в самой разметке (<b>1</b>) — второй, нарисованный
   счётчиком, давал «1 1 Выберите документ». */
.ctor-steps b {
  position: absolute;
  left: 22px;
  top: 20px;
  font-family: 'Manrope', 'Manrope Fallback', sans-serif;
  font-weight: 800;
  color: var(--red);
}

.ctor-picker {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}
.ctor-picker button {
  font: inherit;
  text-align: left;
  cursor: pointer;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 18px 20px;
  transition: border-color .16s var(--ease), box-shadow .16s var(--ease);
}
.ctor-picker button:hover { border-color: transparent; box-shadow: var(--shadow); }
.ctor-picker button[aria-pressed="true"] {
  border-color: var(--ink);
  box-shadow: none;
}
.ctor-picker b {
  display: block;
  font-family: 'Manrope', 'Manrope Fallback', sans-serif;
  font-weight: 700;
  margin-bottom: 5px;
}
.ctor-picker span { font-size: 0.9rem; color: var(--grey); }

.ctor-note { font-size: 0.92rem; color: var(--grey); margin-bottom: 30px; }

.ctor {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: 26px;
  align-items: start;
}
@media (max-width: 980px) { .ctor { grid-template-columns: 1fr; } }

/* Полоса заполнения. Скрипт кладёт долю в переменную --done, поэтому
   ширину красит псевдоэлемент, а не сам блок. */
.ctor__progress { margin-bottom: 18px; }
.ctor__bar {
  display: block;
  height: 4px;
  border-radius: 999px;
  background: var(--paper-3);
  position: relative;
  overflow: hidden;
}
.ctor__bar::after {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: var(--done, 0%);
  background: var(--red);
  border-radius: 999px;
  transition: width .25s var(--ease);
}
.ctor__count {
  display: block;
  margin-top: 10px;
  font-size: 0.86rem;
  color: var(--grey);
}
.ctor__form {
  background: var(--paper);
  border-radius: var(--r);
  padding: 26px 24px;
}
.ctor__form .field { margin-bottom: 16px; }
/* Подсказку под полем скрипт помечает .field__hint. */
.field__hint {
  font-size: 0.86rem;
  color: var(--grey);
  line-height: 1.45;
  margin: 6px 0 0;
}
.ctor__form .field input,
.ctor__form .field textarea,
.ctor__form .field select { background: var(--paper-2); }

.ctor__result {
  background: var(--paper);
  border-radius: var(--r);
  padding: 26px 24px;
  position: sticky;
  top: 96px;
}
@media (max-width: 980px) { .ctor__result { position: static; } }
.ctor__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 16px; }
.ctor__status { font-size: 0.88rem; color: var(--grey); margin: 0 0 14px; min-height: 1.2em; }
.ctor__sheet {
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
}
.ctor__sheethead {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--paper-2);
  font-size: 0.84rem;
  color: var(--grey);
}
.ctor__stamp { color: var(--red); font-weight: 500; }
.ctor__paper {
  padding: 24px 22px;
  max-height: 62vh;
  overflow: auto;
  font-family: 'Times New Roman', Times, serif;
  font-size: 15px;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
  background: #fff;
}
.ctor__doc { font-weight: 500; color: var(--ink); }

/* ------------------------------------------- 15. Модальное окно заявки */

.lead-modal {
  border: 0;
  padding: 0;
  background: transparent;
  max-width: 100%;
  max-height: 100%;
}
.lead-modal::backdrop { background: rgba(20, 23, 27, .55); }
.lead-modal__card {
  position: relative;
  width: min(560px, calc(100vw - 32px));
  background: var(--paper);
  border-radius: var(--r-lg);
  padding: 32px 30px;
  box-shadow: var(--shadow-lift);
}
.lead-modal__card h2 { font-size: 1.5rem; margin-bottom: 6px; }
.lead-modal__hint { font-size: 0.92rem; color: var(--grey); margin-bottom: 22px; }
.lead-modal__call { font-size: 0.92rem; color: var(--grey); margin: 14px 0 0; }
.lead-modal__call a { color: var(--ink); }
.lead-modal__close {
  position: absolute;
  top: 12px;
  right: 14px;
  border: 0;
  background: transparent;
  font-size: 26px;
  line-height: 1;
  color: var(--grey);
  cursor: pointer;
  padding: 6px 10px;
  border-radius: 8px;
}
.lead-modal__close:hover { background: var(--paper-2); color: var(--ink); }

/* ------------------------------------------------- 16. Узкие экраны */

@media (max-width: 640px) {
  .page-hero { padding-block: 44px 40px; }
  .page-hero h1 { max-width: none; }
  .legal-text { font-size: 1.02rem; }
  .legal-text h2 { margin-top: 26px; }
  .price-cta { gap: 12px; }
  .price-cta .btn { flex: 1 1 auto; }
}

@media (max-width: 380px) {
  .page-hero h1,
  .legal-text h2,
  .legal-text h3 { overflow-wrap: anywhere; }
  .price-group__title,
  .price-row { padding-inline: 18px; }
  .service,
  .choice__item,
  .case-card,
  .review,
  .post-row,
  .deadline { padding-inline: 18px; }
}

/* --------------------------------- 17. Документ конструктора и подсветка */

/* Абзацы документа. Вид задаёт constructor.js по первому символу строки
   шаблона: шапка «кому / от кого» справа, заголовки по центру, основной
   текст с красной строкой. Те же классы уходят в файл для Word. */
.ctor__paper p { margin: 0; }
.ctor__paper .dl-h,
.ctor__paper .dl-hb { margin-left: 46%; }
.ctor__paper .dl-hb,
.ctor__paper .dl-b,
.ctor__paper .dl-c { font-weight: 700; }
.ctor__paper .dl-c { text-align: center; }
.ctor__paper .dl-p { text-indent: 2.4em; text-align: justify; hyphens: auto; }
.ctor__paper .dl-e { height: 0.6em; overflow: hidden; }
@media (max-width: 620px) {
  .ctor__paper .dl-h,
  .ctor__paper .dl-hb { margin-left: 32%; }
  .ctor__paper .dl-p { text-align: left; }
}

/* Подсветка только что введённого значения: короткая вспышка, которая
   гаснет сама и показывает, куда попало набранное. */
.ctor__hit {
  background: rgba(163, 33, 27, 0.16);
  color: inherit;
  animation: ctorHit 1.4s var(--ease) forwards;
}
@keyframes ctorHit {
  0%   { background: rgba(163, 33, 27, 0.34); }
  100% { background: rgba(163, 33, 27, 0); }
}
@media (prefers-reduced-motion: reduce) {
  .ctor__hit { animation: none; background: none; }
  .ctor__bar::after { transition: none; }
}

/* Ответ формы. Скрипт дописывает --ok или --err. */
.form__status--ok { background: #eef6ef; color: #1d5b2b; }
.form__status--err { background: var(--red-wash); color: var(--red); }

/* Окно заявки собирает main.js; оно должно прокручиваться само, иначе
   в альбомной ориентации телефона кнопка отправки уезжает за край. */
.lead-modal { margin: auto; max-height: calc(100dvh - 28px); overflow: visible; }
.lead-modal__card { max-height: calc(100dvh - 28px); overflow-y: auto; }
.lead-modal .form { background: none; padding: 0; }
.lead-modal__close { width: 44px; height: 44px; display: grid; place-items: center; }
.lead-modal__call { text-align: center; }

/* ------------------------------------------------------------ 18. Печать

   На бумаге не нужны ни шапка, ни формы, ни фоны. Цвет и фон обнуляются
   разом: перечислять блоки поимённо — путь к тому, что шестой забудут. */
@media print {
  *, *::before, *::after {
    color: #000 !important;
    background: transparent !important;
    background-image: none !important;
    box-shadow: none !important;
    text-shadow: none !important;
    filter: none !important;
    mask-image: none !important;
    -webkit-mask-image: none !important;
  }
  .skip-link,
  .header,
  .burger,
  .page-hero__photo,
  .flag-art,
  .form,
  .footer__grid,
  .filters { display: none !important; }
  /* Блоки, которые не успели появиться при прокрутке, на бумаге должны
     быть видны: иначе половина страницы уходит в пустоту. */
  .reveal { opacity: 1 !important; transform: none !important; }

  body { background: #fff !important; font-size: 12pt; }
  .section { padding-block: 20px; }
  .page-hero { padding-block: 0 12px; min-height: 0; }
  .page-hero + .section { padding-top: 12px; }
  .subject-card { margin: 12px 0 0; border: 1px solid #999; }
  .legal-text { display: block; }
  .faq__list details { border: 1px solid #999; }

  /* Ссылка на бумаге бесполезна без адреса. Кроме телефона и почты:
     там адрес и есть текст ссылки. */
  a::after { content: " (" attr(href) ")"; font-size: 9pt; color: #555 !important; }
  a[href^="tel:"]::after,
  a[href^="mailto:"]::after { content: ""; }
}

/* Печать самого документа из конструктора: на листе остаётся только он. */
@media print {
  body:has(.ctor) .ctor-picker,
  body:has(.ctor) .ctor-note,
  body:has(.ctor) .ctor__form,
  body:has(.ctor) .ctor__actions,
  body:has(.ctor) .ctor__status,
  body:has(.ctor) .page-hero,
  body:has(.ctor) .legal-text,
  body:has(.ctor) .price-cta,
  body:has(.ctor) .ctor-steps,
  body:has(.ctor) .ctor__progress,
  body:has(.ctor) .footer,
  body:has(.ctor) .reviews-strip { display: none !important; }
  .ctor__hit { background: none !important; }
  .ctor { display: block; }
  .ctor__result { position: static; padding: 0; }
  .ctor__sheet { border: 0; }
  .ctor__sheethead { display: none !important; }
  .ctor__paper {
    max-height: none;
    overflow: visible;
    border: 0;
    padding: 0;
    font-size: 12pt;
    line-height: 1.55;
  }
  body:has(.ctor) .section { padding: 0 !important; }
  body:has(.ctor) a::after { content: ""; }
}


/* ---------------------------------------- Страница одного дела (23.10.2026) */
.case-page__result {
  margin: 28px 0 8px;
  padding: 18px 20px;
  background: var(--red-wash);
  border-radius: var(--r);
}
.case-page__result span { display: block; font-size: .85rem; color: var(--red); margin-bottom: 4px; }
.case-page__result p { margin: 0; font-weight: 500; font-size: 1.08rem; }
.case-page__review {
  margin: 12px 0 28px;
  padding: 22px 24px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--red-mark);
  border-radius: var(--r);
  background: var(--paper);
}
.case-page__review blockquote { margin: 0; padding: 0; border: 0; color: var(--ink); font-style: normal; font-size: 1.05rem; line-height: 1.6; }
.case-page__review blockquote::before { content: "«"; }
.case-page__review blockquote::after { content: "»"; }
.case-page__review figcaption { margin-top: 12px; font-size: .9rem; color: var(--grey); }
.case-page__review figcaption b { color: var(--ink); font-weight: 600; }
