/* ==========================================================================
   nikita-s.de · Chatbot-Demo
   Design-Tokens aus der Bewerbung (Magenta, Navy, Chat-Blasen, Arimo) –
   als App gedacht: Die Seite IST der Chatbot.
   Keine Inline-Styles/-Skripte nötig → strenge Content-Security-Policy möglich.
   ========================================================================== */

@font-face {
  font-family: "Arimo";
  src: url("../assets/fonts/arimo-latin-wght-normal.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

/* ---------- Tokens ---------- */
:root {
  --magenta: #a61f7d;
  --magenta-600: #8a1a68;
  --magenta-50: #f5e6f0;
  --magenta-100: #f4d6e8;
  --magenta-200: #e3bcd3;
  --navy: #14172f;
  --muted: #585f7e;
  --indigo: #232d8d;
  --bubble: #e7ebf1;
  --card: #f4f5fa;
  --line: #d5dae7;

  --f: "Arimo", Arial, "Helvetica Neue", Helvetica, "Liberation Sans", sans-serif;
  --pad: clamp(1rem, 4vw, 2rem);
  --col: 47rem;
  --bar-h: 4rem;
  --shadow: 0 18px 44px -24px rgba(20, 23, 47, .35), 0 2px 8px rgba(20, 23, 47, .05);
  --shadow-sm: 0 10px 26px -18px rgba(20, 23, 47, .4);
  --e-out: cubic-bezier(.16, 1, .3, 1);
  --e-io: cubic-bezier(.65, 0, .35, 1);
  color-scheme: light;
}

/* ---------- Grundlagen ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  overflow: hidden;
  background: #fff;
  color: var(--navy);
  font: 400 1rem/1.55 var(--f);
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

img,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
}

button,
input,
textarea {
  font: inherit;
  color: inherit;
  margin: 0;
}

button {
  cursor: pointer;
  background: none;
  border: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

p,
h1,
h2,
h3,
ul,
ol {
  margin: 0;
}

ul,
ol {
  padding: 0;
  list-style: none;
}

::selection {
  background: var(--magenta);
  color: #fff;
}

:focus-visible {
  outline: 2px solid var(--magenta);
  outline-offset: 3px;
  border-radius: 8px;
}

svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.defs {
  position: absolute;
}

.sr-only {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.skip {
  position: fixed;
  z-index: 300;
  left: 1rem;
  top: 1rem;
  padding: .7rem 1.1rem;
  border-radius: 999px;
  background: var(--magenta);
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  transform: translateY(-220%);
  transition: transform .3s var(--e-out);
}

.skip:focus {
  transform: none;
}

.eyebrow {
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ---------- App-Rahmen (volle Höhe, iOS-Tastatur über --vv-h) ---------- */
.app {
  position: fixed;
  left: 0;
  right: 0;
  top: var(--vv-top, 0px);
  height: var(--vv-h, 100vh);
  display: flex;
  flex-direction: column;
  isolation: isolate;
}

@supports (height: 100dvh) {
  .app {
    height: var(--vv-h, 100dvh);
  }
}

.app::before,
.app::after,
.doc::before,
.doc::after {
  content: "";
  position: absolute;
  z-index: -1;
  pointer-events: none;
}

.app::before,
.doc::before {
  /* Kreuz-Muster wie in der Bewerbung */
  top: 0;
  right: 0;
  width: min(34rem, 60vw);
  height: 22rem;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='38' height='38'%3E%3Cpath d='M19 13.5v11M13.5 19h11' stroke='%23e8c3d9' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E") 0 0 / 38px 38px;
  -webkit-mask-image: radial-gradient(ellipse 70% 70% at 85% 10%, #000, transparent 72%);
  mask-image: radial-gradient(ellipse 70% 70% at 85% 10%, #000, transparent 72%);
  opacity: .8;
}

.app::after,
.doc::after {
  /* weicher Farbschimmer */
  left: 50%;
  top: -18rem;
  width: 60rem;
  height: 36rem;
  transform: translateX(-50%);
  background: radial-gradient(closest-side, rgba(166, 31, 125, .07), rgba(35, 45, 141, .035) 55%, transparent);
}

/* ---------- Kopfzeile ---------- */
.bar {
  flex: none;
  height: var(--bar-h);
  border-bottom: 1px solid transparent;
  background: rgba(255, 255, 255, .82);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  transition: border-color .3s;
}

.bar.is-scrolled {
  border-bottom-color: var(--bubble);
}

.bar__in {
  height: 100%;
  max-width: 76rem;
  margin: 0 auto;
  padding: 0 var(--pad);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.who {
  display: flex;
  align-items: center;
  gap: .7rem;
  min-width: 0;
}

.who__txt {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.25;
}

.who__name {
  font-size: .95rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.who__status {
  font-size: .8rem;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.avatar {
  position: relative;
  flex: none;
  display: block;
  border-radius: 50%;
  background: var(--bubble);
}

.avatar img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.avatar--head {
  width: 2.4rem;
  height: 2.4rem;
}

.avatar__dot {
  position: absolute;
  right: -1px;
  bottom: -1px;
  width: .78rem;
  height: .78rem;
  border-radius: 50%;
  border: 2px solid #fff;
  background: var(--line);
  transition: background-color .3s;
}

.avatar__dot.is-live {
  background: var(--magenta);
}

.avatar__dot.is-busy {
  background: var(--magenta);
  animation: blink 1s steps(1) infinite;
}

.nav {
  display: flex;
  align-items: center;
  gap: .25rem;
}

.nav__btn {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  height: 2.5rem;
  padding: 0 .85rem;
  border-radius: 999px;
  font-size: .9rem;
  color: var(--muted);
  text-decoration: none;
  white-space: nowrap;
  transition: background-color .25s, color .25s;
}

.nav__btn svg {
  width: 1.15rem;
  height: 1.15rem;
}

.nav__btn:hover {
  background: var(--card);
  color: var(--navy);
}

/* Nur-Symbol-Knopf (LinkedIn); Logo inline als gefülltes SVG → folgt der Textfarbe */
.nav__btn--icon {
  width: 2.5rem;
  padding: 0;
  justify-content: center;
}

.nav__btn svg.nav__logo {
  fill: currentColor;
  stroke: none;
}

.nav__btn--icon:hover {
  color: #0a66c2;
}

.nav__btn--solid {
  background: var(--magenta);
  color: #fff;
  font-weight: 700;
}

.nav__btn--solid:hover {
  background: var(--magenta-600);
  color: #fff;
}

@media (max-width: 760px) {
  .nav__btn {
    width: 2.5rem;
    padding: 0;
    justify-content: center;
  }

  .nav__btn span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }
}

@media (max-width: 360px) {
  .bar__in {
    gap: .5rem;
  }

  .who {
    gap: .55rem;
  }

  .avatar--head {
    width: 2.15rem;
    height: 2.15rem;
  }

  .nav {
    gap: 0;
  }

  .nav__btn {
    width: 2.3rem;
  }
}

/* ---------- Bühne: scrollender Verlauf + Eingabe ---------- */
.stage {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.scroll {
  position: relative;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.col {
  width: 100%;
  max-width: var(--col);
  margin: 0 auto;
  padding: clamp(1.25rem, 5vh, 3.5rem) var(--pad) 1.75rem;
}

/* Begrüßung */
.mark {
  width: clamp(7.5rem, min(20vw, 21vh), 11.5rem);
  height: auto;
  margin: 0 0 1.1rem -.2rem;
  overflow: visible;
}

.mark__line {
  fill: none;
  stroke: url(#g-mark);
  stroke-width: 11;
  stroke-dasharray: 1 2;
  stroke-dashoffset: 0;
}

.mark__dots circle {
  fill: var(--magenta);
  stroke: none;
  transform-box: fill-box;
  transform-origin: center;
}

.hello {
  font-size: clamp(2.6rem, min(1.6rem + 6vw, 10.5vh), 5.5rem);
  font-weight: 700;
  line-height: .95;
  letter-spacing: -.05em;
  color: var(--magenta);
  overflow-wrap: anywhere;
}

.hello--long {
  font-size: clamp(2.2rem, min(1.2rem + 4.6vw, 8.5vh), 4.3rem);
}

.lede {
  margin-top: .8rem;
  font-size: clamp(1.3rem, 1rem + 1.25vw, 1.8rem);
  line-height: 1.28;
  letter-spacing: -.012em;
}

.sub {
  margin-top: .65rem;
  max-width: 34em;
  font-size: 1.0625rem;
  line-height: 1.55;
  color: var(--muted);
}

.facts {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  margin-top: 1.2rem;
}

.facts li {
  padding: .36rem .8rem;
  border-radius: 999px;
  background: var(--card);
  font-size: .86rem;
  color: var(--muted);
}

@media (min-width: 641px) and (max-height: 760px) {
  .facts {
    display: none;
  }
}

/* flache Laptop-Fenster: Vorschläge statt Stichpunkte */

/* Verlauf */
.log {
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
  margin-top: clamp(1.75rem, 4.5vh, 2.75rem);
}

.log:focus {
  outline: none;
}

/* nur Fokus-Ziel für Screenreader nach einem Tipp, kein sichtbarer Rahmen */
.msg {
  display: flex;
  gap: .7rem;
  align-items: flex-start;
}

.avatar--msg {
  width: 2.2rem;
  height: 2.2rem;
  margin-top: 1.5rem;
}

.msg__col {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 0;
  max-width: min(37rem, calc(100% - 2.9rem));
}

.msg__name {
  margin: 0 0 .35rem .2rem;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
}

.bubble {
  padding: .8rem 1.1rem .85rem;
  border-radius: 1.3rem;
  border-top-left-radius: .45rem;
  background: var(--bubble);
  line-height: 1.58;
  overflow-wrap: anywhere;
}

.bubble>*+* {
  margin-top: .6em;
}

.bubble ul,
.bubble ol {
  padding-left: 1.15em;
}

.bubble ul {
  list-style: disc;
}

.bubble ol {
  list-style: decimal;
}

.bubble li+li {
  margin-top: .3em;
}

.bubble strong {
  font-weight: 700;
}

.bubble code {
  padding: .05em .35em;
  border-radius: .35em;
  background: rgba(20, 23, 47, .07);
  font-size: .9em;
}

.bubble a {
  color: var(--magenta);
  text-decoration: underline;
  text-underline-offset: .18em;
}

.msg--user {
  justify-content: flex-end;
}

.msg--user .bubble {
  max-width: min(32rem, 88%);
  background: var(--magenta);
  color: #fff;
  border-radius: 1.3rem;
  border-top-right-radius: .45rem;
  white-space: pre-wrap;
}

.bubble--typing {
  display: inline-flex;
  gap: 5px;
  padding: 1rem 1.1rem;
}

.bubble--typing i,
.typing-dots i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--muted);
  animation: hop 1.1s var(--e-io) infinite;
}

.bubble--typing i:nth-child(2) {
  animation-delay: .15s;
}

.bubble--typing i:nth-child(3) {
  animation-delay: .3s;
}

.msg.is-streaming .bubble>p:last-child::after,
.msg.is-streaming .bubble> :is(ul, ol):last-child>li:last-child::after {
  content: "";
  display: inline-block;
  width: .5em;
  height: 1em;
  margin-left: .15em;
  vertical-align: -.15em;
  border-radius: 2px;
  background: var(--magenta);
  animation: blink 1s steps(1) infinite;
}

.msg__bubble {
  position: relative;
  max-width: 100%;
}

/* Spalte links = Avatar-Spalte; ::before hält den Avatar frei, margin-top:auto schiebt die Knöpfe an die Unterkante der Antwort */
.msg__acts {
  position: absolute;
  top: 0;
  bottom: 0;
  right: calc(100% + .7rem);
  width: 2.2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .15rem;
}

.msg__acts::before {
  content: "";
  flex: none;
  height: 2.6rem;
}

.msg__acts>* {
  flex: none;
}

.msg__acts> :first-child {
  margin-top: auto;
}

@media (max-width: 640px) {
  .msg__acts {
    width: 1.9rem;
  }

  .msg__acts::before {
    height: 2.3rem;
  }
}

.msg__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .35rem .45rem;
  margin: .5rem 0 0 .15rem;
}

.act {
  display: inline-grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  color: var(--muted);
  transition: background-color .2s, color .2s;
}

.act svg {
  width: 1.05rem;
  height: 1.05rem;
}

.act:hover,
.act.is-on {
  background: var(--magenta-50);
  color: var(--magenta);
}

.mode {
  font-size: .75rem;
  color: var(--muted);
}

.follow-wrap {
  position: relative;
  max-width: 100%;
  margin: .75rem 0 0 .15rem;
}

.follow {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
}

.follow-wrap::before,
.follow-wrap::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: .9rem;
  pointer-events: none;
  opacity: 0;
  transition: opacity .25s;
  z-index: 1;
}

.follow-wrap::before {
  left: 0;
  background: linear-gradient(to right, rgba(20, 23, 47, .28), rgba(20, 23, 47, 0));
}

.follow-wrap::after {
  right: 0;
  background: linear-gradient(to left, rgba(20, 23, 47, .28), rgba(20, 23, 47, 0));
}

.follow-wrap.has-left::before,
.follow-wrap.has-right::after {
  opacity: 1;
}

@media (max-width: 640px) {

  /* Smartphone: kleinere Folgefragen, bei Platzmangel horizontal wischen */
  .col {
    padding-bottom: .6rem;
  }

  .follow-wrap {
    margin-top: .6rem;
  }

  .follow {
    flex-wrap: nowrap;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    padding: 2px 0;
  }

  .follow::-webkit-scrollbar {
    display: none;
  }

  .follow .chip {
    flex: none;
    padding: .45rem .8rem;
    font-size: .84rem;
    white-space: nowrap;
  }
}

.chip {
  display: inline-flex;
  align-items: center;
  padding: .5rem .9rem;
  border: 1.5px solid var(--magenta-200);
  border-radius: 999px;
  background: #fff;
  font-size: .875rem;
  font-weight: 700;
  line-height: 1.2;
  color: var(--magenta);
  text-decoration: none;
  transition: background-color .25s, border-color .25s;
}

.chip:hover {
  background: var(--magenta-50);
  border-color: var(--magenta);
}

/* Start-Fragen */
.starters {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .6rem;
  margin: 1rem 0 0 2.9rem;
}

.starter {
  display: grid;
  grid-template-columns: 2.25rem minmax(0, 1fr);
  grid-template-rows: auto auto;
  column-gap: .75rem;
  align-items: center;
  padding: .85rem 1rem;
  border: 1px solid transparent;
  border-radius: 1.15rem;
  background: var(--card);
  text-align: left;
  transition: background-color .25s, border-color .25s, box-shadow .3s, transform .4s var(--e-out);
}

.starter:hover {
  background: #fff;
  border-color: var(--magenta-200);
  box-shadow: var(--shadow-sm);
}

.starter:active {
  transform: scale(.985);
}

.starter__ico {
  grid-row: 1 / span 2;
  display: grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: .75rem;
  background: #fff;
  color: var(--magenta);
}

.starter:hover .starter__ico {
  background: var(--magenta-50);
}

.starter__ico svg {
  width: 1.2rem;
  height: 1.2rem;
}

.starter__t {
  font-size: .95rem;
  font-weight: 700;
  line-height: 1.3;
}

.starter__s {
  font-size: .82rem;
  line-height: 1.35;
  color: var(--muted);
}

@media (max-width: 640px) {

  /* Handy: kompakter Kopf, Vorschläge als wischbare Reihe direkt unter der Begrüßung */
  .col {
    padding-top: 1.1rem;
  }

  .mark {
    width: 7.25rem;
    margin-bottom: .8rem;
  }

  .lede {
    margin-top: .6rem;
  }

  .sub {
    font-size: 1rem;
  }

  .facts {
    margin-top: .95rem;
  }

  .facts li {
    padding: .3rem .7rem;
    font-size: .8rem;
  }

  .log {
    margin-top: 1.6rem;
  }

  .starters {
    display: flex;
    gap: .55rem;
    margin: .9rem calc(var(--pad) * -1) 0;
    padding: .15rem var(--pad) .5rem;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: var(--pad);
    scrollbar-width: none;
  }

  .starters::-webkit-scrollbar {
    display: none;
  }

  .starter {
    flex: 0 0 min(15rem, 74vw);
    scroll-snap-align: start;
  }

  .avatar--msg {
    width: 1.9rem;
    height: 1.9rem;
  }

  .msg__col {
    max-width: calc(100% - 2.6rem);
  }
}

@media (max-width: 480px) {
  .who__pre {
    display: none;
  }
}

/* Handy mit eingeblendeten Browserleisten (iPhone-Safari ≈ 390 × 660): Begrüßung, Bot und Vorschläge auf einen Blick */
@media (max-width: 640px) and (max-height: 720px) {

  .facts,
  [data-an] .sub {
    display: none;
  }

  /* „Hallo FIRMA,“ ist zweizeilig und braucht den Platz */
  .mark {
    width: 6rem;
    margin-bottom: .6rem;
  }

  .log {
    margin-top: 1.2rem;
  }
}

@media (max-width: 640px) and (max-height: 600px) {
  .sub {
    display: none;
  }
}

/* sehr kleine Handys (iPhone SE) */
.noscript {
  margin-top: 1.5rem;
  padding: 1rem 1.2rem;
  border-radius: 1rem;
  background: var(--card);
}

/* Eingabe */
.composer {
  flex: none;
  padding: .55rem 0 calc(.65rem + env(safe-area-inset-bottom));
  background: linear-gradient(to top, #fff 72%, rgba(255, 255, 255, 0));
}

.composer__in {
  max-width: var(--col);
  margin: 0 auto;
  padding: 0 var(--pad);
}

.composer__box {
  display: flex;
  align-items: flex-end;
  gap: .3rem;
  padding: .35rem;
  border: 1.5px solid var(--line);
  border-radius: 1.7rem;
  background: #fff;
  box-shadow: var(--shadow);
  transition: border-color .3s, box-shadow .3s;
}

.composer__box:focus-within {
  border-color: var(--magenta-200);
}

.composer__input {
  flex: 1;
  min-width: 0;
  max-height: 9.5rem;
  padding: .66rem .4rem .66rem .8rem;
  border: 0;
  outline: none;
  resize: none;
  background: transparent;
  font-size: 1rem;
  line-height: 1.45;
  color: var(--navy);
  overflow: hidden;
}

.composer__input::placeholder {
  color: var(--muted);
  opacity: 1;
}

.icon-btn {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  color: var(--muted);
  transition: background-color .25s, color .25s;
}

.icon-btn svg {
  width: 1.3rem;
  height: 1.3rem;
}

.icon-btn:hover {
  background: var(--card);
  color: var(--navy);
}

.mic.is-on {
  position: relative;
  background: var(--magenta);
  color: #fff;
}

.mic.is-on::after {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 2px solid var(--magenta);
  animation: ring 1.4s var(--e-out) infinite;
}

.send {
  display: grid;
  place-items: center;
  flex: none;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  background: var(--magenta);
  color: #fff;
  transition: background-color .25s, transform .4s var(--e-out);
}

.send svg {
  width: 1.25rem;
  height: 1.25rem;
  stroke-width: 2.2;
}

.send:not(:disabled):hover {
  background: var(--magenta-600);
  transform: translateY(-1px);
}

.send:disabled {
  background: var(--magenta-200);
  cursor: default;
}

.send__stop {
  display: none;
  fill: currentColor;
  stroke: none;
}

.send.is-stop {
  background: var(--navy);
}

.send.is-stop .send__go {
  display: none;
}

.send.is-stop .send__stop {
  display: block;
}

@media (max-width: 640px) {

  /* Smartphone: Eingabefeld ca. 10 % niedriger (Schrift bleibt 16 px, sonst zoomt iOS) */
  .composer__box {
    padding: .3rem;
  }

  .composer__input {
    padding: .525rem .35rem .525rem .7rem;
  }

  .composer__box .icon-btn,
  .composer__box .send {
    width: 2.5rem;
    height: 2.5rem;
  }
}

.composer__note {
  margin-top: .5rem;
  text-align: center;
  font-size: .75rem;
  line-height: 1.45;
  color: var(--muted);
}

.composer__note a,
.link {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: var(--line);
  text-underline-offset: .18em;
  font-size: inherit;
}

.composer__note a:hover,
.link:hover {
  color: var(--magenta);
  text-decoration-color: currentColor;
}

.kb-open .composer__note {
  display: none;
}

.kb-open .composer {
  padding-bottom: .55rem;
}

.no-js .composer,
.no-js .starters,
.no-js .who__status,
.no-js [data-info-open] {
  display: none;
}

/* ---------- „So funktioniert’s“ ---------- */
.sheet {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  justify-content: flex-end;
  background: rgba(20, 23, 47, .32);
  opacity: 0;
  transition: opacity .3s;
}

.sheet.is-open {
  opacity: 1;
}

.sheet__panel {
  width: min(30rem, 100%);
  height: 100%;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 1.4rem 1.6rem 2rem;
  background: #fff;
  box-shadow: -24px 0 60px -30px rgba(20, 23, 47, .45);
  outline: none;
  transform: translateX(100%);
  transition: transform .5s var(--e-out);
}

.sheet.is-open .sheet__panel {
  transform: none;
}

.sheet__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.4rem;
}

.sheet__title {
  margin-top: .35rem;
  font-size: 1.6rem;
  line-height: 1.15;
  letter-spacing: -.025em;
  color: var(--magenta);
}

.flow {
  position: relative;
  display: grid;
  gap: 1.05rem;
}

.flow::before {
  content: "";
  position: absolute;
  left: 1rem;
  top: 1rem;
  bottom: 1rem;
  width: 2px;
  background: var(--magenta-100);
}

.flow li {
  position: relative;
  display: grid;
  grid-template-columns: 2rem minmax(0, 1fr);
  gap: .9rem;
}

.flow__n {
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: var(--magenta);
  color: #fff;
  font-size: .85rem;
  font-weight: 700;
}

.flow__t {
  font-weight: 700;
}

.flow li p+p {
  margin-top: .1rem;
  font-size: .95rem;
  color: var(--muted);
  line-height: 1.5;
}

.sheet__sec {
  margin-top: 1.8rem;
}

.sheet__sec h3 {
  margin-bottom: .7rem;
  font-size: .75rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
}

.checks {
  display: grid;
  gap: .55rem;
}

.checks li {
  position: relative;
  padding-left: 1.6rem;
  font-size: .95rem;
  line-height: 1.5;
}

.checks li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .2em;
  width: 1.05rem;
  height: 1.05rem;
  border-radius: 50%;
  background: var(--magenta-50) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m7 12.5 3.2 3L17 9' fill='none' stroke='%23a61f7d' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 80% no-repeat;
}

.pills {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
}

.pills li {
  padding: .38rem .8rem;
  border-radius: 999px;
  background: var(--bubble);
  font-size: .86rem;
}

.links {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
}

.sheet__foot {
  margin-top: 2rem;
  font-size: .82rem;
  color: var(--muted);
}

@media (max-width: 640px) {
  .sheet {
    align-items: flex-end;
  }

  .sheet__panel {
    width: 100%;
    height: auto;
    max-height: 90%;
    border-radius: 1.5rem 1.5rem 0 0;
    padding-bottom: calc(2rem + env(safe-area-inset-bottom));
    transform: translateY(100%);
  }
}

/* Hinweis-Toast */
.toast {
  position: fixed;
  z-index: 250;
  left: 50%;
  bottom: calc(6.5rem + env(safe-area-inset-bottom));
  max-width: min(28rem, calc(100% - 2rem));
  padding: .7rem 1.1rem;
  border-radius: 1rem;
  background: var(--navy);
  color: #fff;
  font-size: .9rem;
  line-height: 1.4;
  text-align: center;
  box-shadow: var(--shadow);
  transform: translateX(-50%);
  animation: toast-in .35s var(--e-out);
}

/* ---------- Textseiten (Impressum, Datenschutz) ---------- */
/* normale, scrollende Seite statt App-Rahmen; Kopfzeile bleibt oben stehen */
body.doc {
  position: relative;
  isolation: isolate;
  height: auto;
  min-height: 100%;
  overflow-x: hidden;
  overflow-y: visible;
  display: flex;
  flex-direction: column;
}

/* Farbschimmer hier nur so breit wie die Seite: Der 60rem breite Kasten ragte sonst seitlich heraus,
   und Handy-Browser lassen sich das trotz overflow-x: hidden am body zur Seite schieben */
.doc::after {
  left: 0;
  width: 100%;
  transform: none;
  background: radial-gradient(closest-side, rgba(166, 31, 125, .07), rgba(35, 45, 141, .035) 55%, transparent) 50% 0 / 60rem 36rem no-repeat;
}

.doc__bar {
  position: sticky;
  top: 0;
  z-index: 10;
  height: calc(var(--bar-h) + env(safe-area-inset-top));
  padding-top: env(safe-area-inset-top);
  border-bottom-color: var(--bubble);
}

a.who {
  text-decoration: none;
  border-radius: 999px;
}

a.who:hover .who__name {
  color: var(--magenta);
}

.nav__btn--label svg {
  flex: none;
}

@media (max-width: 760px) {

  /* „Zurück zum Chat“ behält auf dem Handy die Beschriftung */
  .nav__btn--label {
    width: auto;
    padding: 0 1rem 0 .8rem;
  }

  .nav__btn--label span {
    position: static;
    width: auto;
    height: auto;
    overflow: visible;
    clip-path: none;
  }
}

.legal {
  flex: 1;
  width: 100%;
  max-width: var(--col);
  margin: 0 auto;
  padding: clamp(1.75rem, 6vh, 3.5rem) var(--pad) 3rem;
  scroll-margin-top: var(--bar-h);
  line-height: 1.65;
  overflow-wrap: break-word;
}

.legal h1 {
  margin-top: .5rem;
  font-size: clamp(2.1rem, 1.4rem + 3.2vw, 3.4rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -.04em;
  color: var(--magenta);
  hyphens: manual;
}

.legal h2 {
  margin: 2.2rem 0 .6rem;
  font-size: 1.2rem;
  line-height: 1.3;
  letter-spacing: -.01em;
}

.legal h1+h2,
.legal h1+p {
  margin-top: 1.6rem;
}

.legal h3 {
  margin: 1.6rem 0 .5rem;
  font-size: 1.02rem;
  line-height: 1.35;
}

.legal p+p,
.legal p+ul,
.legal ul+p {
  margin-top: .8rem;
}

.legal ul {
  padding-left: 1.2em;
  list-style: disc;
}

.legal li+li {
  margin-top: .35rem;
}

.legal li::marker {
  color: var(--magenta);
}

.legal a {
  color: var(--magenta);
  text-decoration: underline;
  text-decoration-color: var(--magenta-200);
  text-underline-offset: .18em;
}

.legal a:hover {
  text-decoration-color: currentColor;
}

.legal mark {
  padding: 0 .2em;
  border-radius: .25em;
  background: var(--magenta-100);
  color: var(--navy);
}

.legal .legal__stand {
  margin-top: 2.2rem;
  font-size: .9rem;
  color: var(--muted);
}

.doc__foot {
  width: 100%;
  max-width: var(--col);
  margin: 0 auto;
  padding: .55rem var(--pad) calc(.65rem + env(safe-area-inset-bottom));
  text-align: center;
  font-size: .75rem;
  line-height: 1.45;
  color: var(--muted);
}

.doc__foot a {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: var(--line);
  text-underline-offset: .18em;
}

.doc__foot a:hover {
  color: var(--magenta);
  text-decoration-color: currentColor;
}

.doc__foot a[aria-current="page"] {
  color: var(--navy);
  text-decoration: none;
}

/* ---------- Lebenslauf (lebenslauf.html) ---------- */
/* Aufklappen über <details>/<summary>: funktioniert ohne JS; js/cv.js ergänzt nur „Alle aufklappen“ */
.cv {
  flex: 1;
  width: 100%;
  max-width: var(--col);
  margin: 0 auto;
  padding: clamp(1.75rem, 6vh, 3.5rem) var(--pad) 3rem;
  scroll-margin-top: var(--bar-h);
  overflow-wrap: break-word;
}

.cv h1 {
  margin-top: .5rem;
  font-size: clamp(2.1rem, 1.4rem + 3.2vw, 3.4rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -.04em;
  color: var(--magenta);
}

.cv__facts {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  margin-top: 1.2rem;
}

.cv__facts li {
  padding: .36rem .8rem;
  border-radius: 999px;
  background: var(--card);
  font-size: .86rem;
  color: var(--muted);
}

.cv__sec {
  margin-top: clamp(2.5rem, 7vh, 4rem);
}

.cv__sec:first-of-type {
  margin-top: 2.2rem;
}

.cv__h2 {
  font-size: 1.6rem;
  line-height: 1.15;
  letter-spacing: -.025em;
  color: var(--magenta);
}

.cv__intro {
  margin-top: .35rem;
  font-size: .95rem;
  color: var(--muted);
}

.cv__h3 {
  margin: 2rem 0 .8rem;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
}

.cv__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.cv__head + .cv__h3 {
  margin-top: 1.6rem;
}

.cv__group + .cv__h3,
.proj-list + .cv__h3 {
  margin-top: 1.6rem;
}

.cv__all {
  font-size: .85rem;
  color: var(--muted);
  text-decoration: underline;
  text-decoration-color: var(--line);
  text-underline-offset: .18em;
}

.cv__all:hover {
  color: var(--magenta);
  text-decoration-color: currentColor;
}

.cv summary {
  list-style: none;
  cursor: pointer;
}

.cv summary::-webkit-details-marker {
  display: none;
}

.chev {
  display: grid;
  place-items: center;
  width: 1.9rem;
  height: 1.9rem;
  border-radius: .6rem;
  background: var(--card);
  color: var(--magenta);
  transition: background-color .25s;
}

.chev svg {
  width: 1.05rem;
  height: 1.05rem;
  transition: transform .35s var(--e-out);
}

details[open] > summary .chev {
  background: var(--magenta-50);
}

details[open] > summary .chev svg {
  transform: rotate(180deg);
}

/* Werdegang als Zeitleiste */
.tl {
  position: relative;
  display: grid;
  gap: 1.4rem;
  margin-top: 1.4rem;
}

.tl::before {
  content: "";
  position: absolute;
  left: .45rem;
  top: .6rem;
  bottom: .6rem;
  width: 2px;
  background: var(--magenta-100);
}

.tl > li {
  position: relative;
  display: grid;
  grid-template-columns: 1rem minmax(0, 1fr);
  gap: 1rem;
}

.tl__dot {
  margin-top: .35rem;
  width: 1rem;
  height: 1rem;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--magenta);
}

.tl > li:first-child .tl__dot {
  background: var(--magenta);
  border: 3px solid #fff;
  box-shadow: 0 0 0 2px var(--magenta);
}

.tl__sum {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 1.9rem;
  gap: .75rem;
  align-items: start;
  border-radius: .75rem;
}

.tl__sum .chev {
  margin-top: .6rem;
}

.tl__sum:hover .cv__role {
  color: var(--magenta);
}

.cv__date {
  display: block;
  font-size: .82rem;
  font-weight: 700;
  letter-spacing: .04em;
  color: var(--muted);
}

.cv__role {
  display: block;
  margin-top: .15rem;
  font-size: 1.05rem;
  font-weight: 700;
  transition: color .25s;
}

.cv__org {
  display: block;
  font-size: .95rem;
  color: var(--muted);
}

.tl__list {
  margin-top: .55rem;
  padding-left: 1.15em;
  list-style: disc;
  display: grid;
  gap: .3rem;
  font-size: .95rem;
  line-height: 1.5;
}

/* Ausbildung */
.edu {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: .6rem;
}

.edu li {
  padding: .9rem 1.1rem;
  border-radius: 1.15rem;
  background: var(--card);
}

.edu__t {
  margin-top: .15rem;
  font-weight: 700;
  line-height: 1.3;
}

.edu__s {
  margin-top: .15rem;
  font-size: .88rem;
  line-height: 1.4;
  color: var(--muted);
}

/* Projekte */
.proj-list {
  display: grid;
  gap: .6rem;
}

.proj {
  border: 1px solid transparent;
  border-radius: 1.15rem;
  background: var(--card);
  transition: background-color .25s, border-color .25s, box-shadow .3s;
}

.proj[open] {
  background: #fff;
  border-color: var(--magenta-200);
  box-shadow: var(--shadow-sm);
}

.proj > summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 2.25rem;
  gap: .75rem;
  align-items: center;
  padding: .9rem 1rem .9rem 1.1rem;
  border-radius: 1.15rem;
}

.proj .chev {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: .75rem;
  background: #fff;
}

.proj .chev svg {
  width: 1.2rem;
  height: 1.2rem;
}

.proj__t {
  display: block;
  font-size: .98rem;
  font-weight: 700;
  line-height: 1.3;
  text-wrap: pretty;
}

.proj__m {
  display: block;
  margin-top: .2rem;
  font-size: .82rem;
  line-height: 1.35;
  color: var(--muted);
}

.proj__body {
  display: grid;
  gap: .85rem;
  padding: 0 1.1rem 1.1rem;
}

.proj__l {
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
}

.proj__x {
  margin-top: .2rem;
  font-size: .95rem;
  line-height: 1.55;
  text-wrap: pretty;
}

.proj__tech {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
}

.proj__tech li {
  padding: .3rem .7rem;
  border-radius: 999px;
  background: var(--bubble);
  font-size: .82rem;
}


/* ---------- Bewegung: Einstieg ---------- */
.js .welcome>*,
.js [data-greeting],
.js .starters>* {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .8s var(--e-out), transform 1s var(--e-out);
}

.js .welcome> :nth-child(2) {
  transition-delay: .12s;
}

.js .welcome> :nth-child(3) {
  transition-delay: .22s;
}

.js .welcome> :nth-child(4) {
  transition-delay: .3s;
}

.js .welcome> :nth-child(5) {
  transition-delay: .38s;
}

.js [data-greeting] {
  transition-delay: .45s;
}

@media (max-width: 640px) {
  .js .starters>* {
    transform: translateX(22px);
  }
}

/* Handy: Vorschläge gleiten von rechts herein */
.is-ready .welcome>*,
.is-ready [data-greeting] {
  opacity: 1;
  transform: none;
}

.is-starters .starters>* {
  opacity: 1;
  transform: none;
}

.is-starters .starters> :nth-child(2) {
  transition-delay: .07s;
}

.is-starters .starters> :nth-child(3) {
  transition-delay: .14s;
}

.is-starters .starters> :nth-child(4) {
  transition-delay: .21s;
}

.js .mark__line {
  stroke-dashoffset: 1;
}

.is-ready .mark__line {
  animation: draw 1.15s var(--e-io) .05s forwards;
}

.js .mark__dots circle {
  opacity: 0;
}

.is-ready .mark__dots circle {
  animation: dot-in .3s var(--e-out) 1s forwards;
}

.is-ready .mark__dots circle:nth-child(2) {
  animation-delay: 1.07s;
}

.is-ready .mark__dots circle:nth-child(3) {
  animation-delay: 1.14s;
}

.welcome.is-talking .mark__dots circle {
  opacity: 1;
  animation: bounce 1s var(--e-io) infinite;
}

.welcome.is-talking .mark__dots circle:nth-child(2) {
  animation-delay: .15s;
}

.welcome.is-talking .mark__dots circle:nth-child(3) {
  animation-delay: .3s;
}

.msg-in {
  animation: msg-in .5s var(--e-out);
}

@keyframes draw {
  to {
    stroke-dashoffset: 0;
  }
}

@keyframes dot-in {
  from {
    opacity: 0;
    transform: scale(.3);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes bounce {

  0%,
  60%,
  100% {
    transform: translateY(0);
  }

  30% {
    transform: translateY(-16px);
  }
}

@keyframes hop {

  0%,
  60%,
  100% {
    transform: translateY(0);
    opacity: .5;
  }

  30% {
    transform: translateY(-3px);
    opacity: 1;
  }
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}

@keyframes ring {
  from {
    transform: scale(.9);
    opacity: .9;
  }

  to {
    transform: scale(1.35);
    opacity: 0;
  }
}

@keyframes msg-in {
  from {
    opacity: 0;
    transform: translateY(10px) scale(.98);
  }
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translate(-50%, 8px);
  }
}

/* Sicherheitsnetze: Inhalte werden nie dauerhaft versteckt */
@keyframes fs-show {
  to {
    opacity: 1;
    transform: none;
    stroke-dashoffset: 0;
  }
}

.js:not(.is-alive) .welcome>*,
.js:not(.is-alive) [data-greeting],
.js:not(.is-alive) .starters>*,
.js:not(.is-alive) .mark__line,
.js:not(.is-alive) .mark__dots circle {
  animation: fs-show .5s 3s forwards;
}

.is-fallback .welcome>*,
.is-fallback [data-greeting],
.is-fallback .starters>*,
.is-fallback .mark__dots circle {
  opacity: 1 !important;
  transform: none !important;
  animation: none !important;
}

.is-fallback .mark__line {
  stroke-dashoffset: 0 !important;
  animation: none !important;
}

@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation-duration: .001ms !important;
    animation-delay: 0s !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    transition-delay: 0s !important;
    scroll-behavior: auto !important;
  }
}

@media print {
  body {
    overflow: visible;
  }

  .app {
    position: static;
    height: auto;
  }

  .bar,
  .composer,
  .starters,
  .sheet,
  .toast,
  .skip,
  .doc::before,
  .doc::after {
    display: none !important;
  }

  .legal {
    padding-top: 0;
  }

  .scroll {
    overflow: visible;
  }
}