/* Центр помощи: оглавление и отдельные страницы инструкций. */
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.help-page { padding-bottom: 24px; }
.help-hero { padding-block: clamp(32px, 6vw, 72px) 32px; display: grid; justify-items: start; gap: 14px; }
.help-hero h1 { font-size: clamp(32px, 5.4vw, 64px); line-height: 1.05; letter-spacing: -.04em; text-wrap: balance; margin: 0; }
.help-lead { max-width: 60ch; color: var(--muted); margin: 0; font-size: 16px; }
.help-search { display: flex; align-items: center; gap: 12px; width: min(640px, 100%); padding: 0 18px; min-height: 58px; border: 1px solid var(--line); border-radius: 16px; background: var(--panel); }
.help-search .icon { width: 20px; height: 20px; fill: none; stroke: var(--muted); stroke-width: 1.8; flex: none; }
.help-search input { flex: 1; min-width: 0; border: 0; background: none; color: var(--text); font: inherit; font-size: 16px; outline: none; }
.help-search:focus-within { border-color: var(--accent); }
.help-empty { color: var(--muted); margin: 0; }
.help-page :is(p, li, span) > a:not(.button) { color: var(--accent); }
[data-theme=light] .help-page :is(p, li, span) > a:not(.button) { color: #2f6b29; }

.hg-ic { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* Карточка раздела. */
.hg-card { padding: clamp(20px, 3vw, 32px); display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; min-width: 0; scroll-margin-top: 12px; }
.hg-card h2 { display: flex; align-items: center; gap: 12px; margin: 0; font-size: clamp(21px, 2.4vw, 25px); letter-spacing: -.03em; }
.hg-h-ic { width: 40px; height: 40px; padding: 9px; flex: none; border-radius: 12px; background: color-mix(in srgb, var(--accent) 14%, transparent); fill: none; stroke: var(--accent); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.hg-card p { margin: 0; color: var(--muted); max-width: 72ch; }
.hg-card b { color: var(--text); font-weight: 600; }
.hg-sub { margin: 6px 0 0; font-size: 16px; letter-spacing: -.01em; }
.hg-muted { font-size: 13px; }
.hg-pane { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; min-width: 0; }

.hg-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(190px, 100%), 1fr)); gap: 10px; }
.hg-steps li { display: flex; gap: 12px; padding: 16px; border: 1px solid var(--line); border-radius: 16px; background: var(--panel-2); min-width: 0; }
.hg-step-ic b, .hg-numlist li::before { width: 28px; height: 28px; flex: none; display: grid; place-items: center; border-radius: 9px; background: var(--accent); color: var(--accent-ink); font-size: 14px; font-weight: 700; }
.hg-steps div { display: grid; gap: 4px; align-content: start; }
.hg-steps div > span { color: var(--muted); font-size: 14px; }
.hg-actions { display: flex; flex-wrap: wrap; gap: 10px; }

.hg-numlist { list-style: none; counter-reset: n; margin: 0; padding: 0; display: grid; gap: 10px; max-width: 72ch; }
.hg-numlist li { counter-increment: n; display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 12px; align-items: start; }
.hg-numlist li::before { content: counter(n); transform: translateY(-1px); }
.hg-defs { margin: 0; padding-left: 20px; display: grid; gap: 8px; color: var(--muted); max-width: 72ch; }
.hg-defs li::marker { color: var(--accent); }

/* Переключатели: вход, устройство, приложение. */
.hg-seg { display: flex; min-width: 0; gap: 4px; padding: 4px; border: 1px solid var(--line); border-radius: 14px; width: fit-content; max-width: 100%; overflow-x: auto; scrollbar-width: none; background: var(--panel-2); }
.hg-seg button { flex: none; padding: 9px 14px; border: 0; border-radius: 10px; background: none; color: var(--muted); font: inherit; font-size: 14px; cursor: pointer; white-space: nowrap; }
.hg-seg button[aria-selected=true] { background: var(--accent); color: var(--accent-ink); font-weight: 600; }
.hg-seg button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.hg-note { display: flex; gap: 12px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel-2); color: var(--muted); font-size: 14px; }
.hg-note-ic { width: 20px; height: 20px; flex: none; fill: none; stroke: var(--accent); stroke-width: 1.8; stroke-linecap: round; }

