/* ============================================================
   HalalMatch – Designsystem
   Palette: Dunkelgrün, Smaragd, Gold, Cremeweiß, Anthrazit
   ============================================================ */

:root {
  --deep:      #0F3D2E;
  --deep-2:    #0A2C21;
  --emerald:   #1E7A5A;
  --emerald-2: #2E9B74;
  --gold:      #C9A227;
  --gold-soft: #E7C766;
  --cream:     #F7F3E9;
  --cream-2:   #EFE9DA;
  --ink:       #1C2523;
  --ink-2:     #3C4744;
  --muted:     #6E7B77;
  --paper:     #FFFFFF;
  --line:      #E2DCCC;
  --danger:    #A63A2E;
  --ok:        #1E7A5A;

  --bg:        var(--cream);
  --surface:   var(--paper);
  --surface-2: #FBF9F3;
  --text:      var(--ink);
  --text-soft: var(--muted);
  --border:    var(--line);
  --brand:     var(--deep);

  --radius:    16px;
  --radius-sm: 10px;
  --radius-lg: 26px;
  --shadow:    0 1px 2px rgba(15,61,46,.06), 0 12px 32px -18px rgba(15,61,46,.30);
  --shadow-lg: 0 24px 60px -28px rgba(15,61,46,.45);
  --ring:      0 0 0 3px rgba(30,122,90,.22);

  --font-display: "Marcellus", "Iowan Old Style", Georgia, serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  --nav-h: 68px;
  --maxw: 1180px;
}

[data-theme="dark"] {
  --bg:        #0C1512;
  --surface:   #121F1A;
  --surface-2: #16261F;
  --text:      #ECEFE9;
  --text-soft: #9BAAA3;
  --border:    #23372E;
  --cream:     #ECEFE9;
  --brand:     #0B241B;
  --shadow:    0 1px 2px rgba(0,0,0,.4), 0 16px 40px -22px rgba(0,0,0,.8);
  --shadow-lg: 0 30px 70px -30px rgba(0,0,0,.9);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 400; line-height: 1.15; margin: 0 0 .5em; letter-spacing: .2px; }
h1 { font-size: clamp(2rem, 5vw, 3.4rem); }
h2 { font-size: clamp(1.5rem, 3.4vw, 2.3rem); }
h3 { font-size: 1.22rem; }
p  { margin: 0 0 1rem; }
a  { color: var(--emerald); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }

:focus-visible { outline: 2px solid var(--emerald-2); outline-offset: 2px; border-radius: 6px; }

.container { width: min(100% - 2.5rem, var(--maxw)); margin-inline: auto; }
.narrow { width: min(100% - 2.5rem, 780px); margin-inline: auto; }

.eyebrow {
  font-size: .72rem; letter-spacing: .18em; text-transform: uppercase;
  color: var(--gold); font-weight: 600; margin-bottom: .6rem; display: block;
}
.lead { font-size: 1.09rem; color: var(--text-soft); }
.muted { color: var(--text-soft); }
.small { font-size: .84rem; }
.center { text-align: center; }
.mt-1{margin-top:.5rem}.mt-2{margin-top:1rem}.mt-3{margin-top:1.6rem}.mt-4{margin-top:2.4rem}
.mb-0{margin-bottom:0}.mb-2{margin-bottom:1rem}.mb-3{margin-bottom:1.6rem}
.row { display: flex; gap: .6rem; flex-wrap: wrap; align-items: center; }
.row-between { display: flex; gap: 1rem; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.grid { display: grid; gap: 1.2rem; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }

/* ---------- Signature: Khatam-Muster (Achtstern) ---------- */
.pattern {
  background-image:
    repeating-conic-gradient(from 22.5deg at 50% 50%,
      rgba(201,162,39,.13) 0deg 11deg, transparent 11deg 45deg);
  background-size: 78px 78px;
}
.pattern-soft {
  background-image:
    repeating-conic-gradient(from 22.5deg at 50% 50%,
      rgba(15,61,46,.05) 0deg 9deg, transparent 9deg 45deg);
  background-size: 64px 64px;
}
.star {
  width: 12px; height: 12px; flex: none;
  background: var(--gold);
  clip-path: polygon(50% 0,61% 35%,98% 35%,68% 57%,79% 91%,50% 70%,21% 91%,32% 57%,2% 35%,39% 35%);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .78rem 1.4rem; border-radius: 999px; border: 1px solid transparent;
  font: inherit; font-weight: 600; font-size: .95rem; cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease, color .18s ease;
  text-decoration: none; line-height: 1;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary { background: var(--deep); color: var(--cream); box-shadow: var(--shadow); }
.btn-primary:hover { background: var(--emerald); }
.btn-gold { background: var(--gold); color: #2A2103; }
.btn-gold:hover { background: var(--gold-soft); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--border); }
.btn-ghost:hover { border-color: var(--emerald); color: var(--emerald); }
.btn-light { background: var(--cream); color: var(--deep); }
.btn-danger { background: transparent; color: var(--danger); border-color: rgba(166,58,46,.4); }
.btn-danger:hover { background: rgba(166,58,46,.08); }
.btn-sm { padding: .5rem .9rem; font-size: .84rem; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .5; cursor: not-allowed; transform: none; }

/* ---------- Karten ---------- */
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.5rem; box-shadow: var(--shadow);
}
.card-tight { padding: 1.1rem; }
.card-hover { transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease; }
.card-hover:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: rgba(30,122,90,.4); }

