/* 369Lab – KI-Agenten-Seite: Chat-Demo, Orbit-Grafik, Ergaenzungen zum Basis-Stylesheet preview.css */
.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
.crumbs{display:flex;gap:10px;justify-content:center;font-size:14px;color:var(--muted);margin-bottom:26px}
.crumbs a:hover{color:var(--ink)}
.agent-hero h1{max-width:1040px}
.agent-hero h1 em{white-space:nowrap}

/* Demo */
.demo{padding:clamp(40px,6vw,80px) 0 var(--sp)}
.demo-grid{display:grid;grid-template-columns:300px minmax(0,1fr);gap:22px;align-items:stretch}
.demo-grid>*{min-width:0}
.demo-side{display:flex;flex-direction:column;gap:18px}
.side-title{font-size:15px;font-weight:600;letter-spacing:.06em;text-transform:uppercase;color:var(--muted);font-family:"Source Sans 3",sans-serif}
.scenarios{display:flex;flex-direction:column;gap:8px}
.scenarios button{text-align:left;border:1px solid var(--line);background:var(--bg);border-radius:14px;padding:14px 16px;cursor:pointer;font:inherit;font-size:16px;line-height:1.3;transition:.25s var(--ease);display:flex;flex-direction:column;gap:3px;min-height:44px}
.scenarios button small{color:var(--muted);font-size:14px}
.scenarios button:hover{border-color:var(--ink);transform:translateX(3px)}
.scenarios button[aria-selected="true"]{background:var(--ink);color:#fff;border-color:var(--ink)}
.scenarios button[aria-selected="true"] small{color:var(--on-dark-2)}
.side-note{background:var(--surface);border-radius:14px;padding:16px 18px;font-size:15px}
.side-note b{display:block;font-weight:600;margin-bottom:10px}
.side-note ul{list-style:none;display:flex;flex-wrap:wrap;gap:8px}
.side-note li{padding:6px 11px;border-radius:100px;background:var(--bg);border:1px solid var(--line);font-size:14px;transition:.3s}
.side-note li.on{background:var(--accent);color:#fff;border-color:var(--accent);box-shadow:0 6px 18px rgba(36,87,231,.3)}

.chat{background:var(--bg);border:1px solid var(--line);border-radius:var(--r);box-shadow:0 30px 80px rgba(0,0,0,.10);display:flex;flex-direction:column;min-height:640px;max-height:80vh;overflow:hidden}
.chat-head{display:flex;align-items:center;gap:14px;padding:16px 18px;border-bottom:1px solid var(--line);background:rgba(245,245,247,.7);backdrop-filter:blur(10px)}
.avatar{width:40px;height:40px;border-radius:12px;background:var(--ink);color:#fff;display:grid;place-items:center;font-family:"Instrument Sans",sans-serif;font-weight:600;font-size:13px;flex:none}
.chat-head b{display:block;font-size:16px}
.chat-head .status{font-size:13px;color:var(--muted);display:flex;align-items:center;gap:6px}
.chat-head .status i{width:8px;height:8px;border-radius:50%;background:#28c840;box-shadow:0 0 0 3px rgba(40,200,64,.2)}
.chat-reset{margin-left:auto;background:none;border:1px solid var(--line);border-radius:100px;padding:8px 14px;font:inherit;font-size:14px;font-weight:600;cursor:pointer;min-height:40px;white-space:nowrap;flex:none}
.chat-head>div{min-width:0;flex:1}
.chat-reset:hover{border-color:var(--ink)}
.chat-log{flex:1;overflow-y:auto;padding:22px 18px;display:flex;flex-direction:column;gap:14px;scroll-behavior:smooth}
.msg{max-width:82%;display:flex;flex-direction:column;gap:6px;animation:msgin .45s var(--ease)}
@keyframes msgin{from{opacity:0;transform:translateY(10px)}}
.msg.user{align-self:flex-end;align-items:flex-end}
.msg.agent{align-self:flex-start}
.bubble{padding:12px 16px;border-radius:18px;line-height:1.5;font-size:16px}
.msg.user .bubble{background:var(--accent);color:#fff;border-bottom-right-radius:6px}
.msg.agent .bubble{background:var(--surface);border-bottom-left-radius:6px}
.msg .time{font-size:12px;color:var(--muted);padding:0 4px}
.msg.system{align-self:center;max-width:100%}
.msg.system .bubble{background:none;color:var(--muted);font-size:13px;padding:4px 10px;text-align:center}
.typing{display:inline-flex;gap:5px;padding:14px 16px;background:var(--surface);border-radius:18px;border-bottom-left-radius:6px;align-self:flex-start}
.typing i{width:7px;height:7px;border-radius:50%;background:var(--muted);animation:dot 1.2s infinite}
.typing i:nth-child(2){animation-delay:.2s}.typing i:nth-child(3){animation-delay:.4s}
@keyframes dot{0%,60%,100%{transform:translateY(0);opacity:.4}30%{transform:translateY(-5px);opacity:1}}
/* Tool-Aktionen des Agenten */
.actions{display:flex;flex-wrap:wrap;gap:6px}
.action{font-size:13px;padding:5px 10px;border-radius:100px;background:var(--bg);border:1px solid var(--line);color:var(--muted);display:inline-flex;align-items:center;gap:6px;animation:msgin .4s var(--ease)}
.action::before{content:"";width:6px;height:6px;border-radius:50%;background:var(--accent)}
.action.done::before{background:#28c840}
/* Karten im Chat */
.rich{background:var(--bg);border:1px solid var(--line);border-radius:14px;padding:14px 16px;font-size:15px;max-width:100%}
.rich h4{font-family:"Instrument Sans",sans-serif;font-weight:500;font-size:16px;margin-bottom:8px;letter-spacing:-.01em}
.rich ul{list-style:none;display:flex;flex-direction:column;gap:7px}
.rich li{display:flex;gap:10px;align-items:flex-start}
.rich li::before{content:"";flex:none;width:6px;height:6px;border-radius:50%;background:var(--accent);margin-top:9px}
.rich li.warn::before{background:#e5a000}
.rich .kv{display:grid;grid-template-columns:auto 1fr;gap:4px 14px}
.rich .kv dt{color:var(--muted)}
.rich .draft{white-space:pre-wrap;font-size:14px;color:var(--ink);background:var(--surface);border-radius:10px;padding:12px;margin-top:8px;line-height:1.5}
.rich .total{border-top:1px solid var(--line);margin-top:8px;padding-top:8px;display:flex;justify-content:space-between;font-weight:600}
.rich .src{font-size:13px;color:var(--muted);margin-top:8px}
.rich table{width:100%;border-collapse:collapse;font-size:14px}
.rich td{padding:5px 0;border-bottom:1px solid var(--line)}
.rich td:last-child{text-align:right;white-space:nowrap}
.quick{display:flex;flex-wrap:wrap;gap:8px;margin-top:4px}
.quick button{font:inherit;font-size:14px;font-weight:600;padding:8px 12px;border-radius:100px;border:1px solid var(--accent);color:var(--accent);background:var(--bg);cursor:pointer;min-height:36px;transition:.2s}
.quick button:hover{background:var(--accent);color:#fff}
.chat-input{display:flex;gap:10px;padding:14px 16px;border-top:1px solid var(--line);background:var(--bg)}
.chat-input input{flex:1 1 auto;min-width:0;width:100%;font:inherit;font-size:16px;padding:12px 16px;border:1px solid var(--line);border-radius:100px;background:var(--surface);min-height:48px}
.chat-input input:focus{outline:none;border-color:var(--accent);box-shadow:0 0 0 4px rgba(36,87,231,.12);background:var(--bg)}
.chat-input .btn{height:48px;flex:none;padding:0 18px}
.demo .note{margin-top:18px;font-size:14px}

/* Integration Orbit */
.integ{padding:var(--sp) 0;background:var(--surface)}
.integ-in{display:grid;grid-template-columns:1fr 1fr;gap:clamp(40px,7vw,100px);align-items:center}
.integ-head h2{margin:10px 0 16px}
.integ-head .muted{max-width:48ch;margin-bottom:26px}
.steps{list-style:none;counter-reset:s;border-top:1px solid var(--line)}
.step{counter-increment:s;display:grid;grid-template-columns:56px 1fr;gap:14px;padding:20px 0;border-bottom:1px solid var(--line)}
.step::before{content:counter(s,decimal-leading-zero);font-family:"Instrument Sans",sans-serif;font-size:22px;color:var(--accent);letter-spacing:-.02em}
.step h3{font-size:20px;margin-bottom:4px;grid-column:2}.step p{color:var(--muted);font-size:16px;grid-column:2}.step::before{grid-row:1/span 2}
.orbit{position:relative;width:min(100%,440px);aspect-ratio:1;margin:0 auto}
.orbit .links{position:absolute;inset:0;width:100%;height:100%}
.orbit .links line{stroke:var(--line);stroke-width:2;stroke-dasharray:6 6;animation:dash 6s linear infinite}
@keyframes dash{to{stroke-dashoffset:-120}}
.core{position:absolute;left:50%;top:50%;width:120px;height:120px;transform:translate(-50%,-50%);border-radius:50%;background:var(--ink);color:#fff;display:grid;place-items:center;font-family:"Instrument Sans",sans-serif;font-size:20px;box-shadow:0 20px 50px rgba(0,0,0,.25),0 0 0 14px rgba(36,87,231,.08),0 0 0 28px rgba(36,87,231,.04);z-index:2}
.core::after{content:"";position:absolute;inset:-6px;border-radius:50%;border:2px solid var(--accent);opacity:.5;animation:pulse 2.6s var(--ease) infinite}
@keyframes pulse{0%{transform:scale(.9);opacity:.6}100%{transform:scale(1.5);opacity:0}}
.node{position:absolute;width:92px;height:92px;border-radius:50%;background:var(--bg);border:1px solid var(--line);display:grid;place-items:center;box-shadow:0 12px 30px rgba(0,0,0,.08);font-size:14px;font-weight:600;transform:translate(-50%,-50%);animation:float 5s ease-in-out infinite;z-index:1}
.node:nth-child(odd){animation-delay:-2.5s}
@keyframes float{50%{margin-top:-8px}}
.n1{left:50%;top:9%}.n2{left:88%;top:30%}.n3{left:88%;top:70%}.n4{left:50%;top:91%}.n5{left:12%;top:70%}.n6{left:12%;top:30%}

.aud-3{grid-template-columns:repeat(3,1fr)}

@media(max-width:1024px){.aud-3{grid-template-columns:1fr}}
@media(max-width:900px){
  .demo-grid,.integ-in{grid-template-columns:1fr}
  .scenarios{flex-direction:row;overflow-x:auto;padding-bottom:6px;scrollbar-width:none;max-width:100%;-webkit-overflow-scrolling:touch}
  .scenarios button{flex:0 0 auto;max-width:260px}
  .chat{min-height:560px;max-height:none}
  .msg{max-width:92%}
  .crumbs{justify-content:flex-start}
  .chat-head{padding:12px 14px;gap:10px}
  .chat-head .status{font-size:12px}
  .chat-reset{padding:7px 11px;font-size:13px}
  .chat-input{padding:12px}
  .chat-input .btn{padding:0 14px}
}
@media(prefers-reduced-motion:reduce){
  .msg,.action,.typing i,.core::after,.node,.orbit .links line{animation:none!important}
  .chat-log{scroll-behavior:auto}
}
