.doku { --doku-seite: 250px; }
.doku-held { position: relative; overflow: hidden; border-radius: 22px; padding: clamp(1.4rem, 3vw, 2.4rem); margin-bottom: 1.8rem;
  background: radial-gradient(120% 140% at 100% 0%, color-mix(in srgb, var(--brand-2, var(--brand-1)) 22%, transparent), transparent 55%),
              linear-gradient(135deg, color-mix(in srgb, var(--brand-1) 10%, var(--card)), var(--card));
  border: 1px solid color-mix(in srgb, var(--brand-1) 18%, var(--line)); }
.doku-augenbraue { display: inline-flex; align-items: center; gap: 0.45rem; font-size: 0.74rem; font-weight: 750; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--brand-1); margin: 0 0 0.6rem; }
.doku-augenbraue .ikon { width: 16px; height: 16px; }
.doku-held h1 { font-size: clamp(1.8rem, 4vw, 2.7rem); line-height: 1.1; margin: 0 0 0.7rem; letter-spacing: -0.02em; }
.doku-held p.doku-intro { max-width: 760px; font-size: 1.04rem; line-height: 1.65; color: var(--muted); margin: 0 0 1.2rem; }
.doku-meta { display: flex; flex-wrap: wrap; gap: 0.45rem; margin-bottom: 1.2rem; }
.doku-meta span { display: inline-flex; align-items: center; gap: 0.35rem; font-size: 0.8rem; font-weight: 620; padding: 0.3rem 0.7rem;
  border-radius: 99px; background: var(--card); border: 1px solid var(--line); color: var(--ink); }
.doku-meta .ikon { width: 14px; height: 14px; color: var(--brand-1); }
.doku-aktionen { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.doku-aktionen .ikon { width: 17px; height: 17px; }

.doku-raster { display: grid; grid-template-columns: var(--doku-seite) minmax(0, 1fr); gap: 2rem; align-items: start; }
.doku-toc { position: sticky; top: calc(var(--kopf-h, 64px) + 16px); max-height: calc(100vh - var(--kopf-h, 64px) - 32px); overflow-y: auto;
  padding: 0.3rem 0.2rem 1rem 0; scrollbar-width: thin; }
.doku-toc p { font-size: 0.7rem; font-weight: 750; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); margin: 1rem 0 0.4rem 0.7rem; }
.doku-toc p:first-child { margin-top: 0; }
.doku-toc a { display: flex; align-items: center; gap: 0.5rem; padding: 0.38rem 0.7rem; border-radius: 9px; font-size: 0.87rem; font-weight: 560;
  color: var(--muted) !important; text-decoration: none; border-left: 2px solid transparent; }
.doku-toc a:hover { color: var(--ink) !important; background: var(--card2); }
.doku-toc a.aktiv { color: var(--brand-1) !important; background: color-mix(in srgb, var(--brand-1) 9%, transparent); font-weight: 680; }
.doku-toc a code { font-size: 0.74rem; font-weight: 700; color: inherit; background: none; padding: 0; min-width: 3.6em; }
.doku-toc a small { font-size: 0.76rem; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.doku-inhalt { min-width: 0; }
.doku-abschnitt { scroll-margin-top: calc(var(--kopf-h, 64px) + 18px); padding-bottom: 2.2rem; margin-bottom: 2.2rem; border-bottom: 1px solid var(--line); }
.doku-abschnitt:last-child { border-bottom: 0; }
.doku-abschnitt > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.doku-abschnitt h2 { font-size: clamp(1.35rem, 2.6vw, 1.7rem); margin: 0; letter-spacing: -0.01em; display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; }
.doku-abschnitt h3 { font-size: 1.05rem; margin: 1.6rem 0 0.7rem; }
.doku-abschnitt p { line-height: 1.7; }
.doku-nr { font-size: 0.75rem; font-weight: 750; letter-spacing: 0.12em; text-transform: uppercase; color: var(--brand-1); margin: 0 0 0.35rem; }
.doku-typ { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.78em; font-weight: 700; padding: 0.15rem 0.55rem;
  border-radius: 9px; background: color-mix(in srgb, var(--brand-1) 12%, var(--card)); color: var(--brand-1); }
.doku-chips { display: flex; flex-wrap: wrap; gap: 0.35rem; }

.doku-karten { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); gap: 0.8rem; }
.doku-karte { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 1rem 1.05rem; }
.doku-karte h4 { display: flex; align-items: center; gap: 0.55rem; margin: 0 0 0.45rem; font-size: 0.98rem; }
.doku-karte h4 .ikon { width: 20px; height: 20px; color: var(--brand-1); }
.doku-karte p { margin: 0; color: var(--muted); font-size: 0.88rem; line-height: 1.6; }

.doku-tabelle-box { overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; background: var(--card); }
table.doku-tabelle { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
.doku-tabelle th { text-align: left; font-size: 0.72rem; font-weight: 750; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted);
  background: var(--card2); padding: 0.65rem 0.85rem; border-bottom: 1px solid var(--line); white-space: nowrap; position: sticky; top: 0; }
