/* ============================================================
   KI-Chatbots: Seitenstile (kc-*)
   Grundzustand jeder Animation ist der fertige Zustand. Animationen
   starten ueber .rv.in oder per JS (.armed) und sind bei
   prefers-reduced-motion abgeschaltet.
   ============================================================ */

:root {
  --kc-out: cubic-bezier(0.16, 1, 0.3, 1);
  --kc-travel: cubic-bezier(0.65, 0, 0.35, 1);
  --kc-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Schleifen pausieren, solange sie nicht im Bild sind */
[data-loop]:not(.live) *,
[data-loop]:not(.live) { animation-play-state: paused !important; }

/* ---------- Hero ---------- */
.kc-hero-grid { display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(0, 0.88fr); gap: 56px; align-items: center; }
.kc-hero-grid h1 { font-size: clamp(38px, 4.8vw, 62px); }
.kc-chat {
  position: relative; max-width: 430px; margin-left: auto; width: 100%;
  display: flex; flex-direction: column; gap: 10px; padding: 16px;
  border-radius: 22px; background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(255, 255, 255, 0.13);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35);
}
.kc-chat::before {
  content: ""; position: absolute; inset: -1px; border-radius: inherit; pointer-events: none;
  background: radial-gradient(260px circle at 100% 0%, rgba(237, 152, 42, 0.22), transparent 60%);
}
.kc-chat-head {
  display: flex; align-items: center; gap: 8px; margin-bottom: 4px;
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: rgba(230, 238, 242, 0.6);
}
.kc-chat-head em { margin-left: auto; font-style: normal; color: var(--orange-soft); }
.kc-slot { display: grid; }
.kc-slot > * { grid-area: 1 / 1; }
.kc-typing { display: inline-flex; gap: 5px; align-items: center; align-self: flex-start; width: 58px; height: 38px; padding: 0 16px; }
.kc-typing i { width: 7px; height: 7px; border-radius: 50%; background: rgba(230, 238, 242, 0.7); animation: kc-dot 1.05s var(--kc-travel) infinite; }
.kc-typing i:nth-child(2) { animation-delay: 0.16s; }
.kc-typing i:nth-child(3) { animation-delay: 0.34s; }
@keyframes kc-dot { 0%, 100% { transform: translateY(0); opacity: 0.45; } 45% { transform: translateY(-5px); opacity: 1; } }
.kc-a1 { animation: kc-u 15s var(--kc-out) infinite both; }
.kc-typing { animation: kc-t 15s var(--kc-out) infinite both; }
.kc-chat .kc-a2 { animation: kc-b 15s var(--kc-out) infinite both; }
.kc-chat .kc-a2 .kb-src { animation: kc-s 15s var(--kc-out) infinite both; }
@keyframes kc-u { 0%, 4% { opacity: 0; transform: translateY(14px) scale(0.97); } 9%, 90% { opacity: 1; transform: none; } 96%, 100% { opacity: 0; transform: translateY(-6px); } }
@keyframes kc-t { 0%, 12% { opacity: 0; transform: translateY(8px) scale(0.95); } 15%, 26% { opacity: 1; transform: none; } 28%, 100% { opacity: 0; transform: none; } }
@keyframes kc-b { 0%, 27% { opacity: 0; transform: translateY(10px) scale(0.97); } 33%, 90% { opacity: 1; transform: none; } 96%, 100% { opacity: 0; transform: translateY(-6px); } }
@keyframes kc-s { 0%, 36% { opacity: 0; } 42%, 90% { opacity: 1; } 96%, 100% { opacity: 0; } }

