/* onlinePBX brand skin for the PUBLIC help centre only (body.kb-site). Palette, font and radii read
   off https://onlinepbx.ru/ : Montserrat, near-black #2f2f36 text, #545567 secondary, #fafafa
   sections on white, green CTA #00bb20, link blue #0d71d7, violet-grey #4e4963 accents, 18px cards,
   pill buttons. /settings and the editor do not carry the class and keep the platform theme. */
body.kb-site {
  --radius: 14px; --radius-card: 18px; --radius-pill: 999px;
  --background: #fafafa; --foreground: #2f2f36;
  --surface: #f3f3f6; --card: #ffffff; --card-foreground: #2f2f36;
  --text-heading: #222222; --text-body: #2f2f36;
  --text-secondary: #545567; --text-tertiary: #6f6c80; --text-placeholder: #a8a4b9;
  --primary: #00bb20; --primary-hover: #00a51c; --primary-foreground: #ffffff;
  --link: #0d71d7; --accent-ink: #4e4963; --accent-soft: #f0f1ff;
  --accent: #f0f1ff; --border: #e6e5ee; --border-subtle: #eeedf3; --border-strong: #d6d4e2;
  --input: #e0ddec; --input-background: #ffffff; --ring: #0d71d7;
  --mark: rgba(0,187,32,.18);
  --shadow-card: 0 2px 12px rgba(42,38,55,.06); --shadow-card-hover: 0 8px 28px rgba(42,38,55,.10);
  --footer-bg: #2a2637; --footer-ink: #e0ddec; --footer-strong: #ffffff; --footer-line: rgba(255,255,255,.18);
  --topbar-bg: rgba(255,255,255,.94);
  font-family: "Montserrat", Arial, sans-serif; font-size: 15px; line-height: 1.55;
  padding: 0; color: var(--text-body);
}
.dark body.kb-site {
  --background: #16151b; --foreground: #e6e5ee;
  --surface: #1d1c24; --card: #211f29; --card-foreground: #e6e5ee;
  --text-heading: #f5f5f7; --text-body: #dcdbe4;
  --text-secondary: #a8a4b9; --text-tertiary: #8a869c; --text-placeholder: #6b6780;
  --primary: #00bb20; --primary-hover: #00cc24; --primary-foreground: #ffffff;
  --link: #5aa8f5; --accent-ink: #c8c3dc; --accent-soft: #29263a;
  --accent: #29263a; --border: #2e2c38; --border-subtle: #26242f; --border-strong: #3b3848;
  --input: #3b3848; --input-background: #1d1c24; --ring: #5aa8f5;
  --mark: rgba(0,187,32,.28);
  --shadow-card: none; --shadow-card-hover: none;
  --footer-bg: #100f14; --footer-ink: #a8a4b9; --footer-strong: #f5f5f7; --footer-line: rgba(255,255,255,.12);
  --topbar-bg: rgba(22,21,27,.94);
}
.kb-site main { max-width: none; }
.kb-site p { color: inherit; }

