/* FILE:
   /var/www/apps/wostehtdas/public/wostehtdas_v3.css */

@font-face { font-family: 'Inter'; font-style: normal; font-weight: 400; font-display: swap; src: url('./fonts/Inter_18pt-Regular.ttf') format('truetype'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 500; font-display: swap; src: url('./fonts/Inter_18pt-Medium.ttf') format('truetype'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 600; font-display: swap; src: url('./fonts/Inter_18pt-SemiBold.ttf') format('truetype'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 700; font-display: swap; src: url('./fonts/Inter_18pt-Bold.ttf') format('truetype'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 800; font-display: swap; src: url('./fonts/Inter_18pt-ExtraBold.ttf') format('truetype'); }
@font-face { font-family: 'Material Symbols Outlined'; font-style: normal; font-weight: 400; font-display: block; src: url('./fonts/material-symbols-outlined-latin-400-normal.woff2') format('woff2'); }

@property --border-angle {
  syntax: '<angle>';
  initial-value: 250deg;
  inherits: false;
}

:root {
  --bg: #f5f5f6;
  --surface-solid: #ffffff;
  --surface-muted: rgba(255, 255, 255, 0.42);
  --box: rgba(20, 22, 24, 0.055);
  --box-soft: rgba(20, 22, 24, 0.028);

  --line: rgba(20, 22, 24, 0.11);
  --line-soft: rgba(20, 22, 24, 0.065);
  --chip-border: rgba(20, 22, 24, 0.13);

  --text: #1f2326;
  --text-muted: #666c72;
  --text-faint: #989ea4;

  --ink: #151719;
  --ink-contrast: #fafafa;

  --accent: #3d6b54;
  --accent-strong: #274a39;
  --accent-soft: rgba(61, 107, 84, 0.09);
  --accent-softer: rgba(61, 107, 84, 0.05);
  --warn: #c43d3d;

  --radius-md: 8px;
  --radius-sm: 6px;
  --radius-xs: 3px;

  --shadow-inset: rgba(20, 22, 24, 0.10);
  --shadow-card: 0 2px 4px rgba(20, 22, 24, 0.045), 0 10px 26px -6px rgba(20, 22, 24, 0.085);
  --shadow-elevated: 0 2px 6px rgba(20, 22, 24, 0.05), 0 12px 28px -10px rgba(20, 22, 24, 0.09);
  --shadow-focus: 0 0 0 3px rgba(61, 107, 84, 0.14), 0 10px 26px -6px rgba(20, 22, 24, 0.10);

  --loader-c1: rgba(61, 107, 84, 0.20);
  --loader-c2: #3d6b54;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html {
  height: 100%;
  font-size: 112%;
  scroll-padding-top: env(safe-area-inset-top, 0px);
  background-color: var(--bg);
}

body {
  position: relative;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: transparent;
  color: var(--text);
  min-height: 100%;
  display: flex;
  flex-direction: column;
  padding: calc(40px + env(safe-area-inset-top, 0px)) 20px calc(24px + env(safe-area-inset-bottom, 0px));
  max-width: 960px;
  margin: 0 auto;
  -webkit-font-smoothing: antialiased;
}

.bg-watermark {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  z-index: -1;
  overflow: hidden;
  color: var(--accent);
  opacity: 0.045;
}
.bg-watermark svg {
  width: min(82vw, 680px);
  height: auto;
  transform: rotate(-4deg) translateY(-24%);
  filter: blur(3px);
}

.main-content { flex: 1 0 auto; width: 100%; }

.material-symbols-outlined {
  font-family: 'Material Symbols Outlined';
  font-weight: normal;
  font-style: normal;
  font-size: 1rem;
  line-height: 1;
  width: 1em;
  height: 1em;
  overflow: hidden;
  flex-shrink: 0;
  letter-spacing: normal;
  text-transform: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  word-wrap: normal;
  direction: ltr;
  font-feature-settings: 'liga';
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

header {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  user-select: none;
  transition: opacity .18s ease, transform .18s ease;
}
header:hover { opacity: 0.86; }

.brand-row { display: inline-flex; align-items: center; gap: 10px; }

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-md);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--line-soft);
  color: var(--accent);
}

h1 { font-size: 1.46rem; font-weight: 800; letter-spacing: -0.02em; color: var(--ink); }
.brand-tagline {
  font-size: .77rem;
  line-height: 1.2;
  text-align: right;
  width: fit-content;
  margin: 5px auto 0;
  color: #666c72;
  letter-spacing: 0.01em;
  user-select: none;
  cursor: default;
  transform: translate(3px, -5px); /* ggf. X-Wert feinjustieren */
}

.search-wrap {
  width: 100%;
  max-width: 660px;
  margin: 34px auto 0;
  display: flex;
  flex-direction: column;
  container-type: inline-size;
  transition: margin .25s ease;
}

.modusAuswahlBox {
  display: inline-flex;
  align-self: center;
  gap: 3px;
  padding: 3px;
  margin: 0 auto 14px;
  border-radius: var(--radius-md);
  background: var(--box);
  border: 1px solid var(--line-soft);
  box-shadow: inset 0 0px 5px 2px var(--shadow-inset);
  max-height: 46px;
  overflow: hidden;
  transition: opacity .18s ease, max-height .25s ease, margin .25s ease, padding .25s ease, border-width .25s ease, transform .2s ease;
}

.modusAuswahlButton { position: relative; cursor: pointer; }
.modusAuswahlButton input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.modusAuswahlButton .face {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  padding: 5px 13px;
  border-radius: var(--radius-sm);
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-muted);
  font-size: .75rem;
  font-weight: 500;
  transition: background .18s ease, color .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.modusAuswahlButton:hover .face { color: var(--ink); }
.modusAuswahlButton input:checked + .face {
  background: var(--surface-solid);
  border-color: rgba(20, 22, 24, 0.14);
  color: var(--ink);
  font-weight: 600;
  box-shadow: 0 2px 6px rgba(20, 22, 24, 0.08);
}
.modusAuswahlButton input:checked + .face .material-symbols-outlined,
.modusAuswahlButton input:checked + .face span:first-child { color: var(--accent); }
.modusAuswahlButton input:focus-visible + .face { outline: 2px solid var(--accent); outline-offset: 1px; }
.modusAuswahlButton input:disabled + .face { cursor: not-allowed; opacity: 0.6; }

.eingabeBereich {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 48px; /* vorher: 68px */
  padding: 8px 11px 8px 15px;
  border: 1px solid rgba(20, 22, 24, 0.14);
  border-radius: var(--radius-md);
  background: var(--surface-solid);
  box-shadow: var(--shadow-card);
  transition: border-color .2s ease, box-shadow .2s ease, border-radius .25s ease, background .2s ease;
}
.eingabeBereich::before {
  content: '';
  position: absolute;
  inset: -1.5px;
  border-radius: inherit;
  padding: 2px;
  background: conic-gradient(
    from var(--border-angle),
    transparent 0deg,
    rgba(210, 215, 220, 0.45) 18deg,
    rgba(255, 255, 255, 0.98) 40deg,
    rgba(210, 215, 220, 0.45) 62deg,
    transparent 80deg
  );
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask-composite: exclude;
  filter: drop-shadow(0 0 3px rgba(255, 255, 255, 0.9));
  pointer-events: none;
  z-index: 3;
  opacity: 0;
  animation: borderShineOnce 3.8s ease-in-out 0.35s 1 forwards;
}
@keyframes borderShineOnce {
  0%   { --border-angle: 250deg; opacity: 0; }
  15%  { --border-angle: 250deg; opacity: 1; }
  85%  { --border-angle: 610deg; opacity: 1; }
  100% { --border-angle: 610deg; opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .eingabeBereich::before { animation: none; display: none; }
}
.eingabeBereich:focus-within {
  background: var(--surface-solid);
  border-color: rgba(61, 107, 84, 0.48);
  box-shadow: var(--shadow-focus);
}

.eingabe-icon {
  flex-shrink: 0;
  font-size: 30px;
  color: var(--accent);
  opacity: 0.88;
}

.eingabe-logo { flex-shrink: 0; opacity: 0.94; }

.eingabeBereich textarea {
  flex: 1;
  min-width: 0;
  border: none;
  outline: none;
  box-shadow: none;
  background: transparent;
  resize: none;
  overflow: hidden;
  min-height: 30px;
  height: 30px;
  padding: 4px 0;

  margin: 0;
  font: inherit;
  font-size: .88rem;
  line-height: 22px;
  color: var(--ink);
}
.eingabeBereich textarea::placeholder { color: var(--text-faint); }
.eingabeBereich textarea:disabled { cursor: not-allowed; opacity: 0.72; }


.send-icon-btn {
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  border: none;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--ink);
  color: var(--ink-contrast);
  cursor: pointer;
  transition: background .16s ease, transform .14s ease, opacity .16s ease;
}
.send-icon-btn:hover { background: var(--accent); transform: translateY(-1px); }
.send-icon-btn:active { transform: translateY(0); }
.send-icon-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.send-icon-btn:disabled { opacity: 0.4; cursor: not-allowed; transform: none; }

.longButton.statusleiste {
  position: relative;
  z-index: 1;
  display: none;
  align-items: center;
  justify-content: center;
  align-self: center;
  margin: 10px 0 0;
  padding: 4px 10px;
  text-align: center;
  font-size: .76rem;
  font-weight: 400;
  font-family: inherit;
  color: var(--text-muted);
  background: transparent;
  border: none;
  border-radius: var(--radius-sm);
  cursor: default;
  box-shadow: none;
  transition: color .18s ease, opacity .18s ease, max-height .25s ease, padding .25s ease, margin .25s ease;
  max-height: 120px;
  overflow: hidden;
}

.busy { display: none; align-items: center; justify-content: center; flex-wrap: wrap; gap: 6px; }
.longButton.statusleiste.loading {
  display: inline-flex;
  color: var(--accent-strong);
}
.longButton.statusleiste.warning {
  display: inline-flex;
  color: var(--warn);
}
.longButton.statusleiste.loading .warn { display: none; }
.longButton.statusleiste.loading .busy,
.longButton.statusleiste.warning .warn { display: inline-flex; }

.search-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: .75rem;
  font-weight: 500;
  line-height: 1.3;
  background: var(--box-soft);
  border: 1px solid var(--line-soft);
  color: var(--text-muted);
  transition: filter 0.25s ease, opacity 0.25s ease, background 0.25s ease, border-color 0.25s ease, color 0.25s ease;
}
.search-tag.is-blurred {
  min-width: 66px;
  filter: blur(1px);
  opacity: 0.55;
  color: var(--text-faint);
  user-select: none;
  animation: tagPulse 1.3s ease-in-out infinite;
}
.search-tag.is-revealed {
  filter: blur(0);
  opacity: 1;
  background: var(--surface-muted);
  border-color: var(--line);
  color: var(--ink);
}
@keyframes tagPulse { 0%, 100% { opacity: 0.45; } 50% { opacity: 0.72; } }

.warn { display: none; align-items: center; justify-content: center; gap: 6px; color: var(--warn); font-weight: 500; }
.warn-icon { color: var(--warn); font-size: 1rem; flex-shrink: 0; }

.spin, .einzelquelle_box-ghost-icon {
  width: 13px;
  height: 13px;
  border: 2px solid rgba(61, 107, 84, 0.22);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin .8s linear infinite;
  flex-shrink: 0;
}
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spin { animation-duration: 2.4s; } }

