:root {
  --ink: #15211c;
  --muted: #66736d;
  --canvas: #f2f5f1;
  --panel: #ffffff;
  --panel-soft: #f8faf7;
  --forest: #15543e;
  --forest-deep: #0d372b;
  --forest-black: #09291f;
  --mint: #dceee4;
  --mint-strong: #b9dbc7;
  --gold: #d99a31;
  --gold-soft: #f7ead0;
  --fuessen-gold: #f4cf18;
  --fuessen-black: #111111;
  --line: #dce3de;
  --line-strong: #c9d3cd;
  --danger: #c6534d;
  --shadow-sm: 0 8px 24px rgba(17, 55, 42, .07);
  --shadow-lg: 0 24px 70px rgba(17, 55, 42, .13);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
[hidden] { display: none !important; }

.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 100;
  padding: 12px 16px;
  color: #fff;
  background: #09291f;
  border-radius: 8px;
  transform: translateY(-150%);
}
.skip-link:focus { transform: translateY(0); }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 88% -5%, rgba(217, 154, 49, .13), transparent 34rem),
    radial-gradient(circle at 45% 100%, rgba(21, 84, 62, .07), transparent 38rem),
    var(--canvas);
  font-family: Inter, "Segoe UI Variable", "Segoe UI", Arial, sans-serif;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
}

button, textarea { font: inherit; }
button { cursor: pointer; }
button:focus-visible, textarea:focus-visible, a:focus-visible, summary:focus-visible {
  outline: 3px solid #b56f00;
  outline-offset: 3px;
}

.shell {
  min-height: 100vh;
  display: block;
}

.sidebar {
  position: fixed;
  left: 0;
  top: 0;
  width: 88px;
  height: 100vh;
  padding: 18px 12px;
  color: #fff;
  background:
    radial-gradient(circle at 110% 5%, rgba(217, 154, 49, .22), transparent 15rem),
    linear-gradient(160deg, #154c3a 0%, var(--forest-deep) 42%, var(--forest-black) 100%);
  display: flex;
  flex-direction: column;
  box-shadow: 12px 0 44px rgba(9, 41, 31, .12);
  z-index: 20;
  overflow: hidden;
  transition: width .22s ease, box-shadow .22s ease;
}

.sidebar.expanded {
  width: 264px;
  box-shadow: 18px 0 60px rgba(9, 41, 31, .24);
}

.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  min-width: 240px;
  margin: 2px 2px 30px;
}

.brand-copy { min-width: 130px; opacity: 0; pointer-events: none; transition: opacity .14s ease; }
.sidebar.expanded .brand-copy { opacity: 1; pointer-events: auto; }

.crest {
  width: 44px;
  height: 50px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  padding: 4px;
  background: rgba(255, 255, 255, .92);
  border: 1px solid rgba(17, 17, 17, .1);
  border-radius: 12px;
  box-shadow: 0 8px 22px rgba(0, 0, 0, .1);
}
.crest img { display: block; width: 100%; height: 100%; object-fit: contain; }

.sidebar-toggle {
  position: absolute;
  top: 22px;
  right: 17px;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  padding: 0;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 12px;
  background: rgba(255, 255, 255, .08);
  font-size: 17px;
}
.sidebar:not(.expanded) .sidebar-toggle { top: 76px; right: 25px; }
.sidebar-toggle:hover { background: rgba(255, 255, 255, .16); }

.eyebrow {
  margin: 0 0 7px;
  color: var(--gold);
  font-size: 9px;
  font-weight: 850;
  letter-spacing: .16em;
}

.brand h1 {
  margin: 0;
  font: 650 21px/1.08 Georgia, "Times New Roman", serif;
  letter-spacing: -.01em;
}

.brand-version {
  margin: 5px 0 0;
  color: rgba(255, 255, 255, .52);
  font-size: 9px;
}

nav { display: grid; gap: 6px; min-width: 240px; }

