/* Раздел «Инструкция» (/help): статья поверх общего оформления посадочных страниц
   (platforma-dlya-meropriyatiy.css). Страницы собирает scripts/build-help-pages.js. */

.help-layout {
  padding: clamp(28px, 5vw, 56px) 0 clamp(48px, 7vw, 88px);
}

.help-breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 22px;
  color: var(--muted);
  font-size: 14px;
}

.help-breadcrumbs a {
  color: var(--accent-light);
}

.help-article {
  max-width: 820px;
}

.help-article h1 {
  margin-bottom: 20px;
  font-size: clamp(30px, 5vw, 46px);
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.help-article h2 {
  margin: 52px 0 14px;
  font-size: clamp(22px, 3vw, 28px);
  line-height: 1.25;
  letter-spacing: -0.01em;
}

.help-article h3 {
  margin: 32px 0 10px;
  font-size: 20px;
  line-height: 1.3;
}

.help-article p,
.help-article li {
  color: #dce0f3;
  font-size: 17px;
  line-height: 1.65;
}

.help-article p {
  margin: 0 0 16px;
}

.help-article ul,
.help-article ol {
  margin: 0 0 20px;
  padding-left: 26px;
}

.help-article li {
  margin-bottom: 8px;
}

.help-article li::marker {
  color: var(--accent-light);
}

.help-article strong {
  color: var(--text);
}

.help-article a {
  color: var(--accent-light);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.help-lead {
  color: var(--muted) !important;
  font-size: 19px !important;
}

.help-table {
  margin: 0 0 24px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.028);
}

.help-table table {
  min-width: 0;
}

.help-table th,
.help-table td,
.help-table tbody td,
.help-table tbody td:last-child {
  width: auto;
  padding: 12px 16px;
  color: #dce0f3;
  background: transparent;
  font-size: 15px;
  line-height: 1.5;
}

.help-table thead th {
  color: var(--muted);
  background: rgba(255, 255, 255, 0.035);
  font-size: 12px;
}

.help-table tbody td:first-child {
  color: var(--text);
  font-weight: 600;
}

.help-toc {
  margin: 0 0 36px;
  padding: 18px 22px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.03);
}

.help-toc-title {
  margin: 0 0 8px !important;
  color: var(--muted) !important;
  font-size: 13px !important;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.help-toc ol {
  margin: 0;
  padding-left: 22px;
  columns: 2 260px;
  column-gap: 32px;
}

.help-toc li {
  margin-bottom: 4px;
  font-size: 15px;
  break-inside: avoid;
}

.help-toc a {
  text-decoration: none;
}

.help-figure {
  margin: 8px 0 24px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.02);
}

.help-figure-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.help-figure svg {
  display: block;
  width: 100%;
  min-width: 640px;
  height: auto;
}

.help-sections {
  display: grid;
  gap: 14px;
  margin: 28px 0 !important;
  padding: 0 !important;
  list-style: none;
}

.help-sections li {
  margin: 0;
}

.help-sections a {
  display: block;
  padding: 20px 22px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.035);
  text-decoration: none !important;
  transition: border-color 0.18s ease, background 0.18s ease;
}

.help-sections a:hover,
.help-sections a:focus-visible {
  border-color: rgba(129, 140, 248, 0.5);
  background: rgba(129, 140, 248, 0.07);
}

.help-sections strong {
  display: block;
  margin-bottom: 6px;
  color: var(--text);
  font-size: 19px;
}

.help-sections span {
  color: var(--muted);
  font-size: 15px;
}

.help-pager {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 56px;
}

.help-pager-link {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.03);
  text-decoration: none !important;
}

.help-pager-link:hover,
.help-pager-link:focus-visible {
  border-color: rgba(129, 140, 248, 0.5);
}

.help-pager-link small {
  color: var(--muted);
  font-size: 13px;
}

.help-pager-link span {
  color: var(--text);
  font-weight: 700;
}

.help-pager-next {
  grid-column: 2;
  text-align: right;
}

.header-nav a[aria-current="page"] {
  color: var(--text);
}

@media (max-width: 640px) {
  .help-article p,
  .help-article li {
    font-size: 16px;
  }

  /* Таблица от трёх колонок на телефоне — стопка карточек: строка становится карточкой,
     а подпись колонки встаёт над значением (data-label проставляет сборщик). */
  .help-table-wide {
    overflow: visible;
    border: 0;
    border-radius: 0;
    background: transparent;
  }

  .help-table-wide table,
  .help-table-wide tbody,
  .help-table-wide tr,
  .help-table-wide td {
    display: block;
    width: 100%;
  }

  .help-table-wide thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }

  .help-table-wide tr {
    margin-bottom: 12px;
    padding: 12px 16px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.028);
  }

  .help-table-wide td,
  .help-table-wide tbody td,
  .help-table-wide tbody td:last-child {
    padding: 6px 0;
    border: 0;
  }

  .help-table-wide td::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 2px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
  }

  .help-table-wide td:first-child::before {
    display: none;
  }

  .help-table-wide tbody td:first-child {
    font-size: 17px;
  }

  .help-pager {
    grid-template-columns: 1fr;
  }

  .help-pager-next {
    grid-column: auto;
    text-align: left;
  }
}