.search-wrap.collapsed .modusAuswahlBox {
  max-height: 0;
  opacity: 0;
  pointer-events: none;
  margin-bottom: 0;
  padding-top: 0;
  padding-bottom: 0;
  border-width: 0;
  transform: translateY(-4px);
}
.search-wrap.collapsed .longButton.statusleiste {
  max-height: 0;
  opacity: 0;
  pointer-events: none;
  padding-top: 0;
  padding-bottom: 0;
  margin-top: 0;
}
.search-wrap.collapsed .eingabeBereich { border-radius: var(--radius-md); padding: 8px 8px 8px 12px; }

.news-bereich {
  width: 100%;
  max-width: 660px;
  margin: 20px auto 0;
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.news-lead { text-align: center; font-size: .78rem; line-height: 1.56; color: var(--text-muted); padding: 0 12px; }
.news-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.news-grid[hidden] { display: none; }

.news-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: .76rem;
  line-height: 1.4;
  color: var(--text-muted);
  padding: 9px 11px;
  border-radius: var(--radius-md);
  background: var(--surface-muted);
  /* border: 1px solid var(--line-soft); */
  transition: background .18s ease, border-color .18s ease, color .18s ease;
}
.news-item-featured { grid-column: 1 / -1; }
.news-item-link { text-decoration: none; cursor: pointer; }
.news-item-link:hover { background: rgba(255, 255, 255, 0.82); border-color: var(--line); color: var(--ink); }
.news-item-link:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.news-more-btn {
  width: min(100%, 14.9rem);
  align-self: center;
    justify-content: center;
    font-family: inherit;
    border: 1px solid #e2e2e2;
    height: 40px;
}

