/* TBot Plugin-API – Entwickler-Doku (/docs). Baut auf tasty.css auf. */

:root {
  --dc-amber-ink: #ffd08a;
  --dc-amber-soft: rgba(255, 208, 138, 0.13);
  --dc-violet-ink: #c4a5ff;
  --dc-violet-soft: rgba(157, 140, 255, 0.15);
  --dc-blue-ink: #9ec5ff;
  --dc-blue-soft: rgba(90, 168, 255, 0.14);
  --dc-code-bg: #0b1322;
  --dc-code-bar: #101b2e;
  --dc-code-line: #1c2d47;
  --dc-nav-h: 68px;
}
:root[data-theme='light'] {
  --dc-amber-ink: #a35f00;
  --dc-amber-soft: #fff1da;
  --dc-violet-ink: #5b3fc4;
  --dc-violet-soft: #ede7ff;
  --dc-blue-ink: #1d5fc2;
  --dc-blue-soft: #e1edff;
}

.dc-body { overflow-x: hidden; }
.dc-body [id] { scroll-margin-top: calc(var(--dc-nav-h) + 22px); }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 100; padding: 10px 16px; border-radius: 10px; background: var(--primary); color: var(--primary-ink); font-weight: 900; }
.skip-link:focus { top: 10px; text-decoration: none; }
.nav-links a.active { background: var(--primary-soft); color: var(--ink); }

/* ---------- Hero ---------- */
.dc-hero { position: relative; overflow: hidden; isolation: isolate; padding: 44px 0 38px; border-bottom: 1px solid var(--line); }
.dc-hero .container { max-width: 1440px; padding: 0 24px; }
.dc-hero-inner { display: flex; gap: 22px; align-items: flex-start; }
.dc-hero-inner > div { min-width: 0; }
.dc-hero h1 { font-size: clamp(2rem, 4.6vw, 3.1rem); margin-bottom: 10px; }
.dc-hero .lead { color: var(--ink-2); font-size: 1.1rem; max-width: 720px; margin: 0; }
.dc-hero .hero-cta { margin: 22px 0 18px; }
.dc-hero .trust { font-size: 0.9rem; }
.dc-version { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 12px; }

/* ---------- Layout ---------- */
.dc-layout { max-width: 1440px; margin: 0 auto; padding: 0 24px; display: grid; grid-template-columns: 262px minmax(0, 1fr) 210px; gap: 44px; align-items: start; }
.dc-main { min-width: 0; padding: 34px 0 90px; }
.dc-main section { padding: 0; }

/* ---------- Sidebar ---------- */
.dc-side { position: sticky; top: var(--dc-nav-h); max-height: calc(100vh - var(--dc-nav-h)); overflow-y: auto; padding: 26px 6px 40px 0; overscroll-behavior: contain; scrollbar-width: thin; }
.dc-side-bar { display: flex; gap: 8px; align-items: center; }
.dc-side-toggle { display: none; }
.dc-search { position: relative; flex: 1; min-width: 0; }
.dc-search > .i { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.dc-search input {
  width: 100%; font: inherit; font-weight: 700; font-size: 0.92rem; padding: 10px 40px 10px 40px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink); -webkit-appearance: none; appearance: none;
}
.dc-search input::-webkit-search-cancel-button { display: none; }
.dc-search input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.dc-search kbd, .dc-search-clear { position: absolute; right: 9px; top: 50%; transform: translateY(-50%); }
.dc-search kbd { font: 800 0.72rem/1 ui-monospace, Consolas, monospace; padding: 4px 7px; border-radius: 6px; border: 1px solid var(--line); background: var(--surface-2); color: var(--muted); pointer-events: none; }
.dc-search-clear { display: grid; place-items: center; width: 26px; height: 26px; border: 0; border-radius: 8px; background: var(--surface-3); color: var(--ink-2); cursor: pointer; padding: 0; }
.dc-search-clear .i { width: 14px; height: 14px; }
.dc-search-clear:hover { color: var(--ink); }
.dc-search-clear[hidden], .dc-search kbd[hidden] { display: none; }

