/* HumanWorks Lab assistant widget: quiet, flat, hairline */
.ag-launch { position: fixed; right: 24px; bottom: 24px; z-index: 86; width: 56px; height: 56px; padding: 0; border: 1px solid rgba(255,255,255,.2); border-radius: 50%; background: var(--navy); color: #fff; display: grid; place-items: center; cursor: pointer; box-shadow: 0 10px 28px -10px rgba(6,31,66,.6); transition: transform .35s var(--ease), background .25s; }
.ag-launch:hover { background: var(--navy-deep); transform: translateY(-2px); }
.ag-launch .ag-mark { display: grid; place-items: center; } .ag-launch .ag-mark svg { width: 30px; height: 30px; overflow: visible; }
.ag-launch .ag-label { position: absolute; right: 68px; white-space: nowrap; background: var(--navy); color: #fff; font: 500 .78rem var(--f-head); padding: 9px 14px; border-radius: 2px; opacity: 0; transform: translateX(6px); pointer-events: none; transition: opacity .3s, transform .3s var(--ease); }
.ag-launch:hover .ag-label, .ag-launch.is-hint .ag-label, .ag-launch:focus-visible .ag-label { opacity: 1; transform: none; }
.ag-launch[aria-expanded="true"] { opacity: 0; pointer-events: none; }

.ag-panel { position: fixed; right: 24px; bottom: 24px; z-index: 150; width: min(400px, calc(100vw - 32px)); height: min(660px, calc(100vh - 48px)); display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line-strong); border-radius: 4px; overflow: hidden; box-shadow: 0 30px 70px -24px rgba(6,31,66,.5);
  transform: translateY(14px); opacity: 0; visibility: hidden; transition: transform .45s var(--ease), opacity .3s, visibility 0s .45s; }
.ag-panel[data-open] { transform: none; opacity: 1; visibility: visible; transition: transform .45s var(--ease), opacity .3s, visibility 0s; }
.ag-head { display: flex; align-items: center; gap: 12px; padding: 16px 16px 16px 20px; background: var(--navy); color: #fff; border-bottom: 2px solid var(--gold); }
.ag-av { width: 38px; height: 38px; border-radius: 50%; background: #fff; display: grid; place-items: center; flex: none; } .ag-av svg { width: 24px; height: 24px; }
.ag-head h2 { font: 500 .95rem var(--f-head); margin: 0; letter-spacing: -.01em; } .ag-head p { margin: 2px 0 0; font-size: .72rem; color: rgba(255,255,255,.75); max-width: none; display: flex; align-items: center; gap: 7px; } .ag-head p i { width: 6px; height: 6px; border-radius: 50%; background: #5EE0B0; display: inline-block; }
.ag-x { margin-left: auto; width: 36px; height: 36px; border: 0; background: none; color: #fff; display: grid; place-items: center; } .ag-x:hover { background: rgba(255,255,255,.12); } .ag-x svg { width: 15px; height: 15px; }
.ag-log { flex: 1; overflow-y: auto; padding: 20px 18px 8px; display: flex; flex-direction: column; gap: 14px; background: var(--ivory); overscroll-behavior: contain; }
.ag-msg { max-width: 90%; display: flex; flex-direction: column; gap: 8px; animation: ag-in .4s var(--ease) both; } @keyframes ag-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.ag-msg--bot { align-self: flex-start; } .ag-msg--user { align-self: flex-end; }
.ag-bub { padding: 12px 16px; border-radius: 2px; font-size: .9375rem; line-height: 1.55; word-wrap: break-word; }
.ag-msg--bot .ag-bub { background: #fff; border: 1px solid var(--line); border-left: 2px solid var(--gold); color: var(--ink); } .ag-msg--user .ag-bub { background: var(--navy); color: #fff; }
.ag-bub b { font-weight: 700; } .ag-bub p { margin: 0 0 .6em; max-width: none; } .ag-bub p:last-child { margin: 0; }
.ag-bub .ag-li { display: block; padding-left: 14px; position: relative; } .ag-bub .ag-li::before { content: ""; position: absolute; left: 2px; top: .65em; width: 4px; height: 4px; background: var(--gold); }
.ag-acts { display: flex; flex-wrap: wrap; gap: 8px; }
.ag-act { border: 1px solid var(--line-strong); background: #fff; color: var(--navy); border-radius: 2px; padding: 8px 14px; font: 500 .78rem var(--f-head); transition: all .25s; cursor: pointer; } .ag-act:hover { background: var(--navy); color: #fff; border-color: var(--navy); }
.ag-act--primary { background: var(--gold); border-color: var(--gold); } .ag-act--primary:hover { background: var(--navy); border-color: var(--navy); }
.ag-src { font-size: .72rem; color: var(--ink-2); display: flex; flex-wrap: wrap; gap: 4px 10px; } .ag-src a { border-bottom: 1px solid var(--gold); } .ag-src a:hover { color: var(--teal); }
.ag-typing { display: inline-flex; gap: 4px; padding: 14px 16px; background: #fff; border: 1px solid var(--line); align-self: flex-start; } .ag-typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--navy); opacity: .35; animation: ag-dot 1s infinite; } .ag-typing i:nth-child(2) { animation-delay: .15s; } .ag-typing i:nth-child(3) { animation-delay: .3s; }
@keyframes ag-dot { 0%, 100% { opacity: .25; } 40% { opacity: 1; } }
.ag-sug { display: flex; flex-wrap: wrap; gap: 8px; padding: 6px 18px 12px; background: var(--ivory); } .ag-sug button { border: 1px solid var(--line-strong); background: #fff; border-radius: 2px; padding: 8px 12px; font: 400 .8rem var(--f-body); color: var(--navy); text-align: left; transition: border-color .25s; } .ag-sug button:hover { border-color: var(--navy); }
.ag-form { display: flex; align-items: flex-end; gap: 8px; padding: 12px 14px; border-top: 1px solid var(--line); background: #fff; }
.ag-form textarea { flex: 1; resize: none; border: 1px solid var(--line-strong); border-radius: 2px; padding: 12px 14px; font: 400 .9375rem/1.4 var(--f-body); max-height: 110px; min-height: 46px; outline: 0; background: var(--ivory); } .ag-form textarea:focus { border-color: var(--navy); background: #fff; }
.ag-send { width: 46px; height: 46px; border: 0; border-radius: 2px; background: var(--gold); color: var(--navy); display: grid; place-items: center; flex: none; transition: background .25s, color .25s; } .ag-send:hover { background: var(--navy); color: #fff; } .ag-send svg { width: 17px; height: 17px; }
.ag-foot { padding: 8px 16px 12px; font-size: .68rem; color: var(--ink-2); line-height: 1.4; background: #fff; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; } .ag-foot button { background: none; border: 0; padding: 0; color: var(--navy); font: 600 .72rem var(--f-head); border-bottom: 1px solid var(--gold); cursor: pointer; }
.ag-lead { display: grid; gap: 8px; background: #fff; border: 1px solid var(--line); padding: 14px; } .ag-lead input, .ag-lead textarea { width: 100%; border: 1px solid var(--line-strong); border-radius: 2px; padding: 10px 12px; font: 400 .875rem var(--f-body); background: var(--ivory); } .ag-lead label { font: 600 .72rem var(--f-head); } .ag-lead .ag-err { color: var(--danger); font-size: .75rem; min-height: 1em; }
@media (max-width: 640px) { .ag-panel { right: 0; bottom: 0; width: 100vw; height: 100dvh; border-radius: 0; max-height: none; border: 0; } .ag-launch { right: 16px; bottom: 16px; } .ag-launch .ag-label { display: none; } }
@media (prefers-reduced-motion: reduce) { .ag-msg { animation: none; } .ag-typing i { animation: none; opacity: .6; } }