.news-more-btn .news-text {
  flex: 0 0 auto;
}

.news-more-icon {
  width: 26px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  color: #000000;
  flex-shrink: 0;
}

.news-icon-badge {
  width: 26px;
  height: 26px;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(61, 107, 84, 0.075);
  color: var(--accent);
  opacity: 0.88;
  flex-shrink: 0;
  transition: background .18s ease, color .18s ease, opacity .18s ease;
}
.news-item-link:hover .news-icon-badge { background: var(--accent-soft); opacity: 1; }
.news-icon { font-size: .95rem; }

.news-text { flex: 1; min-width: 0; font-weight: 500; color: var(--text-muted); transition: color .18s ease; }
.news-item-link:hover .news-text { color: var(--ink); }

.news-arrow {
  flex-shrink: 0;
  color: var(--text-faint);
  opacity: 0.75;
  transition: transform .18s ease, color .18s ease, opacity .18s ease;
}
.news-item-link:hover .news-arrow { color: var(--accent); opacity: 1; transform: translate(2px, -2px); }

/* Nachfragen */
.followup-suggestions {
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  animation: fadeIn .24s ease-out;
}
.followup-item {
  width: 100%;
  font-family: inherit;
  text-align: left;
  background: var(--surface-solid);
  border-color: var(--line);
}
.followup-item.is-selected {
  cursor: default;
  pointer-events: none;
  background: var(--accent-softer);
  /* border-color: rgba(61, 107, 84, 0.25); */
  border: none,
}
.followup-item.is-selected .news-text {
  color: var(--ink);
  font-weight: 600;
}
.followup-item.is-selected .news-icon-badge {
  background: var(--accent-soft);
  opacity: 1;
}
.followup-result {
  margin-top: 16px;
  animation: fadeIn .28s ease-out;
}

