/* Книга «Сами справимся»: страница /kniga/ (.avk) и плавающая плашка на всём сайте (.avw).
   Цвета бренда: красный #d71200, жёлтый #fdbf00, тёмный #0b0c11. */

/* ---------- Страница ---------- */
.avk { color: #26282c; font-size: 16px; line-height: 1.6; padding: 10px 0 20px; }
.avk a { color: #d71200; }
.avk-hero { display: grid; grid-template-columns: 340px 1fr; gap: 48px; align-items: center; padding: 20px 0 40px; }
.avk-cover-wrap { position: relative; text-align: center; }
.avk-cover-wrap::before {
    content: ""; position: absolute; inset: -6% -14%; z-index: 0; pointer-events: none;
    background: radial-gradient(ellipse 50% 50% at 50% 55%, rgba(253, 191, 0, .28), rgba(215, 18, 0, .08) 50%, transparent 72%);
}
.avk-cover { position: relative; z-index: 1; width: 100%; height: auto; filter: drop-shadow(0 26px 26px rgba(11, 12, 17, .35)); }
.avk-kicker { font-size: 13px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: #d71200; margin-bottom: 10px; }
.avk-h { font-family: RalewayExtraBold, sans-serif; font-size: 44px; line-height: 1.1; margin: 0 0 14px; color: #0b0c11; }
.avk-lead { font-size: 18px; line-height: 1.55; color: #4c4e50; margin: 0 0 22px; max-width: 620px; }
.avk-facts { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 26px; padding: 0; list-style: none; }
.avk-facts li { margin: 0; padding: 6px 13px; border: 1px solid #e3e6e9; border-radius: 999px; font-size: 14px; color: #26282c; background: #fff; }
.avk-facts li::before { display: none; }
.avk .avk-cta, .avw .avw-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 10px;
    background: linear-gradient(135deg, #d71200, #ef6a12); color: #fff !important; text-decoration: none !important;
    font-weight: 700; border-radius: 30px; transition: transform .15s, filter .15s;
}
.avk .avk-cta { padding: 16px 30px; font-size: 17px; box-shadow: 0 12px 28px rgba(215, 18, 0, .28); }
.avk .avk-cta:hover { transform: translateY(-2px); filter: brightness(1.06); }
.avk-note { margin-top: 12px; font-size: 14px; color: #6b6f76; }
.avk-sec { padding: 36px 0; border-top: 1px solid #e3e6e9; }
.avk-h2 { font-family: RalewayExtraBold, sans-serif; font-size: 28px; margin: 0 0 20px; color: #0b0c11; text-transform: none; }
.avk-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.avk-card { padding: 18px 20px; border-radius: 14px; background: #f6f7f8; border: 1px solid #eceef0; }
.avk-card b { display: block; font-size: 16px; margin-bottom: 6px; color: #0b0c11; }
.avk-card p { margin: 0; font-size: 14.5px; line-height: 1.5; color: #4c4e50; }
.avk-toc { columns: 2; column-gap: 40px; margin: 0; padding: 0; list-style: none; counter-reset: avkch; }
.avk-toc li { break-inside: avoid; margin: 0; padding: 8px 0 8px 38px; position: relative; font-size: 15.5px; border-bottom: 1px dashed #e3e6e9; }
.avk-toc li::before { counter-increment: avkch; content: counter(avkch, decimal-leading-zero); position: absolute; left: 0; top: 8px; color: #d71200; font-weight: 700; font-size: 13.5px; background: none; width: auto; height: auto; }
.avk-p { margin: 0; max-width: 820px; }
.avk-final { text-align: center; padding: 44px 0 20px; border-top: 1px solid #e3e6e9; }
.avk-final .avk-lead { margin-left: auto; margin-right: auto; }

@media (max-width: 860px) {
    .avk-hero { grid-template-columns: 1fr; gap: 14px; padding-top: 0; text-align: center; }
    .avk-cover-wrap { max-width: 190px; margin: 0 auto; }
    .avk-h { font-size: 32px; }
    .avk-lead { font-size: 16px; margin: 0 auto 16px; }
    .avk-facts { justify-content: center; gap: 6px; margin-bottom: 18px; }
    .avk-facts li { font-size: 13px; padding: 5px 10px; }
    .avk .avk-cta { width: 100%; box-sizing: border-box; padding: 15px 18px; }
    .avk-grid { grid-template-columns: 1fr; }
    .avk-toc { columns: 1; }
    .avk-h2 { font-size: 24px; }
}

/* ---------- Плавающая плашка ---------- */
.avw {
    position: fixed; z-index: 990; left: 20px; bottom: 20px;
    width: 340px; max-width: calc(100vw - 24px);   /* правее — всплывашка чата, не перекрываем крестик */
    transform: translateY(24px); opacity: 0;
    transition: transform .35s cubic-bezier(.2,.8,.2,1), opacity .35s;
    font-family: RalewayRegular, sans-serif;
}
.avw.avw-in { transform: none; opacity: 1; }
.avw[hidden], .avw-tab[hidden] { display: none !important; }
.avw-card {
    display: flex; gap: 12px; align-items: center; padding: 12px 16px 12px 10px;
    /* Тёмная карточка на белом сайте — заметна, книга на ней «светится» */
    background: radial-gradient(ellipse 55% 90% at 16% 55%, rgba(253, 191, 0, .22), transparent 70%), linear-gradient(135deg, #16171d, #0b0c11);
    border: 1px solid rgba(253, 191, 0, .35); border-radius: 16px;
    box-shadow: 0 18px 44px rgba(11, 12, 17, .35);
    color: #fff; text-decoration: none !important;
}
.avw-cover { flex: 0 0 82px; width: 82px; height: auto; margin: -12px 0 -12px; filter: drop-shadow(0 8px 10px rgba(0,0,0,.5)); }
.avw-body { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.avw-kicker { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #fdbf00; }
.avw-title { font-family: RalewayExtraBold, sans-serif; font-size: 18px; line-height: 1.2; color: #fff; }
.avw-sub { font-size: 12.5px; line-height: 1.4; color: rgba(255,255,255,.75); }
.avw .avw-btn { margin-top: 6px; padding: 9px 14px; font-size: 14px; white-space: nowrap; align-self: flex-start; }
.avw-card:hover .avw-btn { filter: brightness(1.08); transform: translateY(-1px); }
.avw-close {
    position: absolute; top: -10px; right: -10px; z-index: 1; width: 30px; height: 30px; padding: 0;
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    background: #fff; color: #26282c; border: 1px solid #e3e6e9; cursor: pointer; box-shadow: 0 4px 12px rgba(0,0,0,.18);
}
.avw-tab {
    position: fixed; z-index: 989; left: 0; bottom: 110px;
    display: flex; align-items: center; gap: 8px; padding: 10px 14px 10px 12px;
    background: linear-gradient(135deg, #16171d, #0b0c11); border: 1px solid rgba(253, 191, 0, .45); border-left: 0;
    border-radius: 0 12px 12px 0; color: #fff !important; font-size: 13px; font-weight: 700; text-decoration: none !important;
    box-shadow: 0 8px 22px rgba(11, 12, 17, .3); font-family: RalewayRegular, sans-serif;
}
.avw-tab svg { color: #fdbf00; flex: 0 0 auto; }
@media (max-width: 900px) and (min-width: 641px) { .avw { width: 320px; } .avw-sub { display: none; } }
@media (max-width: 640px) {
    .avw { left: 10px; right: 76px; width: auto; bottom: 12px; }   /* справа — чат и переключатель языка */
    .avw-card { padding: 10px 12px 10px 8px; gap: 10px; }
    .avw-cover { flex-basis: 58px; width: 58px; margin: -8px 0; }
    .avw-title { font-size: 15.5px; }
    .avw-sub { display: none; }
    .avw .avw-btn { font-size: 13px; padding: 8px 12px; }
    .avw-close { top: -9px; left: -6px; right: auto; width: 28px; height: 28px; }   /* справа всплывает приветствие чата */
    .avw-tab { bottom: 84px; font-size: 12.5px; padding: 9px 12px 9px 10px; }
}
@media (prefers-reduced-motion: reduce) { .avw { transition: none; } }