.topic {
  width: 100%;
  min-height: 46px;
  padding: 10px 12px;
  border: 1px solid transparent;
  border-radius: 12px;
  color: rgba(255, 255, 255, .72);
  background: transparent;
  text-align: left;
  font-size: 13px;
  white-space: nowrap;
  transition: color .18s ease, background .18s ease, border-color .18s ease, transform .18s ease;
}

.topic-number {
  display: inline-grid;
  place-items: center;
  width: 27px;
  height: 22px;
  margin-right: 5px;
  border-radius: 7px;
  color: #f0bd65;
  background: rgba(255, 255, 255, .06);
  font-size: 9px;
  font-weight: 800;
}

.topic-label { opacity: 0; transition: opacity .14s ease; }
.sidebar.expanded .topic-label { opacity: 1; }
.sidebar:not(.expanded) .topic { width: 54px; padding-inline: 8px; }

.topic:hover, .topic.active {
  color: #fff;
  border-color: rgba(255, 255, 255, .08);
  background: rgba(255, 255, 255, .09);
  transform: translateX(2px);
}

.status-card {
  margin-top: auto;
  padding: 17px;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 16px;
  background: rgba(255, 255, 255, .065);
  box-shadow: inset 0 1px rgba(255, 255, 255, .05);
}

.sidebar:not(.expanded) .status-card {
  width: 54px;
  padding: 14px;
}
.sidebar:not(.expanded) .status-line { justify-content: center; }
.sidebar:not(.expanded) .status-line strong,
.sidebar:not(.expanded) .status-card dl { display: none; }

