/* The Help and Getting started pages (src/pages/help.ts, src/pages/getting-started.ts). They are laid out like the legal pages (the .legal grid and its head and contents list, in site.css), and only what is
   their own is written here: an answer behind a tap, and a numbered step. Every side is written as start and end, so the page turns with its direction. */

/* Help: the contents list has no numbers, because its groups are not numbered sections. */
.help .toc ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.help-groups {
  max-width: 68ch;
}

.help-groups section {
  margin-bottom: 40px;
  scroll-margin-top: 16px;
}

.help-groups h2 {
  margin-bottom: 12px;
}

.help-groups details {
  border-bottom: 1px solid var(--border);
  scroll-margin-top: 16px;
}

.help-groups details:first-of-type {
  border-top: 1px solid var(--border);
}

/* The question is the whole row, so a tap anywhere on it opens the answer. The mark at its end is drawn here, a plus that becomes a minus, in place of the browser's own triangle. */
.help-groups summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 0;
  font-weight: 600;
  font-size: 18px;
  line-height: 1.35;
  cursor: pointer;
  list-style: none;
}

.help-groups summary::-webkit-details-marker {
  display: none;
}

.help-groups summary::after {
  content: "";
  flex: none;
  width: 14px;
  height: 14px;
  background:
    linear-gradient(var(--ink-muted), var(--ink-muted)) center / 14px 2px no-repeat,
    linear-gradient(var(--ink-muted), var(--ink-muted)) center / 2px 14px no-repeat;
  transition: transform 0.2s ease;
}

.help-groups details[open] summary::after {
  background:
    linear-gradient(var(--ink-muted), var(--ink-muted)) center / 14px 2px no-repeat;
}

.help-groups summary:hover {
  color: var(--beat-text);
}

.help-groups .answer {
  padding-bottom: 16px;
  color: var(--ink-muted);
}

.help-groups .answer p:last-child,
.help-groups .answer ul:last-child {
  margin-bottom: 0;
}

.help-groups .answer ul {
  margin-top: 0;
  padding-inline-start: 1.3em;
}

.help-groups .answer li {
  margin-bottom: 0.5em;
}

.help-groups .answer strong {
  color: var(--ink);
}

.help-contact p {
  font-size: 19px;
}

/* The link to the same page in the other language, under the lead of both pages. */
.other-language {
  margin: 16px 0 0;
  font-size: 15px;
}

/* Getting started: one column of numbered steps, the number in the round mark the home page's steps have. */
.guide {
  padding-top: 16px;
  padding-bottom: 32px;
}

.guide .legal-head {
  margin-bottom: 40px;
}

.guide-steps {
  max-width: 68ch;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.guide-steps > li {
  counter-increment: step;
  position: relative;
  padding-inline-start: 56px;
  padding-bottom: 32px;
  scroll-margin-top: 16px;
}

.guide-steps > li::before {
  content: counter(step);
  position: absolute;
  inset-inline-start: 0;
  top: 0;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  background: var(--beat);
  color: var(--on-beat);
  font-weight: 650;
}

/* The line that joins a step's number to the next one's. The last step has none. */
.guide-steps > li:not(:last-child)::after {
  content: "";
  position: absolute;
  inset-inline-start: 17px;
  top: 44px;
  bottom: 8px;
  width: 2px;
  border-radius: 2px;
  background: var(--border);
}

.guide-steps h2 {
  font-size: clamp(21px, 2.6vw, 25px);
  line-height: 1.25;
  margin-bottom: 8px;
  padding-top: 3px;
}

.guide-steps p,
.guide-steps li li {
  color: var(--ink-muted);
}

.guide-steps ul {
  margin: 0 0 1em;
  padding-inline-start: 1.3em;
}

.guide-steps li li {
  margin-bottom: 0.4em;
}

.guide-steps strong {
  color: var(--ink);
}

.guide-next {
  max-width: 68ch;
  padding-top: 8px;
}

@media (prefers-reduced-motion: reduce) {
  .help-groups summary::after {
    transition: none;
  }
}
