/* Memexa Klick-Dummy — Tokens aus DESIGN.md + Landing-Ästhetik (Papierkorn, Amber-Glut, Hub-Graph) */
:root {
  --paper: #faf7f1;
  --card: #fffdf8;
  --muted: #f3eee2;
  --well: #efe7d4;
  --ink: #221f1a;
  --ink-soft: #6f6655;
  --line: #e7dfcf;
  --rule: #d8cdb6;
  --primary: #214a73;
  --primary-soft: #e8edf5;
  --brand: #cf9636;
  --brand-strong: #835912;
  --brand-soft: #f9efdb;
  --glow: #b45309;
  --glow-soft: #f59e0b33;
  --ok: #33701f;
  --ok-soft: #e8f2e2;
  --warn: #a8532e;
  --warn-soft: #f7e9e0;
  --danger: #b3261e;
  --danger-soft: #f9e5e3;
  --sbw: 228px;
  --r-card: 10px;
  --r-ctl: 6px;
  --shadow: 0 1px 2px rgba(34, 31, 26, .06), 0 8px 24px rgba(34, 31, 26, .08);
}
.dark {
  --paper: #10202f;
  --card: #182c43;
  --muted: #22394f;
  --well: #16304b;
  --ink: #f7f2e7;
  --ink-soft: #b8c4d3;
  --line: #31506f;
  --rule: #2c4763;
  --primary: #7fabd8;
  --primary-soft: #26496d;
  --brand: #e6b15a;
  --brand-strong: #e6b15a;
  --brand-soft: #33475f;
  --glow: #f59e0b;
  --glow-soft: #f59e0b2b;
  --ok: #7fc465;
  --ok-soft: #24404a;
  --warn: #d98c63;
  --warn-soft: #46392f;
  --danger: #e57373;
  --danger-soft: #4a2a28;
}
/* Warme Amber-Glut-Zone (Landing-Farbwelt) für Hero-Flächen */
.glut {
  --paper: #f6e8cd;
  --card: #fdf6e6;
  --muted: #efdcb4;
  --line: #e3c793;
  --rule: #dcc48f;
  --ink-soft: #8a6a3a;
}
.dark .glut {
  --paper: #262017;
  --card: #2e2820;
  --muted: #3a3226;
  --line: #52462f;
  --rule: #4a3f2c;
  --ink-soft: #c8bba1;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--paper);
  color: var(--ink);
  font-family: Inter, -apple-system, "Segoe UI", system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  /* Papierkorn wie auf der Landing */
  background-image: radial-gradient(var(--rule) 0.5px, transparent 0.5px);
  background-size: 26px 26px;
}
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { letter-spacing: -0.01em; line-height: 1.25; margin: 0; }
h1 { font-size: 24px; font-weight: 600; }
h2 { font-size: 17px; font-weight: 600; }
h3 { font-size: 15px; font-weight: 600; }
p { margin: 0; }
/* Landing-Markenzeichen: Serif-Kursiv-Betonung in Ink-Blau */
em, .em {
  font-family: "Instrument Serif", Georgia, serif;
  font-style: italic;
  font-weight: 400;
  color: var(--primary);
}
code, .mono {
  font-family: "Geist Mono", ui-monospace, Menlo, monospace;
  font-size: 12.5px;
}
.eyebrow {
  font-family: "Geist Mono", ui-monospace, Menlo, monospace;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--ink-soft);
}
.soft { color: var(--ink-soft); }
.small { font-size: 13px; }
.hidden { display: none !important; }

/* ---------- Screens & Layout ---------- */
.screen { display: none; }
.screen.active { display: block; }
/* Gestaffelter Seiteneinstieg (Landing .rise) */
.screen.active .container > * { opacity: 0; transform: translateY(12px); animation: rise .55s cubic-bezier(.2,.7,.2,1) forwards; }
.screen.active .container > *:nth-child(1) { animation-delay: .04s; }
.screen.active .container > *:nth-child(2) { animation-delay: .12s; }
.screen.active .container > *:nth-child(3) { animation-delay: .2s; }
.screen.active .container > *:nth-child(4) { animation-delay: .28s; }
.screen.active .container > *:nth-child(n+5) { animation-delay: .36s; }
@keyframes rise { to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .screen.active .container > * { animation: none; opacity: 1; transform: none; }
}