.hg-plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(230px, 100%), 1fr)); gap: 12px; }
.hg-plan { position: relative; padding: 20px; border: 1px solid var(--line); border-radius: 18px; background: var(--panel-2); display: grid; gap: 8px; align-content: start; }
.hg-plan h3 { margin: 0; font-size: 18px; padding-right: 120px; }
.hg-plan strong { font-size: 26px; letter-spacing: -.02em; }
.hg-plan small { font-size: 13px; color: var(--muted); font-weight: 400; }
.hg-plan ul { margin: 0; padding-left: 18px; color: var(--muted); font-size: 14px; display: grid; gap: 4px; }
.hg-tag { position: absolute; top: 18px; right: 18px; padding: 4px 10px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font-size: 12px; font-weight: 600; }

/* Видео и снимки экрана: по нажатию, без звука. */
.hg-media { margin: 0; display: grid; grid-template-columns: minmax(0, 1fr); justify-items: center; gap: 8px; min-width: 0; }
.hg-media img, .hg-media video { display: block; width: min(320px, 100%); max-width: 100%; min-width: 0; height: auto; border: 1px solid var(--line); border-radius: 22px; background: var(--panel-2); }
.hg-media figcaption { color: var(--muted); font-size: 13px; text-align: center; }
.hg-pair { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); gap: 16px; align-items: start; }
.hg-pair-text { grid-template-columns: minmax(0, 1.3fr) minmax(220px, 1fr); }


.hg-groups { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.hg-groups li { display: grid; gap: 2px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel-2); }
.hg-groups span { color: var(--muted); font-size: 14px; }
.hg-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr)); gap: 10px; }
.hg-tiles div { display: grid; gap: 4px; padding: 16px; border: 1px solid var(--line); border-radius: 16px; background: var(--panel-2); }
.hg-tiles span { color: var(--muted); font-size: 14px; }

.help-faq { display: grid; gap: 8px; }
.help-faq details { border: 1px solid var(--line); border-radius: 16px; background: var(--panel-2); scroll-margin-top: 24px; }
.help-faq summary { cursor: pointer; padding: 16px 20px; font-weight: 600; font-size: 15px; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.help-faq summary::-webkit-details-marker { display: none; }
.help-faq summary::after { content: '+'; color: var(--accent); font-size: 22px; line-height: 1; }
.help-faq details[open] summary::after { content: '–'; }
.help-faq details > div { padding: 0 20px 16px; color: var(--muted); }
.help-faq details > div p { margin: 0; }
.help-faq details:target { border-color: var(--accent); }
.help-contacts { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr)); gap: 10px; }
.help-contact { display: grid; gap: 6px; padding: 18px; border: 1px solid var(--line); border-radius: 16px; background: var(--panel-2); color: var(--text); text-decoration: none; min-width: 0; overflow-wrap: anywhere; }
a.help-contact:hover { border-color: var(--accent); }
.help-contact span { color: var(--muted); font-size: 14px; }
[hidden] { display: none !important; }

