/* Шапка и подвал сайта ad2sub — ОДИН файл для всех поверхностей (30.10.2026, дизайн-система 05.11.2026, правки 06.11.2026):
   статические страницы site/**, React-страницы (SiteHeader.jsx), блог, /kniga-test/, серверная страница /passport/{username}.
   Разметку строит /lp/chrome.js. Все классы с префиксом a2-, стили заданы явно, чтобы стили страницы (Tailwind, site.css)
   не меняли вид шапки. Значения = /lp/ds.css: бумага #FAF9F7, чернила #16131E, текст #2B2833, пояснение #6F6B7A, линия #E3E2E1,
   рамка #D8D6D6, деньги #1F6E43 (в шапке только у двойки в знаке), шрифт Onest (подключается страницей через /lp/ds.css или /lp/fonts/onest.css).
   Пункт меню: в покое текст 500, при наведении и у активного — подчёркивание 1 px чернил; вес не меняется, текст не дрожит. */
.a2-hdr, .a2-hdr *, .a2-ftr, .a2-ftr * { box-sizing: border-box; }
.a2-hdr, .a2-ftr { font-family: "Onest", "Onest Fallback", "Helvetica Neue", Arial, sans-serif; -webkit-font-smoothing: antialiased; line-height: 24px; 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: 64px; }
.a2-wrap { max-width: 1168px; margin: 0 auto; padding-inline: 32px; }

/* полоска анонса над шапкой (09.11.2026, строит chrome.js note()): в потоке, не липкая; тон и шрифт как у баннера cookie,
   ссылка — бумага с подчёркиванием 1 px, крестик — «мягкий» серый, при наведении бумага. На телефоне текст переносится,
   крестик остаётся у правого края. Движения нет: строка либо есть с первой отрисовки (из памяти браузера), либо приходит с ответом. */