.status-line { display: flex; align-items: center; gap: 9px; font-size: 11px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: #e4ad49; }
.dot.ok { background: #67d497; box-shadow: 0 0 0 5px rgba(103, 212, 151, .12); }
.dot.error { background: #ec746c; }
.status-card dl { margin: 15px 0 0; display: grid; gap: 8px; }
.status-card dl div { display: flex; justify-content: space-between; gap: 10px; }
.status-card dt { color: rgba(255, 255, 255, .5); font-size: 10px; }
.status-card dd {
  margin: 0;
  max-width: 130px;
  overflow: hidden;
  color: rgba(255, 255, 255, .86);
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 10px;
}

main {
  width: 100%;
  max-width: 1340px;
  margin: 0 auto;
  padding: 0 28px 152px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 15;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  min-height: 68px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(201, 211, 205, .8);
  background: rgba(242, 245, 241, .86);
  backdrop-filter: blur(18px);
}

.topbar-brand { display: flex; align-items: center; gap: 11px; }
.topbar-brand .crest {
  width: 38px;
  height: 44px;
  padding: 3px;
  border-radius: 10px;
  box-shadow: none;
}
.topbar-brand strong { display: block; font: 650 17px/1.1 Georgia, serif; }
.topbar-brand small { display: block; margin-top: 3px; color: var(--muted); font-size: 9px; }
.topbar-actions { display: flex; align-items: center; gap: 10px; }
.privacy-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 44px;
  padding: 8px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255, 255, 255, .62);
  font-size: 10px;
  font-weight: 650;
  cursor: pointer;
}
.privacy-badge span { color: #50a979; font-size: 8px; }

.ghost-button {
  min-height: 44px;
  padding: 9px 13px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--forest);
  background: #fff;
  font-size: 11px;
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(21, 84, 62, .04);
}
.ghost-button:hover { border-color: #94b7a3; background: #f8fbf9; }
.ghost-button[aria-pressed="true"] { color: #fff; border-color: var(--forest); background: var(--forest); }

dialog {
  width: min(680px, calc(100% - 28px));
  padding: 0;
  color: var(--ink);
  border: 0;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 30px 90px rgba(5, 31, 23, .35);
}
dialog::backdrop { background: rgba(5, 31, 23, .62); backdrop-filter: blur(3px); }
.dialog-card { padding: 28px; }
.dialog-card.compact { max-width: 520px; }
.dialog-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.dialog-heading h2 { margin: 0 0 12px; font: 600 25px/1.2 Georgia, serif; }
.dialog-heading > button {
  width: 42px; height: 42px; flex: 0 0 auto; border: 1px solid var(--line); border-radius: 50%;
  color: var(--ink); background: #fff; font-size: 25px;
}
.privacy-list { display: grid; gap: 12px; margin: 18px 0; padding: 0; list-style: none; }
.privacy-list li { padding: 13px 15px; border-left: 4px solid var(--mint-strong); background: var(--panel-soft); line-height: 1.5; }
.dialog-note { color: var(--muted); font-size: 13px; line-height: 1.55; }
.dialog-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 9px; margin-top: 22px; }
.dialog-actions button, .dialog-primary {
  min-height: 44px; padding: 10px 16px; border: 1px solid var(--line-strong); border-radius: 10px;
  color: var(--forest); background: #fff; font-weight: 750;
}
.dialog-primary { color: #fff; border-color: var(--forest); background: var(--forest); }
.dialog-primary.danger { border-color: var(--danger); background: var(--danger); }

.simple-language .bubble { font-size: 17px; line-height: 1.75; }
.simple-language .answer-core { font-size: 18px; }
.simple-language .source-title, .simple-language .message-actions button,
.simple-language .follow-up-actions button { font-size: 12px; }

.welcome {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(380px, .95fr);
  gap: 12px;
  padding: 22px 0 30px;
}

.welcome-copy {
  position: relative;
  overflow: hidden;
  min-height: 350px;
  padding: 46px 42px;
  border-radius: 24px;
  color: #fff;
  background:
    radial-gradient(circle at 88% 16%, rgba(247, 196, 104, .32), transparent 15rem),
    radial-gradient(circle at 9% 110%, rgba(140, 201, 166, .19), transparent 20rem),
    linear-gradient(145deg, #185b43, #0d392b 68%, #0a2b21);
  border-top: 4px solid var(--fuessen-gold);
  box-shadow: var(--shadow-lg);
}
.welcome-wappen {
  position: absolute;
  right: 34px;
  bottom: -32px;
  width: 210px;
  height: 252px;
  opacity: .075;
  filter: grayscale(1) brightness(3.4);
  pointer-events: none;
}

.welcome-kicker {
  margin: 0;
  color: #efbd67 !important;
  font-size: 9px !important;
  font-weight: 850;
  letter-spacing: .16em;
}

.welcome h1 {
  position: relative;
  z-index: 1;
  margin: 24px 0 18px;
  max-width: 600px;
  color: #fff;
  font: 550 clamp(42px, 5vw, 66px)/.98 Georgia, "Times New Roman", serif;
  letter-spacing: -.045em;
}

.welcome-copy > p {
  position: relative;
  z-index: 1;
  max-width: 560px;
  color: rgba(255, 255, 255, .72);
  font-size: 16px;
  line-height: 1.65;
}

.trust-row {
  position: absolute;
  left: 40px;
  right: 40px;
  bottom: 30px;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}
.trust-row span {
  padding: 8px 10px;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 10px;
  color: rgba(255, 255, 255, .62);
  background: rgba(255, 255, 255, .06);
  font-size: 9px;
}
.trust-row strong { color: #fff; }

.quick-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  align-content: stretch;
}
.quick-grid button {
  position: relative;
  min-height: 108px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 20px;
  color: var(--ink);
  background: rgba(255, 255, 255, .85);
  box-shadow: var(--shadow-sm);
  text-align: left;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.quick-grid button::before {
  content: attr(data-icon);
  position: absolute;
  top: 15px;
  right: 15px;
  display: grid;
  place-items: center;
  width: 31px;
  height: 31px;
  border-radius: 10px;
  color: var(--forest);
  background: var(--mint);
  font-size: 16px;
  font-weight: 800;
}
.quick-grid button.wide { grid-column: 1 / -1; min-height: 86px; }
.quick-grid button:hover {
  border-color: #96b8a5;
  transform: translateY(-3px);
  box-shadow: 0 16px 36px rgba(17, 55, 42, .12);
}
.quick-grid button > span {
  display: block;
  margin: 1px 42px 28px 0;
  color: var(--gold);
  font-size: 8px;
  font-weight: 850;
  letter-spacing: .13em;
  text-transform: uppercase;
}
.quick-grid button.wide > span { margin-bottom: 17px; }
.quick-grid strong { display: block; font: 600 17px/1.25 Georgia, serif; }
.quick-grid small { display: block; margin-top: 7px; color: var(--muted); font-size: 10px; }

.conversation { display: grid; gap: 26px; padding: 28px 0 190px; }
.message { display: grid; gap: 8px; width: min(100%, 1180px); scroll-margin-bottom: 175px; }
.message.user { justify-self: end; width: min(92%, 860px); }
.message .label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 850;
  letter-spacing: .13em;
  text-transform: uppercase;
}
.message.user .label { justify-content: flex-end; }
.answer-mode {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 8px;
  border: 1px solid #bfd2c5;
  border-radius: 999px;
  color: #315a44;
  background: #f1f8f3;
  font-size: 8px;
  letter-spacing: .04em;
}
.answer-mode::before { content: "✓"; font-size: 9px; }

.bubble {
  padding: 23px 25px;
  border: 1px solid var(--line);
  border-radius: 20px 20px 20px 6px;
  background: rgba(255, 255, 255, .92);
  box-shadow: var(--shadow-sm);
  line-height: 1.68;
}
.user .bubble {
  color: #fff;
  border: 0;
  border-radius: 20px 20px 6px 20px;
  background: linear-gradient(145deg, #1b6148, var(--forest));
  box-shadow: 0 12px 30px rgba(21, 84, 62, .18);
  white-space: pre-wrap;
}
.bubble p { margin: 0 0 13px; }
.bubble p:last-child { margin-bottom: 0; }
.bubble ul, .bubble ol { margin: 10px 0 14px; padding-left: 22px; }
.bubble li { margin: 5px 0; }
.bubble strong { color: #103d2d; }
.user .bubble strong { color: inherit; }
.bubble.loading { color: var(--muted); animation: pulse 1.25s infinite; }
@keyframes pulse { 50% { opacity: .54; } }

.answer-core {
  padding-left: 14px;
  border-left: 3px solid var(--gold);
  font-size: 16px;
}
.answer-details {
  margin-top: 17px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--panel-soft);
}
.answer-details summary {
  position: relative;
  padding: 13px 40px 13px 15px;
  color: var(--forest);
  list-style: none;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}
.answer-details summary::-webkit-details-marker { display: none; }
.answer-details summary::after {
  content: "+";
  position: absolute;
  right: 14px;
  top: 8px;
  font-size: 22px;
  font-weight: 400;
}
.answer-details[open] summary::after { content: "−"; }

.inline-contact {
  color: var(--forest);
  font-weight: 800;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.contact-card {
  display: grid;
  grid-template-columns: 44px minmax(130px, .7fr) minmax(180px, 1.3fr);
  gap: 12px;
  align-items: center;
  margin: 12px 0 0;
  padding: 13px 15px;
  border: 1px solid #c9d9cf;
  border-radius: 16px;
  background: linear-gradient(135deg, #f1f7f2, #fff);
}

.contact-card-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  color: #fff;
  border-radius: 13px;
  background: var(--forest);
}

.contact-card small, .service-action small {
  display: block;
  color: var(--muted);
  font: 700 9px/1.4 var(--sans);
  letter-spacing: .08em;
  text-transform: uppercase;
}

.contact-card strong, .service-action strong { display: block; font-size: 13px; }
.contact-links { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 7px; }
.contact-links a {
  padding: 8px 11px;
  color: var(--forest);
  font: 800 12px/1 var(--sans);
  text-decoration: none;
  border: 1px solid #aac2b4;
  border-radius: 999px;
  background: #fff;
}

.service-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.service-action {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 9px;
  align-items: center;
  min-height: 58px;
  padding: 10px 12px;
  color: var(--ink);
  text-decoration: none;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: rgba(255,255,255,.76);
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.service-action > span:first-child {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  color: var(--forest);
  border-radius: 10px;
  background: var(--mint);
}

.service-action.primary {
  color: #fff;
  border-color: var(--forest);
  background: var(--forest);
}

.service-action.primary small { color: #cfe0d6; }
.service-action.primary > span:first-child { color: #fff; background: rgba(255,255,255,.14); }
.service-action:hover { transform: translateY(-2px); border-color: #8eae9b; box-shadow: 0 9px 22px rgba(16,52,40,.09); }
.answer-detail-content { padding: 0 15px 15px; color: #34443c; }

.message-actions, .follow-up-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}
.message-actions { margin-top: 10px; }
.message-actions button, .follow-up-actions button {
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--muted);
  background: rgba(255, 255, 255, .7);
  font-size: 9px;
  font-weight: 700;
}
.message-actions button:hover, .follow-up-actions button:hover {
  color: var(--forest);
  border-color: #a8c3b3;
  background: #fff;
}
.follow-up-actions { margin-top: 2px; }

.sources { display: grid; gap: 8px; margin-top: 7px; }
.sources h4 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 10px 0 3px;
  color: var(--ink);
  font: 650 13px Georgia, serif;
}
.sources h4::before { content: "↗"; color: var(--gold); }
.source-card {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) auto;
  gap: 11px;
  align-items: center;
  min-height: 48px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: inherit;
  background: rgba(255, 255, 255, .75);
  text-decoration: none;
  transition: border-color .16s ease, transform .16s ease;
}
.source-card:hover { border-color: #94b7a3; transform: translateX(2px); }
.source-number {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  color: #a96912;
  background: var(--gold-soft);
  font-size: 11px;
  font-weight: 850;
}
.source-copy { min-width: 0; }
.source-title { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; font-weight: 750; }
.source-host { display: block; margin-top: 2px; color: var(--muted); font-size: 9px; }
.source-type { color: var(--muted); font-size: 8px; text-transform: uppercase; }

.directory-message { max-width: none; width: 100%; }
.directory-note { color: var(--muted); font-size: 11px; }
.directory-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 9px;
  margin-top: 18px;
}
.directory-card {
  display: grid;
  gap: 10px;
  min-height: 100px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 13px;
  color: inherit;
  background: var(--panel-soft);
  text-decoration: none;
  transition: border-color .16s ease, transform .16s ease, box-shadow .16s ease;
}
.directory-card:hover { border-color: #91aa9a; transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.directory-card strong { font: 600 15px/1.25 Georgia, serif; }
.directory-card span { align-self: end; color: var(--forest); font-size: 9px; font-weight: 700; }

.composer {
  position: fixed;
  left: max(28px, calc((100vw - 1340px) / 2 + 28px));
  right: max(28px, calc((100vw - 1340px) / 2 + 28px));
  bottom: 18px;
  z-index: 30;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 50px;
  gap: 8px;
  padding: 9px 9px 7px 16px;
  border: 1px solid rgba(182, 195, 187, .86);
  border-radius: 18px;
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 22px 70px rgba(16, 54, 40, .2);
  backdrop-filter: blur(20px);
}
.composer textarea {
  resize: none;
  min-height: 48px;
  max-height: 180px;
  padding: 13px 0 5px;
  border: 0;
  outline: none;
  color: var(--ink);
  background: transparent;
  font-size: 14px;
}
.composer > button {
  align-self: end;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(145deg, #1b6148, var(--forest));
  box-shadow: 0 8px 20px rgba(21, 84, 62, .24);
  font-size: 21px;
  font-weight: 800;
}
.composer > button:hover { background: var(--forest-deep); }
.composer > button:disabled { opacity: .45; cursor: wait; }
.composer p {
  grid-column: 1 / -1;
  margin: 1px 2px 2px;
  color: #87918c;
  font-size: 8px;
}

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}

@media (forced-colors: active) {
  button, textarea, .bubble, .source-card, .service-action, .contact-card { border: 1px solid ButtonText; }
  .answer-core { border-left: 4px solid Highlight; }
}

@media (max-width: 980px) {
  main { width: 100%; max-width: 820px; padding-inline: 17px; }
  .topbar { top: 0; min-height: 74px; flex-wrap: wrap; }
  .topbar-actions { flex-wrap: wrap; justify-content: flex-end; }
  .welcome { grid-template-columns: 1fr; }
  .welcome-copy { min-height: 390px; }
  .quick-grid { grid-template-columns: repeat(2, 1fr); }
  .quick-grid button.wide { grid-column: auto; min-height: 145px; }
  .composer { left: 17px; right: 17px; }
}

@media (max-width: 640px) {
  body { font-size: 14px; }
  main { width: 100%; max-width: 620px; padding: 0 12px 185px; }
  .topbar { align-items: center; flex-wrap: nowrap; gap: 8px; min-height: 62px; padding: 8px 0; }
  .topbar-brand { flex: 0 0 auto; }
  .topbar-brand small { display: none; }
  .topbar-brand strong { font-size: 15px; }
  .topbar-brand .crest { width: 34px; height: 40px; }
  .topbar-actions { flex-wrap: nowrap; gap: 5px; margin-left: auto; }
  .privacy-badge, .ghost-button {
    width: 42px;
    min-width: 42px;
    min-height: 42px;
    justify-content: center;
    padding: 0;
    border-radius: 13px;
    font-size: 0;
  }
  .privacy-badge span { display: none; }
  .privacy-badge::after, .ghost-button::after {
    content: attr(data-short);
    font-size: 15px;
    font-weight: 850;
    line-height: 1;
  }
  .welcome { padding-top: 20px; gap: 11px; }
  .welcome-copy { min-height: 315px; padding: 34px 24px; border-radius: 22px; }
  .welcome-wappen { right: 10px; bottom: -15px; width: 140px; height: 168px; }
  .welcome h1 { margin-top: 22px; font-size: clamp(40px, 13vw, 58px); }
  .welcome-copy > p { font-size: 14px; }
  .quick-grid { grid-template-columns: 1fr; }
  .quick-grid button, .quick-grid button.wide { min-height: 112px; border-radius: 16px; }
  .quick-grid button > span, .quick-grid button.wide > span { margin-bottom: 15px; }
  .message.user { width: 92%; }
  .bubble { padding: 18px; border-radius: 17px 17px 17px 5px; }
  .answer-core { font-size: 15px; }
  .source-card { grid-template-columns: 29px minmax(0, 1fr); }
  .contact-card { grid-template-columns: 40px 1fr; }
  .contact-links { grid-column: 1 / -1; justify-content: flex-start; }
  .service-actions { grid-template-columns: 1fr; }
  .source-type { display: none; }
  .composer { bottom: 10px; left: 10px; right: 10px; border-radius: 18px; }
}

/* ---------------------------------------------------------------------------
   Bewertungssystem (nur Intranet-Paket). Die Leiste bleibt ohne Freigabe
   ausgeblendet; sichtbar wird sie erst, wenn /api/health das System meldet.
   --------------------------------------------------------------------------- */
.feedback-bar { display: none; }
body.feedback-on .feedback-bar {
  display: block;
  margin-top: 14px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel-soft);
}
.feedback-lead { display: block; font-size: 13px; color: var(--muted); margin-bottom: 8px; }
.feedback-choice { display: flex; gap: 8px; flex-wrap: wrap; }
.feedback-choice button {
  padding: 7px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--panel);
  color: var(--ink);
  font-size: 13px;
}
.feedback-choice button:hover { border-color: var(--forest); }
.feedback-choice button.selected { background: var(--forest); border-color: var(--forest); color: #fff; }
.feedback-detail { margin-top: 12px; display: grid; gap: 10px; }
.feedback-detail fieldset { margin: 0; padding: 0; border: 0; }
.feedback-detail legend { font-size: 13px; color: var(--muted); padding: 0 0 6px; }
.feedback-tags { display: flex; flex-wrap: wrap; gap: 6px 14px; }
.feedback-tags label { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; }
.feedback-field { display: grid; gap: 4px; font-size: 13px; color: var(--muted); }
.feedback-field textarea, .feedback-field input {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--panel);
  color: var(--ink);
  font: inherit;
  resize: vertical;
}
.feedback-note { font-size: 12px; color: var(--muted); margin: 0; }
.feedback-actions { display: flex; gap: 8px; }
.feedback-send {
  padding: 8px 16px; border: 0; border-radius: 999px;
  background: var(--forest); color: #fff; font-size: 13px;
}
.feedback-cancel {
  padding: 8px 16px; border: 1px solid var(--line-strong); border-radius: 999px;
  background: transparent; color: var(--muted); font-size: 13px;
}
.feedback-done { margin: 0; font-size: 13px; color: var(--forest); font-weight: 600; }

/* Auswertungsseite ---------------------------------------------------------- */
.review-intro { padding: 8px 4px 4px; }
.review-intro h1 { margin: 0 0 6px; font-size: 24px; }
.review-intro p { margin: 0; color: var(--muted); max-width: 62ch; }
.kpi-grid {
  display: grid; gap: 12px; margin: 18px 0;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
}
.kpi {
  padding: 14px 16px; border: 1px solid var(--line); border-radius: 14px;
  background: var(--panel); box-shadow: var(--shadow-sm);
}
.kpi span { display: block; font-size: 12px; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.kpi strong { display: block; font-size: 28px; line-height: 1.2; margin: 4px 0 2px; }
.kpi small { color: var(--muted); font-size: 12px; }
.kpi.good strong { color: var(--forest); }
.kpi.warn strong { color: #a86a00; }
.kpi.bad strong { color: var(--danger); }
.review-panel, .review-filters {
  padding: 16px; border: 1px solid var(--line); border-radius: 14px;
  background: var(--panel); margin-bottom: 16px;
}
.review-panel h2 { margin: 0 0 12px; font-size: 16px; }
.tag-chart { display: grid; gap: 8px; }
.tag-row { display: grid; grid-template-columns: 190px 1fr 40px; align-items: center; gap: 10px; font-size: 13px; }
.tag-bar { height: 10px; border-radius: 999px; background: var(--mint); overflow: hidden; }
.tag-bar span { display: block; height: 100%; background: var(--forest); }
.tag-count { text-align: right; color: var(--muted); }
.review-filters { display: flex; flex-wrap: wrap; gap: 16px; align-items: end; }
.review-filters label { display: grid; gap: 4px; font-size: 13px; color: var(--muted); }
.review-filters select {
  padding: 8px 10px; border: 1px solid var(--line-strong); border-radius: 10px;
  background: var(--panel); color: var(--ink); font: inherit;
}
.review-count { margin: 0 0 0 auto; color: var(--muted); font-size: 13px; }
.review-list { display: grid; gap: 12px; }
.review-card {
  padding: 16px; border: 1px solid var(--line); border-left: 4px solid var(--line-strong);
  border-radius: 14px; background: var(--panel);
}
.review-card.rating-richtig { border-left-color: var(--forest); }
.review-card.rating-teilweise { border-left-color: var(--gold); }
.review-card.rating-falsch { border-left-color: var(--danger); }
.review-card header { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 8px; }
.rating-badge {
  padding: 3px 10px; border-radius: 999px; background: var(--mint);
  font-size: 12px; font-weight: 600; text-transform: capitalize;
}
.review-meta { font-size: 12px; color: var(--muted); }
.status-badge {
  margin-left: auto; padding: 3px 10px; border-radius: 999px;
  border: 1px solid var(--line-strong); font-size: 12px; color: var(--muted);
}
.status-badge.status-erledigt { background: var(--mint); color: var(--forest-deep); border-color: var(--mint-strong); }
.review-question { margin: 0 0 8px; }
.review-answer {
  white-space: pre-wrap; word-break: break-word; margin: 8px 0 0;
  padding: 12px; border-radius: 10px; background: var(--panel-soft);
  font-family: inherit; font-size: 13px;
}
.review-sources { display: grid; gap: 4px; margin-top: 8px; font-size: 12px; word-break: break-all; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 0; }
.chip { padding: 3px 10px; border-radius: 999px; background: var(--gold-soft); font-size: 12px; }
.review-comment, .review-correction { margin: 10px 0 0; font-size: 14px; }
.review-correction { padding: 10px 12px; border-radius: 10px; background: var(--mint); }
.review-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.review-actions button {
  padding: 6px 12px; border: 1px solid var(--line-strong); border-radius: 999px;
  background: var(--panel); font-size: 12px; color: var(--ink);
}
.review-actions button[disabled] { opacity: .45; cursor: default; }
.review-empty { color: var(--muted); margin: 0; }
.review-note { margin: 20px 0 40px; font-size: 12px; color: var(--muted); max-width: 80ch; }
.review-body .shell { max-width: 1080px; }
@media (max-width: 640px) {
  .tag-row { grid-template-columns: 120px 1fr 34px; }
  .review-count { margin-left: 0; }
}

/* Daumen-Bewertung im Chatfenster */
.feedback-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
body.feedback-on .feedback-bar .feedback-lead { margin: 0; }
.feedback-choice button.thumb {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 16px; border: 1px solid var(--line-strong); border-radius: 999px;
  background: var(--panel); color: var(--ink); font-size: 13px;
}
.thumb-icon { font-size: 17px; line-height: 1; }
.feedback-choice button.thumb:hover:not([disabled]) { border-color: var(--forest); background: var(--mint); }
.feedback-choice button.thumb[disabled] { opacity: .55; cursor: default; }
.feedback-choice button.thumb.selected {
  background: var(--forest); border-color: var(--forest); color: #fff; opacity: 1;
}
.feedback-choice button.thumb.selected[data-rating="falsch"] {
  background: var(--danger); border-color: var(--danger);
}

/* ----------------------------------------------------------------------------
   Kennzeichnung als KI-System (Artikel 50 KI-Verordnung)

   Zwei Stellen, beide dauerhaft sichtbar und ohne Klick erreichbar:
   .ki-marke    kleine Marke neben dem Namen in der Kopfzeile
   .ki-hinweis  Absatz im Begruessungsbereich, VOR der ersten Frage

   Bewusst zurueckhaltend gestaltet: Der Hinweis soll gelesen, nicht weggeklickt
   werden. Ein greller Kasten wird als Werbung wahrgenommen und uebersehen.
---------------------------------------------------------------------------- */
.ki-marke {
  display: inline-block;
  margin-left: 7px;
  padding: 1px 6px 2px;
  border-radius: 4px;
  background: var(--forest);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .08em;
  vertical-align: 2px;
}

.ki-hinweis {
  margin-top: 14px;
  padding: 12px 14px;
  border-left: 3px solid var(--forest);
  border-radius: 0 6px 6px 0;
  background: var(--panel-soft);
  color: var(--ink);
  font-size: 13.5px;
  line-height: 1.55;
  max-width: 46em;
}

.ki-hinweis strong { color: var(--forest-deep); }

/* Im Eingabebereich steht der Hinweis noch einmal knapp — dort, wo die Frage
   tatsaechlich abgeschickt wird. */
#privacy-hint strong { color: var(--forest-deep); }

@media (max-width: 640px) {
  .ki-hinweis { font-size: 13px; padding: 11px 12px; }
}