.container { max-width: 1024px; margin: 0 auto; padding: 24px 20px 110px; }
.container.narrow { max-width: 760px; }
.center-shell { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.row { display: flex; align-items: center; gap: 10px; }
.row.between { justify-content: space-between; }
.row.wrap { flex-wrap: wrap; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
@media (max-width: 760px) {
  .grid2 { grid-template-columns: 1fr; }
  .grid3 { grid-template-columns: 1fr 1fr; gap: 10px; } /* kleine Stat-Karten: 2 nebeneinander statt riesig gestapelt */
  .grid3.plans, .grid3.waycards { grid-template-columns: 1fr; } /* Pläne & Weg-Karten brauchen die volle Breite */
}
.span2 { grid-column: 1 / -1; }
hr { border: 0; border-top: 1px solid var(--line); margin: 20px 0; }

/* ---------- App-Shell: Sidebar ---------- */
.shell { display: flex; min-height: 100vh; }
.sidebar {
  width: var(--sbw); flex: none;
  border-right: 1px solid var(--line);
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  display: flex; flex-direction: column;
  padding: 18px 12px 14px;
  /* overflow visible + z-index: Popups (Benachrichtigungen, Nutzermenü) dürfen über den Content ragen */
  position: sticky; top: 0; height: 100vh; overflow: visible; z-index: 55;
}
.sidebar .brand { padding: 0 8px 4px; }
.sidebar .claim { font-size: 11.5px; color: var(--ink-soft); padding: 0 8px 14px; }
.snav { display: flex; flex-direction: column; gap: 1px; }
.snav a {
  display: flex; align-items: center; gap: 9px;
  color: var(--ink-soft); font-size: 14px; font-weight: 500;
  padding: 7px 9px; border-radius: var(--r-ctl);
}
.snav a:hover { color: var(--ink); background: var(--muted); text-decoration: none; }
.snav a.active { color: var(--ink); background: var(--muted); }
.snav .grp {
  font-family: "Geist Mono", ui-monospace, Menlo, monospace;
  font-size: 10px; text-transform: uppercase; letter-spacing: .08em;
  color: var(--ink-soft); padding: 14px 9px 4px;
}
.whoami { display: flex; align-items: center; gap: 6px; padding: 10px 9px 2px; border-top: 1px solid var(--line); margin-top: 10px; }
.whoami summary::-webkit-details-marker { display: none; }
.menu {
  position: absolute; z-index: 70;
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--r-card); box-shadow: var(--shadow);
  min-width: 210px; padding: 6px; display: flex; flex-direction: column;
}
.menu.up { bottom: 44px; left: 0; }
.menu a { color: var(--ink); padding: 7px 10px; border-radius: var(--r-ctl); font-size: 13.5px; }
.menu a:hover { background: var(--muted); text-decoration: none; }
.menu a.finish { color: var(--primary); font-weight: 500; }
.bell {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border-radius: 8px; color: var(--ink-soft);
  border: 1px solid var(--line); background: var(--card);
}
.bell:hover { color: var(--ink); background: var(--muted); }
.notidot {
  position: absolute; top: -3px; right: -3px; width: 9px; height: 9px;
  border-radius: 50%; background: var(--glow); border: 2px solid var(--paper);
}
.noti-item { display: flex; gap: 9px; padding: 8px 10px; border-radius: var(--r-ctl); cursor: pointer; align-items: flex-start; }
.noti-item:hover { background: var(--muted); }
.noti-item .cat { margin-top: 6px; }

/* Toggle-Switches (Einstellungen) */
.switch { position: relative; display: inline-flex; flex: none; width: 38px; height: 22px; cursor: pointer; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch .knob {
  position: absolute; inset: 0; border-radius: 999px;
  background: var(--muted); border: 1px solid var(--line);
  transition: background .18s, border-color .18s;
}
.switch .knob::after {
  content: ""; position: absolute; top: 2px; left: 2px;
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--card); box-shadow: 0 1px 3px rgba(0,0,0,.2);
  transition: transform .18s cubic-bezier(.2,.7,.2,1);
}
.switch input:checked + .knob { background: var(--primary); border-color: var(--primary); }
.switch input:checked + .knob::after { transform: translateX(16px); }
.setting-row { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-top: 1px solid var(--line); }
.setting-row:first-of-type { border-top: 0; }
.plan-card {
  margin-top: auto;
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--r-card); padding: 11px 12px; font-size: 12.5px;
}
.plan-card .eyebrow { display: block; margin-bottom: 5px; }
.main { flex: 1; min-width: 0; }
.spacer { flex: 1; }
@media (max-width: 860px) {
  .shell { flex-direction: column; }
  .sidebar { width: auto; height: auto; position: static; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 2px; padding: 10px 12px 8px; }
  .sidebar .claim { display: none; }
  .snav { flex-direction: row; flex-wrap: wrap; gap: 2px; }
  .snav a { padding: 5px 9px; font-size: 13px; }
  .snav .grp { display: none; }
  .plan-card, .whoami { display: none; }
}
/* Mobile: der schwebende Vorschlags-Chip verdeckt Content — weglassen */
@media (max-width: 700px) { .omni-cta { display: none !important; } }

.avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--primary); color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 600; position: relative; flex: none;
}
.avatar .dot {
  position: absolute; right: -1px; bottom: -1px;
  width: 10px; height: 10px; border-radius: 50%;
  border: 2px solid var(--paper);
  background: transparent; box-shadow: inset 0 0 0 1.5px var(--ink-soft);
}
.avatar .dot.on { background: var(--ok); box-shadow: none; }

/* ---------- Karten, Buttons, Inputs ---------- */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  padding: 18px;
  box-shadow: 0 1px 2px rgba(0,0,0,.05);
}
.card.flat { background: var(--muted); border-color: transparent; box-shadow: none; }
.card.clickable { cursor: pointer; transition: transform .22s ease, box-shadow .22s ease, border-color .12s; }
.card.clickable:hover { transform: translateY(-3px); box-shadow: 0 10px 26px -12px rgba(0,0,0,.28); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  font: inherit; font-size: 14px; font-weight: 500;
  padding: 8px 14px; border-radius: var(--r-ctl);
  border: 1px solid transparent; cursor: pointer;
  background: var(--primary); color: #fff;
  transition: filter .12s;
}
.btn:hover { filter: brightness(1.08); }
.btn:disabled { opacity: .5; cursor: default; filter: none; }
.btn.outline { background: transparent; color: var(--ink); border-color: var(--line); }
.btn.outline:hover { background: var(--muted); }
.btn.ghost { background: transparent; color: var(--ink-soft); }
.btn.ghost:hover { background: var(--muted); color: var(--ink); }
.btn.danger { background: transparent; color: var(--danger); border-color: var(--danger); }
.btn.danger:hover { background: var(--danger-soft); }
.btn.sm { padding: 5px 10px; font-size: 13px; }
.linkbtn { background: none; border: 0; padding: 0; font: inherit; color: var(--primary); cursor: pointer; }
.linkbtn:hover { text-decoration: underline; }
.linkbtn.quiet { color: var(--ink-soft); font-size: 13px; }

.input, .textarea, select.input {
  font: inherit; width: 100%;
  padding: 8px 11px;
  border: 1px solid var(--line); border-radius: var(--r-ctl);
  background: var(--card); color: var(--ink);
}
.input:focus, .textarea:focus { outline: 2px solid var(--primary); outline-offset: 1px; border-color: transparent; }
.textarea { resize: vertical; min-height: 90px; }
label.field { display: block; font-size: 13.5px; font-weight: 500; margin-bottom: 5px; }
.help { font-size: 12.5px; color: var(--ink-soft); margin-top: 5px; }

.badge {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11.5px; font-weight: 600;
  padding: 2px 8px; border-radius: 999px;
  background: var(--muted); color: var(--ink-soft);
  white-space: nowrap;
}
.badge.ok { background: var(--ok-soft); color: var(--ok); }
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.danger { background: var(--danger-soft); color: var(--danger); }
.badge.brand { background: var(--brand-soft); color: var(--brand-strong); }
.badge.blue { background: var(--primary-soft); color: var(--primary); }

.chip {
  display: inline-flex; align-items: center;
  font: inherit; font-size: 13px;
  padding: 6px 12px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--card);
  color: var(--ink); cursor: pointer;
  transition: transform .15s ease;
}
.chip:hover { border-color: var(--primary); color: var(--primary); transform: translateY(-1px); }
.chip.on { border-color: var(--primary); background: var(--primary-soft); color: var(--primary); }

.alert {
  border: 1px solid var(--line); border-radius: var(--r-card);
  padding: 12px 14px; font-size: 14px;
  background: var(--muted); display: flex; gap: 10px; align-items: flex-start;
}
.alert.blue { background: var(--primary-soft); border-color: transparent; }

.codewell {
  background: var(--well); border-radius: var(--r-ctl);
  padding: 8px 11px; display: flex; align-items: center; gap: 10px;
  justify-content: space-between; overflow-wrap: anywhere;
}
.codewell .btn { flex: none; }

