/* TagSpion Hilfe (/help/) - eigenes Stylesheet, Schriften lokal aus /fonts/ */

/* Schriften */
@font-face { font-family: "Bricolage Grotesque"; font-style: normal; font-weight: 700; font-display: swap; src: url("/fonts/bricolage-grotesque-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Bricolage Grotesque"; font-style: normal; font-weight: 800; font-display: swap; src: url("/fonts/bricolage-grotesque-latin-800-normal.woff2") format("woff2"); }
@font-face { font-family: "Instrument Sans"; font-style: normal; font-weight: 400; font-display: swap; src: url("/fonts/instrument-sans-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Instrument Sans"; font-style: normal; font-weight: 500; font-display: swap; src: url("/fonts/instrument-sans-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Instrument Sans"; font-style: normal; font-weight: 600; font-display: swap; src: url("/fonts/instrument-sans-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Instrument Sans"; font-style: normal; font-weight: 700; font-display: swap; src: url("/fonts/instrument-sans-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "JetBrains Mono"; font-style: normal; font-weight: 400; font-display: swap; src: url("/fonts/jetbrains-mono-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "JetBrains Mono"; font-style: normal; font-weight: 500; font-display: swap; src: url("/fonts/jetbrains-mono-latin-500-normal.woff2") format("woff2"); }

/* Farben, hell als Standard */
:root {
  --bg: #e7eaf1; --panel: #fbfcfe; --surface: #f0f3f8; --line: #dce1eb;
  --fg: #162033; --muted: #5b6680; --accent: #2a4fc4;
  --ok: #18834a; --warn: #a96400; --err: #c42f29; --info: #3b6fa8; --exp: #7446c9;
  --code-bg: #f3f5fa;
  --font-display: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
  --font-body: "Instrument Sans", "Segoe UI", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
}
:root[data-theme="dark"] {
  --bg: #0b0f17; --panel: #121925; --surface: #19212f; --line: #283245;
  --fg: #e5eaf4; --muted: #94a0b8; --accent: #82a0ff;
  --ok: #4cc983; --warn: #f0aa3c; --err: #ff6d63; --info: #7fb2ec; --exp: #b393ff;
  --code-bg: #0f1520; color-scheme: dark;
}

/* Grundlagen */
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: 70px; }
body { margin: 0; background: var(--bg); color: var(--fg); font-family: var(--font-body); font-size: 15px; line-height: 1.6; }
button { font: inherit; color: inherit; cursor: pointer; }
button:focus-visible, a:focus-visible, summary:focus-visible, select:focus-visible, input:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
a { color: var(--accent); }
code, pre, .mono { font-family: var(--font-mono); font-size: 12.5px; }

/* Seiten-Kopf, fixiert */
.site-head { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--panel) 94%, transparent); backdrop-filter: blur(6px); border-bottom: 1px solid var(--line); }
.site-head-in { max-width: 1160px; margin: 0 auto; padding: 10px 16px; display: flex; align-items: center; gap: 18px; }
.logo { display: flex; align-items: center; gap: 6px; font-family: var(--font-display); font-weight: 800; font-size: 20px; letter-spacing: -0.02em; color: inherit; text-decoration: none; flex: none; }
.logo svg { width: 27px; height: 27px; }
.logo .s { color: var(--accent); }
.logo > span { display: inline-flex; align-items: center; }
.logo .tld { font-size: .42em; font-weight: 700; color: var(--muted); margin-left: 1px; writing-mode: vertical-rl; transform: rotate(180deg); line-height: 1; }
.site-nav { display: flex; gap: 2px; flex: 1; overflow-x: auto; scrollbar-width: none; }
.site-nav a { flex: none; text-decoration: none; color: var(--muted); font-size: 13.5px; font-weight: 600; padding: 6px 10px; border-radius: 4px; }
.site-nav a:hover { color: var(--fg); background: var(--surface); }
.site-nav a.on { color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, transparent); }
.head-actions { display: flex; gap: 4px; flex: none; margin-left: auto; }
.icon-btn { border: 1px solid var(--line); background: var(--surface); border-radius: 4px; height: 30px; min-width: 30px; padding: 0 8px; display: inline-flex; align-items: center; justify-content: center; gap: 5px; font-size: 12px; font-weight: 600; text-decoration: none; color: var(--fg); }
.icon-btn:hover { border-color: var(--accent); }
.icon-btn svg { width: 15px; height: 15px; flex: none; }
.icon-btn.cta { background: var(--accent); border-color: var(--accent); color: var(--panel); }
.lang-wrap { position: relative; padding-right: 6px; }
.lang-wrap select { border: 0; background: transparent; color: inherit; font: inherit; font-size: 12px; font-weight: 600; padding: 0; max-width: 110px; cursor: pointer; }
.i-sun { display: none; }
:root[data-theme="dark"] .i-sun { display: block; }
:root[data-theme="dark"] .i-moon { display: none; }

/* Seitenaufbau: Seitenleiste links, Inhalt rechts */
.wrap { max-width: 1160px; margin: 0 auto; padding: 20px 16px 40px; display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 20px; align-items: start; }
.side { position: sticky; top: 72px; max-height: calc(100vh - 90px); overflow: auto; background: var(--panel); border: 1px solid var(--line); border-radius: 6px; padding: 10px 8px; font-size: 13.5px; }
.side-search { width: 100%; border: 1px solid var(--line); background: var(--surface); border-radius: 4px; padding: 6px 10px; font: inherit; font-size: 13px; color: var(--fg); margin-bottom: 6px; }
.side-empty { margin: 6px 8px; font-size: 12.5px; color: var(--muted); }
.tree details { margin: 2px 0; }
.tree summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 7px; padding: 6px 8px; border-radius: 4px; font-weight: 700; }
.tree summary::-webkit-details-marker { display: none; }
.tree summary::after { content: "▸"; margin-left: auto; color: var(--muted); font-size: 11px; }
.tree details[open] > summary::after { content: "▾"; }
.tree summary:hover { background: var(--surface); }
.tree summary svg { width: 16px; height: 16px; flex: none; }
.tree .t-plugin svg { color: var(--accent); }
.tree .t-ai svg { color: var(--exp); }
.tree .t-schema svg { color: var(--ok); }
.tree ul { list-style: none; margin: 2px 0 6px 15px; padding: 0 0 0 14px; border-left: 1px solid var(--line); }
.tree li a { display: flex; justify-content: space-between; gap: 6px; padding: 4px 8px; border-radius: 4px; color: var(--muted); text-decoration: none; font-size: 13px; }
.tree li a small { display: none; }
.tree li a:hover { color: var(--fg); background: var(--surface); }
.tree li a.on { color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, transparent); font-weight: 600; }
.tree .t-ai ~ ul li a.on { color: var(--exp); background: color-mix(in srgb, var(--exp) 10%, transparent); }
.tree .home { display: block; padding: 6px 8px; border-radius: 4px; font-weight: 700; color: var(--fg); text-decoration: none; }
.tree .home:hover, .tree .home.on { background: var(--surface); }
.tree.filtering details { display: none; }
.tree.filtering details.hit { display: block; }
.tree.filtering li { display: none; }
.tree.filtering li.hit { display: block; }