@media (max-width: 600px) {
  body { padding: calc(24px + env(safe-area-inset-top, 0px)) 12px calc(18px + env(safe-area-inset-bottom, 0px)); }
  .search-wrap { margin-top: 26px; }
  .news-bereich { margin-top: 18px; gap: 14px; }
  .news-grid { grid-template-columns: 1fr; }
  .eingabeBereich {
    min-height: 68px;
  }
.eingabeBereich textarea {
    height: auto;
    min-height: 0;
    padding: 0;
    field-sizing: content;
  }
  .bg-watermark {
    align-items: flex-start;
    padding-top: clamp(65px, 12vh, 130px);
  }
  .bg-watermark svg {
    width: min(94vw, 460px);
      transform: translateY(-4%);
  }
}

.result { width: 100%; max-width: 780px; margin: 22px auto 0; animation: fadeIn .28s ease-out; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }

.section-label {
  font-size: .68rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 27px 0px 6px 2px;
  user-select: none;
}
.quellen-label { margin-top: 16px; }
.result:has(> #quellenbox[style*="display:none"]) > .quellen-label,
.result:has(> #quellenbox[style*="display: none"]) > .quellen-label,
.followup-result:has(> #followup-quellenbox[style*="display:none"]) > .quellen-label,
.followup-result:has(> #followup-quellenbox[style*="display: none"]) > .quellen-label { display: none; }

.antwortBox {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface-solid);
  box-shadow: var(--shadow-elevated);
  overflow: hidden;
  transition: min-height 0.34s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.25s ease;
}

.antwortContainer {
  padding: 16px 18px;
  background: transparent;
  font-size: .88rem;
  line-height: 1.66;
  color: var(--text);
  text-align: justify;
  hyphens: auto;
  text-wrap: pretty;
  transition: filter 0.32s ease, opacity 0.32s ease;
}
.antwortBox:has(> .answer-actions:not([hidden])) .antwortContainer {
  padding-bottom: 12px;
}
.antwortContainer p { margin-bottom: 11px; }
.antwortContainer p:last-child { margin-bottom: 0; }
.antwortContainer b, .antwortContainer strong { font-weight: 600; color: var(--ink); }

/* Aktionsleiste unterhalb der Antwort */
.answer-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 0 18px;
  padding: 7px 0 9px;
  border-top: 1px solid var(--line-soft);
  transition: opacity 0.2s ease;
}
.answer-actions[hidden] {
  display: none;
}
.answer-actions-left {
  display: inline-flex;
  align-items: center;
  min-width: 0;
}
.answer-actions-right {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
  flex-shrink: 0;
}
.answer-judge-spinner {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
}
.answer-judge-spinner[hidden] {
  display: none;
}
.answer-judge-spinner .spin {
  width: 12px;
  height: 12px;
  border-color: rgba(20, 22, 24, 0.14);
  border-top-color: var(--text-muted);
}
.answer-retry-rspr-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 28px;
  padding: 0 8px;
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  font: inherit;
  font-size: .73rem;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  transition: color .16s ease, background-color .16s ease;
  -webkit-tap-highlight-color: transparent;
  white-space: nowrap;
}
.answer-retry-rspr-btn[hidden] {
  display: none;
}
.answer-retry-rspr-btn .material-symbols-outlined {
  font-size: .9rem;
  color: var(--text-faint);
  transition: color .16s ease;
}
.answer-retry-rspr-btn:hover {
  color: var(--ink);
  background: var(--box-soft);
}
.answer-retry-rspr-btn:hover .material-symbols-outlined {
  color: var(--accent);
}
.answer-retry-rspr-btn:active {
  background: var(--box);
}
.answer-retry-rspr-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}
.answer-retry-rspr-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.antwortBox.is-revising .answer-actions,
.antwortBox.is-swapping .answer-actions {
  opacity: 0;
  pointer-events: none;
}
.answer-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-faint);
  cursor: pointer;
  transition: color .16s ease, background-color .16s ease;
  -webkit-tap-highlight-color: transparent;
}
.answer-action-btn .material-symbols-outlined {
  font-size: 1.04rem;
}
.answer-action-btn:hover {
  color: var(--text-muted);
  background: var(--box-soft);
}
.answer-action-btn:active {
  color: var(--ink);
  background: var(--box);
}
.answer-action-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}
.answer-action-btn:disabled {
  opacity: 0.45;
  cursor: wait;
}

