/* site/docs.css — Handbuch, Versionen, Roadmap
 *
 * Ergänzt /styles.css, ersetzt es nicht: Farben, Radien und Schatten kommen
 * unverändert aus den dortigen Custom Properties, damit die Dokumentation
 * nicht wie eine angeklebte zweite Website aussieht. Hier steht nur, was die
 * Landing Page nicht kennt — Inhaltsverzeichnis, Versionsliste, Roadmap.
 *
 * Diese Datei wird VON HAND gepflegt. Die HTML-Seiten daneben nicht — die
 * erzeugt scripts/build_site_docs.js.
 */

/* ── Seitengerüst ───────────────────────────────────────────────────────── */

/* Bewusst dasselbe Mass wie die Landing Page (--measure-wide, 980 px). Breiter
   ginge — daneben steht ja nur ein Inhaltsverzeichnis —, aber .site-header .bar
   und der Fuss bleiben bei 980; eine breitere Spalte stünde sichtbar daneben.
   Ausrichtung schlägt hier die 140 zusätzlichen Pixel. */
main.doc-page { padding-bottom: 72px; }

.doc-hero {
  padding: 40px 0 8px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 28px;
}
.doc-eyebrow {
  margin: 0 0 10px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--muted);
}
.doc-eyebrow a { color: inherit; text-decoration: none; }
.doc-eyebrow a:hover { text-decoration: underline; }

.doc-hero h1 {
  margin: 0;
  font-size: clamp(30px, 5vw, 44px);
  line-height: 1.12;
  letter-spacing: -.02em;
  color: var(--ink);
  text-wrap: balance;
}
.doc-lead {
  margin: 12px 0 24px;
  max-width: 60ch;
  font-size: 18px;
  line-height: 1.55;
  color: var(--lead);
  text-wrap: pretty;
}

/* Der Hinweiskasten unter der Überschrift — eine Aussage, kein Warnschild,
   deshalb die ruhige Fläche und nicht das gelbe --warn-bg. */