/* Inhalt */
.main { display: grid; gap: 16px; min-width: 0; }
.box { background: var(--panel); border: 1px solid var(--line); border-radius: 6px; padding: 22px 26px; box-shadow: 0 1px 3px color-mix(in srgb, var(--fg) 5%, transparent); min-width: 0; }
.crumb { font-size: 12.5px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.crumb a { color: var(--muted); text-decoration: none; }
.crumb a:hover { color: var(--accent); }
.url { font-family: var(--font-mono); font-size: 11.5px; color: var(--muted); background: var(--surface); border-radius: 4px; padding: 2px 8px; display: inline-block; }
h1 { font-family: var(--font-display); font-size: 32px; line-height: 1.15; letter-spacing: -0.02em; margin: 10px 0 8px; }
h2 { font-family: var(--font-display); font-size: 21px; letter-spacing: -0.01em; margin: 0 0 8px; display: flex; align-items: center; gap: 10px; }
h2 .num { width: 26px; height: 26px; border-radius: 4px; display: inline-grid; place-items: center; font-size: 13px; background: color-mix(in srgb, var(--accent) 12%, transparent); color: var(--accent); flex: none; }
.lead { font-size: 17px; color: var(--muted); margin: 0; max-width: 760px; }
.box p { margin: 0 0 10px; max-width: 780px; }
.box p:last-child { margin-bottom: 0; }
.box ul, .box ol { margin: 0 0 10px; padding-left: 20px; max-width: 780px; }
.box li { margin-bottom: 4px; }
.h-term { font-family: var(--font-mono); font-size: 11px; font-weight: 600; color: var(--accent); border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent); border-radius: 4px; padding: 0 5px; vertical-align: 4px; white-space: nowrap; }
.meta-row { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; margin-top: 12px; font-size: 12.5px; color: var(--muted); }
.pill { display: inline-flex; align-items: center; gap: 5px; border-radius: 4px; padding: 2px 9px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.pill.exp { background: color-mix(in srgb, var(--exp) 14%, transparent); color: var(--exp); }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex: none; margin-right: 4px; vertical-align: 1px; }
.dot.ok { background: var(--ok); } .dot.warn { background: var(--warn); } .dot.err { background: var(--err); }

/* Hinweis-Kästen */
.note { border: 1px dashed color-mix(in srgb, var(--exp) 50%, var(--line)); background: color-mix(in srgb, var(--exp) 6%, transparent); border-radius: 4px; padding: 10px 14px; font-size: 13.5px; color: var(--muted); }
.note b { color: var(--exp); }
.tip { border-left: 3px solid var(--accent); background: var(--surface); border-radius: 0 4px 4px 0; padding: 10px 14px; font-size: 14px; margin: 10px 0 0; max-width: 780px; }

