/* ОКЕЛЬ · стили служебных страниц: политика и согласие (legal), 404 (error), «Акции» (promo), HTML-карта сайта (sitemap) и поиск (search).
   Подключается после main.css и catalog.css (карточки, крошки, шапка страницы, категории берутся оттуда). Окантовки «стекла» здесь не нужны: полупрозрачных
   плашек поверх фото на этих страницах нет. */

/* ---------- политика и согласие ---------- */
.lpage { padding-block: clamp(28px, 4vw, 56px) clamp(56px, 7vw, 104px); }
.lpage__body { max-width: 760px; }
.lpage__title { font-weight: 800; font-size: min(clamp(30px, calc(2.3vw + 14px), 48px), calc((100vw - 2 * var(--gutter)) / 11.1)); line-height: 1.08; letter-spacing: -.024em; text-wrap: balance; }
/* второе значение min(): самое длинное слово заголовка («конфиденциальности», 10,95 em) должно помещаться в строку; на 320 px это 25,9 px вместо 30, с 375 px действует прежняя формула */
.lpage__text { margin-top: clamp(20px, 2.4vw, 32px); font-size: 17px; line-height: 1.6; color: var(--c-ink); overflow-wrap: anywhere; }
.lpage__text > * + * { margin-top: 14px; }
.lpage__text h2 { margin-top: 36px; font-weight: 800; font-size: clamp(22px, 1.1vw + 16px, 28px); line-height: 1.2; letter-spacing: -.015em; text-wrap: balance; }
.lpage__text h3 { margin-top: 28px; font-weight: 700; font-size: 20px; line-height: 1.25; letter-spacing: -.01em; }
.lpage__text h2:first-child, .lpage__text h3:first-child { margin-top: 0; }
.lpage__text ul, .lpage__text ol { padding-left: 1.4em; }
.lpage__text ul { list-style: disc; }
.lpage__text ol { list-style: decimal; }
.lpage__text li + li { margin-top: 8px; }
.lpage__text li::marker { color: var(--c-green-600); }
.lpage__text a { color: var(--c-green-700); text-decoration: underline; text-decoration-color: rgba(23, 107, 69, .4); text-underline-offset: 4px; }
.lpage__text a:hover { text-decoration-color: currentColor; }
.lpage__foot { margin-top: clamp(32px, 4vw, 48px); }

