/* HF-1: Darstellung der Hilfeseiten. Dieselbe Formensprache wie `legal.css`, eigene Datei, weil
   die Hilfe eigene Bausteine hat (Übersicht, Kennzeichen, Suchfeld). Liegt außerhalb von
   `/assets/*` — für Sammler lesbar (HF-1, Punkt 3b). */
:root {
  color-scheme: light;
  --font-family-active: system-ui, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --surface: #fff8f5;
  --surface-card: #ffffff;
  --surface-soft: #fff1e8;
  --border: #dbc2ae;
  --text: #231a12;
  --muted: #554334;
  --accent: #8c5000;
  --accent-soft: #ffe8cc;
  --focus: #006591;
  font-family: var(--font-family-active);
  color: var(--text);
  background-color: var(--surface);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

* { box-sizing: border-box; }

body {
  min-height: 100vh;
  margin: 0;
  font-family: var(--font-family-active);
  color: var(--text);
  background:
    radial-gradient(circle at top right, rgba(244, 144, 6, 0.13), transparent 34rem),
    linear-gradient(180deg, var(--surface-soft) 0, var(--surface) 24rem);
}

main {
  width: min(100%, 820px);
  margin: 0 auto;
  padding: 32px 20px 56px;
}

.hero,
.help-category,
.help-toc,
.help-article,
.help-no-results {
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: 24px;
  background: var(--surface-card);
  box-shadow: 0 14px 32px rgba(40, 26, 20, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.52);
}

.hero { margin-bottom: 20px; }
.help-category + .help-category,
.help-toc + .help-article { margin-top: 16px; }
.help-toc { margin-bottom: 16px; }
.help-no-results { margin-top: 16px; }

.eyebrow {
  margin: 0 0 10px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

h1, h2, h3 { color: var(--text); }
h1, h2 { margin: 0 0 12px; }
h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); line-height: 1.15; overflow-wrap: anywhere; }
h2 { font-size: 1.3rem; line-height: 1.3; }
h3 { margin: 20px 0 12px; font-size: 1.05rem; }
.help-article h2 { margin-top: 28px; }
.help-article > :first-child { margin-top: 0; }
.help-article h2, .help-article h3 { scroll-margin-top: 16px; }

p, li { color: var(--muted); line-height: 1.7; }
ul, ol { padding-left: 22px; }
strong { color: var(--text); }
code {
  padding: 1px 5px;
  border-radius: 6px;
  background: var(--surface-soft);
  font-size: 0.95em;
}
a { color: var(--accent); text-underline-offset: 0.2em; }
a:hover { color: #6a3b00; }
a:focus-visible,
input:focus-visible {
  border-radius: 4px;
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

img { max-width: 100%; height: auto; border-radius: 12px; }
.markdown-image-missing {
  display: block;
  padding: 12px 14px;
  border: 1px dashed var(--border);
  border-radius: 12px;
  color: var(--muted);
  font-style: italic;
}

/* Übersicht */
.help-entries { margin: 0; padding: 0; list-style: none; }
.help-entry { padding: 12px 0; border-top: 1px solid var(--surface-soft); }
.help-entry:first-child { border-top: 0; padding-top: 0; }
.help-entry-title { font-weight: 700; font-size: 1.05rem; }
.help-excerpt { margin: 4px 0 0; font-size: 0.95rem; }

.help-flags { display: inline-flex; flex-wrap: wrap; gap: 6px; margin-left: 6px; vertical-align: middle; }
.help-flag {
  padding: 2px 9px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 700;
}

.help-flag-notes { margin: 14px 0 0; padding: 0; list-style: none; }
.help-flag-notes li {
  margin-top: 8px;
  padding: 10px 14px;
  border-radius: 14px;
  background: var(--accent-soft);
}
.help-purchase { margin-left: 6px; font-weight: 700; }

/* HF-5: das PDF zum Austeilen */
.help-pdf { margin: 14px 0 0; }
.help-pdf-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface-card);
  font-weight: 700;
  text-decoration: none;
}
.help-pdf-link:hover { background: var(--accent-soft); }

/* Suche — das Feld setzt erst `hilfe-suche.js` ein */
.help-search { margin-top: 16px; }
.help-search:empty { display: none; }
.help-search label { display: block; margin-bottom: 6px; font-weight: 700; color: var(--text); }
.help-search input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
}

/* Sprungmarken */
.help-toc-title { margin: 0 0 6px; font-weight: 700; color: var(--text); }
.help-toc ul { margin: 0; }
.help-toc-h3 { margin-left: 16px; }

.help-back { margin: 0 0 12px; }
.help-empty { padding: 0 24px; }
.help-footer { padding: 16px 24px 0; }

@media (max-width: 600px) {
  main { padding: 16px 12px 36px; }
  .hero,
  .help-category,
  .help-toc,
  .help-article,
  .help-no-results { padding: 18px; border-radius: 18px; }
  .help-flags { display: flex; margin: 6px 0 0; }
}

@media print {
  body { background: none; }
  .help-search, .help-back, .help-footer, .help-toc, .help-pdf { display: none; }
  .hero, .help-article { border: 0; box-shadow: none; padding: 0; }
}