/* top bar: logo left, onlinepbx.ru / Личный кабинет / green CTA right */
.kb-topbar {
  position: sticky; top: 0; z-index: 25;
  background: var(--topbar-bg); backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--border-subtle);
}
.kb-topbar-in {
  max-width: 1200px; margin: 0 auto; padding: 10px 16px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.kb-logo { display: flex; align-items: center; gap: 10px; min-width: 0; color: var(--text-heading); text-decoration: none; }
.kb-logo-mark { width: 38px; height: 38px; flex: 0 0 auto; }
.kb-logo-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.15; }
.kb-logo-text strong { font-size: 16px; font-weight: 700; letter-spacing: -.01em; }
.kb-logo-text span { font-size: 12px; font-weight: 500; color: var(--text-secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kb-topnav { display: flex; align-items: center; gap: 4px; flex: 0 0 auto; }
.kb-topnav-link {
  display: none; align-items: center; min-height: 44px; padding: 0 12px;
  color: var(--text-body); text-decoration: none; font-size: 14px; font-weight: 500;
  border-radius: var(--radius-pill); transition: color 100ms ease, background-color 100ms ease;
}
.kb-topnav-link:hover { color: var(--link); background: var(--accent-soft); }
.kb-cta {
  display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 16px;
  background: var(--primary); color: var(--primary-foreground); text-decoration: none;
  font-size: 13px; font-weight: 600; border-radius: var(--radius-pill); white-space: nowrap;
  transition: background-color 100ms ease, transform 100ms ease;
}
.kb-cta:hover { background: var(--primary-hover); }
.kb-cta:active, .kb-pill:active, .kb-search-btn:active { transform: scale(.97); }
.kb-topnav a:focus-visible, .kb-logo:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; }

/* hero band with the search */
.kb-hero { background: var(--card); border-bottom: 1px solid var(--border-subtle); }
.kb-hero-in { max-width: 1200px; margin: 0 auto; padding: 12px 16px; }
.kb-hero-big .kb-hero-in { padding: 32px 16px 28px; }
.kb-hero-title { margin: 0 0 8px; font-size: 28px; line-height: 1.15; font-weight: 700; letter-spacing: -.02em; color: var(--text-heading); }
.kb-hero-lead { margin: 0 0 18px; font-size: 15px; color: var(--text-secondary); max-width: 640px; }
.kb-site .kb-head-row { display: flex; align-items: center; gap: 10px; }
.kb-search {
  position: relative; flex: 1 1 auto; min-width: 0; display: flex; align-items: center;
  background: var(--input-background); border: 1px solid var(--input); border-radius: var(--radius-pill);
  padding: 3px 3px 3px 42px; transition: border-color 100ms ease, box-shadow 100ms ease;
}
.kb-search:focus-within { border-color: var(--ring); box-shadow: 0 0 0 3px var(--accent-soft); }
.kb-search-ico { position: absolute; left: 14px; width: 18px; height: 18px; color: var(--text-tertiary); pointer-events: none; }
.kb-search-input {
  flex: 1 1 auto; min-width: 0; min-height: 44px; border: none; outline: none; background: transparent;
  color: var(--text-heading); font: inherit; font-size: 16px;
}
.kb-search-input::placeholder { color: var(--text-placeholder); }
.kb-search-btn {
  flex: 0 0 auto; min-height: 44px; padding: 0 20px; cursor: pointer; border: none;
  background: var(--primary); color: var(--primary-foreground);
  font: inherit; font-size: 14px; font-weight: 600; border-radius: var(--radius-pill);
  transition: background-color 100ms ease, transform 100ms ease;
}
.kb-search-btn:hover { background: var(--primary-hover); }
.kb-search-btn:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; }
.kb-hero-big .kb-search { max-width: 680px; box-shadow: var(--shadow-card); }
.kb-site .kb-nav-toggle {
  min-height: 44px; border-radius: var(--radius-pill); border: 1px solid var(--input);
  background: var(--card); font-weight: 600;
}
.kb-site .kb-nav-toggle:hover { color: var(--link); border-color: var(--border-strong); }

/* page body */
.kb-site .kb-shell { max-width: 1200px; padding: 0 16px; }
.kb-site .kb-main { max-width: 820px; padding-bottom: 40px; }
.kb-site .kb-h2 { margin: 32px 0 12px; font-size: 20px; font-weight: 700; letter-spacing: -.01em; text-transform: none; color: var(--text-heading); }
.kb-site .kb-title { font-size: 26px; font-weight: 700; letter-spacing: -.02em; line-height: 1.2; margin: 12px 0 8px; }
.kb-site .kb-crumbs { margin-top: 20px; font-size: 13px; }
.kb-site .kb-crumbs a { color: var(--link); }
.kb-site .kb-crumbs a:hover { color: var(--link); text-decoration: underline; }

