/* MRVN Web-App – iPhone zuerst, ab 900 px Desktop mit Seitenleiste. Dunkel als Standard, hell umschaltbar. */
/* Marke MRVN (ventureforge/branding.py): Graphit/Carbon dunkel (Standard), Off-White/Weiß hell, Stahlgrau für
   Sekundärtext, EIN Akzent Elektroblau – sparsam. Textfarben auf WCAG AA geprüft. Umschaltbar über data-theme. */
:root {
  --bg: #16181D;            /* Graphit */
  --bg-2: #1A1C22;
  --card: #1F2228;          /* Carbon */
  --card-2: #2A2E36;        /* Slate */
  --fill: rgba(213, 216, 221, 0.08);
  --fill-2: rgba(213, 216, 221, 0.16);
  --label: #F4F4F2;
  --label-2: #9BA0A8;
  --label-3: #8A8F98;       /* Stahl */
  --sep: rgba(213, 216, 221, 0.10);
  --accent: #6F97FF;        /* Elektroblau als Text (AA auf Carbon) */
  --accent-fill: #3767F0;   /* Primärbutton (AA mit Weiß) */
  --accent-press: #2C58D6;
  --accent-ink: #FFFFFF;
  --accent-soft: rgba(76, 125, 255, 0.14);
  --highlight: #4C7DFF;     /* Markenblau für Licht, Fortschritt, Übergabe */
  --highlight-soft: rgba(76, 125, 255, 0.22);
  --success: #5BBE93;
  --success-fill: #3FA37A;
  --success-soft: rgba(63, 163, 122, 0.16);
  --warning: #E2B45C;
  --warning-fill: #D9A441;
  --warning-soft: rgba(217, 164, 65, 0.16);
  --danger: #E7807C;
  --danger-fill: #D9534F;
  --danger-soft: rgba(217, 83, 79, 0.16);
  --chrome: rgba(22, 24, 29, 0.82);
  --shadow: 0 0 0 1px rgba(213, 216, 221, 0.06);
  --shadow-lift: 0 0 0 1px rgba(213, 216, 221, 0.12), 0 12px 32px rgba(0, 0, 0, 0.35);
  --skeleton: rgba(213, 216, 221, 0.08);
  --bot-head: #474D58;
  --bot-visor: #0E1013;
  color-scheme: dark;
  --radius: 16px;
  --radius-sm: 10px;
  --tabbar-h: 52px;
  --sidebar-w: 256px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", "Segoe UI Variable Text", "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  --font-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Inter", "Segoe UI Variable Display", "Segoe UI",
    Roboto, "Helvetica Neue", Arial, sans-serif;
  --t-large: 2.25rem;  --t-1: 1.75rem;  --t-2: 1.3125rem;  --t-3: 1.1875rem;  --t-head: 1.0625rem;
  --t-body: 1.0625rem;  --t-callout: 1rem;  --t-sub: 0.9375rem;  --t-foot: 0.8125rem;  --t-cap: 0.75rem;
}
:root[data-theme="light"] {
  --bg: #F4F4F2;            /* Off-White */
  --bg-2: #ECECE9;
  --card: #FFFFFF;
  --card-2: #F4F5F7;
  --fill: rgba(42, 46, 54, 0.06);
  --fill-2: rgba(42, 46, 54, 0.12);
  --label: #16181D;
  --label-2: #5B6068;
  --label-3: #6B7078;
  --sep: rgba(22, 24, 29, 0.09);
  --accent: #2F5FE0;
  --accent-fill: #3767F0;
  --accent-press: #2C58D6;
  --accent-ink: #FFFFFF;
  --accent-soft: #E6EDFF;
  --highlight: #4C7DFF;
  --highlight-soft: rgba(76, 125, 255, 0.16);
  --success: #2E7D5B;
  --success-fill: #3FA37A;
  --success-soft: rgba(63, 163, 122, 0.12);
  --warning: #8A6210;
  --warning-fill: #D9A441;
  --warning-soft: rgba(217, 164, 65, 0.16);
  --danger: #B53E3A;
  --danger-fill: #D9534F;
  --danger-soft: rgba(217, 83, 79, 0.10);
  --chrome: rgba(244, 244, 242, 0.84);
  --shadow: 0 0 0 1px rgba(22, 24, 29, 0.05), 0 2px 10px rgba(22, 24, 29, 0.04);
  --shadow-lift: 0 0 0 1px rgba(22, 24, 29, 0.08), 0 12px 30px rgba(22, 24, 29, 0.08);
  --skeleton: rgba(42, 46, 54, 0.07);
  --bot-head: #D5D8DD;
  --bot-visor: #16181D;
  color-scheme: light;
}
@media (prefers-color-scheme: light) {
  :root[data-theme="system"] {
  --bg: #F4F4F2;            /* Off-White */
  --bg-2: #ECECE9;
  --card: #FFFFFF;
  --card-2: #F4F5F7;
  --fill: rgba(42, 46, 54, 0.06);
  --fill-2: rgba(42, 46, 54, 0.12);
  --label: #16181D;
  --label-2: #5B6068;
  --label-3: #6B7078;
  --sep: rgba(22, 24, 29, 0.09);
  --accent: #2F5FE0;
  --accent-fill: #3767F0;
  --accent-press: #2C58D6;
  --accent-ink: #FFFFFF;
  --accent-soft: #E6EDFF;
  --highlight: #4C7DFF;
  --highlight-soft: rgba(76, 125, 255, 0.16);
  --success: #2E7D5B;
  --success-fill: #3FA37A;
  --success-soft: rgba(63, 163, 122, 0.12);
  --warning: #8A6210;
  --warning-fill: #D9A441;
  --warning-soft: rgba(217, 164, 65, 0.16);
  --danger: #B53E3A;
  --danger-fill: #D9534F;
  --danger-soft: rgba(217, 83, 79, 0.10);
  --chrome: rgba(244, 244, 242, 0.84);
  --shadow: 0 0 0 1px rgba(22, 24, 29, 0.05), 0 2px 10px rgba(22, 24, 29, 0.04);
  --shadow-lift: 0 0 0 1px rgba(22, 24, 29, 0.08), 0 12px 30px rgba(22, 24, 29, 0.08);
  --skeleton: rgba(42, 46, 54, 0.07);
  --bot-head: #D5D8DD;
  --bot-visor: #16181D;
  color-scheme: light;
  }
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { font-size: 100%; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--label); font-family: var(--font);
  font-size: var(--t-body); line-height: 1.4; letter-spacing: -0.011em;
  -webkit-font-smoothing: antialiased; overflow-x: hidden; min-height: 100vh;
}
button, input, textarea { font: inherit; color: inherit; letter-spacing: inherit; }
button { cursor: pointer; }
a { color: var(--accent); text-decoration: none; }
img { display: block; max-width: 100%; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 3px solid var(--accent-fill); outline-offset: 2px; border-radius: 10px; }
main:focus, main:focus-visible { outline: none; }
.noscript { padding: 24px; text-align: center; }
.muted { color: var(--label-2); }
.num { font-variant-numeric: tabular-nums; }