/* ---------- Gemeinsame Bausteine ---------- */
.kc-tag {
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px; border-radius: 99px;
  font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.06em; text-transform: uppercase;
  background: rgba(237, 152, 42, 0.16); color: var(--orange-deep); white-space: nowrap;
}
.kc-tag.ok { background: rgba(53, 194, 107, 0.16); color: #1E8A4C; }
.kc-tag.steel { background: rgba(111, 167, 199, 0.2); color: #2D6585; }
.kc-tag.mute { background: rgba(92, 107, 116, 0.14); color: var(--gray); }
@keyframes kc-pop { from { opacity: 0; transform: translateY(10px) scale(0.95); } to { opacity: 1; transform: none; } }

/* ---------- Einsatzarten: Mini-Visuals ---------- */
.kc-uc {
  position: relative; height: 138px; margin-bottom: 20px; padding: 14px; overflow: hidden;
  border-radius: 12px; background: var(--bg-alt); border: 1px solid var(--line-soft);
  display: flex; flex-direction: column; justify-content: center; gap: 8px;
}
.kc-uc .b { max-width: 82%; padding: 7px 11px; border-radius: 12px; font-size: 12.5px; line-height: 1.35; }
.kc-uc .b.l { align-self: flex-start; background: #E3EAF0; color: var(--ink); border-bottom-left-radius: 3px; }
.kc-uc .b.r { align-self: flex-end; background: var(--orange); color: var(--ink); font-weight: 600; border-bottom-right-radius: 3px; }
.kc-uc .kc-tag { align-self: flex-start; }
.rv.in .kc-uc .b:nth-child(1) { animation: kc-pop 0.55s var(--kc-spring) 0.5s both; }
.rv.in .kc-uc .b:nth-child(2) { animation: kc-pop 0.55s var(--kc-spring) 1.35s both; }
.rv.in .kc-uc .kc-tag { animation: kc-pop 0.5s var(--kc-spring) 2.4s both; }

.kc-search { display: flex; align-items: center; gap: 9px; padding: 8px 12px; border-radius: 99px; background: #fff; border: 1px solid var(--line); font-size: 12.5px; }
.kc-search i { width: 11px; height: 11px; border: 2px solid var(--gray); border-radius: 50%; position: relative; flex: none; }
.kc-search i::after { content: ""; position: absolute; width: 5px; height: 2px; background: var(--gray); right: -5px; bottom: -2px; transform: rotate(45deg); }
.kc-typed { display: block; white-space: nowrap; }
.kc-res { display: flex; align-items: center; gap: 8px; padding: 6px 10px; border-radius: 8px; background: #fff; border: 1px solid var(--line-soft); font-size: 12px; }
.kc-res u { text-decoration: none; background: rgba(237, 152, 42, 0.28); padding: 0 3px; border-radius: 3px; }
.kc-res em { font-style: normal; margin-left: auto; font-family: var(--font-mono); font-size: 10px; color: var(--gray); white-space: nowrap; }
.rv.in .kc-uc .kc-typed { animation: kc-wipe 1.3s var(--kc-travel) 0.5s both; }
.rv.in .kc-uc .kc-res:nth-of-type(2) { animation: kc-pop 0.5s var(--kc-out) 2s both; }
.rv.in .kc-uc .kc-res:nth-of-type(3) { animation: kc-pop 0.5s var(--kc-out) 2.35s both; }
@keyframes kc-wipe { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }

.kc-mail { padding: 10px 12px; border-radius: 10px; background: #fff; border: 1px solid var(--line-soft); display: grid; gap: 6px; }
.kc-mh { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 12px; margin-bottom: 2px; }
.kc-mh b { font-family: var(--font-head); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kc-mail .ln { display: block; height: 5px; border-radius: 3px; background: var(--line); width: var(--w, 80%); transform-origin: 0 50%; }
.rv.in .kc-mail .ln { animation: kc-line 0.8s var(--kc-travel) both; }
.rv.in .kc-mail .ln:nth-of-type(1) { animation-delay: 0.5s; }
.rv.in .kc-mail .ln:nth-of-type(2) { animation-delay: 0.95s; }
.rv.in .kc-mail .ln:nth-of-type(3) { animation-delay: 1.6s; }
.rv.in .kc-mail .kc-tag { animation: kc-pop 0.5s var(--kc-spring) 2s both; }
@keyframes kc-line { from { transform: scaleX(0); opacity: 0; } to { transform: scaleX(1); opacity: 1; } }

/* ---------- Posteingang vorher / nachher ---------- */
.kc-ib-sec .desc { color: rgba(230, 238, 242, 0.72); }
.kc-ib-sec .mono-label,
.kc-ib-sec .mono-label::before { color: var(--orange-soft); }
.kc-seg { display: inline-flex; padding: 4px; margin: 4px 0 22px; border-radius: 99px; background: rgba(255, 255, 255, 0.08); border: 1px solid rgba(255, 255, 255, 0.14); }
.kc-seg button {
  border: 0; cursor: pointer; font: inherit; font-size: 14.5px; font-weight: 600; padding: 9px 18px; border-radius: 99px;
  background: transparent; color: rgba(230, 238, 242, 0.72); transition: background 0.35s var(--kc-out), color 0.25s;
}
.kc-seg button[aria-pressed="true"] { background: var(--orange); color: var(--ink); }
.kc-seg button:focus-visible { outline: 2px solid var(--orange-soft); outline-offset: 2px; }
.kc-expl { display: grid; }
.kc-expl > p { grid-area: 1 / 1; color: rgba(230, 238, 242, 0.82); font-size: 16.5px; }

.kc-ib { border-radius: 18px; background: #FFFFFC; color: var(--ink); box-shadow: 0 34px 80px rgba(0, 0, 0, 0.4); overflow: hidden; }
.kc-ib-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; background: var(--bg-alt); border-bottom: 1px solid var(--line); }
.kc-ib-head b { font-family: var(--font-head); font-size: 15px; }
.kc-cnt { display: grid; justify-items: end; }
.kc-cnt span { grid-area: 1 / 1; font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; }
.kc-cnt .is-v { color: #B5560E; }
.kc-cnt .is-n { color: #1E8A4C; }
.kc-row { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 13px 18px; border-bottom: 1px solid var(--line-soft); }
.kc-row:last-child { border-bottom: 0; }
.kc-row .av { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: rgba(29, 64, 82, 0.1); color: var(--petrol); font-family: var(--font-head); font-weight: 700; font-size: 14px; }
.kc-row .tx { display: grid; grid-template-rows: auto auto; min-width: 0; }
.kc-row .tx b { font-size: 14.5px; font-family: var(--font-head); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kc-row .sub { display: grid; }
.kc-row .sub span { grid-area: 1 / 1; font-size: 12.5px; color: var(--gray); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kc-row .st { display: grid; justify-items: end; }
.kc-row .st .kc-tag { grid-area: 1 / 1; }

/* Zustandswechsel: Zeile fuer Zeile in unregelmaessigem Abstand (--d je Zeile) */
.kc-ib .is-v, .kc-ib .is-n, .kc-cnt .is-v, .kc-cnt .is-n, .kc-row .av, .kc-expl > p {
  transition: opacity 0.55s var(--kc-out), transform 0.55s var(--kc-out), background 0.55s var(--kc-out), color 0.55s var(--kc-out);
  transition-delay: var(--d, 0s);
}
.kc-ib-wrap[data-state="vorher"] .is-n { opacity: 0; transform: translateY(6px); pointer-events: none; }
.kc-ib-wrap[data-state="nachher"] .is-v { opacity: 0; transform: translateY(-6px); pointer-events: none; }
.kc-ib-wrap[data-state="vorher"] .kc-row .av { background: rgba(181, 86, 14, 0.12); color: #B5560E; }

/* ---------- RAG-Erklaerung ---------- */
.rag {
  position: relative; border-radius: 26px; padding: 30px 26px 26px;
  background: radial-gradient(700px 360px at 100% 0%, rgba(237, 152, 42, 0.14), transparent 60%), linear-gradient(160deg, #16354A, var(--night) 80%);
  color: #E6EEF2; box-shadow: 0 34px 80px rgba(16, 40, 53, 0.28);
  display: grid; grid-template-columns: 0.9fr 0.95fr 1.35fr 1fr; gap: 18px;
}
.rag-cell { position: relative; display: flex; flex-direction: column; gap: 14px; min-width: 0; transition: opacity 0.6s var(--kc-out); }
.rag-cell:not(:last-child)::after {
  content: ""; position: absolute; top: 76px; right: -14px; width: 9px; height: 9px;
  border-top: 2px solid var(--orange); border-right: 2px solid var(--orange); transform: rotate(45deg);
}
.rag-no { display: flex; align-items: center; gap: 10px; font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: rgba(230, 238, 242, 0.55); }
.rag-no b { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; background: rgba(237, 152, 42, 0.18); color: var(--orange-soft); font-family: var(--font-head); font-size: 13px; }
.rag-vis { position: relative; height: 232px; border-radius: 14px; background: rgba(255, 255, 255, 0.045); border: 1px solid rgba(255, 255, 255, 0.1); overflow: hidden; padding: 14px; }
.rag-cell b.t { font-family: var(--font-head); font-size: 18px; color: #fff; display: block; }
.rag-cell span.d { font-size: 14px; color: rgba(230, 238, 242, 0.68); display: block; margin-top: 4px; }

/* 1: Dokumente */
.rag-docs { position: absolute; inset: 0; display: grid; place-items: center; }
.rag-doc {
  position: absolute; width: 62px; height: 82px; border-radius: 7px; padding: 10px 8px; background: #F4F7F9; color: var(--ink);
  display: flex; flex-direction: column; gap: 5px; box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}
.rag-doc::after { content: ""; position: absolute; top: 0; right: 0; width: 14px; height: 14px; background: linear-gradient(225deg, var(--night-2) 50%, #C9D5DC 50%); border-bottom-left-radius: 5px; }
.rag-doc em { font-style: normal; font-family: var(--font-mono); font-size: 9px; font-weight: 600; letter-spacing: 0.08em; color: var(--orange-deep); }
.rag-doc i { display: block; height: 4px; border-radius: 2px; background: #C9D5DC; }
.rag-doc i:nth-child(3) { width: 70%; }
.rag-doc i:nth-child(4) { width: 85%; }
.rag-doc.d1 { transform: translate(-58px, 6px) rotate(-9deg); }
.rag-doc.d2 { transform: translate(0, -8px) rotate(1deg); z-index: 2; }
.rag-doc.d3 { transform: translate(58px, 8px) rotate(8deg); }

/* 2: Abschnitte */
.rag-chunks { position: absolute; inset: 14px; display: grid; grid-template-columns: 1fr 1fr; grid-auto-rows: 1fr; gap: 8px 9px; transition: gap 0.9s var(--kc-travel); }
.rag-chunks i { display: block; border-radius: 6px; background: rgba(111, 167, 199, 0.28); border: 1px solid rgba(111, 167, 199, 0.5); transition: border-radius 0.6s var(--kc-out), background 0.6s; }
.rag-chunks i:nth-child(3n) { background: rgba(245, 194, 107, 0.22); border-color: rgba(245, 194, 107, 0.5); }

/* 3: Suche und Antwort */
.rag-q { display: inline-block; max-width: 100%; padding: 6px 11px; border-radius: 12px 12px 3px 12px; background: var(--orange); color: var(--ink); font-size: 12.5px; font-weight: 600; margin-left: auto; }
.rag-find { position: relative; display: grid; gap: 5px; margin: 10px 0 9px; }
.rag-find i { display: block; height: 9px; border-radius: 4px; background: rgba(255, 255, 255, 0.1); border: 1px solid transparent; transition: background 0.45s var(--kc-out), border-color 0.45s var(--kc-out), opacity 0.45s; }
.rag-find i:nth-child(1) { width: 88%; } .rag-find i:nth-child(2) { width: 72%; } .rag-find i:nth-child(3) { width: 94%; } .rag-find i:nth-child(4) { width: 64%; }
.rag-find i.hit { background: rgba(237, 152, 42, 0.45); border-color: var(--orange); }
.rag-find i:not(.hit) { opacity: 0.4; }
.rag-scan { position: absolute; left: -4px; right: -4px; top: 0; height: 2px; background: var(--orange); box-shadow: 0 0 14px 3px rgba(237, 152, 42, 0.6); border-radius: 2px; opacity: 0; }
.rag-ans { padding: 9px 12px; border-radius: 12px 12px 12px 3px; background: rgba(255, 255, 255, 0.1); font-size: 13px; line-height: 1.45; color: #fff; }
.rag-ans .w { display: inline-block; }
.rag-ans .kb-src { margin-top: 6px; padding-top: 6px; font-size: 10.5px; }

/* 4: Grenzen */
.rag-nf { display: grid; gap: 8px; }
.rag-nf .rag-q { margin-left: auto; }
.rag-nf .rag-ans { background: rgba(255, 255, 255, 0.08); }
.rag-hand { display: inline-flex; align-items: center; gap: 7px; margin-top: 7px; padding: 4px 10px; border-radius: 99px; background: rgba(111, 167, 199, 0.2); color: #BFE0F2; font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.05em; text-transform: uppercase; }

/* Zustaende: nicht scharf = fertig sichtbar. .armed = Choreografie per JS */
.rag.armed .rag-cell { opacity: 0.38; }
.rag.armed.s1 .rag-cell:nth-child(1), .rag.armed.s2 .rag-cell:nth-child(2), .rag.armed.s3 .rag-cell:nth-child(3), .rag.armed.s4 .rag-cell:nth-child(4) { opacity: 1; }
.rag.armed.s2 .rag-cell:nth-child(1), .rag.armed.s3 .rag-cell:nth-child(1), .rag.armed.s3 .rag-cell:nth-child(2), .rag.armed.s4 .rag-cell:nth-child(1), .rag.armed.s4 .rag-cell:nth-child(2), .rag.armed.s4 .rag-cell:nth-child(3) { opacity: 0.85; }
.rag.snap, .rag.snap * { transition: none !important; animation: none !important; }

.rag.armed .rag-doc { opacity: 0; }
.rag.armed.s1 .rag-doc { opacity: 1; animation: rag-drop 0.8s var(--kc-out) both; }
.rag.armed.s1 .rag-doc.d1 { animation-delay: 0.1s; } .rag.armed.s1 .rag-doc.d2 { animation-delay: 0.55s; } .rag.armed.s1 .rag-doc.d3 { animation-delay: 0.85s; }
@keyframes rag-drop { from { opacity: 0; margin-top: -60px; } to { opacity: 1; margin-top: 0; } }

.rag.armed .rag-chunks { gap: 0; }
.rag.armed .rag-chunks i { opacity: 0; border-radius: 0; transition: opacity 0.5s var(--kc-out), border-radius 0.7s var(--kc-out), background 0.6s; }
.rag.armed.s1 .rag-chunks i { opacity: 1; transition-delay: 1s; }
.rag.armed.s2 .rag-chunks { gap: 8px 9px; }
.rag.armed.s2 .rag-chunks i { opacity: 1; border-radius: 6px; transition-delay: var(--d, 0s); }

.rag.armed .rag-q, .rag.armed .rag-ans, .rag.armed .rag-hand, .rag.armed .rag-ans .kb-src { opacity: 0; transform: translateY(8px); transition: opacity 0.5s var(--kc-out), transform 0.5s var(--kc-out); }
.rag.armed.s3 .rag-cell:nth-child(3) .rag-q { opacity: 1; transform: none; }
.rag.armed.s3 .rag-scan { animation: rag-scan 1.5s var(--kc-travel) 0.7s both; }
.rag.armed .rag-find i.hit { background: rgba(255, 255, 255, 0.1); border-color: transparent; }
.rag.armed.s3 .rag-find i.hit { background: rgba(237, 152, 42, 0.45); border-color: var(--orange); transition-delay: 1.35s; }
.rag.armed.s3 .rag-find i.hit.h2 { transition-delay: 1.75s; }
.rag.armed .rag-find i:not(.hit) { opacity: 1; }
.rag.armed.s3 .rag-find i:not(.hit) { opacity: 0.4; transition-delay: 1.6s; }
.rag.armed.s3 .rag-cell:nth-child(3) .rag-ans { opacity: 1; transform: none; transition-delay: 2.5s; }
.rag.armed.s3 .rag-cell:nth-child(3) .kb-src { opacity: 1; transform: none; transition-delay: 3.7s; }
.rag.armed.s4 .rag-cell:nth-child(4) .rag-q { opacity: 1; transform: none; }
.rag.armed.s4 .rag-cell:nth-child(4) .rag-ans { opacity: 1; transform: none; transition-delay: 0.9s; }
.rag.armed.s4 .rag-cell:nth-child(4) .rag-hand { opacity: 1; transform: none; transition-delay: 1.8s; }
@keyframes rag-scan { 0% { top: 0; opacity: 0; } 12% { opacity: 1; } 88% { opacity: 1; } 100% { top: calc(100% - 2px); opacity: 0; } }

.rag-foot { margin-top: 14px; font-size: 13px; color: var(--gray); }

/* ---------- Projektstart ---------- */
.kc-tl { position: relative; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 18px; padding-top: 6px; }
.kc-tl::before { content: ""; position: absolute; left: 19px; right: calc(20% - 33px); top: 24px; height: 2px; background: repeating-linear-gradient(90deg, var(--line) 0 8px, transparent 8px 12px); }
.kc-tl-fill { position: absolute; left: 19px; right: calc(20% - 33px); top: 24px; height: 2px; background: linear-gradient(90deg, var(--orange-soft), var(--orange)); transform-origin: 0 50%; }
.rv.in .kc-tl-fill { animation: kc-fill 3.4s var(--kc-travel) 0.2s both; }
@keyframes kc-fill { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.kc-st { position: relative; display: grid; gap: 8px; align-content: start; }
.kc-st .n { position: relative; z-index: 1; width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: var(--card); border: 2px solid var(--orange); color: var(--orange-deep); font-family: var(--font-head); font-weight: 700; box-shadow: 0 0 0 6px var(--bg-alt); }
.kc-st b { font-family: var(--font-head); font-size: 17.5px; margin-top: 8px; }
.kc-st span.d { font-size: 14.5px; color: var(--gray); }
.rv.in .kc-st { animation: kc-pop 0.7s var(--kc-out) both; }
.rv.in .kc-st:nth-child(2) { animation-delay: 0.1s; }
.rv.in .kc-st:nth-child(3) { animation-delay: 0.85s; }
.rv.in .kc-st:nth-child(4) { animation-delay: 1.5s; }
.rv.in .kc-st:nth-child(5) { animation-delay: 2.45s; }
.rv.in .kc-st:nth-child(6) { animation-delay: 3.2s; }
.kc-tl-note { margin-top: 36px; font-size: 15.5px; color: var(--gray); max-width: 640px; }

/* ---------- Datenschutz: Chips auf dem Foto ---------- */
.kc-pchips { position: absolute; left: 14px; bottom: 14px; right: 14px; display: flex; flex-wrap: wrap; gap: 8px; }
.kc-pchips span {
  padding: 8px 13px; border-radius: 99px; font-size: 13px; font-weight: 600; color: #fff;
  background: rgba(10, 26, 34, 0.74); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border: 1px solid rgba(255, 255, 255, 0.14);
  display: inline-flex; align-items: center; gap: 8px;
}
.kc-pchips span::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #35C26B; box-shadow: 0 0 0 3px rgba(53, 194, 107, 0.22); }
.rv.in .kc-pchips span { animation: kc-pop 0.6s var(--kc-spring) both; }
.rv.in .kc-pchips span:nth-child(1) { animation-delay: 0.7s; }
.rv.in .kc-pchips span:nth-child(2) { animation-delay: 1.15s; }
.rv.in .kc-pchips span:nth-child(3) { animation-delay: 1.95s; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .rag { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 26px 20px; }
  .rag-cell::after { display: none; }
}
@media (max-width: 1023px) {
  .kc-hero-grid { grid-template-columns: 1fr; }
  .kc-chat { display: none; }
  .kc-tl { grid-template-columns: 1fr; gap: 26px; padding-left: 0; }
  .kc-tl::before, .kc-tl-fill { left: 18px; right: auto; top: 20px; bottom: 20px; width: 2px; height: auto; }
  .kc-tl::before { background: repeating-linear-gradient(180deg, var(--line) 0 8px, transparent 8px 12px); }
  .kc-tl-fill { transform-origin: 50% 0; background: linear-gradient(180deg, var(--orange-soft), var(--orange)); }
  .rv.in .kc-tl-fill { animation-name: kc-fill-y; }
  @keyframes kc-fill-y { from { transform: scaleY(0); } to { transform: scaleY(1); } }
  .kc-st { grid-template-columns: 38px 1fr; column-gap: 16px; row-gap: 2px; }
  .kc-st .n { grid-row: 1 / 3; }
  .kc-st b { margin-top: 0; }
}
@media (max-width: 720px) {
  .rag { grid-template-columns: 1fr; padding: 22px 18px; }
  .kc-ib-head { padding: 12px 14px; }
  .kc-row { padding: 11px 14px; gap: 10px; }
  .kc-row .st .kc-tag { font-size: 9.5px; padding: 3px 7px; }
  .kc-seg button { padding: 9px 14px; font-size: 14px; }
  .kc-row .tx b { white-space: normal; }
}

@media (prefers-reduced-motion: reduce) {
  .kc-a1, .kc-typing, .kc-chat .kc-a2, .kc-chat .kc-a2 .kb-src { animation: none !important; }
  .kc-typing { display: none; }
  .rv.in .kc-uc .b, .rv.in .kc-uc .kc-tag, .rv.in .kc-uc .kc-typed, .rv.in .kc-uc .kc-res,
  .rv.in .kc-mail .ln, .rv.in .kc-mail .kc-tag, .rv.in .kc-tl-fill, .rv.in .kc-st, .rv.in .kc-pchips span { animation: none !important; }
  .rag *, .kc-ib *, .kc-expl * { transition: none !important; animation: none !important; }
}