.kb-site .kb-sections { gap: 12px; grid-template-columns: 1fr; }
.kb-site .kb-sections a {
  min-height: 64px; padding: 16px 20px; border: 1px solid var(--border-subtle);
  border-radius: var(--radius-card); box-shadow: var(--shadow-card);
  color: var(--text-heading); font-weight: 600;
  transition: box-shadow 150ms ease, border-color 150ms ease;
}
.kb-site .kb-sections a:hover { box-shadow: var(--shadow-card-hover); border-color: var(--border-strong); }
.kb-site .kb-sections em {
  min-width: 32px; padding: 2px 10px; text-align: center; font-weight: 600; font-size: 13px;
  color: var(--accent-ink); background: var(--accent-soft); border-radius: var(--radius-pill);
}
.kb-site .kb-list { gap: 10px; }
.kb-site .kb-item {
  padding: 16px 20px; border: 1px solid var(--border-subtle); border-radius: var(--radius-card);
  box-shadow: var(--shadow-card); transition: box-shadow 150ms ease, border-color 150ms ease;
}
.kb-site .kb-item:hover { box-shadow: var(--shadow-card-hover); border-color: var(--border-strong); }
.kb-site .kb-item > a { font-weight: 600; color: var(--text-heading); }
.kb-site .kb-item > a:hover { color: var(--link); }
.kb-site .kb-excerpt { font-size: 13px; line-height: 1.5; margin-top: 6px; }
.kb-site .kb-item mark, .kb-site .kb-body mark { background: var(--mark); color: inherit; border-radius: 4px; padding: 0 2px; }

/* article */
.kb-site .kb-article {
  background: var(--card); border: 1px solid var(--border-subtle); border-radius: var(--radius-card);
  box-shadow: var(--shadow-card); padding: 20px 18px; margin-top: 12px;
}
.kb-site .kb-article .kb-title { margin-top: 0; }
.kb-site .kb-toc { background: var(--accent-soft); border: none; border-radius: var(--radius); padding: 14px 18px; margin-bottom: 22px; }
.kb-site .kb-toc p { font-weight: 700; color: var(--accent-ink); letter-spacing: .03em; }
.kb-site .kb-toc a { color: var(--link); font-weight: 500; }
.kb-site .kb-toc a:hover { text-decoration: underline; }
.kb-site .kb-body { font-size: 15px; line-height: 1.7; color: var(--text-body); }
.kb-site .kb-body h2 { font-size: 21px; font-weight: 700; letter-spacing: -.01em; margin: 30px 0 10px; scroll-margin-top: 76px; }
.kb-site .kb-body h3 { font-size: 17px; font-weight: 700; margin: 22px 0 8px; scroll-margin-top: 76px; }
.kb-site .kb-body a { color: var(--link); text-decoration: none; }
.kb-site .kb-body a:hover { text-decoration: underline; }
.kb-site .kb-body strong, .kb-site .kb-body b { color: var(--text-heading); font-weight: 700; }
.kb-site .kb-body ul li::marker { color: var(--primary); }
.kb-site .kb-body img { border-radius: var(--radius); border: 1px solid var(--border-subtle); }
.kb-site .kb-body blockquote { border-left: 4px solid var(--primary); background: var(--surface); border-radius: 0 var(--radius) var(--radius) 0; padding: 12px 16px; }
.kb-site .kb-body pre { background: var(--surface); border: 1px solid var(--border-subtle); border-radius: var(--radius); }
.kb-site .kb-body table { border-radius: var(--radius); border: 1px solid var(--border); }
.kb-site .kb-body th { background: var(--surface); color: var(--text-heading); font-weight: 600; }
.kb-site .kb-body th, .kb-site .kb-body td { border: 1px solid var(--border-subtle); }

.kb-site .kb-feedback {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px;
  margin-top: 16px; padding: 16px 20px; border: none; border-radius: var(--radius-card); background: var(--accent-soft);
}
.kb-site .kb-feedback p { margin: 0; font-weight: 600; color: var(--accent-ink); }
.kb-pill {
  display: inline-flex; align-items: center; justify-content: center; min-height: 44px; min-width: 88px; padding: 0 20px;
  cursor: pointer; font: inherit; font-size: 14px; font-weight: 600;
  background: var(--card); color: var(--text-heading);
  border: 1px solid var(--input); border-radius: var(--radius-pill);
  transition: color 100ms ease, border-color 100ms ease, transform 100ms ease;
}
.kb-pill:hover { color: var(--primary); border-color: var(--primary); }
.kb-pill:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; }

