/* База знаний aipie — оформление в духе support.yclients.ru на токенах лендинга (colors_and_type.css). */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body.help {
  margin: 0; background: #fff; color: var(--aip-ink, #1C1F26);
  font-family: var(--font-text, "Onest", system-ui, sans-serif); font-size: 16px; line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--aip-accent, #1E4FE0); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; }
h1, h2, h3, h4, p { margin: 0; }
[hidden] { display: none !important; }
.disp { font-family: var(--font-display, "Unbounded", sans-serif); font-weight: 400; letter-spacing: -.03em; line-height: 1.12; }
.muted { color: #6B7280; }

/* ---------- Шапка ---------- */
.help-hdr {
  position: sticky; top: 0; z-index: 20; display: grid; grid-template-columns: auto 1fr auto auto; align-items: center; gap: 24px;
  padding: 14px 32px; background: #fff; border-bottom: 1px solid #E6E8EE;
}
.help-logo { display: inline-flex; align-items: center; gap: 10px; color: var(--aip-ink); font-size: 17px; white-space: nowrap; }
.help-logo svg { color: var(--aip-accent); }
.help-logo:hover { text-decoration: none; }
.help-search { position: relative; max-width: 720px; justify-self: center; width: 100%; }
.help-search input {
  width: 100%; height: 44px; padding: 0 16px 0 44px; border-radius: 12px; border: 1px solid #DDE1EA; background: #F4F5F7;
  font: inherit; font-size: 15px; color: var(--aip-ink); outline: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' fill='none' stroke='%236B7280' stroke-width='2'%3E%3Ccircle cx='8' cy='8' r='6'/%3E%3Cpath d='M13 13l4 4'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: 14px center;
}
.help-search input:focus { border-color: var(--aip-accent); background-color: #fff; }
.help-results {
  position: absolute; top: 50px; left: 0; right: 0; max-height: 70vh; overflow: auto; background: #fff; border: 1px solid #DDE1EA;
  border-radius: 14px; box-shadow: 0 16px 40px rgba(27,39,71,.14); padding: 6px;
}
.help-results a { display: block; padding: 10px 12px; border-radius: 10px; color: var(--aip-ink); }
.help-results a:hover, .help-results a.active { background: #EEF2FD; text-decoration: none; }
.help-results a b { display: block; font-weight: 600; }
.help-results a small { display: block; color: #6B7280; font-size: 13px; margin-top: 2px; }
.help-results a mark { background: #FFF2B8; padding: 0 1px; border-radius: 2px; }
.help-results .empty { padding: 12px; color: #6B7280; font-size: 14px; }
.help-top { display: flex; gap: 20px; font-size: 15px; white-space: nowrap; }
.help-top a { color: var(--aip-ink); }
.help-burger { display: none; width: 42px; height: 42px; border: 1px solid #DDE1EA; border-radius: 10px; background: #fff; cursor: pointer; align-items: center; justify-content: center; }
.help-burger span, .help-burger span::before, .help-burger span::after { display: block; width: 18px; height: 2px; background: var(--aip-ink); border-radius: 1px; position: relative; }
.help-burger span::before, .help-burger span::after { content: ""; position: absolute; left: 0; }
.help-burger span::before { top: -6px; } .help-burger span::after { top: 6px; }

/* ---------- Каркас ---------- */
.help-wrap { display: grid; grid-template-columns: 300px minmax(0, 1fr); min-height: calc(100vh - 73px); }
.help-side { border-right: 1px solid #E6E8EE; padding: 24px 16px 40px; background: #FAFBFC; }
.help-nav { position: sticky; top: 90px; max-height: calc(100vh - 110px); overflow: auto; font-size: 15px; }
.help-nav ul { list-style: none; margin: 0; padding: 0; }
.help-nav > ul > li + li { margin-top: 2px; }
.help-nav .sec-title { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 9px 12px; border-radius: 10px; color: var(--aip-ink); font-weight: 600; }
.help-nav .sec-title:hover { background: #EEF2FD; text-decoration: none; }
.help-nav .sec-title i { width: 8px; height: 8px; border-right: 2px solid #9AA3B5; border-bottom: 2px solid #9AA3B5; transform: rotate(-45deg); transition: transform .15s; flex: none; }
.help-nav .sec.open .sec-title i { transform: rotate(45deg); }
.help-nav .sec > ul { display: none; padding: 2px 0 8px 14px; border-left: 2px solid #E6E8EE; margin-left: 14px; }
.help-nav .sec.open > ul { display: block; }
.help-nav .sec > ul a { display: block; padding: 6px 10px; border-radius: 8px; color: #2F3340; font-size: 14px; line-height: 1.35; }
.help-nav .sec > ul a:hover { background: #EEF2FD; text-decoration: none; }
.help-nav .sec > ul a[aria-current="page"] { background: var(--aip-accent); color: #fff; font-weight: 600; }
.help-main { padding: 36px 56px 72px; max-width: 980px; }
.help-crumbs { display: flex; flex-wrap: wrap; gap: 6px 10px; font-size: 14px; color: #6B7280; margin-bottom: 20px; }
.help-crumbs a { color: #4B5563; }
.help-crumbs span[aria-hidden] { opacity: .6; }
.help-main h1 { font-size: 36px; margin-bottom: 14px; }
.lead { font-size: 18px; color: #4B5563; max-width: 760px; }

/* ---------- Главная и списки ---------- */
.help-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; margin-top: 32px; }
.help-card { display: flex; flex-direction: column; gap: 8px; padding: 20px; border: 1px solid #E6E8EE; border-radius: 16px; background: #fff; color: var(--aip-ink); transition: box-shadow .15s, transform .15s; }
.help-card:hover { text-decoration: none; box-shadow: 0 10px 30px rgba(27,39,71,.10); transform: translateY(-2px); }
.help-card h2 { font-size: 17px; font-weight: 600; }
.help-card p { font-size: 14px; color: #4B5563; }
.help-card .count { font-size: 13px; color: var(--aip-accent); margin-top: auto; }
.help-list { list-style: none; padding: 0; margin: 28px 0 0; display: flex; flex-direction: column; gap: 10px; }
.help-list a { display: flex; flex-direction: column; gap: 4px; padding: 14px 18px; border: 1px solid #E6E8EE; border-radius: 12px; color: var(--aip-ink); }
.help-list a:hover { background: #F4F6FB; text-decoration: none; }
.help-list b { font-weight: 600; font-size: 16px; }
.help-list span { font-size: 14px; color: #4B5563; }

/* ---------- Статья ---------- */
.help-toc { margin: 24px 0 8px; padding: 16px 20px; border: 1px solid #E6E8EE; border-radius: 12px; background: #FAFBFC; font-size: 15px; }
.help-toc b { display: block; margin-bottom: 8px; font-weight: 600; }
.help-toc ol { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 4px; }
.prose { font-size: 17px; line-height: 1.65; color: #2F3340; margin-top: 24px; }
.prose > * + * { margin-top: 18px; }
.prose h2 { margin-top: 48px; font-size: 26px; font-weight: 600; letter-spacing: -.02em; line-height: 1.2; color: var(--aip-ink); scroll-margin-top: 90px; }
.prose h3 { margin-top: 32px; font-size: 20px; font-weight: 600; color: var(--aip-ink); scroll-margin-top: 90px; }
.prose h2 + *, .prose h3 + * { margin-top: 12px; }
.prose ul, .prose ol { padding-left: 26px; }
.prose li + li { margin-top: 8px; }
.prose ol > li::marker { font-weight: 600; color: var(--aip-accent); }
.prose b, .prose strong { font-weight: 600; color: var(--aip-ink); }
.prose code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .9em; background: #F1F3F8; padding: 2px 6px; border-radius: 6px; }
.prose kbd { font: inherit; font-size: .9em; padding: 1px 7px; border: 1px solid #CBD2E0; border-bottom-width: 2px; border-radius: 6px; background: #fff; }
.prose table { border-collapse: collapse; width: 100%; font-size: 15px; }
.prose th, .prose td { border: 1px solid #E6E8EE; padding: 8px 12px; vertical-align: top; text-align: left; }
.prose th { background: #F4F6FB; font-weight: 600; }
.prose hr { border: 0; border-top: 1px solid #E6E8EE; margin: 40px 0; }
.prose blockquote { margin: 18px 0; padding: 14px 18px; border-left: 4px solid #CBD2E0; background: #F7F8FA; border-radius: 0 12px 12px 0; }
.prose blockquote p + p { margin-top: 8px; }
.prose .callout-warn { border-left-color: #E53935; background: #FFF4F3; }
.prose .callout-tip { border-left-color: #1E9E5A; background: #F0FAF4; }
.prose .callout-note { border-left-color: var(--aip-accent); background: #EEF2FD; }
.prose figure.shot { margin: 22px 0; }
.prose figure.shot img { display: block; border: 1px solid #E6E8EE; border-radius: 12px; box-shadow: 0 6px 24px rgba(27,39,71,.08); }
.prose figure.shot figcaption { margin-top: 8px; font-size: 14px; color: #6B7280; }
.help-pn { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 56px; }
.help-pn a { display: flex; flex-direction: column; gap: 4px; padding: 16px 20px; border: 1px solid #E6E8EE; border-radius: 12px; color: var(--aip-ink); }
.help-pn a:hover { background: #F4F6FB; text-decoration: none; }
.help-pn a small { color: #6B7280; font-size: 13px; }
.help-pn a span { font-weight: 600; }
.help-pn a.next { text-align: right; }
.help-foot { margin-top: 56px; padding-top: 24px; border-top: 1px solid #E6E8EE; font-size: 15px; color: #4B5563; }
.help-foot p + p { margin-top: 10px; }

/* ---------- Мобильная версия ---------- */
@media (max-width: 960px) {
  .help-hdr { grid-template-columns: auto 1fr auto; padding: 10px 16px; gap: 12px; }
  .help-top { display: none; }
  .help-burger { display: inline-flex; }
  .help-wrap { grid-template-columns: 1fr; }
  .help-side { display: none; border-right: 0; border-bottom: 1px solid #E6E8EE; }
  body.nav-open .help-side { display: block; }
  .help-nav { position: static; max-height: none; }
  .help-main { padding: 24px 16px 56px; }
  .help-main h1 { font-size: 28px; }
  .prose { font-size: 16px; }
  .help-pn { grid-template-columns: 1fr; }
  .help-pn a.next { text-align: left; }
}
@media (max-width: 600px) {
  .help-logo span { display: none; }
  .help-search input { padding-left: 38px; font-size: 14px; }
}
