/*
 * Страница справки (DRE-120): заголовок с адресами проекта, оглавление с якорями
 * и листы для чтения по разделам. От 1024 px оглавление стоит слева и прилипает
 * под шапкой, пока читается раздел.
 */
.help-hero {
  padding: clamp(2.5rem, 7svh, 5.5rem) 1rem clamp(2rem, 5svh, 3.5rem);
}

.help-hero__inner {
  display: grid;
  gap: 1rem;
  width: 100%;
  max-width: 72rem;
  margin-inline: auto;
}

.help-hero__inner .addresses {
  max-width: 44rem;
  margin-top: 1rem;
}

.help-hero__note {
  max-width: 44rem;
  line-height: 1.9;
}

.addresses__link[aria-current="page"] {
  background-color: var(--color-field);
}

.help-layout {
  display: grid;
  gap: 1rem;
  width: 100%;
  max-width: calc(72rem + 2rem);
  margin-inline: auto;
  padding: 0 1rem;
}

/* Оглавление: разделы страницы и вложенный список подразделов «Участнику». */
.toc {
  align-self: start;
}

.toc__title {
  margin-bottom: 0.5rem;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-lead);
}

.toc__list,
.toc__list ol {
  display: grid;
  list-style: none;
}

.toc__list ol {
  padding-left: 1rem;
  margin-bottom: 0.25rem;
  border-left: 1px solid var(--color-rule);
}

.toc a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0 0.5rem;
  border-radius: 6px;
  font-weight: 600;
  color: var(--color-heading);
  text-decoration: none;
  transition: background-color var(--duration-fast) var(--ease-move);
}

.toc ol ol a {
  font-weight: 400;
  color: var(--color-text);
}

@media (hover: hover) {
  .toc a:hover {
    background-color: var(--color-field);
  }
}

.help-content {
  display: grid;
  gap: 1rem;
  min-width: 0;
}

/* Лист раздела: мера чтения до 44rem, отступ сверху больше, чем снизу. */
.help-section {
  display: grid;
  gap: 1rem;
  scroll-margin-top: var(--header-space);
}

.help-section > p,
.help-section > ul,
.help-section > dl,
.help-section > details {
  max-width: 44rem;
}

.help-section p {
  line-height: 1.65;
}

.help-section__title {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.25rem 0.75rem;
}

.help-section__sub {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.25rem 0.75rem;
  margin-top: 1rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--color-rule);
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--color-heading);
  scroll-margin-top: var(--header-space);
}

.help-list {
  display: grid;
  gap: 0.625rem;
  list-style: none;
}

.help-list li {
  position: relative;
  padding-left: 1.5rem;
  line-height: 1.6;
}

.help-list li::before {
  content: "";
  position: absolute;
  top: 0.75em;
  left: 0;
  width: 0.75rem;
  height: 2px;
  background-color: var(--color-sky);
}

/* Термины интерфейса: название слева, пояснение справа; на телефоне — друг под другом. */
.help-terms {
  display: grid;
}

.help-terms > div {
  display: grid;
  gap: 0.25rem;
  padding: 0.75rem 0;
  border-top: 1px solid var(--color-rule);
}

.help-terms > div:first-child {
  border-top: 0;
  padding-top: 0;
}

.help-terms dt {
  font-weight: 700;
  color: var(--color-heading);
}

.help-terms dd {
  line-height: 1.6;
}

.help-section__aside {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.0625rem;
  line-height: 1.5;
  color: var(--color-lead);
}

.help-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-weight: 600;
  color: var(--color-heading);
  text-decoration-color: var(--color-sky);
  text-decoration-thickness: 2px;
}

@media (min-width: 768px) {
  .help-terms > div {
    grid-template-columns: 13rem minmax(0, 1fr);
    gap: 1.5rem;
  }
}

@media (min-width: 1024px) {
  .help-layout {
    grid-template-columns: 17rem minmax(0, 1fr);
    gap: 1.5rem;
    align-items: start;
  }

  .toc {
    position: sticky;
    top: var(--header-space);
  }
}
