/* ══ /help: инструкции для клиентов (OXEN-340) ══════════════════════════════
   Язык сайта, как на /brand: крупная типографика, тонкие линии вместо карточек, воздух между секциями.
   Первый экран — вопрос «что вы хотите сделать?» и строки-входы к главам; глава — секция во всю ширину.
   Текст от 16px, кнопки и строки от 48px, страница не прокручивается вбок. */

/* Отступ над подзаголовком главы и над его соседом справа — одно число, иначе строки разворота разъедутся */
.help-page { --help-sub-gap: 120px; }
.help-page .btn { font-size: 16px !important; min-height: 52px; }
/* Без висячих слов: заголовки ровными строками, абзацы без одинокого слова в последней строке. Предлоги к слову привязывает серверный типограф (OXEN-351) */
.help-page h1, .help-page h2, .help-page h3, .help-go__title { text-wrap: balance; }
.help-page p, .help-page li, .help-page figcaption, .help-go__sub { text-wrap: pretty; }

/* ── Первый экран ─────────────────────────────────────────────────────────── */
.help-hero {
  min-height: 0;
  align-items: stretch;
  justify-content: flex-start;
  text-align: left;
  padding: 200px 0 176px;
}
.help-hero__grid { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 6fr); gap: 96px; align-items: start; }
.hero.help-hero:not(.hero--pinned) .hero-title {
  margin: 0 0 40px !important;
  max-width: 100%;
  font-size: clamp(40px, 6.2vw, 84px) !important;
  line-height: 1.14 !important;
  letter-spacing: -0.03em;
}
.help-hero .hero-sub { margin: 0 !important; max-width: 28em; font-size: clamp(17px, 1.5vw, 20px); line-height: 1.75; color: var(--text-dim); }

.help-go { min-width: 0; padding-top: 12px; }
.help-go__ask { margin: 0 0 40px; font-family: var(--font-display); font-size: clamp(22px, 2vw, 28px); font-weight: 600; line-height: 1.25; color: var(--starlight); }
.help-go__list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--border); }
.help-go__list li { border-bottom: 1px solid var(--border); }
.help-go__row {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 24px; row-gap: 10px; align-items: center;
  min-height: 120px; padding: 32px 8px 32px 0;
  color: var(--starlight); text-decoration: none;
}
.help-go__title { font-family: var(--font-display); font-size: clamp(24px, 2.4vw, 34px); font-weight: 700; line-height: 1.15; letter-spacing: -0.02em; transition: color 0.25s ease, transform 0.35s cubic-bezier(0.16, 1, 0.3, 1); }
.help-go__sub { grid-column: 1; font-size: 16px; line-height: 1.5; color: var(--text-dim); }
.help-go__arrow {
  grid-column: 2; grid-row: 1 / span 2;
  display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 48px;
  border: 1px solid var(--border-glow); border-radius: 50%; color: var(--cherenkov); font-size: 20px;
  transition: background 0.25s ease, box-shadow 0.25s ease;
}
.help-go__row:hover .help-go__title, .help-go__row:focus-visible .help-go__title { color: var(--cherenkov); transform: translateX(6px); }
.help-go__row:hover .help-go__arrow, .help-go__row:focus-visible .help-go__arrow { background: var(--cherenkov-dim); box-shadow: 0 0 24px var(--cherenkov-glow); }
.help-go__more { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 32px; margin: 40px 0 0; font-size: 16px; color: var(--text-dim); }
.help-go__more a { display: inline-flex; align-items: center; min-height: 48px; color: var(--starlight); text-decoration: underline; text-decoration-color: var(--border-glow); text-underline-offset: 6px; }
.help-go__more a:hover { color: var(--cherenkov); }