/* 10.11: иконки — из страницы подписки (приложения, платформы, магазины) и групп маршрутизации. */
.hg-steps li { flex-direction: column; gap: 14px; }
.hg-step-ic { position: relative; width: 44px; height: 44px; display: grid; place-items: center; border-radius: 14px; background: color-mix(in srgb, var(--accent) 14%, transparent); }
.hg-step-ic svg { width: 22px; height: 22px; fill: none; stroke: var(--accent); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.hg-step-ic b { position: absolute; top: -6px; right: -6px; width: 20px !important; height: 20px !important; border-radius: 7px !important; font-size: 11px !important; }
.hg-seg button { display: inline-flex; align-items: center; gap: 8px; }
.hg-seg button .hg-ic { width: 17px; height: 17px; }
.hg-apps { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr)); gap: 12px; align-items: start; }
.hg-app { display: grid; gap: 14px; align-content: start; padding: 18px; border: 1px solid var(--line); border-radius: 18px; background: var(--panel-2); min-width: 0; transition: border-color .2s; }
.hg-app.is-featured { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); background: linear-gradient(160deg, color-mix(in srgb, var(--accent) 9%, var(--panel-2)), var(--panel-2) 60%); }
.hg-app header { display: flex; align-items: center; gap: 12px; }
.hg-app header strong { font-size: 17px; letter-spacing: -.01em; }
.hg-app-ic { width: 40px; height: 40px; flex: none; color: var(--accent); border-radius: 11px; }
.hg-badge { margin-left: auto; padding: 4px 10px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font-size: 11px; font-weight: 700; letter-spacing: .02em; white-space: nowrap; }
.hg-dls { display: flex; flex-wrap: wrap; gap: 8px; }
.help-page a.hg-dl { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 11px; background: var(--panel); color: var(--text); text-decoration: none; font-size: 13px; font-weight: 600; transition: border-color .2s, transform .2s; }
.help-page a.hg-dl:hover { border-color: var(--accent); transform: translateY(-1px); }
.help-page a.hg-dl-soft { font-weight: 500; color: var(--muted); }
.hg-dl-ic { width: 17px; height: 17px; flex: none; }
.hg-how { border-top: 1px solid var(--line); padding-top: 10px; }
.hg-how summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; color: var(--muted); font-size: 14px; font-weight: 600; }
.hg-how summary::-webkit-details-marker { display: none; }
.hg-how summary::after { content: '+'; color: var(--accent); font-size: 20px; line-height: 1; }
.hg-how[open] summary::after { content: '–'; }
.hg-how ol { list-style: none; counter-reset: s; margin: 12px 0 0; padding: 0; display: grid; gap: 10px; }
.hg-how li { counter-increment: s; display: grid; grid-template-columns: 22px 1fr; column-gap: 10px; row-gap: 2px; font-size: 14px; }
.hg-how li::before { content: counter(s); grid-row: span 2; width: 22px; height: 22px; display: grid; place-items: center; border-radius: 7px; background: color-mix(in srgb, var(--accent) 18%, transparent); color: var(--accent); font-size: 12px; font-weight: 700; }
.hg-how li span { color: var(--muted); }
.hg-how li.hg-warn::before { content: '!'; background: color-mix(in srgb, #f5b84b 22%, transparent); color: #f5b84b; }
.hg-how li.hg-warn { counter-increment: none; }
.hg-groups li { grid-template-columns: 40px 1fr; display: grid; gap: 12px; align-items: center; }
.hg-groups li > div { display: grid; gap: 2px; }
.hg-grp-ic, .hg-tile-ic { width: 40px; height: 40px; padding: 8px; border-radius: 12px; background: color-mix(in srgb, var(--accent) 13%, transparent); color: var(--accent); flex: none; }
.hg-tiles div { align-content: start; }
.hg-tiles .hg-tile-ic, .help-contact .hg-tile-ic { margin-bottom: 6px; width: 38px; height: 38px; fill: none; stroke: var(--accent); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

@media (max-width: 960px) {
  .hg-pair-text { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  .hg-plan h3 { padding-right: 0; }
  .hg-tag { position: static; justify-self: start; }
}
/* Текст слева, видео или снимок справа (на узком экране — друг под другом). */
.hg-split { display: grid; min-width: 0; grid-template-columns: minmax(0, 1fr) minmax(220px, 300px); gap: 24px; align-items: start; }
.hg-split-text { display: grid; gap: 14px; align-content: start; min-width: 0; }
.hg-split .hg-media img, .hg-split .hg-media video { width: 100%; }
@media (max-width: 760px) { .hg-split { grid-template-columns: minmax(0, 1fr); } .hg-split .hg-media img, .hg-split .hg-media video { width: min(300px, 100%); } }

/* Снимки экранов кабинета раскрываются по одному клику. */
.hg-screens { display: grid; gap: 8px; }
.hg-screens details {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel-2);
  scroll-margin-top: 12px;
}
.hg-screens summary { padding: 14px 16px; font-weight: 650; cursor: pointer; }
.hg-screen-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 320px);
  align-items: start;
  gap: 16px;
  padding: 0 16px 16px;
}
.hg-screen-body p + p { margin-top: 10px; }
.hg-screen-image { display: block; justify-self: center; width: min(100%, 320px); }
.hg-screen-image img { display: block; width: 100%; height: auto; border: 1px solid var(--line); border-radius: 14px; }
@media (max-width: 760px) { .hg-screen-body { grid-template-columns: minmax(0, 1fr); } }

/* На страницах справки шапка прокручивается вместе с текстом. */
html:has(.help-surface) { scroll-behavior: auto; scroll-padding-top: 12px; -webkit-text-size-adjust: 100%; }
.help-surface > .header { position: relative; top: auto; min-height: 64px; }
.help-surface > .skip-link:not(:focus-visible) { clip-path: inset(50%); pointer-events: none; }
.help-page { overflow-wrap: anywhere; }
.help-shell { width: min(1120px, calc(100% - clamp(24px, 6vw, 72px))); margin-inline: auto; min-width: 0; }
.help-directory { display: block; }
.help-group h2 { font-size: 19px; margin-bottom: 8px; }
.help-links { padding: 0; margin: 0; list-style: none; border-top: 1px solid var(--line); }
.help-page .help-links a {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 15px 8px;
  min-height: 62px;
  border-bottom: 1px solid var(--line);
  color: var(--text);
}
.help-page .help-links a:hover { background: var(--panel-2); }
.help-links a > span { display: grid; gap: 3px; }
.help-links small { color: var(--muted); font-size: 13px; }
.help-links .hg-ic { color: var(--muted); }
.help-links .hg-ic:first-child { color: var(--accent); }
#help-results > ul { max-width: 640px; }
#help-results .help-links a { grid-template-columns: minmax(0, 1fr) auto; }
.help-breadcrumb, .help-next { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; }
.help-breadcrumb { margin-block: 20px 14px; }
.help-breadcrumb a, .help-next a { display: inline-flex; align-items: center; gap: 5px; min-height: 44px; color: var(--muted); }
.help-breadcrumb a:hover, .help-next a:hover { color: var(--text); text-decoration: underline; }
.help-topic-title { font-size: clamp(28px, 5vw, 50px); line-height: 1.12; letter-spacing: -.035em; margin: 0 0 6px; }
.help-articles { display: grid; gap: 18px; min-width: 0; }
.help-articles .hg-card { border: 1px solid var(--line); border-radius: 16px; background: var(--panel); }
.help-next { justify-content: space-between; margin-top: 16px; }
@media (max-width: 760px) {
  .help-surface > .header { gap: 8px; }
  .help-articles .hg-card { padding: 16px; }
  .hg-split { gap: 18px; }
  .hg-app header { flex-wrap: wrap; }
}

/* В справке о кабинете шаги идут перед компактным снимком. */
.help-cabinet { max-width: 740px; }
.help-cabinet :is(.hg-split, .hg-screen-body) { grid-template-columns: minmax(0, 1fr); gap: 16px; }
.help-cabinet .hg-media > a, .help-cabinet .hg-screen-image { display: block; width: min(232px, 100%); }
.help-cabinet .hg-media img { width: 100%; }

/* Главная помощи — разделы карточками (22.11): 2 колонки на телефоне, 3 на компьютере. */
.help-eyebrow { margin: 0 0 4px; font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.help-cards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.help-cards li.is-wide { grid-column: 1 / -1; }
.help-page .help-cards a { display: flex; flex-direction: column; gap: 10px; height: 100%; padding: 18px; border: 1px solid var(--line); border-radius: 16px; background: var(--panel); color: var(--text); transition: border-color .15s ease, background .15s ease; }
.help-page .help-cards a:hover { border-color: var(--accent); background: var(--panel-2); }
.help-cards a > span { display: grid; gap: 4px; }
.help-cards strong { font-size: 16px; line-height: 1.25; color: var(--text); }
.help-cards small { color: var(--muted); font-size: 13px; line-height: 1.35; }
.help-cards .hg-ic { width: 24px; height: 24px; color: var(--accent); }
.help-cards li.is-wide a { flex-direction: row; align-items: center; gap: 14px; }
.help-page .help-cta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; margin-top: 14px; padding: 16px 18px; border: 1px solid color-mix(in srgb, var(--accent) 45%, var(--line)); border-radius: 16px; background: color-mix(in srgb, var(--accent) 8%, var(--panel)); color: var(--text); }
.help-cta strong { display: inline-flex; align-items: center; gap: 4px; color: var(--accent); }
.help-page .help-next { flex-wrap: nowrap; align-items: flex-start; }
.help-page .help-next a { min-width: 0; }
.help-page .help-next .help-next-forward { flex-direction: column; align-items: flex-end; gap: 0; margin-left: auto; text-align: right; }
.help-next-forward small { font-size: 12px; }
.help-next-forward span { display: inline-flex; align-items: center; gap: 4px; color: var(--text); font-weight: 600; }
@media (max-width: 760px) {
  .help-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .help-page .help-cards a { padding: 14px 12px; gap: 8px; }
  .help-cards strong { font-size: 14.5px; }
  .help-cards small { font-size: 12.5px; }
  /* Нечётная последняя карточка — во всю ширину, без дырки справа. */
  .help-cards li:last-child:nth-child(even) { grid-column: 1 / -1; }
  /* Устройства на телефоне — переносятся на вторую строку, а не уезжают за край. */
  .hg-seg.hg-seg-wide { flex-wrap: wrap; width: auto; overflow: visible; background: none; border: 0; padding: 0; gap: 8px; }
  .hg-seg.hg-seg-wide button { border: 1px solid var(--line); border-radius: 999px; padding: 8px 13px; }
  .hg-seg.hg-seg-wide button[aria-selected=true] { border-color: var(--accent); }
}
