:root {
  --bg: #f2f4f7;
  --panel: #ffffff;
  --ink: #1c2430;
  --muted: #64748b;
  --line: #e2e8f0;
  --line-strong: #cbd5e1;
  --red: #d81920;
  --red-dark: #b01218;
  --red-soft: #fdf0f0;
  --yellow: #f7d600;
  --dark: #14171c;
  --success: #16784f;
  --success-soft: #e9f6ef;
  --info-soft: #eef4fb;
  --info-border: #b9cde6;
  --warn-soft: #fff7db;
  --warn-border: #f2b705;
  --font: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(20, 23, 28, .08);
  --maxw: 980px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.62;
  font-size: 17px;
}

.accentbar {
  height: 5px;
  background: linear-gradient(90deg, var(--red) 0 16%, #ff8a00 16% 30%, var(--yellow) 30% 44%, transparent 44%);
}

/* ---------- Header ---------- */
.site-header {
  background: linear-gradient(160deg, #181b21 0%, #101216 100%);
  color: #fff;
  padding: 22px 24px;
}
.site-header .wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}
.site-header img.logo {
  width: 64px; height: 64px; border-radius: 12px; background: #000;
  object-fit: contain; padding: 6px; flex: none;
}
.site-header h1 { font-size: 1.5rem; margin: 0; letter-spacing: .2px; }
.site-header p { margin: 2px 0 0; color: #aeb6c2; font-size: .95rem; }

/* ---------- Top navigation ---------- */
.topnav {
  position: sticky; top: 0; z-index: 20;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.topnav .wrap {
  max-width: var(--maxw); margin: 0 auto; padding: 10px 24px;
  display: flex; gap: 8px; flex-wrap: wrap; align-items: center;
}
.topnav a {
  text-decoration: none; color: var(--ink); font-weight: 600; font-size: .92rem;
  padding: 8px 14px; border-radius: 999px; border: 1px solid transparent;
}
.topnav a:hover { background: var(--red-soft); }
.topnav a.active { background: var(--red); color: #fff; }
.topnav .spacer { flex: 1; }
.topnav a.home { color: var(--muted); font-weight: 600; }

/* ---------- Layout ---------- */
main { max-width: var(--maxw); margin: 0 auto; padding: 32px 24px 80px; }

.lead {
  font-size: 1.12rem; color: #38424f;
  background: var(--panel); border: 1px solid var(--line);
  border-left: 5px solid var(--red); border-radius: var(--radius);
  padding: 18px 22px; box-shadow: var(--shadow); margin: 0 0 28px;
}

h2 {
  font-size: 1.5rem; margin: 44px 0 4px; padding-top: 8px;
  border-top: 1px solid var(--line);
}
h2:first-of-type { border-top: none; }
h2 .num {
  display: inline-grid; place-items: center;
  width: 34px; height: 34px; margin-right: 10px; vertical-align: -7px;
  background: var(--red); color: #fff; border-radius: 50%;
  font-size: 1rem; font-weight: 700;
}
h3 { font-size: 1.18rem; margin: 28px 0 6px; }
p { margin: 10px 0; }
a { color: var(--red-dark); }

ul, ol { padding-left: 22px; }
li { margin: 6px 0; }

code, .kbd {
  background: #eef2f6; border: 1px solid var(--line-strong);
  border-radius: 6px; padding: 1px 7px; font-size: .9em;
  font-family: "Cascadia Code", "Consolas", monospace;
}

/* path / click hint */
.path { font-weight: 600; }
.path .sep { color: var(--muted); margin: 0 4px; }

/* ---------- Figures (screenshots) ---------- */
figure {
  margin: 18px 0 24px; background: var(--panel);
  border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); overflow: hidden;
}
figure img {
  display: block; width: 100%; height: auto;
  border-bottom: 1px solid var(--line);
}
figure figcaption {
  padding: 10px 16px; font-size: .9rem; color: var(--muted);
}
figure figcaption b { color: var(--ink); }

/* ---------- Callouts ---------- */
.callout {
  border-radius: var(--radius); padding: 14px 18px 14px 16px; margin: 18px 0;
  border: 1px solid var(--line); border-left-width: 5px;
}
.callout p:first-child { margin-top: 0; }
.callout p:last-child { margin-bottom: 0; }
.callout .tag { font-weight: 700; display: block; margin-bottom: 2px; }
.tip   { background: var(--success-soft); border-left-color: var(--success); }
.tip .tag { color: var(--success); }
.info  { background: var(--info-soft); border-left-color: #2f6fb0; }
.info .tag { color: #2f6fb0; }
.warn  { background: var(--warn-soft); border-left-color: var(--warn-border); }
.warn .tag { color: #9a7400; }

/* ---------- Step cards ---------- */
.steps { counter-reset: step; padding: 0; list-style: none; margin: 16px 0; }
.steps > li {
  position: relative; background: var(--panel); border: 1px solid var(--line);
  border-radius: 12px; padding: 16px 18px 16px 60px; margin: 12px 0;
  box-shadow: 0 4px 14px rgba(20,23,28,.05);
}
.steps > li::before {
  counter-increment: step; content: counter(step);
  position: absolute; left: 16px; top: 16px;
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--red); color: #fff; font-weight: 700;
  display: grid; place-items: center;
}
.steps > li b { color: var(--ink); }

/* ---------- Role cards (index) ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 18px; margin: 24px 0; }
.card {
  display: block; text-decoration: none; color: inherit;
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow);
  transition: transform .12s ease, border-color .12s ease;
}
.card:hover { transform: translateY(-3px); border-color: var(--red); }
.card .ico { font-size: 1.8rem; }
.card h3 { margin: 8px 0 4px; }
.card p { color: var(--muted); font-size: .96rem; margin: 0; }
.card .go { display: inline-block; margin-top: 12px; color: var(--red-dark); font-weight: 700; }

/* ---------- Misc ---------- */
.pill {
  display: inline-block; background: var(--red-soft); color: var(--red-dark);
  border: 1px solid #f1c4c6; border-radius: 999px; padding: 2px 10px;
  font-size: .82rem; font-weight: 700;
}
.pdf-list { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 10px; }
.pdf-list li { margin: 0; }
.pdf-list a {
  display: block; text-decoration: none; color: var(--ink);
  background: var(--panel); border: 1px solid var(--line); border-left: 4px solid var(--red);
  border-radius: 10px; padding: 12px 16px; font-weight: 600;
  box-shadow: 0 3px 10px rgba(20,23,28,.05);
}
.pdf-list a:hover { border-color: var(--red); background: var(--red-soft); }

.toc {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px 20px; margin: 0 0 26px; box-shadow: var(--shadow);
}
.toc strong { display: block; margin-bottom: 6px; }
.toc ol { margin: 0; }

footer {
  border-top: 1px solid var(--line); color: var(--muted);
  font-size: .88rem; text-align: center; padding: 26px 24px 60px;
}

/* ---------- Print ---------- */
@page {
  size: A4;
  margin: 15mm 14mm 17mm;
  @bottom-center { content: counter(page) " / " counter(pages); font-family: "Segoe UI", sans-serif; font-size: 8pt; color: #64748b; }
}

@media print {
  .topnav, .site-header .home { display: none; }
  body { background: #fff; font-size: 10.5pt; line-height: 1.45; print-color-adjust: exact; }
  main { padding: 16px 0 12px; }
  .site-header { padding: 16px; }
  .site-header h1 { font-size: 18pt; }
  .help-stand { font-size: 8.5pt; color: #475569; }
  h2 { font-size: 15pt; margin-top: 24px; }
  h3 { font-size: 12pt; break-after: avoid; }
  p, li { orphans: 3; widows: 3; }
  .steps > li { padding: 9px 14px 9px 46px; margin: 7px 0; }
  .steps > li::before { width: 24px; height: 24px; left: 10px; top: 9px; font-size: 10pt; }
  .cards, .pdf-list { display: block; }
  .pdf-list, .pdf-downloads { break-inside: avoid; }
  .card, .pdf-list li { margin: 8px 0; }
  footer { padding: 12px 0 0; }
  figure, .card, .steps > li, .lead, .callout { box-shadow: none; break-inside: avoid; }
  /* Hohe Screenshots auf Seitenhöhe begrenzen, damit keine Leerseiten entstehen. */
  figure img { border-bottom: 1px solid #ccc; width: auto; max-width: 100%; max-height: 170mm; margin: 0 auto; }
  a { color: inherit; text-decoration: none; }
  h2 { break-after: avoid; }
}

@media (max-width: 640px) {
  body { font-size: 16px; }
  .site-header h1 { font-size: 1.2rem; }
  main { padding: 22px 16px 60px; }
}