/* side menu */
.kb-site .kb-nav { background: var(--card); }
.kb-site .kb-nav-title { font-weight: 700; color: var(--accent-ink); }
.kb-site .kb-nav-sec > summary { font-weight: 600; color: var(--text-heading); }
.kb-site .kb-nav-sec > summary:hover, .kb-site .kb-nav-leaf > a:hover { color: var(--link); }
.kb-site .kb-nav-leaf > a { font-size: 14px; border-radius: 10px; }
.kb-site .kb-nav-leaf > a:hover { background: var(--accent-soft); }
.kb-site .kb-nav-leaf > a.is-current, .kb-site .kb-nav-sechref.is-current { color: var(--primary); font-weight: 700; }
.kb-site .kb-nav-leaf > a.is-current { background: var(--mark); }
.kb-site .kb-nav-sec em { padding: 0 8px; border-radius: var(--radius-pill); background: var(--accent-soft); color: var(--accent-ink); font-weight: 600; }

/* dark footer, like the bottom of onlinepbx.ru */
.kb-site .kb-footer {
  max-width: none; margin: 40px 0 0; padding: 28px 16px calc(80px + var(--sab, 0px));
  background: var(--footer-bg); color: var(--footer-ink); border-top: none;
}
.kb-site .kb-footer > * { max-width: 820px; margin-left: auto; margin-right: auto; }
.kb-site .kb-footer-info { font-size: 14px; line-height: 1.6; }
.kb-site .kb-footer-info strong, .kb-site .kb-footer-info b { color: var(--footer-strong); }
.kb-site .kb-footer-nav { margin-top: 20px; }
.kb-site .kb-footer-link {
  min-height: 48px; padding: 10px 20px; border-radius: var(--radius-pill);
  background: transparent; color: var(--footer-strong); border: 1px solid var(--footer-line); font-weight: 600;
}
.kb-site .kb-footer-link:hover { color: #ffffff; border-color: var(--primary); background: var(--primary); }
.kb-site .kb-footer-arrow { color: inherit; opacity: .7; }
.kb-site .kb-jump-btn { border-radius: var(--radius-pill); border: 1px solid var(--border); box-shadow: var(--shadow-card-hover); }
.kb-site .kb-jump-btn:hover { color: var(--primary); }
.kb-site .kb-empty h1 { font-size: 24px; font-weight: 700; }
.kb-site .kb-empty a { color: var(--link); }

@media (min-width: 640px) {
  .kb-topnav-link { display: inline-flex; }
  .kb-cta { font-size: 14px; padding: 0 20px; }
  .kb-site .kb-sections { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kb-site .kb-article { padding: 28px 32px; }
  .kb-hero-title { font-size: 36px; }
  .kb-hero-big .kb-hero-in { padding: 48px 16px 40px; }
}
@media (max-width: 420px) {
  .kb-logo-text span { display: none; }
  .kb-cta { padding: 0 12px; font-size: 12px; }
  .kb-search-btn { padding: 0 14px; }
}
@media (min-width: 1024px) {
  .kb-site .kb-head, .kb-site .kb-footer { max-width: none; }
  .kb-site .kb-shell { max-width: 1200px; grid-template-columns: 270px minmax(0, 1fr); gap: 36px; padding-top: 8px; }
  .kb-site .kb-nav { top: 76px; max-height: calc(100vh - 96px); padding: 16px 12px 16px 0; background: transparent; }
  .kb-hero-title { font-size: 42px; }
  .kb-site .kb-footer { padding-bottom: 36px; }
}

/* article download: PDF / Word / HTML */
.kb-download { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: -4px 0 18px; }
.kb-download-label { font-size: 13px; color: var(--text-tertiary); margin-right: 2px; }
.kb-pill.kb-download-link { min-width: 72px; padding: 0 16px; text-decoration: none; }

/* live search suggestions (under the search box) */
.kb-suggest {
  position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 40;
  max-height: min(70vh, 480px); overflow-y: auto; overscroll-behavior: contain;
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-card);
  box-shadow: var(--shadow-card-hover); padding: 6px; text-align: left;
}
.kb-suggest[hidden] { display: none; }
.kb-suggest-opt {
  display: flex; flex-direction: column; gap: 2px; min-height: 44px; justify-content: center;
  padding: 8px 12px; border-radius: 12px; color: var(--text-heading); text-decoration: none;
}
.kb-suggest-opt:hover, .kb-suggest-opt.is-active { background: var(--accent-soft); }
.kb-suggest-title { font-size: 15px; font-weight: 600; line-height: 1.3; overflow-wrap: anywhere; }
.kb-suggest-snip { font-size: 13px; color: var(--text-secondary); line-height: 1.4; overflow: hidden;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.kb-suggest-all { font-size: 14px; font-weight: 600; color: var(--link); border-top: 1px solid var(--border-subtle);
  border-radius: 0 0 12px 12px; margin-top: 4px; }
.kb-suggest-note, .kb-suggest-empty { padding: 10px 12px; font-size: 13px; color: var(--text-tertiary); }
.kb-suggest mark { background: var(--mark); color: inherit; border-radius: 4px; padding: 0 2px; }
.kb-site .kb-corrected { margin: -6px 0 16px; font-size: 14px; color: var(--text-secondary); }

/* Term hints (glossary): dotted underline in the text + one floating bubble. Both themes via tokens. */
.kb-term { border-bottom: 1px dashed var(--text-tertiary); cursor: help; border-radius: 2px; -webkit-tap-highlight-color: transparent; }
.kb-term:hover, .kb-term[aria-expanded="true"] { border-bottom-color: var(--link); color: var(--text-heading); }
.kb-term:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; }
.kb-tip {
  position: absolute; z-index: 60; max-width: min(320px, calc(100vw - 16px));
  padding: 10px 12px; border-radius: var(--radius); background: var(--card); color: var(--text-body);
  border: 1px solid var(--border-strong); box-shadow: var(--shadow-card-hover);
  font-size: 14px; line-height: 1.45; opacity: 0; transform: translateY(4px);
  transition: opacity .15s ease, transform .15s ease; pointer-events: auto;
}
.kb-tip.is-above { transform: translateY(-4px); }
.kb-tip.is-open { opacity: 1; transform: none; }
.kb-tip strong { display: block; margin-bottom: 2px; color: var(--text-heading); font-weight: 600; }
@media (prefers-reduced-motion: reduce) { .kb-tip { transition: none; } }

/* auto contents — brand skin + the wide-screen side column */
.kb-site .kb-toc > summary { color: var(--accent-ink); font-weight: 700; }
.kb-site .kb-toc li a[aria-current="true"] { border-left-color: var(--link); color: var(--link); }
.kb-site .kb-body [id] { scroll-margin-top: 84px; }
@media (min-width: 1280px) {
  .kb-site .kb-shell:has(.kb-article.has-toc) { max-width: 1400px; }
  .kb-site .kb-main:has(.kb-article.has-toc) { max-width: none; }
  .kb-site .kb-article.has-toc { display: grid; grid-template-columns: minmax(0, 1fr) 250px; column-gap: 32px; align-items: start; }
  .kb-site .kb-article.has-toc > * { grid-column: 1; }
  .kb-site .kb-article.has-toc > .kb-toc {
    grid-column: 2; grid-row: 1 / span 4; align-self: start; position: sticky; top: 84px;
    max-height: calc(100vh - 110px); overflow-y: auto; overscroll-behavior: contain; margin-bottom: 0;
  }
  .kb-site .kb-article.has-toc > .kb-toc > summary { cursor: default; }
  .kb-site .kb-article.has-toc > .kb-toc > summary::after { display: none; }
}

/* EDITOR ENTRY (v29) — only rendered for a visitor who may edit */
.kb-edit-link { margin-left: 8px; color: var(--link); font-weight: 600; text-decoration: none; }
.kb-edit-link:hover { text-decoration: underline; }

/* Search hits (v31): highlighted words in an article opened from the search, the bottom bar and the tick strip */
.kb-site .kb-body mark.kb-hit { background: var(--mark); color: inherit; border-radius: 4px; padding: 0 1px; scroll-margin-top: 100px; }
.kb-site .kb-body mark.kb-hit.is-current { background: var(--primary); color: var(--primary-foreground); box-shadow: 0 0 0 2px var(--ring); }
.kb-hitbar {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(12px + var(--sab, 0px)); z-index: 30;
  display: flex; align-items: center; gap: 4px; padding: 4px 4px 4px 14px;
  background: var(--card); color: var(--text-body); border: 1px solid var(--border);
  border-radius: 999px; box-shadow: var(--shadow-card-hover, 0 4px 14px rgba(0,0,0,.14));
  font-size: 14px; white-space: nowrap; animation: kbHitIn 150ms ease-out;
}
.dark .kb-hitbar { box-shadow: none; border-color: var(--border-strong, var(--border)); }
.kb-hitbar-count { margin-right: 6px; font-variant-numeric: tabular-nums; color: var(--text-secondary); }
.kb-hitbar-btn {
  width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center; padding: 0;
  background: transparent; color: var(--text-secondary); border: 0; border-radius: 999px; cursor: pointer;
  transition: transform 100ms ease, color 100ms ease, background-color 100ms ease;
}
.kb-hitbar-btn svg { width: 20px; height: 20px; }
.kb-hitbar-btn:hover { color: var(--primary); background: var(--accent, transparent); }
.kb-hitbar-btn:active { transform: scale(.97); }
.kb-hitbar-btn:focus-visible { outline: 2px solid var(--ring); outline-offset: 1px; }
.has-hitbar .kb-jump { bottom: calc(68px + var(--sab, 0px)); }
.kb-hitmap { position: fixed; top: 64px; bottom: calc(64px + var(--sab, 0px)); right: 0; width: 10px; z-index: 29; pointer-events: none; }
.kb-hitmap-tick {
  position: absolute; right: 1px; width: 8px; height: 4px; margin-top: -2px; padding: 0; border: 0; border-radius: 2px;
  background: var(--mark); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--primary) 45%, transparent);
  pointer-events: auto; cursor: pointer;
}
.kb-hitmap-tick::before { content: ""; position: absolute; inset: -6px -4px; } /* bigger target for a finger */
.kb-hitmap-tick.is-current { background: var(--primary); height: 6px; margin-top: -3px; z-index: 1; }
@keyframes kbHitIn { from { opacity: 0; transform: translate(-50%, 6px); } to { opacity: 1; transform: translate(-50%, 0); } }
@media (prefers-reduced-motion: reduce) { .kb-hitbar { animation: none; } }