@media print {
  .hdr, .mmenu, .ftr, .float, .mbar, .cookie, .skip, .lpage__foot, dialog { display: none !important; }
  .lpage { padding: 0; }
  .lpage__body { max-width: none; }
  .lpage__text { font-size: 12pt; color: #000; }
  .lpage__text a { color: #000; text-decoration: none; }
}

/* ---------- страница 404 ---------- */
.errpage__code { font-weight: 800; font-size: clamp(76px, 11vw, 150px); line-height: .9; letter-spacing: -.04em; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; margin-bottom: 10px; }
.errpage__search { margin-top: clamp(20px, 2.4vw, 30px); }
.errpage .fpage__acts { margin-top: 24px; }
.errpage__phone { margin-top: 18px; font-size: 17px; line-height: 1.4; color: var(--c-ink-2); }
.errpage__phone .link-more { min-height: 40px; }

/* ---------- поле поиска на странице (404 и /search) ---------- */
.search--page { width: min(680px, 100%); }
.search--page > .i { left: 20px; }
.search--page .search__input { height: 58px; padding: 0 64px 0 52px; font-size: 17px; }
.search--page .search__go { top: 7px; right: 7px; width: 44px; height: 44px; }
/* Подсказки поиска (.suggest) нужны на каждой странице, поэтому их стили лежат в main.css рядом с .search. */

/* ---------- страница результатов поиска ---------- */
.spage__form { position: relative; margin-top: clamp(18px, 2vw, 26px); }
.spage__note { max-width: 720px; margin-top: 10px; font-size: 16px; line-height: 1.45; color: var(--c-ink-2); text-wrap: pretty; }
.spage .chead { padding-bottom: clamp(24px, 3vw, 40px); }
.sgroup { padding-block: 0 clamp(36px, 4.6vw, 68px); }
.sgroup:last-child { padding-bottom: clamp(56px, 7vw, 104px); }
.sgroup__h { margin-bottom: clamp(16px, 2vw, 26px); font-weight: 800; font-size: clamp(24px, calc(1vw + 18px), 34px); line-height: 1.12; letter-spacing: -.02em; text-wrap: balance; }
.sgroup__n { margin-left: 8px; font-weight: 600; font-size: .52em; letter-spacing: 0; color: var(--c-ink-3); font-variant-numeric: tabular-nums; vertical-align: .22em; }
.sgroup .cases { margin-top: 0; }
.slist { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(12px, 1.4vw, 20px); margin: 0; padding: 0; list-style: none; }
.sitem { min-width: 0; }
.sitem__link { display: flex; flex-direction: column; justify-content: center; gap: 4px; height: 100%; min-height: 68px; padding: 16px 22px; border: 1px solid var(--c-line); border-radius: 26px; background: #fff; text-decoration: none; transition: border-color .2s, box-shadow .2s; }
.sitem__title { font-weight: 700; font-size: 18px; line-height: 1.3; letter-spacing: -.01em; overflow-wrap: anywhere; transition: color .18s; }
.sitem__sub { font-size: 14.5px; line-height: 1.35; color: var(--c-ink-3); }
@media (hover: hover) {
  .sitem__link:hover { border-color: rgba(69, 188, 130, .65); box-shadow: 0 16px 36px rgba(12, 22, 15, .08); }
  .sitem__link:hover .sitem__title { color: var(--c-green-700); }
}
.spage__empty .ocats { margin-bottom: 0; }
.spage__empty .fpage__acts { margin-top: clamp(24px, 3vw, 36px); }

/* ---------- «Что дальше»: пустой поиск и страница 404 (чанк lost_help) ----------
   Секции идут столбиком с одним отступом; запросы, категории и разделы – чипы (.chip из main.css), подборки – ссылки-строки (.mlink, сетка .mgroup__list из catalog.css). */
.lost { display: grid; gap: clamp(26px, 3.2vw, 42px); margin-top: clamp(24px, 3vw, 40px); }
.lost__sec { min-width: 0; }
.lost__sec[hidden] { display: none; }
.lost__h { margin-bottom: 14px; font-weight: 800; font-size: clamp(20px, calc(.6vw + 16px), 26px); line-height: 1.15; letter-spacing: -.015em; text-wrap: balance; }
.lost__chips { display: flex; flex-wrap: wrap; gap: 8px; min-width: 0; }
.lost .chip { min-height: 44px; padding-inline: 16px; font-size: 15px; }
.lost__bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; }
.lost__picks { margin-top: 0; }
.lost__links { display: grid; gap: 4px; }
.lost__link { display: inline-flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; min-height: 44px; padding-block: 8px; font-weight: 600; font-size: 17px; line-height: 1.3; color: var(--c-ink); text-decoration: underline; text-decoration-color: rgba(32, 32, 32, .2); text-underline-offset: 4px; transition: color .18s, text-decoration-color .18s; }
.lost__link small { font-weight: 500; font-size: 14px; color: var(--c-ink-3); }
.lost__link:hover { color: var(--c-green-700); text-decoration-color: currentColor; }
.lost__help { padding: clamp(22px, 2.8vw, 34px); border: 1px solid rgba(69, 188, 130, .4); border-radius: var(--r-xl); background: var(--c-green-50); }
.lost__text { max-width: 640px; font-size: 17px; line-height: 1.5; color: var(--c-ink-2); text-wrap: pretty; }
.lost__acts { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 18px; }
.lost__phone { margin-top: 16px; }
.lost__phone .link-more { min-height: 40px; }
@media (max-width: 599px) {
  .lost__acts .btn, .lost__acts .msgbtn { flex: 1 1 100%; justify-content: center; }
  /* длинная подпись кнопки («Подберём проект по телефону») на узком экране переносится на вторую строку, а не уезжает за край (320 px) */
  .lost__acts .btn { height: auto; min-height: 52px; padding: 8px 8px 8px 22px; white-space: normal; text-align: left; line-height: 1.2; }
}

/* ---------- «Спасибо» (/spasibo): подтверждение, кнопки, телефон; ниже набор .lost (категории, подборки, разделы) и «Мы на связи» ---------- */
.thanks__mark { display: grid; place-items: center; width: 68px; height: 68px; margin-bottom: 20px; border-radius: 50%; background: var(--grad); color: #fff; box-shadow: 0 10px 28px rgba(69, 188, 130, .32); }
.thanks .fpage__acts { margin-top: 24px; }
.thanks__phone { margin-top: 18px; font-size: 17px; line-height: 1.4; color: var(--c-ink-2); }
.thanks__phone .link-more { min-height: 40px; }
.thanks__contact .lost__acts { margin-top: 16px; }
.thanks__soc-h { margin-top: 22px; margin-bottom: 10px; font-weight: 600; color: var(--c-ink); }
.thanks__socs { margin-top: 0; }
@media (max-width: 599px) {
  .thanks__mark { width: 60px; height: 60px; margin-bottom: 16px; }
  .thanks .fpage__acts .btn { flex: 1 1 100%; justify-content: center; }
  .thanks .fpage__acts .btn--primary { justify-content: space-between; }
  .thanks .fpage__acts .btn[data-thanks-back] { height: auto; min-height: 52px; padding-block: 8px; white-space: normal; text-align: center; line-height: 1.2; }
}

/* ---------- «Акции» ---------- */
.ppromo { padding-bottom: clamp(36px, 5vw, 64px); }
.pcard { padding: clamp(24px, 3.2vw, 44px); border: 1px solid rgba(69, 188, 130, .4); border-radius: var(--r-xl); background: var(--c-green-50); }
.pcard__head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
.pcard__badge { display: inline-flex; align-items: center; height: 28px; padding: 0 12px; border-radius: 999px; background: var(--c-sale); color: #fff; font-weight: 700; font-size: 13px; line-height: 1; letter-spacing: .07em; text-transform: uppercase; }
.pcard__title { margin-top: 16px; max-width: 880px; font-weight: 800; font-size: clamp(26px, calc(1.6vw + 16px), 42px); line-height: 1.1; letter-spacing: -.02em; text-wrap: balance; }
.pcard__text { max-width: 720px; margin-top: 14px; font-size: 18px; line-height: 1.5; color: var(--c-ink-2); text-wrap: pretty; }
.pcard .fpage__acts { margin-top: 26px; }
.pterms { padding-bottom: clamp(36px, 5vw, 64px); }
.pterms__text { max-width: 760px; margin-top: 18px; font-size: 17px; line-height: 1.6; color: var(--c-ink-2); }
.pterms__text p + p { margin-top: 12px; }
.ppage__h { margin-bottom: clamp(20px, 2.4vw, 32px); }
.ppage__sale { scroll-margin-top: calc(var(--hdr-nav) + 16px); }
.ppage__cta .fpage__acts { margin-top: 24px; }
.ppage__cta .sec__lead { max-width: 680px; }
#terms, #sale-projects { scroll-margin-top: calc(var(--hdr-nav) + 16px); }

/* ---------- HTML-карта сайта ---------- */
.smap__body { display: grid; gap: clamp(32px, 4vw, 56px); padding-bottom: clamp(56px, 7vw, 104px); }
.smap__h { font-weight: 800; font-size: clamp(24px, calc(1vw + 18px), 34px); line-height: 1.12; letter-spacing: -.02em; margin-bottom: 14px; }
.smap__h a { color: inherit; text-decoration: none; }
.smap__h a:hover { color: var(--c-green-700); }
.smap__cat { padding-block: 18px 12px; border-top: 1px solid var(--c-line); }
.smap__cath { font-weight: 700; font-size: 20px; line-height: 1.25; letter-spacing: -.01em; }
.smap__cath a { display: inline-flex; align-items: center; min-height: 40px; text-decoration: none; }
.smap__cath a:hover { color: var(--c-green-700); }
.smap__det { margin-top: 2px; }
.smap__sum { display: flex; align-items: center; gap: 10px; min-height: 44px; font-weight: 600; font-size: 16px; line-height: 1.3; cursor: pointer; list-style: none; }
.smap__sum::-webkit-details-marker { display: none; }
.smap__sum::before { content: ""; flex: none; width: 8px; height: 8px; border-right: 2px solid var(--c-green-700); border-bottom: 2px solid var(--c-green-700); transform: rotate(-45deg); transition: transform .18s; }
.smap__det[open] > .smap__sum::before { transform: rotate(45deg); }
.smap__sum small { font-weight: 500; font-size: 14px; color: var(--c-ink-3); }
.smap__list { columns: 3 280px; column-gap: 32px; padding: 4px 0 14px; }
.smap__list li { break-inside: avoid; }
.smap__list a { display: flex; align-items: center; min-height: 44px; padding-block: 6px; font-size: 15.5px; line-height: 1.35; color: var(--c-ink); text-decoration: underline; text-decoration-color: rgba(32, 32, 32, .2); text-underline-offset: 3px; transition: color .18s, text-decoration-color .18s; }
.smap__list a:hover { color: var(--c-green-700); text-decoration-color: currentColor; }
.smap__list--open { padding-top: 0; }

@media (max-width: 1023px) {
  .slist { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 767px) {
  .smap__list { columns: 1; }
  .search--page .search__input { height: 54px; font-size: 16px; }
  .search--page .search__go { top: 5px; right: 5px; }
}
@media (max-width: 599px) {
  .slist { grid-template-columns: minmax(0, 1fr); }
  .sitem__link { padding: 14px 20px; border-radius: 22px; }
}

/* ---------- типовая внутренняя страница (шаблон page) ----------
   Шапка страницы (.chead, .crumbs) и «Подобрать проект» берутся из catalog.css и main.css; карточка справа – общая карточка действия .act (main.css).
   Текст оформлен так же, как тело статьи (articles.css): та же шкала, те же подзаголовки, цитаты, подписи и таблицы. */
.tpage__head { padding-bottom: 0; }
.tpage__sec { padding-block: clamp(28px, 3.2vw, 48px) clamp(24px, 3vw, 44px); }   /* ниже идёт «Подобрать проект» со своим верхним отступом */
.tpage__grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: clamp(32px, 4vw, 48px); }
.tpage__side { min-width: 0; max-width: 560px; }

.tpage__text { max-width: 800px; min-width: 0; font-size: 18px; line-height: 1.7; overflow-wrap: anywhere; }
.tpage__text > :first-child { margin-top: 0; }
.tpage__text h2 { margin-top: 40px; }
.tpage__text img { display: block; max-width: 100%; height: auto; border-radius: var(--r-lg); }
.tpage__text figure { margin: 28px 0; }
.tpage__text figcaption { margin-top: 10px; font-size: 14.5px; line-height: 1.45; color: var(--c-ink-3); }
.tpage__text blockquote { margin: 28px 0; padding: 4px 0 4px 22px; border-left: 4px solid var(--c-g2); font-weight: 600; color: var(--c-ink); }
.tpage__text hr { margin: 32px 0; border: 0; border-top: 1px solid var(--c-line); }
.tpage__text .lead { font-size: 1.18em; line-height: 1.55; font-weight: 500; color: var(--c-ink); }
.tpage__text .tfig { position: relative; aspect-ratio: 3 / 2; overflow: hidden; border-radius: var(--r-xl); background: #12201A; }   /* заглушка фото, пока настоящего нет */
.tpage__text .tfig .ph .i { width: 64px; height: 64px; }
.tpage__text .tblwrap { max-width: 100%; margin: 24px 0; overflow-x: auto; overflow-wrap: normal; -webkit-overflow-scrolling: touch; }   /* слова в ячейках не рвём: узкая таблица прокручивается вбок */
.tpage__text .tblwrap table { width: 100%; min-width: 520px; border-collapse: collapse; font-size: 16px; line-height: 1.45; }
.tpage__text .tblwrap th, .tpage__text .tblwrap td { padding: 10px 14px; border: 1px solid var(--c-line-strong); text-align: left; vertical-align: top; }
.tpage__text .tblwrap th { background: var(--c-soft); font-weight: 700; color: var(--c-ink); }

.tcard { gap: 20px; padding: clamp(22px, 2.2vw, 30px); }
.tcard .act__head { flex-direction: column; gap: 14px; }
.tcard .act__title { font-size: clamp(22px, calc(.5vw + 17px), 26px); }
.tcard .act__btn { align-self: stretch; width: 100%; min-width: 0; }
.tcard .act__msgs p { flex: 1 1 100%; margin: 0; }

@media (min-width: 1024px) {
  .tpage__grid { grid-template-columns: minmax(0, 1fr) 320px; align-items: start; column-gap: clamp(32px, 4vw, 56px); }
  .tpage__side { position: sticky; top: calc(var(--hdr-nav) + 24px); max-width: none; }
}
@media (min-width: 1280px) {
  .tpage__grid { grid-template-columns: minmax(0, 800px) 380px; justify-content: space-between; }
}
@media (max-width: 767px) {
  .tpage__text { font-size: 17px; line-height: 1.65; }
  .tpage__text h2 { margin-top: 32px; }
  .tpage__text .tfig { border-radius: 18px; }
}
@media print {
  .tpage__side, .rvpick, #contacts { display: none !important; }
  .tpage__sec { padding: 0; }
  .tpage__text { max-width: none; font-size: 12pt; }
}