/* Einschub von unten (Toast für Zwischenablage & PDF) */
.bottom-toast {
  position: fixed;
  left: 50%;
  bottom: calc(20px + env(safe-area-inset-bottom, 0px));
  z-index: 90;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  max-width: calc(100vw - 32px);
  padding: 9px 15px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-elevated);
  font-size: .79rem;
  font-weight: 500;
  color: var(--ink);
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, calc(100% + 28px));
  transition: transform .26s cubic-bezier(0.22, 1, 0.36, 1), opacity .22s ease;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.bottom-toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.antwortBox.is-revising {
  min-height: 112px;
}
.antwortBox.is-revising .antwortContainer {
  filter: blur(2px);
  opacity: 0.48;
  user-select: none;
  pointer-events: none;
}

.revision-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 18px 16px 14px;
  background: transparent;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.28s ease, visibility 0.28s ease;
}
.antwortBox.is-revising .revision-overlay {
  opacity: 1;
  visibility: visible;
}

.revision-badge {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  max-width: min(94%, 430px);
  padding: 10px 15px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(61, 107, 84, 0.24);
  box-shadow: 0 4px 18px -4px rgba(20, 22, 24, 0.11);
  transform: translateY(-4px);
  transition: transform 0.28s ease;
}
.antwortBox.is-revising .revision-badge {
  transform: translateY(0);
}

