/* Шапка и подвал сайта ad2sub — ОДИН файл для всех поверхностей (30.10.2026):
   статические страницы site/**, React-страницы (SiteHeader.jsx), блог, /kniga-test/, серверная страница /passport/{username}.
   Разметку строит /lp/chrome.js. Все классы с префиксом a2-, стили заданы явно, чтобы стили страницы (Tailwind, site.css)
   не меняли вид шапки. Значения совпадают с макетом сайта (progress/_research/2026-10-29_позиционирование_и_лендинг/site/site.css). */
.a2-hdr, .a2-hdr *, .a2-ftr, .a2-ftr * { box-sizing: border-box; }
.a2-hdr, .a2-ftr { font-family: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; -webkit-font-smoothing: antialiased; line-height: 1.55; text-align: left; }
.a2-hdr a, .a2-ftr a { color: inherit; text-decoration: none; }
.a2-hdr h5, .a2-ftr h5, .a2-ftr p { margin: 0; }
/* страница может задавать свои правила для header / nav / footer — шапке они не нужны */
.a2-hdr, .a2-ftr, .a2-menu { margin: 0; padding: 0; max-width: none; width: auto; float: none; }
/* место под шапку до работы скрипта: страница не сдвигается при загрузке */
#site-header, [data-a2-header] { display: block; min-height: 65px; }
.a2-wrap { max-width: 1160px; margin: 0 auto; padding-inline: 20px; }