.doc-note {
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 18px;
  margin: 0 0 32px;
  max-width: 70ch;
  font-size: 15px;
  line-height: 1.6;
  color: var(--body);
}
.doc-note a { color: #2d5a27; }

.doc-count {
  margin: 0 0 28px;
  font-size: 15px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

/* ── Handbuch: Inhaltsverzeichnis + Inhalt ──────────────────────────────── */

.doc-grid {
  display: grid;
  grid-template-columns: 216px minmax(0, 1fr);
  gap: 44px;
  align-items: start;
}

.doc-toc {
  position: sticky;
  top: 66px;             /* die sticky Kopfleiste ist ~51 px hoch */
  max-height: calc(100vh - 92px);
  overflow-y: auto;
  padding-right: 4px;
}
.doc-toc h2 {
  margin: 0 0 10px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
}
.doc-toc ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.doc-toc a {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 14.5px;
  line-height: 1.35;
  color: var(--body);
  text-decoration: none;
}
.doc-toc a:hover { background: var(--surface-alt); color: var(--ink); }
.toc-emoji { flex: 0 0 auto; font-size: 13px; }

.doc-main { display: flex; flex-direction: column; gap: 14px; min-width: 0; }

.doc-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 26px 28px 18px;
  scroll-margin-top: 66px;
}
.doc-section h2 {
  display: flex;
  align-items: center;
  gap: 11px;
  margin: 0 0 20px;
  font-size: 23px;
  letter-spacing: -.01em;
  color: var(--ink);
}
.sec-emoji { font-size: 21px; line-height: 1; }

/* Zweispaltig, sobald ein Screenshot dabei ist — sonst nimmt der Text die
   ganze Breite und läuft mit `max-width` unten auf ein lesbares Mass. */
.doc-body { display: grid; gap: 26px; }
.doc-body.has-shot { grid-template-columns: minmax(0, 1fr) 232px; }

.doc-items { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.doc-item h3 {
  margin: 0 0 5px;
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
  text-wrap: balance;
}
.doc-item p {
  margin: 0;
  max-width: 66ch;
  font-size: 15.5px;
  line-height: 1.62;
  color: var(--body);
  text-wrap: pretty;
}
.doc-item em { font-style: normal; font-weight: 600; color: var(--ink); }

.doc-shot { margin: 0; }
.doc-shot a {
  display: block;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  cursor: zoom-in;
}
.doc-shot img { display: block; width: 100%; height: auto; }
.doc-shot figcaption {
  margin-top: 9px;
  font-size: 13px;
  line-height: 1.45;
  color: var(--muted);
}

.doc-top { margin: 18px 0 0; text-align: right; }
.doc-top a {
  font-size: 13px;
  color: var(--muted);
  text-decoration: none;
}
.doc-top a:hover { text-decoration: underline; }

/* ── Versionen ──────────────────────────────────────────────────────────── */

/* Eine Zeitleiste: die senkrechte Linie liegt auf dem Rahmen des Behälters,
   die Punkte sitzen darauf. Unter 720 px verschwindet beides — auf einem
   Telefon kostet die Linie Breite und trägt nichts. */
.rel-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: relative;
  padding-left: 26px;
  border-left: 2px solid var(--border);
}

.rel {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  scroll-margin-top: 66px;
}
.rel::before {
  content: "";
  position: absolute;
  left: -33px;
  top: 26px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--border);
  border: 2px solid var(--bg);
}
.rel-current { border-color: #a8c69c; box-shadow: var(--shadow); }
.rel-current::before { background: #4a7c3f; }

.rel-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.rel-head h2 {
  margin: 0;
  font-size: 19px;
  letter-spacing: -.01em;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.rel-head time {
  font-size: 14px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.rel-badge {
  display: inline-block;
  margin-left: 6px;
  padding: 2px 9px;
  border-radius: 999px;
  background: var(--surface-alt);
  border: 1px solid #a8c69c;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: #2d5a27;
  vertical-align: 2px;
}

.rel-items { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 9px; }
.rel-items li {
  max-width: 74ch;
  font-size: 15.5px;
  line-height: 1.6;
  color: var(--body);
  text-wrap: pretty;
}

/* ── Roadmap ────────────────────────────────────────────────────────────── */

.rm-stage { margin-bottom: 40px; }
.rm-stage h2 {
  margin: 0 0 4px;
  font-size: 22px;
  letter-spacing: -.01em;
  color: var(--ink);
}
.rm-note { margin: 0 0 18px; font-size: 14px; color: var(--muted); }

.rm-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 14px; }

.rm-card {
  display: flex;
  gap: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px 22px;
}
.rm-icon {
  flex: 0 0 auto;
  font-size: 22px;
  line-height: 1.2;
}
.rm-card h3 {
  margin: 0 0 6px;
  font-size: 16.5px;
  font-weight: 700;
  color: var(--ink);
  text-wrap: balance;
}
.rm-card p {
  margin: 0;
  font-size: 15px;
  line-height: 1.6;
  color: var(--body);
  text-wrap: pretty;
}

/* Die drei Stufen unterscheiden sich absichtlich nur schwach — je weiter
   unten, desto zurückhaltender. Eine kräftige Farbe für „Angedacht" liest
   sich wie eine Zusage, und genau das ist es nicht. */
.rm-later .rm-card { background: #fbfdfa; }
.rm-idea .rm-card { background: transparent; border-style: dashed; }

/* ── Schmale Bildschirme ────────────────────────────────────────────────── */

@media (max-width: 900px) {
  .doc-grid { grid-template-columns: 1fr; gap: 22px; }
  .doc-toc {
    position: static;
    max-height: none;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px 18px;
  }
  .doc-toc ol { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 2px; }
  .doc-body.has-shot { grid-template-columns: 1fr; }
  .doc-shot { max-width: 260px; }
}

@media (max-width: 720px) {
  main.doc-page { padding-left: 18px; padding-right: 18px; }
  .doc-hero { padding-top: 26px; }
  .doc-section { padding: 20px 18px 14px; }
  .rel { padding: 18px 18px; }
  .rel-list { padding-left: 0; border-left: 0; }
  .rel::before { display: none; }
  .rm-cards { grid-template-columns: 1fr; }
}