.revision-spin {
  width: 15px;
  height: 15px;
}
.revision-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  text-align: left;
}
.revision-title {
  font-size: .8rem;
  font-weight: 600;
  color: var(--accent-strong);
  line-height: 1.3;
}
.revision-sub {
  font-size: .73rem;
  font-weight: 400;
  color: var(--text-muted);
  line-height: 1.35;
}

.antwortBox.is-swapping .antwortContainer,
.antwortBox.is-swapping .revision-overlay {
  opacity: 0;
  transition: opacity 0.16s ease;
}

.sentence-reveal {
  display: inline;
  transition: filter 0.24s ease-out, opacity 0.24s ease-out;
  will-change: filter, opacity;
}
.sentence-reveal.is-blurred { filter: blur(5px); opacity: 0.35; }
.sentence-reveal.is-visible { filter: blur(0); opacity: 1; }

@media (max-width: 600px) {
  .antwortContainer { padding: 14px 13px; }
  .answer-actions { margin: 0 13px; padding: 6px 0 8px; }
  .answer-retry-rspr-btn { font-size: .71rem; padding: 0 6px; }
  .revision-badge { padding: 9px 12px; gap: 9px; }
}

.answer-loading { display: flex; align-items: center; justify-content: center; padding: 6px 0; min-height: 44px; }

.loader {
  --size: 1px;
  width: calc(6 * var(--size));
  height: calc(6 * var(--size));
  border-radius: 50%;
  display: block;
  margin: calc(20 * var(--size)) auto;
  position: relative;
  background: transparent;
  box-shadow: calc(-28 * var(--size)) 0 var(--loader-c1), calc(-14 * var(--size)) 0 var(--loader-c1), 0 0 var(--loader-c1), calc(14 * var(--size)) 0 var(--loader-c1), calc(28 * var(--size)) 0 var(--loader-c1);
  animation: dotChase 1.5s linear infinite;
}

@keyframes dotChase {
  0%   { box-shadow: calc(-28 * var(--size)) 0 var(--loader-c2), calc(-14 * var(--size)) 0 var(--loader-c1), 0 0 var(--loader-c1), calc(14 * var(--size)) 0 var(--loader-c1), calc(28 * var(--size)) 0 var(--loader-c1); }
  25%  { box-shadow: calc(-28 * var(--size)) 0 var(--loader-c1), calc(-14 * var(--size)) 0 var(--loader-c2), 0 0 var(--loader-c1), calc(14 * var(--size)) 0 var(--loader-c1), calc(28 * var(--size)) 0 var(--loader-c1); }
  50%  { box-shadow: calc(-28 * var(--size)) 0 var(--loader-c1), calc(-14 * var(--size)) 0 var(--loader-c1), 0 0 var(--loader-c2), calc(14 * var(--size)) 0 var(--loader-c1), calc(28 * var(--size)) 0 var(--loader-c1); }
  75%  { box-shadow: calc(-28 * var(--size)) 0 var(--loader-c1), calc(-14 * var(--size)) 0 var(--loader-c1), 0 0 var(--loader-c1), calc(14 * var(--size)) 0 var(--loader-c2), calc(28 * var(--size)) 0 var(--loader-c1); }
  100% { box-shadow: calc(-28 * var(--size)) 0 var(--loader-c1), calc(-14 * var(--size)) 0 var(--loader-c1), 0 0 var(--loader-c1), calc(14 * var(--size)) 0 var(--loader-c1), calc(28 * var(--size)) 0 var(--loader-c2); }
}

.quellenbox {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 8px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.72);
}

.quellen-divider { flex-basis: 100%; width: 100%; height: 1px; background: var(--line-soft); margin: 3px 0; }