.badge {
  display: inline-flex; align-items: center; gap: .35rem;
  padding: .28rem .68rem; border-radius: 999px; font-size: .76rem; font-weight: 600;
  background: rgba(30,122,90,.1); color: var(--emerald); border: 1px solid rgba(30,122,90,.2);
}
.badge-gold { background: rgba(201,162,39,.14); color: #8A6F0F; border-color: rgba(201,162,39,.35); }
[data-theme="dark"] .badge-gold { color: var(--gold-soft); }
.badge-muted { background: transparent; color: var(--text-soft); border-color: var(--border); }
.badge-danger { background: rgba(166,58,46,.1); color: var(--danger); border-color: rgba(166,58,46,.25); }

.chip {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .34rem .8rem; border-radius: 999px; font-size: .82rem;
  background: var(--surface-2); border: 1px solid var(--border); color: var(--text-soft);
}

/* ---------- Formulare ---------- */
label { display: block; font-size: .85rem; font-weight: 600; margin-bottom: .35rem; color: var(--text); }
.hint { font-size: .78rem; color: var(--text-soft); font-weight: 400; margin-top: .3rem; }
input[type=text], input[type=email], input[type=password], input[type=date], input[type=number],
input[type=tel], input[type=search], select, textarea {
  width: 100%; padding: .78rem .95rem; font: inherit; font-size: .95rem;
  color: var(--text); background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  transition: border-color .16s ease, box-shadow .16s ease;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--emerald); box-shadow: var(--ring); }
textarea { min-height: 120px; resize: vertical; }
.field { margin-bottom: 1.1rem; }
.field-row { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.check { display: flex; gap: .6rem; align-items: flex-start; font-weight: 400; font-size: .92rem; margin-bottom: .55rem; cursor: pointer; }
.check input { margin-top: .25rem; flex: none; width: 17px; height: 17px; accent-color: var(--emerald); }
.radio-cards { display: grid; gap: .6rem; }
.radio-card {
  display: flex; gap: .75rem; align-items: flex-start; padding: .9rem 1rem; cursor: pointer;
  border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface);
  transition: border-color .16s ease, background .16s ease; font-weight: 400;
}
.radio-card:hover { border-color: var(--emerald); }
.radio-card input { margin-top: .2rem; accent-color: var(--emerald); }
.radio-card input:checked ~ span { color: var(--emerald); }
.radio-card:has(input:checked) { border-color: var(--emerald); background: rgba(30,122,90,.06); }