.dc-side-panel { margin-top: 14px; }
.dc-results[hidden], .dc-nav[hidden] { display: none; }
.dc-results-head { display: flex; justify-content: space-between; gap: 8px; padding: 2px 8px 8px; font-size: 0.75rem; font-weight: 900; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.dc-results ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.dc-res { display: grid; gap: 2px; padding: 8px 10px; border-radius: 10px; color: var(--ink); text-decoration: none !important; border: 1px solid transparent; }
.dc-res:hover, .dc-res[aria-selected='true'] { background: var(--primary-soft); border-color: rgba(77, 212, 230, 0.35); }
.dc-res-top { display: flex; align-items: center; gap: 8px; min-width: 0; }
.dc-res-name { font: 800 0.86rem/1.35 ui-monospace, 'Cascadia Code', Consolas, monospace; color: var(--deep); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; flex: 1; }
.dc-res-desc { font-size: 0.8rem; font-weight: 600; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dc-res mark { background: rgba(255, 208, 138, 0.35); color: inherit; border-radius: 3px; padding: 0 1px; }
.dc-res-empty { padding: 18px 10px; color: var(--ink-2); font-weight: 700; font-size: 0.9rem; text-align: center; }

.dc-nav { display: grid; gap: 18px; }
.dc-nav-group > b { display: block; font-size: 0.72rem; font-weight: 900; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); padding: 0 10px 6px; }
.dc-nav-group ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 1px; }
.dc-nav a { display: flex; align-items: center; gap: 9px; padding: 7px 10px; border-radius: 9px; color: var(--ink-2); font-weight: 700; font-size: 0.92rem; text-decoration: none !important; border-left: 3px solid transparent; }
.dc-nav a .i { width: 16px; height: 16px; color: var(--muted); }
.dc-nav a:hover { background: var(--surface-2); color: var(--ink); }
.dc-nav a.active { background: var(--primary-soft); color: var(--ink); border-left-color: var(--primary); }
.dc-nav a.active .i { color: var(--primary); }
.dc-nav .dc-sub a { padding: 5px 10px 5px 35px; font-size: 0.86rem; font-weight: 700; }

/* ---------- Auf dieser Seite ---------- */
.dc-otp { position: sticky; top: var(--dc-nav-h); max-height: calc(100vh - var(--dc-nav-h)); overflow-y: auto; padding: 34px 0 40px; scrollbar-width: thin; }
.dc-otp > b { display: flex; align-items: center; gap: 8px; font-size: 0.72rem; font-weight: 900; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; }
.dc-otp > b .i { width: 15px; height: 15px; }
.dc-otp-sec { display: block; font-weight: 900; font-size: 0.9rem; color: var(--ink); margin-bottom: 6px; }
.dc-otp ul { list-style: none; margin: 0; padding: 0 0 0 2px; border-left: 2px solid var(--line); display: grid; }
.dc-otp li a { display: block; padding: 4px 0 4px 12px; margin-left: -2px; border-left: 2px solid transparent; color: var(--ink-2); font-size: 0.84rem; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dc-otp li a.mono { font-family: ui-monospace, 'Cascadia Code', Consolas, monospace; font-size: 0.79rem; }
.dc-otp li a:hover { color: var(--ink); text-decoration: none; }
.dc-otp li a.active { color: var(--deep); border-left-color: var(--primary); }
.dc-otp-top { display: inline-flex; align-items: center; gap: 6px; margin-top: 16px; font-size: 0.84rem; font-weight: 800; color: var(--ink-2); }
.dc-otp-top .i { transform: rotate(-90deg); width: 14px; height: 14px; }

/* ---------- Abschnitte ---------- */
.dc-sec + .dc-sec { margin-top: 56px; padding-top: 48px; border-top: 1px solid var(--line); }
.dc-sec > h2, .dc-h2 { display: flex; align-items: center; gap: 12px; font-size: clamp(1.55rem, 3vw, 2.05rem); margin-bottom: 14px; }
.dc-sec h3 { font-size: 1.22rem; margin: 34px 0 10px; }
.dc-sec h4 { font-size: 1rem; margin: 22px 0 8px; }
.dc-sec p, .dc-sec li { color: var(--ink-2); }
.dc-sec p b, .dc-sec li b { color: var(--ink); }
.dc-sec > p, .dc-prose { max-width: 820px; }
.dc-lead { font-size: 1.06rem; }
.dc-heading { position: relative; }
.dc-hlink { opacity: 0; margin-left: 4px; color: var(--muted); display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 7px; flex: none; transition: opacity 0.15s; }
.dc-hlink .i { width: 15px; height: 15px; }
.dc-heading:hover .dc-hlink, .dc-hlink:focus-visible { opacity: 1; }
.dc-hlink:hover { color: var(--primary); background: var(--primary-soft); }
.dc-tile { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; color: #fff; background: var(--t, #14b8cc); box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.15); flex: none; }
.dc-tile .i { width: 20px; height: 20px; }
.dc-ul { padding-left: 1.2em; margin: 0 0 1em; display: grid; gap: 6px; max-width: 820px; }

/* Hinweis-Boxen */
.dc-call { display: flex; gap: 12px; align-items: flex-start; padding: 13px 16px; border-radius: 14px; border: 1px solid rgba(77, 212, 230, 0.35); background: rgba(77, 212, 230, 0.08); margin: 16px 0; max-width: 860px; }
.dc-call > .i { color: var(--primary); margin-top: 3px; }
.dc-call > div { min-width: 0; color: var(--ink); font-weight: 600; font-size: 0.95rem; }
.dc-call > div p { color: inherit; margin: 0; }
.dc-call.warn { border-color: rgba(255, 208, 138, 0.5); background: var(--dc-amber-soft); }
.dc-call.warn > .i { color: var(--dc-amber-ink); }
.dc-call.danger { border-color: rgba(255, 143, 163, 0.5); background: var(--pink-soft); }
.dc-call.danger > .i { color: var(--pink-ink); }
.dc-call.tip { border-color: rgba(126, 224, 195, 0.45); background: var(--mint-soft); }
.dc-call.tip > .i { color: var(--mint-ink); }

/* Karten-Raster */
.dc-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; margin: 18px 0; }
.dc-card { padding: 16px 18px; border-radius: 16px; display: grid; gap: 6px; align-content: start; }
.dc-card .dc-tile { width: 36px; height: 36px; border-radius: 11px; margin-bottom: 4px; }
.dc-card .dc-tile .i { width: 18px; height: 18px; }
.dc-card b { font-size: 1rem; }
.dc-card small { color: var(--ink-2); font-weight: 600; font-size: 0.88rem; line-height: 1.45; }
a.dc-card { color: var(--ink); text-decoration: none !important; transition: border-color 0.15s, transform 0.15s; }
a.dc-card:hover { border-color: var(--primary); transform: translateY(-2px); }

/* Ablauf-Diagramm Sandbox */
.dc-flow { display: flex; align-items: stretch; gap: 8px; margin: 20px 0; flex-wrap: wrap; }
.dc-flow-step { flex: 1 1 150px; min-width: 0; padding: 14px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); display: grid; gap: 4px; align-content: start; }
.dc-flow-step .i { color: var(--primary); width: 22px; height: 22px; }
.dc-flow-step b { font-size: 0.95rem; }
.dc-flow-step small { color: var(--ink-2); font-weight: 600; font-size: 0.82rem; line-height: 1.4; }
.dc-flow-step.hl { border-color: rgba(77, 212, 230, 0.55); background: var(--primary-soft); }
.dc-flow-arrow { display: grid; place-items: center; color: var(--muted); flex: none; }