.einzelquelle_box {
  flex: 1 1 220px;
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  background: var(--surface-solid);
  border: 1px solid var(--line);
  font-size: .77rem;
  line-height: 1.32;
  color: var(--text);
  text-decoration: none;
  cursor: pointer;
  user-select: none;
  transition: background .16s ease, border-color .16s ease, transform .16s ease, box-shadow .16s ease;
}
.einzelquelle_box:hover {
  background: #ffffff;
  border-color: rgba(61, 107, 84, 0.35);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px -4px rgba(20, 22, 24, 0.08);
}
.einzelquelle_box:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.quelle-badge {
  width: 22px;
  height: 22px;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 700;
  font-size: .68rem;
  flex-shrink: 0;
}
.quelle-badge .material-symbols-outlined { font-size: .92rem; color: var(--accent); }
.quelle-badge.quelle-badge-entscheidung { background: var(--box); color: var(--text-muted); }
.quelle-badge.quelle-badge-entscheidung .material-symbols-outlined { color: var(--text-muted); }
.einzelquelle_box > span:last-child { flex: 1; min-width: 0; text-align: left; font-weight: 500; color: var(--ink); }
.quelle-sub { color: var(--text-muted); font-weight: 400; }

.einzelquelle_box-ghost {
  flex: 1 1 220px;
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  height: 34px;
  padding: 5px 9px;
  border-radius: var(--radius-sm);
  background: var(--box-soft);
  border: 1px solid var(--line-soft);
}
.einzelquelle_box-ghost-icon { border-color: rgba(61, 107, 84, 0.2); border-top-color: var(--accent); }
.einzelquelle_box-ghost-bar {
  flex: 1;
  height: 8px;
  border-radius: var(--radius-xs);
  max-width: 72%;
  background: linear-gradient(90deg, rgba(20, 22, 24, 0.06) 25%, rgba(20, 22, 24, 0.11) 50%, rgba(20, 22, 24, 0.06) 75%);
  background-size: 200% 100%;
  animation: ghostShimmer 1.4s ease-in-out infinite;
}
.einzelquelle_box-ghost:nth-child(2) .einzelquelle_box-ghost-bar { max-width: 56%; animation-delay: .2s; }
.einzelquelle_box-ghost:nth-child(3) .einzelquelle_box-ghost-bar { max-width: 66%; animation-delay: .4s; }

@keyframes ghostShimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

.answer-intro { margin-bottom: 12px; font-size: .88rem; line-height: 1.64; color: var(--text); }
.decisions-list { display: flex; flex-direction: column; gap: 9px; }
.decision-card {
  background: var(--box-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 11px 13px;
  transition: background .16s ease, border-color .16s ease, box-shadow .16s ease;
}
.decision-card:hover {
  background: #ffffff;
  border-color: rgba(61, 107, 84, 0.25);
  box-shadow: 0 4px 14px -6px rgba(20, 22, 24, 0.08);
}
.decision-header { display: flex; gap: 8px; margin-bottom: 6px; }
.decision-icon-badge {
  width: 24px;
  height: 24px;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-soft);
  flex-shrink: 0;
}
.decision-icon { font-size: .92rem; color: var(--accent); }
.decision-title {
  font-size: .83rem;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.01em;
  text-decoration: underline;
  text-decoration-color: rgba(61, 107, 84, 0.35);
  text-underline-offset: 4px;
  cursor: pointer;
  transition: color .15s ease, text-decoration-color .15s ease;
}
.decision-title:hover { color: var(--accent-strong); text-decoration-color: var(--accent); }
.decision-title:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: var(--radius-xs); }
.decision-body {
  font-size: .81rem;
  line-height: 1.58;
  color: var(--text);
  padding-left: 32px;
  text-align: justify;
  hyphens: auto;
  text-wrap: pretty;
}

