/* Ghaleb OS. Gestaltung nach DESIGN.md (getdesign "uber", Schwarz-Weiß-Duett):
   eine Ink-Farbe für Aktionen, Grautöne für alles andere, Pillen für alles Klickbare,
   Karten mit 16px Radius, Inter statt der proprietären Schrift. Rot nur für Überfälliges/Fehler. */
:root {
  --bg: #ffffff;            /* canvas */
  --flaeche: #ffffff;       /* card-content */
  --flaeche-2: #efefef;     /* canvas-soft */
  --flaeche-3: #f3f3f3;     /* canvas-softer */
  --gedrueckt: #e2e2e2;     /* surface-pressed */
  --text: #000000;          /* ink */
  --text-2: #5e5e5e;        /* body */
  --text-3: #afafaf;        /* mute */
  --linie: #e2e2e2;
  --akzent: #000000;        /* primary */
  --akzent-text: #ffffff;   /* on-primary */
  --invers: #000000;        /* promo-card-on-dark */
  --invers-text: #ffffff;
  --rot: #c4271c;
  --gelb: #000000;
  --gruen: #000000;
  --radius: 16px;           /* rounded.xl */
  --radius-feld: 8px;       /* rounded.md */
  --pille: 999px;           /* rounded.pill */
  --schatten-1: rgba(0, 0, 0, 0.12) 0px 4px 16px 0px;
  --schatten-2: rgba(0, 0, 0, 0.16) 0px 4px 16px 0px;
  --schatten-3: rgba(0, 0, 0, 0.16) 0px 2px 8px 0px;
  --nav-hoehe: 68px;
  --schrift: "Inter", system-ui, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}
/* Dunkel: automatisch nach System, außer "Hell" ist gewählt; oder fest über data-theme="dark" */
@media (prefers-color-scheme: dark) {
  /* Polaritätswechsel: Ink wird Fläche, Weiß wird Aktion */
  :root:not([data-theme="light"]) {
    --bg: #000000;
    --flaeche: #141414;
    --flaeche-2: #282828;     /* black-elevated */
    --flaeche-3: #1d1d1d;
    --gedrueckt: #333333;
    --text: #ffffff;
    --text-2: #afafaf;
    --text-3: #757575;
    --linie: #282828;
    --akzent: #ffffff;
    --akzent-text: #000000;
    --invers: #ffffff;
    --invers-text: #000000;
    --rot: #ff6b5e;
    --gelb: #ffffff;
    --gruen: #ffffff;
    --schatten-1: rgba(0, 0, 0, 0.5) 0px 4px 16px 0px;
    --schatten-2: rgba(0, 0, 0, 0.6) 0px 4px 16px 0px;
    --schatten-3: rgba(0, 0, 0, 0.6) 0px 2px 8px 0px;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #000000;
  --flaeche: #141414;
  --flaeche-2: #282828;     /* black-elevated */
  --flaeche-3: #1d1d1d;
  --gedrueckt: #333333;
  --text: #ffffff;
  --text-2: #afafaf;
  --text-3: #757575;
  --linie: #282828;
  --akzent: #ffffff;
  --akzent-text: #000000;
  --invers: #ffffff;
  --invers-text: #000000;
  --rot: #ff6b5e;
  --gelb: #ffffff;
  --gruen: #ffffff;
  --schatten-1: rgba(0, 0, 0, 0.5) 0px 4px 16px 0px;
  --schatten-2: rgba(0, 0, 0, 0.6) 0px 4px 16px 0px;
  --schatten-3: rgba(0, 0, 0, 0.6) 0px 2px 8px 0px;
  color-scheme: dark;
  }

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font: 400 16px/24px var(--schrift);   /* body-md */
  font-feature-settings: "ss01";
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
button { font: inherit; color: inherit; }

.shell { display: flex; min-height: 100%; }

/* Navigation: unten am Handy, Seitenleiste am Desktop (ex-app-shell-row) */
.nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 10;
  display: flex; gap: 2px;
  height: calc(var(--nav-hoehe) + env(safe-area-inset-bottom));
  padding: 6px 4px env(safe-area-inset-bottom);
  background: var(--bg); border-top: 1px solid var(--linie);
}
.nav-punkt {
  flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  border: 0; background: none; border-radius: var(--pille); padding: 4px 0; cursor: pointer;
  color: var(--text-3); font-size: 10.5px; font-weight: 500; line-height: 12px; white-space: nowrap; text-decoration: none; position: relative;
  transition: color var(--duration-quick, 150ms) var(--ease-smooth-out, ease);
}
.nav-punkt svg { width: 22px; height: 22px; }
.nav-punkt[aria-current="page"] { color: var(--text); }
.nav-punkt[aria-current="page"] svg { stroke-width: 2.2; }
.nav-marke { display: none; }

.main { flex: 1; min-width: 0; padding: 0 16px calc(var(--nav-hoehe) + env(safe-area-inset-bottom) + 24px); padding-top: env(safe-area-inset-top); }
.kopf { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 24px 0 20px; max-width: 1200px; }
.kopf-titel { margin: 0; font-size: 32px; line-height: 40px; font-weight: 700; }   /* display-lg */
.kopf-unter { margin: 4px 0 0; color: var(--text-2); font-size: 14px; line-height: 20px; }

@media (min-width: 860px) {
  .nav {
    position: sticky; top: 0; bottom: auto; right: auto; flex-direction: column; gap: 4px;
    width: 232px; height: 100vh; padding: 24px 16px; border-top: 0; border-right: 1px solid var(--linie);
  }
  .nav-marke { display: block; font-weight: 700; font-size: 24px; line-height: 32px; padding: 0 12px 24px; }
  .nav-punkt {
    flex: 0 0 auto; flex-direction: row; justify-content: flex-start; gap: 12px; padding: 12px 16px;
    font-size: 16px; line-height: 20px; color: var(--text-2); border-radius: var(--radius-feld);
  }
  .nav-punkt:hover { background: var(--flaeche-3); color: var(--text); }
  .nav-punkt[aria-current="page"] { background: var(--flaeche-2); color: var(--text); box-shadow: inset 3px 0 0 var(--akzent); }
  .nav-punkt svg { width: 20px; height: 20px; }
  .main { padding: 0 32px 32px; }
  .kopf { padding: 32px 0 24px; }
  .kopf-titel { font-size: 36px; line-height: 44px; }   /* display-xl */
}

.inhalt { display: grid; gap: 16px; grid-template-columns: 1fr; max-width: 1200px; }
@media (min-width: 1100px) { .inhalt.zwei { grid-template-columns: 1fr 1fr; gap: 24px; align-items: start; } }