.a2-hdr { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 40; background: rgba(255,255,255,.94); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); border-bottom: 1px solid #f1f5f9; }
.a2-bar { display: flex; align-items: center; gap: 24px; height: 64px; }
.a2-logo { display: flex; align-items: center; gap: 10px; font-weight: 700; color: #0f172a; font-size: 17px; flex: none; }
.a2-logo i { width: 30px; height: 30px; border-radius: 7px; background: #0f172a; color: #fff; font-style: normal; display: grid; place-items: center; font-size: 14px; font-weight: 700; }
.a2-menu { display: flex; gap: 6px; font-size: 15px; color: #334155; flex: 1; justify-content: center; }
.a2-mi { position: relative; }
.a2-mi > a, .a2-mi > button { display: inline-flex; align-items: center; gap: 6px; padding: 8px 10px; border-radius: 8px; font: inherit; color: inherit; background: none; border: 0; margin: 0; cursor: pointer; white-space: nowrap; line-height: 1.55; }
.a2-mi > a:hover, .a2-mi > button:hover, .a2-mi.open > button { background: #f8fafc; color: #0f172a; }
.a2-mi.on > a, .a2-mi.on > button { color: #0f172a; font-weight: 600; }
.a2-mi > button::after { content: ""; width: 7px; height: 7px; border-right: 1.5px solid #94a3b8; border-bottom: 1.5px solid #94a3b8; transform: rotate(45deg) translateY(-3px); }
.a2-mi > a:focus-visible, .a2-mi > button:focus-visible, .a2-btn:focus-visible { outline: 2px solid #1d4ed8; outline-offset: 3px; }
.a2-dd { position: absolute; top: calc(100% + 6px); left: 50%; transform: translateX(-50%); width: 360px; background: #fff; border: 1px solid #e2e8f0; border-radius: 14px; box-shadow: 0 24px 48px -16px rgba(15,23,42,.22); padding: 8px; display: none; z-index: 41; }
/* мостик над выпадашкой: курсор проходит зазор и не уходит с пункта меню */
.a2-dd::before { content: ""; position: absolute; left: 0; right: 0; top: -14px; height: 14px; }
.a2-dd.wide { width: 560px; grid-template-columns: 1fr 1fr; gap: 2px; }
.a2-mi.open .a2-dd { display: block; }
.a2-mi.open .a2-dd.wide { display: grid; }
.a2-dd a { display: block; padding: 10px 12px; border-radius: 9px; }
.a2-dd a:hover { background: #f8fafc; }
.a2-dd a b { display: block; color: #0f172a; font-weight: 600; font-size: 14.5px; line-height: 1.4; }
.a2-dd a small { display: block; color: #64748b; font-size: 13px; line-height: 1.35; margin-top: 2px; }
.a2-dd .a2-all { grid-column: 1 / -1; border-top: 1px solid #f1f5f9; margin-top: 4px; padding-top: 10px; font-size: 13.5px; font-weight: 600; color: #0f172a; }
.a2-btns { display: flex; gap: 10px; margin-left: auto; flex: none; }
.a2-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border-radius: 8px; font-weight: 600; font-size: 14px; line-height: 1.55; padding: 8px 16px; border: 1px solid #e2e8f0; background: #fff; color: #0f172a; white-space: nowrap; cursor: pointer; font-family: inherit; }
.a2-btn:hover { background: #f8fafc; }
.a2-btn.dark { background: #0f172a; color: #fff; border-color: #0f172a; box-shadow: 0 6px 16px rgba(15,23,42,.18); }
.a2-btn.dark:hover { background: #1e293b; }
.a2-burger { display: none; width: 40px; height: 40px; border: 1px solid #e2e8f0; border-radius: 9px; background: #fff; cursor: pointer; place-items: center; padding: 0; margin: 0; }
.a2-burger span, .a2-burger span::before, .a2-burger span::after { display: block; width: 16px; height: 1.6px; background: #0f172a; position: relative; content: ""; }
.a2-burger span::before { position: absolute; top: -5px; } .a2-burger span::after { position: absolute; top: 5px; }
.a2-mnav { display: none; border-top: 1px solid #f1f5f9; padding: 12px 20px 20px; background: #fff; max-height: calc(100vh - 64px); overflow: auto; }
.a2-mnav.open { display: block; }
.a2-mnav h5 { margin: 14px 0 4px; font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: #94a3b8; }
.a2-mnav a { display: block; padding: 8px 0; color: #0f172a; font-weight: 500; font-size: 15px; }
@media (max-width: 1060px) {
  .a2-menu { display: none; }
  .a2-burger { display: grid; }
  .a2-btns .a2-btn:first-child { display: none; }
}

.a2-ftr { border-top: 1px solid #e2e8f0; padding: 48px 0 36px; font-size: 14px; color: #64748b; background: #fff; }
.a2-fgrid { display: grid; grid-template-columns: 1.3fr repeat(4, minmax(0, 1fr)); gap: 28px; }
.a2-fgrid h5 { margin: 0 0 10px; font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: #94a3b8; }
.a2-fgrid a { display: block; padding: 4px 0; color: #334155; }
.a2-fgrid a:hover { color: #0f172a; }
.a2-fgrid .a2-logo { display: flex; padding: 0; }
.a2-fbottom { margin-top: 32px; padding-top: 20px; border-top: 1px solid #f1f5f9; display: flex; flex-wrap: wrap; gap: 10px 24px; font-size: 13px; }
.a2-fbottom button { margin-left: auto; padding: 0; border: 0; background: none; font: inherit; color: inherit; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.a2-fbottom button:hover { color: #0f172a; }
.a2-flegal { margin-top: 12px; font-size: 12.5px; color: #94a3b8; }
@media (max-width: 980px) { .a2-fgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 720px) { .a2-fbottom button { margin-left: 0; } }

/* Баннер согласия на cookie для страниц вне приложения (/lp/consent.js; тот же вид, что у баннера сайта) */
.a2-cookie { position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; background: #0b1220; color: #e2e8f0; border-top: 1px solid #1e293b; padding: 16px 0; font-family: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; line-height: 1.5; text-align: left; }
.a2-cookie[hidden] { display: none; }
.a2-cookie * { box-sizing: border-box; }
.a2-cookie-in { display: flex; align-items: center; gap: 16px 24px; }
.a2-cookie p { flex: 1; font-size: 14px; margin: 0; }
.a2-cookie p a { color: #fff; text-decoration: underline; }
.a2-cookie-btns { display: flex; gap: 10px; flex-shrink: 0; }
.a2-cookie-btns button { font: inherit; font-size: 14px; padding: 9px 16px; border-radius: 8px; border: 1px solid #475569; background: none; color: #e2e8f0; cursor: pointer; margin: 0; }
.a2-cookie-btns button:hover { background: #1e293b; }
.a2-cookie-btns button.on { background: #fff; color: #0f172a; border-color: #fff; font-weight: 600; }
.a2-cookie-btns button.on:hover { background: #f1f5f9; }
@media (max-width: 720px) { .a2-cookie-in { flex-direction: column; align-items: stretch; } .a2-cookie-btns button { flex: 1; } }
