/* Gemeinsames Stylesheet der Projektseiten. Je Seite setzt <body data-accent="…"> die Akzentfarbe. */
:root {
  --bg: #f6f5f2;
  --surface: #ffffff;
  --surface-2: #efede8;
  --text: #1d1c1a;
  --muted: #5f5b54;
  --line: #dedad2;
  --shadow: 0 1px 2px rgb(0 0 0 / 6%), 0 8px 24px rgb(0 0 0 / 6%);
  --accent: #b5832f;
  --accent-ink: #ffffff;
  --radius: 14px;
  --max: 1080px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #121316;
    --surface: #1a1c20;
    --surface-2: #22252a;
    --text: #ecebe8;
    --muted: #a3a09a;
    --line: #2e3137;
    --shadow: 0 1px 2px rgb(0 0 0 / 40%), 0 8px 24px rgb(0 0 0 / 30%);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #121316;
  --surface: #1a1c20;
  --surface-2: #22252a;
  --text: #ecebe8;
  --muted: #a3a09a;
  --line: #2e3137;
  --shadow: 0 1px 2px rgb(0 0 0 / 40%), 0 8px 24px rgb(0 0 0 / 30%);
  color-scheme: dark;
}

/* Akzentfarben der Projekte – überall gleich, damit man jedes Projekt wiedererkennt */
[data-accent="proxy"]    { --accent: #3b82f6; }
[data-accent="bilder"]   { --accent: #c9a14a; --accent-ink: #1d1c1a; }
[data-accent="whisper"]  { --accent: #8b7cf6; }
[data-accent="basalt"]   { --accent: #e07a3c; }
[data-accent="dnd"]      { --accent: #c0392b; }
[data-accent="facerec"]  { --accent: #14a38b; }
.c-proxy   { --c: #3b82f6; }
.c-bilder  { --c: #c9a14a; }
.c-whisper { --c: #8b7cf6; }
.c-basalt  { --c: #e07a3c; }
.c-dnd     { --c: #c0392b; }
.c-facerec { --c: #14a38b; }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
img { max-width: 100%; display: block; }
a { color: var(--accent); }
code { font: 0.9em ui-monospace, "Cascadia Mono", Consolas, monospace; background: var(--surface-2); padding: 0.1em 0.35em; border-radius: 5px; }
pre { margin: 0; overflow-x: auto; background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; }
pre code { background: none; padding: 0; font-size: 0.85rem; line-height: 1.55; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 16px; }

/* Kopfzeile mit allen Projekten der Familie */
.top { border-bottom: 1px solid var(--line); background: var(--surface); position: sticky; top: 0; z-index: 5; }
.top .wrap { display: flex; align-items: center; gap: 18px; min-height: 56px; overflow-x: auto; scrollbar-width: none; }
.top .wrap::-webkit-scrollbar { display: none; }
.brand { font-weight: 700; text-decoration: none; color: var(--text); white-space: nowrap; display: flex; align-items: center; gap: 8px; }
.brand svg { width: 22px; height: 22px; }
.nav { display: flex; gap: 4px; margin-left: auto; }
.nav a { color: var(--muted); text-decoration: none; font-size: 0.9rem; padding: 6px 10px; border-radius: 8px; white-space: nowrap; display: flex; align-items: center; gap: 6px; }
.nav a::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--c); }
.nav a:hover { background: var(--surface-2); color: var(--text); }
.nav a[aria-current="page"] { background: var(--surface-2); color: var(--text); font-weight: 600; }
.lang { color: var(--muted); text-decoration: none; font-size: 0.85rem; padding: 5px 10px; border: 1px solid var(--line); border-radius: 8px; white-space: nowrap; }
.lang:hover { color: var(--text); background: var(--surface-2); }
.lang.home { margin-right: 4px; }

/* Kopf einer Projektseite */
.hero { padding: 56px 0 28px; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 0.8rem; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--accent); }
.eyebrow::before { content: ""; width: 10px; height: 10px; border-radius: 3px; background: var(--accent); }
h1 { font-size: clamp(2rem, 5vw, 3rem); line-height: 1.1; margin: 10px 0 14px; letter-spacing: -0.02em; }
.lead { font-size: 1.15rem; color: var(--muted); max-width: 62ch; margin: 0; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 10px; font-weight: 600; text-decoration: none; border: 1px solid var(--line); color: var(--text); background: var(--surface); }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
.btn:hover { filter: brightness(1.05); }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 18px; padding: 0; list-style: none; }
.tags li { font-size: 0.8rem; padding: 3px 10px; border-radius: 99px; background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); }

/* Screenshot im Fenster-Rahmen */
.shot { margin: 8px 0 8px; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow); background: var(--surface); }
.shot .bar { display: flex; gap: 6px; padding: 10px 12px; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.shot .bar i { width: 10px; height: 10px; border-radius: 50%; background: var(--line); }
.shot img { width: 100%; height: auto; }
.shot.phone { max-width: 340px; margin-inline: auto; border-radius: 26px; border-width: 6px; border-color: var(--surface-2); }
figcaption { font-size: 0.85rem; color: var(--muted); margin-top: 8px; text-align: center; }
.split { display: grid; grid-template-columns: 1fr; gap: 28px; align-items: center; }
@media (min-width: 860px) { .split { grid-template-columns: 1.1fr 0.9fr; } .split.rev > :first-child { order: 2; } }

section { padding: 36px 0; }
h2 { font-size: 1.5rem; letter-spacing: -0.01em; margin: 0 0 16px; }
h3 { font-size: 1.05rem; margin: 0 0 6px; }
p { margin: 0 0 12px; }
.muted { color: var(--muted); }

/* Funktionskacheln */
.grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.card p { margin: 0; color: var(--muted); font-size: 0.95rem; }
.card .ico { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; margin-bottom: 10px; background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--accent); }
.card .ico svg { width: 18px; height: 18px; }

/* Verwandte Projekte */
.family { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); }
.fam { display: block; text-decoration: none; color: var(--text); background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--c); border-radius: 12px; padding: 14px 16px; }
.fam:hover { border-color: var(--c); }
.fam strong { display: block; }
.fam span { color: var(--muted); font-size: 0.9rem; }

/* Diagramm des Zusammenspiels */
.diagram { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; overflow-x: auto; }
.diagram svg { display: block; width: 100%; min-width: 640px; height: auto; }
.diagram .node rect { fill: var(--surface-2); stroke: var(--c); stroke-width: 2; }
.diagram .node.here rect { fill: color-mix(in srgb, var(--c) 18%, var(--surface)); stroke-width: 3; }
.diagram .node text { fill: var(--text); font: 600 15px system-ui, sans-serif; }
.diagram .node text.sub { fill: var(--muted); font: 12px system-ui, sans-serif; }
.diagram .edge { stroke: var(--muted); stroke-width: 1.6; fill: none; }
.diagram .lbl { fill: var(--muted); font: 12px system-ui, sans-serif; }
.diagram .lbl-bg { fill: var(--surface); }
.diagram a:hover rect { filter: brightness(1.08); }

/* Hinweise */
.note { border: 1px solid var(--line); background: var(--surface); border-radius: 12px; padding: 14px 16px; font-size: 0.92rem; color: var(--muted); }
.note strong { color: var(--text); }
table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 600; }
.tablewrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }

/* Fuß mit Spenden-Link */
.foot { border-top: 1px solid var(--line); margin-top: 32px; padding: 28px 0 40px; color: var(--muted); font-size: 0.9rem; }
.foot .wrap { display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: center; justify-content: space-between; }
.donate { display: none; }
.donate.on { display: inline-flex; }
.actions.wrapped { justify-content: center; }
.donate.bmc img { display: block; width: 158px; height: 46px; }
.donate.bmc:hover img { filter: brightness(1.05); }

.prose > p, .prose > h2 { max-width: 72ch; }
.examples { grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); }
.examples img { aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }
.examples figure:nth-child(2) img { object-fit: contain; background: var(--surface-2); padding: 8px; }