/* ---------- Meldungen ---------- */
.alert { padding: .9rem 1.1rem; border-radius: var(--radius-sm); margin-bottom: 1rem; font-size: .92rem; border: 1px solid; }
.alert-success { background: rgba(30,122,90,.08); border-color: rgba(30,122,90,.3); color: var(--emerald); }
.alert-error   { background: rgba(166,58,46,.08); border-color: rgba(166,58,46,.3); color: var(--danger); }
.alert-info    { background: rgba(201,162,39,.1); border-color: rgba(201,162,39,.3); color: #7C6410; }
[data-theme="dark"] .alert-info { color: var(--gold-soft); }

.notice-scholar {
  border-left: 3px solid var(--gold); background: var(--surface-2);
  padding: .9rem 1.1rem; border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: .86rem; color: var(--text-soft);
}

/* ---------- Kopfzeile ---------- */
.site-header {
  position: sticky; top: 0; z-index: 60; background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(14px); border-bottom: 1px solid var(--border);
}
.site-header .inner { display: flex; align-items: center; gap: 1.5rem; height: var(--nav-h); }
.logo { display: flex; align-items: center; gap: .6rem; font-family: var(--font-display); font-size: 1.3rem; color: var(--text); }
.logo:hover { text-decoration: none; }
.logo b { font-weight: 400; }
.logo .accent { color: var(--emerald); }
.nav-links { display: flex; gap: 1.4rem; margin-left: auto; align-items: center; }
.nav-links a { color: var(--text-soft); font-size: .93rem; font-weight: 500; }
.nav-links a:hover { color: var(--emerald); text-decoration: none; }
.theme-toggle {
  background: transparent; border: 1px solid var(--border); border-radius: 999px;
  width: 38px; height: 38px; cursor: pointer; color: var(--text); font-size: 1rem;
  display: inline-flex; align-items: center; justify-content: center;
}
.theme-toggle:hover { border-color: var(--emerald); }
.burger { display: none; background: none; border: 0; font-size: 1.5rem; color: var(--text); cursor: pointer; }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  background: linear-gradient(160deg, var(--deep) 0%, var(--deep-2) 55%, #071B14 100%);
  color: var(--cream); padding: clamp(3.5rem, 9vw, 6.5rem) 0 clamp(3rem, 7vw, 5rem);
}
.hero::before {
  content: ""; position: absolute; inset: -30% -10% auto -10%; height: 150%;
  background-image: repeating-conic-gradient(from 22.5deg at 50% 50%,
    rgba(201,162,39,.16) 0deg 10deg, transparent 10deg 45deg);
  background-size: 92px 92px; opacity: .5; pointer-events: none;
  mask-image: radial-gradient(ellipse at 70% 30%, #000 10%, transparent 72%);
}
.hero .container { position: relative; }
.hero h1 { color: var(--cream); max-width: 16ch; }
.hero .lead { color: rgba(247,243,233,.78); max-width: 56ch; font-size: 1.12rem; }
.hero-actions { display: flex; gap: .8rem; flex-wrap: wrap; margin-top: 2rem; }
.hero-stats { display: flex; gap: 2.4rem; margin-top: 3.2rem; flex-wrap: wrap; }
.hero-stats div { border-left: 1px solid rgba(201,162,39,.4); padding-left: 1rem; }
.hero-stats strong { display: block; font-family: var(--font-display); font-size: 1.7rem; color: var(--gold-soft); }
.hero-stats span { font-size: .82rem; color: rgba(247,243,233,.65); }

section.band { padding: clamp(3rem, 7vw, 5rem) 0; }
section.band-alt { background: var(--surface-2); border-block: 1px solid var(--border); }

/* ---------- Ablauf (Signature: Sternenpfad) ---------- */
.path { display: grid; gap: 0; counter-reset: step; }
.path-item {
  display: grid; grid-template-columns: 46px 1fr; gap: 1.1rem;
  padding: 1.1rem 0; position: relative;
}
.path-item::before {
  content: ""; position: absolute; left: 23px; top: 0; bottom: 0; width: 1px;
  background: linear-gradient(var(--border), var(--border)); z-index: 0;
}
.path-item:first-child::before { top: 50%; }
.path-item:last-child::before { bottom: 50%; }
.path-node {
  width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center;
  background: var(--surface); border: 1px solid var(--border); position: relative; z-index: 1;
  font-family: var(--font-display); font-size: 1rem; color: var(--emerald);
}
.path-item.is-done .path-node { background: var(--deep); color: var(--gold-soft); border-color: var(--deep); }
.path-item.is-current .path-node { border-color: var(--gold); box-shadow: 0 0 0 4px rgba(201,162,39,.18); }
.path-body h4 { margin: .2rem 0 .15rem; font-size: 1.05rem; }
.path-body p { margin: 0; font-size: .9rem; color: var(--text-soft); }

/* ---------- Profilkarten ---------- */
.profile-grid { display: grid; gap: 1.2rem; grid-template-columns: repeat(auto-fill, minmax(255px, 1fr)); }
.profile-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column; }
.profile-photo { position: relative; aspect-ratio: 4 / 3; background: var(--surface-2); overflow: hidden; }
.profile-photo img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.profile-card:hover .profile-photo img { transform: scale(1.04); }
.profile-photo .placeholder {
  width: 100%; height: 100%; display: grid; place-items: center;
  background: linear-gradient(140deg, var(--deep), var(--emerald));
  color: var(--gold-soft); font-family: var(--font-display); font-size: 2.6rem;
}
.profile-photo .locked {
  position: absolute; inset: 0; display: grid; place-items: center; gap: .3rem;
  background: rgba(12,21,18,.55); color: var(--cream); font-size: .8rem; text-align: center; padding: 1rem;
  backdrop-filter: blur(6px);
}
.score-pill {
  position: absolute; top: .7rem; right: .7rem; background: rgba(255,255,255,.94);
  color: var(--deep); border-radius: 999px; padding: .3rem .7rem; font-size: .78rem; font-weight: 700;
}
.profile-body { padding: 1rem 1.1rem 1.2rem; flex: 1; display: flex; flex-direction: column; }
.profile-body h3 { font-size: 1.1rem; margin-bottom: .15rem; }
.profile-meta { font-size: .84rem; color: var(--text-soft); margin-bottom: .7rem; }
.profile-tags { display: flex; flex-wrap: wrap; gap: .35rem; margin-bottom: .9rem; }
.profile-actions { display: flex; gap: .5rem; margin-top: auto; }

.online-dot { width: 8px; height: 8px; border-radius: 50%; background: #2E9B74; display: inline-block; }
.offline-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--border); display: inline-block; }