/* ── Глава ────────────────────────────────────────────────────────────────── */
.help-chapter { position: relative; z-index: 2; padding: 192px 0; border-top: 1px solid var(--border); scroll-margin-top: 72px; }
.help-chapter__head { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 24px 48px; margin-bottom: 112px; }
.help-chapter__num { grid-column: 1 / -1; font-family: var(--font-display); font-size: 18px; font-weight: 600; color: var(--cherenkov); font-variant-numeric: tabular-nums; }
.help-chapter__title { margin: 0; max-width: 16ch; font-family: var(--font-display); font-size: clamp(36px, 5.2vw, 72px); font-weight: 700; line-height: 1.14; letter-spacing: -0.03em; }
.help-chapter__action { justify-self: end; }

/* Тело главы: подзаголовок слева, его текст, шаги и кадр — справа; вводный абзац — во всю ширину */
.help-chapter__body { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); column-gap: 120px; align-items: start; }
.help-chapter__body > * { grid-column: 2; min-width: 0; }
.help-chapter__body > h3 { grid-column: 1; margin: var(--help-sub-gap) 0 0; font-family: var(--font-display); font-size: clamp(22px, 2vw, 28px); font-weight: 600; line-height: 1.25; letter-spacing: -0.01em; }
.help-chapter__body > .help-lead { grid-column: 1 / -1; max-width: 32em; margin: 0 0 24px; font-size: clamp(20px, 2vw, 26px) !important; line-height: 1.6; color: var(--starlight) !important; }

.help-chapter p, .help-chapter li { font-size: 17px; line-height: 1.8; color: rgba(255, 255, 255, 0.86); max-width: 38em; }
.help-chapter p { margin: 0 0 28px; }
.help-chapter ul { list-style: none; margin: 0 0 28px; padding: 0; display: grid; gap: 20px; }
.help-chapter ul > li { position: relative; padding-left: 28px; }
.help-chapter ul > li::before { content: ''; position: absolute; left: 0; top: 0.85em; width: 14px; height: 1px; background: var(--cherenkov); }
.help-chapter a { color: var(--cherenkov); }
.help-chapter code { font-size: 0.92em; padding: 2px 6px; border-radius: 6px; background: rgba(0, 240, 255, 0.08); overflow-wrap: anywhere; }
.help-chapter kbd { font: inherit; font-size: 0.9em; padding: 1px 7px; border: 1px solid var(--border-glow); border-radius: 6px; }