/* Drück-Feedback (haptik-ähnlich) */
.press { transition: transform 0.12s ease, background-color 0.12s ease, box-shadow 0.2s ease; }
.press:active { transform: scale(0.975); }
@media (hover: hover) { .press:hover { box-shadow: var(--shadow-lift); } }

/* ---------------------------------------------------------------- Rahmen */
.boot { min-height: 100vh; display: grid; place-items: center; }
.spinner { width: 28px; height: 28px; border-radius: 50%; border: 3px solid var(--fill-2); border-top-color: var(--label-2);
  animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.sidebar { display: none; }
.navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 30; padding-top: var(--safe-t);
  transition: background 0.2s, box-shadow 0.2s;
}
.navbar.scrolled { background: var(--chrome); -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px); box-shadow: 0 0.5px 0 var(--sep); }
.navbar-inner { height: 44px; max-width: 1180px; margin: 0 auto; display: grid;
  grid-template-columns: 1fr minmax(0, max-content) 1fr; align-items: center; padding: 0 8px; }
.navbar-title { font-weight: 600; font-size: var(--t-head); opacity: 0; transition: opacity 0.2s; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.navbar.scrolled .navbar-title { opacity: 1; }
.back { display: inline-flex; align-items: center; gap: 2px; min-height: 44px; padding: 0 8px; border: 0; background: none;
  color: var(--accent); font-size: var(--t-body); justify-self: start; max-width: 100%; }
.back span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.back svg { width: 22px; height: 22px; flex: none; }
.nav-right { justify-self: end; }

main { max-width: 760px; margin: 0 auto;
  padding: calc(var(--safe-t) + 52px) 16px calc(var(--tabbar-h) + var(--safe-b) + 28px); }
.view-enter { animation: enter 0.26s ease-out both; }
@keyframes enter { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.eyebrow { color: var(--label-2); font-size: var(--t-sub); font-weight: 500; margin: 0 0 2px; }
.large-title { font-family: var(--font-display); font-size: var(--t-large); line-height: 1.1; font-weight: 700;
  letter-spacing: -0.028em; margin: 0 0 16px; overflow-wrap: break-word; hyphens: auto; }
.large-title + .subtitle { margin-top: -10px; }
.subtitle { color: var(--label-2); margin: 0 0 20px; font-size: var(--t-callout); max-width: 60ch; }
.section-title { font-family: var(--font-display); font-size: var(--t-2); font-weight: 700; letter-spacing: -0.018em;
  margin: 30px 0 10px; display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.section-title:first-child { margin-top: 0; }
.section-title a, .section-title button { font-size: var(--t-callout); font-weight: 400; color: var(--accent); background: none;
  border: 0; padding: 8px 0; white-space: nowrap; }
.footnote { color: var(--label-3); font-size: var(--t-foot); margin: 8px 4px 0; }

/* ---------------------------------------------------------------- Karten & Listen */
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.card + .card { margin-top: 12px; }
.pad { padding: 16px; }
.list { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.row { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 11px 16px; position: relative;
  width: 100%; border: 0; background: none; text-align: left; color: inherit; }
.row + .row::before { content: ""; position: absolute; top: 0; right: 0; left: 16px; border-top: 0.5px solid var(--sep); }
.row.with-icon + .row.with-icon::before { left: 60px; }
button.row:active, a.row:active { background: var(--fill); }
.row[aria-current="true"] { background: var(--accent-soft); }
.row-main { flex: 1; min-width: 0; }
.row-title { font-weight: 500; }
.row-sub { color: var(--label-2); font-size: var(--t-sub); margin-top: 1px; }
.row-time { color: var(--label-3); font-size: var(--t-foot); margin-top: 4px; }
.clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.clamp-1 { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chev { width: 14px; height: 14px; color: var(--label-3); flex: none; }
.row-value { color: var(--label-2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.row.danger .row-title { color: var(--danger); }

.icon-tile { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; flex: none;
  background: var(--tone, var(--card-2)); color: var(--tone-ink, var(--label)); }
.icon-tile svg { width: 19px; height: 19px; }
.icon-tile.lg { width: 46px; height: 46px; border-radius: 13px; }
.icon-tile.lg svg { width: 26px; height: 26px; }
.icon-tile.xl { width: 60px; height: 60px; border-radius: 16px; }
.icon-tile.xl svg { width: 32px; height: 32px; }

.chip { display: inline-flex; align-items: center; gap: 5px; font-size: var(--t-foot); font-weight: 600; padding: 3px 9px;
  border-radius: 999px; background: var(--fill); color: var(--label-2); white-space: nowrap; max-width: 100%;
  overflow: hidden; text-overflow: ellipsis; }
.chip.accent { background: var(--accent-soft); color: var(--accent); }
.chip.success { background: var(--success-soft); color: var(--success); }
.chip.warning { background: var(--warning-soft); color: var(--warning); }
.chip.danger { background: var(--danger-soft); color: var(--danger); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--label-3); flex: none; }
.dot.working { background: var(--highlight); box-shadow: 0 0 0 3px var(--highlight-soft); animation: breathe 2.2s ease-in-out infinite; }
.dot.done { background: var(--success-fill); }
.dot.failed { background: var(--danger-fill); }
.dot.waiting { background: var(--warning-fill); }
@keyframes breathe { 50% { box-shadow: 0 0 0 7px transparent; } }

/* ---------------------------------------------------------------- Skelett-Ladezustand */
.sk { background: var(--skeleton); border-radius: 10px; position: relative; overflow: hidden; }
.sk::after { content: ""; position: absolute; inset: 0; transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.06), transparent); animation: shimmer 1.3s infinite; }
@keyframes shimmer { to { transform: translateX(100%); } }
.sk-line { height: 14px; margin: 8px 0; }
.sk-title { height: 34px; width: 55%; margin: 6px 0 18px; }
.sk-card { height: 112px; border-radius: var(--radius); margin-bottom: 12px; }
.sk-hero { height: 128px; border-radius: 22px; margin-bottom: 14px; }

/* ---------------------------------------------------------------- Heute */
.status-pill { display: inline-flex; align-items: center; gap: 8px; padding: 7px 12px 7px 10px; border-radius: 999px;
  background: var(--card); box-shadow: var(--shadow); font-size: var(--t-sub); font-weight: 500; margin-bottom: 18px; }
.next { border-radius: 24px; padding: 20px; background: var(--card); box-shadow: var(--shadow); position: relative; overflow: hidden; }
.next.attention { background: linear-gradient(180deg, rgba(76, 125, 255, 0.13), rgba(76, 125, 255, 0.03)), var(--card);
  box-shadow: inset 0 0 0 1px rgba(76, 125, 255, 0.38); }
.next.danger { background: var(--danger-soft); box-shadow: inset 0 0 0 1px var(--danger-fill); }
.next-top { display: flex; align-items: center; gap: 14px; }
.next-badge { min-width: 56px; height: 56px; padding: 0 10px; border-radius: 18px; display: grid; place-items: center;
  font-family: var(--font-display); font-size: 1.875rem; font-weight: 700; background: var(--card-2); color: var(--label);
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums; flex: none; }
.next.calm .next-badge { background: var(--fill); color: var(--label-2); }
.next-badge svg { width: 30px; height: 30px; }
.next-title { font-family: var(--font-display); font-size: var(--t-3); font-weight: 700; line-height: 1.2; letter-spacing: -0.02em; }
.next-detail { font-size: var(--t-sub); color: var(--label-2); margin-top: 3px; }
.next.calm .next-detail { color: var(--label-2); opacity: 1; }
.next-summary { margin-top: 14px; font-size: var(--t-sub); padding: 10px 12px; border-radius: 10px; background: var(--fill); color: var(--label-2); }
.next .btn { margin-top: 16px; }
.next.attention .btn, .next.danger .btn { background: var(--accent-fill); color: var(--accent-ink); }
.next.attention .btn:active, .next.danger .btn:active { background: var(--accent-press); }

.wf { padding: 16px; display: block; color: inherit; }
.wf + .wf { border-top: 0.5px solid var(--sep); }
.wf-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.wf-title { font-weight: 600; min-width: 0; }
.wf-meta { color: var(--label-2); font-size: var(--t-sub); margin-top: 10px; display: flex; flex-direction: column;
  gap: 4px; align-items: flex-start; }
.wf-meta > * { max-width: 100%; }
@media (min-width: 600px) { .wf-meta { flex-direction: row; justify-content: space-between; align-items: center; gap: 12px; } }
.wf-dept { display: inline-flex; align-items: center; gap: 6px; min-width: 0; }
.wf-dept .swatch { width: 10px; height: 10px; border-radius: 3px; flex: none; background: var(--tone); box-shadow: inset 0 0 0 1px var(--fill-2); }
.phases { display: flex; gap: 3px; margin-top: 12px; }
.phase { flex: 1; height: 6px; border-radius: 3px; background: var(--fill-2); }
.phase.done { background: var(--label-3); }
.phase.current { background: var(--highlight); animation: pulse 2s ease-in-out infinite; }
.phase.current.waiting { background: var(--warning-fill); animation: none; }
@keyframes pulse { 50% { opacity: 0.55; } }
.phase-label { font-weight: 600; color: var(--label); }
.phase-names { display: none; }

.money-top { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.money-big { font-family: var(--font-display); font-size: var(--t-1); font-weight: 700; font-variant-numeric: tabular-nums; }
.bar { height: 10px; border-radius: 5px; background: var(--fill-2); overflow: hidden; margin-top: 12px; display: flex; }
.bar > span { display: block; height: 100%; background: var(--highlight); }
.bar > span:first-child { border-radius: 5px 0 0 5px; }
.bar > span.reserved { background: repeating-linear-gradient(45deg, var(--warning-fill), var(--warning-fill) 3px, transparent 3px, transparent 6px); opacity: 0.8; }
.bar > span.over { background: var(--danger-fill); }
.money-sub { display: flex; gap: 18px; margin-top: 12px; flex-wrap: wrap; }
.money-sub div { font-size: var(--t-sub); }

.hscroll { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; margin: 0 -16px; padding: 2px 16px 8px;
  scrollbar-width: none; }
.hscroll::-webkit-scrollbar { display: none; }
.result { flex: 0 0 64%; max-width: 240px; scroll-snap-align: start; }
.result .thumb { aspect-ratio: 4 / 3; background: var(--fill); display: grid; place-items: center; color: var(--label-3); }
.result .thumb img { width: 100%; height: 100%; object-fit: cover; }
.result .thumb svg { width: 34px; height: 34px; }
.result-body { padding: 12px 14px 14px; }
.result-title { font-weight: 600; font-size: var(--t-sub); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 50px; padding: 0 20px;
  border-radius: 14px; border: 0; font-weight: 600; font-size: var(--t-body); background: var(--fill); color: var(--accent);
  transition: transform 0.12s ease, background-color 0.12s ease, opacity 0.2s; white-space: nowrap; }
.btn:active { transform: scale(0.97); background: var(--fill-2); }
.btn.primary { background: var(--accent-fill); color: var(--accent-ink); }
.btn.primary:active { background: var(--accent-press); }
.btn.danger { background: var(--danger); color: var(--accent-ink); }
.btn.plain { background: transparent; padding: 0 4px; min-height: 44px; }
.btn.block { width: 100%; }
.btn.sm { min-height: 40px; padding: 0 14px; font-size: var(--t-sub); border-radius: 12px; }
.btn:disabled { opacity: 0.45; }
.btn svg { width: 20px; height: 20px; flex: none; }
.cta { margin-top: 28px; }

.live-list .row-sub b { color: var(--label); font-weight: 600; }

/* ---------------------------------------------------------------- Abteilungen: Ablauf */
.flow { position: relative; }
.dept { display: block; padding: 16px; width: 100%; border: 0; text-align: left; color: inherit;
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); position: relative; }
.dept.active { box-shadow: inset 0 0 0 1px rgba(76, 125, 255, 0.55); }
.dept-top { display: flex; gap: 14px; align-items: flex-start; }
.dept-body { flex: 1; min-width: 0; }
.dept-name { font-weight: 600; font-size: var(--t-head); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.dept-hint { color: var(--label-2); font-size: var(--t-sub); }
.dept-line { margin-top: 10px; font-size: var(--t-sub); display: flex; align-items: flex-start; gap: 8px; }
.dept-line .dot { margin-top: 7px; }
.dept-line.idle { color: var(--label-2); }
.dept-line b { font-weight: 600; }
.dept-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 12px; }
.minithumbs { display: flex; gap: 6px; }
.minithumbs img, .minithumbs span { width: 34px; height: 34px; border-radius: 8px; object-fit: cover; background: var(--fill); }
.avatars { display: flex; flex-wrap: wrap; gap: 6px; padding: 2px; }
.avatar { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-size: 0.6875rem;
  font-weight: 700; color: var(--label-2); background: var(--fill); position: relative; flex: none; letter-spacing: 0.02em; }
.avatar.working { color: #fff; background: var(--accent-fill); box-shadow: 0 0 0 3px var(--accent-soft); }
.avatar.done { color: var(--success); background: var(--success-soft); }
.avatar.failed { color: var(--danger); background: var(--danger-soft); }
.avatar.lg { width: 44px; height: 44px; font-size: 0.875rem; }
.avatar.lg.working::after { content: ""; position: absolute; inset: -5px; border-radius: 50%; border: 2px solid var(--accent-fill);
  opacity: 0.5; animation: ring 1.8s ease-out infinite; }
@keyframes ring { from { transform: scale(0.92); opacity: 0.7; } to { transform: scale(1.22); opacity: 0; } }

.link { display: flex; justify-content: center; align-items: center; height: 30px; position: relative; color: var(--label-3); }
.link::before { content: ""; position: absolute; top: 0; bottom: 0; left: 50%; border-left: 2px dashed var(--fill-2); }
.link svg { position: relative; width: 14px; height: 14px; background: var(--bg); border-radius: 50%; }
.link.active::before { border-left: 2px solid var(--highlight); }
.link.active .travel { position: absolute; left: calc(50% - 4px); width: 8px; height: 8px; border-radius: 2px;
  background: var(--highlight); box-shadow: 0 0 0 4px var(--highlight-soft); animation: travel 1.8s cubic-bezier(0.65, 0, 0.35, 1) infinite; }
.link.waiting::before { border-left-color: var(--warning-fill); }
.link.waiting .travel { background: var(--warning-fill); box-shadow: 0 0 0 4px var(--warning-soft); animation-duration: 2.4s; }
@keyframes travel { 0% { top: -4px; opacity: 0; } 15% { opacity: 1; } 85% { opacity: 1; } 100% { top: calc(100% - 6px); opacity: 0; } }
.handoff-note { display: inline-flex; align-items: center; gap: 6px; font-size: var(--t-foot); font-weight: 600;
  color: var(--accent); background: var(--accent-soft); padding: 4px 10px; border-radius: 999px; margin-bottom: 10px; max-width: 100%; }
.handoff-note.waiting { color: var(--warning); background: var(--warning-soft); }
.handoff-note svg { width: 14px; height: 14px; flex: none; }
.handoff-note { border-radius: 12px; align-items: flex-start; line-height: 1.3; }
.handoff-note svg { margin-top: 1px; }
.handoff-note span { overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }

/* Abteilungs-Detail */
.dept-head { display: flex; gap: 14px; align-items: center; margin-bottom: 18px; }
.dept-head > div { min-width: 0; }
.dept-title { font-family: var(--font-display); font-size: 1.5rem; line-height: 1.15; font-weight: 700; margin: 0;
  overflow-wrap: break-word; hyphens: auto; }
@media (min-width: 600px) { .dept-title { font-size: var(--t-1); } }
.stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: 8px; }
.stat { background: var(--card); border-radius: 16px; padding: 12px 14px; box-shadow: var(--shadow); min-width: 0; }
.stat-v { font-family: var(--font-display); font-size: var(--t-3); font-weight: 700; font-variant-numeric: tabular-nums;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat-l { color: var(--label-2); font-size: var(--t-foot); }
.agent { padding: 14px 16px; display: flex; gap: 12px; }
.agent + .agent { border-top: 0.5px solid var(--sep); }
.agent-role { color: var(--label-2); font-size: var(--t-sub); margin-top: 2px; }
.hired-note { margin-top: 10px; font-size: var(--t-sub); background: var(--accent-soft); padding: 10px 12px; border-radius: 12px; }
.hired-note strong { display: block; font-size: var(--t-foot); color: var(--accent); margin-bottom: 2px; }
.pager { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; margin-top: 24px; }
.pager .btn { font-size: var(--t-sub); min-height: 46px; padding: 0 12px; min-width: 0; }
.pager .btn span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.timeline { position: relative; padding: 6px 0 6px 0; }
.tl-item { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; gap: 10px; padding: 10px 16px; position: relative; }
.tl-item::before { content: ""; position: absolute; left: 26px; top: 0; bottom: 0; border-left: 2px solid var(--fill); }
.tl-item:first-child::before { top: 18px; }
.tl-item:last-child::before { bottom: calc(100% - 18px); }
.tl-item .dot { margin: 6px 0 0 3px; position: relative; z-index: 1; box-shadow: 0 0 0 3px var(--card); }
.tl-item .dot.working { box-shadow: 0 0 0 3px var(--card), 0 0 0 6px var(--accent-soft); }
.tl-title { font-weight: 500; }
.tl-sub { color: var(--label-2); font-size: var(--t-sub); }
.tl-err { color: var(--danger); font-size: var(--t-sub); }
.results-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.results-grid .r { background: var(--card); border-radius: 14px; overflow: hidden; box-shadow: var(--shadow); }
.results-grid img, .results-grid .ph { width: 100%; aspect-ratio: 1; object-fit: cover; background: var(--fill);
  display: grid; place-items: center; color: var(--label-3); }
.results-grid .ph svg { width: 26px; height: 26px; }
.results-grid .cap { font-size: var(--t-foot); padding: 6px 8px 8px; }

/* ---------------------------------------------------------------- Freigaben */
.empty { text-align: center; padding: 44px 24px; }
.empty-icon { width: 64px; height: 64px; border-radius: 50%; margin: 0 auto 14px; display: grid; place-items: center;
  background: var(--success-soft); color: var(--success); }
.empty-icon.neutral { background: var(--fill); color: var(--label-2); }
.empty-icon.bad { background: var(--danger-soft); color: var(--danger); }
.empty-icon svg { width: 32px; height: 32px; }
.empty h2 { font-size: var(--t-3); margin: 0 0 6px; }
.empty p { color: var(--label-2); margin: 0 auto; max-width: 34ch; }
.q-title { font-family: var(--font-display); font-size: var(--t-1); line-height: 1.15; font-weight: 700; margin: 4px 0 10px;
  overflow-wrap: break-word; hyphens: auto; }
.q-head { font-size: var(--t-3); font-weight: 600; margin: 0 0 4px; }
.kv { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px 16px; margin: 0; }
.kv dt { color: var(--label-2); }
.kv dd { margin: 0; font-variant-numeric: tabular-nums; text-align: right; font-weight: 500; }
.kv dd.big { font-family: var(--font-display); font-size: var(--t-3); font-weight: 700; color: var(--accent); }
.fact + .fact { margin-top: 12px; }
.fact-v { font-weight: 500; margin-top: 2px; }
.next-box { display: flex; gap: 10px; background: var(--accent-soft); border-radius: 14px; padding: 12px 14px; margin-top: 16px;
  font-size: var(--t-sub); }
.next-box svg { width: 20px; height: 20px; color: var(--accent); flex: none; margin-top: 1px; }
.idea { display: block; width: 100%; text-align: left; border: 2px solid transparent; padding: 14px 16px; background: var(--card);
  border-radius: var(--radius); box-shadow: var(--shadow); color: inherit; }
.idea + .idea { margin-top: 10px; }
.idea[aria-checked="true"] { border-color: var(--accent-fill); }
.idea-top { display: flex; gap: 10px; align-items: flex-start; }
.radio { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--fill-2); flex: none; margin-top: 1px;
  display: grid; place-items: center; }
.idea[aria-checked="true"] .radio { border-color: var(--accent-fill); background: var(--accent-fill); }
.idea[aria-checked="true"] .radio::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #fff; }
.gallery { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 12px; }
.gallery img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 12px; background: var(--fill); }
.note { width: 100%; min-height: 84px; resize: vertical; padding: 12px 14px; border-radius: 14px; border: 0;
  background: var(--card); box-shadow: var(--shadow); font-size: var(--t-callout); }
.actionbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 25; background: var(--chrome);
  -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
  box-shadow: 0 -0.5px 0 var(--sep); padding: 10px 16px calc(10px + var(--safe-b)); }
.actionbar-inner { max-width: 760px; margin: 0 auto; display: flex; gap: 10px; }
.actionbar .btn { flex: 1; min-width: 0; }
.with-actionbar main { padding-bottom: calc(96px + var(--safe-b)); }
.with-actionbar .tabbar { display: none; }
.check-line { display: flex; gap: 8px; align-items: flex-start; font-size: var(--t-sub); }
.check-line + .check-line { margin-top: 8px; }
.check-line .dot { margin-top: 7px; }
.desc { white-space: pre-wrap; font-size: var(--t-sub); }
.desc.short { max-height: 8.5em; overflow: hidden; -webkit-mask-image: linear-gradient(180deg, #000 60%, transparent);
  mask-image: linear-gradient(180deg, #000 60%, transparent); }

/* ---------------------------------------------------------------- Projekte & Dateien */
.proj-head { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.grid-nums { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px 8px; margin-top: 14px; }
.num-v { font-weight: 600; font-variant-numeric: tabular-nums; }
.num-l { color: var(--label-2); font-size: var(--t-foot); }
.filters { display: flex; gap: 8px; overflow-x: auto; margin: 0 -16px 14px; padding: 2px 16px; scrollbar-width: none; }
.filters::-webkit-scrollbar { display: none; }
.filter { flex: none; min-height: 36px; padding: 0 14px; border-radius: 999px; border: 0; background: var(--card);
  box-shadow: var(--shadow); font-size: var(--t-sub); font-weight: 500; }
.filter[aria-pressed="true"] { background: var(--label); color: var(--bg); }
.thumbs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.thumbs a { aspect-ratio: 1; border-radius: 12px; overflow: hidden; background: var(--fill); }
.thumbs img { width: 100%; height: 100%; object-fit: cover; }
.file-ico { width: 36px; height: 44px; border-radius: 7px; background: var(--fill); display: grid; place-items: center;
  font-size: 0.625rem; font-weight: 800; color: var(--label-2); flex: none; letter-spacing: 0.02em; }
.grid-cards > .card + .card { margin-top: 12px; }

/* ---------------------------------------------------------------- Tab-Leiste (iPhone) */
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; background: var(--chrome);
  -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
  box-shadow: 0 -0.5px 0 var(--sep); padding-bottom: var(--safe-b); }
.tabbar-inner { max-width: 760px; margin: 0 auto; display: grid; grid-template-columns: repeat(5, 1fr); height: var(--tabbar-h); }
.tab { border: 0; background: none; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 2px; color: var(--label-3); font-size: 0.6875rem; font-weight: 500; position: relative; min-height: 44px; }
.tab svg { width: 26px; height: 26px; }
.tab:active svg { transform: scale(0.9); }
.tab[aria-current="page"] { color: var(--accent); }
.badge { position: absolute; top: 3px; left: calc(50% + 6px); min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
  background: var(--danger); color: var(--accent-ink); font-size: 0.6875rem; font-weight: 700; display: grid; place-items: center; }

/* ---------------------------------------------------------------- Sheet & Toast */
.backdrop { position: fixed; inset: 0; z-index: 50; background: rgba(0, 0, 0, 0.36); display: flex; align-items: flex-end;
  justify-content: center; animation: fade 0.2s ease-out; }
@keyframes fade { from { opacity: 0; } }
.sheet { width: 100%; max-width: 520px; background: var(--card); border-radius: 22px 22px 0 0;
  padding: 10px 20px calc(20px + var(--safe-b)); animation: up 0.28s cubic-bezier(0.2, 0.9, 0.3, 1); }
@keyframes up { from { transform: translateY(100%); } }
.grabber { width: 38px; height: 5px; border-radius: 3px; background: var(--fill-2); margin: 0 auto 14px; }
.sheet h2 { font-family: var(--font-display); font-size: var(--t-2); margin: 0 0 6px; }
.sheet p { color: var(--label-2); margin: 0 0 18px; }
.sheet .btn + .btn { margin-top: 10px; }
.toast { position: fixed; left: 50%; top: calc(var(--safe-t) + 10px); transform: translateX(-50%); z-index: 60;
  background: var(--label); color: var(--bg); padding: 10px 16px; border-radius: 999px; font-weight: 600; font-size: var(--t-sub);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2); animation: drop 0.3s ease-out; max-width: calc(100vw - 32px);
  width: max-content; text-align: center; }
@keyframes drop { from { opacity: 0; transform: translate(-50%, -10px); } }
.error-text { color: var(--danger); font-size: var(--t-sub); margin-top: 10px; min-height: 1.4em; }

/* ---------------------------------------------------------------- Anmeldung */
.login { min-height: 100vh; display: flex; flex-direction: column; justify-content: center; max-width: 400px; margin: 0 auto;
  padding: calc(var(--safe-t) + 24px) 24px calc(var(--safe-b) + 24px); }
.login-icon { width: 84px; height: 84px; border-radius: 20px; margin: 0 auto 18px; box-shadow: 0 8px 28px rgba(0, 0, 0, 0.18); }
.login h1 { font-family: var(--font-display); text-align: center; font-size: 2rem; margin: 0 0 6px; }
.login p { text-align: center; color: var(--label-2); margin: 0 0 28px; }
.field { display: block; width: 100%; min-height: 52px; padding: 0 16px; border-radius: 14px; border: 0; background: var(--card);
  box-shadow: var(--shadow); font-size: var(--t-body); }
.field + .field { margin-top: 10px; }
.login .btn { margin-top: 16px; }
.login small { display: block; text-align: center; color: var(--label-3); margin-top: 22px; font-size: var(--t-foot); }

/* ---------------------------------------------------------------- Raster (Desktop & Tablet) */
.dash { display: grid; gap: 0; grid-template-columns: minmax(0, 1fr); }
.dash > div:not(.span) > .section-title:first-child { margin-top: 30px; }
.hide-mobile { display: none; }
.split { display: block; }
.split-list { display: none; }
.detail-empty { display: none; }

@media (min-width: 600px) {
  .stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .results-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .thumbs { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .result { flex-basis: 220px; }
}

@media (min-width: 900px) {
  :root { --t-large: 2.5rem; }
  body { background: var(--bg); }
  .tabbar { display: none !important; }
  .sidebar { display: flex; flex-direction: column; position: fixed; top: 0; bottom: 0; left: 0; width: var(--sidebar-w);
    padding: 22px 14px 18px; background: var(--bg-2); border-right: 0.5px solid var(--sep); z-index: 35; gap: 4px; }
  .brand { display: flex; align-items: center; gap: 12px; padding: 4px 10px 20px; }
  .brand img { width: 36px; height: 36px; border-radius: 9px; }
  .brand-name { font-family: var(--font-display); font-weight: 700; font-size: var(--t-head); }
  .brand-sub { color: var(--label-2); font-size: var(--t-foot); }
  .side-item { display: flex; align-items: center; gap: 12px; min-height: 42px; padding: 0 12px; border-radius: 11px;
    border: 0; background: none; color: var(--label); font-size: var(--t-callout); font-weight: 500; text-align: left; width: 100%;
    transition: background-color 0.12s; }
  .side-item svg { width: 20px; height: 20px; color: var(--label-3); flex: none; }
  .side-item:hover { background: var(--fill); }
  .side-item:active { background: var(--fill-2); }
  .side-item[aria-current="page"] { background: var(--card-2); color: var(--label); box-shadow: inset 2px 0 0 var(--highlight); }
  .side-item[aria-current="page"] svg { color: var(--highlight); }
  .side-item .side-badge { margin-left: auto; min-width: 22px; height: 22px; padding: 0 7px; border-radius: 11px;
    background: var(--danger); color: var(--accent-ink); font-size: var(--t-cap); font-weight: 700; display: grid; place-items: center; }
  .side-item[aria-current="page"] .side-badge { background: var(--danger-fill); color: #fff; }
  .side-spacer { flex: 1; }
  .side-status { padding: 12px; border-radius: 14px; background: var(--card); box-shadow: var(--shadow); font-size: var(--t-sub); }
  .side-status .row-sub { font-size: var(--t-foot); }
  .side-status .btn { margin-top: 10px; width: 100%; }

  .navbar { left: var(--sidebar-w); }
  main { max-width: 1180px; margin: 0 0 0 var(--sidebar-w); padding: 48px 40px 48px; }
  .with-actionbar main { padding-bottom: 48px; }
  .navbar-inner { padding: 0 24px; }

  .dash { grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 0 28px; align-items: start; }
  .dash .span { grid-column: 1 / -1; }
  .next { padding: 26px 28px; }
  .next-top { gap: 18px; }
  .next-title { font-size: var(--t-1); }
  .next .btn { margin-top: 0; }
  .next-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
  .next-actions { flex: none; }
  .phase-names { display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 3px; margin-top: 6px; }
  .phase-names span { font-size: var(--t-cap); color: var(--label-3); text-align: center; overflow: hidden;
    text-overflow: ellipsis; white-space: nowrap; }
  .phase-names span.on { color: var(--label); font-weight: 600; }

  .board { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
  .board .link { display: none; }
  .board .dept { height: 100%; display: flex; flex-direction: column; }
  .board .dept .dept-foot { margin-top: auto; padding-top: 12px; }
  .step-no { position: absolute; top: 14px; right: 16px; font-size: var(--t-foot); color: var(--label-3); font-weight: 600;
    font-variant-numeric: tabular-nums; }
  .dept-top .chev { display: none; }

  .split { display: grid; grid-template-columns: 360px minmax(0, 1fr); gap: 28px; align-items: start; }
  .split-list { display: block; position: sticky; top: 64px; max-height: calc(100vh - 88px); overflow: auto;
    border-radius: var(--radius); }
  .split-list::-webkit-scrollbar { width: 0; }
  .split-detail { min-width: 0; }
  .detail-empty { display: block; }
  .split-detail .actionbar { position: sticky; bottom: 16px; left: auto; right: auto; margin-top: 20px; border-radius: 18px;
    padding: 10px; box-shadow: var(--shadow-lift), 0 0 0 0.5px var(--sep); }
  .split-detail .actionbar-inner { max-width: none; }
  .hide-desktop { display: none !important; }
  .hide-mobile { display: block; }
  .stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .grid-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; }
  .grid-cards > .card + .card { margin-top: 0; }
  .hscroll { margin: 0; padding: 2px 0 8px; display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); overflow: visible; }
  .result { max-width: none; }
  .backdrop { align-items: center; }
  .sheet { border-radius: 22px; padding-bottom: 22px; }
  .grabber { display: none; }
}
@media (min-width: 900px) and (max-width: 1180px) {
  .split { grid-template-columns: 300px minmax(0, 1fr); gap: 20px; }
  main { padding: 40px 28px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important; }
  .link.active .travel { top: calc(50% - 5px) !important; opacity: 1 !important; }
}


/* ---------------------------------------------------------------- Marke, Abteilungstöne, Bots */
.wordmark { font-family: var(--font-display); font-weight: 800; letter-spacing: 0.06em; line-height: 1; color: var(--label); }
.boot-logo { width: 64px; height: 64px; border-radius: 15px; animation: breathe-logo 2.4s ease-in-out infinite; }
@keyframes breathe-logo { 50% { opacity: 0.6; } }
.mobile-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 20px; }
.mobile-brand img { width: 30px; height: 30px; border-radius: 8px; }
.mobile-brand .wordmark { font-size: 1.125rem; }
.side-wordmark { font-size: 1.125rem; }
.login-logo { width: 84px; height: 84px; border-radius: 20px; margin: 0 auto 22px; box-shadow: 0 0 0 1px var(--sep); }
.login .wordmark { text-align: center; font-size: 2.25rem; margin: 0 0 10px; }
.login .tagline { text-align: center; color: var(--label-2); margin: 0 0 28px; }
@media (min-width: 900px) { .mobile-brand { display: none; } }
.tone-research { --tone: #2E3A4E; --tone-ink: #D5D8DD; }
.tone-validation { --tone: #363650; --tone-ink: #D5D8DD; }
.tone-ceo { --tone: #2B3340; --tone-ink: #D5D8DD; }
.tone-production { --tone: #33404A; --tone-ink: #D5D8DD; }
.tone-development { --tone: #2A4146; --tone-ink: #D5D8DD; }
.tone-quality { --tone: #2E4238; --tone-ink: #D5D8DD; }
.tone-sales { --tone: #3B3443; --tone-ink: #D5D8DD; }
.tone-marketing { --tone: #40363C; --tone-ink: #D5D8DD; }
.tone-finance { --tone: #3C3C33; --tone-ink: #D5D8DD; }
.tone-optimization { --tone: #2C3D4D; --tone-ink: #D5D8DD; }
.tone-neutral { --tone: #2A2E36; --tone-ink: #D5D8DD; }
:root[data-theme="light"] .tone-research { --tone: #E3E9F2; --tone-ink: #2A2E36; }
:root[data-theme="light"] .tone-validation { --tone: #E7E6F1; --tone-ink: #2A2E36; }
:root[data-theme="light"] .tone-ceo { --tone: #E4E7EC; --tone-ink: #2A2E36; }
:root[data-theme="light"] .tone-production { --tone: #E2E8EC; --tone-ink: #2A2E36; }
:root[data-theme="light"] .tone-development { --tone: #E0EBEC; --tone-ink: #2A2E36; }
:root[data-theme="light"] .tone-quality { --tone: #E2ECE6; --tone-ink: #2A2E36; }
:root[data-theme="light"] .tone-sales { --tone: #ECE7EE; --tone-ink: #2A2E36; }
:root[data-theme="light"] .tone-marketing { --tone: #EEE8EA; --tone-ink: #2A2E36; }
:root[data-theme="light"] .tone-finance { --tone: #ECECE3; --tone-ink: #2A2E36; }
:root[data-theme="light"] .tone-optimization { --tone: #E1E8EF; --tone-ink: #2A2E36; }
:root[data-theme="light"] .tone-neutral { --tone: #ECEDF0; --tone-ink: #2A2E36; }
@media (prefers-color-scheme: light) {
  :root[data-theme="system"] .tone-research { --tone: #E3E9F2; --tone-ink: #2A2E36; }
  :root[data-theme="system"] .tone-validation { --tone: #E7E6F1; --tone-ink: #2A2E36; }
  :root[data-theme="system"] .tone-ceo { --tone: #E4E7EC; --tone-ink: #2A2E36; }
  :root[data-theme="system"] .tone-production { --tone: #E2E8EC; --tone-ink: #2A2E36; }
  :root[data-theme="system"] .tone-development { --tone: #E0EBEC; --tone-ink: #2A2E36; }
  :root[data-theme="system"] .tone-quality { --tone: #E2ECE6; --tone-ink: #2A2E36; }
  :root[data-theme="system"] .tone-sales { --tone: #ECE7EE; --tone-ink: #2A2E36; }
  :root[data-theme="system"] .tone-marketing { --tone: #EEE8EA; --tone-ink: #2A2E36; }
  :root[data-theme="system"] .tone-finance { --tone: #ECECE3; --tone-ink: #2A2E36; }
  :root[data-theme="system"] .tone-optimization { --tone: #E1E8EF; --tone-ink: #2A2E36; }
  :root[data-theme="system"] .tone-neutral { --tone: #ECEDF0; --tone-ink: #2A2E36; }
}

/* Geometrischer Bot: abgerundetes Quadrat, schmales Visier, Zustandslicht */
.bot { width: 30px; height: 30px; display: grid; place-items: center; position: relative; flex: none; }
.bot svg { width: 100%; height: 100%; display: block; }
.bot .head { fill: var(--bot-head); }
.bot .visor { fill: var(--bot-visor); }
.bot .lamp { fill: var(--label-3); opacity: 0.7; }
.bot .scan { fill: var(--label-3); opacity: 0.35; }
.bot.lg { width: 44px; height: 44px; }
.bot.working .lamp { fill: var(--highlight); opacity: 1; animation: lamp 1.6s ease-in-out infinite; }
.bot.working .scan { fill: var(--highlight); opacity: 0.9; animation: scan 2.4s cubic-bezier(0.65, 0, 0.35, 1) infinite; }
.bot.done .lamp { fill: var(--success-fill); opacity: 1; }
.bot.done .scan { fill: var(--success-fill); opacity: 0.6; }
.bot.failed .lamp { fill: var(--danger-fill); opacity: 1; }
.bot.failed .scan { fill: var(--danger-fill); opacity: 0.7; }
@keyframes lamp { 50% { opacity: 0.35; } }
@keyframes scan { 0%, 100% { transform: translateX(-5px); } 50% { transform: translateX(5px); } }
.bot-more { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; font-size: 0.6875rem;
  font-weight: 700; color: var(--label-2); background: var(--fill); }
.theme-switch { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; padding: 4px; border-radius: 12px;
  background: var(--fill); }
.theme-switch button { min-height: 38px; border: 0; border-radius: 9px; background: none; font-size: var(--t-sub); font-weight: 600;
  color: var(--label-2); }
.theme-switch button[aria-pressed="true"] { background: var(--card); color: var(--label); box-shadow: var(--shadow); }
@media (prefers-reduced-motion: reduce) { .bot.working .lamp, .bot.working .scan, .boot-logo { animation: none; } }

/* ---------------------------------------------------------------- Einstellungen & Rückfragen */
.group-sub { color: var(--label-2); font-size: var(--t-sub); margin: -4px 4px 10px; max-width: 62ch; }
.switch-row { align-items: center; }
.switch { position: relative; width: 51px; height: 31px; border-radius: 16px; border: 0; flex: none; padding: 0;
  background: var(--fill-2); transition: background-color 0.2s ease; }
.switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 27px; height: 27px; border-radius: 50%;
  background: #FFFFFF; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25); transition: transform 0.2s cubic-bezier(0.3, 0.7, 0.4, 1); }
.switch[aria-checked="true"] { background: var(--accent-fill); }
.switch[aria-checked="true"]::after { transform: translateX(20px); }
.switch:disabled { opacity: 0.6; }
.settings-foot { text-align: center; margin-top: 32px; }
.settings-foot .wordmark { font-size: 1rem; color: var(--label-3); }
.question-card .asker { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.question-text { font-family: var(--font-display); font-size: var(--t-3); font-weight: 600; letter-spacing: -0.015em;
  line-height: 1.3; margin: 0; }
.context-box { margin-top: 12px; padding: 12px 14px; border-radius: 10px; background: var(--fill); color: var(--label-2);
  font-size: var(--t-sub); white-space: pre-wrap; overflow-wrap: anywhere; max-height: 14em; overflow: auto; }
.lesson-text { margin-top: 4px; font-size: var(--t-sub); line-height: 1.45; }
.agent .btn.sm { align-self: center; }
.idea.option .row-title { font-weight: 600; }
.conn-state { display: inline-flex; align-items: center; gap: 6px; font-size: var(--t-sub); color: var(--label-2); white-space: nowrap; }
.conn-state.ok { color: var(--success); }
.title-with-info { display: inline-flex; align-items: center; gap: 8px; }
.info-dot { width: 20px; height: 20px; border-radius: 50%; border: 0; padding: 0; display: inline-grid; place-items: center;
  background: var(--fill); color: var(--label-3); font-size: 0.75rem; font-weight: 700; font-style: italic;
  font-family: Georgia, "Times New Roman", serif; flex: none; }
.info-dot:hover { color: var(--label); }
.section-title .info-dot, .section-title button.info-dot { font-size: 0.75rem; background: var(--fill); color: var(--label-3); padding: 0; font-weight: 700; }
.lesson-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.lesson-meta { color: var(--label-3); font-size: var(--t-foot); margin-top: 6px; }
.btn.forget { color: var(--danger); padding: 0; min-height: 36px; margin-top: 2px; font-weight: 600; }