.legal-wrap { width: 100%; max-width: 680px; margin: 20px auto 0; animation: fadeIn .25s ease-out; }
.legal-back {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 10px;
  font-size: .78rem;
  color: var(--text-muted);
  text-decoration: none;
  transition: color .15s ease;
}
.legal-back:hover { color: var(--accent-strong); }
.legal-content h2 { font-size: 1.05rem; font-weight: 700; color: var(--ink); margin-bottom: 12px; }
.legal-content h3 { font-size: .86rem; font-weight: 600; color: var(--ink); margin: 14px 0 6px; }
.legal-content h4 { font-size: .82rem; font-weight: 600; color: var(--ink); margin: 12px 0 6px; }
.legal-content p { font-size: .82rem; line-height: 1.62; margin-bottom: 10px; }
.legal-content ul { font-size: .82rem; line-height: 1.62; margin: 0 0 10px; padding-left: 22px; }
.legal-content li { margin-bottom: 4px; }
.legal-table-wrap { width: 100%; overflow-x: auto; margin-bottom: 10px; }
.legal-content table { width: 100%; min-width: 540px; border-collapse: collapse; font-size: .78rem; line-height: 1.5; }
.legal-content th, .legal-content td { padding: 7px; border: 1px solid var(--chip-border); text-align: left; vertical-align: top; }
.legal-content th { font-weight: 600; color: var(--ink); }
.legal-meta { text-align: right; font-size: .74rem; color: var(--text-muted); margin-top: 12px; margin-bottom: 0; }

.contact-form { display: flex; flex-direction: column; gap: 12px; }
.form-group { display: flex; flex-direction: column; gap: 5px; }
.form-group label { font-size: .78rem; font-weight: 500; color: var(--text); }
.form-input, .form-textarea {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--chip-border);
  border-radius: var(--radius-sm);
  background: var(--surface-solid);
  color: var(--text);
  font: inherit;
  font-size: .84rem;
  line-height: 1.5;
  outline: none;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.form-input:focus, .form-textarea:focus { border-color: var(--accent); box-shadow: var(--shadow-focus); }
.form-textarea { resize: vertical; min-height: 110px; }
.form-submit {
  align-self: flex-start;
  padding: 8px 15px;
  border: none;
  border-radius: var(--radius-sm);
  background: var(--ink);
  color: var(--ink-contrast);
  font: inherit;
  font-size: .8rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity .15s ease, background .15s ease;
}
.form-submit:hover { background: var(--accent); }
.form-notice {
  display: none;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  background: var(--accent-soft);
  border: 1px solid var(--chip-border);
  color: var(--accent-strong);
  font-size: .78rem;
  line-height: 1.5;
}
.form-notice.visible { display: block; }

.app-footer { flex-shrink: 0; margin-top: auto; padding: 40px 0 6px; text-align: center; }
.footer-links {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  font-size: .74rem;
  color: var(--text-muted);
}
.footer-links a { color: var(--text-muted); text-decoration: none; transition: color .15s ease; }
.footer-links a:hover, .footer-links a[aria-current="page"] { color: var(--accent); }
.footer-sep { opacity: 0.35; user-select: none; }

@keyframes glanz { 0% { background-position: -200% center; } 100% { background-position: 300% center; } }
@keyframes flashAccentToStrong {
  0%, 15% { color: var(--accent); text-decoration-color: var(--accent); }
  100%    { color: var(--accent-strong); text-decoration-color: var(--accent-strong); }
}

.hidden-link {
  color: inherit;
  cursor: pointer;
  border-radius: var(--radius-xs);
  padding: 1px 0;
  transition: color 0.35s ease, text-decoration-color 0.35s ease, background-color 0.16s ease;
  text-decoration: underline dotted transparent;
  background-size: 200% auto;
}
.hidden-link:hover { background-color: var(--accent-soft); }

.hidden-link.hidden-link-aktiv {
  color: var(--accent);
  text-decoration: underline dotted var(--accent);
  background-image: linear-gradient(135deg, transparent 0%, var(--accent-soft) 60%, transparent 100%);
  background-size: 200% auto;
  animation: flashAccentToStrong 0.8s ease-out forwards, glanz 0.7s ease-out forwards;
}

.hidden-link.link-fertig {
  background-image: none !important;
  color: var(--accent-strong);
  background-color: var(--accent-softer);
  text-decoration: underline dotted rgba(39, 74, 57, 0.45);
  text-underline-offset: 3px;
}
.hidden-link.link-fertig:hover {
  background-color: var(--accent-soft);
  text-decoration-color: var(--accent-strong);
}
.brand-tld {
  font-weight: 500;
  color: var(--accent);
}