/* ---- Visitor assistant (v32) ---- */
.kb-ask-btn {
  flex: none; min-height: 48px; display: inline-flex; align-items: center; gap: 8px; padding: 0 16px;
  border-radius: var(--radius-pill, 999px); border: 1px solid var(--border); background: var(--card); color: var(--text-heading, inherit);
  font: inherit; font-weight: 600; cursor: pointer; transition: transform 100ms ease, border-color 100ms ease, color 100ms ease;
}
.kb-ask-btn svg, .kb-ask-fab svg, .kb-ask-inline svg { width: 20px; height: 20px; flex: none; }
.kb-ask-btn:hover, .kb-ask-inline:hover { border-color: var(--primary); color: var(--primary); }
.kb-ask-btn:active, .kb-ask-fab:active, .kb-ask-inline:active, .kb-ask-send:active, .kb-ask-hbtn:active { transform: scale(.97); }
.kb-ask-btn:focus-visible, .kb-ask-fab:focus-visible, .kb-ask-inline:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; }
@media (max-width: 719px) { .kb-ask-btn span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); } .kb-ask-btn { padding: 0 12px; } }
.kb-ask-inline {
  margin-top: 12px; min-height: 44px; display: inline-flex; align-items: center; gap: 8px; padding: 0 18px;
  border-radius: var(--radius-pill, 999px); border: 1px solid var(--border); background: var(--card); color: var(--text-heading, inherit);
  font: inherit; font-weight: 600; cursor: pointer;
}
.kb-ask-fab {
  position: fixed; left: 12px; bottom: calc(16px + var(--sab, 0px)); z-index: 25; width: 52px; height: 52px;
  display: flex; align-items: center; justify-content: center; border: 0; border-radius: 999px; cursor: pointer;
  background: var(--primary); color: var(--primary-foreground); box-shadow: var(--shadow-card-hover, 0 4px 14px rgba(0,0,0,.18));
  transition: transform 100ms ease;
}
.kb-ask-fab svg { width: 24px; height: 24px; }
.dark .kb-ask-fab { box-shadow: none; }
.has-hitbar .kb-ask-fab { bottom: calc(68px + var(--sab, 0px)); }
.kb-ask-open .kb-ask-fab { display: none; }
.kb-ask-panel {
  position: fixed; z-index: 60; inset: 0; display: flex; flex-direction: column;
  background: var(--card); color: var(--text-body); padding-bottom: var(--sab, 0px);
  animation: kbAskIn 150ms ease-out;
}
.kb-ask-panel[hidden] { display: none; }
@media (min-width: 720px) {
  .kb-ask-panel { inset: auto auto calc(16px + var(--sab, 0px)) 16px; width: 400px; height: min(620px, calc(100vh - 32px));
    border: 1px solid var(--border); border-radius: calc(var(--radius) * 1.6); box-shadow: var(--shadow-card-hover, 0 10px 30px rgba(0,0,0,.18)); overflow: hidden; }
  .dark .kb-ask-panel { box-shadow: none; }
}
@keyframes kbAskIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.kb-ask-head { display: flex; align-items: center; gap: 4px; padding: 8px 8px 8px 16px; border-bottom: 1px solid var(--border); padding-top: calc(8px + env(safe-area-inset-top, 0px)); }
.kb-ask-title { flex: 1; font-size: 16px; color: var(--text-heading, inherit); }
.kb-ask-hbtn { min-height: 44px; min-width: 44px; padding: 0 10px; border: 0; background: transparent; color: var(--text-secondary); font: inherit; font-size: 14px; border-radius: 999px; cursor: pointer; }
.kb-ask-hbtn:hover { color: var(--primary); }
.kb-ask-close { font-size: 18px; }
.kb-ask-list { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; background: var(--background); overscroll-behavior: contain; }
.kb-ask-empty { margin: auto 0; text-align: center; padding: 16px; }
.kb-ask-empty-title { font-weight: 700; color: var(--text-heading, inherit); margin: 0 0 6px; }
.kb-ask-empty-sub { margin: 0; color: var(--text-secondary); font-size: 14px; line-height: 1.5; }
.kb-ask-msg { max-width: 88%; padding: 10px 14px; border-radius: 16px; font-size: 15px; line-height: 1.5; }
.kb-ask-msg.is-user { align-self: flex-end; background: var(--primary); color: var(--primary-foreground); border-bottom-right-radius: 6px; }
.kb-ask-msg.is-bot { align-self: flex-start; background: var(--card); border: 1px solid var(--border); border-bottom-left-radius: 6px; }
.kb-ask-msg.is-error { align-self: flex-start; background: var(--card); border: 1px solid var(--destructive, var(--border)); border-bottom-left-radius: 6px; }
.kb-ask-msg.is-typing { color: var(--text-secondary); font-style: italic; }
.kb-ask-text { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.kb-ask-src { margin-top: 8px; display: flex; flex-direction: column; gap: 4px; font-size: 14px; }
.kb-ask-src-label { color: var(--text-secondary); }
.kb-ask-src-link, .kb-ask-search { color: var(--primary); font-weight: 600; text-decoration: none; }
.kb-ask-src-link:hover, .kb-ask-search:hover { text-decoration: underline; }
.kb-ask-search { display: inline-block; margin-top: 8px; font-size: 14px; }
.kb-ask-form { display: flex; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--border); background: var(--card); }
.kb-ask-input { flex: 1; min-height: 44px; max-height: 120px; resize: none; padding: 10px 14px; border: 1px solid var(--input, var(--border)); border-radius: 22px; background: var(--background); color: var(--text-body); font: inherit; font-size: 16px; }
.kb-ask-input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ring) 20%, transparent); }
.kb-ask-send { min-height: 44px; padding: 0 16px; border: 0; border-radius: 22px; background: var(--primary); color: var(--primary-foreground); font: inherit; font-weight: 600; cursor: pointer; }
.kb-ask-send:disabled { opacity: .6; cursor: default; }
.kb-ask-note { margin: 0; padding: 0 12px 10px; font-size: 12px; color: var(--text-tertiary, var(--text-secondary)); background: var(--card); }
.kb-ask-open body { overflow: hidden; }
@media (min-width: 720px) { .kb-ask-open body { overflow: auto; } }

