/* JH Vertrieb – visuelle Sprache von JH Finance: Aurora-Hintergrund, Glasflächen, KI-Verlauf, Geist. */
@font-face { font-family: "Geist"; src: url("/fonts/Geist-Variable.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Geist Mono"; src: url("/fonts/GeistMono-Variable.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }

:root {
  --background: #f4f5fa;
  --foreground: #0b0d14;
  --card: #ffffff;
  --popover: #ffffff;
  --primary: #2563eb;
  --primary-foreground: #ffffff;
  --secondary: #eceef6;
  --muted: #eceef6;
  --muted-foreground: #5d6378;
  --accent: #eaf0ff;
  --accent-foreground: #1d4ed8;
  --destructive: #d03b3b;
  --border: #e1e4ef;
  --input: #d7dbe8;
  --ring: #5b8cff;
  --good: #0ca30c;
  --good-ink: #006300;
  --warning: #fab219;
  --radius: 0.9rem;
  --ai-1: #3b82f6;
  --ai-2: #8b5cf6;
  --ai-3: #06b6d4;
  --glass: rgba(255, 255, 255, 0.72);
  --glass-border: rgba(15, 23, 42, 0.08);
  --aurora-1: rgba(59, 130, 246, 0.16);
  --aurora-2: rgba(139, 92, 246, 0.12);
  --aurora-3: rgba(6, 182, 212, 0.1);
  --sidebar-accent: rgba(37, 99, 235, 0.08);
  /* Art-Farben (Einträge) */
  --k-wissen: #2a78d6;
  --k-faq: #1baf7a;
  --k-einwand: #e5484d;
  --k-ablauf: #8b5cf6;
  --k-pdf: #eb6834;
  --side-w: 272px;
  --top-h: 64px;
  --bn-h: 64px;
  --sat: env(safe-area-inset-top, 0px);
  --sab: env(safe-area-inset-bottom, 0px);
  color-scheme: light;
}
.dark {
  --background: #06070c;
  --foreground: #eef0f7;
  --card: #0e111a;
  --popover: #121623;
  --primary: #5b8cff;
  --primary-foreground: #050711;
  --secondary: #171b28;
  --muted: #161a26;
  --muted-foreground: #9aa1b8;
  --accent: rgba(91, 140, 255, 0.12);
  --accent-foreground: #a9c2ff;
  --destructive: #f07272;
  --border: rgba(255, 255, 255, 0.08);
  --input: rgba(255, 255, 255, 0.12);
  --good-ink: #22c55e;
  --ai-1: #4f8bff;
  --ai-2: #a06bff;
  --ai-3: #22d3ee;
  --glass: rgba(16, 19, 30, 0.66);
  --glass-border: rgba(255, 255, 255, 0.08);
  --aurora-1: rgba(79, 139, 255, 0.22);
  --aurora-2: rgba(160, 107, 255, 0.16);
  --aurora-3: rgba(34, 211, 238, 0.1);
  --sidebar-accent: rgba(91, 140, 255, 0.12);
  --k-wissen: #5b9bff;
  --k-faq: #2dd4a0;
  --k-einwand: #ff6b6f;
  --k-ablauf: #b08cff;
  --k-pdf: #ff8a57;
  color-scheme: dark;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; border-color: var(--border); }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100dvh; overflow-x: clip;
  background: var(--background); color: var(--foreground);
  font: 16px/1.55 "Geist", system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  padding: calc(var(--top-h) + var(--sat)) 0 calc(var(--bn-h) + var(--sab) + 28px);
}
body.modal-open { overflow: hidden; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
h1 { font-size: 1.85rem; line-height: 1.15; font-weight: 600; letter-spacing: -0.025em; margin: 0; }
h2 { font-size: 0.95rem; font-weight: 600; margin: 0; letter-spacing: -0.005em; }
p { margin: 0; }
.muted { color: var(--muted-foreground); }
.small { font-size: 0.8rem; }
.tabular { font-variant-numeric: tabular-nums; }
.i { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.spacer { flex: 1; }
[hidden] { display: none !important; }
::selection { background: color-mix(in oklab, var(--ai-2) 35%, transparent); }

/* ---------- JH visual layer ---------- */
.app-bg {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(60rem 40rem at 10% -10%, var(--aurora-1), transparent 60%),
    radial-gradient(50rem 35rem at 100% 0%, var(--aurora-2), transparent 60%),
    radial-gradient(45rem 35rem at 50% 110%, var(--aurora-3), transparent 65%),
    var(--background);
}
.app-bg::after {
  content: ""; position: absolute; inset: 0; opacity: 0.5;
  background-image: linear-gradient(var(--glass-border) 1px, transparent 1px), linear-gradient(90deg, var(--glass-border) 1px, transparent 1px);
  background-size: 48px 48px;
  -webkit-mask-image: radial-gradient(ellipse at top, black 10%, transparent 70%);
  mask-image: radial-gradient(ellipse at top, black 10%, transparent 70%);
}
.glass {
  background: var(--glass); border: 1px solid var(--glass-border);
  backdrop-filter: blur(18px) saturate(140%); -webkit-backdrop-filter: blur(18px) saturate(140%);
  box-shadow: 0 1px 0 0 rgba(255, 255, 255, 0.04) inset, 0 12px 40px -18px rgba(0, 0, 0, 0.35);
}
.hover-lift { transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease; }
@media (hover: hover) {
  .hover-lift:hover {
    transform: translateY(-2px);
    border-color: color-mix(in oklab, var(--ai-1) 45%, transparent);
    box-shadow: 0 18px 50px -20px color-mix(in oklab, var(--ai-1) 45%, transparent);
  }
}
.hover-lift:active { transform: scale(.985); }
.ai-gradient { background: linear-gradient(135deg, var(--ai-1), var(--ai-2) 55%, var(--ai-3)); }
.ai-gradient-text { background: linear-gradient(110deg, var(--ai-1), var(--ai-2) 45%, var(--ai-3)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.ai-border { border: 1px solid transparent; background: linear-gradient(var(--card), var(--card)) padding-box, linear-gradient(135deg, var(--ai-1), var(--ai-2), var(--ai-3)) border-box; }
.ai-orb {
  position: relative; display: inline-flex; align-items: center; justify-content: center; flex: none;
  width: 36px; height: 36px; border-radius: 9999px;
  background: conic-gradient(from 0deg, var(--ai-1), var(--ai-2), var(--ai-3), var(--ai-1));
  animation: orb-spin 8s linear infinite;
  box-shadow: 0 0 40px -6px var(--ai-2), 0 0 80px -20px var(--ai-1);
}
.ai-orb::after {
  content: ""; position: absolute; inset: 18%; border-radius: 9999px;
  background: radial-gradient(circle at 35% 30%, rgba(255, 255, 255, .9), rgba(255, 255, 255, .15) 45%, transparent 70%);
  filter: blur(1px);
}
.ai-orb.thinking { animation: orb-spin 1.6s linear infinite, orb-pulse 1.2s ease-in-out infinite; }
.ai-orb.sm { width: 28px; height: 28px; }
.ai-orb.lg { width: 56px; height: 56px; }
.ai-orb.xl { width: 64px; height: 64px; }
@keyframes orb-spin { to { transform: rotate(360deg); } }
@keyframes orb-pulse { 50% { box-shadow: 0 0 60px -2px var(--ai-2), 0 0 110px -10px var(--ai-3); } }
.fade-up { animation: fade-up .45s ease both; }
@keyframes fade-up { from { opacity: 0; transform: translateY(8px); } }
@media (prefers-reduced-motion: reduce) { .ai-orb, .ai-orb.thinking, .fade-up { animation: none; } .hover-lift:hover { transform: none; } }

/* ---------- shell ---------- */
.sidebar {
  position: fixed; z-index: 40; top: 0; bottom: 0; left: 0; width: var(--side-w);
  display: flex; flex-direction: column; gap: 20px; padding: calc(var(--sat) + 16px) 16px calc(var(--sab) + 16px);
  border-width: 0 1px 0 0; border-radius: 0;
  transform: translateX(-105%); transition: transform .25s ease;
}
.drawer-open .sidebar { transform: none; }
.scrim { position: fixed; inset: 0; z-index: 35; background: rgba(0, 0, 0, .45); opacity: 0; pointer-events: none; transition: opacity .25s; }
.drawer-open .scrim { opacity: 1; pointer-events: auto; }
.brand { display: flex; align-items: center; gap: 10px; padding: 0 8px; text-decoration: none; }
.brand-mark {
  width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; flex: none;
  color: #fff; font-weight: 900; font-size: .85rem; letter-spacing: -0.06em; box-shadow: 0 10px 24px -10px var(--ai-2);
}
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-text b { font-weight: 600; letter-spacing: -0.01em; }
.brand-text small { font-size: 10px; letter-spacing: .18em; text-transform: uppercase; color: var(--muted-foreground); }
.ai-card { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 1.1rem; text-decoration: none; }
.ai-card:not(.on) { border: 1px solid transparent; background: linear-gradient(var(--card), var(--card)) padding-box, linear-gradient(135deg, var(--ai-1), var(--ai-2), var(--ai-3)) border-box; }
.ai-card.on { background: linear-gradient(135deg, var(--ai-1), var(--ai-2) 55%, var(--ai-3)); color: #fff; box-shadow: 0 12px 30px -12px var(--ai-2); }
.ai-card.on .ai-orb { animation: orb-spin 1.6s linear infinite, orb-pulse 1.2s ease-in-out infinite; }
.ai-card-text { display: flex; flex-direction: column; min-width: 0; }
.ai-card-text b { font-size: .9rem; font-weight: 600; }
.ai-card.on .ai-card-text b { background: none; color: #fff; }
.ai-card-text small { font-size: .75rem; color: var(--muted-foreground); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ai-card.on small { color: rgba(255, 255, 255, .8); }
.nav { flex: 1; overflow-y: auto; display: grid; align-content: start; gap: 2px; margin: 0 -4px; padding: 0 4px; }
.nav-label { font-size: 10px; letter-spacing: .18em; text-transform: uppercase; color: var(--muted-foreground); padding: 14px 12px 6px; }
.nav-link {
  position: relative; display: flex; align-items: center; gap: 12px; width: 100%;
  padding: 9px 12px; border-radius: 0.75rem; border: 0; background: none; cursor: pointer; text-align: left;
  font-size: .9rem; text-decoration: none; color: color-mix(in oklab, var(--foreground) 70%, transparent); transition: background .15s, color .15s;
}
.nav-link:hover { background: color-mix(in oklab, var(--sidebar-accent) 60%, transparent); color: var(--foreground); }
.nav-link.on { background: var(--sidebar-accent); color: var(--foreground); font-weight: 500; }
.nav-link.on::before { content: ""; position: absolute; left: 0; top: 6px; bottom: 6px; width: 3px; border-radius: 3px; background: linear-gradient(135deg, var(--ai-1), var(--ai-2) 55%, var(--ai-3)); }
.nav-link .i { width: 17px; height: 17px; }
.nav-link.on .i, .nav-link:hover .i { color: var(--primary); }
.nav-link span:nth-child(2) { flex: 1; }
.nav-badge { font-size: .72rem; font-weight: 600; padding: 0 7px; border-radius: 99px; background: color-mix(in oklab, var(--primary) 15%, transparent); color: var(--primary); font-variant-numeric: tabular-nums; }
.side-foot { display: grid; gap: 2px; border-top: 1px solid var(--border); padding-top: 12px; }
.side-status { display: flex; align-items: center; gap: 8px; padding: 6px 12px 0; font-size: .75rem; color: var(--muted-foreground); }
.side-status .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--good); box-shadow: 0 0 10px var(--good); }
.side-status.offline .dot { background: var(--warning); box-shadow: 0 0 10px var(--warning); }

.topbar {
  position: fixed; z-index: 30; top: 0; left: 0; right: 0;
  height: calc(var(--top-h) + var(--sat)); padding: var(--sat) 14px 0;
  display: flex; align-items: center; gap: 10px; border-width: 0 0 1px; border-radius: 0;
}
.top-title { font-weight: 600; font-size: .95rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 30vw; }
.is-root .topbar .back { display: none; }
.top-search {
  flex: 1; display: flex; align-items: center; gap: 8px; max-width: 520px; margin-left: auto; height: 42px; padding: 0 12px;
  border-radius: 0.8rem; border: 1px solid var(--input); background: color-mix(in oklab, var(--background) 40%, transparent);
  color: var(--muted-foreground); transition: border-color .15s, box-shadow .15s;
}
.top-search:focus-within { border-color: var(--ring); box-shadow: 0 0 0 3px color-mix(in oklab, var(--ring) 30%, transparent); }
.top-search input { flex: 1; min-width: 0; border: 0; outline: none; background: none; color: var(--foreground); font-size: .92rem; }
.top-search input::placeholder { color: var(--muted-foreground); }
.no-top-search .top-search { visibility: hidden; }
.mobile-only { display: inline-flex; }
.topbar .brand { padding: 0; }
.topbar .brand-mark { width: 34px; height: 34px; }

.bottomnav {
  position: fixed; z-index: 30; left: 0; right: 0; bottom: 0; height: calc(var(--bn-h) + var(--sab)); padding-bottom: var(--sab);
  display: grid; grid-template-columns: repeat(5, 1fr); align-items: center; border-width: 1px 0 0; border-radius: 0;
}
.bn { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 11px; text-decoration: none; color: var(--muted-foreground); }
.bn .i { width: 21px; height: 21px; }
.bn.on { color: var(--primary); }
.bn-ai .ai-orb { width: 54px; height: 54px; transform: translateY(-12px); box-shadow: 0 0 0 4px var(--background), 0 0 40px -6px var(--ai-2); }
.bn-ai .ai-orb .i { position: relative; z-index: 1; color: #fff; width: 22px; height: 22px; }
.bn-ai.on .ai-orb { animation: orb-spin 1.6s linear infinite, orb-pulse 1.2s ease-in-out infinite; }
.bn-ai .ai-orb .i { animation: orb-spin 8s linear infinite reverse; }

@media (min-width: 1024px) {
  body { padding-left: var(--side-w); padding-bottom: 40px; }
  .sidebar { transform: none; box-shadow: none; }
  .scrim, .bottomnav, .mobile-only { display: none !important; }
  .topbar { left: var(--side-w); padding-left: 28px; padding-right: 28px; }
}

main { max-width: 1200px; margin: 0 auto; padding: 24px 16px; }
@media (min-width: 640px) { main { padding: 26px 24px; } }
@media (min-width: 1024px) { main { padding: 30px 32px; } }
.stack { display: grid; gap: 20px; align-content: start; }
.stack > * { min-width: 0; }

/* ---------- page parts ---------- */
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 20px; margin-bottom: 22px; }
.page-head > div:first-child { min-width: 0; flex: 1 1 280px; }
.page-head .desc { margin-top: 6px; font-size: .9rem; color: var(--muted-foreground); }
.page-head .eyebrow { margin-bottom: 6px; }
.eyebrow { font-size: 11px; font-weight: 500; letter-spacing: .18em; text-transform: uppercase; color: var(--muted-foreground); }
.head-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; font-size: .82rem; color: var(--muted-foreground); margin-bottom: 10px; }
.crumbs a { text-decoration: none; padding: 2px 0; }
.crumbs a:hover { color: var(--foreground); }
.crumbs .i { width: 13px; height: 13px; opacity: .6; }
.panel { border-radius: 1.26rem; padding: 18px; min-width: 0; }
@media (min-width: 640px) { .panel { padding: 20px 22px; } }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.panel-head h2 { display: flex; align-items: center; gap: 8px; }
.panel-head h2 .i { width: 16px; height: 16px; color: var(--primary); }
.panel-head .more { font-size: .82rem; color: var(--muted-foreground); text-decoration: none; }
.panel-head .more:hover { color: var(--primary); }
.cols { display: grid; gap: 20px; }
.cols > * { min-width: 0; }
@media (min-width: 1100px) { .cols { grid-template-columns: 3fr 2fr; } .cols.side { grid-template-columns: minmax(0, 1fr) 340px; } }
.empty { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 44px 24px; border-radius: 1.26rem; border-style: dashed !important; }
.empty .i { width: 28px; height: 28px; color: var(--muted-foreground); margin-bottom: 12px; }
.empty p:first-of-type { font-weight: 500; }
.empty p + p { margin-top: 4px; font-size: .88rem; color: var(--muted-foreground); max-width: 440px; }
.empty .btn { margin-top: 16px; }
.empty.error p:first-of-type { color: var(--destructive); }
.loading { display: grid; place-items: center; padding: 120px 0; }
.loading .ai-orb { width: 48px; height: 48px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 42px; padding: 0 16px;
  border-radius: 0.75rem; border: 1px solid transparent; font-size: .9rem; font-weight: 500; white-space: nowrap;
  text-decoration: none; cursor: pointer; transition: background .15s, filter .15s, border-color .15s, transform .1s;
}
.btn:active { transform: translateY(1px); }
.btn .i { width: 16px; height: 16px; }
.btn.small { height: 36px; padding: 0 12px; font-size: .84rem; border-radius: 0.65rem; }
.btn.lg { height: 48px; padding: 0 20px; border-radius: 1rem; font-size: .95rem; }
.btn.primary { background: var(--primary); color: var(--primary-foreground); }
.btn.primary:hover { filter: brightness(1.08); }
.btn.outline { background: color-mix(in oklab, var(--background) 40%, transparent); border-color: var(--input); }
.btn.outline:hover { background: var(--muted); }
.btn.ghost { background: none; }
.btn.ghost:hover { background: var(--muted); }
.btn.ai { background: linear-gradient(135deg, var(--ai-1), var(--ai-2)); color: #fff; box-shadow: 0 8px 24px -10px var(--ai-2); }
.btn.ai:hover { filter: brightness(1.08); }
.btn.danger { background: color-mix(in oklab, var(--destructive) 14%, transparent); color: var(--destructive); }
.btn.danger:hover { background: color-mix(in oklab, var(--destructive) 22%, transparent); }
.btn.round { width: 44px; padding: 0; border-radius: 50%; }
.btn:disabled { opacity: .5; pointer-events: none; }
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center; min-width: 40px; height: 40px; padding: 0 8px; border-radius: 0.75rem;
  border: 0; background: none; cursor: pointer; text-decoration: none; font-weight: 600; font-size: .85rem; color: inherit;
}
.icon-btn:hover { background: var(--muted); }
.icon-btn.star.on .i { fill: var(--warning); stroke: var(--warning); }
.btn-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

/* ---------- start ---------- */
.hero { position: relative; overflow: hidden; border-radius: 1.6rem; padding: 22px; }
@media (min-width: 640px) { .hero { padding: 26px; } }
.hero-blob { position: absolute; top: -96px; right: -64px; width: 288px; height: 288px; border-radius: 50%; background: var(--ai-2); opacity: .2; filter: blur(64px); pointer-events: none; }
.hero-row { position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: 18px 20px; }
.hero-who { display: flex; align-items: center; gap: 16px; flex: 1 1 340px; min-width: 0; }
.hero h1 { font-size: 1.9rem; }
.hero-mark { width: 56px; height: 56px; border-radius: 16px; font-size: 1.15rem; }
.hero-status { margin-top: 6px; font-size: .9rem; color: color-mix(in oklab, var(--foreground) 80%, transparent); }
.composer-inline {
  position: relative; margin-top: 18px; display: flex; align-items: center; gap: 8px; padding: 6px 6px 6px 16px;
  border-radius: 1.1rem; border: 1px solid var(--input); background: color-mix(in oklab, var(--background) 45%, transparent);
  transition: border-color .15s, box-shadow .15s;
}
.composer-inline:focus-within { border-color: var(--ring); box-shadow: 0 0 0 3px color-mix(in oklab, var(--ring) 25%, transparent); }
.composer-inline > .i { color: var(--muted-foreground); }
.composer-inline input { flex: 1; min-width: 0; height: 44px; border: 0; outline: none; background: none; font-size: 1.02rem; }
.banner { display: flex; align-items: center; gap: 14px; padding: 12px 12px 12px 16px; border-radius: 1.1rem; font-size: .9rem; }
.banner > div { flex: 1; }
.banner .i { width: 16px; height: 16px; vertical-align: -3px; }

.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(138px, 1fr)); gap: 12px; }
.kpi { position: relative; overflow: hidden; display: block; padding: 16px; border-radius: 1.26rem; text-decoration: none; }
.kpi-glow { position: absolute; top: -40px; right: -40px; width: 128px; height: 128px; border-radius: 50%; filter: blur(32px); pointer-events: none; background: linear-gradient(135deg, color-mix(in oklab, var(--c) 30%, transparent), transparent); }
.kpi-top { position: relative; display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.kpi-label { font-size: .78rem; font-weight: 500; color: var(--muted-foreground); }
.kpi-ico { width: 32px; height: 32px; border-radius: 0.75rem; display: grid; place-items: center; color: var(--c); background: linear-gradient(135deg, color-mix(in oklab, var(--c) 25%, transparent), transparent); }
.kpi-ico .i { width: 16px; height: 16px; }
.kpi-value { position: relative; margin-top: 8px; font-size: 1.75rem; font-weight: 600; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.kpi-hint { position: relative; margin-top: 2px; font-size: .75rem; color: var(--muted-foreground); }
.c-blue { --c: #3b82f6; } .c-violet { --c: #8b5cf6; } .c-cyan { --c: #06b6d4; } .c-amber { --c: #f59e0b; } .c-rose { --c: #f43f5e; } .c-green { --c: #10b981; }

/* ---------- topic tiles ---------- */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.tile { --c: var(--primary); position: relative; overflow: hidden; display: flex; align-items: center; gap: 14px; padding: 14px; border-radius: 1.1rem; text-decoration: none; }
.tile::after { content: ""; position: absolute; top: -50px; right: -50px; width: 120px; height: 120px; border-radius: 50%; background: var(--c); opacity: .1; filter: blur(30px); pointer-events: none; }
.t-ico {
  --c: var(--primary);
  width: 44px; height: 44px; border-radius: 0.85rem; display: grid; place-items: center; flex: none; color: var(--c);
  background: linear-gradient(135deg, color-mix(in oklab, var(--c) 26%, transparent), color-mix(in oklab, var(--c) 6%, transparent));
  border: 1px solid color-mix(in oklab, var(--c) 22%, transparent);
}
.t-ico .i { width: 20px; height: 20px; }
.t-ico .emoji { font-size: 1.3rem; }
.t-ico.lg { width: 56px; height: 56px; border-radius: 1.05rem; }
.t-ico.lg .i { width: 26px; height: 26px; }
.tile-main { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.tile-title { font-weight: 600; font-size: .95rem; line-height: 1.3; }
.tile-meta { font-size: .78rem; color: var(--muted-foreground); }
.tile .chev { width: 16px; height: 16px; color: var(--muted-foreground); }

.topic-groups { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; }
.tgroup { --c: var(--primary); position: relative; overflow: hidden; border-radius: 1.26rem; padding: 8px 8px 14px; }
.tgroup::after { content: ""; position: absolute; top: -70px; right: -60px; width: 170px; height: 170px; border-radius: 50%; background: var(--c); opacity: .1; filter: blur(40px); pointer-events: none; }
.tgroup-head { position: relative; display: flex; align-items: center; gap: 12px; padding: 8px; border-radius: 0.9rem; text-decoration: none; }
.tgroup-head:hover { background: var(--muted); }
.tgroup-head .tile-main b { font-weight: 600; }
.tchips { position: relative; display: flex; flex-wrap: wrap; gap: 6px; padding: 6px 8px 0; }
.tchip {
  display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 12px; border-radius: 99px; flex: none;
  border: 1px solid var(--border); background: color-mix(in oklab, var(--background) 40%, transparent);
  font-size: .82rem; text-decoration: none; cursor: pointer; transition: border-color .15s, color .15s;
}
.tchip:hover { border-color: color-mix(in oklab, var(--primary) 45%, transparent); color: var(--primary); }
.tchip b { font-weight: 600; font-size: .72rem; color: var(--muted-foreground); font-variant-numeric: tabular-nums; }

/* ---------- lists ---------- */
.list { display: grid; gap: 2px; }
.panel > .list { margin: 0 -8px; }
.item { display: flex; align-items: center; gap: 14px; padding: 10px; border-radius: 0.9rem; text-decoration: none; transition: background .15s; min-height: 60px; }
.item:hover { background: color-mix(in oklab, var(--muted) 70%, transparent); }
.item-ico {
  --k: var(--muted-foreground);
  width: 40px; height: 40px; border-radius: 0.75rem; display: grid; place-items: center; flex: none; color: var(--k);
  background: color-mix(in oklab, var(--k) 13%, transparent); border: 1px solid color-mix(in oklab, var(--k) 20%, transparent);
}
.item-ico .i { width: 18px; height: 18px; }
.k-wissen { --k: var(--k-wissen); } .k-faq { --k: var(--k-faq); } .k-einwand { --k: var(--k-einwand); } .k-ablauf { --k: var(--k-ablauf); } .k-pdf { --k: var(--k-pdf); }
.item-thumb { width: 48px; height: 48px; object-fit: cover; border-radius: 0.75rem; flex: none; background: var(--muted); }
.item-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.item-title { font-weight: 500; font-size: .93rem; line-height: 1.35; }
.item-title .pin { width: 14px; height: 14px; fill: var(--warning); stroke: var(--warning); margin-right: 6px; vertical-align: -2px; }
.item-sub { font-size: .84rem; color: var(--muted-foreground); line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.item-path { font-size: .74rem; color: var(--muted-foreground); opacity: .85; }
.chev { width: 16px; height: 16px; color: var(--muted-foreground); opacity: .7; }
.list > div > .item { margin: 0; }
mark { background: color-mix(in oklab, var(--ai-2) 30%, transparent); color: inherit; border-radius: 3px; padding: 0 1px; }

.badge {
  --k: var(--muted-foreground);
  display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 9px; border-radius: 99px; font-size: .74rem; font-weight: 500;
  border: 1px solid color-mix(in oklab, var(--k) 30%, transparent); background: color-mix(in oklab, var(--k) 10%, transparent); color: var(--k);
}
.badge .i { width: 12px; height: 12px; }

.seg { display: inline-flex; flex-wrap: wrap; gap: 2px; padding: 3px; border-radius: 0.9rem; margin-bottom: 14px; }
.seg > * { height: 34px; padding: 0 14px; border: 0; background: none; border-radius: 0.7rem; font-size: .85rem; font-weight: 500; color: var(--muted-foreground); text-decoration: none; display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.seg > .on { background: var(--card); color: var(--foreground); box-shadow: 0 1px 3px rgba(0, 0, 0, .15); }
.dark .seg > .on { background: var(--secondary); }
.filter { display: flex; align-items: center; gap: 8px; height: 44px; padding: 0 14px; border-radius: 0.9rem; margin-bottom: 14px; color: var(--muted-foreground); }
.filter input { flex: 1; border: 0; outline: none; background: none; color: var(--foreground); }
.qchips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }

/* ---------- entry ---------- */
.entry { border-radius: 1.4rem; padding: 22px; }
@media (min-width: 640px) { .entry { padding: 28px 30px; } }
.entry-head { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 10px 16px; margin-bottom: 18px; }
.entry-head .titles { flex: 1 1 300px; min-width: 0; }
.entry-head .badge { margin-bottom: 10px; }
.answer { position: relative; border-radius: 1.1rem; padding: 14px 18px 16px; margin-bottom: 22px; }
.answer-label { display: flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; margin-bottom: 6px; }
.answer-label .i { width: 14px; height: 14px; color: var(--ai-2); }
.answer .md { font-size: 1.08rem; font-weight: 500; line-height: 1.5; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { height: 28px; display: inline-flex; align-items: center; padding: 0 11px; border-radius: 99px; font-size: .78rem; text-decoration: none; color: var(--muted-foreground); border: 1px solid var(--border); }
.tag:hover { color: var(--primary); border-color: color-mix(in oklab, var(--primary) 40%, transparent); }
.stamp { margin-top: 18px; font-size: .75rem; color: var(--muted-foreground); }
.facts { display: grid; gap: 10px; font-size: .85rem; }
.facts div { display: flex; justify-content: space-between; gap: 10px; }
.facts dt { color: var(--muted-foreground); }
.facts dd { margin: 0; font-weight: 500; text-align: right; }

/* markdown */
.md { overflow-wrap: anywhere; line-height: 1.65; }
.md > :first-child { margin-top: 0; }
.md > :last-child { margin-bottom: 0; }
.md p, .md ul, .md ol, .md table, .md blockquote, .md pre { margin: .7em 0; }
.md h1, .md h2, .md h3 { margin: 1.4em 0 .45em; line-height: 1.3; font-weight: 600; letter-spacing: -0.01em; }
.md h1 { font-size: 1.35rem; } .md h2 { font-size: 1.15rem; } .md h3 { font-size: 1rem; }
.md ul, .md ol { padding-left: 1.3em; }
.md li { margin: .3em 0; }
.md li::marker { color: var(--primary); }
.md li:has(> .md-check) { list-style: none; margin-left: -1.3em; }
.md-check { width: 20px; height: 20px; vertical-align: -4px; margin: 0 10px 0 0; accent-color: var(--primary); }
.md table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: .9rem; border: 1px solid var(--border); border-radius: 0.8rem; overflow: hidden; }
.md th, .md td { padding: 9px 12px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--border); font-variant-numeric: tabular-nums; }
.md tr:last-child td { border-bottom: 0; }
.md th { background: var(--muted); font-weight: 600; font-size: .82rem; }
.md blockquote { padding: 12px 16px; border-radius: 0.9rem; border: 1px solid color-mix(in oklab, var(--ai-2) 30%, transparent); background: color-mix(in oklab, var(--ai-2) 8%, transparent); }
.md code { font-family: "Geist Mono", ui-monospace, monospace; font-size: .86em; background: var(--muted); padding: .1rem .35rem; border-radius: .3rem; }
.md pre { background: var(--muted); padding: 12px; border-radius: 0.7rem; overflow-x: auto; white-space: pre-wrap; }
.md img { max-width: 100%; border-radius: 0.8rem; }
.md a { color: var(--primary); }
.md hr { border: 0; border-top: 1px solid var(--border); margin: 1.6em 0; }
.md strong { font-weight: 600; }

/* ---------- gallery ---------- */
.albums { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.album { display: flex; flex-direction: column; overflow: hidden; border-radius: 1.26rem; text-decoration: none; }
.album-cover { aspect-ratio: 4 / 3; background: var(--muted); display: grid; place-items: center; color: var(--muted-foreground); overflow: hidden; }
.album-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.album:hover .album-cover img { transform: scale(1.04); }
.album-cover .i { width: 34px; height: 34px; opacity: .5; }
.album-title { font-weight: 600; font-size: .93rem; padding: 12px 14px 0; }
.album-meta { font-size: .78rem; color: var(--muted-foreground); padding: 0 14px 12px; }
.grid-img { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; }
.ph { position: relative; margin: 0; }
.ph-open { display: block; width: 100%; aspect-ratio: 1; padding: 0; border: 1px solid var(--glass-border); border-radius: 0.9rem; overflow: hidden; background: var(--muted); cursor: zoom-in; }
.ph-open img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .35s ease; }
.ph-open:hover img { transform: scale(1.05); }
.ph figcaption { font-size: .78rem; color: var(--muted-foreground); padding: 5px 2px 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ph-edit { position: absolute; top: 6px; right: 6px; width: 36px; height: 36px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .15); background: rgba(6, 7, 12, .6); backdrop-filter: blur(8px); color: #fff; display: grid; place-items: center; cursor: pointer; }
.ph-edit .i { width: 15px; height: 15px; }
.side .grid-img { grid-template-columns: repeat(auto-fill, minmax(90px, 1fr)); }

.lightbox { position: fixed; inset: 0; z-index: 70; background: #000; color: #fff; }
.lb-stage { position: absolute; inset: 0; }
.lb-scroller { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.lb-scroller img { max-width: 100%; max-height: 100%; object-fit: contain; user-select: none; -webkit-user-drag: none; }
.lb-scroller.zoom { overflow: auto; display: block; }
.lb-scroller.zoom img { max-width: none; max-height: none; width: 220%; }
.lb-top { position: absolute; top: 0; left: 0; right: 0; display: flex; justify-content: space-between; align-items: center; padding: calc(var(--sat) + 10px) 14px 10px 22px; background: linear-gradient(rgba(0, 0, 0, .55), transparent); font-size: .85rem; font-variant-numeric: tabular-nums; }
.lb-btn { border: 1px solid rgba(255, 255, 255, .12); background: rgba(255, 255, 255, .1); backdrop-filter: blur(10px); color: #fff; width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; cursor: pointer; }
.lb-prev, .lb-next { position: absolute; top: 50%; transform: translateY(-50%); }
.lb-prev { left: 16px; } .lb-next { right: 16px; }
.lb-caption { position: absolute; left: 0; right: 0; bottom: 0; padding: 36px 26px calc(var(--sab) + 20px); background: linear-gradient(transparent, rgba(0, 0, 0, .75)); display: flex; flex-direction: column; gap: 2px; }
.lb-caption span { color: rgba(255, 255, 255, .8); font-size: .9rem; }
.lightbox.bare .lb-top, .lightbox.bare .lb-caption, .lightbox.bare .lb-prev, .lightbox.bare .lb-next { opacity: 0; pointer-events: none; }
.lb-top, .lb-caption, .lb-prev, .lb-next { transition: opacity .2s; }

/* ---------- spickzettel ---------- */
.toc { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; margin-bottom: 16px; scrollbar-width: none; }
.toc::-webkit-scrollbar { display: none; }
.sheet-content { --scale: 1; font-size: calc(16px * var(--scale)); columns: 2 400px; column-gap: 16px; }
.sheet-sec { break-inside: avoid; margin: 0 0 16px; border-radius: 1.26rem; padding: 18px 20px; scroll-margin-top: calc(var(--top-h) + var(--sat) + 16px); }
.sheet-sec h2 { position: relative; font-size: 1.02em; margin-bottom: 10px; padding-left: 12px; }
.sheet-sec h2::before { content: ""; position: absolute; left: 0; top: 2px; bottom: 2px; width: 3px; border-radius: 3px; background: linear-gradient(135deg, var(--ai-1), var(--ai-2) 55%, var(--ai-3)); }
.flash { animation: flash 1.4s ease; }
@keyframes flash { 0%, 40% { box-shadow: 0 0 0 2px var(--ai-2), 0 0 40px -10px var(--ai-2); } }

/* ---------- settings ---------- */
.setting { display: flex; align-items: center; gap: 16px; }
.setting > div { flex: 1; }
.setting p { margin-top: 4px; font-size: .86rem; color: var(--muted-foreground); }
.switch { position: relative; width: 52px; height: 30px; flex: none; }
.switch input { position: absolute; inset: 0; opacity: 0; margin: 0; z-index: 1; cursor: pointer; }
.switch span { position: absolute; inset: 0; border-radius: 99px; background: var(--input); transition: background .2s; }
.switch span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .3); transition: transform .2s; }
.switch input:checked + span { background: linear-gradient(135deg, var(--ai-1), var(--ai-2)); }
.switch input:checked + span::after { transform: translateX(22px); }

/* ---------- dialogs ---------- */
.sheet-wrap { position: fixed; inset: 0; z-index: 60; display: flex; align-items: flex-end; justify-content: center; background: rgba(0, 0, 0, 0); transition: background .2s, backdrop-filter .2s; }
.sheet-wrap.open { background: rgba(0, 0, 0, .5); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
.sheet {
  width: 100%; max-width: 620px; max-height: calc(100dvh - var(--sat) - 24px); display: flex; flex-direction: column; overflow: hidden;
  background: var(--popover); border: 1px solid var(--glass-border); border-radius: 1.4rem 1.4rem 0 0;
  box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .6); transform: translateY(100%); transition: transform .22s ease;
}
.sheet.wide { max-width: 860px; }
.sheet.full { max-width: 1040px; height: calc(100dvh - var(--sat) - 24px); }
.sheet-wrap.open .sheet { transform: none; }
@media (min-width: 700px) {
  .sheet-wrap { align-items: center; padding: 20px; }
  .sheet { border-radius: 1.4rem; transform: translateY(16px) scale(.98); opacity: 0; transition: transform .2s, opacity .2s; }
  .sheet-wrap.open .sheet { transform: none; opacity: 1; }
}
.sheet-form { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.sheet-head { display: flex; align-items: center; gap: 10px; padding: 16px 14px 14px 22px; border-bottom: 1px solid var(--border); }
.sheet-head h2 { flex: 1; font-size: 1.05rem; }
.sheet-body { flex: 1; overflow-y: auto; padding: 18px 22px; display: flex; flex-direction: column; gap: 16px; -webkit-overflow-scrolling: touch; }
.sheet-foot { display: flex; align-items: center; gap: 8px; padding: 12px 16px calc(12px + var(--sab)); border-top: 1px solid var(--border); background: color-mix(in oklab, var(--muted) 40%, transparent); }
.field { display: flex; flex-direction: column; gap: 6px; }
.field > span { font-size: .84rem; font-weight: 500; }
.field em { font-style: normal; font-weight: 400; color: var(--muted-foreground); margin-left: 6px; }
.field.grow, .sheet.full .field.grow { flex: 1; }
.field.small input { max-width: 160px; }
.field-row { display: flex; flex-wrap: wrap; gap: 12px; }
.field-row > * { flex: 1; min-width: 180px; }
:where(input:not([type=checkbox]):not([type=radio]), select, textarea) {
  width: 100%; padding: 10px 12px; border-radius: 0.75rem; border: 1px solid var(--input); outline: none; font-size: .95rem;
  background: color-mix(in oklab, var(--background) 50%, transparent); transition: border-color .15s, box-shadow .15s;
}
:where(input, select, textarea):focus { border-color: var(--ring); box-shadow: 0 0 0 3px color-mix(in oklab, var(--ring) 28%, transparent); }
textarea { resize: vertical; line-height: 1.5; }
textarea.mono { font-family: "Geist Mono", ui-monospace, monospace; font-size: .86rem; }
textarea.tall { flex: 1; min-height: 50vh; }
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted-foreground) 50%), linear-gradient(135deg, var(--muted-foreground) 50%, transparent 50%); background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 34px; }
.check { display: flex; align-items: center; gap: 10px; font-size: .9rem; }
.check input { width: 20px; height: 20px; accent-color: var(--primary); }
.md-toolbar { display: flex; flex-wrap: wrap; gap: 4px; }
.md-toolbar button { height: 32px; padding: 0 10px; border-radius: 0.6rem; border: 1px solid var(--input); background: none; font-size: .8rem; cursor: pointer; }
.md-toolbar button:hover { background: var(--muted); }
.md-toolbar button.on { background: var(--primary); border-color: var(--primary); color: var(--primary-foreground); }
.md-preview { min-height: 200px; padding: 14px; border-radius: 0.75rem; border: 1px dashed var(--input); }
.picker { display: flex; flex-wrap: wrap; gap: 6px; }
.picker button { width: 44px; height: 44px; border-radius: 0.8rem; border: 1px solid var(--input); background: none; display: grid; place-items: center; cursor: pointer; color: var(--foreground); }
.picker button .i { width: 19px; height: 19px; }
.picker button.on { border-color: var(--primary); background: var(--accent); color: var(--primary); box-shadow: 0 0 0 2px color-mix(in oklab, var(--primary) 35%, transparent); }
.picker.colors button { border-radius: 50%; border: 0; }
.picker.colors button.on { box-shadow: 0 0 0 3px var(--popover), 0 0 0 5px var(--primary); }
.media-preview { max-width: 100%; max-height: 260px; border-radius: 0.9rem; align-self: flex-start; }
.progress { height: 8px; border-radius: 99px; background: var(--muted); overflow: hidden; }
.progress span { display: block; height: 100%; width: 0; border-radius: 99px; background: linear-gradient(90deg, var(--ai-1), var(--ai-2), var(--ai-3)); transition: width .3s; }
.up-list { list-style: none; margin: 0; padding: 0; max-height: 200px; overflow: auto; font-size: .85rem; color: var(--muted-foreground); }
.up-list .ok::before { content: "✓ "; color: var(--good-ink); }
.up-list .fail { color: var(--destructive); }

/* ---------- misc ---------- */
.fab {
  position: fixed; right: 20px; bottom: calc(var(--bn-h) + var(--sab) + 18px); z-index: 25;
  width: 58px; height: 58px; border-radius: 50%; border: 0; cursor: pointer; color: #fff; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--ai-1), var(--ai-2)); box-shadow: 0 14px 34px -10px var(--ai-2);
}
.fab .i { width: 26px; height: 26px; stroke-width: 2.4; }
@media (min-width: 1024px) { .fab { bottom: 28px; right: 28px; } }
.toast {
  position: fixed; top: calc(var(--sat) + 14px); left: 50%; z-index: 90; transform: translate(-50%, -16px); opacity: 0; max-width: 90vw;
  display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-radius: 0.9rem; font-size: .9rem; font-weight: 500;
  background: var(--popover); border: 1px solid var(--glass-border); box-shadow: 0 20px 50px -20px rgba(0, 0, 0, .5); transition: all .25s;
}
.toast::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--good); box-shadow: 0 0 10px var(--good); }
.toast.error::before { background: var(--destructive); box-shadow: 0 0 10px var(--destructive); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.spinner { display: inline-block; width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--input); border-top-color: var(--primary); animation: spin .8s linear infinite; vertical-align: -3px; margin-right: 6px; }
@keyframes spin { to { transform: rotate(360deg); } }
.ask-card { position: relative; width: 100%; display: flex; align-items: center; gap: 14px; padding: 14px 16px; margin-bottom: 18px; border-radius: 1.1rem; cursor: pointer; text-align: left; font-size: .95rem; }
.ask-card span:nth-child(2) { flex: 1; }
.ask-card .ai-orb { width: 30px; height: 30px; }

/* ---------- beste Antwort (Suche) ---------- */
.best { position: relative; border-radius: 1.4rem; padding: 18px 22px 20px; box-shadow: 0 18px 50px -24px color-mix(in oklab, var(--ai-2) 60%, transparent); }
.best-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.best-head .eyebrow { display: inline-flex; align-items: center; gap: 6px; color: var(--good-ink); }
.best-head .eyebrow .i { width: 14px; height: 14px; }
.best h2 { font-size: 1.25rem; letter-spacing: -0.01em; }
.best h2 a { text-decoration: none; }
.best .item-path { margin-top: 2px; }
.best-sum { margin-top: 12px; font-size: 1.05rem; font-weight: 500; line-height: 1.5; }
.best-lines { margin: 12px 0 16px; padding: 12px 16px 12px 32px; border-radius: 0.9rem; background: color-mix(in oklab, var(--muted) 70%, transparent); display: grid; gap: 6px; font-size: .95rem; }
.best-lines li::marker { color: var(--primary); }
.best .btn .i { width: 14px; height: 14px; }
/* Wissens-KI-Antwort in der Suche */
.brain .best-head .eyebrow .i { color: var(--ai-2); }
.conf { font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 999px; }
.conf-good { color: var(--good-ink); background: color-mix(in oklab, var(--good) 14%, transparent); }
.conf-warn { color: color-mix(in oklab, var(--warning) 55%, var(--foreground)); background: color-mix(in oklab, var(--warning) 18%, transparent); }
.conf-bad { color: var(--destructive); background: color-mix(in oklab, var(--destructive) 12%, transparent); }
.brain-head { font-size: 1.2rem; font-weight: 600; line-height: 1.45; letter-spacing: -0.01em; }
.brain-head.v-ja { color: var(--good-ink); }
.brain-head.v-nein { color: var(--destructive); }
.brain-head.v-bedingt { color: color-mix(in oklab, var(--warning) 55%, var(--foreground)); }
.brain-matched { font-size: .78rem; color: var(--muted-foreground); margin-bottom: 4px; }
.brain-text { margin-top: 6px; font-size: 1.08rem; line-height: 1.6; }
.brain-head + .brain-text { margin-top: 4px; }
.brain-more { margin-top: 14px; padding: 12px 16px 12px 16px; border-radius: 0.9rem; background: color-mix(in oklab, var(--muted) 70%, transparent); }
.brain-more-label { display: block; font-size: 11px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--muted-foreground); margin-bottom: 6px; }
.brain-more ul { margin: 0; padding-left: 18px; display: grid; gap: 7px; font-size: .97rem; line-height: 1.55; }
.brain-more li::marker { color: var(--primary); }
.brain-src { display: inline-block; font-size: 12.5px; color: var(--primary); }
.brain-foot { margin-top: 16px; display: flex; align-items: center; flex-wrap: wrap; gap: 8px 14px; }
.brain-foot .btn .i:first-child { width: 14px; height: 14px; margin-right: 2px; }

/* ---------- anmeldung ---------- */
body.auth-mode { padding: 0; }
body.auth-mode .sidebar, body.auth-mode .topbar, body.auth-mode .bottomnav, body.auth-mode .scrim, body.auth-mode .fab { display: none !important; }
body.auth-mode main { max-width: none; padding: 0; }
.auth-wrap { min-height: 100dvh; display: grid; place-items: center; padding: calc(var(--sat) + 24px) 16px calc(var(--sab) + 24px); }
.auth-card { width: 100%; max-width: 440px; border-radius: 1.6rem; padding: 28px; display: grid; gap: 22px; }
.auth-card.wide { max-width: 720px; }
.auth-card .brand { padding: 0; }
.auth-card h1 { margin-top: 4px; }
.auth-card .desc { margin-top: 6px; font-size: .9rem; color: var(--muted-foreground); }
.auth-form { display: grid; gap: 16px; }
.auth-form .btn.lg { width: 100%; }
.totp-setup { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.totp-setup > div { flex: 1 1 220px; }
.setup-step { display: flex; gap: 14px; align-items: flex-start; }
.setup-step > div { flex: 1; min-width: 0; display: grid; gap: 10px; }
.setup-step h2 { font-size: 1rem; }
.step-no { width: 30px; height: 30px; flex: none; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: .85rem; color: #fff; background: linear-gradient(135deg, var(--ai-1), var(--ai-2)); }
.qr-row { display: flex; flex-wrap: wrap; gap: 18px; align-items: center; }
.qr { width: 190px; height: 190px; padding: 10px; border-radius: 1rem; background: #fff; flex: none; }
.qr svg { width: 100%; height: 100%; display: block; }
.qr-alt { display: grid; gap: 8px; min-width: 0; flex: 1; }
.secret { font-family: "Geist Mono", ui-monospace, monospace; font-size: .9rem; padding: 10px 12px; border-radius: .7rem; background: var(--muted); word-break: break-all; user-select: all; }

/* ---------- quiz-check ---------- */
.quiz-opts { display: grid; gap: 10px; }
.quiz-opt { display: flex; gap: 14px; align-items: flex-start; padding: 12px; border-radius: 1rem; border: 1px solid var(--border); background: color-mix(in oklab, var(--background) 35%, transparent); }
.quiz-opt.yes { border-color: color-mix(in oklab, #10b981 45%, transparent); background: color-mix(in oklab, #10b981 8%, transparent); }
.quiz-opt.yes .quiz-letter { background: #10b981; color: #fff; }
.quiz-letter { width: 32px; height: 32px; flex: none; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: .85rem; background: var(--muted); }
.quiz-body { flex: 1; min-width: 0; display: grid; gap: 4px; }
.quiz-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px; }
.quiz-top b { font-weight: 600; }
.quiz-line { font-size: .9rem; color: color-mix(in oklab, var(--foreground) 80%, transparent); font-style: italic; }
.quiz-body a.item-path { text-decoration: none; }
.quiz-body a.item-path:hover { color: var(--primary); }
.suggest button { white-space: pre-line; }

/* ---------- leads ---------- */
.badge.chip { --k: var(--c, var(--muted-foreground)); vertical-align: 2px; }
.lead-item .badge { flex: none; }
.lead-item .item-title .badge { height: 20px; padding: 0 7px; font-size: .68rem; margin-left: 6px; }
.avatar {
  --c: var(--primary);
  width: 42px; height: 42px; flex: none; border-radius: 50%; display: grid; place-items: center;
  font-size: .82rem; font-weight: 600; letter-spacing: .02em; color: var(--c);
  background: linear-gradient(135deg, color-mix(in oklab, var(--c) 28%, transparent), color-mix(in oklab, var(--c) 8%, transparent));
  border: 1px solid color-mix(in oklab, var(--c) 30%, transparent);
}
.avatar.lg { width: 60px; height: 60px; font-size: 1.15rem; box-shadow: 0 10px 30px -12px var(--c); }
.pipe { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.pipe-step {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 4px; border-radius: 0.9rem;
  border: 1px solid var(--border); background: color-mix(in oklab, var(--background) 40%, transparent); cursor: pointer;
  font-size: .78rem; color: var(--muted-foreground); transition: border-color .15s, background .15s;
}
.pipe-step:hover { border-color: color-mix(in oklab, var(--primary) 45%, transparent); }
.pipe-dot { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-weight: 600; font-size: .8rem; background: var(--muted); color: var(--muted-foreground); }
.pipe-dot .i { width: 14px; height: 14px; }
.pipe-step.done { color: var(--foreground); }
.pipe-step.done .pipe-dot { background: color-mix(in oklab, var(--primary) 18%, transparent); color: var(--primary); }
.pipe-step.on { color: var(--foreground); font-weight: 600; border-color: transparent; background: linear-gradient(var(--card), var(--card)) padding-box, linear-gradient(135deg, var(--ai-1), var(--ai-2), var(--ai-3)) border-box; }
.pipe-step.on .pipe-dot { background: linear-gradient(135deg, var(--ai-1), var(--ai-2)); color: #fff; box-shadow: 0 6px 18px -6px var(--ai-2); }
.appt { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--border); }
.appt .field { flex: 1 1 220px; }
.note-form { display: grid; gap: 8px; margin-bottom: 18px; }
.timeline { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.timeline li { position: relative; display: flex; align-items: flex-start; gap: 12px; padding: 8px 0 8px; }
.timeline li::before { content: ""; position: absolute; left: 15px; top: 40px; bottom: -6px; width: 1px; background: var(--border); }
.timeline li:last-child::before { display: none; }
.timeline li > div { flex: 1; min-width: 0; }
.timeline p { font-size: .9rem; white-space: pre-wrap; }
.timeline small { font-size: .74rem; color: var(--muted-foreground); }
.tl-ico { width: 32px; height: 32px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--muted); color: var(--muted-foreground); }
.tl-ico .i { width: 15px; height: 15px; }
.ev-eingang .tl-ico { color: var(--k-faq); background: color-mix(in oklab, var(--k-faq) 15%, transparent); }
.ev-status .tl-ico { color: var(--primary); background: color-mix(in oklab, var(--primary) 15%, transparent); }
.ev-termin .tl-ico { color: var(--k-ablauf); background: color-mix(in oklab, var(--k-ablauf) 15%, transparent); }
.ev-anruf .tl-ico { color: var(--k-pdf); background: color-mix(in oklab, var(--k-pdf) 15%, transparent); }
.timeline .icon-btn { opacity: .5; }
.timeline .icon-btn:hover { opacity: 1; }
.ai-prep .md { font-size: .93rem; }
.ai-prep .md h3 { font-size: .95rem; margin-top: 1.2em; }
.ai-prep .err { color: var(--destructive); font-size: .88rem; }
a.cite { text-decoration: none; }
@media (max-width: 640px) { .pipe { grid-template-columns: repeat(3, 1fr); } .lead-item > .badge { display: none; } }

/* ---------- chat ---------- */
.chat { display: flex; flex-direction: column; border-radius: 1.26rem; height: calc(100dvh - var(--top-h) - var(--sat) - var(--bn-h) - var(--sab) - 64px); min-height: 420px; overflow: hidden; }
@media (min-width: 1024px) { .chat { height: calc(100dvh - var(--top-h) - var(--sat) - 64px); } }
.chat-head { display: flex; align-items: center; gap: 10px; padding: 10px 12px 10px 18px; border-bottom: 1px solid var(--border); }
.chat-head p { flex: 1; font-size: .9rem; font-weight: 500; }
.chat-log { flex: 1; min-height: 0; overflow-y: auto; padding: 22px 18px; }
.chat-inner { max-width: 760px; margin: 0 auto; display: grid; gap: 22px; }
.chat-empty { max-width: 600px; margin: 0 auto; padding-top: 24px; display: flex; flex-direction: column; align-items: center; text-align: center; }
.chat-empty h2 { margin-top: 20px; font-size: 1.5rem; letter-spacing: -0.02em; }
.chat-empty p { margin-top: 8px; font-size: .9rem; color: var(--muted-foreground); }
.suggest { margin-top: 22px; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.suggest button { padding: 8px 14px; border-radius: 99px; font-size: .85rem; cursor: pointer; color: var(--foreground); text-align: left; }
.msg-user { display: flex; justify-content: flex-end; }
.msg-user .bubble { max-width: 85%; padding: 10px 16px; border-radius: 1.1rem 1.1rem 0.4rem 1.1rem; color: #fff; white-space: pre-wrap; font-size: .93rem; box-shadow: 0 10px 30px -12px var(--ai-2); }
.msg-bot { display: flex; gap: 12px; }
.msg-bot > .ai-orb { width: 28px; height: 28px; margin-top: 2px; }
.msg-bot .content { flex: 1; min-width: 0; font-size: .95rem; }
.msg-bot .err { margin-top: 8px; color: var(--destructive); font-size: .88rem; }
.thinking-text { font-size: .8rem; color: var(--muted-foreground); }
.cite { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 5px; margin: 0 1px; border-radius: 6px; border: 0; cursor: pointer; vertical-align: 1px; font-size: .7rem; font-weight: 600; color: #fff; background: linear-gradient(135deg, var(--ai-1), var(--ai-2)); }
.srcs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 12px; }
.srcs-label { font-size: 11px; color: var(--muted-foreground); }
.src { display: inline-flex; align-items: center; gap: 8px; max-width: 280px; height: 34px; padding: 0 10px 0 4px; border-radius: 99px; border: 1px solid var(--border); background: color-mix(in oklab, var(--background) 40%, transparent); font-size: .78rem; cursor: pointer; color: var(--foreground); }
.src:hover { border-color: color-mix(in oklab, var(--primary) 45%, transparent); }
.src img, .src .src-ico { width: 26px; height: 26px; border-radius: 50%; object-fit: cover; flex: none; display: grid; place-items: center; background: var(--muted); color: var(--primary); }
.src .src-ico .i { width: 13px; height: 13px; }
.src b { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.src small { color: var(--muted-foreground); white-space: nowrap; }
.composer-wrap { border-top: 1px solid var(--border); padding: 12px; }
.composer { max-width: 760px; margin: 0 auto; display: flex; align-items: flex-end; gap: 8px; padding: 6px 6px 6px 16px; border-radius: 1.1rem; }
.composer:focus-within { border-color: color-mix(in oklab, var(--ai-2) 50%, transparent); }
.composer textarea { flex: 1; border: 0; background: none; resize: none; padding: 10px 0; max-height: 180px; font-size: 1rem; box-shadow: none; }
.composer textarea:focus { box-shadow: none; }
.composer .btn.icon-only { width: 44px; height: 44px; padding: 0; justify-content: center; flex: none; border-radius: 0.9rem; }
.composer .btn.icon-only:disabled { opacity: .5; }
.chat-empty > .ai-orb { width: 56px; height: 56px; }
.kc-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; margin-bottom: 8px; }
.kc-answer .brain-head { font-size: 1.05rem; }
.kc-answer .brain-text { font-size: 1rem; margin-top: 2px; }
.kc-answer .brain-more { margin-top: 10px; }
.composer-note { max-width: 760px; margin: 6px auto 0; text-align: center; font-size: 11px; color: var(--muted-foreground); }

/* ---------- Rechner ---------- */
.calc-group { margin-bottom: 22px; }
.calc-group-title { font-size: .78rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--muted-foreground); margin-bottom: 10px; }
.calc-tiles { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); }
.calc-tile { display: flex; align-items: center; gap: 12px; padding: 14px 14px 14px 16px; border-radius: 1.1rem; text-decoration: none; color: var(--foreground); min-height: 72px; }
.calc-tile-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.calc-tile-main b { font-size: .95rem; font-weight: 600; line-height: 1.3; }
.calc-tile-main small { font-size: .8rem; color: var(--muted-foreground); line-height: 1.35; }
.calc-tile .chev { width: 16px; height: 16px; color: var(--muted-foreground); flex: none; }
.calc-single { max-width: 760px; }
.calc-single .calc-head h2 { display: none; }
.calc-more { margin-top: 26px; max-width: 760px; }
.calc-more .eyebrow { margin-bottom: 10px; }
.page-head .eyebrow a { color: inherit; text-decoration: none; }
.calc-tabs { margin-bottom: 20px; }
.calc-fields select { width: 100%; font-size: 1rem; }
.calc-fields .field:has(select) { grid-column: span 2; }
@media (max-width: 520px) { .calc-fields .field:has(select) { grid-column: auto; } }
.calc-tabs .i { width: 15px; height: 15px; }
.calc-links { display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); }
.calc-tile.small { min-height: 0; padding: 10px 12px; }
.calc-tile.small .calc-ico { width: 30px; height: 30px; border-radius: 9px; }
.calc-tile.small .calc-ico .i { width: 15px; height: 15px; }
.calc-tile.small b { font-size: .85rem; }
.calc-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 420px), 1fr)); align-items: start; }
.calc { border-radius: 1.26rem; padding: 18px 20px; display: flex; flex-direction: column; gap: 12px; scroll-margin-top: calc(var(--top-h) + var(--sat) + 16px); }
.calc.focus { border-color: color-mix(in oklab, var(--ai-2) 55%, transparent); box-shadow: 0 18px 50px -24px color-mix(in oklab, var(--ai-2) 60%, transparent); }
.calc-head { display: flex; gap: 12px; align-items: flex-start; }
.calc-head h2 { font-size: 1.08rem; letter-spacing: -0.01em; }
.calc-head p { margin-top: 3px; font-size: .86rem; color: var(--muted-foreground); line-height: 1.45; }
.calc-ico { flex: none; width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; color: var(--primary); background: var(--accent); }
.calc-ico .i { width: 19px; height: 19px; }
.calc-formula { font-size: .86rem; font-weight: 500; padding: 8px 12px; border-radius: 0.7rem; background: color-mix(in oklab, var(--muted) 70%, transparent); }
.calc-fields { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
.calc-input { position: relative; display: flex; align-items: center; }
.calc-input input { width: 100%; padding-right: 64px; font-size: 1rem; }
.calc-input input[type=date] { padding-right: 10px; min-width: 150px; }
.calc-input i { position: absolute; right: 12px; font-style: normal; font-size: .8rem; color: var(--muted-foreground); pointer-events: none; }
.calc-check { display: flex; align-items: center; gap: 8px; font-size: .88rem; align-self: end; min-height: 42px; }
.calc-check input { width: 20px; height: 20px; }
.calc-result { padding: 12px 14px; border-radius: 0.9rem; border: 1px solid var(--border); background: color-mix(in oklab, var(--background) 40%, transparent); }
.calc-main { font-size: 1.25rem; font-weight: 650; letter-spacing: -0.01em; }
.calc-lines { margin: 8px 0 0; padding-left: 18px; display: grid; gap: 4px; font-size: .9rem; }
.calc-lines li::marker { color: var(--primary); }
.calc-note { color: var(--muted-foreground); }
.calc-warn { color: color-mix(in oklab, var(--warning) 55%, var(--foreground)); font-weight: 500; }
.calc-next, .calc-offer { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.calc-offer .btn .i, .calc-next .btn .i { width: 14px; height: 14px; }
.calc-label { font-size: .7rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--muted-foreground); margin-bottom: 2px; }
.calc-lines + .calc-hints, .calc-main + .calc-label { margin-top: 10px; }
.calc-lines { font-variant-numeric: tabular-nums; }
.calc-hints { margin: 10px 0 0; padding: 10px 0 0 18px; border-top: 1px dashed var(--border); display: grid; gap: 4px; font-size: .86rem; }
/* Rechenweg für den Taschenrechner */
.calc-steps { padding: 12px 14px; border-radius: 0.9rem; background: color-mix(in oklab, var(--muted) 60%, transparent); }
.calc-steps-title { display: flex; align-items: center; gap: 8px; font-size: .86rem; font-weight: 600; margin-bottom: 8px; }
.calc-steps-title .i { width: 16px; height: 16px; color: var(--primary); }
.calc-steps ol, .formel ol { margin: 0; padding-left: 22px; display: grid; gap: 8px; }
.calc-steps li::marker, .formel li::marker { color: var(--primary); font-weight: 600; }
.calc-f { display: block; font-size: .92rem; font-weight: 500; line-height: 1.4; }
.calc-ex { display: block; margin-top: 2px; font-size: .82rem; color: var(--muted-foreground); font-variant-numeric: tabular-nums; }
/* Übersicht: Suche + Sprungleiste */
.calc-toolbar { display: grid; gap: 10px; margin-bottom: 18px; }
.calc-filter { display: flex; align-items: center; gap: 10px; padding: 0 14px; border-radius: 0.9rem; min-height: 46px; }
.calc-filter .i { width: 18px; height: 18px; color: var(--muted-foreground); flex: none; }
.calc-filter input { flex: 1; min-width: 0; border: 0; background: none; outline: none; font-size: 1rem; color: var(--foreground); padding: 10px 0; }
.calc-jump { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
.calc-jump::-webkit-scrollbar { display: none; }
.calc-jump .chip { flex: none; height: 32px; padding: 0 12px; border-radius: 99px; font: inherit; font-size: .8rem; color: var(--muted-foreground); background: none; border: 1px solid var(--border); cursor: pointer; white-space: nowrap; }
.calc-jump .chip:hover { color: var(--foreground); border-color: var(--primary); }
.calc-group { scroll-margin-top: calc(var(--top-h) + var(--sat) + 16px); }
.calc-tile.filled { border-color: color-mix(in oklab, var(--primary) 35%, transparent); }
.calc-tile-res { color: var(--foreground); font-weight: 600; }
/* Formel-Seite */
.formel-list { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 380px), 1fr)); align-items: start; }
.formel { border-radius: 1.1rem; padding: 14px 16px; display: grid; gap: 10px; }
.formel-head { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--foreground); }
.formel-head b { flex: 1; font-size: .95rem; }
.formel-head .calc-ico { width: 32px; height: 32px; border-radius: 10px; }
.formel-head .calc-ico .i { width: 16px; height: 16px; }
.formel-head .chev { width: 16px; height: 16px; color: var(--muted-foreground); }
.calc-src { font-size: .82rem; color: var(--primary); display: inline-flex; align-items: center; gap: 6px; }
.calc-src .i { width: 14px; height: 14px; }

/* ---------- import ---------- */
.proposals { display: grid; gap: 12px; }
.proposal { display: flex; flex-direction: column; gap: 10px; border-radius: 1.26rem; padding: 16px 18px; }
.proposal.skip { opacity: .45; }
.proposal .p-title { font-weight: 600; font-size: 1rem; }
.proposal details summary { cursor: pointer; font-size: .85rem; color: var(--muted-foreground); padding: 2px 0; }
.proposal details[open] > * + * { margin-top: 8px; }
.sticky-foot { position: sticky; bottom: calc(var(--bn-h) + var(--sab) + 12px); display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; padding: 10px; border-radius: 1.1rem; }
@media (min-width: 1024px) { .sticky-foot { bottom: 16px; } }

@media (max-width: 640px) {
  h1, .hero h1 { font-size: 1.5rem; }
  .top-title { display: none; }
  .tiles { grid-template-columns: 1fr; }
  .kpis { grid-template-columns: 1fr 1fr; }
}