/* Schritte */
.dc-steps { list-style: none; counter-reset: step; margin: 20px 0; padding: 0; display: grid; gap: 22px; }
.dc-steps > li { counter-increment: step; position: relative; padding-left: 52px; min-width: 0; }
.dc-steps > li::before { content: counter(step); position: absolute; left: 0; top: -2px; width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; background: var(--primary); color: var(--primary-ink); font-weight: 900; }
.dc-steps > li::after { content: ''; position: absolute; left: 17px; top: 40px; bottom: -18px; width: 2px; background: var(--line); }
.dc-steps > li:last-child::after { display: none; }
.dc-steps h4 { margin: 4px 0 6px; font-size: 1.05rem; color: var(--ink); }
.dc-steps p { margin: 0 0 6px; }
.dc-actions { display: flex; gap: 10px; flex-wrap: wrap; margin: 14px 0 0; }

/* Dateibaum */
.dc-tree { font: 0.86rem/1.7 ui-monospace, 'Cascadia Code', Consolas, monospace; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 12px 16px; margin: 14px 0; overflow-x: auto; white-space: pre; color: var(--ink); }
.dc-tree .c { color: var(--muted); }

/* Tabellen */
.dc-table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; margin: 14px 0; background: var(--surface); -webkit-overflow-scrolling: touch; }
.dc-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.dc-table th { text-align: left; font-size: 0.72rem; font-weight: 900; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); background: var(--surface-2); padding: 10px 12px; white-space: nowrap; }
.dc-table td { padding: 10px 12px; border-top: 1px solid var(--line); vertical-align: top; color: var(--ink-2); }
.dc-table td:first-child { color: var(--ink); }
.dc-table td code { white-space: nowrap; }
.dc-table td.wrap code { white-space: normal; overflow-wrap: anywhere; }
.dc-table .t-type { font: 700 0.82rem/1.4 ui-monospace, 'Cascadia Code', Consolas, monospace; color: var(--dc-violet-ink); white-space: nowrap; }
.dc-table .yes, .dc-table .no { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 8px; }
.dc-table .yes { background: var(--mint-soft); color: var(--mint-ink); }
.dc-table .no { color: var(--muted); }
.dc-table .yes .i, .dc-table .no .i { width: 14px; height: 14px; }
.dc-table.matrix td:not(:first-child), .dc-table.matrix th:not(:first-child) { text-align: center; }
.dc-table tr:target td, .dc-table tr.is-target td { background: var(--primary-soft); }
.req { display: inline-flex; font-size: 0.7rem; font-weight: 900; padding: 2px 8px; border-radius: 999px; white-space: nowrap; }
.req.y { background: var(--pink-soft); color: var(--pink-ink); }
.req.n { background: var(--surface-3); color: var(--ink-2); }

