/* ClapperBoard help pages.
   Loaded only by pages under /clapperboard/help/, so the site-wide
   style.css needs no cache-buster bump when this changes.
   Uses style.css's custom properties throughout, so light and dark
   both follow the site automatically. */

.help {
  max-width: 760px;
  margin: 0 auto;
  padding: 1rem 1.5rem 5rem;
  line-height: 1.7;
  color: var(--text);
}

.help p {
  margin: 0 0 1.25rem;
}

/* Links in running text.
   style.css resets every link to `color: inherit; text-decoration: none`,
   which suits a marketing site where each link is a styled button, but makes
   a manual's cross-references invisible. Put the colour and the underline
   back for help content only. Declared before .help-back and .help-toc so
   those keep their own treatment on source order. */

.help a {
  color: var(--primary-accent);
  text-decoration: underline;
  text-underline-offset: 0.15em;
  text-decoration-thickness: 0.06em;
}

.help a:hover {
  text-decoration-thickness: 0.12em;
}

.help ul,
.help ol {
  margin: 0 0 1.25rem;
  padding-left: 1.25rem;
}

.help li {
  margin: 0 0 0.4rem;
}

.help h2 {
  margin: 3rem 0 1rem;
  font-size: 1.4rem;
  letter-spacing: -0.01em;
  scroll-margin-top: 5rem; /* clears the sticky header on anchor jumps */
}

.help h2:first-of-type {
  margin-top: 1.5rem;
}

.help h3 {
  margin: 2rem 0 0.75rem;
  font-size: 1.1rem;
  color: var(--text-secondary);
  scroll-margin-top: 5rem;
}

/* Back to contents */

.help-back {
  margin: 0 0 1.5rem;
  font-size: 0.9rem;
}

.help-back a {
  color: var(--text-secondary);
  text-decoration: none;
}

.help-back a:hover {
  color: var(--primary-accent);
}

/* On this page */

.help-toc {
  margin: 0 0 2.5rem;
  padding: 1rem 1.25rem;
  background: var(--bg-secondary);
  border-radius: 12px;
}

.help-toc p {
  margin: 0 0 0.5rem;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-secondary);
}

.help-toc ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.25rem;
}

.help-toc a {
  color: var(--primary-accent);
  text-decoration: none;
}

.help-toc a:hover {
  text-decoration: underline;
}

/* Shortcut tables */

.help table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 1.5rem;
}

.help th {
  text-align: left;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-secondary);
  padding: 0 0 0.5rem;
  border-bottom: 1px solid var(--border);
}

.help td {
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--border);
  vertical-align: baseline;
}

.help td:first-child {
  width: 9.5rem;
  white-space: nowrap;
  padding-right: 1rem;
}

/* Key caps */

kbd {
  display: inline-block;
  min-width: 1.5em;
  padding: 0.15em 0.45em;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 0.9em;
  line-height: 1.4;
  text-align: center;
  color: var(--text);
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 5px;
  box-shadow: 0 1px 0 var(--border);
}

/* Asides */

.help-note {
  margin: 0 0 1.5rem;
  padding: 0.85rem 1.1rem;
  background: var(--bg-secondary);
  border-left: 3px solid var(--clapperboard-accent);
  border-radius: 0 8px 8px 0;
  font-size: 0.95rem;
}

.help-note p {
  margin: 0 0 0.6rem;
}

.help-note p:last-child {
  margin: 0;
}

.help-meta {
  margin-top: 3rem;
  color: var(--text-secondary);
  font-size: 0.85rem;
}

@media (max-width: 600px) {
  .help td:first-child {
    width: auto;
    white-space: normal;
  }
}
