/* Help pages and rendered Markdown. Loaded by the help pages only; uses the tokens of app.css. */

/* ---------- Rendered Markdown (MarkdownView) ---------- */
.md { line-height: 1.6; color: var(--text); overflow-wrap: anywhere; }
.md > :first-child { margin-top: 0; }
.md p, .md ul, .md ol, .md pre, .md .md-table { margin: 0 0 var(--space-4); }
.md h1, .md h2, .md h3, .md h4 { margin: var(--space-6) 0 var(--space-3); scroll-margin-top: var(--space-5); }
.md h2 { font-size: var(--text-xl); }
.md h3 { font-size: var(--text-lg); margin-top: var(--space-5); }
.md h4 { font-size: var(--text-md); }
.md ul, .md ol { padding-inline-start: var(--space-5); }
.md li { margin: var(--space-1) 0; }
.md li::marker { color: var(--text-muted); }
.md strong { font-weight: 650; }
.md a { text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--accent) 40%, transparent); }
.md a:hover { text-decoration-color: var(--accent); }
.md code {
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 4px;
  padding: 0.05em 0.3em; font-size: 0.88em; white-space: break-spaces;
}
.md pre.md-code {
  background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius);
  padding: var(--space-3) var(--space-4); overflow-x: auto; line-height: 1.5;
}
.md pre.md-code code { background: none; border: 0; padding: 0; font-size: var(--text-sm); white-space: pre; }
.md .md-table { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.md table { width: 100%; border-collapse: collapse; font-size: var(--text-sm); }
.md th, .md td { text-align: start; vertical-align: top; padding: 0.55rem var(--space-3); border-bottom: 1px solid var(--border); }
.md thead th { background: var(--surface-2); font-weight: 600; color: var(--text-muted); }
.md tbody tr:last-child > * { border-bottom: 0; }
.md td code { overflow-wrap: normal; word-break: normal; }
.help-body > p, .help-body > ul, .help-body > ol { max-width: 46rem; }

/* ---------- Help list ---------- */
.help-index { max-width: 52rem; }
.help-group { margin-top: var(--space-6); }
.help-group h2 { font-size: var(--text-sm); text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-muted); margin-bottom: var(--space-3); }
.help-list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-3); }
.help-list li {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: var(--space-4) var(--space-5);
}
.help-list li:hover { border-color: var(--border-strong); }
.help-list a { display: inline-flex; align-items: center; gap: var(--space-2); font-weight: 650; font-size: var(--text-lg); }
.help-list p { margin: var(--space-2) 0 0; color: var(--text-muted); max-width: 46rem; }

/* ---------- Help article ---------- */
.help-article {
  max-width: 56rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: var(--space-5) var(--space-6) var(--space-4); margin-top: var(--space-5);
}
.help-updated { color: var(--text-faint); font-size: var(--text-sm); margin: 0 0 var(--space-4); }
.help-body { font-size: 1rem; }
.help-body > p:first-child { font-size: var(--text-lg); color: var(--text-muted); line-height: 1.5; }
.help-related { max-width: 56rem; margin: var(--space-5) 0 var(--space-7); }
.help-related h2 { font-size: var(--text-sm); text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-muted); margin-bottom: var(--space-2); }
.help-related ul { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: var(--space-2); }
.help-related a {
  display: inline-block; padding: var(--space-1) var(--space-3); border: 1px solid var(--border);
  border-radius: 999px; background: var(--surface); font-size: var(--text-sm);
}
.help-related a:hover { border-color: var(--accent); }

@media (max-width: 640px) {
  .help-article { padding: var(--space-4); }
}

/* The guided-mode panel's link to the help page on the same subject. */
.guide-more { margin: 0; font-size: var(--text-sm); }
