/* pbn-enhance.css — дополнения к style.css макета dorstroy-ab.ru под токен-движок BablO$.
   Статичная часть: пишет этап схемы (bin/pbn/dorstroy-ab_1_schema.php, контракт — bin/pbn/data/dorstroy-ab/plan.md). Сид
   страниц (bin/pbn/dorstroy-ab_2_pages.php) копирует этот файл в public/sites/dorstroy-ab-ru/assets/css/pbn-enhance.css и
   дописывает в конец маски иконок строк MIGX: i.ico[data-ic="<ключ>"]{--ic:url("data:image/svg+xml,…")}.
   Только переменные и классы макета; своих классов нет, кроме служебных классов движка (.bf-msg / .bf-ok / .bf-err). */

/* Иконки в строках MIGX (преимущества, показатели, соцсети): значения MIGX экранируются, SVG туда нельзя. В строке —
   <i class="ico" data-ic="<ключ>"> с тем же классом, что у <svg> из icon() макета; размер — инлайн (как атрибуты svg),
   display:block — как у svg в сбросе макета (img, svg, video, iframe {display:block}); форма — маской из того же SVG,
   цвет — currentColor обёртки (.adv__ico, .achv__ico — красный, .socials__link — белый) */
i.ico[data-ic]{display:block;flex:0 0 auto;background-color:currentColor;-webkit-mask:var(--ic) center/contain no-repeat;mask:var(--ic) center/contain no-repeat}

/* Условные элементы макета (if в его PHP): пустое значение — элемента нет. Теги таких элементов в разметке — без
   пробелов внутри, иначе :empty не сработает */
.phero__inner > .eyebrow:empty,.phero__sub:empty,.section__head > p:empty,.ptile__ba:empty,.mega__link-price:empty,
.ccard__price:empty,.seo > .lead:empty,.article__lead:empty,.alist__lead:empty,.rel__lead:empty{display:none}

/* Блок «О работах» (seo-text.php) — «Текст» страницы или общий текст услуг: без текста в блоке остаётся одна надпись —
   секции нет; текстовая страница без «Текста» (пустой .seo) — тоже */
.section:has(> .container > .seo > .eyebrow:only-child),.section:has(> .container > .seo:empty){display:none}
/* «Коротко о работах» услуги: нет ни лида, ни «Текста» (новая услуга до генерации) — секции нет */
.section:has(> .container > .seo > h2 + .lead:empty:last-child){display:none}

/* Лента материалов: «В этом разделе пока нет материалов» — только у пустой ленты (у макета — if) */
.alist:has(> .alist__item) > p{display:none}

/* Звёзды отзыва: у макета незакрашенные звёзды — style="opacity:.28" (stars()); в атрибут style значение строки MIGX не
   подставить, оценка стоит в aria-label ряда — по ней и гасятся звёзды сверх оценки */
.stars[aria-label="Оценка 4 из 5"] > span:nth-child(n+5),
.stars[aria-label="Оценка 3 из 5"] > span:nth-child(n+4),
.stars[aria-label="Оценка 2 из 5"] > span:nth-child(n+3),
.stars[aria-label="Оценка 1 из 5"] > span:nth-child(n+2),
.stars[aria-label="Оценка 0 из 5"] > span{opacity:.28}

/* Ответ формы движка — на месте <p class="form__ok" data-form-ok hidden> макета (его показывал демо-обработчик main.js,
   который сид страниц вырезает), видом .form__ok; ошибка — тёмной плашкой с красной чертой, как .redbar макета */
