/* ==========================================================
   MP Webdesign & IT Service – Anleitungen
   Ergänzt style.css (nutzt dieselben Variablen)
   ========================================================== */

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Brotkrumen & Kopf ---------- */
.crumbs { padding-top: 32px; font-size: .88rem; color: var(--ink-muted); }
.crumbs a { text-decoration: none; }
.crumbs span { margin: 0 8px; opacity: .6; }
.page-hero.compact { padding: 28px 0 40px; }
.page-hero.compact h1 { font-size: clamp(2.2rem, 4.6vw, 3.4rem); }
.meta { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.chip {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--line); font-size: .85rem; color: var(--ink-soft);
}
.chip svg { width: 16px; height: 16px; color: var(--accent); }

/* ---------- Übersicht: Suche ---------- */
.search { position: relative; max-width: 620px; margin-top: 32px; }
.search svg { position: absolute; left: 20px; top: 50%; width: 20px; height: 20px; transform: translateY(-50%); color: var(--ink-muted); pointer-events: none; }
.search input {
  width: 100%; font: inherit; font-size: 1.02rem; color: var(--ink);
  padding: 17px 22px 17px 52px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.search input::placeholder { color: var(--ink-muted); }
.search input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft), var(--shadow); }
.search-count { margin: 12px 0 0 22px; font-size: .85rem; color: var(--ink-muted); }
.page-hero .tabs { margin: 28px 0 0; }

/* ---------- Übersicht: Kategorien ---------- */
section.cat { padding: 56px 0; border-top: 1px solid var(--line); }
section.cat:nth-of-type(even) { background: var(--bg-alt); }
.cat-head { display: flex; gap: 18px; align-items: flex-start; margin-bottom: 28px; max-width: 720px; }
.cat-head .icon {
  flex: none; width: 52px; height: 52px; border-radius: 12px; background: var(--accent-soft); color: var(--accent);
  display: grid; place-items: center;
}
.cat-head .icon svg { width: 26px; height: 26px; }
.cat-head h2 { font-size: clamp(1.8rem, 3.2vw, 2.4rem); margin-bottom: 4px; }
.cat-head p { color: var(--ink-soft); margin: 0; }

.gcards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.gcard {
  display: flex; flex-direction: column; gap: 6px; padding: 24px 24px 20px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  text-decoration: none; color: var(--ink);
  transition: border-color .15s ease, transform .15s ease, box-shadow .15s ease;
}
a.gcard:hover { border-color: var(--ink); color: var(--ink); transform: translateY(-2px); box-shadow: var(--shadow); }
.gcard strong { font-family: var(--serif); font-size: 1.4rem; font-weight: 600; line-height: 1.2; }
.gcard span { color: var(--ink-soft); font-size: .93rem; line-height: 1.5; }
.gcard .go { margin-top: auto; padding-top: 12px; font-style: normal; font-size: .88rem; font-weight: 600; color: var(--accent); }
a.gcard .go::after { content: " →"; }
.gcard.soon { background: transparent; border-style: dashed; }
.gcard.soon strong { color: var(--ink-soft); }
.gcard.soon .go { color: var(--ink-muted); font-weight: 500; }
.gcard[hidden], section.cat[hidden] { display: none; }

.no-results { padding: 64px 0 80px; text-align: center; }
.no-results h2 { font-size: 2rem; }
.no-results p { color: var(--ink-soft); }

/* ---------- Anleitung: Layout ---------- */
.doc {
  display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 64px;
  padding: 48px 0 96px; border-top: 1px solid var(--line);
}
.doc-aside { position: sticky; top: 100px; align-self: start; font-size: .92rem; }
.doc-aside h4 {
  font-size: .72rem; letter-spacing: .18em; text-transform: uppercase; color: var(--ink-muted);
  font-weight: 600; margin: 0 0 10px;
}
.doc-aside ul { list-style: none; padding: 0; margin: 0 0 32px; border-left: 1px solid var(--line); }
.doc-aside li a {
  display: block; padding: 5px 0 5px 14px; margin-left: -1px; border-left: 2px solid transparent;
  text-decoration: none; color: var(--ink-soft); line-height: 1.45;
}
.doc-aside li a:hover { color: var(--ink); }
.doc-aside li a[aria-current] { border-left-color: var(--accent); color: var(--ink); font-weight: 600; }
.aside-back { font-size: .88rem; text-decoration: none; color: var(--ink-muted); }
@media (max-width: 960px) {
  .doc { grid-template-columns: 1fr; gap: 0; padding-top: 36px; }
  .doc-aside { position: static; border-top: 1px solid var(--line); padding-top: 32px; margin-top: 56px; }
  .doc-aside .toc { display: none; }
}

