/*
 * The help pages (spec §07E). Standalone vite entries under help/ that share
 * tokens.css with the app — tokens only, never raw hex (see tokens.css).
 * Same pattern as landing.css; prose-page rhythm, a note box, screenshots.
 */

* {
  box-sizing: border-box;
}

html {
  font-family: var(--font-sans);
  font-size: var(--font-size-base);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
}

.help {
  max-width: 42rem;
  margin: 0 auto;
  padding: var(--space-8) var(--space-6) var(--space-9);
}

.help-crumbs {
  margin: 0 0 var(--space-8);
  font-family: var(--font-mono);
  font-weight: 600;
  letter-spacing: 0.02em;
}

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

.help-crumbs a:hover {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.help-crumbs span {
  color: var(--text-secondary);
  margin: 0 var(--space-2);
}

.help h1 {
  margin: 0 0 var(--space-6);
  font-size: 1.7rem;
  line-height: 1.25;
  font-weight: 600;
  text-wrap: balance;
}

.help h2 {
  margin: var(--space-8) 0 var(--space-5);
  font-size: 1.15rem;
  font-weight: 600;
}

.help h3 {
  margin: var(--space-6) 0 var(--space-4);
  font-size: 1rem;
  font-weight: 600;
}

.help p {
  margin: 0 0 var(--space-5);
}

.help ul,
.help ol {
  margin: 0 0 var(--space-6);
  padding-left: 1.4em;
}

.help li {
  margin-bottom: var(--space-4);
}

.help li::marker {
  color: var(--text-secondary);
}

.help a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.help a:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

.help code {
  font-family: var(--font-mono);
  font-size: 0.92em;
  background: var(--layer-01);
  padding: 1px var(--space-2);
}

.help pre {
  margin: 0 0 var(--space-5);
  padding: var(--space-4) var(--space-5);
  background: var(--layer-01);
  border: var(--border-width) solid var(--border);
  overflow-x: auto;
}

.help pre code {
  background: none;
  padding: 0;
}

/* NOTE box — information only, never an instruction (writing rules §7). */
.help-note {
  margin: 0 0 var(--space-6);
  padding: var(--space-4) var(--space-5);
  background: var(--layer-01);
  border: var(--border-width) solid var(--border-strong);
  border-left: 3px solid var(--support-info);
}

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

.help figure {
  margin: 0 0 var(--space-6);
}

.help figure img {
  display: block;
  max-width: 100%;
  height: auto;
  border: var(--border-width) solid var(--border-strong);
}

.help figcaption {
  margin-top: var(--space-3);
  color: var(--text-secondary);
  font-size: 0.9em;
}

/* The index's guide list: title link + one-line description. */
.help-guide-list {
  list-style: none;
  padding-left: 0;
}

.help-guide-list li {
  margin-bottom: var(--space-5);
}

.help-guide-list a {
  font-weight: 600;
}

/* Footer nav: the other guides. */
.help-footer {
  margin-top: var(--space-8);
  padding-top: var(--space-6);
  border-top: var(--border-width) solid var(--border);
  color: var(--text-secondary);
}

.help-footer p {
  margin: 0 0 var(--space-3);
}

/* Markdown chrome for the legal pages (spec §07F). A code block already reads
   through `.help pre` above; a table gets nothing without these rules, and a
   privacy policy's retention table is a routine construct — unstyled it loses
   its borders and pushes the page into horizontal scroll.

   This is the THIRD scope styling one display model: `.landing` (styles/landing.css)
   and `.block-note` (styles/app.css) are the other two, and the three differ only
   by spacing and font scale. The merge — one block parameterized by a spacing
   token, three scopes setting it — is recorded in docs/workplan.md under Hygiene;
   it restyles two shipped surfaces, so it wants its own diff and a visual pass,
   not a wrap-up. */
.help .md-table-scroll {
  margin: 0 0 var(--space-5);
  overflow-x: auto;
}

.help .md-table {
  border-collapse: collapse;
  font-size: 0.95rem;
}

.help .md-table th,
.help .md-table td {
  padding: var(--space-2) var(--space-3);
  border-bottom: 1px solid var(--border);
  text-align: left;
}

.help .md-table th {
  font-weight: 600;
  color: var(--text-secondary);
}
