/* AVE Design Studio — главная «Базы маркетинга» /baza/: пути по задачам, маршрут, подборка, автор, плитки разделов, CTA.
   Разметка — migration/articles/tools/kb_hub.js. Надстройка над blog.css (токены --bl-*) и baza.css. */

/* ---------- шапка ---------- */
.kbh-for { max-width: 720px; margin: 12px 0 0; color: rgba(255, 255, 255, .72); font-size: 15px; line-height: 1.6; }
.kbh-for b { color: #fff; }
.kbh-search { display: flex; gap: 8px; max-width: 640px; margin: 22px 0 0; }
.kbh-search__f { position: relative; flex: 1 1 auto; min-width: 0; margin: 0; }
.kbh-search__f::before { content: ''; position: absolute; left: 17px; top: 50%; width: 15px; height: 15px; margin-top: -9px; border: 2px solid var(--bl-muted); border-radius: 50%; pointer-events: none; }
.kbh-search__f::after { content: ''; position: absolute; left: 30px; top: 50%; width: 7px; height: 2px; margin-top: 5px; background: var(--bl-muted); transform: rotate(45deg); pointer-events: none; }
.kbh-search input { width: 100%; height: 54px; padding: 0 16px 0 46px; border: 0; border-radius: 12px; background: #fff; color: var(--bl-ink); font: 400 16px/1.2 'Open Sans', Arial, sans-serif; box-shadow: 0 14px 34px rgba(0, 0, 0, .25); }
.kbh-search input:focus { outline: 2px solid var(--bl-red); outline-offset: 2px; }
.kbh-search__b { flex: none; height: 54px; padding: 0 26px; border: 0; border-radius: 12px; background: var(--bl-red); color: #fff; font: 700 15px/1 'Open Sans', Arial, sans-serif; cursor: pointer; transition: background-color .15s; }
.kbh-search__b:hover { background: var(--bl-red-dark); }
.kbh-search__b:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.kbh-hints { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin: 12px 0 0; color: rgba(255, 255, 255, .6); font-size: 13px; }
.kbh-hints span { margin-right: 2px; }
.kbh-hints a { padding: 3px 10px; border: 1px solid rgba(255, 255, 255, .22); border-radius: 999px; color: rgba(255, 255, 255, .9); font-weight: 600; text-decoration: none; transition: border-color .15s, background-color .15s; }
.kbh-hints a:hover { border-color: #fff; background: rgba(255, 255, 255, .1); color: #fff; text-decoration: none; }
.kbh-by { display: inline-flex; align-items: center; gap: 10px; margin-top: 22px; padding: 5px 14px 5px 5px; border-radius: 999px; background: rgba(255, 255, 255, .1); color: rgba(255, 255, 255, .8); font-size: 13px; line-height: 1.35; text-decoration: none; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.kbh-by img { flex: none; width: 40px; height: 40px; border-radius: 50%; object-fit: cover; }
.kbh-by b { color: #fff; }
.kbh-by:hover { background: rgba(255, 255, 255, .18); color: #fff; text-decoration: none; }

/* ---------- общие заголовки секций ---------- */
.kbh { padding: 64px 0; }
.kbh + .kbh { padding-top: 0; }
.kbh-h { max-width: 760px; margin-bottom: 26px; }
.kbh-h--row { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 10px 24px; max-width: none; }
.kbh-h__k { margin: 0 0 6px; color: var(--bl-red); font-size: 12px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.kb-main .kbh-h h2 { margin: 0; padding: 0; color: var(--bl-ink); font: 800 32px/1.2 'Open Sans', Arial, sans-serif; letter-spacing: -.02em; text-transform: none; }
.kbh-h__d { margin: 10px 0 0; color: var(--bl-text); font-size: 16px; line-height: 1.6; }
.kbh-more { flex: none; color: var(--bl-red); font-size: 15px; font-weight: 800; text-decoration: none; }
.kbh-more:hover { color: var(--bl-red-dark); text-decoration: none; }

.kbh-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-top: auto; padding-top: 12px; color: var(--bl-muted); font-size: 12px; font-weight: 600; }
.kbh-card__sec { color: var(--bl-red); font-size: 11px; font-weight: 800; letter-spacing: .06em; line-height: 1.3; text-transform: uppercase; }
.kbh img { max-width: none; }

/* ---------- пути по задачам ---------- */
.kbh-paths { padding-top: 56px; }
.kbh-paths__g { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 16px; }
.kbh-path { position: relative; display: flex; grid-column: span 4; min-width: 0; border: 1px solid var(--bl-line); border-radius: var(--bl-radius); background: #fff; overflow: hidden; transition: border-color .2s, box-shadow .25s; }
.kbh-path:hover { border-color: rgba(200, 0, 0, .3); box-shadow: 0 18px 40px rgba(23, 24, 29, .08); }
.kbh-path__b { display: flex; flex: 1; flex-direction: column; min-width: 0; padding: 22px 24px 22px; }
.kbh-path__n { display: flex; align-items: center; gap: 10px; margin: 0 0 10px; color: var(--bl-muted); font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.kbh-path__i { display: inline-flex; align-items: center; justify-content: center; min-width: 30px; height: 30px; padding: 0 6px; border-radius: 9px; background: #fff0f0; color: var(--bl-red); font-size: 13px; font-weight: 800; letter-spacing: 0; }
.kb-main .kbh-path__t { margin: 0 0 8px; padding: 0; font: 800 21px/1.25 'Open Sans', Arial, sans-serif; letter-spacing: -.012em; text-transform: none; }
.kbh-path__t a { color: var(--bl-ink); text-decoration: none; }
.kbh-path__t a::after { content: ''; position: absolute; inset: 0; z-index: 0; }
.kbh-path__t a:hover { color: var(--bl-red); text-decoration: none; }
.kbh-path__d { margin: 0 0 14px; color: var(--bl-text); font-size: 14px; line-height: 1.55; }
.kbh-path__l { position: relative; z-index: 1; margin: 0 0 14px; padding: 0; list-style: none; counter-reset: kbhp; }
.kbh-path__l li { position: relative; margin: 0 0 8px; padding-left: 26px; font-size: 14px; line-height: 1.45; counter-increment: kbhp; }
.kbh-path__l li::before { content: counter(kbhp); position: absolute; left: 0; top: 1px; width: 18px; height: 18px; border-radius: 50%; background: var(--bl-soft); color: var(--bl-ink); font-size: 11px; font-weight: 800; line-height: 18px; text-align: center; }
.kbh-path__l a { color: var(--bl-text); text-decoration: none; }
.kbh-path__l a:hover { color: var(--bl-red); text-decoration: underline; }
.kbh-path__go { position: relative; z-index: 1; margin-top: auto; color: var(--bl-red); font-size: 14px; font-weight: 800; text-decoration: none; }
.kbh-path__go:hover { color: var(--bl-red-dark); text-decoration: none; }
.kbh-path__gs { display: none; }

/* крупная карточка с фото во всю площадь */
.kbh-path--xl { grid-column: span 6; grid-row: span 2; min-height: 460px; border: 0; background: var(--bl-ink); }
.kbh-path--m { grid-column: span 3; }
.kbh-path--wide { grid-column: span 6; border: 0; background: var(--bl-ink); }
.kbh-path__img { position: absolute; inset: 0; display: block; background: linear-gradient(135deg, #1d1e25, #6d0b12); }
.kbh-path__img img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .7s cubic-bezier(.2, .7, .2, 1); }
.kbh-path.has-img:hover .kbh-path__img img { transform: scale(1.04); }
.kbh-path__img::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(14, 15, 19, .15) 0%, rgba(14, 15, 19, .55) 45%, rgba(14, 15, 19, .92) 100%); }
.kbh-path--xl .kbh-path__b { position: relative; justify-content: flex-end; padding: 30px 32px; }
.kbh-path--xl .kbh-path__t { font-size: 30px; line-height: 1.18; letter-spacing: -.02em; }
.kbh-path--wide .kbh-path__img { left: auto; width: 38%; }
.kbh-path--wide .kbh-path__img::after { background: linear-gradient(90deg, var(--bl-ink) 0%, rgba(23, 24, 29, .35) 40%, rgba(23, 24, 29, 0) 100%); }
.kbh-path--wide .kbh-path__b { position: relative; max-width: 68%; }
.kbh-path.has-img .kbh-path__n { color: rgba(255, 255, 255, .7); }
.kbh-path.has-img .kbh-path__i { background: var(--bl-red); color: #fff; }
.kbh-path.has-img .kbh-path__t a { color: #fff; }
.kbh-path.has-img .kbh-path__t a:hover { color: #ffc9c9; }
.kbh-path.has-img .kbh-path__d { color: rgba(255, 255, 255, .78); }
.kbh-path.has-img .kbh-path__l li::before { background: rgba(255, 255, 255, .16); color: #fff; }
.kbh-path.has-img .kbh-path__l a { color: rgba(255, 255, 255, .9); }
.kbh-path.has-img .kbh-path__l a:hover { color: #fff; }
.kbh-path.has-img .kbh-path__go { color: #ff8a8a; }
.kbh-path.has-img .kbh-path__go:hover { color: #fff; }
.kbh-path--s { background: var(--bl-soft); border-color: transparent; }

/* ---------- маршрут из 10 шагов: горизонтальная лента ---------- */
.kbh-route { padding: 56px 0; background: var(--bl-soft); }
.kbh + .kbh-route { padding-top: 56px; }
.kbh-route__l { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(212px, 1fr); gap: 12px; margin: 0; padding: 4px 2px 14px; list-style: none; overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain; scrollbar-width: thin; }
@media (min-width: 1200px) { .kbh-route__l { grid-auto-flow: row; grid-template-columns: repeat(5, minmax(0, 1fr)); overflow: visible; } }
.kbh-route__l li { display: flex; scroll-snap-align: start; }
.kbh-route__l a { position: relative; display: flex; flex-direction: column; gap: 10px; width: 100%; min-height: 196px; padding: 18px 18px 16px; border: 1px solid var(--bl-line); border-radius: var(--bl-radius); background: #fff; color: var(--bl-ink); text-decoration: none; transition: border-color .2s, transform .25s, box-shadow .25s; }
.kbh-route__l a:hover { border-color: rgba(200, 0, 0, .35); box-shadow: 0 14px 30px rgba(23, 24, 29, .08); color: var(--bl-ink); text-decoration: none; transform: translateY(-2px); }
.kbh-route__l a::after { content: ''; position: absolute; left: 18px; right: 18px; top: 0; height: 3px; border-radius: 0 0 3px 3px; background: var(--bl-red); opacity: .18; transition: opacity .2s; }
.kbh-route__l a:hover::after { opacity: 1; }
.kbh-route__n { color: var(--bl-red); font-size: 34px; font-weight: 800; line-height: 1; letter-spacing: -.03em; }
.kbh-route__l b { font-size: 15px; font-weight: 800; line-height: 1.38; }
.kbh-route__m { margin-top: auto; color: var(--bl-muted); font-size: 12px; font-weight: 600; }

/* ---------- подборка «Начните с главного» ---------- */
.kbh-best { padding-top: 64px; }
.kbh-bento { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); grid-template-areas:
    "f f f f f f f q q q q q"
    "f f f f f f f s s s s s"
    "t t t t m m m m p p p p"
    "t t t t n n n n p p p p"
    "w w w w w w w w w w w w"; gap: 16px; }
.kbh-bento a { text-decoration: none; }
.kbh-feat { grid-area: f; display: flex; flex-direction: column; border-radius: var(--bl-radius); background: #fff; border: 1px solid var(--bl-line); overflow: hidden; color: var(--bl-text); transition: border-color .2s, box-shadow .25s; }
.kbh-feat:hover { border-color: rgba(200, 0, 0, .3); box-shadow: 0 20px 44px rgba(23, 24, 29, .1); color: var(--bl-text); }
.kbh-feat__img { position: relative; display: block; aspect-ratio: 16 / 9; background: linear-gradient(135deg, #1d1e25, #6d0b12); overflow: hidden; }
.kbh-feat__img img, .kbh-card__img img, .kbh-wide__img img, .kbh-me img { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .7s cubic-bezier(.2, .7, .2, 1); }
.kbh-feat:hover .kbh-feat__img img, .kbh-card:hover .kbh-card__img img, .kbh-wide:hover .kbh-wide__img img { transform: scale(1.04); }
.kbh-feat__b { display: flex; flex: 1; flex-direction: column; gap: 10px; padding: 24px 28px 22px; }
.kbh-feat__t { color: var(--bl-ink); font-size: 26px; font-weight: 800; line-height: 1.25; letter-spacing: -.015em; }
.kbh-feat:hover .kbh-feat__t { color: var(--bl-red); }
.kbh-feat__x { font-size: 15px; line-height: 1.65; }
.kbh-feat__x i { color: var(--bl-ink); font-style: normal; font-weight: 800; }

.kbh-quote { grid-area: q; display: flex; flex-direction: column; justify-content: space-between; gap: 18px; margin: 0; padding: 28px 28px 24px; border-radius: var(--bl-radius); background: var(--bl-red); color: #fff; }
.kbh-quote blockquote { position: relative; margin: 0; padding: 0; border: 0; }
.kbh-quote blockquote::before { content: '\201C'; display: block; height: 38px; margin-bottom: 4px; color: rgba(255, 255, 255, .45); font: 800 72px/1 Georgia, 'Times New Roman', serif; }
.kbh-quote blockquote p { margin: 0; color: #fff; font-size: 24px; font-weight: 800; line-height: 1.3; letter-spacing: -.012em; }
.kbh-quote figcaption { color: rgba(255, 255, 255, .78); font-size: 13px; line-height: 1.5; }
.kbh-quote figcaption a { color: #fff; font-weight: 700; text-decoration: underline; text-decoration-color: rgba(255, 255, 255, .45); text-underline-offset: 3px; }
.kbh-quote figcaption a:hover { color: #fff; text-decoration-color: #fff; }
.kbh-quote__by { display: flex; align-items: center; gap: 10px; margin: 0; color: #fff; font-size: 12px; font-weight: 800; line-height: 1.3; letter-spacing: .08em; text-transform: uppercase; }
.kbh-quote__by img { flex: none; width: 36px; height: 36px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 2px rgba(255, 255, 255, .55); }

.kbh-note { display: flex; flex-direction: column; gap: 8px; padding: 22px 24px 18px; border: 1px solid var(--bl-line); border-radius: var(--bl-radius); background: var(--bl-soft); color: var(--bl-text); transition: border-color .2s, background-color .2s; }
.kbh-note--a { grid-area: s; }
.kbh-note--b { grid-area: n; }
.kbh-note:hover { border-color: rgba(200, 0, 0, .3); background: #fff; color: var(--bl-text); }
.kbh-note__k { align-self: flex-start; padding: 3px 10px; border-radius: 999px; background: var(--bl-ink); color: #fff; font-size: 11px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; }
.kbh-note__t { color: var(--bl-ink); font-size: 18px; font-weight: 800; line-height: 1.33; }
.kbh-note:hover .kbh-note__t { color: var(--bl-red); }
.kbh-note__x { font-size: 14px; line-height: 1.6; }

.kbh-card { position: relative; display: flex; flex-direction: column; justify-content: flex-end; min-height: 260px; border-radius: var(--bl-radius); background: var(--bl-ink); overflow: hidden; color: #fff; }
.kbh-card--tall { grid-area: t; aspect-ratio: 4 / 5; }
.kbh-card--sq { grid-area: m; }
.kbh-card__img { position: absolute; inset: 0; display: block; background: linear-gradient(135deg, #1d1e25, #6d0b12); }
.kbh-card__img::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(14, 15, 19, 0) 30%, rgba(14, 15, 19, .88) 100%); }
.kbh-card__b { position: relative; display: flex; flex-direction: column; gap: 8px; padding: 22px 22px 18px; }
.kbh-card .kbh-card__sec { color: #ff8a8a; }
.kbh-card__t { color: #fff; font-size: 19px; font-weight: 800; line-height: 1.3; }
.kbh-card--tall .kbh-card__t { font-size: 22px; }
.kbh-card .kbh-meta { padding-top: 4px; color: rgba(255, 255, 255, .72); }
.kbh-card:hover { color: #fff; }
.kbh-card:hover .kbh-card__t { color: #ffd6d6; }

.kbh-me { grid-area: p; position: relative; display: flex; flex-direction: column; justify-content: flex-end; min-height: 380px; border-radius: var(--bl-radius); background: #111; overflow: hidden; color: #fff; }
.kbh-me img { object-position: 50% 20%; }
.kbh-me::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0, 0, 0, 0) 45%, rgba(0, 0, 0, .82) 100%); }
.kbh-me__b { position: relative; z-index: 1; display: flex; flex-direction: column; gap: 4px; padding: 22px; font-size: 14px; line-height: 1.5; color: rgba(255, 255, 255, .8); }
.kbh-me__k { align-self: flex-start; margin-bottom: 6px; padding: 3px 10px; border-radius: 999px; background: var(--bl-red); color: #fff; font-size: 11px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; }
.kbh-me__b b { color: #fff; font-size: 20px; font-weight: 800; line-height: 1.25; }
.kbh-me:hover { color: #fff; }
.kbh-me:hover .kbh-me__b b { text-decoration: underline; text-underline-offset: 4px; }

.kbh-wide { grid-area: w; display: flex; min-height: 240px; border: 1px solid var(--bl-line); border-radius: var(--bl-radius); background: #fff; overflow: hidden; color: var(--bl-text); transition: border-color .2s, box-shadow .25s; }
.kbh-wide:hover { border-color: rgba(200, 0, 0, .3); box-shadow: 0 18px 40px rgba(23, 24, 29, .08); color: var(--bl-text); }
.kbh-wide__img { position: relative; flex: 0 0 42%; background: linear-gradient(135deg, #1d1e25, #6d0b12); overflow: hidden; }
.kbh-wide__b { display: flex; flex: 1; flex-direction: column; justify-content: center; gap: 10px; min-width: 0; padding: 28px 34px; }
.kbh-wide__t { color: var(--bl-ink); font-size: 22px; font-weight: 800; line-height: 1.3; letter-spacing: -.01em; }
.kbh-wide:hover .kbh-wide__t { color: var(--bl-red); }
.kbh-wide__q { padding-left: 16px; border-left: 3px solid var(--bl-red); color: var(--bl-ink); font-size: 17px; font-style: italic; font-weight: 600; line-height: 1.5; }

/* ---------- автор ---------- */
.kbh-author { padding: 72px 0; background: var(--bl-ink); color: rgba(255, 255, 255, .78); }
.kbh + .kbh-author { padding-top: 72px; }
.kbh-author__g { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 56px; align-items: center; }
.kbh-author__ph { position: relative; padding: 0 64px 56px 0; }
.kbh-author__ph figure { margin: 0; }
.kbh-author__main { position: relative; aspect-ratio: 4 / 5; border-radius: 18px; background: #000; overflow: hidden; box-shadow: 0 30px 60px rgba(0, 0, 0, .35); }
.kbh-author__main img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 25%; }
.kbh-author__stage { position: absolute; right: 0; bottom: 0; width: 46%; padding: 6px; border-radius: 16px; background: #fff; box-shadow: 0 24px 50px rgba(0, 0, 0, .4); transform: rotate(3deg); }
.kbh-author__stage img { display: block; width: 100%; height: auto; aspect-ratio: 3 / 4; border-radius: 11px; object-fit: cover; }
.kbh-author__stage figcaption { padding: 7px 4px 2px; color: var(--bl-ink); font-size: 12px; font-weight: 700; line-height: 1.35; }
.kbh-author .kbh-h__k { color: #ff8a8a; }
.kb-main .kbh-author h2 { margin: 0; padding: 0; color: #fff; font: 800 40px/1.12 'Open Sans', Arial, sans-serif; letter-spacing: -.025em; text-transform: none; }
.kbh-author__r { margin: 8px 0 0; color: rgba(255, 255, 255, .62); font-size: 15px; font-weight: 600; }
.kbh-author__op { max-width: 620px; margin: 16px 0 0; padding-left: 14px; border-left: 3px solid var(--bl-red); color: #fff; font-size: 17px; font-weight: 700; line-height: 1.5; }
.kbh-author__lead { max-width: 620px; margin: 18px 0 0; color: rgba(255, 255, 255, .86); font-size: 17px; line-height: 1.65; }
.kbh-author__f { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 26px 0 0; padding: 0; list-style: none; }
.kbh-author__f li { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; border: 1px solid rgba(255, 255, 255, .12); border-radius: 12px; background: rgba(255, 255, 255, .04); font-size: 13px; line-height: 1.5; }
.kbh-author__f b { color: #fff; font-size: 14px; font-weight: 800; }
.kbh-author__n { display: flex; flex-wrap: wrap; gap: 10px 36px; margin: 26px 0 0; padding: 0; list-style: none; }
.kbh-author__n li { display: flex; flex-direction: column; font-size: 13px; line-height: 1.35; }
.kbh-author__n b { color: #fff; font-size: 34px; font-weight: 800; line-height: 1.1; letter-spacing: -.02em; }
.kbh-author__l { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 22px; margin: 28px 0 0; }
.kbh-link { color: #fff; font-size: 15px; font-weight: 700; text-decoration: underline; text-decoration-color: rgba(255, 255, 255, .35); text-underline-offset: 4px; }
.kbh-link:hover { color: #fff; text-decoration-color: #fff; }

/* ---------- плитки разделов ---------- */
.kbh-zones { padding-top: 72px; }
.kbh-zones__g { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 16px; }
.kbh-zone { position: relative; display: flex; grid-column: span 4; min-width: 0; min-height: 300px; border: 1px solid var(--bl-line); border-radius: var(--bl-radius); background: #fff; overflow: hidden; }
.kbh-zone--l { grid-column: span 6; min-height: 380px; }
.kbh-zone--w { grid-column: span 8; }
.kbh-zone--s { min-height: 0; background: var(--bl-soft); border-color: transparent; }
.kbh-zone.has-img { border: 0; background: var(--bl-ink); color: #fff; }
.kbh-zone__img { position: absolute; inset: 0; display: block; background: linear-gradient(135deg, #1d1e25, #6d0b12); }
.kbh-zone__img img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .7s cubic-bezier(.2, .7, .2, 1); }
.kbh-zone.has-img:hover .kbh-zone__img img { transform: scale(1.04); }
.kbh-zone__img::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(14, 15, 19, .2) 0%, rgba(14, 15, 19, .6) 45%, rgba(14, 15, 19, .93) 100%); }
.kbh-zone__b { position: relative; display: flex; flex: 1; flex-direction: column; justify-content: flex-end; min-width: 0; padding: 24px 24px 22px; }
.kbh-zone__n { margin: 0 0 6px; color: var(--bl-red); font-size: 12px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; }
.kbh-zone.has-img .kbh-zone__n { color: #ff8a8a; }
.kb-main .kbh-zone__t { margin: 0 0 6px; padding: 0; font: 800 24px/1.2 'Open Sans', Arial, sans-serif; letter-spacing: -.015em; text-transform: none; }
.kbh-zone--l .kbh-zone__t { font-size: 30px; }
.kbh-zone__t a { color: var(--bl-ink); text-decoration: none; }
.kbh-zone.has-img .kbh-zone__t a { color: #fff; }
.kbh-zone__t a::after { content: ''; position: absolute; inset: 0; }
.kbh-zone__t a:hover { color: var(--bl-red); text-decoration: none; }
.kbh-zone.has-img .kbh-zone__t a:hover { color: #ffd6d6; }
.kbh-zone__d { margin: 0 0 14px; color: var(--bl-text); font-size: 14px; line-height: 1.55; }
.kbh-zone.has-img .kbh-zone__d { color: rgba(255, 255, 255, .8); }
.kbh-zone__l { position: relative; z-index: 1; display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.kbh-zone__l a { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border: 1px solid var(--bl-line); border-radius: 999px; background: #fff; color: var(--bl-ink); font-size: 13px; font-weight: 600; line-height: 1.35; text-decoration: none; transition: border-color .15s, background-color .15s; }
.kbh-zone__l a span { color: var(--bl-muted); font-size: 12px; font-weight: 700; }
.kbh-zone__l a:hover { border-color: rgba(200, 0, 0, .45); color: var(--bl-red); text-decoration: none; }
.kbh-zone.has-img .kbh-zone__l a { border-color: rgba(255, 255, 255, .24); background: rgba(255, 255, 255, .08); color: #fff; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.kbh-zone.has-img .kbh-zone__l a span { color: rgba(255, 255, 255, .65); }
.kbh-zone.has-img .kbh-zone__l a:hover { border-color: #fff; background: rgba(255, 255, 255, .18); color: #fff; }
.kbh-quote--zone { grid-area: auto; grid-column: span 8; justify-content: center; background: var(--bl-ink); }
.kbh-quote--zone blockquote::before { color: var(--bl-red); }
.kbh-quote--zone blockquote p { font-size: 28px; }

/* ---------- каталог: заголовок и ритм карточек разделов ---------- */
.kbh-cat-h { margin-bottom: 22px; }
/* первая карточка блока — широкая, если остальные ровно заполняют ряды (2 колонки до 1440, 3 — шире) */
@media (min-width: 1200px) and (max-width: 1439px) {
    .kb-page:not(.kb-page--sec) .kb-secs > .kb-sec:first-child:nth-last-child(2n+1) { grid-column: 1 / -1; flex-direction: row; }
    .kb-page:not(.kb-page--sec) .kb-secs > .kb-sec:first-child:nth-last-child(2n+1) .kb-sec__img { flex: 0 0 42%; aspect-ratio: auto; min-height: 260px; }
    .kb-page:not(.kb-page--sec) .kb-secs > .kb-sec:first-child:nth-last-child(2n+1) .kb-sec__b { padding: 24px 28px; }
}
@media (min-width: 1440px) {
    .kb-page:not(.kb-page--sec) .kb-secs > .kb-sec:first-child:nth-last-child(3n+1) { grid-column: 1 / -1; flex-direction: row; }
    .kb-page:not(.kb-page--sec) .kb-secs > .kb-sec:first-child:nth-last-child(3n+1) .kb-sec__img { flex: 0 0 42%; aspect-ratio: auto; min-height: 260px; }
    .kb-page:not(.kb-page--sec) .kb-secs > .kb-sec:first-child:nth-last-child(3n+1) .kb-sec__b { padding: 24px 28px; }
}

/* ---------- CTA с фото ---------- */
.kbh-cta { display: grid; grid-template-columns: 220px minmax(0, 1fr) auto; align-items: center; gap: 22px 36px; padding: 0 36px 0 0; border-radius: var(--bl-radius); background: var(--bl-ink); color: #fff; overflow: hidden; }
.kbh-cta__ph { position: relative; align-self: stretch; margin: 0; min-height: 250px; background: #000; }
.kbh-cta__ph img { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 22%; }
.kbh-cta__ph::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0, 0, 0, 0) 55%, rgba(0, 0, 0, .8) 100%); }
.kbh-cta__ph figcaption { position: absolute; z-index: 1; left: 14px; right: 10px; bottom: 12px; display: flex; flex-direction: column; color: rgba(255, 255, 255, .75); font-size: 11px; line-height: 1.35; }
.kbh-cta__ph figcaption b { color: #fff; font-size: 13px; }
.kbh-cta__t { padding: 28px 0; }
.kbh-cta__t b { display: block; margin-bottom: 8px; font-size: 24px; font-weight: 800; line-height: 1.25; letter-spacing: -.01em; }
.kbh-cta__t p { margin: 0; color: rgba(255, 255, 255, .74); font-size: 15px; line-height: 1.6; }
.kbh-cta__b { display: flex; flex-direction: column; align-items: stretch; gap: 10px; text-align: center; }
.kbh-cta__tel { color: rgba(255, 255, 255, .86); font-size: 14px; font-weight: 600; text-decoration: none; }
.kbh-cta__tel:hover { color: #fff; text-decoration: underline; }

.kbh a:focus-visible, .kbh-cta a:focus-visible, .kbh-by:focus-visible, .kbh-hints a:focus-visible { outline: 2px solid var(--bl-red); outline-offset: 3px; }

/* ---------- планшет ---------- */
@media (max-width: 1199px) {
    .kbh-path--xl { grid-column: span 12; grid-row: auto; min-height: 420px; }
    .kbh-path--m { grid-column: span 6; }
    .kbh-path--wide { grid-column: span 12; }
    .kbh-path--s { grid-column: span 4; }
    .kbh-bento { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-areas: "f f" "q s" "t p" "m n" "w w"; }
    .kbh-card--tall { aspect-ratio: auto; min-height: 420px; }
    .kbh-me { min-height: 420px; }
    .kbh-author__g { gap: 40px; }
    .kbh-author__ph { padding: 0 44px 44px 0; }
    .kb-main .kbh-author h2 { font-size: 34px; }
    .kbh-author__f { grid-template-columns: 1fr; }
    .kbh-zone, .kbh-zone--l { grid-column: span 6; }
    .kbh-zone--w, .kbh-quote--zone { grid-column: span 12; }
    .kbh-zone--s { grid-column: span 6; }
}
@media (max-width: 991px) {
    .kbh { padding: 48px 0; }
    .kb-main .kbh-h h2 { font-size: 27px; }
    .kbh-path--s { grid-column: span 12; }
    .kbh-author__g { grid-template-columns: 1fr; }
    .kbh-author__ph { max-width: 440px; }
    .kbh-author__f { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .kbh-cta { grid-template-columns: 180px minmax(0, 1fr); padding-right: 28px; }
    .kbh-cta__b { grid-column: 2; padding-bottom: 26px; flex-direction: row; flex-wrap: wrap; align-items: center; }
    .kbh-cta__t { padding-bottom: 0; }
}

/* ---------- телефон ---------- */
@media (max-width: 767px) {
    .kbh-for { font-size: 14px; }
    .kbh-search { margin-top: 18px; }
    .kbh-search input, .kbh-search__b { height: 50px; }
    .kbh-search__b { padding: 0 18px; }
    .kbh-hints { flex-wrap: nowrap; margin-right: -15px; padding-right: 15px; overflow-x: auto; scrollbar-width: none; }
    .kbh-hints::-webkit-scrollbar { display: none; }
    .kbh-hints span, .kbh-hints a { flex: none; }
    .kbh-by { margin-top: 18px; padding: 6px 18px 6px 6px; border-radius: 30px; font-size: 14px; }
    .kbh-by__d { display: none; }
    .kbh-by__s { display: block; margin-top: 2px; color: rgba(255, 255, 255, .62); font-size: 12px; line-height: 1.35; }

    .kbh { padding: 40px 0; }
    .kbh-paths { padding-top: 36px; }
    .kb-main .kbh-h h2 { font-size: 24px; }
    .kbh-h { margin-bottom: 18px; }
    .kbh-h__d { font-size: 15px; }
    .kbh-paths__g, .kbh-zones__g { gap: 12px; }
    .kbh-path, .kbh-path--m, .kbh-path--s, .kbh-path--wide, .kbh-path--xl { grid-column: span 12; }
    .kbh-path--xl { min-height: 0; }
    .kbh-path--xl .kbh-path__img { position: relative; inset: auto; display: block; aspect-ratio: 16 / 10; }
    .kbh-path--xl .kbh-path__img::after { background: linear-gradient(180deg, rgba(14, 15, 19, 0) 50%, var(--bl-ink) 100%); }
    .kbh-path--xl { flex-direction: column; }
    .kbh-path--xl .kbh-path__b { padding: 4px 20px 22px; }
    .kbh-path--xl .kbh-path__t { font-size: 24px; }
    .kbh-path--wide .kbh-path__img { display: none; }
    .kbh-path--wide .kbh-path__b { max-width: none; }
    .kbh-path__b { padding: 18px 20px 18px; }
    .kb-main .kbh-path__t { font-size: 19px; }
    /* остальные задачи — компактные плитки по две в ряд: номер, число материалов, задача */
    .kbh-path--m, .kbh-path--s, .kbh-path--wide { grid-column: span 6; }
    .kbh-path:not(.kbh-path--xl) .kbh-path__d, .kbh-path:not(.kbh-path--xl) .kbh-path__l { display: none; }
    .kbh-path:not(.kbh-path--xl) .kbh-path__b { padding: 14px 14px 14px; }
    .kbh-path:not(.kbh-path--xl) .kbh-path__n { flex-wrap: wrap; gap: 6px 8px; font-size: 11px; }
    .kb-main .kbh-path:not(.kbh-path--xl) .kbh-path__t { margin-bottom: 12px; font-size: 16px; line-height: 1.3; }
    .kbh-path:not(.kbh-path--xl) .kbh-path__go { font-size: 13px; }
    .kbh-path:not(.kbh-path--xl) .kbh-path__gl { display: none; }
    .kbh-path:not(.kbh-path--xl) .kbh-path__gs { display: inline; }

    .kbh-route { padding: 40px 0; }
    .kbh + .kbh-route { padding-top: 40px; }
    .kbh-route__l { grid-auto-columns: 74%; margin-right: -15px; padding-right: 15px; scroll-padding-left: 2px; }
    .kbh-route__l a { min-height: 168px; }

    .kbh-bento { grid-template-columns: 1fr; grid-template-areas: "f" "q" "s" "t" "m" "n" "p" "w"; gap: 12px; }
    .kbh-feat__b { padding: 18px 20px; }
    .kbh-feat__t { font-size: 21px; }
    .kbh-feat__x { font-size: 14px; }
    .kbh-quote { padding: 22px 20px 20px; }
    .kbh-quote blockquote p, .kbh-quote--zone blockquote p { font-size: 21px; }
    .kbh-card--tall { min-height: 0; aspect-ratio: 1 / 1; }
    .kbh-card--sq { min-height: 0; aspect-ratio: 16 / 11; }
    .kbh-me { min-height: 0; aspect-ratio: 4 / 5; }
    .kbh-wide { flex-direction: column; }
    .kbh-wide__img { flex: none; aspect-ratio: 16 / 9; }
    .kbh-wide__b { padding: 18px 20px 20px; }
    .kbh-wide__t { font-size: 19px; }
    .kbh-wide__q { font-size: 15px; }

    .kbh-author { padding: 48px 0; }
    .kbh + .kbh-author { padding-top: 48px; }
    .kbh-author__g { gap: 30px; }
    .kbh-author__ph { max-width: 340px; padding: 0 40px 36px 0; }
    .kb-main .kbh-author h2 { font-size: 30px; }
    .kbh-author__lead { font-size: 15px; }
    .kbh-author__f { grid-template-columns: 1fr; gap: 8px; }
    .kbh-author__f li { padding: 12px 14px; }
    .kbh-author__n { gap: 10px 24px; }
    .kbh-author__n b { font-size: 26px; }

    .kbh-zones { padding-top: 48px; }
    .kbh-zone, .kbh-zone--l, .kbh-zone--w, .kbh-zone--s, .kbh-quote--zone { grid-column: span 12; min-height: 0; }
    .kbh-zone.has-img { min-height: 260px; }
    .kbh-zone__b { padding: 20px; }
    .kb-main .kbh-zone__t, .kbh-zone--l .kbh-zone__t { font-size: 22px; }

    .kbh-cta { grid-template-columns: 1fr; gap: 0; padding: 0; }
    .kbh-cta__ph { min-height: 0; height: 220px; }
    .kbh-cta__ph img { object-position: 50% 18%; }
    .kbh-cta__t { padding: 20px 20px 14px; }
    .kbh-cta__t b { font-size: 20px; }
    .kbh-cta__b { grid-column: auto; padding: 0 20px 22px; flex-direction: column; align-items: stretch; }
}

@media (prefers-reduced-motion: reduce) {
    .kbh-path__img img, .kbh-feat__img img, .kbh-card__img img, .kbh-wide__img img, .kbh-zone__img img, .kbh-route__l a { transition: none; }
    .kbh-path.has-img:hover .kbh-path__img img, .kbh-feat:hover .kbh-feat__img img, .kbh-card:hover .kbh-card__img img, .kbh-wide:hover .kbh-wide__img img, .kbh-zone.has-img:hover .kbh-zone__img img, .kbh-route__l a:hover { transform: none; }
}
