/* ============================================================
   Celena Handbook — docs.css  (prefix: hb-)
   Раздел документации /docs. Светлый премиум-стиль лендинга
   celena-agency (использует его CSS-переменные: --blue, --ink,
   --body, --muted, --line, --soft). Подключается после landing.css.
   ============================================================ */

.hb {
  font-family: var(--ffb, 'Inter', system-ui, sans-serif);
  color: var(--body, #42536a);
  background: #fff;
  padding-top: 78px;           /* высота фикс-навигации .cz-nav */
  min-height: 100vh;
  line-height: 1.65;
  font-size: 16px;
}
.hb *, .hb *::before, .hb *::after { box-sizing: border-box; }
.hb-wrap { max-width: 1240px; margin: 0 auto; padding: 0 32px; }

/* ───── breadcrumbs ───── */
.hb-crumbs {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  font-size: 13.5px; color: var(--muted, #5c6a7d);
  padding: 22px 0 10px;
}
.hb-crumbs a { color: var(--muted, #5c6a7d); }
.hb-crumbs a:hover { color: var(--blue, #1797F0); }
.hb-crumbs__sep { opacity: .5; }
.hb-crumbs__cur { color: var(--ink, #0b1320); font-weight: 600; }

/* ───── layout: sidebar | content | toc ───── */
.hb-layout {
  display: grid;
  grid-template-columns: 252px minmax(0, 1fr) 210px;
  gap: 44px;
  align-items: start;
  padding-bottom: 80px;
}

/* ───── left sidebar ───── */
.hb-side {
  position: sticky; top: 96px;
  max-height: calc(100vh - 120px);
  overflow-y: auto;
  padding-right: 6px;
}
.hb-side__head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; margin-bottom: 14px;
}
.hb-side__title {
  font-family: var(--ffh, 'Sora', 'Inter', sans-serif);
  font-weight: 700; font-size: 13px; letter-spacing: .04em;
  text-transform: uppercase; color: var(--ink, #0b1320);
}
.hb-langs { display: inline-flex; gap: 4px; }
.hb-langs a {
  font-size: 11.5px; font-weight: 700; text-transform: uppercase;
  color: var(--muted, #5c6a7d); padding: 3px 7px; border-radius: 7px;
  border: 1px solid var(--line, #e9eef5);
}
.hb-langs a:hover { color: var(--blue, #1797F0); border-color: var(--blue, #1797F0); }
.hb-langs a.is-active { background: var(--ink, #0b1320); color: #fff; border-color: var(--ink, #0b1320); }

.hb-nav__group { margin-bottom: 22px; }
.hb-nav__gtitle {
  display: flex; align-items: center; gap: 8px;
  font-family: var(--ffh, 'Sora', sans-serif);
  font-weight: 700; font-size: 14px; color: var(--ink, #0b1320);
  margin-bottom: 8px;
}
.hb-nav__gtitle .cz-ic { width: 17px; height: 17px; color: var(--blue, #1797F0); }
.hb-nav ul { list-style: none; margin: 0; padding: 0 0 0 4px; border-left: 1px solid var(--line, #e9eef5); }
.hb-nav__link {
  display: block; padding: 6px 12px; font-size: 14.5px;
  color: var(--body, #42536a); border-left: 2px solid transparent; margin-left: -1px;
  border-radius: 0 6px 6px 0;
}
.hb-nav__link:hover { color: var(--blue, #1797F0); background: var(--soft, #f4f9ff); }
.hb-nav__link.is-active {
  color: var(--blue, #1797F0); font-weight: 600;
  border-left-color: var(--blue, #1797F0); background: var(--soft, #f4f9ff);
}

/* ───── main content ───── */
.hb-main { min-width: 0; }
.hb-note {
  display: flex; align-items: center; gap: 8px;
  background: #fff7e6; border: 1px solid #ffe2a8; color: #8a5a00;
  padding: 10px 14px; border-radius: 12px; font-size: 14px; margin-bottom: 22px;
}
.hb-note .cz-ic { width: 18px; height: 18px; flex: none; }

.hb-article { font-size: 16px; color: var(--body, #42536a); }
.hb-article h1 {
  font-family: var(--ffh, 'Sora', sans-serif); color: var(--ink, #0b1320);
  font-size: 34px; line-height: 1.15; letter-spacing: -.02em; margin: 0 0 22px;
}
.hb-article h2 {
  font-family: var(--ffh, 'Sora', sans-serif); color: var(--ink, #0b1320);
  font-size: 24px; margin: 38px 0 14px; padding-top: 8px; scroll-margin-top: 96px;
}
.hb-article h3 {
  font-family: var(--ffh, 'Sora', sans-serif); color: var(--ink, #0b1320);
  font-size: 18.5px; margin: 26px 0 10px; scroll-margin-top: 96px;
}
.hb-article h4 { color: var(--ink, #0b1320); font-size: 16px; margin: 20px 0 8px; }
.hb-article p { margin: 0 0 14px; }
.hb-article a { color: var(--blue, #1797F0); text-decoration: none; }
.hb-article a:hover { text-decoration: underline; }
.hb-article ul, .hb-article ol { margin: 0 0 16px; padding-left: 24px; }
.hb-article li { margin: 5px 0; }
.hb-article li > ul, .hb-article li > ol { margin: 5px 0; }
.hb-article img { max-width: 100%; border-radius: 12px; border: 1px solid var(--line, #e9eef5); }
.hb-article hr { border: 0; border-top: 1px solid var(--line, #e9eef5); margin: 32px 0; }
.hb-article strong { color: var(--ink, #0b1320); }

.hb-article blockquote {
  margin: 0 0 16px; padding: 12px 18px; border-left: 3px solid var(--blue, #1797F0);
  background: var(--soft, #f4f9ff); border-radius: 0 10px 10px 0; color: var(--body, #42536a);
}

/* inline + block code */
.hb-article code {
  font-family: ui-monospace, 'SFMono-Regular', 'Menlo', monospace;
  font-size: 13.5px; background: var(--soft, #f4f9ff); color: #0b3a5e;
  padding: 2px 6px; border-radius: 6px; border: 1px solid var(--line, #e9eef5);
}
.hb-article pre {
  background: #0b1320; color: #e7edf6; border-radius: 14px;
  padding: 18px 20px; overflow-x: auto; margin: 0 0 18px; font-size: 13.5px; line-height: 1.6;
}
.hb-article pre code { background: none; border: 0; color: inherit; padding: 0; font-size: inherit; }

/* tables */
.hb-table-wrap { overflow-x: auto; margin: 0 0 18px; }
.hb-article table { border-collapse: collapse; width: 100%; font-size: 14.5px; }
.hb-article th, .hb-article td { border: 1px solid var(--line, #e9eef5); padding: 9px 13px; text-align: left; vertical-align: top; }
.hb-article thead th { background: var(--soft, #f4f9ff); color: var(--ink, #0b1320); font-weight: 700; }
.hb-article tbody tr:nth-child(even) { background: #fbfdff; }

/* ───── right TOC ───── */
.hb-toc { position: sticky; top: 96px; max-height: calc(100vh - 120px); overflow-y: auto; font-size: 13.5px; }
.hb-toc__title {
  font-weight: 700; font-size: 11.5px; letter-spacing: .05em; text-transform: uppercase;
  color: var(--muted, #5c6a7d); margin-bottom: 10px;
}
.hb-toc__list { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--line, #e9eef5); }
.hb-toc__list li { margin: 0; }
.hb-toc__list a {
  display: block; padding: 4px 12px; color: var(--muted, #5c6a7d);
  border-left: 2px solid transparent; margin-left: -1px;
}
.hb-toc__list a:hover { color: var(--blue, #1797F0); }
.hb-toc__list a.is-active { color: var(--blue, #1797F0); font-weight: 600; border-left-color: var(--blue, #1797F0); }
.hb-toc__sub a { padding-left: 24px; font-size: 13px; }

/* ───── burger (mobile) ───── */
.hb-burger {
  display: none; align-items: center; gap: 8px;
  font-family: var(--ffh, 'Sora', sans-serif); font-weight: 600; font-size: 14px;
  color: var(--ink, #0b1320); background: var(--soft, #f4f9ff);
  border: 1px solid var(--line, #e9eef5); border-radius: 10px; padding: 9px 14px;
  margin: 14px 0 0; cursor: pointer;
}
.hb-burger .cz-ic { width: 18px; height: 18px; }

/* ───── home (index) ───── */
.hb--home { padding-bottom: 80px; }
.hb-hero { text-align: center; max-width: 720px; margin: 30px auto 40px; }
.hb-hero__eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--ffh, 'Sora', sans-serif); font-weight: 600; font-size: 13px;
  color: var(--blue, #1797F0); background: var(--soft, #f4f9ff);
  padding: 7px 14px; border-radius: 999px; margin-bottom: 18px;
}
.hb-hero__eyebrow .cz-ic { width: 16px; height: 16px; }
.hb-hero h1 {
  font-family: var(--ffh, 'Sora', sans-serif); color: var(--ink, #0b1320);
  font-size: 40px; line-height: 1.1; letter-spacing: -.02em; margin: 0 0 14px;
}
.hb-hero p { color: var(--muted, #5c6a7d); font-size: 18px; margin: 0 0 20px; }
.hb-langs--hero { justify-content: center; }

.hb-cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 28px; }
.hb-card {
  border: 1px solid var(--line, #e9eef5); border-radius: 18px; padding: 28px;
  background: #fff; box-shadow: 0 8px 28px rgba(11,19,32,.04);
}
.hb-card__head { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.hb-card__head .cz-ic { width: 26px; height: 26px; color: var(--blue, #1797F0); }
.hb-card__head h2 { font-family: var(--ffh, 'Sora', sans-serif); color: var(--ink, #0b1320); font-size: 22px; margin: 0; }
.hb-card__list { list-style: none; margin: 0; padding: 0; columns: 1; }
.hb-card__list li { margin: 0; }
.hb-card__list a {
  display: flex; align-items: center; gap: 8px; padding: 8px 0;
  color: var(--body, #42536a); border-bottom: 1px solid var(--line, #e9eef5);
}
.hb-card__list li:last-child a { border-bottom: 0; }
.hb-card__list a:hover { color: var(--blue, #1797F0); }
.hb-card__list .cz-ic { width: 15px; height: 15px; color: var(--blue, #1797F0); flex: none; }

/* ───── responsive ───── */
@media (max-width: 1080px) {
  .hb-layout { grid-template-columns: 230px minmax(0, 1fr); }
  .hb-toc { display: none; }
}
@media (max-width: 760px) {
  .hb-wrap { padding: 0 20px; }
  .hb-layout { grid-template-columns: 1fr; gap: 0; }
  .hb-burger { display: inline-flex; }
  .hb-side {
    position: fixed; top: 0; left: 0; bottom: 0; z-index: 60;
    width: 84%; max-width: 320px; max-height: none;
    background: #fff; border-right: 1px solid var(--line, #e9eef5);
    padding: 88px 20px 24px; transform: translateX(-100%);
    transition: transform .25s ease; box-shadow: 0 20px 60px rgba(11,19,32,.2);
  }
  .hb.is-side-open .hb-side { transform: translateX(0); }
  .hb-cards { grid-template-columns: 1fr; }
  .hb-hero h1 { font-size: 30px; }
}

/* затемнение под мобильным меню */
.hb-side__overlay {
  display: none; position: fixed; inset: 0; z-index: 55;
  background: rgba(11,19,32,.4);
}
.hb.is-side-open .hb-side__overlay { display: block; }