/* Inhaltsverzeichnis auf der Seite */
.toc { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.toc a { font-size: 12.5px; font-weight: 600; text-decoration: none; color: var(--muted); border: 1px solid var(--line); border-radius: 4px; padding: 3px 10px; }
.toc a:hover { color: var(--accent); border-color: var(--accent); }

/* Kacheln */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.card { display: grid; gap: 4px; align-content: start; border: 1px solid var(--line); border-radius: 6px; padding: 14px; background: var(--panel); text-decoration: none; color: inherit; transition: border-color .15s, transform .15s; }
.card:hover { border-color: var(--accent); transform: translateY(-1px); }
.card b { font-size: 15px; display: flex; align-items: center; gap: 6px; }
.card small { font-family: var(--font-mono); font-size: 10.5px; color: var(--muted); }
.card span { font-size: 13px; color: var(--muted); line-height: 1.5; }
.card-grp { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin: 14px 0 6px; }
.card-grp:first-of-type { margin-top: 4px; }
.big-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.big { display: grid; gap: 8px; align-content: start; border: 1px solid var(--line); border-top: 4px solid var(--accent); border-radius: 6px; padding: 18px; background: var(--panel); text-decoration: none; color: inherit; }
.big.ai { border-top-color: var(--exp); }
.big.schema { border-top-color: var(--ok); }
.big:hover { box-shadow: 0 6px 20px color-mix(in srgb, var(--fg) 10%, transparent); }
.big b { font-family: var(--font-display); font-size: 20px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.big span { font-size: 13.5px; color: var(--muted); }
.big .cnt { font-size: 12px; font-weight: 600; color: var(--accent); }
.big.ai .cnt { color: var(--exp); } .big.schema .cnt { color: var(--ok); }

/* Code */
.code { position: relative; background: var(--code-bg); border: 1px solid var(--line); border-radius: 4px; margin: 12px 0 0; max-width: 780px; }
.code pre { margin: 0; padding: 12px 14px; overflow-x: auto; line-height: 1.6; white-space: pre; }
.code .copy { position: absolute; top: 7px; right: 7px; }
.btn-sm { border: 1px solid var(--line); background: var(--panel); border-radius: 3px; padding: 3px 10px; font-size: 12px; font-weight: 600; white-space: nowrap; text-decoration: none; color: var(--fg); display: inline-flex; align-items: center; gap: 5px; }
.btn-sm:hover { border-color: var(--accent); color: var(--accent); }

/* Prüf-Tabelle */
.tbl-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 4px; }
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
th, td { text-align: left; padding: 8px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); background: var(--surface); }
tr:last-child td { border-bottom: 0; }
td:first-child { font-weight: 600; width: 38%; }
table.bots td:first-child { width: 34%; }
table.bots td:last-child { width: 90px; white-space: nowrap; }
table.bots code { font-size: 12.5px; }
.bot-purpose { font-size: 13.5px; color: var(--muted); margin: 0 0 8px !important; }

/* Häufige Fragen */
.faq details { border: 1px solid var(--line); border-radius: 4px; margin-bottom: 8px; background: var(--panel); max-width: 780px; }
.faq summary { list-style: none; cursor: pointer; padding: 10px 14px; font-weight: 600; display: flex; justify-content: space-between; gap: 10px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--accent); font-weight: 700; }
.faq details[open] summary::after { content: "−"; }
.faq details > div { padding: 0 14px 12px; color: var(--muted); font-size: 14px; }

/* Weiter / Zurück */
.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.pager a { border: 1px solid var(--line); border-radius: 6px; padding: 12px 16px; text-decoration: none; color: inherit; background: var(--panel); display: grid; }
.pager a:hover { border-color: var(--accent); }
.pager small { font-size: 12px; color: var(--muted); }
.pager b { font-size: 15px; }
.pager .next { text-align: right; }

/* Fuß */
.site-foot { border-top: 1px solid var(--line); background: var(--panel); }
.site-foot-in { max-width: 1160px; margin: 0 auto; padding: 18px 16px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; font-size: 13px; color: var(--muted); }
.site-foot a { color: var(--muted); }
.disclaimer { width: 100%; margin: 0; font-size: 11px; text-align: center; }

/* Toast */
.toast { position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); background: var(--fg); color: var(--panel); padding: 8px 14px; border-radius: 4px; font-size: 12.5px; font-weight: 600; z-index: 30; }

@media (max-width: 900px) {
  .wrap { grid-template-columns: minmax(0, 1fr); }
  .side { position: static; max-height: none; }
  .big-cards, .pager { grid-template-columns: minmax(0, 1fr); }
  .site-nav { display: none; }
  .box { padding: 18px 16px; }
  h1 { font-size: 26px; }
  .icon-btn.cta { display: none; }
  td:first-child { width: auto; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }
