/* Token-Set aus Claritydesk übernommen (festgelegt 27.10.2026). Module definieren keine eigenen Farben oder Schriften. */
:root {
  --bg: #F6F7F9; --surface: #FFFFFF; --ink: #1A1D21; --muted: #5F6B76;
  --line: #DEE2E6; --line-soft: #EEF1F4;
  --accent: #1F4E79; --accent-soft: #E8F0F8; --on-accent: #FFFFFF;
  --ok: #1E6F45; --warn: #8A5A00; --danger: #A8201A; --track: #ECEFF2;

  --font: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, Menlo, Consolas, monospace;
  --text-xl: 22px; --text-md: 14px; --text-sm: 13px; --text-xs: 12px;
  --space-1: 4px; --space-2: 8px; --space-3: 12px; --space-4: 16px; --space-5: 24px; --space-6: 32px;
  --radius: 3px; --radius-sm: 2px; --sidebar: 240px; --control: 32px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #121417; --surface: #1A1D21; --ink: #E8EAED; --muted: #9AA3AD;
    --line: #2C3137; --line-soft: #23282E;
    --accent: #7FB3E6; --accent-soft: #1E2D3C; --on-accent: #121417;
    --ok: #6CC28F; --warn: #E2B04A; --danger: #E07A72; --track: #262B31;
  }
}
:root[data-theme="dark"] {
  --bg: #121417; --surface: #1A1D21; --ink: #E8EAED; --muted: #9AA3AD;
  --line: #2C3137; --line-soft: #23282E;
  --accent: #7FB3E6; --accent-soft: #1E2D3C; --on-accent: #121417;
  --ok: #6CC28F; --warn: #E2B04A; --danger: #E07A72; --track: #262B31;
}
:root { color-scheme: light dark; }
:root[data-theme="light"] { color-scheme: light; }
:root[data-theme="dark"] { color-scheme: dark; }

* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--ink); font: 400 var(--text-md)/1.5 var(--font); }
h1 { margin: 0; font-size: var(--text-xl); font-weight: 600; line-height: 1.2; letter-spacing: -0.01em; }
h2 { margin: 0 0 var(--space-3); font-size: var(--text-md); font-weight: 600; }
p { margin: 0 0 var(--space-3); }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.muted, .meta { color: var(--muted); }
.meta { font-size: var(--text-sm); }
.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-size: var(--text-xs); }
.right { text-align: right; }
.warn { color: var(--warn); }

/* Gerüst */
.shell { display: grid; grid-template-columns: var(--sidebar) minmax(0, 1fr); min-height: 100vh; }
.side { background: var(--surface); border-right: 1px solid var(--line); padding: var(--space-5) var(--space-4); display: flex; flex-direction: column; gap: var(--space-5); }
.brand { font-weight: 600; letter-spacing: -0.01em; padding: 0 var(--space-3); }
.nav { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.nav a { display: block; padding: 6px var(--space-3); border-radius: var(--radius); color: var(--ink); }
.nav a:hover { background: var(--line-soft); text-decoration: none; }
.nav a[aria-current="page"] { background: var(--accent-soft); color: var(--accent); font-weight: 500; }
.side-foot { margin-top: auto; display: flex; flex-direction: column; gap: var(--space-1); }
.side-foot form { margin: 0; }
.main { padding: var(--space-5) 40px 48px; display: flex; flex-direction: column; gap: var(--space-5); min-width: 0; }
.page-head { border-bottom: 1px solid var(--line); padding-bottom: var(--space-4); display: flex; flex-direction: column; gap: var(--space-1); }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: var(--space-5); }

/* Flächen und Tabellen */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px var(--space-5); }
.empty p { margin: 0; max-width: 60ch; }
table { border-collapse: collapse; width: 100%; margin-bottom: var(--space-3); }
th { text-align: left; font-size: var(--text-xs); font-weight: 500; color: var(--muted); padding: 0 var(--space-2) var(--space-2) 0; border-bottom: 1px solid var(--line); }
td { padding: 9px var(--space-2) 9px 0; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }

/* Bedienelemente */
.btn { font: 500 var(--text-md)/1 var(--font); height: var(--control); padding: 0 var(--space-4); border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; }
.btn:hover { border-color: var(--ink); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn-primary:hover { border-color: var(--accent); filter: brightness(1.08); }
.btn-danger { color: var(--danger); border-color: var(--danger); background: transparent; }
.btn-quiet { border-color: transparent; background: transparent; text-align: left; width: 100%; color: var(--muted); }
.btn-quiet:hover { color: var(--ink); border-color: transparent; background: var(--line-soft); }
.field { display: flex; flex-direction: column; gap: var(--space-1); font-size: var(--text-xs); color: var(--muted); }
.field input { font: 400 var(--text-md)/1 var(--font); height: var(--control); padding: 0 var(--space-3); border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--ink); }
.field input:focus-visible { border-color: var(--accent); }
.field.inline { flex-direction: row; align-items: center; gap: var(--space-2); }
.row { display: flex; gap: var(--space-3); align-items: center; flex-wrap: wrap; }
.stack { display: flex; flex-direction: column; gap: var(--space-3); max-width: 360px; }
.status { min-height: 1.5em; color: var(--muted); font-size: var(--text-sm); margin: var(--space-3) 0 0; }
.status-bad { color: var(--danger); }

/* Anmeldung, Einrichtung, Fehler */
body.bare { display: grid; place-items: center; min-height: 100vh; padding: var(--space-4); }
.bare-box { width: 100%; max-width: 420px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: var(--space-6); }
.bare-box h1 { margin-bottom: var(--space-2); }

/* Allgemein ergänzt */
[hidden] { display: none !important; }
h3 { margin: var(--space-4) 0 var(--space-2); font-size: var(--text-md); font-weight: 600; }
.small { font-size: var(--text-sm); }
.num { text-align: right; white-space: nowrap; }
.ok { color: var(--ok); }
.bad { color: var(--danger); }
.crumbs { font-size: var(--text-xs); color: var(--muted); }
.row.between { justify-content: space-between; }
.stack-wide { display: flex; flex-direction: column; gap: var(--space-4); max-width: 760px; }
ul.plain { list-style: none; margin: 0 0 var(--space-3); padding: 0; display: flex; flex-direction: column; gap: var(--space-1); }
.kbd { font: 400 var(--text-xs)/1 var(--font-mono); color: var(--muted); margin-left: var(--space-1); }
.btn.btn-primary .kbd { color: inherit; opacity: .7; }
.btn { display: inline-flex; align-items: center; text-decoration: none; }
.btn:hover { text-decoration: none; }
progress { appearance: none; -webkit-appearance: none; width: 160px; height: 6px; border: 0; border-radius: var(--radius-sm); background: var(--track); overflow: hidden; vertical-align: middle; }
progress::-webkit-progress-bar { background: var(--track); border-radius: var(--radius-sm); }
progress::-webkit-progress-value { background: var(--accent); border-radius: var(--radius-sm); }
progress::-moz-progress-bar { background: var(--accent); border-radius: var(--radius-sm); }
.panel + .panel, .panel + .stack-wide, .page-head + .panel { margin-top: 0; }

/* Lesetext */
.prose { max-width: 760px; }
.prose h2 { margin: var(--space-6) 0 var(--space-3); font-size: 16px; }
.prose h2:first-child { margin-top: 0; }
.prose p, .prose li { line-height: 1.65; }
.prose ul, .prose ol { margin: 0 0 var(--space-3); padding-left: 20px; }
.prose .lead { font-size: 15px; color: var(--ink); padding-bottom: var(--space-3); border-bottom: 1px solid var(--line-soft); }
.prose code { font-family: var(--font-mono); font-size: var(--text-xs); background: var(--line-soft); padding: 1px 4px; border-radius: var(--radius-sm); }
.list-title { font-weight: 500; margin-bottom: var(--space-1); }
.callout { border: 1px solid var(--line); border-radius: var(--radius); padding: var(--space-3) var(--space-4); margin: var(--space-4) 0; }
.callout p { margin: 0 0 var(--space-2); }
.callout p:last-child { margin-bottom: 0; }
.callout-label { font-size: var(--text-xs); font-weight: 600; margin-bottom: var(--space-1); color: var(--muted); }
.callout-tip .callout-label, .callout-example .callout-label, .callout-exercise .callout-label { color: var(--accent); }
.callout-warning .callout-label { color: var(--warn); }
.callout-myth .callout-label { color: var(--danger); }
.callout-ethics .callout-label { color: var(--ink); }
.exercise { margin-bottom: var(--space-3); }
.sources { font-size: var(--text-sm); }

/* Quiz */
fieldset.question { margin: 0; min-inline-size: 0; }
.question legend { font-weight: 500; padding: 0 var(--space-1); }
.question h3 { margin-top: 0; }
.option { display: flex; gap: var(--space-3); align-items: flex-start; padding: var(--space-2) 0; cursor: pointer; }
.option input { margin-top: 4px; accent-color: var(--accent); }

/* Karteikarten */
.cards { max-width: 720px; }
.card-face { border: 1px solid var(--line); border-radius: var(--radius); padding: var(--space-5); margin: var(--space-4) 0; background: var(--bg); }
.card-label { font-size: var(--text-xs); color: var(--muted); margin-bottom: var(--space-2); }
.card-text { font-size: 18px; font-weight: 500; line-height: 1.45; margin: 0; }
.card-back .card-text { font-weight: 400; font-size: 16px; }

/* Programm */
.week { padding: var(--space-3) var(--space-5); }
.week + .week, .panel + .week, .week + .panel { margin-top: 0; }
.week summary { display: flex; justify-content: space-between; gap: var(--space-4); cursor: pointer; padding: var(--space-1) 0; }
.week-title { font-weight: 600; }
.days { list-style: none; margin: var(--space-3) 0 0; padding: 0; }
.day { display: grid; grid-template-columns: auto 52px 1fr; gap: var(--space-3); align-items: start; padding: var(--space-2) 0; border-top: 1px solid var(--line-soft); cursor: pointer; }
.day input { margin-top: 4px; accent-color: var(--accent); }

/* Meldungen, Formulare, Ziele */
.notice { border: 1px solid var(--line); border-radius: var(--radius); padding: var(--space-3) var(--space-4); background: var(--surface); }
.notice-ok { color: var(--ok); border-color: var(--ok); }
.notice-fehler { color: var(--danger); border-color: var(--danger); }
.errors { color: var(--danger); margin: 0 0 var(--space-3); padding-left: 20px; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: var(--space-4); margin-bottom: var(--space-4); }
.form-grid .wide { grid-column: 1 / -1; }
.field textarea, .field select { font: 400 var(--text-md)/1.4 var(--font); padding: var(--space-2) var(--space-3); border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--ink); }
.field select { height: var(--control); padding-top: 0; padding-bottom: 0; }
.field textarea { min-height: 96px; resize: vertical; }
.field textarea:focus-visible, .field select:focus-visible { border-color: var(--accent); }
.field .hint { color: var(--muted); font-size: var(--text-xs); }
.field input[type="checkbox"], .field input[type="radio"] { height: auto; }
.inline-form { display: inline; margin: 0; }
.subrow td:first-child { padding-left: var(--space-5); }
.filters { display: flex; gap: var(--space-4); flex-wrap: wrap; font-size: var(--text-sm); }
.filters a[aria-current="true"] { color: var(--ink); font-weight: 600; text-decoration: none; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: var(--space-1) var(--space-5); margin: 0 0 var(--space-3); }
.kv dt { color: var(--muted); font-size: var(--text-sm); }
.kv dd { margin: 0; }
.btn-small { height: 26px; padding: 0 var(--space-2); font-size: var(--text-sm); }

/* Routinen, Frosch, Ideen */
.week-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: var(--space-2); }
.week-day { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: var(--space-2); text-align: center; }
.week-today { border-color: var(--accent); }
.week-full .mono { color: var(--ok); }
.week-partial .mono { color: var(--warn); }
.week-missed .mono { color: var(--danger); }
.week-none, .week-pending { color: var(--muted); }
.done { text-decoration: line-through; color: var(--muted); }
.starred { font-weight: 600; }
.idea { border-top: 1px solid var(--line-soft); padding: var(--space-3) 0; }
.idea:first-of-type { border-top: 0; }
.idea-actions { margin-top: var(--space-2); flex-wrap: wrap; gap: var(--space-2); }
.date-small { font: 400 var(--text-sm)/1 var(--font); height: 26px; padding: 0 var(--space-2); border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--ink); }
.quick .date-small { height: var(--control); }

/* Finanzen */
.tabs { margin-top: var(--space-2); }
.page-head .tabs + .meta { margin-top: var(--space-2); }
/* Ein Wert, der beim Umbrechen zusammenbleibt (z. B. „→ Zielkonto“ nicht allein in einer Zeile) */
.teil { display: inline-block; }
ol li.done { color: var(--muted); text-decoration: line-through; }
tfoot td { border-top: 1px solid var(--line); border-bottom: 0; padding-top: var(--space-3); }

/* Journal */
.quick { margin-top: var(--space-3); flex-wrap: wrap; }
.quick select, .quick input[type="text"], .quick input[type="number"] { font: 400 var(--text-md)/1 var(--font); height: var(--control); padding: 0 var(--space-3); border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--ink); }
.quick .grow { flex: 1 1 200px; min-width: 0; }
.quick .narrow { width: 76px; }
.day-card.today { border-color: var(--accent); }
.field textarea.tall { min-height: 280px; }
.plain-fieldset { border: 1px solid var(--line); border-radius: var(--radius); padding: var(--space-3) var(--space-4); margin: 0; min-width: 0; }
.plain-fieldset legend { padding: 0 var(--space-1); }

/* Artikulation */
.nowrap { white-space: nowrap; }
.num-col { width: 64px; white-space: nowrap; }
.beforeafter { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-4); margin: var(--space-4) 0; }
.ba { border: 1px solid var(--line); border-radius: var(--radius); padding: var(--space-3) var(--space-4); }
.ba p { margin: 0; }
.english { margin-top: var(--space-4); border-top: 1px solid var(--line-soft); padding-top: var(--space-3); }
.english summary { cursor: pointer; font-weight: 500; }
.timer-zeit { font-size: 40px; font-weight: 500; line-height: 1.2; }
.timer-phase { margin: var(--space-1) 0 var(--space-3); color: var(--muted); }
.timer-balken { display: flex; gap: var(--space-2); margin-bottom: var(--space-4); max-width: 480px; }
.timer-balken progress { flex: 1; width: auto; }
.certificate { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: var(--space-6); }
.certificate-inner { border: 1px solid var(--line); border-radius: var(--radius); padding: 48px var(--space-6); text-align: center; }
.certificate-inner h2 { font-size: 28px; margin: var(--space-2) 0 var(--space-5); letter-spacing: -0.01em; }
.certificate-name { font-size: 22px; font-weight: 600; margin: var(--space-2) 0 var(--space-4); min-height: 1.5em; }

@media print {
  .side, .no-print, .btn { display: none !important; }
  .shell { display: block; }
  .main { padding: 0; }
  body, .certificate { background: #fff; color: #000; }
  .certificate { border: 0; padding: 0; }
  .certificate-inner { border-color: #000; }
  .muted, .card-label { color: #333; }
}

@media (max-width: 760px) {
  .beforeafter { grid-template-columns: 1fr; }
  .shell { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr; } /* sonst wächst das Menü auf kurzen Seiten in die Höhe */ /* 1fr allein wächst mit dem breitesten Inhalt über den Bildschirm hinaus */
  img, svg, video, canvas { max-width: 100%; height: auto; }
  input, select, textarea { max-width: 100%; }
  .side { border-right: 0; border-bottom: 1px solid var(--line); padding: var(--space-3) var(--space-4); gap: var(--space-3); }
  .nav { flex-direction: row; flex-wrap: wrap; }
  .side-foot { margin-top: 0; flex-direction: row; flex-wrap: wrap; }
  .btn-quiet { width: auto; }
  .main { padding: var(--space-4) var(--space-4) var(--space-6); }
  /* Text in Tabellen bricht um; Beträge, Zahlen, Daten und .nowrap bleiben in einer Zeile. Das Panel scrollt nur noch, wenn wirklich nichts mehr schrumpft. */
  td, th { white-space: normal; overflow-wrap: break-word; }
  td.num, th.num, td.mono, td.num-col, td.nowrap, th.nowrap { white-space: nowrap; overflow-wrap: normal; }
  .panel { overflow-x: auto; }

  /* Zielliste als Karten: Titel in voller Breite, Stand darunter, Angaben in einer Zeile */
  .ziel-liste, .ziel-liste tbody { display: block; }
  .ziel-liste thead { display: none; }
  .ziel-liste tr { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--space-1) var(--space-3); padding: var(--space-3) 0; border-bottom: 1px solid var(--line); }
  .ziel-liste tr:last-child { border-bottom: 0; }
  .ziel-liste td { display: block; border: 0; padding: 0; white-space: normal; text-align: left; }
  .ziel-liste .c-titel { flex: 1 0 100%; font-size: var(--text-md); overflow-wrap: anywhere; }
  .ziel-liste .c-stand { flex: 1 0 100%; order: 2; }
  .ziel-liste .c-stand progress { display: block; width: 100%; height: 10px; margin-bottom: var(--space-1); }
  .ziel-liste .c-meta { order: 3; }
  .ziel-liste tr.subrow { padding-left: var(--space-4); }

  /* Langer Text in Tabellen bricht um statt aus dem Bild zu laufen */
  td.umbruch { white-space: normal; overflow-wrap: anywhere; }

  /* Allgemein: Tabellenzeilen als Karten. Erste Zelle c-titel (volle Breite), weitere mit data-label als Kachel, leere Zellen entfallen. */
  .stack, .stack tbody { display: block; }
  .auto-stack, .auto-stack tbody { display: block; }
  .stack thead { display: none; }
  .auto-stack thead { display: none; }
  .stack tr { display: grid; grid-template-columns: repeat(auto-fit, minmax(84px, 1fr)); align-items: start; gap: var(--space-2) var(--space-3); padding: var(--space-3) 0; border-bottom: 1px solid var(--line); }
  .auto-stack tr { display: grid; grid-template-columns: repeat(auto-fit, minmax(84px, 1fr)); align-items: start; gap: var(--space-2) var(--space-3); padding: var(--space-3) 0; border-bottom: 1px solid var(--line); }
  .stack tr:last-child { border-bottom: 0; }
  .auto-stack tr:last-child { border-bottom: 0; }
  .stack td { display: block; border: 0; padding: 0; white-space: normal; text-align: left; overflow-wrap: anywhere; }
  .auto-stack td { display: block; border: 0; padding: 0; white-space: normal; text-align: left; overflow-wrap: anywhere; }
  .stack td:empty { display: none; }
  .auto-stack td:empty { display: none; }
  .stack td.metrik span { display: block; }
  .auto-stack td.metrik span { display: block; }
  .stack td.c-titel, .stack td.c-aktion { grid-column: 1 / -1; }
  .auto-stack td.c-titel, .auto-stack td.c-aktion { grid-column: 1 / -1; }
  .stack td.c-titel { order: -1; }
  .auto-stack td.c-titel { order: -1; }
  .stack tfoot, .stack tfoot tr { display: block; }
  .auto-stack tfoot, .auto-stack tfoot tr { display: block; }
  .stack tfoot tr { display: flex; justify-content: space-between; gap: var(--space-3); padding: var(--space-3) 0 0; border-top: 1px solid var(--line); }
  .auto-stack tfoot tr { display: flex; justify-content: space-between; gap: var(--space-3); padding: var(--space-3) 0 0; border-top: 1px solid var(--line); }
  .stack tfoot td { display: block; padding: 0; border: 0; }
  .auto-stack tfoot td { display: block; padding: 0; border: 0; }
  .stack td[data-label]::before { content: attr(data-label); display: block; font: 400 var(--text-xs)/1.4 var(--font); color: var(--muted); margin-bottom: 2px; }
  .auto-stack td[data-label]::before { content: attr(data-label); display: block; font: 400 var(--text-xs)/1.4 var(--font); color: var(--muted); margin-bottom: 2px; }
  .panel > progress { display: block; width: 100%; }

  /* Aktions-Buttons in Kartenzeilen: nie umbrechen, Touch-Ziel mind. 44 px, Abhaken über die ganze Breite */
  .stack .btn, .auto-stack .btn, .ziel-liste .btn { white-space: nowrap; overflow-wrap: normal; }
  .stack .btn-small, .auto-stack .btn-small { height: 44px; padding: 0 var(--space-4); font-size: var(--text-md); }
  .stack td.num-col, .auto-stack td.num-col { grid-column: 1 / -1; width: auto; }
  .stack td.num-col .inline-form, .stack td.c-aktion .btn { display: flex; width: 100%; }
  .stack td.num-col .btn, .stack td.c-aktion .btn { width: 100%; justify-content: center; }

  /* Ein bis zwei Spalten, die überlaufen: alles darf umbrechen (gesetzt von tabellen.js) */
  .auto-wrap td, .auto-wrap th, .auto-wrap td.num, .auto-wrap td.mono, .auto-wrap td.nowrap { white-space: normal; overflow-wrap: anywhere; }

  /* Journal-Schnelleinträge: Art und Löschen oben, Text darunter in voller Breite */
  .schnell-liste, .schnell-liste tbody { display: block; }
  .schnell-liste tr { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-1) var(--space-3); padding: var(--space-2) 0; border-bottom: 1px solid var(--line-soft); }
  .schnell-liste tr:last-child { border-bottom: 0; }
  .schnell-liste td { display: block; border: 0; padding: 0; }
  .schnell-liste .c-art { order: 1; }
  .schnell-liste .c-aktion { order: 2; margin-left: auto; }
  .schnell-liste .c-text { order: 3; flex: 1 0 100%; }
}

/* Finanzen: Analyse, Diagramme, Prüfung */
.donut-wrap { display: flex; gap: var(--space-5); align-items: center; flex-wrap: wrap; margin-bottom: var(--space-4); }
.donut { width: 160px; height: 160px; flex: none; }
.donut-spur { stroke: var(--line); }
.seg { stroke: var(--accent); }
.seg-1 { stroke-opacity: 1; } .seg-2 { stroke-opacity: .82; } .seg-3 { stroke-opacity: .66; } .seg-4 { stroke-opacity: .52; }
.seg-5 { stroke-opacity: .4; } .seg-6 { stroke-opacity: .3; } .seg-7 { stroke-opacity: .22; } .seg-rest { stroke: var(--muted); stroke-opacity: .5; }
.swatch { display: inline-block; width: 10px; height: 10px; border-radius: 2px; background: var(--accent); }
.sw-1 { opacity: 1; } .sw-2 { opacity: .82; } .sw-3 { opacity: .66; } .sw-4 { opacity: .52; }
.sw-5 { opacity: .4; } .sw-6 { opacity: .3; } .sw-7 { opacity: .22; } .sw-rest { background: var(--muted); opacity: .5; }
.sw-ein { background: var(--ok); } .sw-aus { background: var(--accent); }
.legende { width: auto; flex: 1; min-width: 220px; }
.monate { width: 100%; height: auto; max-height: 220px; }
.monate .achse { stroke: var(--line); stroke-width: 1; }
.monate .bar-ein { fill: var(--ok); }
.monate .bar-aus { fill: var(--accent); }
.monate .achsentext { fill: var(--muted); font-size: 11px; }
.eingerueckt { margin-left: var(--space-3); }
.befunde { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--space-3); }
.befund { border-left: 3px solid var(--line); padding: var(--space-2) var(--space-3); }
.befund-achtung { border-left-color: var(--warn); }
.filter-form { margin-top: var(--space-3); }

/* Finanzen: Budgets und Töpfe */
.budgets { display: grid; gap: var(--space-4); padding: 0; list-style: none; }
.budget-balken progress, .budget-mini { width: 100%; height: 10px; accent-color: var(--accent); }
.budget-mini { width: 120px; display: block; margin-top: var(--space-1); height: 6px; }
.budget-warnung progress { accent-color: var(--warn); }
.budget-ueber progress, .budget-mini.ueber { accent-color: var(--danger); }
.topf-form { align-items: flex-end; margin-bottom: var(--space-3); }

/* Visionen und Visionboard */
.kennzahlen { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: var(--space-4); margin: 0; }
.kennzahlen dt { color: var(--muted); font-size: var(--text-xs); }
.kennzahlen dd { margin: 0; font-size: 18px; }
.vision-karten { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: var(--space-5); }
.vision-karte h2 { margin-bottom: var(--space-1); }
.vision-bild { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--radius); margin-bottom: var(--space-3); background: var(--track); }
.vision-kopf { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: var(--space-5); align-items: start; }
.vision-kopf > div:only-child { grid-column: 1 / -1; }
.vision-kopf .vision-bild { margin-bottom: 0; }
.balken-zeile { display: flex; align-items: center; gap: var(--space-2); margin-bottom: var(--space-2); flex-wrap: wrap; }
.balken-zeile > .small:first-child { min-width: 96px; }
.balken-zeile progress { flex: 1 1 120px; width: auto; }
.warum { border-left: 3px solid var(--accent); padding-left: var(--space-3); }
.zeitleiste { list-style: none; margin: 0; padding: 0; }
.zeitleiste > li { border-left: 2px solid var(--line); padding: 0 0 var(--space-3) var(--space-4); position: relative; }
.zeitleiste > li::before { content: ""; position: absolute; left: -6px; top: 4px; width: 10px; height: 10px; border-radius: 50%; background: var(--surface); border: 2px solid var(--line); }
.zeitleiste > li.vorbei { color: var(--muted); }
.zeitleiste > li.jetzt::before { background: var(--accent); border-color: var(--accent); }
.zeitleiste-jahr { font-size: var(--text-sm); font-weight: 600; margin-bottom: var(--space-1); }
.zeitleiste .jetzt .zeitleiste-jahr { color: var(--accent); }
.board { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: var(--space-4); margin-bottom: var(--space-3); }
.kachel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: var(--space-3); margin: 0; display: flex; flex-direction: column; gap: var(--space-2); min-width: 0; }
.kachel p { margin: 0; overflow-wrap: anywhere; }
.kachel img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius-sm); background: var(--track); }
.kachel-notiz { background: var(--accent-soft); }
.kachel-notiz .notiz { font-size: 15px; line-height: 1.5; }
.kachel-aktionen { margin-top: auto; gap: var(--space-1); }
.kachel-aktionen .btn-quiet { width: auto; }
/* Bildausschnitt: Brennpunkt in fünf Stufen (Klassen statt Inline-Style, wegen CSP) */
.fx0 { --fx: 0%; } .fx5 { --fx: 5%; } .fx10 { --fx: 10%; } .fx15 { --fx: 15%; } .fx20 { --fx: 20%; } .fx25 { --fx: 25%; } .fx30 { --fx: 30%; } .fx35 { --fx: 35%; } .fx40 { --fx: 40%; } .fx45 { --fx: 45%; } .fx50 { --fx: 50%; } .fx55 { --fx: 55%; } .fx60 { --fx: 60%; } .fx65 { --fx: 65%; } .fx70 { --fx: 70%; } .fx75 { --fx: 75%; } .fx80 { --fx: 80%; } .fx85 { --fx: 85%; } .fx90 { --fx: 90%; } .fx95 { --fx: 95%; } .fx100 { --fx: 100%; }
.fy0 { --fy: 0%; } .fy5 { --fy: 5%; } .fy10 { --fy: 10%; } .fy15 { --fy: 15%; } .fy20 { --fy: 20%; } .fy25 { --fy: 25%; } .fy30 { --fy: 30%; } .fy35 { --fy: 35%; } .fy40 { --fy: 40%; } .fy45 { --fy: 45%; } .fy50 { --fy: 50%; } .fy55 { --fy: 55%; } .fy60 { --fy: 60%; } .fy65 { --fy: 65%; } .fy70 { --fy: 70%; } .fy75 { --fy: 75%; } .fy80 { --fy: 80%; } .fy85 { --fy: 85%; } .fy90 { --fy: 90%; } .fy95 { --fy: 95%; } .fy100 { --fy: 100%; }
.kachel img, .collage-kachel img, .vision-bild { object-position: var(--fx, 50%) var(--fy, 50%); }
.fokus-wahl { position: relative; display: block; max-width: 480px; aspect-ratio: 16 / 9; overflow: hidden; border-radius: var(--radius); background: var(--track); cursor: grab; touch-action: none; user-select: none; }
.fokus-wahl.zieht { cursor: grabbing; }
.fokus-wahl img { display: block; width: 100%; height: 100%; object-fit: cover; pointer-events: none; -webkit-user-drag: none; object-position: var(--fx, 50%) var(--fy, 50%); }
.fokus-wahl:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.vorschau { display: block; max-width: 320px; width: 100%; border-radius: var(--radius); }
.warum-bild { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--radius); margin-bottom: var(--space-2); background: var(--track); }
.fokus { display: grid; gap: var(--space-5); }
.fokus-folie { margin: 0; display: flex; flex-direction: column; gap: var(--space-4); }
.fokus-folie img { display: block; width: 100%; max-height: 70vh; object-fit: contain; border-radius: var(--radius); }
.fokus-unterschrift { font-size: 18px; font-weight: 500; }
.fokus.aktiv .fokus-folie { display: none; }
.fokus.aktiv .fokus-folie.zu-sehen { display: flex; }
.fokus:fullscreen { background: var(--bg); padding: var(--space-5); overflow: auto; }
.fokus:fullscreen .fokus-folie img { max-height: 78vh; }
@media (max-width: 760px) {
  .vision-kopf { grid-template-columns: minmax(0, 1fr); }
}

/* Aufklappbare Zeile (Cashflow): Bezeichnung links, Betrag rechts, darunter die Bestandteile */
.aufklapp > summary { display: flex; justify-content: space-between; align-items: baseline; gap: var(--space-4); padding: 9px 0; border-bottom: 1px solid var(--line-soft); cursor: pointer; list-style: none; }
.aufklapp > summary::-webkit-details-marker { display: none; }
.aufklapp > summary > :first-child::before { content: "▸"; display: inline-block; width: 1.1em; color: var(--muted); }
.aufklapp[open] > summary > :first-child::before { content: "▾"; }
.aufklapp > summary .mono { white-space: nowrap; font-size: var(--text-sm); }
.aufklapp > summary:hover { background: var(--line-soft); }
.aufklapp-inhalt { padding: var(--space-2) 0 var(--space-3) var(--space-4); border-bottom: 1px solid var(--line-soft); }
.aufklapp-inhalt table { margin-bottom: var(--space-2); }
.aufklapp-inhalt p:last-child { margin-bottom: 0; }
.aufklapp + table { margin-top: 0; }

/* Heute anordnen */
.anordnen td.right { white-space: normal; }
.anordnen td.right .inline-form + .inline-form { margin-left: var(--space-1); }

/* Collage: Board-Bilder als lückenloses Mosaik. Flex-Zeilen füllen sich immer; im Wechsel eine Zeile mit zwei großen,
   eine mit drei kleineren Kacheln. */
.collage { display: flex; flex-wrap: wrap; gap: 3px; border-radius: var(--radius); overflow: hidden; margin-bottom: var(--space-3); }
.collage-kachel { display: block; flex: 1 1 30%; height: 96px; min-width: 0; background: var(--track); }
.collage-kachel img { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: 0; }
.collage-kachel:nth-child(5n+1) { flex-basis: 58%; height: 150px; }
.collage-kachel:nth-child(5n+2) { flex-basis: 38%; height: 150px; }
.collage-1 .collage-kachel { height: 200px; }
.collage-board .collage-kachel { height: 150px; }
.collage-board .collage-kachel:nth-child(5n+1), .collage-board .collage-kachel:nth-child(5n+2) { height: 260px; }
.collage-board.collage-1 .collage-kachel { height: 320px; }
.collage-kachel:hover img { filter: brightness(1.06); }
@media (max-width: 760px) {
  .collage-board .collage-kachel { height: 96px; }
  .collage-board .collage-kachel:nth-child(5n+1), .collage-board .collage-kachel:nth-child(5n+2) { height: 150px; }
}

/* Zeitstrahl der Ziele (baut auf .zeitleiste auf) */
.zeitstrahl > li { padding-bottom: var(--space-5); }
.zeitstrahl-monat h3 { margin: var(--space-3) 0 var(--space-1); font-size: var(--text-sm); color: var(--muted); font-weight: 600; }
.zeitstrahl-monat.jetzt h3 { color: var(--accent); }
.zeitstrahl-monat.vorbei .zeitstrahl-ziel:not(.ueberfaellig) { color: var(--muted); }
.zeitstrahl-ziel { padding: var(--space-1) 0; }
.zeitstrahl-ziel .balken-zeile { margin: var(--space-1) 0 0; max-width: 420px; }
.zeitstrahl-ziel.ueberfaellig { border-left: 3px solid var(--warn); padding-left: var(--space-2); }
.zeitstrahl-heute { border-top: 2px solid var(--accent); color: var(--accent); padding-top: 2px; margin: var(--space-2) 0; }
/* Cashflow: Aufteilung unter den Summen der monatlichen Last */
.aufteilung { margin: 0 0 var(--space-2); }
.aufteilung td { padding-top: 2px; padding-bottom: 2px; border: 0; }
.aufteilung td:first-child { padding-left: var(--space-4); }
.hinweis { display: inline-block; margin-left: var(--space-2); padding: 0 6px; border: 1px solid var(--line); border-radius: var(--radius-sm); font-size: var(--text-xs, 11px); color: var(--muted); white-space: nowrap; }

/* Heute: gemeinsame Kachel (Frosch, Routinen, Mein Tag) und Konten-Zwischenüberschrift */
.tag-teil h3 { font-size: .95rem; margin: 0 0 .4rem; }
.tag-teil-folge { margin-top: 1.25rem; padding-top: 1rem; border-top: 1px solid var(--line, rgba(128,128,128,.25)); }
.panel table caption { text-align: left; padding-top: .75rem; }