/* card-content: flach, Kontrast über eine feine Linie */
.karte { background: var(--flaeche); border: 1px solid var(--linie); border-radius: var(--radius); padding: 20px; min-width: 0; }
@media (min-width: 860px) { .karte { padding: 24px; } }
.karte h2 { margin: 0 0 16px; font-size: 20px; line-height: 28px; font-weight: 700; display: flex; align-items: center; gap: 8px; }   /* display-sm */
.karte h2 .pille { margin-left: auto; }
.liste { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
/* Einträge als canvas-softer-Flächen ohne Linie */
.eintrag { border: 0; border-radius: 12px; padding: 16px; background: var(--flaeche-3); }
.eintrag-kopf { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.eintrag-titel { font-weight: 500; font-size: 16px; line-height: 20px; overflow-wrap: anywhere; text-decoration: none; }   /* body-md-strong */
.meta { color: var(--text-2); font-size: 12px; line-height: 20px; margin-top: 2px; }   /* caption */
.text { font-size: 14px; line-height: 20px; margin: 8px 0 0; color: var(--text-2); overflow-wrap: anywhere; white-space: pre-wrap; }   /* body-sm */
.text.kurz { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.leer { color: var(--text-2); font-size: 14px; line-height: 20px; margin: 0; }

/* category-button: graue Pille; Status als gefüllte Ink-Pille */
.pille { display: inline-flex; align-items: center; height: 26px; padding: 0 12px; border-radius: var(--pille); font-size: 12px; font-weight: 500; line-height: 16px; background: var(--flaeche-2); color: var(--text); white-space: nowrap; flex-shrink: 0; }
.pille.gruen, .pille.gelb { background: var(--invers); color: var(--invers-text); }
.pille.rot { background: var(--rot); color: #fff; }

/* button-primary (Ink-Pille) und button-subtle (graue Pille) */
.knoepfe { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 16px; align-items: center; }
.knopf {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 10px 20px;
  border-radius: var(--pille); border: 0; background: var(--akzent); color: var(--akzent-text);
  font-size: 16px; font-weight: 500; line-height: 20px; cursor: pointer; text-decoration: none;
  transition: background var(--duration-quick, 150ms) var(--ease-smooth-out, ease), opacity var(--duration-quick, 150ms) ease;
}
.knopf:hover { opacity: 0.86; }
.knopf-leise { background: var(--flaeche-2); color: var(--text); }
.knopf-leise:hover { opacity: 1; background: var(--gedrueckt); }
.knopf:disabled { opacity: 0.4; cursor: default; }
/* button-secondary: weiße Pille auf den grauen Einträgen */
.eintrag .knopf-leise { background: var(--flaeche); }
.eintrag .knopf-leise:hover { background: var(--gedrueckt); }
@media (max-width: 600px) { .karte { padding: 16px; } .eintrag { padding: 14px; } }
/* Aktualisieren: icon-button-circular */
#neu-laden { width: 44px; height: 44px; padding: 0; border-radius: 50%; }
.link { font-size: 14px; font-weight: 500; text-decoration: underline; text-underline-offset: 3px; padding: 8px 2px; cursor: pointer; background: none; border: 0; color: var(--text); }

.check { display: flex; gap: 12px; align-items: flex-start; padding: 12px 0; border-bottom: 1px solid var(--linie); cursor: pointer; font-size: 16px; line-height: 22px; }
.check:last-child { border-bottom: 0; }

/* Kennzahlen: erste Kachel als Ink-Fläche (promo-card-on-dark), Rest soft-tinted */
.zahlen { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
@media (min-width: 640px) { .zahlen { grid-template-columns: repeat(4, 1fr); } }
/* In der halben Spalte des Zwei-Spalten-Layouts nur zwei Kacheln nebeneinander */
@media (min-width: 1100px) and (max-width: 1499px) { .inhalt.zwei .zahlen { grid-template-columns: repeat(2, 1fr); } }
.zahl-kachel { background: var(--flaeche-2); border: 0; border-radius: var(--radius); padding: 16px 20px; text-decoration: none; display: block; color: var(--text); }
.zahl-kachel:first-child { background: var(--invers); color: var(--invers-text); }
.zahl-kachel:first-child > span { color: inherit; opacity: 0.72; }
.zahl-kachel b { display: block; font-size: 36px; line-height: 44px; font-weight: 700; font-variant-numeric: tabular-nums; }   /* display-xl */
.zahl-kachel > span { color: var(--text-2); font-size: 14px; line-height: 20px; }
/* Kennzahlen innerhalb einer Karte: display-md statt display-xl */
.karte .zahl-kachel { padding: 14px 16px; }
.karte .zahl-kachel b { font-size: 24px; line-height: 32px; white-space: nowrap; }

/* text-input */
.antwort textarea { width: 100%; min-height: 88px; resize: vertical; padding: 16px; border-radius: var(--radius-feld); border: 0; background: var(--flaeche-2); color: var(--text); font: 400 16px/24px var(--schrift); }
.antwort textarea:focus, .suche:focus { outline: 2px solid var(--akzent); outline-offset: 0; }

.agenten { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; max-width: 1200px; }
.job { display: flex; justify-content: space-between; gap: 8px; font-size: 14px; line-height: 20px; padding: 8px 0; border-top: 1px solid var(--linie); }
.job:first-of-type { border-top: 0; }

.bald { text-align: center; padding: 48px 24px; color: var(--text-2); background: var(--flaeche-2); border: 0; }
.bald b { display: block; color: var(--text); font-size: 24px; line-height: 32px; margin-bottom: 8px; }

.hinweis.fehler { color: var(--rot); }

.hermes-frame {
  display: block; width: 100%; max-width: 1200px; border: 1px solid var(--linie); border-radius: var(--radius); background: var(--flaeche);
  height: calc(100vh - 140px - var(--nav-hoehe) - env(safe-area-inset-bottom));
  height: calc(100dvh - 140px - var(--nav-hoehe) - env(safe-area-inset-bottom));
}
@media (min-width: 860px) { .hermes-frame { height: calc(100vh - 140px); } }

.suche { width: 100%; max-width: 1200px; height: 56px; padding: 0 20px; border-radius: var(--radius-feld); border: 0; background: var(--flaeche-2); color: var(--text); font: 400 16px/24px var(--schrift); }
.suche::placeholder { color: var(--text-3); }
#vault-treffer { display: grid; gap: 16px; }
.klickbar { cursor: pointer; transition: background var(--duration-quick, 150ms) var(--ease-smooth-out, ease); }
.klickbar:hover { background: var(--flaeche-2); }
.md { font-size: 16px; line-height: 26px; overflow-wrap: anywhere; }
.md h2, .md h3, .md h4, .md h5 { margin: 24px 0 8px; font-weight: 700; }
.md h2 { font-size: 24px; line-height: 32px; } .md h3 { font-size: 20px; line-height: 28px; } .md h4, .md h5 { font-size: 16px; line-height: 20px; }
.md p { margin: 8px 0; }
.md ul, .md ol { margin: 8px 0; padding-left: 22px; }
.md ul.md-check { list-style: none; padding-left: 4px; }
.md li { margin: 4px 0; }
.md code { background: var(--flaeche-2); padding: 2px 6px; border-radius: 6px; font-size: 14px; }
.md pre { background: var(--flaeche-2); padding: 16px; border-radius: 12px; overflow-x: auto; font-size: 14px; }
.md blockquote { margin: 12px 0; padding: 4px 16px; border-left: 3px solid var(--akzent); color: var(--text-2); }
.md hr { border: 0; border-top: 1px solid var(--linie); margin: 20px 0; }
.md a { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }
.md .tag { color: var(--text-2); font-size: 14px; font-weight: 500; }

.balken { height: 8px; border-radius: var(--pille); background: var(--flaeche-2); overflow: hidden; margin-top: 8px; }
.balken span { display: block; height: 100%; border-radius: var(--pille); background: var(--akzent); }
.zeile { display: flex; align-items: center; gap: 10px; padding: 8px 0; font-size: 16px; line-height: 20px; }
.punkt { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; background: var(--text-3); }
.punkt.gut { background: var(--akzent); }
.punkt.schlecht { background: var(--rot); }
.agent-zeile { padding: 12px 0; border-top: 1px solid var(--linie); }
.agent-zeile:first-child { border-top: 0; padding-top: 0; }
.agent-zeile .zeile .pille { margin-left: auto; }
.fehlerliste { margin: 2px 0 8px 20px; padding: 0; font-size: 12px; line-height: 18px; color: var(--text-2); overflow-wrap: anywhere; }

/* ============================================================
   transitions.dev (Skill transitions-dev): Variablen + Snippets
   Snippets unverändert übernommen, Anpassungen ans OS darunter.
   ============================================================ */
:root {
  /* Motion tokens */
  --duration-quick: 150ms;
  --duration-fast: 250ms;
  --ease-smooth-out: cubic-bezier(0.22, 1, 0.36, 1);
  /* Number pop-in */
  --digit-dur: 500ms;
  --digit-distance: 8px;
  --digit-stagger: 70ms;
  --digit-blur: 2px;
  --digit-ease: cubic-bezier(0.34, 1.45, 0.64, 1);
  --digit-dir-x: 0;
  --digit-dir-y: 1;
  /* Notification badge */
  --badge-slide-dur: 260ms;
  --badge-pop-dur: 500ms;
  --badge-pop-close-dur: 180ms;
  --badge-fade-dur: 400ms;
  --badge-fade-close-dur: 180ms;
  --badge-blur: 2px;
  --badge-offset-x: -8.2px;
  --badge-offset-y: 12.4px;
  --badge-slide-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --badge-pop-ease: cubic-bezier(0.34, 1.36, 0.64, 1);
  --badge-close-ease: cubic-bezier(0.4, 0, 0.2, 1);
  /* Tabs sliding (Farben aus dem OS-Theme) */
  --tabs-dur: 250ms;
  --tabs-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --tabs-text-muted: var(--text-2);
  --tabs-text-active: var(--text);
  --tabs-bar-bg: var(--flaeche-2);
  --tabs-pill-bg: var(--flaeche);
  /* Accordion expand */
  --acc-expand: 250ms;
  --acc-collapse: 250ms;
  --acc-chevron: 250ms;
  --acc-ease: cubic-bezier(0.22, 1, 0.36, 1);
  /* Toast open / close */
  --toast-open: 350ms;
  --toast-close: 250ms;
  --toast-distance: 16px;
  --toast-blur: 2px;
  --toast-scale: 0.97;
  --toast-ease: cubic-bezier(0.22, 1, 0.36, 1);
  /* Checkbox check */
  --check-box: 150ms;
  --check-draw: 350ms;
  --check-delay: 0ms;
  --check-uncheck: 150ms;
  --check-ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* --- 02 Number pop-in --- */
@keyframes t-digit-pop-in {
  0%   {
    transform: translate(
      calc(var(--digit-distance) * var(--digit-dir-x)),
      calc(var(--digit-distance) * var(--digit-dir-y))
    );
    opacity: 0;
    filter: blur(var(--digit-blur));
  }
  100% { transform: translate(0, 0); opacity: 1; filter: blur(0); }
}

.t-digit-group {
  display: inline-flex;
  align-items: baseline;
}
.t-digit {
  display: inline-block;
  will-change: transform, opacity, filter;
}
.t-digit-group.is-animating .t-digit {
  animation: t-digit-pop-in var(--digit-dur) var(--digit-ease) both;
}
.t-digit-group.is-animating .t-digit[data-stagger="1"] {
  animation-delay: var(--digit-stagger);
}
.t-digit-group.is-animating .t-digit[data-stagger="2"] {
  animation-delay: calc(var(--digit-stagger) * 2);
}
.t-digit-group.is-animating .t-digit[data-same] {
  animation: none;
}

@media (prefers-reduced-motion: reduce) {
  .t-digit-group .t-digit { animation: none !important; }
}

/* --- 03 Notification badge --- */
@keyframes t-badge-slide-in {
  from { transform: translate(var(--badge-offset-x), var(--badge-offset-y)); }
  to   { transform: translate(0, 0); }
}

.t-badge {
  position: absolute;
  top: -6px;
  right: -8px;
  pointer-events: none;
  will-change: transform;
}
.t-badge[data-open="true"] {
  animation: t-badge-slide-in var(--badge-slide-dur) var(--badge-slide-ease);
}

.t-badge-dot {
  display: block;
  transform-origin: center;
  transform: scale(1);
  opacity: 1;
  filter: blur(0);
  transition:
    transform var(--badge-pop-dur)  var(--badge-pop-ease),
    opacity   var(--badge-fade-dur) var(--badge-pop-ease),
    filter    var(--badge-pop-dur)  var(--badge-pop-ease);
  will-change: transform, opacity, filter;
}
.t-badge[data-open="false"] .t-badge-dot {
  transform: scale(0);
  opacity: 0;
  filter: blur(var(--badge-blur));
  transition:
    transform var(--badge-pop-close-dur)  var(--badge-close-ease),
    opacity   var(--badge-fade-close-dur) var(--badge-close-ease),
    filter    var(--badge-pop-close-dur)  var(--badge-close-ease);
}

@media (prefers-reduced-motion: reduce) {
  .t-badge, .t-badge-dot { animation: none !important; transition: none !important; }
}

/* --- 16 Tabs sliding --- */
.t-tabs {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 3px;
  border-radius: 48px;
  background: var(--tabs-bar-bg);
}
.t-tab {
  position: relative;
  appearance: none;
  border: 0;
  background: transparent;
  height: 30px;
  padding: 4px 12px;
  color: var(--tabs-text-muted);
  cursor: pointer;
  border-radius: 48px;
  z-index: 1;
  transition: color var(--tabs-dur) var(--tabs-ease);
}
.t-tab:not([aria-selected="true"]):hover,
.t-tab[aria-selected="true"] {
  color: var(--tabs-text-active);
}

.t-tabs-pill {
  position: absolute;
  top: 3px;
  left: 0;
  height: 30px;
  width: 0;
  background: var(--tabs-pill-bg);
  border-radius: 48px;
  transform: translateX(0);
  transition:
    transform var(--tabs-dur) var(--tabs-ease),
    width     var(--tabs-dur) var(--tabs-ease);
  will-change: transform, width;
  z-index: 0;
  pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
  .t-tabs-pill, .t-tab { transition: none !important; }
}

/* --- 21 Accordion expand --- */
.t-acc-panel {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows var(--acc-collapse) var(--acc-ease);
}
.t-acc[data-open="true"] .t-acc-panel {
  grid-template-rows: 1fr;
  transition: grid-template-rows var(--acc-expand) var(--acc-ease);
}
.t-acc-panel-inner {
  overflow: hidden;
  opacity: 0;
  filter: blur(2px);
  transition:
    opacity var(--acc-collapse) var(--acc-ease),
    filter var(--acc-collapse) var(--acc-ease);
}
.t-acc[data-open="true"] .t-acc-panel-inner {
  opacity: 1;
  filter: blur(0);
  transition:
    opacity var(--acc-expand) var(--acc-ease),
    filter var(--acc-expand) var(--acc-ease);
}
.t-acc-chevron {
  display: inline-flex;
  transform: scaleY(1);
  transform-origin: center;
  transition: transform var(--acc-chevron) var(--acc-ease);
}
.t-acc-chevron path { vector-effect: non-scaling-stroke; }
.t-acc[data-open="true"] .t-acc-chevron {
  transform: scaleY(-1);
}

@media (prefers-reduced-motion: reduce) {
  .t-acc-panel, .t-acc-panel-inner, .t-acc-chevron {
    transition: none !important;
  }
}

/* --- 22 Toast open / close --- */
.t-toast {
  opacity: 0;
  transform: translateY(var(--toast-distance)) scale(var(--toast-scale));
  filter: blur(var(--toast-blur));
  will-change: transform, opacity, filter;
  transition:
    opacity var(--toast-close) var(--toast-ease),
    transform var(--toast-close) var(--toast-ease),
    filter var(--toast-close) var(--toast-ease);
}
.t-toast.is-open {
  opacity: 1;
  transform: translateY(0) scale(1);
  filter: blur(0);
  transition:
    opacity var(--toast-open) var(--toast-ease),
    transform var(--toast-open) var(--toast-ease),
    filter var(--toast-open) var(--toast-ease);
}

@media (prefers-reduced-motion: reduce) {
  .t-toast { transition: none !important; }
}

/* --- 25 Checkbox check --- */
.t-check {
  transition:
    background var(--check-box) var(--check-ease),
    box-shadow var(--check-box) var(--check-ease);
}
.t-check svg path {
  stroke-dasharray: var(--check-len, 15);
  stroke-dashoffset: var(--check-len, 15);
  transition: stroke-dashoffset var(--check-uncheck) var(--check-ease);
}
.t-check[aria-checked="true"] svg path {
  stroke-dashoffset: 0;
  transition: stroke-dashoffset var(--check-draw) var(--check-ease) var(--check-delay);
}

@media (prefers-reduced-motion: reduce) {
  .t-check, .t-check svg path { transition: none !important; }
}

/* --- Anpassungen ans OS (Aussehen, Größen, Position) --- */
.nav-symbol { position: relative; display: inline-flex; }
.nav-punkt .zahl {
  min-width: 18px; height: 18px; padding: 0 5px; border-radius: var(--pille);
  background: var(--akzent); color: var(--akzent-text); box-shadow: 0 0 0 2px var(--bg);
  font-size: 11px; font-weight: 700; line-height: 18px; text-align: center;
}
.nav-punkt .t-badge { top: -7px; right: -11px; }

.umschalter { margin-bottom: 14px; justify-self: start; width: max-content; }
.umschalter { padding: 4px; }
.umschalter .t-tabs-pill { top: 4px; }
.umschalter .t-tab, .umschalter .t-tabs-pill { height: 40px; }
.umschalter .t-tab { padding: 4px 20px; font-size: 16px; font-weight: 500; }
.umschalter .t-tabs-pill { box-shadow: var(--schatten-3); }

.t-acc-panel-inner { padding-top: 10px; }
.antwort { display: grid; gap: 8px; }
.t-acc-head { gap: 4px; }

.hinweis {
  position: fixed; z-index: 20; left: 50%; bottom: calc(var(--nav-hoehe) + env(safe-area-inset-bottom) + 14px);
  translate: -50% 0; width: max-content; max-width: min(92vw, 520px);
  padding: 12px 16px; border-radius: var(--radius); background: var(--flaeche); color: var(--text);
  font-size: 14px; font-weight: 500; line-height: 20px; box-shadow: var(--schatten-2); cursor: pointer; pointer-events: none;
}
.hinweis.is-open { pointer-events: auto; }
.hinweis.fehler { color: var(--rot); }
@media (min-width: 860px) { .hinweis { bottom: 32px; left: calc(50% + 116px); } }

.check { cursor: pointer; }
.t-check {
  --check-len: 15;
  width: 22px; height: 22px; flex-shrink: 0; padding: 0; margin-top: 1px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 2px solid var(--text); border-radius: 6px; background: transparent; cursor: pointer;
}
.t-check svg { width: 12px; height: 12px; overflow: visible; }
.t-check svg path { fill: none; stroke: var(--akzent-text); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.t-check[aria-checked="true"] { background: var(--akzent); border-color: var(--akzent); }
.check:has(.t-check[aria-checked="true"]) span { color: var(--text-2); text-decoration: line-through; transition: color var(--duration-fast) var(--ease-smooth-out); }

/* --- Einstellungen: Zahnrad + Dialog (transitions-dev 06 Modal) --- */
:root {
  --modal-open-dur: 250ms;
  --modal-close-dur: 150ms;
  --modal-scale: 0.96;
  --modal-scale-close: 0.96;
  --modal-ease: cubic-bezier(0.22, 1, 0.36, 1);
}
.t-modal {
  transform-origin: center;
  transform: scale(var(--modal-scale));
  opacity: 0;
  pointer-events: none;
  transition:
    transform var(--modal-open-dur) var(--modal-ease),
    opacity   var(--modal-open-dur) var(--modal-ease);
  will-change: transform, opacity;
}
.t-modal.is-open {
  transform: scale(1);
  opacity: 1;
  pointer-events: auto;
}
.t-modal.is-closing {
  transform: scale(var(--modal-scale-close));
  opacity: 0;
  pointer-events: none;
  transition:
    transform var(--modal-close-dur) var(--modal-ease),
    opacity   var(--modal-close-dur) var(--modal-ease);
}

@media (prefers-reduced-motion: reduce) {
  .t-modal { transition: none !important; }
}

.kopf-knoepfe { display: flex; gap: 8px; }
.rund { width: 44px; height: 44px; padding: 0; border-radius: 50%; }

.dialog-schleier {
  position: fixed; inset: 0; z-index: 30; background: rgba(0, 0, 0, 0.4);
  opacity: 0; pointer-events: none; transition: opacity var(--modal-close-dur) var(--modal-ease);
}
.dialog-schleier.is-open { opacity: 1; pointer-events: auto; transition-duration: var(--modal-open-dur); }
.dialog {
  position: fixed; z-index: 31; left: 50%; top: 50%; translate: -50% -50%;
  width: min(92vw, 480px); max-height: min(86vh, 720px); overflow-y: auto;
  background: var(--flaeche); color: var(--text); border-radius: var(--radius); box-shadow: var(--schatten-2);
  padding: 24px;
}
.dialog-kopf { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.dialog-kopf h2 { margin: 0; font-size: 24px; line-height: 32px; font-weight: 700; }
.einstellung { padding: 16px 0; border-top: 1px solid var(--linie); }
.einstellung:first-of-type { border-top: 0; }
.einstellung-name { font-weight: 500; font-size: 16px; line-height: 20px; margin-bottom: 4px; }
.einstellung .meta { margin: 0 0 12px; }
.einstellung .t-tabs { padding: 4px; max-width: 100%; }
.einstellung .t-tabs-pill { top: 4px; box-shadow: var(--schatten-3); }
.einstellung .t-tab, .einstellung .t-tabs-pill { height: 36px; }
.einstellung .t-tab { padding: 4px 14px; font-size: 14px; font-weight: 500; }
.einstellung .knoepfe { margin-top: 0; }
.dialog-fuss { margin: 16px 0 0; color: var(--text-3); font-size: 12px; line-height: 18px; }

/* "Animationen aus" in den Einstellungen wirkt wie prefers-reduced-motion */
:root[data-motion="aus"] *, :root[data-motion="aus"] *::before, :root[data-motion="aus"] *::after {
  animation: none !important; transition: none !important;
}

/* --- Gehirn (Graph der Vault-Notizen) --- */
.gehirn { padding: 0; overflow: hidden; }
.gehirn-canvas { display: block; width: 100%; height: min(68vh, 640px); touch-action: none; cursor: grab; }
.gehirn-canvas:active { cursor: grabbing; }
.gehirn-info { padding: 16px 20px; border-top: 1px solid var(--linie); min-height: 76px; }
.gehirn-info .eintrag-kopf { align-items: center; }

/* --- Kalender --- */
.kalender-filter { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { border: 0; border-radius: var(--pille); padding: 8px 16px; min-height: 40px; background: var(--flaeche-2); color: var(--text-2); font-size: 14px; font-weight: 500; cursor: pointer; }
.chip[aria-pressed="true"] { background: var(--invers); color: var(--invers-text); }
.termine { gap: 0; }
.termin { display: flex; gap: 16px; padding: 12px 0; border-top: 1px solid var(--linie); }
.termin:first-child { border-top: 0; padding-top: 0; }
.termin-zeit { flex: 0 0 92px; font-size: 14px; line-height: 20px; font-weight: 500; font-variant-numeric: tabular-nums; }
.termin-inhalt { min-width: 0; }
.termin-frist .termin-zeit { color: var(--rot); }
.termin-agent { opacity: 0.6; }
.tag-heute { border-color: var(--akzent); }
.befehl { background: var(--flaeche-2); padding: 12px 16px; border-radius: var(--radius-feld); font-size: 13px; overflow-x: auto; white-space: pre; }
.tag-karte h2 { font-size: 18px; line-height: 24px; }