/* ---------- Page-Header ---------- */
.pagehead { margin-bottom: 20px; display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.pagehead .desc { color: var(--ink-soft); margin-top: 4px; max-width: 58ch; }

/* ---------- Onboarding-Stepper ---------- */
.stepper { display: flex; gap: 4px; margin: 12px 0 14px; flex-wrap: wrap; }
.step {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 13.5px; font-weight: 500; color: var(--ink-soft);
  background: none; border: 0; font-family: inherit;
  padding: 7px 12px; border-radius: 999px; cursor: pointer;
}
.step:hover { background: var(--muted); }
.step.current { background: var(--primary-soft); color: var(--primary); }
.step .num {
  width: 20px; height: 20px; border-radius: 50%;
  border: 1.5px solid currentColor;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 600;
}
.step.done .num { background: var(--ok); border-color: var(--ok); color: #fff; }
.step .opt { font-size: 11px; font-weight: 400; color: var(--ink-soft); }
.steppanel { display: none; }
.steppanel.active { display: block; animation: rise .4s cubic-bezier(.2,.7,.2,1); }
.stepnav { display: flex; justify-content: space-between; align-items: center; margin-top: 22px; }

.dropzone {
  border: 1.5px dashed var(--line); border-radius: var(--r-card);
  padding: 22px; text-align: center; color: var(--ink-soft);
  cursor: pointer; font-size: 14px; transition: border-color .15s, color .15s;
}
.dropzone:hover { border-color: var(--glow); color: var(--brand-strong); }

/* ---------- Quellen-Grid (Brain füllen) ---------- */
.srcgrid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
@media (max-width: 860px) { .srcgrid { grid-template-columns: repeat(2, 1fr); } }
.srctile {
  font: inherit; text-align: left; cursor: pointer;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r-card);
  padding: 14px; display: flex; flex-direction: column; gap: 7px;
  transition: transform .2s ease, box-shadow .2s ease, border-color .15s;
  color: var(--ink);
}
.srctile:hover { transform: translateY(-3px); box-shadow: 0 10px 26px -12px rgba(0,0,0,.28); border-color: var(--glow); }
.srctile.on { border-color: var(--glow); box-shadow: 0 0 0 3px var(--glow-soft); }
.srctile.off { opacity: .55; }
.srctile.off:hover { transform: none; box-shadow: none; border-color: var(--line); }
.srcicon {
  width: 38px; height: 38px; border-radius: 9px; flex: none;
  background: var(--muted);
  display: inline-flex; align-items: center; justify-content: center;
}
.srct { font-weight: 600; font-size: 13.5px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.srcd { font-size: 12px; color: var(--ink-soft); line-height: 1.45; }

/* ---------- Quellen-Auswahl (Phase A) & geführte Einrichtung (Phase B) ---------- */
.srcrow {
  display: flex; align-items: center; gap: 12px;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r-card);
  padding: 10px 14px; cursor: pointer;
  transition: border-color .15s, transform .18s ease;
}
.srcrow:hover { transform: translateY(-1px); border-color: var(--ink-soft); }
.srcrow.on { border-color: var(--glow); box-shadow: 0 0 0 3px var(--glow-soft); }
.srcrow input { width: 16px; height: 16px; accent-color: var(--primary); flex: none; }
.srcrow.off { opacity: .55; cursor: default; }
.srcrow.off:hover { transform: none; border-color: var(--line); }
.meter-chip {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11.5px; font-weight: 600; padding: 2px 9px; border-radius: 999px;
  background: var(--card); border: 1px solid var(--line); color: var(--ink-soft);
}
.meter-chip.done { border-color: var(--ok); color: var(--ok); }
/* Weg-Karten (1/2/3) im Claude/ChatGPT-Guide */
.waycards { gap: 10px; }
.waycard {
  font: inherit; text-align: left; cursor: pointer; color: var(--ink);
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r-card);
  padding: 12px 14px; display: flex; flex-direction: column; gap: 4px;
  transition: transform .18s ease, border-color .15s, box-shadow .18s ease;
}
.waycard:hover { transform: translateY(-2px); border-color: var(--glow); }
.waycard.on { border-color: var(--glow); box-shadow: 0 0 0 3px var(--glow-soft); background: var(--brand-soft); }
.waynum {
  width: 22px; height: 22px; border-radius: 50%; flex: none;
  border: 1.5px solid var(--brand-strong); color: var(--brand-strong);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; margin-bottom: 2px;
}
.waycard.on .waynum { background: var(--brand-strong); color: #fff; }
.waypanel { border-top: 1px solid var(--line); padding-top: 14px; }

.promptwell {
  background: var(--well); border-radius: var(--r-ctl); padding: 10px 12px;
  max-height: 160px; overflow: auto; white-space: pre-wrap;
  font-family: "Geist Mono", ui-monospace, Menlo, monospace; font-size: 11.5px; line-height: 1.6;
}
.waylist { margin: 0; padding-left: 18px; line-height: 1.9; }

/* ---------- Denk-Effekt: Neuronen feuern ---------- */
.thinkfx { position: relative; height: 110px; border-radius: var(--r-ctl); overflow: hidden; background: var(--muted); }
.thinkfx canvas { display: block; width: 100%; height: 100%; }
.thinkfx .thinklabel {
  position: absolute; left: 50%; bottom: 8px; transform: translateX(-50%);
  font-family: "Geist Mono", ui-monospace, Menlo, monospace;
  font-size: 10.5px; text-transform: uppercase; letter-spacing: .1em;
  color: var(--brand-strong);
  animation: thinkblink 1.1s ease-in-out infinite;
}
@keyframes thinkblink { 0%, 100% { opacity: .5; } 50% { opacity: 1; } }

/* ---------- Checkliste ---------- */
.checklist .item {
  display: flex; align-items: center; gap: 11px;
  padding: 9px 4px; border-top: 1px solid var(--line);
}
.checklist .item:first-of-type { border-top: 0; }
.checkdot {
  width: 20px; height: 20px; border-radius: 50%;
  border: 1.5px solid var(--line); flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  color: #fff; font-size: 12px;
}
.item.done .checkdot { background: var(--ok); border-color: var(--ok); }
.item.done .lbl { color: var(--ink-soft); text-decoration: line-through; }
.progress-pill {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 12.5px; font-weight: 600; color: var(--ink-soft);
  background: var(--card); border: 1px solid var(--line);
  padding: 5px 12px; border-radius: 999px; cursor: pointer;
}

/* ---------- Hub-Graph (Canvas, Landing-Port) ---------- */
.hub-graph { position: relative; }
.hub-graph canvas { display: block; width: 100%; height: 100%; }
.hub-graph .notechip {
  position: absolute; transform: translate(-50%, -50%);
  font-family: "Geist Mono", ui-monospace, Menlo, monospace; font-size: 11.5px;
  background: var(--card); border: 1px solid var(--line); border-radius: 8px;
  padding: 3px 9px; color: var(--ink); cursor: grab; white-space: nowrap;
  box-shadow: 0 1px 3px rgba(0,0,0,.08);
  transition: transform .18s ease, box-shadow .18s ease;
}
.hub-graph .notechip:hover { transform: translate(-50%, -50%) scale(1.07); box-shadow: 0 4px 14px rgba(0,0,0,.16); z-index: 2; }
.hub-graph .notechip.hot { border-color: var(--glow); box-shadow: 0 0 0 3px var(--glow-soft); }
.graph-hero { height: 400px; border-radius: var(--r-card); overflow: hidden; }
.graph-strip { height: 130px; border-radius: var(--r-card); overflow: hidden; }

/* Animierte Kanten & Knoten (SVG, Landing) */
.edge { stroke: var(--glow); stroke-dasharray: 6 7; animation: edge-flow 2.6s linear infinite; fill: none; }
.node { fill: var(--glow); animation: node-pulse 3s ease-in-out infinite; transform-origin: center; transform-box: fill-box; }
@keyframes edge-flow { to { stroke-dashoffset: -26; } }
@keyframes node-pulse { 0%, 100% { opacity: .55; transform: scale(1); } 50% { opacity: 1; transform: scale(1.35); } }
@media (prefers-reduced-motion: reduce) { .edge, .node { animation: none; } }

/* ---------- Dokument-Verarbeitung (Lese-Animation) ---------- */
.docthumb {
  width: 64px; height: 84px; flex: none; position: relative;
  background: var(--card); border: 1px solid var(--line); border-radius: 6px;
  overflow: hidden;
}
.docthumb .l { position: absolute; left: 9px; right: 9px; height: 3px; border-radius: 2px; background: var(--muted); }
.docthumb.reading::after {
  content: ""; position: absolute; left: 0; right: 0; height: 26px; top: -30px;
  background: linear-gradient(to bottom, transparent, var(--glow-soft), transparent);
  animation: scan 1.8s linear infinite;
}
@keyframes scan { to { top: 96px; } }
.readfeed { display: flex; flex-direction: column; gap: 6px; min-height: 66px; justify-content: center; }
.readfeed .fitem { font-size: 12.5px; color: var(--ink-soft); animation: popIn .35s cubic-bezier(.2,.7,.2,1); }
.readfeed .fitem strong { color: var(--brand-strong); font-weight: 600; }
@keyframes popIn { from { opacity: 0; transform: translateY(6px) scale(.97); } to { opacity: 1; transform: none; } }

/* ---------- Heute: Kalender & Streak ---------- */
.streak-num {
  font-family: "Instrument Serif", Georgia, serif; font-style: italic;
  font-size: 44px; line-height: 1; color: var(--brand-strong);
}
.weekdots { display: flex; gap: 6px; }
.weekdots .d { width: 10px; height: 10px; border-radius: 50%; background: var(--muted); border: 1px solid var(--line); }
.weekdots .d.on { background: var(--glow); border-color: var(--glow); box-shadow: 0 0 0 3px var(--glow-soft); }
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal .h { font-size: 10.5px; text-align: center; color: var(--ink-soft); font-family: "Geist Mono", ui-monospace, Menlo, monospace; text-transform: uppercase; padding: 2px 0; }
.cal .d {
  aspect-ratio: 1; display: flex; align-items: center; justify-content: center;
  font-size: 12px; border-radius: 6px; color: var(--ink-soft); position: relative;
  cursor: pointer;
}
.cal .d:hover { background: var(--muted); }
.cal .d.has { color: var(--ink); font-weight: 600; background: var(--brand-soft); }
.cal .d.today { outline: 2px solid var(--primary); outline-offset: -2px; color: var(--primary); }
.cal .d.mute { opacity: .3; cursor: default; }

/* ---------- Notizliste / Historie ---------- */
.notecard { display: flex; align-items: center; gap: 12px; padding: 12px 14px; }
.notecard .t { font-weight: 500; }
.cat { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.cat.note { background: #8a8172; }
.cat.journal { background: var(--brand); }
.cat.document { background: #5c7ea3; }
.cat.person { background: #6a9955; }
.cat.project { background: #8465a6; }
.cat.email { background: #b0784f; }
.timeline { position: relative; padding-left: 22px; }
.timeline::before { content: ""; position: absolute; left: 7px; top: 6px; bottom: 6px; width: 2px; background: var(--line); border-radius: 2px; }
.tl-group { margin-bottom: 6px; }
.tl-day { margin: 14px 0 8px; }
.tl-item { position: relative; display: flex; align-items: flex-start; gap: 10px; padding: 7px 10px; border-radius: 8px; cursor: pointer; }
.tl-item:hover { background: var(--muted); }
.tl-item .cat { position: absolute; left: -19px; top: 14px; box-shadow: 0 0 0 3px var(--paper); }
.tl-item .tm { font-family: "Geist Mono", ui-monospace, Menlo, monospace; font-size: 11px; color: var(--ink-soft); padding-top: 3px; width: 40px; flex: none; }

/* ---------- Omnibox (unten, fest — Publikumsliebling) ---------- */
.omnibar {
  position: fixed; bottom: 34px; z-index: 50;
  left: calc(var(--sbw) + (100vw - var(--sbw)) / 2); transform: translateX(-50%);
  width: min(560px, calc(100vw - var(--sbw) - 40px));
  background: var(--card); border: 1.5px solid color-mix(in srgb, var(--glow) 35%, var(--line));
  border-radius: 16px;
  box-shadow: 0 4px 14px rgba(34,31,26,.1), 0 18px 50px -12px rgba(34,31,26,.3);
  padding: 9px; display: flex; gap: 8px; align-items: center;
  transition: width .28s cubic-bezier(.2,.7,.2,1), box-shadow .28s ease, transform .28s ease;
}
/* Wächst, sobald man sie anfasst */
.omnibar:focus-within, .omnibar.big {
  width: min(760px, calc(100vw - var(--sbw) - 40px));
  box-shadow: 0 6px 18px rgba(34,31,26,.14), 0 26px 70px -12px rgba(34,31,26,.4);
  transform: translateX(-50%) translateY(-5px);
  border-color: var(--glow);
}
.omnibar input { border: 0; outline: 0; flex: 1; font: inherit; background: transparent; color: var(--ink); min-width: 0; }
/* CTA-Chip: sanfter Schubs — rechts unten, mit Abstand zur Frage-Leiste */
.omni-cta {
  position: fixed; bottom: 104px; right: 14px; z-index: 49;
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--brand-soft); color: var(--brand-strong);
  border: 1px solid color-mix(in srgb, var(--glow) 30%, transparent);
  border-radius: 999px; padding: 6px 8px 6px 14px;
  font-size: 12.5px; font-weight: 500; white-space: nowrap;
  box-shadow: 0 4px 16px rgba(34,31,26,.12);
  animation: rise .4s cubic-bezier(.2,.7,.2,1);
  max-width: min(420px, calc(100vw - 28px));
}
.omni-cta #omni-cta-text { overflow: hidden; text-overflow: ellipsis; }
.omni-cta button.go { background: none; border: 0; font: inherit; font-weight: 600; color: var(--primary); cursor: pointer; }
.omni-cta button.go:hover { text-decoration: underline; }
.omni-cta button.x { background: none; border: 0; color: var(--brand-strong); opacity: .6; cursor: pointer; font-size: 13px; padding: 0 4px; }
.answer-overlay {
  position: fixed; bottom: 100px; z-index: 51;
  left: calc(var(--sbw) + (100vw - var(--sbw)) / 2); transform: translateX(-50%);
  width: min(860px, calc(100vw - var(--sbw) - 40px));
  background: var(--card); border: 1px solid var(--line);
  border-radius: 14px; box-shadow: var(--shadow);
  padding: 22px 24px; max-height: 72vh; overflow: auto;
  animation: rise .3s cubic-bezier(.2,.7,.2,1);
}
.answer-overlay #omni-answer { font-size: 15px !important; line-height: 1.6; }
@media (max-width: 860px) {
  .omnibar, .answer-overlay { left: 50%; width: calc(100vw - 32px); }
}
.cite {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 12px; font-weight: 500;
  background: var(--primary-soft); color: var(--primary);
  border: 0; font-family: inherit;
  padding: 3px 9px; border-radius: 999px; cursor: pointer;
}
.cite:hover { filter: brightness(.96); }

.seg { display: inline-flex; background: var(--muted); border-radius: var(--r-ctl); padding: 3px; gap: 2px; }
.seg button {
  font: inherit; font-size: 13px; font-weight: 500;
  border: 0; background: transparent; color: var(--ink-soft);
  padding: 5px 13px; border-radius: 4px; cursor: pointer;
}
.seg button.on { background: var(--card); color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,.07); }

/* ---------- Drawer ---------- */
.drawer-backdrop { position: fixed; inset: 0; background: rgba(20, 18, 14, .25); z-index: 60; }
/* Zentriertes Modal statt Slide-in von rechts (Feedback: reinschieben gefiel nicht) */
.drawer {
  position: fixed; top: 50%; left: 50%; z-index: 61;
  transform: translate(-50%, -50%);
  width: min(620px, 94vw); max-height: 84vh;
  background: var(--card); border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow); padding: 24px; overflow: auto;
  animation: drawerIn .24s cubic-bezier(.2,.7,.2,1);
}
@keyframes drawerIn { from { transform: translate(-50%, -48%) scale(.97); opacity: 0; } to { transform: translate(-50%, -50%) scale(1); opacity: 1; } }
.wikilink { color: var(--primary); background: var(--primary-soft); border-radius: 4px; padding: 0 4px; cursor: pointer; }

/* ---------- Dokumente ---------- */
.doc-row { display: flex; align-items: center; gap: 14px; padding: 13px 16px; }
.doc-row .grow, .grow { flex: 1; min-width: 0; }
.tabbar { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 14px; }
.tabbar button {
  font: inherit; font-size: 13.5px; font-weight: 500;
  background: none; border: 0; color: var(--ink-soft);
  padding: 8px 13px; cursor: pointer;
  border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.tabbar button.on { color: var(--ink); border-bottom-color: var(--primary); }
.tabpanel { display: none; }
.tabpanel.active { display: block; }
.pdfmock {
  background: var(--muted); border-radius: var(--r-ctl);
  min-height: 260px; display: flex; align-items: center; justify-content: center;
  color: var(--ink-soft); font-size: 13px;
}

/* ---------- Abo: Pläne ---------- */
.plans { align-items: stretch; }
.plans .price { font-size: 26px; font-weight: 600; }
.planlist { list-style: none; margin: 0; padding: 0; line-height: 2; }
.planlist li::before { content: "✓"; color: var(--ok); font-weight: 700; margin-right: 8px; }
.plan-featured {
  border: 2px solid var(--primary);
  background: color-mix(in srgb, var(--primary-soft) 40%, var(--card));
  box-shadow: 0 10px 34px -12px rgba(33, 74, 115, .45);
  transform: scale(1.03);
}
.badge.featured { background: var(--primary); color: #fff; }
@media (max-width: 760px) { .plan-featured { transform: none; } }

/* ---------- Toast ---------- */
#toast {
  position: fixed; left: 50%; bottom: 84px; transform: translateX(-50%);
  z-index: 80; background: var(--ink); color: var(--paper);
  padding: 9px 16px; border-radius: 8px; font-size: 13.5px;
  box-shadow: var(--shadow); max-width: 90vw;
  opacity: 0; pointer-events: none; transition: opacity .2s;
}
#toast.show { opacity: 1; }

/* ---------- Prototyp-Leiste ---------- */
#protobar { position: fixed; right: 14px; bottom: 14px; z-index: 90; font-size: 12.5px; }
#protobar > summary {
  list-style: none; cursor: pointer;
  background: var(--ink); color: var(--paper);
  padding: 6px 12px; border-radius: 999px;
  display: inline-flex; gap: 6px; align-items: center;
  opacity: .82;
}
#protobar > summary::-webkit-details-marker { display: none; }
#protobar .panel {
  position: absolute; right: 0; bottom: 40px;
  background: var(--ink); color: var(--paper);
  border-radius: 10px; padding: 14px; width: 250px;
  box-shadow: var(--shadow);
}
#protobar .panel a, #protobar .panel button.linkbtn { color: var(--paper); opacity: .9; display: block; padding: 2px 0; font-size: 12.5px; text-align: left; }
#protobar .panel .grp { text-transform: uppercase; letter-spacing: .07em; font-size: 10px; opacity: .55; margin: 10px 0 4px; }
#protobar .panel .grp:first-child { margin-top: 0; }
#protobar label { display: flex; gap: 7px; align-items: center; padding: 2px 0; cursor: pointer; }

/* ---------- Sonstiges ---------- */
.empty {
  text-align: center; padding: 40px 20px; color: var(--ink-soft);
  border: 1.5px dashed var(--line); border-radius: var(--r-card);
}
.empty h3 { color: var(--ink); margin-bottom: 6px; }
.kbd {
  font-family: "Geist Mono", ui-monospace, Menlo, monospace; font-size: 11px;
  border: 1px solid var(--line); border-bottom-width: 2px;
  border-radius: 4px; padding: 1px 5px; color: var(--ink-soft);
}
details.adv > summary { cursor: pointer; font-weight: 500; font-size: 14px; color: var(--ink-soft); }
details.adv[open] > summary { margin-bottom: 12px; }
.usermenu { position: relative; }
.fade-in { animation: rise .25s ease; }

/* ---------- Login & Onboarding: Synapsen-Netz + Warte-Tipps ---------- */
#s-login { position: relative; overflow: hidden; }
#login-net { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; opacity: .5; }
#s-welcome { position: relative; overflow: hidden; }
#welcome-net { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; opacity: .6; transition: opacity .3s; }
/* Schmales Fenster: keine freien Ränder → Netz zurücknehmen, Lesbarkeit gewinnt */
#welcome-net.dim { opacity: .22; }
#s-welcome .container { position: relative; }
/* Phase B (geführt): Intro ausblenden, damit nichts doppelt so hoch ist */
#s-welcome.guiding #ob-intro { display: none; }
#s-login .center-shell { position: relative; }
.tipbox {
  border: 1px dashed var(--line); border-radius: var(--r-card);
  padding: 12px 14px; background: color-mix(in srgb, var(--paper) 60%, transparent);
}
.tipbox .eyebrow { display: block; margin-bottom: 6px; }
/* Feste Höhe: die Box darf beim Tipp-Wechsel nicht springen */
.tipbox p { font-size: 13.5px; min-height: 63px; margin: 0; animation: tipfade .4s ease; }
.tipdots { display: flex; gap: 5px; margin-top: 8px; }
.tipdots span { width: 6px; height: 6px; border-radius: 50%; background: var(--line); }
.tipdots span.on { background: var(--glow); }
@keyframes tipfade { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .tipbox p { animation: none; } }