.doku-tabelle td { padding: 0.65rem 0.85rem; border-bottom: 1px solid var(--line); vertical-align: top; line-height: 1.5; }
.doku-tabelle tr:last-child td { border-bottom: 0; }
.doku-tabelle tbody tr:hover td { background: color-mix(in srgb, var(--brand-1) 4%, transparent); }
.doku-tabelle code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.8rem; background: var(--card2); border: 1px solid var(--line);
  border-radius: 6px; padding: 0.08rem 0.4rem; white-space: nowrap; }
.doku-tabelle .leise { color: var(--muted); font-size: 0.84rem; }
.doku-tabelle .edi { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.78rem; color: var(--ink); }
.edoc-pflicht { display: inline-block; background: color-mix(in srgb, var(--brand-1) 13%, var(--card)); color: var(--brand-1); border-radius: 99px;
  padding: 0.1rem 0.55rem; font-size: 0.72rem; font-weight: 750; white-space: nowrap; }
.edoc-optional { color: var(--muted); font-size: 0.78rem; white-space: nowrap; }
.doku-methode { display: inline-block; min-width: 3.6em; text-align: center; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.74rem;
  font-weight: 800; padding: 0.15rem 0.45rem; border-radius: 7px; background: color-mix(in srgb, var(--brand-1) 13%, var(--card)); color: var(--brand-1); }
.doku-methode.post { background: color-mix(in srgb, #6366f1 14%, var(--card)); color: color-mix(in srgb, #4f46e5 85%, var(--ink)); }
.doku-methode.patch { background: color-mix(in srgb, #f59e0b 16%, var(--card)); color: color-mix(in srgb, #b45309 85%, var(--ink)); }
.doku-methode.delete { background: color-mix(in srgb, var(--error) 13%, var(--card)); color: var(--error); }

.doku-beispiele { margin-top: 1.2rem; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: var(--card); }
.doku-reiter { display: flex; gap: 2px; padding: 0.4rem 0.4rem 0; background: var(--card2); border-bottom: 1px solid var(--line); overflow-x: auto; }
.doku-reiter button { border: 0; background: none; padding: 0.5rem 0.85rem; font: inherit; font-size: 0.82rem; font-weight: 650; color: var(--muted);
  border-radius: 9px 9px 0 0; cursor: pointer; white-space: nowrap; }
.doku-reiter button.aktiv { background: var(--card); color: var(--ink); box-shadow: 0 -1px 0 var(--line) inset; }
.doku-code { position: relative; }
.doku-code[hidden] { display: none; }
.doku-code pre { margin: 0; padding: 1rem 1.1rem; overflow-x: auto; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.8rem;
  line-height: 1.65; white-space: pre; color: var(--ink); background: var(--card); border: 0; }
.doku-code-einzeln { border: 1px solid var(--line); border-radius: 12px; background: var(--card); margin: 0.6rem 0; }
.doku-code-titel { font-size: 0.72rem; font-weight: 750; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); padding: 0.55rem 1.1rem 0; }
.doku-kopieren { position: absolute; top: 0.5rem; right: 0.5rem; display: inline-flex; align-items: center; gap: 0.35rem; border: 1px solid var(--line);
  background: var(--card2); color: var(--ink); border-radius: 8px; padding: 0.3rem 0.6rem; font: inherit; font-size: 0.75rem; font-weight: 650; cursor: pointer; opacity: 0.85; }
.doku-kopieren:hover { opacity: 1; border-color: var(--brand-1); color: var(--brand-1); }
.doku-kopieren .ikon { width: 14px; height: 14px; }

.doku-hinweis { display: flex; gap: 0.8rem; padding: 0.9rem 1.05rem; border-radius: 14px; margin: 1rem 0;
  background: color-mix(in srgb, var(--brand-1) 8%, var(--card)); border: 1px solid color-mix(in srgb, var(--brand-1) 22%, var(--line)); }
.doku-hinweis > .ikon { width: 20px; height: 20px; color: var(--brand-1); flex: 0 0 auto; margin-top: 0.15rem; }
.doku-hinweis p { margin: 0; font-size: 0.92rem; line-height: 1.6; }
.doku-ende { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; padding: 1.3rem 1.4rem; border-radius: 18px;
  background: var(--card); border: 1px solid var(--line); }
.doku-ende h3 { margin: 0 0 0.25rem; }
.doku-ende p { margin: 0; color: var(--muted); }

@media (max-width: 960px) {
  .doku-raster { grid-template-columns: minmax(0, 1fr); }
  .doku-toc { position: static; max-height: none; display: flex; flex-wrap: nowrap; gap: 0.3rem; overflow-x: auto; padding: 0 0 0.6rem;
    margin-bottom: 0.4rem; border-bottom: 1px solid var(--line); }
  .doku-toc p { display: none; }
  .doku-toc a { flex: 0 0 auto; border: 1px solid var(--line); border-radius: 99px; padding: 0.35rem 0.75rem; }
  .doku-toc a code + small { display: none; }
  .doku-toc a small { font-size: 0.8rem; }
}
@media print {
  .doku-toc, .doku-aktionen, .doku-kopieren, .doku-reiter { display: none !important; }
  .doku-raster { display: block; }
  .doku-code[hidden] { display: block !important; }
}