/* ---------- Anleitung: Inhalt ---------- */
.prose { max-width: 780px; min-width: 0; }
.prose > p, .prose > ul, .prose li { color: var(--ink-soft); }
.prose h2 { font-size: clamp(1.8rem, 3vw, 2.3rem); margin: 64px 0 16px; scroll-margin-top: 100px; }
.prose > h2:first-child, .prose > .notice:first-child + h2 { margin-top: 8px; }
.prose ol.steps { margin-top: 28px; }
.prose ol.steps ul { padding-left: 20px; margin: 0 0 1em; }
.prose code {
  font-family: var(--mono); font-size: .86em; padding: 2px 7px; border-radius: 6px;
  background: var(--bg-alt); border: 1px solid var(--line); color: var(--ink); white-space: nowrap;
}
.prose .notice { margin: 0 0 32px; }
.prose ol.steps + .notice, .prose .shots + .notice, .prose p + .notice { margin-top: 32px; }
.notice a { font-weight: 600; }
.notice-warn { background: color-mix(in srgb, #b3261e 7%, var(--surface)); border-color: color-mix(in srgb, #b3261e 30%, transparent); }
.notice-warn svg { color: #b3261e; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .notice-warn svg { color: #f2b8b5; }
}

/* Screenshots: natürliche Größe, nie breiter als der Textbereich */
.prose .shots { display: flex; flex-wrap: wrap; gap: 14px; margin: 16px 0 8px; grid-template-columns: none; }
.prose .shot { flex: 0 1 auto; min-width: 0; }
.prose .shot.is-small { min-width: 200px; }
.prose .shot.is-small a { padding: 24px; background: var(--bg-alt); }
.prose .shot img { width: auto; max-width: 100%; height: auto; }

/* Pfad zu einer Einstellung */
.path {
  display: inline-flex; align-items: center; gap: 4px; flex-wrap: wrap;
  font-size: .82rem; font-weight: 600; letter-spacing: .04em; color: var(--accent) !important;
  background: var(--accent-soft); padding: 4px 12px; border-radius: 999px; margin-bottom: 14px;
}
.path i { font-style: normal; opacity: .6; margin: 0 2px; }

/* Aufzählungen */
ul.parts, ul.checklist { list-style: none; padding: 0; margin: 8px 0 20px; }
ul.parts li, ul.checklist li { position: relative; padding: 9px 0 9px 28px; border-top: 1px solid var(--line); }
ul.parts li:last-child, ul.checklist li:last-child { border-bottom: 1px solid var(--line); }
ul.checklist li::before, ul.parts li::before {
  content: ""; position: absolute; left: 4px; top: 18px; width: 10px; height: 6px;
  border-left: 2px solid var(--accent); border-bottom: 2px solid var(--accent); transform: rotate(-45deg);
}
ul.parts li strong, ul.checklist li strong { color: var(--ink); }

/* Zwei Wege (Suche) */
.choice { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 16px 0 8px; }
@media (max-width: 560px) { .choice { grid-template-columns: 1fr; } }
.choice a {
  display: block; padding: 18px 20px; border: 1px solid var(--line); border-radius: 12px;
  background: var(--surface); text-decoration: none;
}
.choice a:hover { border-color: var(--ink); color: inherit; }
.choice strong { display: block; }
.choice span { font-size: .9rem; color: var(--ink-muted); }

/* Tabellen */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); margin: 18px 0; }
table.data { width: 100%; border-collapse: collapse; font-size: .95rem; }
table.data th, table.data td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
table.data tr:last-child td { border-bottom: 0; }
table.data th { font-size: .74rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-muted); font-weight: 600; background: var(--bg-alt); }
table.data td:first-child { white-space: nowrap; font-weight: 600; color: var(--ink); }
table.data td { color: var(--ink-soft); }
table.data tr.rec td { background: var(--accent-soft); }

/* Serverdaten-Karten */
.cfg { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 20px 0 10px; }
@media (max-width: 600px) { .cfg { grid-template-columns: 1fr; } }
.cfg > div { padding: 22px 24px; border-radius: var(--radius); background: var(--dark); color: var(--dark-ink); }
.cfg small { display: block; font-size: .74rem; letter-spacing: .16em; text-transform: uppercase; color: #c9a96a; font-weight: 600; margin-bottom: 12px; }
.cfg dl { display: grid; grid-template-columns: auto 1fr; gap: 8px 18px; margin: 0; }
.cfg dt { color: #b9b6af; font-size: .9rem; }
.cfg dd { margin: 0; font-weight: 600; }
.cfg code { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.14); color: var(--dark-ink); }
.muted-note { font-size: .9rem; color: var(--ink-muted) !important; }

/* Begriffsliste */
dl.defs { display: grid; grid-template-columns: minmax(140px, 220px) 1fr; margin: 18px 0; border-top: 1px solid var(--line); }
dl.defs dt, dl.defs dd { padding: 12px 0; border-bottom: 1px solid var(--line); margin: 0; }
dl.defs dt { font-weight: 600; padding-right: 20px; font-size: .95rem; }
dl.defs dd { color: var(--ink-soft); font-size: .95rem; }
@media (max-width: 600px) {
  dl.defs { grid-template-columns: 1fr; }
  dl.defs dt { border-bottom: 0; padding-bottom: 0; }
  dl.defs dd { padding-top: 4px; }
}

/* Vor/Zurück */
.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 72px; padding-top: 32px; border-top: 1px solid var(--line); }
@media (max-width: 560px) { .pager { grid-template-columns: 1fr; } }
.pager a {
  display: block; padding: 18px 22px; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--surface); text-decoration: none; font-family: var(--serif); font-size: 1.25rem; font-weight: 600; line-height: 1.25;
}
.pager a:hover { border-color: var(--ink); color: var(--ink); }
.pager small { display: block; font-family: var(--sans); font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); font-weight: 600; margin-bottom: 4px; }
.pager .next { text-align: right; grid-column: 2; }
@media (max-width: 560px) { .pager .next { grid-column: auto; } }

/* Hilfe-Band */
.band-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.band .btn-ghost { background: transparent; color: var(--dark-ink) !important; border-color: rgba(245,243,239,.35); }
.band .btn-ghost:hover { border-color: var(--dark-ink); }
