/* Funk-Lernsystem – gemeinsames Layout (keine externen Ressourcen) */
:root {
  --bg: #f3f5f8;
  --fg: #1a1d21;
  --muted: #5a6270;
  --card-bg: #ffffff;
  --border: #d7dce2;
  --primary: #0b6fb8;
  --primary-fg: #ffffff;
  --primary-hover: #095892;
  --chip-bg: #eef1f5;
  --shadow: rgba(20, 25, 35, 0.08);
  --green: #1e8e3e;
  --green-bg: #e5f6ea;
  --red: #c5221f;
  --red-bg: #fbe6e5;
  --amber: #a3690a;
  --amber-bg: #fdf0dc;
  --header-bg: #0a3d66;
  --header-fg: #eaf4fb;
  --header-muted: #b8d4ea;
  --wrap: 46rem;
  --radius: 12px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14161a;
    --fg: #eceef1;
    --muted: #a2a9b4;
    --card-bg: #1f2227;
    --border: #33373f;
    --primary: #4da3e0;
    --primary-fg: #0a0e14;
    --primary-hover: #6db7e8;
    --chip-bg: #2a2e35;
    --shadow: rgba(0, 0, 0, 0.4);
    --green: #57c479;
    --green-bg: #123320;
    --red: #ef6a5f;
    --red-bg: #3a1917;
    --amber: #e0b357;
    --amber-bg: #3a2c0f;
    --header-bg: #071f33;
    --header-fg: #e7f1f8;
    --header-muted: #8eb3cc;
  }
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.55;
  -webkit-text-size-adjust: 100%;
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
}
img, svg { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); }
a:hover { color: var(--primary-hover); }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 1rem; }
.skip {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.skip:focus {
  left: 1rem;
  top: 1rem;
  width: auto;
  height: auto;
  padding: .5rem .75rem;
  background: var(--card-bg);
  color: var(--fg);
  border: 2px solid var(--primary);
  border-radius: 8px;
  z-index: 100;
}

/* Kopf */
.top {
  background: var(--header-bg);
  color: var(--header-fg);
  position: sticky;
  top: 0;
  z-index: 30;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.top-inner {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: 60px;
  flex-wrap: wrap;
  padding-top: .35rem;
  padding-bottom: .35rem;
}
.brand {
  display: flex;
  align-items: center;
  gap: .65rem;
  text-decoration: none;
  color: var(--header-fg);
  min-width: 0;
}
.brand:hover { color: #fff; }
.brand-mark {
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
}
.brand-text {
  display: flex;
  flex-direction: column;
  gap: 0;
  line-height: 1.15;
  min-width: 0;
}
.brand-title {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--header-fg);
}
.brand-sub {
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--header-muted);
}
@media (max-width: 420px) {
  .brand-text { display: none; }
}
.nav {
  display: flex;
  gap: .15rem 1rem;
  flex-wrap: wrap;
  margin-left: auto;
}
.nav a {
  color: var(--header-muted);
  text-decoration: none;
  font-size: .92rem;
  padding: .4rem 0;
  border-bottom: 2px solid transparent;
}
.nav a:hover { color: #fff; border-color: rgba(255, 255, 255, 0.45); }
.nav a[aria-current="page"] { color: #fff; border-color: #fff; }

/* Hauptbereich */
main { padding: 1.25rem 0 2.5rem; }
.app-wrap { max-width: 720px; }
.page-hero {
  margin: 0 0 1.1rem;
  padding: 0 .1rem;
}
.page-hero h1 {
  margin: 0 0 .25rem;
  font-size: clamp(1.25rem, 3.5vw, 1.55rem);
  line-height: 1.2;
}
.page-hero p {
  margin: 0;
  color: var(--muted);
  font-size: .92rem;
}

/* Rechtstexte */
.legal-page main { padding: 2rem 0 3rem; }
.legal {
  max-width: 42rem;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem 1.35rem;
  box-shadow: 0 1px 3px var(--shadow);
}
.legal h1 {
  margin: 0 0 1rem;
  font-size: clamp(1.45rem, 4vw, 1.85rem);
  line-height: 1.2;
}
.legal h2 {
  margin: 1.75rem 0 .6rem;
  font-size: 1.08rem;
}
.legal h3 {
  margin: 1.25rem 0 .45rem;
  font-size: .98rem;
}
.legal p, .legal li { font-size: .95rem; }
.legal ul { padding-left: 1.2rem; margin: .5rem 0 1rem; }
.legal li { margin: .35rem 0; }
.legal .meta {
  color: var(--muted);
  font-size: .88rem;
  margin-bottom: 1.25rem;
}
.legal a { word-break: break-word; }

/* Fuß */
.site-footer {
  background: var(--header-bg);
  color: var(--header-muted);
  padding: 1.75rem 0 calc(1.75rem + env(safe-area-inset-bottom));
  font-size: .88rem;
}
.site-footer a { color: var(--header-fg); text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.foot-grid {
  display: flex;
  gap: 1rem 2rem;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
}
.foot-brand strong { color: #fff; font-weight: 600; }
.foot-nav {
  display: flex;
  gap: .9rem 1.1rem;
  flex-wrap: wrap;
}