/* home page (v34): «Часто ищут» chips under the search, topic cards with customer questions */
.kb-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 16px; max-width: 760px; }
.kb-chips-label { font-size: 13px; color: var(--text-tertiary); margin-right: 2px; }
.kb-chip {
  display: inline-flex; align-items: center; min-height: 36px; padding: 0 14px;
  border: 1px solid var(--border); border-radius: var(--radius-pill); background: var(--accent-soft);
  color: var(--accent-ink); font-size: 13px; font-weight: 500; text-decoration: none;
  transition: border-color 100ms ease, color 100ms ease, transform 100ms ease;
}
.kb-chip:hover { color: var(--link); border-color: var(--border-strong); }
.kb-chip:active { transform: scale(.97); }
.kb-chip:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; }
.kb-topics { display: grid; gap: 14px; grid-template-columns: 1fr; }
.kb-topic {
  padding: 18px 20px; background: var(--card); border: 1px solid var(--border-subtle);
  border-radius: var(--radius-card); box-shadow: var(--shadow-card); min-width: 0;
}
.kb-topic-title { margin: 0 0 8px; font-size: 16px; font-weight: 700; color: var(--text-heading); }
.kb-topic-list { list-style: none; margin: 0; padding: 0; }
.kb-topic-list li + li { border-top: 1px solid var(--border-subtle); }
.kb-topic-list a {
  display: flex; align-items: center; min-height: 44px; padding: 8px 0;
  color: var(--link); text-decoration: none; font-size: 14px; font-weight: 500; overflow-wrap: anywhere;
}
.kb-topic-list a:hover { text-decoration: underline; }
.kb-topics-more { margin: 20px 0 0; font-size: 14px; color: var(--text-secondary); }
@media (min-width: 640px) { .kb-site .kb-topics { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1280px) { .kb-site .kb-topics { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* table filter (v37): a search field above an article table with more than 10 rows */
.kb-site .kb-tf { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 16px 0 8px; }
.kb-site .kb-tf-field {
  position: relative; display: flex; align-items: center; flex: 1 1 100%; min-width: 0;
  border: 1px solid var(--border); border-radius: var(--radius); background: var(--card);
  transition: border-color 100ms ease, box-shadow 100ms ease;
}
.kb-site .kb-tf-field:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ring) 20%, transparent); }
.kb-site .kb-tf-icon { width: 18px; height: 18px; margin-left: 12px; flex: none; color: var(--text-tertiary, var(--text-secondary)); }
.kb-site .kb-tf-input {
  flex: 1; min-width: 0; min-height: 44px; padding: 0 8px 0 10px; border: 0; background: transparent;
  color: var(--text-body); font: inherit; font-size: 16px; outline: none; -webkit-appearance: none; appearance: none;
}
.kb-site .kb-tf-input::-webkit-search-cancel-button { display: none; }
.kb-site .kb-tf-input::placeholder { color: var(--text-tertiary, var(--text-secondary)); }
.kb-site .kb-tf-clear {
  display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; margin-right: 2px;
  border: 0; border-radius: var(--radius); background: transparent; color: var(--text-secondary); cursor: pointer;
  transition: transform 100ms ease, color 100ms ease;
}
.kb-site .kb-tf-clear[hidden] { display: none; }
.kb-site .kb-tf-clear svg { width: 18px; height: 18px; }
.kb-site .kb-tf-clear:hover { color: var(--primary); }
.kb-site .kb-tf-clear:active { transform: scale(.97); }
.kb-site .kb-tf-clear:focus-visible { outline: 2px solid var(--ring); outline-offset: 1px; }
.kb-site .kb-tf-count { font-size: 13px; color: var(--text-secondary); font-variant-numeric: tabular-nums; }
.kb-site .kb-body mark.kb-tf-hit { background: var(--mark); color: inherit; border-radius: 3px; padding: 0 1px; box-shadow: inset 0 -2px 0 var(--primary); }
.kb-site .kb-body tr.kb-tf-empty td { padding: 16px; text-align: center; color: var(--text-secondary); font-style: italic; }
.kb-site .kb-body tr[hidden] { display: none; }
@media (min-width: 640px) { .kb-site .kb-tf-field { flex: 0 1 360px; } }

/* Settings gear (v40): shown only to the installation's OWNER/ADMIN */
.kb-gear {
  display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px;
  color: var(--text-secondary); border-radius: var(--radius-pill); transition: color 100ms ease, background-color 100ms ease, transform 100ms ease;
}
.kb-gear svg { width: 20px; height: 20px; }
.kb-gear:hover { color: var(--link); background: var(--accent-soft); }
.kb-gear:active { transform: scale(.97); }
.kb-gear:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; }