/* Badges */
.kind { display: inline-flex; align-items: center; font-size: 0.68rem; font-weight: 900; letter-spacing: 0.06em; text-transform: uppercase; padding: 3px 8px; border-radius: 999px; white-space: nowrap; background: var(--surface-3); color: var(--ink-2); }
.kind-fn { background: var(--dc-violet-soft); color: var(--dc-violet-ink); }
.kind-method { background: var(--primary-soft); color: var(--deep); }
.kind-prop { background: var(--mint-soft); color: var(--mint-ink); }
.kind-event { background: var(--dc-amber-soft); color: var(--dc-amber-ink); }
.kind-type { background: var(--dc-blue-soft); color: var(--dc-blue-ink); }
.kind-util { background: var(--pink-soft); color: var(--pink-ink); }
.kind-setting { background: var(--dc-blue-soft); color: var(--dc-blue-ink); }
.kind-perm { background: var(--dc-amber-soft); color: var(--dc-amber-ink); }
.kind-guide { background: var(--surface-3); color: var(--ink-2); }
.kind-example { background: var(--mint-soft); color: var(--mint-ink); }
.perm-badge { display: inline-flex; align-items: center; gap: 6px; font-size: 0.78rem; font-weight: 900; padding: 4px 10px; border-radius: 999px; background: var(--dc-amber-soft); color: var(--dc-amber-ink); border: 1px solid rgba(255, 208, 138, 0.4); white-space: nowrap; text-decoration: none !important; }
.perm-badge .i { width: 14px; height: 14px; }
a.perm-badge:hover { border-color: var(--dc-amber-ink); }
.perm-badge code { background: none; padding: 0; color: inherit; font-size: 0.82rem; }
.ev-chip { display: inline-flex; font: 700 0.78rem/1.3 ui-monospace, 'Cascadia Code', Consolas, monospace; padding: 3px 8px; border-radius: 7px; background: var(--surface-2); border: 1px solid var(--line); color: var(--ink-2); text-decoration: none !important; white-space: nowrap; }
a.ev-chip:hover { color: var(--ink); border-color: var(--primary); }
.dc-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.dc-chips code { font-weight: 800; padding: 4px 10px; }

/* ---------- Referenz-Karten ---------- */
.ref-list { display: grid; gap: 18px; margin: 20px 0; }
.ref { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; min-width: 0; box-shadow: var(--shadow-sm); transition: box-shadow 0.3s, border-color 0.3s; }
.ref.is-target { border-color: var(--primary); animation: dc-flash 2.2s ease; }
@keyframes dc-flash { 0%, 30% { box-shadow: 0 0 0 4px rgba(77, 212, 230, 0.45), var(--shadow); } 100% { box-shadow: var(--shadow-sm); } }
.ref-head { display: flex; align-items: flex-start; gap: 10px; padding: 14px 16px 14px 18px; background: var(--surface-2); border-bottom: 1px solid var(--line); }
.ref-sig { flex: 1; min-width: 0; margin: 0 !important; font: 800 0.98rem/1.5 ui-monospace, 'Cascadia Code', Consolas, monospace; color: var(--ink); letter-spacing: 0; }
.ref-sig > span { display: block; overflow-wrap: anywhere; }
.ref-sig .s-obj { color: var(--ink-2); font-weight: 700; }
.ref-sig .s-name { color: var(--deep); }
.ref-sig .s-args { color: var(--ink-2); font-weight: 700; }
.ref-sig .s-ret { color: var(--dc-violet-ink); font-weight: 700; }
.ref-tools { display: flex; align-items: center; gap: 6px; flex: none; flex-wrap: wrap; justify-content: flex-end; }
.ref-link { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); cursor: pointer; padding: 0; }
.ref-link .i { width: 15px; height: 15px; }
.ref-link:hover { color: var(--primary); border-color: var(--primary); }
.ref-link.is-done { color: var(--mint-ink); border-color: var(--mint-ink); }
.ref-body { padding: 16px 18px 18px; display: grid; gap: 14px; min-width: 0; }
.ref-desc { margin: 0; color: var(--ink) !important; max-width: 860px; }
.ref-meta { display: flex; flex-wrap: wrap; gap: 10px 22px; align-items: center; }
.ref-meta > div { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-width: 0; }
.ref-meta dt { font-size: 0.7rem; font-weight: 900; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.ref-meta dd { margin: 0; display: flex; gap: 6px; flex-wrap: wrap; align-items: center; font-size: 0.88rem; font-weight: 700; color: var(--ink-2); }
.ref-label { font-size: 0.72rem; font-weight: 900; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin: 0 0 -6px; }
.ref .dc-table-wrap { margin: 0; }
.ref .dc-table { min-width: 560px; }
.ref-ret { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; padding: 10px 14px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); font-size: 0.92rem; }
.ref-ret .t-type { font: 800 0.85rem/1.4 ui-monospace, 'Cascadia Code', Consolas, monospace; color: var(--dc-violet-ink); overflow-wrap: anywhere; }
.ref-ret span { color: var(--ink-2); font-weight: 600; min-width: 0; }
.ref-notes { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; }
.ref-notes li { display: flex; gap: 9px; align-items: flex-start; font-size: 0.92rem; font-weight: 600; }
.ref-notes .i { color: var(--primary); margin-top: 3px; width: 16px; height: 16px; }
.ref-notes li.warn .i { color: var(--dc-amber-ink); }
.ref-alias { display: block; height: 0; }
.ref-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: start; }