/* ---------- Score-Aufschlüsselung ---------- */
.score-ring {
  --val: 0; width: 96px; height: 96px; border-radius: 50%; display: grid; place-items: center;
  background: conic-gradient(var(--emerald) calc(var(--val) * 1%), var(--surface-2) 0);
  position: relative; flex: none;
}
.score-ring::after {
  content: ""; position: absolute; inset: 8px; border-radius: 50%; background: var(--surface);
}
.score-ring span { position: relative; z-index: 1; font-family: var(--font-display); font-size: 1.45rem; }
.score-bar { margin-bottom: .7rem; }
.score-bar .row-between { font-size: .84rem; margin-bottom: .28rem; }
.score-track { height: 7px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.score-fill { height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--emerald), var(--gold)); transition: width .8s cubic-bezier(.2,.8,.2,1); }

/* ---------- App-Layout ---------- */
.app { display: grid; grid-template-columns: 250px 1fr; min-height: 100vh; }
.sidebar {
  background: var(--brand); color: rgba(247,243,233,.85); padding: 1.4rem 1rem;
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
[data-theme="dark"] .sidebar { border-right: 1px solid var(--border); }
.sidebar .logo { color: var(--cream); margin-bottom: 1.8rem; padding-inline: .5rem; }
.side-nav { display: flex; flex-direction: column; gap: .18rem; }
.side-nav a {
  display: flex; align-items: center; gap: .7rem; padding: .68rem .8rem; border-radius: var(--radius-sm);
  color: rgba(247,243,233,.78); font-size: .92rem; font-weight: 500;
}
.side-nav a:hover { background: rgba(255,255,255,.08); color: var(--cream); text-decoration: none; }
.side-nav a.active { background: rgba(201,162,39,.16); color: var(--gold-soft); }
.side-nav .count { margin-left: auto; background: var(--gold); color: #2A2103; border-radius: 999px; font-size: .7rem; padding: .1rem .45rem; font-weight: 700; }
.side-foot { margin-top: 1.6rem; padding-top: 1rem; border-top: 1px solid rgba(255,255,255,.12); font-size: .8rem; }
.main { padding: 1.6rem clamp(1rem, 3vw, 2.4rem) 5.5rem; max-width: 100%; }
.page-head { margin-bottom: 1.6rem; }
.page-head h1 { font-size: clamp(1.6rem, 3.2vw, 2.2rem); margin-bottom: .25rem; }

.stat-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.1rem 1.2rem; }
.stat-card .n { font-family: var(--font-display); font-size: 1.9rem; color: var(--emerald); line-height: 1.1; }
.stat-card .l { font-size: .8rem; color: var(--text-soft); }

/* ---------- Mobile Navigation ---------- */
.mobile-nav {
  display: none; position: fixed; bottom: 0; left: 0; right: 0; z-index: 70;
  background: var(--surface); border-top: 1px solid var(--border);
  padding: .4rem .3rem calc(.4rem + env(safe-area-inset-bottom));
  grid-template-columns: repeat(5, 1fr);
}
.mobile-nav a {
  display: flex; flex-direction: column; align-items: center; gap: .15rem;
  font-size: .68rem; color: var(--text-soft); padding: .35rem 0; position: relative;
}
.mobile-nav a.active { color: var(--emerald); }
.mobile-nav a:hover { text-decoration: none; }
.mobile-nav svg { width: 22px; height: 22px; }
.mobile-nav .dot { position: absolute; top: .25rem; right: 22%; width: 7px; height: 7px; background: var(--gold); border-radius: 50%; }

/* ---------- Chat ---------- */
.chat-wrap { display: grid; grid-template-columns: 300px 1fr; gap: 1.2rem; align-items: start; }
.chat-list { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.chat-list a { display: flex; gap: .8rem; padding: .85rem 1rem; border-bottom: 1px solid var(--border); color: var(--text); }
.chat-list a:last-child { border-bottom: 0; }
.chat-list a:hover { background: var(--surface-2); text-decoration: none; }
.chat-list a.active { background: rgba(30,122,90,.08); }
.chat-panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); display: flex; flex-direction: column; height: min(72vh, 720px); }
.chat-head { padding: .9rem 1.2rem; border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: .8rem; }
.wali-banner {
  background: rgba(201,162,39,.12); border-bottom: 1px solid rgba(201,162,39,.3);
  padding: .55rem 1.2rem; font-size: .82rem; color: #7C6410; display: flex; align-items: center; gap: .5rem;
}
[data-theme="dark"] .wali-banner { color: var(--gold-soft); }
.chat-body { flex: 1; overflow-y: auto; padding: 1.2rem; display: flex; flex-direction: column; gap: .7rem; background: var(--surface-2); }
.msg { max-width: min(74%, 460px); padding: .65rem .95rem; border-radius: 16px; font-size: .93rem; position: relative; animation: pop .22s ease; }
.msg .meta { font-size: .68rem; opacity: .65; margin-top: .3rem; display: flex; gap: .35rem; align-items: center; }
.msg.in  { background: var(--surface); border: 1px solid var(--border); border-bottom-left-radius: 5px; align-self: flex-start; }
.msg.out { background: var(--deep); color: var(--cream); border-bottom-right-radius: 5px; align-self: flex-end; }
.msg.wali { background: rgba(201,162,39,.14); border: 1px solid rgba(201,162,39,.35); align-self: flex-start; }
.msg.system { align-self: center; background: transparent; border: 1px dashed var(--border); color: var(--text-soft); font-size: .8rem; text-align: center; max-width: 90%; }
.msg .del { position: absolute; top: 2px; right: 6px; opacity: 0; font-size: .7rem; cursor: pointer; background: none; border: 0; color: inherit; }
.msg:hover .del { opacity: .6; }
.chat-foot { padding: .8rem; border-top: 1px solid var(--border); display: flex; gap: .6rem; align-items: flex-end; }
.chat-foot textarea { min-height: 44px; max-height: 130px; border-radius: 22px; padding: .7rem 1rem; }
.typing { font-size: .78rem; color: var(--text-soft); padding: 0 1.2rem .4rem; height: 18px; }
@keyframes pop { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ---------- Phasenleiste ---------- */
.phases { display: flex; gap: .35rem; margin: 1rem 0; flex-wrap: wrap; }
.phase-step { flex: 1 1 90px; text-align: center; }
.phase-step .bar { height: 5px; border-radius: 999px; background: var(--border); margin-bottom: .4rem; }
.phase-step.done .bar { background: var(--emerald); }
.phase-step.current .bar { background: var(--gold); }
.phase-step span { font-size: .68rem; color: var(--text-soft); }
.phase-step.done span, .phase-step.current span { color: var(--text); font-weight: 600; }

/* ---------- Tabellen (Admin) ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
table.data { width: 100%; border-collapse: collapse; font-size: .89rem; }
table.data th, table.data td { padding: .72rem .9rem; text-align: left; border-bottom: 1px solid var(--border); white-space: nowrap; }
table.data th { background: var(--surface-2); font-weight: 600; font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--text-soft); }
table.data tr:last-child td { border-bottom: 0; }
table.data tr:hover td { background: var(--surface-2); }

/* ---------- Schritte in der Registrierung ---------- */
.steps { display: flex; gap: .4rem; margin-bottom: 2rem; }
.steps div { flex: 1; height: 4px; border-radius: 999px; background: var(--border); }
.steps div.done { background: var(--emerald); }
.steps div.current { background: var(--gold); }

/* ---------- Accordion (FAQ) ---------- */
details.faq { border-bottom: 1px solid var(--border); padding: 1.1rem 0; }
details.faq summary { cursor: pointer; font-family: var(--font-display); font-size: 1.1rem; list-style: none; display: flex; justify-content: space-between; gap: 1rem; }
details.faq summary::-webkit-details-marker { display: none; }
details.faq summary::after { content: "+"; color: var(--gold); font-size: 1.3rem; line-height: 1; }
details.faq[open] summary::after { content: "–"; }
details.faq p { margin: .8rem 0 0; color: var(--text-soft); }

/* ---------- Avatare ---------- */
.avatar { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; flex: none; background: var(--surface-2); }
.avatar-lg { width: 96px; height: 96px; }
.avatar-fallback {
  display: grid; place-items: center; background: linear-gradient(140deg, var(--deep), var(--emerald));
  color: var(--gold-soft); font-family: var(--font-display); font-size: 1.1rem;
}
.avatar-lg.avatar-fallback { font-size: 2.2rem; }

/* ---------- Footer ---------- */
.site-footer { background: var(--deep-2); color: rgba(247,243,233,.72); padding: 3.2rem 0 2rem; margin-top: 0; }
.site-footer a { color: rgba(247,243,233,.72); font-size: .89rem; }
.site-footer a:hover { color: var(--gold-soft); }
.site-footer h4 { color: var(--cream); font-size: .95rem; margin-bottom: .8rem; }
.footer-grid { display: grid; gap: 2rem; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.footer-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .45rem; }
.footer-bottom { margin-top: 2.4rem; padding-top: 1.4rem; border-top: 1px solid rgba(255,255,255,.1); font-size: .8rem; display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }

/* ---------- Cookie-Banner ---------- */
.cookie-bar {
  position: fixed; bottom: 1rem; left: 50%; transform: translateX(-50%);
  width: min(100% - 2rem, 660px); background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.1rem 1.2rem; box-shadow: var(--shadow-lg); z-index: 90;
  display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; font-size: .87rem;
}

/* ---------- Toast ---------- */
#toasts { position: fixed; top: 1rem; right: 1rem; z-index: 120; display: grid; gap: .5rem; }
.toast {
  background: var(--deep); color: var(--cream); padding: .8rem 1.1rem; border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg); font-size: .88rem; animation: slidein .25s ease; max-width: 340px;
}
.toast.err { background: var(--danger); }
@keyframes slidein { from { opacity: 0; transform: translateX(20px); } to { opacity: 1; transform: none; } }