.a2-note { background: #16131E; color: #E3E2E1; font-family: "Onest", "Onest Fallback", "Helvetica Neue", Arial, sans-serif; -webkit-font-smoothing: antialiased; font-size: 14px; line-height: 20px; text-align: left; }
.a2-note-in { display: flex; align-items: flex-start; gap: 16px; padding-block: 10px; }
.a2-note p { margin: 0; flex: 1; min-width: 0; }
.a2-note a { color: #FAF9F7; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; white-space: nowrap; margin-left: 8px; }
.a2-note a:hover { text-decoration-color: transparent; }
.a2-note .a2-arr { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; vertical-align: -1px; margin-left: 4px; }
.a2-note-x { flex: none; width: 24px; height: 20px; margin: 0 -4px 0 0; padding: 0; border: 0; background: none; color: #9B96A3; font: inherit; font-size: 22px; line-height: 20px; cursor: pointer; }
.a2-note-x:hover { color: #FAF9F7; }

.a2-hdr { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 40; background: #FAF9F7; border-bottom: 1px solid #E3E2E1; }
.a2-bar { display: flex; align-items: center; gap: 32px; height: 63px; }
.a2-logo { display: inline-flex; align-items: center; color: #16131E; flex: none; }
.a2-logo .a2-mark { display: block; height: 19px; width: auto; }
.a2-ink .a2-logo { color: #FAF9F7; } .a2-ink .a2-logo .a2-two { color: #FAF9F7; }
.a2-logo b { color: #1F6E43; font-weight: 700; letter-spacing: -0.04em; }
.a2-menu { display: flex; gap: 0 24px; font-size: 14px; font-weight: 500; color: #2B2833; flex: 1; justify-content: flex-start; }
.a2-mi { position: relative; }
.a2-mi > a, .a2-mi > button { display: inline-flex; align-items: center; gap: 6px; padding: 10px 0; border-radius: 0; font: inherit; color: inherit; background: none; border: 0; margin: 0; cursor: pointer; white-space: nowrap; line-height: 24px; text-decoration: underline; text-underline-offset: 6px; text-decoration-thickness: 1px; text-decoration-color: transparent; transition: text-decoration-color .15s, color .15s; }
.a2-mi.on > a, .a2-mi.on > button { color: #16131E; font-weight: 500; text-decoration-color: #16131E; }
.a2-mi > button::after { content: ""; width: 6px; height: 6px; border-right: 1.5px solid #6F6B7A; border-bottom: 1.5px solid #6F6B7A; transform: rotate(45deg) translateY(-2px); }
.a2-mi > a:focus-visible, .a2-mi > button:focus-visible, .a2-btn:focus-visible, .a2-burger:focus-visible { outline: 2px solid #16131E; outline-offset: 3px; }
.a2-dd { position: absolute; top: calc(100% + 1px); left: 0; width: 360px; background: #FFFFFF; border: 1px solid #D8D6D6; border-radius: 6px; 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: 8px 12px; border-radius: 0; }
.a2-dd a b { display: block; color: #16131E; font-weight: 500; font-size: 14px; line-height: 20px; }
.a2-dd a small { display: block; color: #6F6B7A; font-size: 14px; line-height: 20px; margin-top: 2px; }
.a2-dd .a2-all { grid-column: 1 / -1; border-top: 1px solid #E3E2E1; margin-top: 4px; padding-top: 10px; font-size: 14px; font-weight: 500; color: #16131E; }
.a2-btns { display: flex; align-items: center; gap: 16px; margin-left: auto; flex: none; }
.a2-btn { display: inline-flex; align-items: center; justify-content: center; border-radius: 6px; font-weight: 500; font-size: 14px; line-height: 24px; padding: 10px 0; border: 1px solid transparent; background: none; color: #2B2833; white-space: nowrap; cursor: pointer; font-family: inherit; transition: background-color .15s, border-color .15s, color .15s, transform .2s; }
.a2-btn.dark { background: #16131E; color: #FAF9F7; border-color: #16131E; font-weight: 600; padding: 0 20px; height: 40px; box-shadow: none; }
.a2-btn.dark:active { transform: scale(.98); transition-duration: .1s; }
/* тёмная кнопка при наведении: надпись уходит вверх, копия приходит снизу (двойную надпись ставит motion.js) */
.a2-btn.dark .l { position: relative; display: block; overflow: hidden; height: 24px; }
.a2-btn.dark .l > span { display: block; transition: transform 380ms cubic-bezier(.22, 1, .36, 1); }
.a2-btn.dark .l > span + span { position: absolute; left: 0; right: 0; top: 100%; }
/* марка: при наведении двойка с хвостом прорисовывается заново (pathLength=1 у контура) */
.a2-logo .a2-two path { stroke-dasharray: 1; stroke-dashoffset: 0; }
@keyframes a2-draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
.a2-burger { display: none; width: 40px; height: 40px; border: 1px solid #D8D6D6; border-radius: 6px; background: #FAF9F7; cursor: pointer; place-items: center; padding: 0; margin: 0; }
.a2-burger span, .a2-burger span::before, .a2-burger span::after { display: block; width: 18px; height: 1.6px; background: #16131E; position: relative; content: ""; }
.a2-burger span::before { position: absolute; top: -6px; } .a2-burger span::after { position: absolute; top: 6px; }
.a2-mnav { display: none; border-top: 1px solid #E3E2E1; padding: 8px 16px 24px; background: #FAF9F7; max-height: calc(100vh - 80px); overflow: auto; }
.a2-mnav.open { display: block; }
.a2-mnav h5 { margin: 16px 0 4px; font-size: 14px; font-weight: 500; line-height: 24px; color: #6F6B7A; }
.a2-mnav a { display: block; padding: 8px 0; color: #16131E; font-weight: 500; font-size: 17px; line-height: 24px; border-bottom: 1px solid #E3E2E1; }
@media (hover: hover) and (pointer: fine) {
  .a2-mi > a:hover, .a2-mi > button:hover, .a2-mi.open > button { color: #16131E; text-decoration-color: #16131E; }
  .a2-dd a:hover { background: #F2F0EC; }
  .a2-btn:hover { color: #16131E; }
  .a2-btn.dark:hover { background: #444149; border-color: #444149; color: #FAF9F7; }
  .a2-btn.dark:hover .l > span { transform: translateY(-100%); }
  .a2-logo:hover .a2-two path { animation: a2-draw 800ms cubic-bezier(.2, .6, .2, 1); }
}
@media (max-width: 1060px) {
  .a2-menu { display: none; }
  .a2-burger { display: grid; }
  .a2-btns .a2-btn:first-child { display: none; }
  .a2-wrap { padding-inline: 16px; }
}

.a2-ftr { border-top: 1px solid #E3E2E1; padding: 48px 0 32px; font-size: 14px; line-height: 24px; color: #6F6B7A; background: #FAF9F7; }
.a2-fgrid { display: grid; grid-template-columns: 1.3fr repeat(3, minmax(0, 1fr)); gap: 24px; }
.a2-fgrid h5 { margin: 0 0 8px; font-size: 14px; font-weight: 500; line-height: 24px; color: #16131E; }
.a2-fgrid a { display: block; padding: 0; color: #2B2833; }
.a2-fgrid .a2-logo { display: inline-flex; padding: 0; }
.a2-fbottom { margin-top: 32px; padding-top: 16px; border-top: 1px solid #E3E2E1; display: flex; flex-wrap: wrap; gap: 8px 24px; font-size: 14px; }
.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; text-decoration-thickness: 1px; text-decoration-color: #9B96A3; }
.a2-flegal { margin-top: 8px; font-size: 14px; line-height: 24px; color: #2B2833; }
@media (hover: hover) and (pointer: fine) {
  .a2-fgrid a:hover { color: #16131E; text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
  .a2-fbottom button:hover { color: #16131E; text-decoration-color: #16131E; }
}
@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; тот же вид, что у баннера сайта): чернила системы, кнопки 40 в одну строку */
.a2-cookie { position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; background: #16131E; color: #E3E2E1; border-top: 1px solid #444149; padding: 12px 0; font-family: "Onest", "Onest Fallback", "Helvetica Neue", Arial, sans-serif; line-height: 20px; text-align: left; }
.a2-cookie[hidden] { display: none; }
.a2-cookie * { box-sizing: border-box; }
.a2-cookie-in { display: flex; align-items: center; gap: 12px 24px; }
.a2-cookie p { flex: 1; font-size: 14px; line-height: 20px; margin: 0; }
.a2-cookie p a { color: #FAF9F7; text-decoration: underline; text-underline-offset: 2px; }
.a2-cookie-btns { display: flex; gap: 8px; flex-shrink: 0; }
.a2-cookie-btns button { font: inherit; font-size: 14px; line-height: 20px; height: 40px; padding: 0 16px; border-radius: 6px; border: 1px solid #6F6B7A; background: none; color: #E3E2E1; cursor: pointer; margin: 0; white-space: nowrap; }
.a2-cookie-btns button:hover { background: #2B2833; }
.a2-cookie-btns button.on { background: #FAF9F7; color: #16131E; border-color: #FAF9F7; font-weight: 600; }
.a2-cookie-btns button.on:hover { background: #FFFFFF; }
@media (max-width: 720px) { .a2-cookie-in { flex-direction: column; align-items: stretch; gap: 10px; } .a2-cookie-btns button { flex: 1; padding: 0 8px; } }
