/* =========================================================
   Gemeinsames Stylesheet für Hub, Impressum und Datenschutz
   Keine externen Schriften/CDNs (DSGVO) – nur Systemschriften.
   ========================================================= */

:root {
  --bg: #f6f5f1;
  --surface: #ffffff;
  --text: #1f2328;
  --muted: #5d6470;
  --border: #e3e1da;
  --accent: #2f6f5e;
  --accent-soft: #e3efe9;
  --shadow: 0 1px 2px rgba(0,0,0,.04), 0 4px 16px rgba(0,0,0,.05);
  --radius: 14px;
  --max: 1100px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #15171a;
    --surface: #1e2125;
    --text: #e8e9eb;
    --muted: #a0a6b0;
    --border: #2e3237;
    --accent: #7cc4ad;
    --accent-soft: #23332e;
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 4px 16px rgba(0,0,0,.25);
  }
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.6;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

a { color: var(--accent); }

.wrap {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 16px;
}

/* ---------- Kopfbereich ---------- */
.site-header { padding: 48px 0 24px; }
.site-header h1 {
  margin: 0 0 6px;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  letter-spacing: -0.02em;
  line-height: 1.15;
}
.site-header p { margin: 0; color: var(--muted); max-width: 60ch; }
.site-header .back { display: inline-block; margin-bottom: 16px; text-decoration: none; }

main { flex: 1; padding-bottom: 48px; }

/* ---------- Werkzeugleiste (Suche + Filter) ---------- */
.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin: 8px 0 24px;
}
.search {
  flex: 1 1 240px;
  min-width: 0;
  padding: 10px 14px;
  font: inherit;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
}
.search:focus { outline: 2px solid var(--accent); outline-offset: 1px; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  font: inherit;
  font-size: .9rem;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
}
.chip[aria-pressed="true"] {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--surface);
}

/* ---------- Kacheln ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 18px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.card {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  color: inherit;
  text-decoration: none;
  transition: transform .15s ease, border-color .15s ease;
}
.card:hover, .card:focus-visible {
  transform: translateY(-2px);
  border-color: var(--accent);
}
.card:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.card .tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.card .tag {
  font-size: .78rem;
  font-weight: 600;
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
}
.card h2 { margin: 0 0 6px; font-size: 1.15rem; line-height: 1.3; }
.card p { margin: 0; color: var(--muted); font-size: .95rem; }
.card .go { margin-top: auto; padding-top: 14px; font-weight: 600; color: var(--accent); font-size: .9rem; }

.empty {
  padding: 32px;
  text-align: center;
  color: var(--muted);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
}

/* ---------- Textseiten (Impressum / Datenschutz) ---------- */
.prose {
  max-width: 72ch;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: clamp(20px, 4vw, 40px);
}
.prose h2 { font-size: 1.2rem; margin: 1.8em 0 .4em; }
.prose h2:first-child { margin-top: 0; }
.placeholder { background: #fff3c4; color: #5c4700; padding: 0 4px; border-radius: 4px; }
@media (prefers-color-scheme: dark) {
  .placeholder { background: #4a3d0a; color: #ffe9a3; }
}

/* ---------- Fußzeile ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 20px 0;
  font-size: .9rem;
  color: var(--muted);
}
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 8px 20px; justify-content: space-between; }
.site-footer nav { display: flex; gap: 16px; }

[hidden] { display: none !important; }
