/* Kompasswerk — ruhiges, klares Design ohne Framework */
:root {
  --bg: #f5f7f6;
  --card: #ffffff;
  --ink: #26343c;
  --muted: #64707a;
  --accent: #2f6f6a;
  --accent-dark: #24544f;
  --accent-soft: #e4efed;
  --line: #e4e9e7;
  --warn-bg: #fdf3e4;
  --warn-ink: #8a5a1d;
  --error-bg: #fbe9e7;
  --error-ink: #8c3226;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow-sm: 0 1px 2px rgba(38, 52, 60, .04), 0 1px 3px rgba(38, 52, 60, .06);
  --shadow: 0 6px 22px rgba(38, 52, 60, .10);
  --ring: 0 0 0 3px rgba(47, 111, 106, .22);
}
* { box-sizing: border-box; }
html { font-size: 16px; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.55;
  display: flex;
  min-height: 100vh;
  min-height: 100dvh;
  flex-direction: column;
}
.container { width: min(960px, 92vw); margin: 0 auto; }
main.container { flex: 1; padding: 1.5rem 0 3rem; }
a { color: var(--accent); text-underline-offset: 2px; }
a:hover { color: var(--accent-dark); }
h1, h2, h3 { line-height: 1.22; letter-spacing: -0.01em; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
::selection { background: var(--accent-soft); }

/* Header/Footer */
.site-header { background: var(--card); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; padding: .8rem 0; }
.brand { font-weight: 700; font-size: 1.15rem; text-decoration: none; color: var(--ink); }
.brand-group { display: flex; align-items: baseline; gap: .55rem; min-width: 0; }
.brand-context { color: var(--muted); font-weight: 600; font-size: 1rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand-context::before { content: "/"; color: var(--line); margin-right: .55rem; font-weight: 400; }
.nav a { margin-left: 1rem; text-decoration: none; }
.site-footer { background: var(--card); border-top: 1px solid var(--line); padding: 1rem 0 1.4rem; font-size: .85rem; color: var(--muted); }
.footer-crisis { background: var(--warn-bg); color: var(--warn-ink); padding: .55rem .8rem; border-radius: 8px; margin-bottom: .8rem; }
.footer-crisis a { color: var(--warn-ink); }
.footer-links a { margin-right: 1rem; color: var(--muted); }

/* Cards & layout */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.2rem 1.4rem; margin: .9rem 0; box-shadow: var(--shadow-sm); }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1rem; margin: 1rem 0; }
.hero { padding: 2.2rem 0 .6rem; }
.hero h1 { font-size: 2rem; margin: 0 0 .5rem; }
.hero-sub { color: var(--muted); font-size: 1.06rem; max-width: 46rem; }
.notice-card { background: var(--accent-soft); border-color: transparent; }
.cta-card { text-align: center; padding: 1.6rem; }
/* Zugang gesperrt (z. B. geschlossene Testphase): erklärt statt einzuladen. */
.blocked-card { background: var(--warn-bg); color: var(--warn-ink); }
.blocked-card h2 { margin-top: 0; font-size: 1.15rem; }
.muted { color: var(--muted); font-size: .9rem; }
.prose { max-width: 46rem; }