/* ---------- Reveal beim Scrollen ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal.visible { opacity: 1; transform: none; }

/* ---------- Responsiv ---------- */
@media (max-width: 960px) {
  .chat-wrap { grid-template-columns: 1fr; }
  .chat-list.has-active { display: none; }
}
@media (max-width: 860px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .mobile-nav { display: grid; }
  .main { padding-bottom: 6rem; }
  .nav-links { display: none; }
  .nav-links.open {
    display: flex; flex-direction: column; position: absolute; top: var(--nav-h); left: 0; right: 0;
    background: var(--surface); border-bottom: 1px solid var(--border); padding: 1rem 1.5rem 1.4rem; gap: .9rem;
  }
  .burger { display: block; margin-left: auto; }
  .site-header .inner { position: relative; }
}
@media (max-width: 520px) {
  .hero-stats { gap: 1.2rem; }
  .card { padding: 1.15rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; }
}

@media print { .site-header, .mobile-nav, .sidebar, .site-footer { display: none; } }

/* ---------- Fließtext für Artikel und Rechtstexte ---------- */
.prose { color: var(--text-soft); line-height: 1.8; max-width: 68ch; }
.prose h2 { font-family: var(--font-display); color: var(--text); margin: 2rem 0 .6rem; font-size: 1.35rem; }
.prose h3 { color: var(--text); margin: 1.4rem 0 .4rem; font-size: 1.08rem; }
.prose p { margin-bottom: 1rem; }
.prose ul, .prose ol { padding-left: 1.3rem; margin-bottom: 1rem; }
.prose li { margin-bottom: .4rem; }
.prose a { color: var(--emerald); }
.prose strong { color: var(--text); }