/* ---------- Code ---------- */
.dc-code { border-radius: 14px; overflow: hidden; background: var(--dc-code-bg); border: 1px solid var(--dc-code-line); min-width: 0; position: relative; }
.dc-codebar { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 7px 8px 7px 14px; background: var(--dc-code-bar); border-bottom: 1px solid var(--dc-code-line); color: #9fb6c6; font-size: 0.8rem; font-weight: 800; }
.dc-codebar > span { display: inline-flex; align-items: center; gap: 7px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dc-codebar > span .i { width: 15px; height: 15px; color: #4dd4e6; }
.dc-codebar > div { display: flex; gap: 6px; flex: none; }
.dc-btn-code { display: inline-flex; align-items: center; gap: 6px; font: inherit; font-size: 0.78rem; font-weight: 800; color: #9fb6c6; background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 8px; padding: 5px 10px; cursor: pointer; white-space: nowrap; }
.dc-btn-code:hover { color: #fff; border-color: #4dd4e6; }
.dc-btn-code .i { width: 14px; height: 14px; }
.dc-btn-code.is-done { color: #8debd0; border-color: rgba(141, 235, 208, 0.6); background: rgba(141, 235, 208, 0.1); }
.dc-btn-code:focus-visible { outline: 2px solid #4dd4e6; outline-offset: 2px; }
.dc-code-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.dc-code-lines { display: flex; min-width: max-content; }
.dc-gutter { padding: 14px 10px 14px 14px; text-align: right; color: #3e5672; font: 0.82rem/1.6 ui-monospace, 'Cascadia Code', Consolas, monospace; user-select: none; border-right: 1px solid var(--dc-code-line); white-space: pre; }
.dc-code pre { margin: 0; padding: 14px 16px; font: 0.84rem/1.6 ui-monospace, 'Cascadia Code', Consolas, monospace; color: #dbe7f0; white-space: pre; tab-size: 2; }
.dc-code pre code { background: none; padding: 0; color: inherit; font: inherit; border-radius: 0; }
.dc-code.is-collapsed .dc-code-scroll { max-height: 420px; overflow-y: hidden; }
.dc-code-more { display: none; }
.dc-code.is-collapsed .dc-code-more { display: flex; position: absolute; left: 0; right: 0; bottom: 0; justify-content: center; padding: 60px 0 14px; background: linear-gradient(transparent, var(--dc-code-bg) 70%); }
.dc-code-more .dc-btn-code { background: #16243a; padding: 7px 14px; }
.tk-c { color: #6b8196; font-style: italic; }
.tk-s { color: #8debd0; }
.tk-k { color: #c4a5ff; }
.tk-l { color: #ffb37a; }
.tk-n { color: #ffd08a; }
.tk-f { color: #72e0ee; }
.tk-p { color: #72e0ee; }

/* ---------- Discord-Vorschau (Buttons, Menüs) ---------- */
.dc-preview { margin: 18px 0; max-width: 620px; }
.dc-preview .discord-mock { box-shadow: var(--shadow-sm); }
.dm-body { min-width: 0; flex: 1; }
.dm-embed { max-width: 460px; }
.dm-embed .d { color: #dbdee1; font-size: 0.88rem; }
.dm-fields { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; margin-top: 8px; font-size: 0.84rem; }
.dm-fields b { display: block; color: #fff; font-size: 0.8rem; }
.dm-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.dm-btn { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 14px; border-radius: 4px; font-size: 0.86rem; font-weight: 600; color: #fff; background: #4e5058; white-space: nowrap; }
.dm-btn .i { width: 14px; height: 14px; }
.dm-btn.primary { background: #5865f2; }
.dm-btn.success { background: #248046; }
.dm-btn.danger { background: #da373c; }
.dm-btn.disabled { opacity: 0.5; }
.dm-select { display: flex; align-items: center; justify-content: space-between; gap: 10px; max-width: 400px; margin-top: 8px; padding: 9px 12px; border-radius: 4px; background: #1e1f22; border: 1px solid #1e1f22; color: #949ba4; font-size: 0.88rem; }
.dm-select .i { width: 16px; height: 16px; }
.dm-eph { margin-top: 6px; font-size: 0.75rem; color: #949ba4; display: flex; align-items: center; gap: 6px; }
.dm-eph .i { width: 13px; height: 13px; }
.dm-legend { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-top: 10px; font-size: 0.82rem; color: var(--ink-2); font-weight: 700; }
.dm-legend code { font-size: 0.78rem; }

/* ---------- Einstellungs-Vorschau (Dashboard-Formular) ---------- */
.mock { background: var(--surface-2); border: 1px solid var(--line); border-radius: 16px; padding: 14px; display: grid; gap: 10px; align-content: start; min-width: 0; }
.mock-cap { display: flex; align-items: center; gap: 8px; font-size: 0.7rem; font-weight: 900; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.mock-cap .i { width: 14px; height: 14px; }
.mock-sec { font-size: 0.72rem; font-weight: 900; letter-spacing: 0.08em; text-transform: uppercase; color: var(--deep); border-bottom: 1px dashed var(--line); padding-bottom: 6px; }
.mock-field { display: grid; gap: 6px; min-width: 0; }
.mock-label { font-weight: 800; color: var(--ink); font-size: 0.93rem; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.mock-label .req { font-size: 0.64rem; }
.mock-hint { color: var(--muted); font-size: 0.82rem; font-weight: 600; }
.m-input { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 42px; padding: 9px 13px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); color: var(--ink); font-weight: 600; font-size: 0.92rem; min-width: 0; }
.m-input > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.m-input .ph { color: var(--muted); }
.m-input .i { width: 16px; height: 16px; color: var(--ink-2); flex: none; }
.m-input.focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.m-textarea { min-height: 84px; align-items: flex-start; white-space: normal; }
.m-textarea > span { white-space: normal; }
.m-count { justify-self: end; font-size: 0.75rem; font-weight: 800; color: var(--muted); }
.m-num { display: flex; gap: 6px; align-items: center; }
.m-num .m-input { flex: 1; }
.m-step { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); font-weight: 900; color: var(--ink-2); flex: none; }
.m-toggle { display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 12px 14px; border-radius: 12px; background: var(--surface); border: 2px solid var(--line); }
.m-toggle b { display: block; color: var(--ink); font-size: 0.93rem; }
.m-toggle small { color: var(--ink-2); font-weight: 600; font-size: 0.82rem; }
.m-switch { width: 48px; height: 28px; border-radius: 99px; background: var(--switch-off); position: relative; flex: none; }
.m-switch::after { content: ''; position: absolute; top: 4px; left: 4px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15); }
.m-switch.on { background: #1fb3c7; }
.m-switch.on::after { left: 24px; }
.m-chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding: 7px; border: 2px dashed var(--line); border-radius: 12px; min-height: 48px; }
.m-chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 5px 3px 11px; border-radius: 999px; background: var(--primary-soft); font-weight: 800; font-size: 0.85rem; color: var(--ink); max-width: 100%; }
.m-chip > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.m-chip .x { display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--surface-3); flex: none; }
.m-chip .x .i { width: 11px; height: 11px; }
.m-chip .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--c, var(--muted)); flex: none; }
.m-add { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); font-weight: 700; font-size: 0.84rem; flex: 1 1 120px; min-width: 0; }
.m-add .i { width: 13px; height: 13px; }
.m-color { display: flex; gap: 10px; align-items: center; }
.m-swatch { width: 44px; height: 42px; border-radius: 12px; border: 2px solid var(--line); flex: none; background: var(--c); box-shadow: inset 0 0 0 3px var(--surface); }
.m-color .m-input { flex: 1; font-family: ui-monospace, Consolas, monospace; }
.m-hash { color: var(--muted); font-weight: 900; }
.m-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--c, var(--muted)); display: inline-block; margin-right: 8px; vertical-align: 0; }
.m-check { display: flex; flex-wrap: wrap; gap: 6px; }
.m-pill { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); font-weight: 800; font-size: 0.84rem; color: var(--ink-2); }
.m-pill.on { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); }
.m-pill .i { width: 13px; height: 13px; }
.m-list { display: grid; gap: 6px; }
.m-list-row { display: flex; align-items: center; gap: 8px; padding: 7px 8px 7px 12px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line); font-weight: 700; font-size: 0.88rem; color: var(--ink); }
.m-list-row > span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.m-list-row .x { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 7px; background: var(--surface-3); color: var(--ink-2); }
.m-list-row .x .i { width: 11px; height: 11px; }
.m-save { display: flex; justify-content: flex-end; gap: 8px; }
.m-save span { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 10px; font-weight: 800; font-size: 0.85rem; background: var(--primary); color: var(--primary-ink); }
.m-save span.ghost { background: var(--surface); color: var(--ink-2); border: 1px solid var(--line); }
.m-save .i { width: 14px; height: 14px; }

/* Einwilligungs-Dialog (Rechte) */
.consent { max-width: 440px; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow); padding: 22px; display: grid; gap: 12px; }
.consent-head { display: flex; gap: 12px; align-items: center; }
.consent-head b { display: block; font-size: 1.05rem; }
.consent-head small { color: var(--ink-2); font-weight: 600; }
.consent ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.consent li { display: flex; gap: 10px; align-items: center; padding: 9px 12px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); font-weight: 700; font-size: 0.9rem; color: var(--ink); min-width: 0; }
.consent li .i { color: var(--dc-amber-ink); flex: none; }
.consent li small { display: block; color: var(--ink-2); font-weight: 600; font-size: 0.8rem; overflow-wrap: anywhere; }
.consent-actions { display: flex; gap: 8px; justify-content: flex-end; }
.consent-actions span { display: inline-flex; align-items: center; padding: 9px 14px; border-radius: 10px; font-weight: 800; font-size: 0.88rem; background: var(--surface-2); border: 1px solid var(--line); color: var(--ink-2); }
.consent-actions span.go { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); }
.dc-two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 22px; align-items: start; margin: 18px 0; }

/* Limits */
.dc-limits { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; margin: 14px 0; }
.dc-limit { display: grid; gap: 2px; padding: 13px 15px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); min-width: 0; }
.dc-limit b { font-size: 1.35rem; font-weight: 900; color: var(--ink); line-height: 1.2; }
.dc-limit span { font-size: 0.86rem; font-weight: 700; color: var(--ink-2); }
.dc-limit .i { color: var(--primary); width: 18px; height: 18px; margin-bottom: 4px; }

/* Log-Vorschau (Dashboard) */
.log-mock { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 16px; display: grid; gap: 12px; margin: 18px 0; max-width: 760px; box-shadow: var(--shadow-sm); }
.log-top { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.log-top .dc-tile { width: 40px; height: 40px; }
.log-top > div { flex: 1; min-width: 0; }
.log-top b { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.log-top small { color: var(--muted); font-weight: 600; }
.log-btn { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--primary); font-weight: 800; font-size: 0.85rem; color: var(--ink); }
.log-btn .i { width: 15px; height: 15px; }
.log-btn .cnt { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 99px; background: #ff6b81; color: #fff; font-size: 0.72rem; display: grid; place-items: center; }
.log-head { display: flex; justify-content: space-between; gap: 10px; font-weight: 800; font-size: 0.9rem; color: var(--ink); border-top: 1px dashed var(--line); padding-top: 10px; }
.log-list-m { list-style: none; margin: 0; padding: 8px; display: grid; gap: 2px; border-radius: 12px; background: var(--bg-2); border: 1px solid var(--line); font-size: 0.82rem; }
.log-list-m li { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px; padding: 4px 6px; border-radius: 6px; color: var(--ink-2); }
.log-list-m li.error { background: var(--pink-soft); color: var(--pink-ink); }
.log-list-m time { color: var(--muted); font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }
.log-list-m span { overflow-wrap: anywhere; white-space: pre-wrap; }
.log-list-m.mono span { font-family: ui-monospace, 'Cascadia Code', Consolas, monospace; font-size: 0.78rem; }
.pill-m { display: inline-flex; align-items: center; gap: 6px; font-size: 0.74rem; font-weight: 900; padding: 0.25em 0.7em; border-radius: 999px; background: var(--surface-3); color: var(--ink-2); white-space: nowrap; }
.pill-m::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.pill-m.ok { background: var(--mint-soft); color: var(--mint-ink); }
.pill-m.warn { background: var(--dc-amber-soft); color: var(--dc-amber-ink); }
.pill-m.err { background: var(--pink-soft); color: var(--pink-ink); }

/* Beispiele */
.ex { margin: 26px 0 0; display: grid; gap: 12px; min-width: 0; }
.ex + .ex { padding-top: 26px; border-top: 1px dashed var(--line); }
.ex-head { display: flex; gap: 14px; align-items: flex-start; }
.ex-head > div { min-width: 0; }
.ex-head h3 { margin: 2px 0 6px !important; }
.ex-head p { margin: 0; }
.ex-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.ex-tags a, .ex-tags span { display: inline-flex; align-items: center; gap: 5px; font-size: 0.78rem; font-weight: 800; padding: 3px 10px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); color: var(--ink-2); text-decoration: none !important; }
.ex-tags a:hover { color: var(--ink); border-color: var(--primary); }
.ex-tags .i { width: 13px; height: 13px; }
.ex-tags .p { background: var(--dc-amber-soft); color: var(--dc-amber-ink); border-color: rgba(255, 208, 138, 0.4); }
.ex.is-target .dc-code { border-color: var(--primary); animation: dc-flash 2.2s ease; }

/* FAQ */
.dc-faq { max-width: 860px; margin: 18px 0 0; }
.dc-faq details p, .dc-faq details .dc-faq-a { padding: 0 22px 20px; margin: 0; color: var(--ink-2); }
.dc-cta { display: flex; align-items: center; gap: 16px; margin-top: 30px; padding: 18px 20px; border-radius: 18px; background: var(--primary-soft); border: 1px solid rgba(77, 212, 230, 0.4); flex-wrap: wrap; max-width: 860px; }
.dc-cta > div { flex: 1 1 240px; min-width: 0; display: grid; }
.dc-cta small { color: var(--ink-2); font-weight: 600; }

/* ---------- Responsive ---------- */
@media (max-width: 1240px) {
  .dc-layout { grid-template-columns: 250px minmax(0, 1fr); gap: 36px; }
  .dc-otp { display: none; }
}
@media (max-width: 1100px) {
  .ref-split, .dc-two { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 960px) {
  .dc-layout { grid-template-columns: minmax(0, 1fr); gap: 0; padding: 0 16px; }
  .dc-hero .container { padding: 0 16px; }
  .dc-side {
    position: sticky; top: var(--dc-nav-h); z-index: 40; max-height: none; overflow: visible; margin: 0 -16px; padding: 10px 16px;
    background: var(--nav-bg); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--line);
  }
  .dc-side-toggle { display: inline-flex; flex: none; gap: 8px; }
  .dc-side-toggle .chev { transition: transform 0.15s; width: 15px; height: 15px; }
  .dc-side.open .dc-side-toggle .chev { transform: rotate(180deg); }
  .dc-side-panel { display: none; margin-top: 10px; max-height: calc(100vh - var(--dc-nav-h) - 80px); overflow-y: auto; overscroll-behavior: contain; padding: 4px 2px 10px; }
  .dc-side.open .dc-side-panel { display: block; }
  .dc-main { padding-top: 26px; }
  .dc-search kbd { display: none; }
}
@media (max-width: 720px) {
  .dc-hero { padding: 30px 0 26px; }
  .dc-hero-inner > .tile { display: none; }
  .dc-hero .hero-cta .btn { flex: 1 1 100%; }
  .dc-sec + .dc-sec { margin-top: 40px; padding-top: 36px; }
  .ref-head { padding: 12px 12px 12px 14px; flex-wrap: wrap; }
  .ref-tools { width: 100%; justify-content: flex-start; }
  .ref-body { padding: 14px; }
  .ref-sig { font-size: 0.9rem; }
  .dc-flow-arrow { transform: rotate(90deg); width: 100%; }
  .dc-flow-step { flex-basis: 100%; }
  .dc-steps > li { padding-left: 46px; }
  .dc-code pre { font-size: 0.8rem; }
  .dc-gutter { font-size: 0.8rem; padding-left: 10px; }
  .dc-codebar .lbl { display: none; }
  .ex-head .dc-tile { display: none; }
  .dc-faq summary { padding: 16px 18px; }
}
@media (max-width: 420px) {
  .dc-side-toggle .lbl { display: none; }
  .dc-side-toggle { width: 42px; padding: 0; justify-content: center; }
  .dc-side-toggle .chev { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .ref.is-target, .ex.is-target .dc-code { animation: none; }
}

/* Nachträge */
.ref .ref-sig { font: 800 0.98rem/1.5 ui-monospace, 'Cascadia Code', Consolas, monospace; margin: 0; }
.ret-k { font-size: 0.7rem; font-weight: 900; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.ref-ret code.t-type { background: none; padding: 0; border-radius: 0; }
.tile-lg { width: 64px; height: 64px; border-radius: 18px; }
.tile-lg .i { width: 32px; height: 32px; }
@media (max-width: 960px) { .dc-body [id] { scroll-margin-top: calc(var(--dc-nav-h) + 84px); } }
@media (max-width: 720px) { .ref .ref-sig { font-size: 0.9rem; } }
.dc-sec:focus, .ref:focus, .ex:focus, .dc-main h3:focus, .dc-main h4:focus, .dc-main tr:focus, .dc-main details:focus, #main:focus { outline: none; }
.dc-main p code, .dc-main li code { overflow-wrap: anywhere; }
/* Leere Vorlage + Export-Abschnitt */
.dc-template { margin-top: 26px; max-width: 760px; display: grid; gap: 10px; }
.dc-template-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; color: var(--ink-2); font-weight: 700; font-size: 0.92rem; }
.dc-highlight { margin: 26px 0 8px; padding: 6px 22px 22px; border-radius: 20px; border: 1.5px solid rgba(77, 212, 230, 0.5); background: linear-gradient(180deg, var(--primary-soft), transparent 70%); max-width: 980px; }
.dc-highlight > h3 { margin-top: 20px; }
.dc-facts { margin-top: 16px; }
@media (max-width: 720px) { .dc-highlight { padding: 4px 14px 16px; } }