.bf-msg{margin-top:18px;padding:14px 16px;background:var(--red-700);color:#FFF;font-size:14px;line-height:1.5}
.bf-msg.bf-err{background:var(--ink);box-shadow:inset 4px 0 0 var(--red)}

/* Тексты живого сайта и генерации («Текст» в .seo.text-body и .article__body): у списков без класса сброс макета снимает
   маркеры и отступы — вид .list-marked / .list-num макета; таблицы — вид .ctable; отступы заголовков и абзацев после
   списков и таблиц — ритм .seo макета; видео — по ширине колонки */
.text-body ul:not([class]),.text-body ol:not([class]){margin-top:18px}
.text-body ul:not([class]) > li{position:relative;padding-left:22px;font-size:17px;line-height:1.6}
.text-body ul:not([class]) > li::before{content:"";position:absolute;left:0;top:10px;width:6px;height:6px;background:var(--red)}
.text-body ol:not([class]){counter-reset:n}
.text-body ol:not([class]) > li{counter-increment:n;position:relative;padding-left:34px;font-size:17px}
.text-body ol:not([class]) > li::before{content:counter(n, decimal-leading-zero);position:absolute;left:0;top:1px;font-family:var(--font-head);font-weight:800;font-size:14px;color:var(--red-700)}
.text-body ul:not([class]) > li + li,.text-body ol:not([class]) > li + li{margin-top:10px}
.seo p + h2,.seo ul + h2,.seo ol + h2,.seo table + h2,.seo figure + h2,.seo img + h2{margin-top:44px}
.seo ul + p,.seo ol + p,.seo table + p,.seo figure + p,.seo img + p,.seo h3 + p{margin-top:18px}
.text-body table:not([class]){display:block;max-width:100%;overflow-x:auto;margin:30px 0}
.text-body table:not([class]) th,.text-body table:not([class]) td{padding:13px 16px;text-align:left;vertical-align:top;font-size:15px;border-bottom:1px solid var(--line)}
.text-body table:not([class]) th{font-size:12px;font-weight:500;letter-spacing:.16em;text-transform:uppercase;color:var(--muted)}
.text-body table:not([class]) tbody tr:nth-child(even){background:var(--paper-2)}
.seo img,.seo figure{margin-top:24px}
.text-body iframe{width:100%;height:auto;aspect-ratio:16/9;border:0;margin-top:24px}

/* Маски иконок строк MIGX i[data-ic="<ключ>"] по icon() макета — дописывает bin/pbn/dorstroy-ab_2_pages.php при каждом
   прогоне. Файл перезаписывается целиком: статичную часть правьте в bin/pbn/data/dorstroy-ab/pbn-enhance.css */
i[data-ic="wa"]{--ic:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22%23000%22%20stroke-width%3D%221.5%22%20stroke-linecap%3D%22square%22%20stroke-linejoin%3D%22miter%22%3E%3Cpath%20d%3D%22M3.5%2020.5%205%2016.3A8%208%200%201%201%208.1%2019z%22%2F%3E%3Cpath%20d%3D%22M9%209c.4%202.5%203.4%205.4%206%205.9%22%2F%3E%3C%2Fsvg%3E")}
i[data-ic="truck"]{--ic:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22%23000%22%20stroke-width%3D%221.5%22%20stroke-linecap%3D%22square%22%20stroke-linejoin%3D%22miter%22%3E%3Cpath%20d%3D%22M2%207h11v10H2z%22%2F%3E%3Cpath%20d%3D%22M13%2010h4l4%203.5V17h-8z%22%2F%3E%3Ccircle%20cx%3D%226%22%20cy%3D%2218.5%22%20r%3D%221.8%22%2F%3E%3Ccircle%20cx%3D%2217%22%20cy%3D%2218.5%22%20r%3D%221.8%22%2F%3E%3C%2Fsvg%3E")}
i[data-ic="doc"]{--ic:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22%23000%22%20stroke-width%3D%221.5%22%20stroke-linecap%3D%22square%22%20stroke-linejoin%3D%22miter%22%3E%3Cpath%20d%3D%22M6%203h8l4%204v14H6z%22%2F%3E%3Cpolyline%20points%3D%2214%203%2014%207%2018%207%22%2F%3E%3Cline%20x1%3D%229%22%20y1%3D%2212%22%20x2%3D%2215%22%20y2%3D%2212%22%2F%3E%3Cline%20x1%3D%229%22%20y1%3D%2216%22%20x2%3D%2215%22%20y2%3D%2216%22%2F%3E%3C%2Fsvg%3E")}
i[data-ic="clock"]{--ic:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22%23000%22%20stroke-width%3D%221.5%22%20stroke-linecap%3D%22square%22%20stroke-linejoin%3D%22miter%22%3E%3Ccircle%20cx%3D%2212%22%20cy%3D%2212%22%20r%3D%229%22%2F%3E%3Cpolyline%20points%3D%2212%207%2012%2012%2016%2014%22%2F%3E%3C%2Fsvg%3E")}
i[data-ic="shield"]{--ic:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22%23000%22%20stroke-width%3D%221.5%22%20stroke-linecap%3D%22square%22%20stroke-linejoin%3D%22miter%22%3E%3Cpath%20d%3D%22M12%203l8%203v6c0%205-3.6%208-8%209-4.4-1-8-4-8-9V6z%22%2F%3E%3Cpolyline%20points%3D%229%2012%2011%2014%2015%2010%22%2F%3E%3C%2Fsvg%3E")}
i[data-ic="wallet"]{--ic:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22%23000%22%20stroke-width%3D%221.5%22%20stroke-linecap%3D%22square%22%20stroke-linejoin%3D%22miter%22%3E%3Crect%20x%3D%223%22%20y%3D%226%22%20width%3D%2218%22%20height%3D%2213%22%2F%3E%3Cpath%20d%3D%22M3%2010h18%22%2F%3E%3Ccircle%20cx%3D%2217%22%20cy%3D%2214.5%22%20r%3D%221.2%22%2F%3E%3C%2Fsvg%3E")}
i[data-ic="trash"]{--ic:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22%23000%22%20stroke-width%3D%221.5%22%20stroke-linecap%3D%22square%22%20stroke-linejoin%3D%22miter%22%3E%3Cpolyline%20points%3D%224%207%2020%207%22%2F%3E%3Cpath%20d%3D%22M6%207l1%2013h10l1-13%22%2F%3E%3Cpath%20d%3D%22M9.5%207V4h5v3%22%2F%3E%3C%2Fsvg%3E")}
i[data-ic="roller"]{--ic:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22%23000%22%20stroke-width%3D%221.5%22%20stroke-linecap%3D%22square%22%20stroke-linejoin%3D%22miter%22%3E%3Crect%20x%3D%223%22%20y%3D%2214%22%20width%3D%228%22%20height%3D%226%22%20rx%3D%221%22%2F%3E%3Crect%20x%3D%2213%22%20y%3D%2215%22%20width%3D%228%22%20height%3D%225%22%20rx%3D%221%22%2F%3E%3Cpath%20d%3D%22M7%2014V8h9v3%22%2F%3E%3C%2Fsvg%3E")}
i[data-ic="award"]{--ic:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22%23000%22%20stroke-width%3D%221.5%22%20stroke-linecap%3D%22square%22%20stroke-linejoin%3D%22miter%22%3E%3Ccircle%20cx%3D%2212%22%20cy%3D%229%22%20r%3D%225.5%22%2F%3E%3Cpolyline%20points%3D%228.5%2013.5%207%2021%2012%2018.5%2017%2021%2015.5%2013.5%22%2F%3E%3C%2Fsvg%3E")}
i[data-ic="calendar"]{--ic:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22%23000%22%20stroke-width%3D%221.5%22%20stroke-linecap%3D%22square%22%20stroke-linejoin%3D%22miter%22%3E%3Crect%20x%3D%223%22%20y%3D%225%22%20width%3D%2218%22%20height%3D%2216%22%2F%3E%3Cline%20x1%3D%223%22%20y1%3D%2210%22%20x2%3D%2221%22%20y2%3D%2210%22%2F%3E%3Cline%20x1%3D%228%22%20y1%3D%223%22%20x2%3D%228%22%20y2%3D%227%22%2F%3E%3Cline%20x1%3D%2216%22%20y1%3D%223%22%20x2%3D%2216%22%20y2%3D%227%22%2F%3E%3C%2Fsvg%3E")}
i[data-ic="tg"]{--ic:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22%23000%22%20stroke-width%3D%221.5%22%20stroke-linecap%3D%22square%22%20stroke-linejoin%3D%22miter%22%3E%3Cpath%20d%3D%22M21%205%203.5%2011.4l4.7%201.6L19%207l-8.4%208.2.3%204.3%202.6-3.4%204%203z%22%2F%3E%3C%2Fsvg%3E")}
i[data-ic="vk"]{--ic:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22%23000%22%20stroke-width%3D%221.5%22%20stroke-linecap%3D%22square%22%20stroke-linejoin%3D%22miter%22%3E%3Cpath%20d%3D%22M3.5%207.5h3c.6%203.4%202%205.6%203.2%205.6.5%200%20.7-.2.7-1V8.6c0-.8-.4-1.1-.4-1.1h3.3v4.3c0%20.8.3%201.1.6%201.1.6%200%201.7-1.4%202.6-4.4h3c-.7%202.7-2.1%204.6-3%205.3%201%20.8%202.6%202.4%203.3%204.2h-3.3c-.7-1.4-2-3.2-3.2-3.2v3.2H10c-3.5%200-6.5-4.6-6.5-10.5z%22%2F%3E%3C%2Fsvg%3E")}
i[data-ic="yt"]{--ic:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22%23000%22%20stroke-width%3D%221.5%22%20stroke-linecap%3D%22square%22%20stroke-linejoin%3D%22miter%22%3E%3Crect%20x%3D%222.5%22%20y%3D%226%22%20width%3D%2219%22%20height%3D%2212%22%20rx%3D%223%22%2F%3E%3Cpolygon%20points%3D%2210.5%209.5%2015.5%2012%2010.5%2014.5%22%2F%3E%3C%2Fsvg%3E")}