/* Buttons & forms */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  background: var(--accent); color: #fff; border: 1px solid transparent;
  padding: .58rem 1.25rem; border-radius: 999px; text-decoration: none;
  font-size: 1rem; line-height: 1.3; font-weight: 600; cursor: pointer;
  font-family: inherit; box-shadow: var(--shadow-sm);
  transition: background .15s ease, box-shadow .15s ease, transform .04s ease,
    color .15s ease, border-color .15s ease;
}
.btn:hover { background: var(--accent-dark); box-shadow: var(--shadow); }
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: none; box-shadow: var(--ring); }
.btn-big { padding: .78rem 1.7rem; font-size: 1.06rem; }
.btn-small { padding: .34rem .9rem; font-size: .9rem; }
/* Sekundär: ruhiger Umriss statt Vollfläche */
.btn-secondary { background: #fff; color: var(--accent-dark); border-color: var(--line); box-shadow: none; }
.btn-secondary:hover { background: var(--accent-soft); border-color: var(--accent-soft); box-shadow: none; }
/* Destruktiv: dezent; füllt sich erst beim Hover (klare Hierarchie) */
.btn-danger { background: #fff; color: #a33c2e; border-color: #e7c6c0; box-shadow: none; }
.btn-danger:hover { background: #a33c2e; color: #fff; border-color: #a33c2e; box-shadow: var(--shadow-sm); }
.btn[disabled] { opacity: .5; cursor: not-allowed; box-shadow: none; }

form p { margin: .7rem 0; }
label { font-weight: 600; }
input[type="text"], input[type="email"], input[type="password"], textarea, select {
  width: 100%; padding: .62rem .8rem; border: 1px solid var(--line); border-radius: var(--radius-sm);
  font: inherit; background: #fff; color: var(--ink);
  transition: border-color .15s ease, box-shadow .15s ease;
}
input[type="text"]:focus, input[type="email"]:focus, input[type="password"]:focus,
textarea:focus, select:focus {
  outline: none; border-color: var(--accent); box-shadow: var(--ring);
}
input[type="checkbox"] { width: auto; margin-right: .45rem; }
button[type="submit"], form .primary { margin-top: .4rem; }
/* allauth-Formulare (Login, Registrierung, Passwort) rendern Buttons ohne
   Klasse — sie sollen wie .btn aussehen. Eigene Buttons tragen immer eine Klasse. */
main button[type="submit"]:not([class]) {
  background: var(--accent); color: #fff; border: 1px solid transparent;
  padding: .58rem 1.25rem; border-radius: 999px; font-weight: 600; cursor: pointer;
  box-shadow: var(--shadow-sm);
}
main button[type="submit"]:not([class]):hover { background: var(--accent-dark); box-shadow: var(--shadow); }
main button[type="submit"]:not([class]):focus-visible { outline: none; box-shadow: var(--ring); }
form button { font: inherit; }
.helptext, .form-hint { color: var(--muted); font-size: .85rem; font-weight: 400; display: block; }
.errorlist { color: var(--error-ink); margin: .2rem 0; padding-left: 1.1rem; font-size: .9rem; }
form ul { padding-left: 1.1rem; }
form label:has(input[type="checkbox"]) { font-weight: 400; display: block; margin: .5rem 0; }

/* Flash messages */
.flash { padding: .7rem 1rem; border-radius: 8px; margin: .8rem 0; background: var(--accent-soft); }
.flash-error { background: var(--error-bg); color: var(--error-ink); }
.flash-success { background: #e7f3e7; color: #2c5f2e; }
.flash-info { background: var(--accent-soft); }

/* Products */
.product-card { display: flex; flex-direction: column; gap: .6rem; }
.price { font-size: 1.3rem; font-weight: 700; }
.price-note { font-size: .85rem; color: var(--muted); font-weight: 400; }
.waiver { display: flex; gap: .5rem; align-items: flex-start; font-weight: 400; font-size: .88rem; color: var(--muted); }
.waiver input { margin-top: .25rem; }

/* Chat */
.chat-wrap { display: flex; flex-direction: column; flex: 1; min-height: 380px; }
/* Chat-Seite füllt den Viewport: main als Flex-Spalte, damit .chat-wrap (flex:1)
   die Höhe füllt — keine Leerfläche zwischen Krisenzeile und Footer. */
main.container:has(.chat-wrap) { display: flex; flex-direction: column; padding-bottom: 1rem; }
.chat-toolbar { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; margin-bottom: .6rem; }
/* US-Testhinweis: kompakte Karte mit „×" (siehe chat.html) — ungeschlossen
   kostet er auf schmalen Screens sonst den halben Chatbereich. */
.us-test-notice { position: relative; padding: .6rem .9rem; margin: 0 0 .6rem; font-size: .92rem; }
.us-test-notice p { margin: 0; padding-right: 1.8rem; }
.notice-close {
  position: absolute; top: .2rem; right: .2rem; width: 2.25rem; height: 2.25rem;
  display: flex; align-items: center; justify-content: center;
  background: none; border: 0; border-radius: 50%; cursor: pointer;
  color: inherit; opacity: .65; font-size: 1.35rem; line-height: 1; padding: 0;
}
.notice-close:hover, .notice-close:focus-visible { opacity: 1; background: rgba(0, 0, 0, .07); }
.chat-toolbar select { max-width: 300px; width: auto; }
/* Formular „auflösen“, damit der Lösch-Button ein direktes Flex-Kind ist und
   exakt auf einer Linie mit dem Link-Button sitzt */
.chat-toolbar form { display: contents; }
.chat-toolbar .btn { margin: 0; }
/* Teilen-Panel (öffentlicher Link) */
.share-panel { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin: .1rem 0 .5rem; }
.share-panel input { flex: 1; min-width: 220px; font-size: .85rem; background: var(--card); }

/* Formularvorlagen (vorlagen.js) */
.formular-vorschlag { margin-top: .45rem; }
.vorlagen-dialog {
  width: min(760px, calc(100vw - 2rem)); max-height: calc(100vh - 3rem); padding: 0;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); color: var(--ink);
  box-shadow: var(--shadow-sm);
}
.vorlagen-dialog::backdrop { background: rgba(15, 25, 30, .45); }
.vorlagen-kopf {
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  padding: .8rem 1.1rem; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--card);
}
.vorlagen-kopf h2 { margin: 0; font-size: 1.1rem; }
.vorlagen-inhalt { padding: .9rem 1.1rem 1.2rem; }
.vorlagen-inhalt h3 { font-size: 1rem; margin: .9rem 0 .5rem; }
.vorlagen-inhalt textarea, .vorlagen-inhalt input[type=text], .vorlagen-inhalt select { width: 100%; }
.vorlagen-karte {
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  border: 1px solid var(--line); border-radius: var(--radius-sm); padding: .6rem .8rem; margin: .5rem 0;
}
.vorlagen-karte p { margin: .2rem 0 0; font-size: .88rem; }
.vorlagen-badge {
  display: inline-block; margin-left: .5rem; padding: .05rem .5rem; border-radius: 999px;
  background: var(--accent-soft); color: var(--accent-dark); font-size: .75rem;
}
.vorlagen-liste { list-style: none; padding: 0; margin: 0; }
.vorlagen-liste li { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .5rem; padding: .4rem 0; border-bottom: 1px solid var(--line); }
.vorlagen-links { display: flex; flex-wrap: wrap; gap: .5rem; margin: .6rem 0; }
.vorlagen-label { display: block; font-weight: 600; font-size: .9rem; margin: .6rem 0 .25rem; }
.vorlagen-hinweis { background: var(--accent-soft); color: var(--accent-dark); padding: .55rem .8rem; border-radius: var(--radius-sm); font-size: .9rem; }
.vorlagen-fehlend, .vorlagen-notizen { margin: .2rem 0 .6rem; padding-left: 1.2rem; font-size: .88rem; }
.vorlagen-fehlend { color: var(--warn-ink, #8a5a00); }
.vorlagen-fehler { background: var(--warn-bg); color: var(--warn-ink); padding: .55rem .8rem; border-radius: var(--radius-sm); }
.vorlagen-warten { padding: 1.2rem 0; color: var(--muted); }
.vorlagen-feld { display: flex; flex-direction: column; gap: .25rem; margin: .65rem 0; }
.vorlagen-feld label { font-weight: 600; font-size: .9rem; }
.vorlagen-feld small { font-size: .78rem; }
.vorlagen-feld-check { flex-direction: row; align-items: center; gap: .5rem; }
.vorlagen-feld-check label { font-weight: 400; }
.share-panel .muted { font-size: .8rem; }
/* Mount-Knoten der React-Insel (assistant-ui) — füllt die Chat-Höhe; das
   Styling der Insel selbst lebt isoliert im Shadow-Root.
   Die Insel braucht eine ECHTE Höhe: ihr Thread ist `height: 100%` und würde
   in einer nur per `min-height` aufgespannten Kette auf `auto` zurückfallen —
   dann wächst die Insel mit dem Gespräch, statt innen zu scrollen, und der
   Composer rutscht unter den Fensterrand (Eingabefeld „verschwindet"). Darum
   auf der Insel-Seite die Höhe vom Viewport durchreichen und alle Zwischen-
   ebenen schrumpfbar machen (`min-height: 0`). */
body:has(.kompass-chat-root) { height: 100vh; height: 100dvh; }
main.container:has(.kompass-chat-root),
.chat-wrap:has(.kompass-chat-root) { min-height: 0; }
.kompass-chat-root { flex: 1 1 auto; min-height: 0; overflow: hidden; }
.chat-messages {
  flex: 1; overflow-y: auto; background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 1rem 1.1rem; box-shadow: var(--shadow-sm);
}
.msg { max-width: 80%; margin: .5rem 0; padding: .72rem 1rem; border-radius: 14px; line-height: 1.5; white-space: normal; overflow-wrap: break-word; }
.msg p { margin: .35rem 0; }
.msg ul, .msg ol { margin: .3rem 0; padding-left: 1.3rem; }
.msg-user { margin-left: auto; background: var(--accent-soft); border-bottom-right-radius: 5px; }
.msg-assistant { margin-right: auto; background: #eef2f1; border-bottom-left-radius: 5px; }
.msg-status { text-align: center; color: var(--muted); font-size: .85rem; margin: .5rem 0; }
.msg-error { background: var(--error-bg); color: var(--error-ink); margin-right: auto; }
.msg-content.streaming > :last-child::after {
  content: "▋"; animation: blink 1s step-start infinite; color: var(--accent); margin-left: .06em;
}
@keyframes blink { 50% { opacity: 0; } }

/* Warte-Indikator: rotierende Phrasen + animierte Punkte */
.msg-assistant.thinking { color: var(--muted); }
.thinking-text { transition: opacity .25s ease; opacity: 1; }
.thinking-text.fade { opacity: 0; }
.thinking-dots::after {
  display: inline-block; content: ""; width: 1.2em; text-align: left;
  animation: thinking-dots 1.6s steps(1, end) infinite; color: var(--accent);
}
@keyframes thinking-dots {
  0%   { content: ""; }
  25%  { content: "."; }
  50%  { content: ".."; }
  75%  { content: "..."; }
}
.chat-composer { display: flex; gap: .6rem; margin-top: .7rem; align-items: flex-end; }
.chat-composer textarea { resize: none; height: 74px; flex: 1; }
.chat-blocked { background: var(--warn-bg); color: var(--warn-ink); padding: .8rem 1rem; border-radius: 8px; margin-top: .7rem; }
.chat-crisis { font-size: .8rem; color: var(--muted); margin-top: .45rem; text-align: center; }
.chat-meta { font-size: .75rem; color: var(--muted); font-family: ui-monospace, monospace; margin-top: .3rem; }

/* Formatierte Antworten (Markdown), Codeblöcke & Kopier-Buttons */
.msg-content > :first-child { margin-top: 0; }
.msg-content > :last-child { margin-bottom: 0; }
.msg-content h1, .msg-content h2, .msg-content h3, .msg-content h4 {
  font-size: 1.02em; margin: .7rem 0 .3rem; line-height: 1.3; letter-spacing: 0;
}
.msg-content a { overflow-wrap: break-word; }
.msg-content blockquote {
  margin: .5rem 0; padding: .15rem .8rem; border-left: 3px solid var(--accent-soft); color: var(--muted);
}
.msg-content hr { border: none; border-top: 1px solid var(--line); margin: .8rem 0; }
.msg-content table {
  border-collapse: collapse; margin: .5rem 0; font-size: .92em; display: block; overflow-x: auto; max-width: 100%;
}
.msg-content th, .msg-content td { border: 1px solid var(--line); padding: .35rem .55rem; text-align: left; }
.msg-content th { background: rgba(47, 111, 106, .10); font-weight: 600; }
/* Inline-Code */
.msg-content :not(pre) > code {
  background: var(--accent-soft); color: var(--accent-dark); padding: .08em .38em; border-radius: 5px;
  font-size: .9em; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
/* Codeblock */
.msg-content pre {
  position: relative; margin: .55rem 0; padding: .8rem .9rem; background: #1f2a2e; color: #e7edea;
  border-radius: var(--radius-sm); overflow-x: auto; font-size: .86em; line-height: 1.5;
}
.msg-content pre code {
  white-space: pre; background: none; color: inherit; padding: 0; font-size: 1em;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

/* Kopier-Button (ganze Antwort) — dezent, immer sichtbar (auch mobil) */
.msg-actions { margin-top: .4rem; display: flex; justify-content: flex-end; opacity: .55; transition: opacity .15s ease; }
.msg-assistant:hover .msg-actions, .msg-assistant:focus-within .msg-actions { opacity: 1; }
.copy-btn {
  display: inline-flex; align-items: center; gap: .3rem; background: transparent;
  border: 1px solid var(--line); color: var(--muted); padding: .2rem .55rem; border-radius: 999px;
  font: inherit; font-size: .8rem; line-height: 1.2; cursor: pointer;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.copy-btn:hover { background: var(--card); color: var(--ink); }
.copy-btn:focus-visible { outline: none; box-shadow: var(--ring); }
.copy-btn.is-copied { color: var(--accent); border-color: var(--accent); }
.copy-ico { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
/* Kopier-Button (einzelner Codeblock) — Icon oben rechts */
.code-copy {
  position: absolute; top: .4rem; right: .4rem; padding: .3rem; gap: 0; border-radius: 7px;
  color: #cdd6d2; background: rgba(255, 255, 255, .10); border-color: rgba(255, 255, 255, .18); opacity: .8;
}
.msg-content pre:hover .code-copy { opacity: 1; }
.code-copy:hover { background: rgba(255, 255, 255, .2); color: #fff; }
.code-copy.is-copied { color: #b9d9a0; border-color: rgba(185, 217, 160, .5); background: rgba(255, 255, 255, .12); }

/* highlight.js — kompakte, themebare Tokenfarben auf dunklem Codehintergrund */
.hljs-comment, .hljs-quote { color: #8b9a95; font-style: italic; }
.hljs-keyword, .hljs-selector-tag, .hljs-literal, .hljs-section, .hljs-doctag, .hljs-name, .hljs-tag { color: #8fd3c8; }
.hljs-string, .hljs-attr, .hljs-meta .hljs-string, .hljs-addition { color: #b9d9a0; }
.hljs-number, .hljs-built_in, .hljs-type, .hljs-symbol, .hljs-bullet, .hljs-attribute { color: #e6c384; }
.hljs-title, .hljs-title.function_, .hljs-selector-id, .hljs-selector-class { color: #f0a5a0; }
.hljs-variable, .hljs-template-variable, .hljs-regexp, .hljs-link { color: #cdd6d2; }
.hljs-meta { color: #8b9a95; }
.hljs-deletion { color: #f0a5a0; }
.hljs-emphasis { font-style: italic; }
.hljs-strong { font-weight: 700; }

/* Sprache (Voice): runder Mikrofon-Knopf + dezente Vorlese-Option */
.btn-icon {
  padding: 0; width: 2.6rem; min-width: 2.6rem; height: 2.6rem;
  border-radius: 50%; font-size: 1.2rem;
}
.btn-icon.listening { background: #a33c2e; animation: voice-pulse 1.2s ease-in-out infinite; }
.btn-icon.listening:hover { background: #85301f; }
@keyframes voice-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(163, 60, 46, .45); }
  50%      { box-shadow: 0 0 0 .5rem rgba(163, 60, 46, 0); }
}
.voice-opt {
  display: inline-flex; align-items: center; cursor: pointer;
  margin-top: .5rem; font-weight: 400; font-size: .85rem; color: var(--muted);
}
.voice-opt input { width: auto; margin: 0 .4rem 0 0; }

/* Tables (account) */
table.list { width: 100%; border-collapse: collapse; font-size: .95rem; }
table.list th, table.list td { text-align: left; padding: .5rem .6rem; border-bottom: 1px solid var(--line); }
table.list th { color: var(--muted); font-weight: 600; }

/* Legal prose */
.legal h1 { font-size: 1.6rem; }
.legal h2 { font-size: 1.15rem; margin-top: 1.6rem; }
.legal { max-width: 46rem; }
.placeholder { background: #fff3cd; padding: .1rem .3rem; border-radius: 4px; }

/* --- Mobile-Feinschliff (Basis ist bereits responsiv: viewport-Meta, ------
   92vw-Container, Flex/Grid). Hier nur Ecken abrunden für schmale Screens. */
@media (max-width: 640px) {
  /* Kopfzeile darf umbrechen; Navigation rückt zusammen */
  .header-inner { flex-wrap: wrap; gap: .2rem .9rem; padding: .6rem 0; }
  .nav a { margin-left: 0; margin-right: .9rem; }

  /* Überschriften/Abstände kompakter */
  main.container { padding: 1.1rem 0 2.4rem; }
  .hero { padding: 1.4rem 0 .4rem; }
  .hero h1 { font-size: 1.7rem; }
  .hero-sub { font-size: 1rem; }

  /* Chat füllt den sichtbaren Bereich (dvh gegen mobile Browserleisten) */
  .chat-wrap { min-height: 300px; }
  /* Untergrenze für die Nachrichtenliste: Toolbar, Hinweise und Composer
     dürfen sie nicht auf eine Zeile zusammendrücken. */
  .chat-messages { min-height: 30vh; min-height: 30dvh; }
  .msg { max-width: 90%; }
  .chat-toolbar select { max-width: 100%; }

  /* Breite Tabellen horizontal scrollen statt die Seite zu verbreitern */
  table.list { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; white-space: nowrap; }
}

/* --- Ein-Produkt-Startseite (Marken-Entry) ------------------------------------
   Genutzt von templates/brands/entry.html; Farben kommen aus den Theme-Variablen. */
.brand-hero { padding: 2.6rem 0 1rem; max-width: 46rem; }
.brand-eyebrow {
  text-transform: uppercase; letter-spacing: .12em; font-size: .78rem; font-weight: 700;
  color: var(--gold, var(--muted)); margin: 0 0 .6rem;
}
.brand-hero h1 { font-size: 2.4rem; margin: 0 0 .6rem; }
.brand-hero .hero-sub { font-size: 1.1rem; }
.brand-cta { margin-top: 1.4rem; display: flex; flex-direction: column; align-items: flex-start; gap: .5rem; }
.brand-cta .muted { margin: 0; }

/* --- Theme: Belastungskompass -------------------------------------------------
   Exakte Tokens der Marken-Landingpage (belastungskompass.de). Da die gesamte
   UI variablengesteuert ist, reskint dieser Block Kopf/Fuß/Buttons/Formulare
   UND den Chat auf dem Marken-Host. Der Plattform-Standard (Kompasswerk) bleibt
   unberührt. */
body.theme-belastungskompass {
  --bg: #faf7f0;             /* Sand */
  --card: #fffefa;
  --ink: #122c43;            /* tiefes Navy */
  --muted: #5d6c70;
  --accent: #122c43;         /* Primärbutton in Navy (wie die Hero-CTA der Seite) */
  --accent-dark: #0a1c2c;
  --accent-soft: #e8eee8;    /* Sage: weiche Flächen, Nutzer-Sprechblase, Notice-Card */
  --line: #e0d9ca;
  --gold: #b8904e;           /* Messing-Akzent (Kicker, Hairlines) */
  --radius: 22px;
  --radius-sm: 14px;
  --shadow-sm: 0 1px 2px rgba(18, 44, 67, .05), 0 1px 3px rgba(18, 44, 67, .06);
  --shadow: 0 14px 42px rgba(18, 44, 67, .08);
  --ring: 0 0 0 3px rgba(18, 44, 67, .20);
  font-family: "Avenir Next", "Nunito Sans", "Segoe UI", system-ui, Arial, sans-serif;
  --font-display: "Iowan Old Style", Baskerville, "Palatino Linotype", "Book Antiqua", Georgia, serif;
}
body.theme-belastungskompass h1,
body.theme-belastungskompass h2,
body.theme-belastungskompass h3,
body.theme-belastungskompass .brand {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.02em;
}
/* Chat-Feinschliff: Assistenten-Blase & Codeblock an die Markenwelt angleichen
   (die betreffenden app.css-Regeln nutzen feste Literale statt Variablen). */
body.theme-belastungskompass .msg-assistant { background: #eef1ea; }
body.theme-belastungskompass .msg-content pre { background: #16232e; }
body.theme-belastungskompass .msg-content th { background: rgba(18, 44, 67, .08); }

/* --- Bildmarke (markenunabhängig) ---------------------------------------------
   Logo statt Text-Wortmarke in der Kopfzeile, großes Logo auf der Startseite und
   Stichpunkt-Karten — aktiv, sobald die Marke die jeweiligen Felder setzt. */
.brand-logo { display: flex; align-items: center; }
.brand-logo img { display: block; height: 44px; width: auto; }
.brand-group:has(.brand-logo) { align-items: center; }
.brand-hero-logo { margin: 0 auto; text-align: center; padding-top: 1.6rem; }
.brand-hero-logo .hero-sub { margin-left: auto; margin-right: auto; }
.brand-hero-logo .brand-cta { align-items: center; }
.hero-lockup { margin-bottom: 1.6rem; }
.hero-logo { display: block; width: min(260px, 62vw); height: auto; margin: 0 auto; }
.hero-tagline {
  margin: .5rem 0 0; font-size: .82rem; font-weight: 700;
  letter-spacing: .22em; text-transform: uppercase; color: var(--muted);
}
.hero-points {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem; margin: 2rem 0 1rem;
}
.hero-point {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.1rem 1.25rem; box-shadow: var(--shadow-sm);
  border-top: 3px solid var(--signal, var(--accent));
}
.hero-point h3 { margin: 0 0 .35rem; font-size: 1.05rem; }
.hero-point p { margin: 0; color: var(--muted); font-size: .95rem; }
@media (max-width: 640px) {
  .brand-logo img { height: 36px; }
  .brand-hero-logo { padding-top: .6rem; }
  .brand-hero-logo h1 { font-size: 1.8rem; }
}

/* --- Schrift: Manrope (CI DOLPHIN 1.0) -----------------------------------------
   Selbst gehostet (keine Anfrage an Google), SIL Open Font License —
   static/fonts/manrope/OFL.txt. Eine Variable-Font-Datei deckt 200–800 ab;
   Latin-Subset genügt fürs Deutsche (ä ö ü ß liegen in U+00xx). */
@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url("../fonts/manrope/manrope-latin-wght-normal.938c6e8019b6.woff2") format("woff2");
}

/* --- Theme: DOLPHIN Work (CI-Arbeitsbasis 1.0) -----------------------------------
   Tokens 1:1 aus der CI: Ocean = Vertrauen/Tiefe (Primär-CTA), Coral = Aktivierung
   (nur Flächen/Linien bzw. Coral+Ink — auf Weiß als kleiner Text zu schwach,
   dafür Coral Deep), Sea Glass = Chat- und Info-Flächen, Air = große helle
   Flächen, Ink = Text. Karten ~16 px, Buttons ~12 px Radius; Pillen nur für
   Tags/Status. */
body.theme-dolphin {
  --bg: #f6faf9;             /* Air */
  --card: #ffffff;
  --ink: #10242b;            /* DOLPHIN Ink */
  --muted: #4b5f66;
  --accent: #045067;         /* DOLPHIN Ocean */
  --accent-dark: #033d4f;
  --accent-soft: #e0f3f5;    /* Sea Glass */
  --ocean-mid: #0b7187;
  --line: #d8e6e9;
  --signal: #fd4f34;         /* DOLPHIN Coral — Deko, Coral+Ink-Button */
  --signal-ink: #ca3f2e;     /* Coral Deep — Akzenttext, kontrastsicher */
  --foam: #fcfaf7;
  --gold: var(--signal-ink); /* Kicker/Eyebrow der Basis-Styles */
  --radius: 16px;
  --radius-sm: 12px;
  --shadow-sm: 0 1px 2px rgba(16, 36, 43, .05), 0 1px 3px rgba(16, 36, 43, .06);
  --shadow: 0 16px 40px rgba(4, 80, 103, .10);
  --ring: 0 0 0 3px rgba(4, 80, 103, .24);
  --font-display: "Manrope", "Segoe UI", system-ui, sans-serif;
  font-family: "Manrope", "Segoe UI", system-ui, -apple-system, sans-serif;
  background: linear-gradient(180deg, #e8f5f6 0, var(--bg) 320px) no-repeat, var(--bg);
}
body.theme-dolphin h1,
body.theme-dolphin h2,
body.theme-dolphin h3 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.02em;
}
body.theme-dolphin .site-header { background: rgba(255, 255, 255, .9); }
body.theme-dolphin .brand-hero h1 { font-size: 2.3rem; font-weight: 800; }
/* Buttons: strukturiert statt Pille (CI 6); runde Icon-Knöpfe bleiben rund. */
body.theme-dolphin .btn,
body.theme-dolphin main button[type="submit"]:not([class]) { border-radius: 12px; }
body.theme-dolphin .btn-icon { border-radius: 50%; }
body.theme-dolphin .btn-secondary { color: var(--accent); }
/* Chat: Nutzer auf Sea Glass, DOLPHIN auf warmem Foam mit Haarlinie. */
body.theme-dolphin .msg { border-radius: 16px; }
body.theme-dolphin .msg-assistant { background: var(--foam); border: 1px solid #ece6dc; }
body.theme-dolphin .msg-content pre { background: var(--ink); }
body.theme-dolphin .msg-content th { background: rgba(4, 80, 103, .08); }

/* Kopfzeilen-Logo: Masterlockup Signet + DOLPHIN (Proportion unverändert) plus
   Produktlinie als Text („Work“). Die Wortmarke sitzt im Lockup auf der
   Ringmitte (~57 % der Bildhöhe) — der Zusatz rückt per padding-top dorthin. */
body.theme-dolphin .brand-logo img { height: 52px; }
.brand-suffix {
  font-family: var(--font-display, inherit); font-weight: 700; font-size: 1.22rem;
  letter-spacing: -0.01em; color: var(--accent); margin-left: .4rem; padding-top: .42rem;
  line-height: 1;
}
@media (max-width: 640px) {
  body.theme-dolphin .brand-logo img { height: 42px; }
  .brand-suffix { font-size: 1.02rem; padding-top: .34rem; }
}

/* Dachmarke als dezenter Endorser unter den Footer-Links. */
.yann-endorsement { display: flex; align-items: center; flex-wrap: wrap; gap: .3rem .6rem; margin: .9rem 0 0; font-size: .78rem; color: var(--muted); }
.yann-endorsement img { display: block; height: 16px; width: auto; }

/* --- Arbeitgeber-Ansicht (/organisation/) ------------------------------------
   Nur aggregierte Zählwerte. Kennzahlen bewusst in der Textschrift (nicht in der
   Display-Schrift der Überschriften); ein Diagramm = eine Messgröße, Werte
   zusätzlich als Tabelle (Tooltip ist nie der einzige Zugang). */
.org-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; flex-wrap: wrap; }
.org-head h1 { margin: 0 0 .2rem; }
.org-head .muted { margin: 0; }
.org-sample-banner {
  margin: 1rem 0 0; padding: .75rem 1rem; border-radius: var(--radius-sm);
  background: var(--warn-bg); color: var(--warn-ink); border-left: 4px solid var(--signal, var(--warn-ink));
}
.org-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: .9rem; margin: 1.1rem 0; }
.org-kpi { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.15rem; box-shadow: var(--shadow-sm); }
.org-kpi-label { font-size: .85rem; font-weight: 600; color: var(--muted); }
.org-kpi-value { font-size: 1.9rem; font-weight: 700; line-height: 1.2; margin: .25rem 0 .1rem; color: var(--ink); }
.org-kpi-note { font-size: .8rem; color: var(--muted); }

.org-chart { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 2px; margin: .8rem 0 .4rem; }
.org-chart-col { display: flex; flex-direction: column; }
.org-chart-plot { height: 160px; display: flex; align-items: flex-end; justify-content: center; border-bottom: 1px solid var(--line); padding-top: 1.4rem; }
.org-chart-bar {
  position: relative; width: min(46px, 62%); background: var(--accent);
  border-radius: 4px 4px 0 0; min-height: 2px; outline-offset: 3px; cursor: default;
}
.org-chart-bar:hover, .org-chart-bar:focus-visible { background: var(--accent-dark); }
.org-chart-empty { width: min(46px, 62%); height: 2px; background: var(--line); }
.org-chart-direct {
  position: absolute; bottom: 100%; left: 50%; transform: translateX(-50%);
  margin-bottom: .25rem; font-size: .85rem; font-weight: 700; color: var(--ink); white-space: nowrap;
}
.org-chart-tip {
  position: absolute; bottom: calc(100% + 1.8rem); left: 50%; transform: translateX(-50%);
  background: var(--ink); color: #fff; font-size: .8rem; padding: .35rem .55rem;
  border-radius: 8px; white-space: nowrap; pointer-events: none; opacity: 0;
  transition: opacity .12s; z-index: 2;
}
.org-chart-bar:hover .org-chart-tip, .org-chart-bar:focus-visible .org-chart-tip { opacity: 1; }
.org-chart-label { text-align: center; font-size: .8rem; color: var(--muted); padding-top: .35rem; }
.org-table summary { cursor: pointer; color: var(--accent); font-size: .9rem; margin-top: .4rem; }
.org-table table { margin-top: .6rem; }

.org-privacy { background: var(--accent-soft); border-radius: var(--radius); padding: 1.2rem 1.4rem; margin: .9rem 0; }
.org-privacy h2 { margin-top: 0; }
.org-privacy-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem; }
.org-privacy-col { background: var(--card); border-radius: var(--radius-sm); padding: .9rem 1.1rem; }
.org-privacy-col h3 { margin: 0 0 .4rem; font-size: 1rem; }
.org-privacy-col ul { margin: 0; padding-left: 1.2rem; }
.org-privacy-col li { margin: .2rem 0; }
.org-privacy-yes h3::before { content: "✓ "; color: var(--accent); }
.org-privacy-no h3::before { content: "✕ "; color: var(--signal-ink, var(--error-ink)); }
.org-section-h { margin-top: 2rem; }
.org-invite-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 0 1rem; }