/* Wissen */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wissen-kopf { margin-top: var(--space-3); gap: var(--space-3); flex-wrap: wrap; }
.wissen-kopf .tabs { display: flex; gap: var(--space-3); flex-wrap: wrap; margin: 0; }
.wissen-kopf .tabs a[aria-current="true"] { font-weight: 600; color: var(--ink); }
.wissen { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: var(--space-4); align-items: start; }
@media (max-width: 800px) { .wissen { grid-template-columns: minmax(0, 1fr); } }
.wissen-baum { padding: var(--space-3); }
.baum { list-style: none; margin: 0 0 var(--space-3); padding: 0; }
.baum li { padding: 2px 0; }
.baum a[aria-current="page"] { font-weight: 600; color: var(--ink); }
.baum .tiefe-1 { padding-left: var(--space-3); } .baum .tiefe-2 { padding-left: var(--space-5); }
.baum .tiefe-3 { padding-left: 36px; } .baum .tiefe-4 { padding-left: 48px; }
.baum .tiefe-5 { padding-left: 60px; } .baum .tiefe-6 { padding-left: 72px; }
.notizliste { list-style: none; margin: 0 0 var(--space-3); padding: 0; }
.notizliste li { padding: var(--space-1) 0; border-bottom: 1px solid var(--line-soft); }
.notizliste li:last-child { border-bottom: 0; }
.notiztext { max-width: 820px; overflow-wrap: anywhere; }
.notiztext h2, .notiztext h3, .notiztext h4 { margin: var(--space-5) 0 var(--space-2); }
.notiztext h2:first-child, .notiztext h3:first-child { margin-top: 0; }
.notiztext pre { background: var(--line-soft); padding: var(--space-3); overflow-x: auto; border-radius: var(--radius); }
.notiztext pre code { background: none; padding: 0; }
.notiztext blockquote { margin: 0 0 var(--space-3); padding: 0 var(--space-3); border-left: 3px solid var(--line); color: var(--muted); }
.notiztext table { border-collapse: collapse; margin-bottom: var(--space-3); }
.notiztext th, .notiztext td { border: 1px solid var(--line); padding: var(--space-1) var(--space-2); }
.notiztext .ausr-right { text-align: right; } .notiztext .ausr-center { text-align: center; }
.notiztext li.aufgabe { list-style: none; margin-left: -20px; }
.notiztext a.wiki { border-bottom: 1px dotted var(--accent); }
.notiztext a.wiki.offen { color: var(--warn); border-bottom-color: var(--warn); }
.roh { white-space: pre-wrap; overflow-wrap: anywhere; margin: 0; font-family: var(--font-mono); font-size: var(--text-xs); }

.leiste { display: flex; flex-wrap: wrap; gap: var(--space-1); margin-bottom: var(--space-2); }
.leiste[hidden] { display: none; }
.wysiwyg-host { margin-bottom: var(--space-2); }
.wissen-verweis-knopf { font: 600 12px var(--font-mono); width: auto; padding: 0 var(--space-2); border: 0; background: none; color: inherit; cursor: pointer; height: 32px; }
.wysiwyg-host .toastui-editor-defaultUI-toolbar { flex-wrap: wrap; height: auto; }
.wysiwyg-host .toastui-editor-toolbar { height: auto; }
.wysiwyg-host .toastui-editor-toolbar-group { flex-wrap: wrap; }
@media (max-width: 800px) { .wysiwyg-host .toastui-editor-popup { left: 0.5rem !important; right: 0.5rem; width: auto; max-width: none; margin-left: 0; } }

/* Wissen: Karten, Suchfeld, Titelzeile (nach BENRI) */
.wissen-tabs { display: flex; gap: var(--space-3); flex-wrap: wrap; margin: 0 0 var(--space-3); }
.wissen-tabs a[aria-current="true"] { font-weight: 600; color: var(--ink); }
.suchfeld { display: flex; align-items: center; gap: var(--space-2); background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 0 var(--space-4); min-height: 44px; margin-bottom: var(--space-3); color: var(--muted); }
.suchfeld:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.suchfeld input[type="search"] { flex: 1; min-width: 0; border: 0; background: none; color: var(--ink); font: inherit; height: 42px; outline: none; }
.suchfeld .option { white-space: nowrap; font-size: var(--text-xs); }
.wissen-baum > summary { cursor: pointer; font-weight: 600; padding: var(--space-1) 0; }
.wissen-baum[open] > summary { margin-bottom: var(--space-2); }
.titelzeile { align-items: flex-start; gap: var(--space-3); }
.titelzeile h1 { overflow-wrap: anywhere; }
.titelzeile .anzahl { font-size: var(--text-sm); font-weight: 400; margin-left: var(--space-2); white-space: nowrap; }
.titel-symbol { font-size: 0.9em; }
.stern-knopf { width: 40px; height: 40px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--ink); font-size: 18px; cursor: pointer; }
.stern-knopf[aria-pressed="true"] { color: var(--warn); }
.eintraege { list-style: none; margin: 0 0 var(--space-3); padding: 0; display: grid; gap: var(--space-2); }
.karte { display: flex; align-items: center; gap: var(--space-3); min-height: 48px; padding: var(--space-2) var(--space-4); background: var(--line-soft); border: 1px solid var(--line); border-radius: var(--radius); color: var(--ink); font-weight: 500; }
.karte:hover { text-decoration: none; border-color: var(--accent); }
.karte .ico { flex: none; color: var(--muted); }
.karte .ico-emoji { color: inherit; font-size: 20px; line-height: 1; width: 20px; text-align: center; }
.karte-text { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.wissen .stack-wide { max-width: none; }
.wissen .notiztext { max-width: none; }

/* Seitenwechsel ohne weißes Aufblitzen (besonders in der installierten App): Chrome, Edge und Safari blenden kurz über. */
@media (prefers-reduced-motion: no-preference) {
  @view-transition { navigation: auto; }
  ::view-transition-group(root) { animation-duration: 0.12s; }
}
