/* База темы «Mr Mark digital»: то, что должно работать на любом сайте до и поверх его дизайна — скрытые элементы, поля-ловушки,
   сообщения форм, окно заявки, плашка cookie, запасные шапка, подвал и первый экран. Общий файл тем агентства — под сайт не правится.
   Свой вид — стилями сайта (site/assets/site.css идёт после этого файла) или переменными:
   --mmd-accent (кнопки, ссылки), --mmd-ink (текст), --mmd-surface (фон карточек и окна), --mmd-line (рамки), --mmd-radius, --mmd-err. */
[hidden]{display:none!important}
.hp{position:absolute!important;left:-9999px;top:auto;width:1px;height:1px;overflow:hidden}

/* формы: подсказки у полей и строка состояния (assets/lead.js) */
.lead-err{margin:4px 0 0;font-size:.875em;line-height:1.35;color:var(--mmd-err,#b3261e)}
.lead-status{margin:10px 0 0;font-size:.9375em;line-height:1.4}
.lead-status:empty{display:none}
.lead-status[data-state="err"],.lead-status[role="alert"]{color:var(--mmd-err,#b3261e)}
.lead-status[data-state="ok"]{color:var(--mmd-ok,#1a7f37)}
form[data-mmd-lead] [aria-invalid="true"]{outline:2px solid var(--mmd-err,#b3261e);outline-offset:1px}
form[data-mmd-lead][aria-busy="true"]{opacity:.75}

/* форма по умолчанию (inc/forms.php) */
.mmd-form__grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px 16px}
.mmd-f{display:flex;flex-direction:column;gap:6px;min-width:0}
.mmd-f--full{grid-column:1/-1}
.mmd-f label{font-size:.875em;font-weight:600}
.mmd-f input,.mmd-f select,.mmd-f textarea{width:100%;box-sizing:border-box;padding:12px 14px;border:1px solid var(--mmd-line,#c9ced6);border-radius:var(--mmd-radius,8px);background:var(--mmd-field,#fff);color:inherit;font:inherit}
.mmd-f textarea{resize:vertical;min-height:88px}
.mmd-agree{display:flex;gap:10px;align-items:flex-start;margin:14px 0 0;font-size:.875em;line-height:1.4}
.mmd-agree input{flex:none;width:18px;height:18px;margin:1px 0 0}
.mmd-agree--note{display:block}
.mmd-form__btn{margin-top:16px}
@media (max-width:560px){.mmd-form__grid{grid-template-columns:1fr}}

/* окно заявки (inc/popup.php, assets/mmd-base.js) */
.mmd-modal{position:fixed;inset:0;z-index:100000;display:flex;align-items:center;justify-content:center;padding:16px}
.mmd-modal__back{position:absolute;inset:0;background:rgba(10,14,20,.6)}
.mmd-modal__card{position:relative;box-sizing:border-box;width:100%;max-width:520px;max-height:calc(100vh - 32px);max-height:calc(100dvh - 32px);overflow:auto;padding:28px;border-radius:calc(var(--mmd-radius,8px) + 4px);background:var(--mmd-surface,#fff);color:var(--mmd-ink,#16191d);box-shadow:0 20px 60px rgba(0,0,0,.3)}
.mmd-modal__x{position:absolute;top:10px;right:10px;display:grid;place-items:center;width:40px;height:40px;padding:0;border:0;border-radius:50%;background:transparent;color:inherit;cursor:pointer}
.mmd-modal__x:hover,.mmd-modal__x:focus-visible{background:rgba(0,0,0,.08)}
.mmd-modal .mmd-popup{padding:0;margin:0;background:none}
.mmd-modal .mmd-popup h3{margin:0 40px 8px 0}
.mmd-modal .mmd-popup>p{margin:0 0 16px}
.mmd-modal .mmd-form__grid{grid-template-columns:1fr}
html.mmd-modal-open{overflow:hidden}
@media (max-width:560px){.mmd-modal{padding:0;align-items:flex-end}.mmd-modal__card{max-width:none;max-height:92vh;max-height:92dvh;padding:22px 18px;border-radius:16px 16px 0 0}}

/* плашка cookie (inc/consent.php, assets/consent.js) */
.cookie-bar{position:fixed;left:16px;right:16px;bottom:16px;z-index:99990;display:flex;gap:16px;align-items:center;box-sizing:border-box;max-width:860px;margin:0 auto;padding:14px 18px;border:1px solid var(--mmd-line,#c9ced6);border-radius:calc(var(--mmd-radius,8px) + 4px);background:var(--mmd-surface,#fff);color:var(--mmd-ink,#16191d);box-shadow:0 10px 30px rgba(0,0,0,.18);font-size:.875rem;line-height:1.45}
.cookie-bar__text{flex:1;margin:0}
.cookie-bar__text a{color:inherit;text-decoration:underline}
.cookie-bar__btn{flex:none;padding:10px 18px;border:0;border-radius:var(--mmd-radius,8px);background:var(--mmd-accent,#16191d);color:var(--mmd-on-accent,#fff);font:inherit;font-weight:600;cursor:pointer}
@media (max-width:560px){.cookie-bar{left:8px;right:8px;bottom:8px;flex-direction:column;align-items:stretch;gap:10px}}
/* снимки и проверки (?static=1, класс static на <html>): без плашки — картинка темы screenshot.png и картинка для мессенджеров
   снимаются shots.mjs, который не ставит cookie согласия (avtosulin.ru, 18.11.2026) */
html.static .cookie-bar{display:none!important}

/* подпись агентства в подвале (mmd_credit(), inc/helpers.php): самый мелкий текст сайта, цветом текста подвала — контраст тот
   же, что у подвала, поэтому без прозрачности (проверка контраста её учитывает). Размер, начертание и вид ссылки закреплены
   (!important): стили подвала сайта вроде «.foot p» и «.foot a» иначе увеличили бы подпись и перекрасили ссылку; цвет — можно.
   --auto — тема поставила подпись сама, последней внутрь <footer>: под неё отводится своя строка в 14px в самом низу подвала
   (поверх соседних блоков подпись не ложится — фон под ней всегда фон самого подвала), текст прижат к самому нижнему краю
   подвала и стоит в его нижнем поле. Браузер без :has() — обычной строкой в конце подвала */
.mmd-credit{margin:0!important;font-size:9px!important;font-weight:400!important;font-style:normal!important;line-height:10px!important;letter-spacing:.02em!important;text-transform:none!important;color:inherit}
.mmd-credit a{color:inherit!important;font:inherit!important;text-decoration:none!important;border:0!important;background:none!important}
.mmd-credit a:hover,.mmd-credit a:focus-visible{text-decoration:underline!important}
.mmd-credit--auto{box-sizing:border-box;padding:2px 12px;text-align:center}
@supports selector(:has(*)){
:where(footer:has(> .mmd-credit--auto)){position:relative}
.mmd-credit.mmd-credit--auto{display:block;flex:0 0 auto;grid-column:1/-1;width:0;height:14px;padding:0;overflow:visible}
.mmd-credit--auto .mmd-credit__t{position:absolute;left:0;right:0;bottom:0;padding:2px 12px;text-align:center;white-space:nowrap;pointer-events:none}
.mmd-credit--auto .mmd-credit__t a{pointer-events:auto}
}

/* запасные части базы: первый экран внутренней страницы, шапка, подвал, списки (у сайта — свои, site/parts/) */
.mmd-phero{padding:40px 0 28px}
.mmd-phero h1,.mmd-phero__title{margin:10px 0 0}
.mmd-404__links{display:flex;flex-wrap:wrap;gap:12px 20px;align-items:center}
.mmd-hdr .wrap,.mmd-foot .wrap{display:flex;flex-wrap:wrap;gap:12px 28px;align-items:center}
.mmd-hdr{padding:14px 0;border-bottom:1px solid var(--mmd-line,#c9ced6)}
.mmd-hdr__logo{font-weight:700;text-decoration:none;color:inherit}
.mmd-hdr__nav ul,.mmd-foot__nav ul{display:flex;flex-wrap:wrap;gap:6px 20px;margin:0;padding:0;list-style:none}
.mmd-hdr__nav ul ul{display:none}
.mmd-hdr__tel{margin-left:auto;font-weight:600;white-space:nowrap}
.mmd-foot{margin-top:48px;padding:28px 0;border-top:1px solid var(--mmd-line,#c9ced6);font-size:.9375em}
.mmd-foot p{margin:0;flex-basis:100%}
.mmd-list__item{margin:0 0 28px}
.mmd-list__item h2{margin:0 0 6px}