/* Шаги: номер в том же круге, что метка на кадре, — шаг в тексте и на кадре узнаётся сразу */
.help-chapter ol.help-steps { list-style: none; margin: 0 0 28px; padding: 0; display: grid; gap: 32px; counter-reset: step; }
.help-steps > li { position: relative; min-height: 32px; padding-left: 52px; counter-increment: step; }
.help-steps > li::before {
  content: counter(step); position: absolute; left: 0; top: 0;
  width: 32px; height: 32px; border-radius: 50%; background: var(--cherenkov); color: var(--void);
  font-family: var(--font-display); font-size: 16px; font-weight: 700; line-height: 32px; text-align: center;
}
.help-note { padding: 28px 32px; border-left: 2px solid var(--cherenkov); background: rgba(0, 240, 255, 0.05); border-radius: 0 12px 12px 0; }
/* Текст под подзаголовком встаёт на одну линию с ним (правило сильнее отступов списков выше) */
.help-chapter .help-chapter__body > h3 + * { margin-top: calc(var(--help-sub-gap) + 2px); }
.help-status { display: inline-block; padding: 12px 20px; border: 1px solid rgba(245, 191, 60, 0.7); border-radius: 12px; color: #ffeab8 !important; }

/* Кадры сайта с метками шагов: метка — круг с номером шага поверх кадра, координаты в % от кадра */
.help-shot { margin: 72px 0 48px; }
.help-shot--tall { max-width: 440px; }
.help-shot__frame { position: relative; border: 1px solid var(--border); border-radius: 16px; overflow: hidden; background: var(--void-deep); box-shadow: 0 40px 120px -60px var(--cherenkov-glow); }
.help-shot__frame img { display: block; width: 100%; height: auto; }
.help-chapter .help-shot__marks { position: absolute; inset: 0; display: block; margin: 0; padding: 0; list-style: none; pointer-events: none; }
.help-chapter .help-shot__marks li {
  position: absolute; width: 32px; height: 32px; max-width: none; transform: translate(-50%, -50%);
  border-radius: 50%; background: var(--cherenkov); color: var(--void);
  font-family: var(--font-display); font-size: 16px; font-weight: 700; line-height: 32px; text-align: center;
  box-shadow: 0 0 0 3px rgba(2, 2, 2, 0.85), 0 0 18px var(--cherenkov-glow);
}
.help-chapter .help-shot__marks--mobile { display: none; }
.help-shot figcaption { margin-top: 24px; font-size: 16px; line-height: 1.6; color: var(--text-dim); max-width: 42em; }

.help-scroll { overflow-x: auto; margin: 0 0 16px; -webkit-overflow-scrolling: touch; }
.help-table { width: 100%; border-collapse: collapse; font-size: 16px; line-height: 1.5; }
.help-table th, .help-table td { padding: 16px 16px 16px 0; text-align: left; vertical-align: top; border-bottom: 1px solid var(--border); }
.help-table th { color: var(--text-dim); font-weight: 600; white-space: nowrap; }
.help-table--tools td:first-child { white-space: nowrap; }

.help-chapter__top { display: inline-flex; align-items: center; gap: 8px; min-height: 48px; margin-top: 96px; color: var(--text-dim); font-size: 16px; text-decoration: none; }
.help-chapter__top:hover { color: var(--cherenkov); }

/* ── Последняя секция ─────────────────────────────────────────────────────── */
.help-cta { position: relative; z-index: 2; padding: 176px 0 200px; border-top: 1px solid var(--border); }
.help-cta__inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 32px 48px; }
.help-cta p { margin: 0; max-width: 18em; font-family: var(--font-display); font-size: clamp(28px, 3.4vw, 48px); font-weight: 700; line-height: 1.2; letter-spacing: -0.02em; }


/* ── Адаптив ──────────────────────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .help-hero__grid { grid-template-columns: minmax(0, 1fr); gap: 56px; }
  .help-chapter__body { grid-template-columns: minmax(0, 1fr); }
  .help-chapter__body > *, .help-chapter__body > h3 { grid-column: 1; }
  .help-chapter__body > h3 { margin: 80px 0 24px; }
  .help-chapter .help-chapter__body > h3 + * { margin-top: 0; }
}
@media (max-width: 760px) {
  .help-hero { padding: 144px 0 112px; }
  .help-chapter { padding: 128px 0; }
  .help-chapter__head { grid-template-columns: minmax(0, 1fr); margin-bottom: 64px; }
  .help-chapter__action { justify-self: start; }
  .help-go__row { min-height: 104px; column-gap: 16px; }
  .help-cta { padding: 128px 0 144px; }
}
@media (max-width: 600px) {
  /* Телефон: мобильный кадр (тот же порог, что у <source> в views/help/public/_shot.ejs) */
  .help-shot, .help-shot--tall { width: auto; max-width: 360px; margin: 56px auto 40px; }
  .help-chapter .help-shot__marks--desktop { display: none; }
  .help-chapter .help-shot__marks--mobile { display: block; }
  .help-chapter .help-shot__marks li { width: 26px; height: 26px; font-size: 14px; line-height: 26px; }
  .help-steps > li { padding-left: 46px; }
  .help-table--tools td:first-child { white-space: normal; overflow-wrap: anywhere; }
  .help-table th, .help-table td { padding: 12px 10px 12px 0; }
  .help-page .btn { width: 100%; padding-left: 24px !important; padding-right: 24px !important; white-space: normal; text-align: center; }
}
@media print {
  .help-go, .help-cta, .help-chapter__action, .help-chapter__top { display: none; }
  .help-chapter__body { display: block; }
}
