
:root {
  --brand: #4f46e5;
  --text: #171717;
  --text-soft: #595959;
  --line: #e8e4e4;
  --muted: #f7f5f5;
  --brand-soft: color-mix(in srgb, var(--brand) 7%, #ffffff);
  --brand-line: color-mix(in srgb, var(--brand) 18%, #e8e4e4);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: #ffffff;
  color: var(--text);
  font-family: "Sora", "Avenir Next", "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}
main { min-height: calc(100vh - 64px); }
a { color: var(--brand); }

.page-container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 16px 64px;
}

/* ── Header ─────────────────────────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
}
.site-header__inner {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  row-gap: 8px;
  column-gap: 14px;
  min-height: 64px;
  margin: 0 auto;
  padding: 10px 16px;
  max-width: 1200px;
}
.site-header__brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
}
.site-header__logo {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--brand);
  display: inline-block;
}
.site-header__name { font-weight: 700; font-size: 16px; }
.site-header__nav {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
  margin-left: 8px;
}
.site-header__link {
  text-decoration: none;
  color: var(--text-soft);
  font-size: 14px;
  padding: 6px 10px;
  border-radius: 8px;
}
.site-header__link:hover { background: var(--muted); color: var(--text); }
.site-header__langs { margin-left: auto; display: inline-flex; gap: 2px; }
.site-header__lang {
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  color: var(--text-soft);
  padding: 4px 7px;
  border-radius: 7px;
}
a.site-header__lang:hover { background: var(--muted); color: var(--text); }
.site-header__lang--active { background: var(--brand); color: #fff; }

/* ── Footer ─────────────────────────────────────────────────────────────── */
.site-footer { border-top: 1px solid var(--line); }
.site-footer__inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px 16px;
  color: var(--text-soft);
  font-size: 13px;
}

/* ── Home ───────────────────────────────────────────────────────────────── */
.help-hero { margin-bottom: 36px; }
.help-hero__title { margin: 0 0 8px; font-size: clamp(28px, 4.5vw, 44px); line-height: 1.15; }
.help-hero__title em { color: var(--brand); font-style: normal; }
.help-hero__subtitle { margin: 0; color: var(--text-soft); font-size: 17px; }

.help-products {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}
.help-category-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  padding: 20px;
  display: grid;
  gap: 10px;
  align-content: start;
}
.help-category-card__icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--brand-soft);
  color: var(--brand);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 700;
}
.help-category-card__title { margin: 0; font-size: 20px; }
.help-category-card__links { display: grid; gap: 6px; }
.help-category-card__link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  text-decoration: none;
  color: var(--text);
  font-size: 15px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
}
.help-category-card__link:hover { border-color: var(--brand-line); background: var(--brand-soft); }
.help-category-card__count { color: var(--text-soft); font-size: 12px; }

/* ── Category page ──────────────────────────────────────────────────────── */
.docs-page__eyebrow {
  margin: 0;
  color: var(--brand);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 12px;
  font-weight: 700;
}
.docs-page__title { margin: 6px 0 4px; font-size: clamp(24px, 3.5vw, 34px); }
.docs-page__lead { margin: 0 0 24px; color: var(--text-soft); }
.docs-breadcrumbs { margin: 0 0 14px; font-size: 13px; color: var(--text-soft); }
.docs-breadcrumbs a { color: var(--text-soft); text-decoration: none; }
.docs-breadcrumbs a:hover { color: var(--brand); }

.docs-kb-tree {
  border: 1px solid var(--brand-line);
  border-radius: 12px;
  background: var(--brand-soft);
  padding: 14px;
  display: grid;
  gap: 4px;
}
.docs-kb-tree__folder { border-top: 1px solid var(--line); padding: 8px 0; }
.docs-kb-tree__folder:first-of-type { border-top: 0; padding-top: 0; }
.docs-kb-tree__folder summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 15px;
}
.docs-kb-tree__folder summary::-webkit-details-marker { display: none; }
.docs-kb-tree__folder summary::before { content: "▸"; color: var(--brand); transition: transform 0.15s; }
.docs-kb-tree__folder[open] summary::before { transform: rotate(90deg); }
.docs-kb-tree__list { margin: 8px 0 0; padding: 0 0 0 20px; list-style: none; display: grid; gap: 6px; }
.docs-kb-tree__list a { text-decoration: none; color: var(--text); font-size: 15px; }
.docs-kb-tree__list a:hover { color: var(--brand); }

/* ── Article page ───────────────────────────────────────────────────────── */
.docs-layout {
  display: grid;
  gap: 24px;
  grid-template-columns: 260px minmax(0, 1fr);
  align-items: start;
}
@media (max-width: 860px) { .docs-layout { grid-template-columns: 1fr; } }

.docs-sidebar {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
  background: #fff;
  height: fit-content;
  position: sticky;
  top: 84px;
}
@media (max-width: 860px) { .docs-sidebar { position: static; order: 2; } }
.docs-sidebar__topic { border-bottom: 1px solid var(--line); padding: 8px 0; }
.docs-sidebar__topic:last-child { border-bottom: 0; }
.docs-sidebar__topic summary { cursor: pointer; font-weight: 600; font-size: 14px; list-style: none; }
.docs-sidebar__topic summary::-webkit-details-marker { display: none; }
.docs-sidebar__list { margin: 8px 0 0; padding: 0 0 0 10px; list-style: none; display: grid; gap: 6px; }
.docs-sidebar__list a { text-decoration: none; color: var(--text-soft); font-size: 13px; }
.docs-sidebar__list a:hover { color: var(--brand); }
.docs-sidebar__active { color: var(--brand) !important; font-weight: 600; }

.docs-article {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  padding: clamp(18px, 3vw, 32px);
  display: grid;
  gap: 14px;
}
.docs-article__title { margin: 0; font-size: clamp(24px, 3vw, 32px); line-height: 1.2; }
.docs-article__subtitle { margin: 10px 0 0; font-size: 26px; }
.docs-article__paragraph { margin: 0; font-size: 17px; line-height: 1.8; color: var(--text); }
.docs-article__paragraph code {
  background: var(--muted);
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 1px 5px;
  font-size: 15px;
}
.docs-article__image {
  width: 100%;
  height: auto;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #fff;
}
.docs-article__image--portrait { width: 30%; display: block; margin-left: auto; margin-right: auto; }
@media (max-width: 640px) { .docs-article__image--portrait { width: 70%; } }
.docs-article__list { margin: 0; padding-left: 0; list-style: none; display: grid; gap: 8px; font-size: 17px; }
.docs-article__list li { display: flex; gap: 10px; line-height: 1.6; }
.docs-article__list-icon { color: var(--brand); flex-shrink: 0; }
.docs-article__button {
  display: inline-flex;
  width: fit-content;
  text-decoration: none;
  background: var(--brand);
  color: #fff;
  border-radius: 9px;
  padding: 9px 14px;
  font-size: 15px;
  font-weight: 600;
}
.docs-article__button:hover { filter: brightness(0.92); }

.docs-next {
  margin-top: 18px;
  border: 1px solid var(--brand-line);
  background: var(--brand-soft);
  border-radius: 12px;
  padding: 14px 16px;
}
.docs-next__label { margin: 0; font-size: 12px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-soft); }
.docs-next a { text-decoration: none; font-weight: 600; }

/* ── Misc ───────────────────────────────────────────────────────────────── */
.docs-empty { color: var(--text-soft); }
.docs-error {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--muted);
  padding: 32px;
  text-align: center;
  color: var(--text-soft);
}
