/* Homepage GPT chat — minimal version of the Assembly agent panel */
.home-chat{position:relative;z-index:2;width:100%;max-width:800px;margin:110px auto 0;text-align:left}
.ag{--accent:#0099FF;--accent-hover:#33ADFF;--side:40px;--bubble:80%;display:flex;flex-direction:column;height:520px;max-height:calc(100dvh - 96px);background:#0d0d0d;border:1px solid #1f1f1f;border-radius:18px;overflow:hidden;color:#DDD;font-family:Inter,Arial,sans-serif;font-size:14px}
:where(.ag) button{font:inherit;color:inherit;cursor:pointer}
.ag ::selection{background:rgba(0,153,255,.4)}
.ag-sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}

.ag-scroll{flex:1;min-height:0;overflow-y:auto;scrollbar-width:thin;scrollbar-color:#2a2a2a transparent}
.ag-scroll::-webkit-scrollbar{width:6px}.ag-scroll::-webkit-scrollbar-thumb{background:#2a2a2a;border-radius:3px}
.ag-msgs{min-height:100%;display:flex;flex-direction:column;padding:22px var(--side) 18px}
.ag-row{display:flex;flex-direction:column;margin-bottom:22px}
.ag-row:last-child{margin-bottom:0}
.ag-empty{margin:auto;text-align:center;color:#6f6f6f;font-size:14px;line-height:1.6;padding:0 12px}

.ag-user{align-self:flex-end;max-width:var(--bubble);background:#222;border-radius:16px 16px 5px 16px;padding:10px 16px;color:#F0F0F0;font-size:14px;line-height:21px;white-space:pre-wrap;overflow-wrap:anywhere}
.ag-user .ag-full{margin-top:10px}
.ag-src-toggle{display:block;padding:0;border:0;background:transparent;font-size:13px;color:#EEE;text-align:left}
.ag-src-preview{margin-top:8px;font-size:13px;line-height:20px;color:#AAA}

.ag-icon{width:28px;height:28px;display:grid;place-items:center;border:0;border-radius:8px;background:transparent;color:#888}
.ag-icon:hover{background:#1e1e1e;color:#DDD}
.ag-icon svg{width:16px;height:16px;stroke:currentColor;stroke-width:1.5;fill:none;stroke-linecap:round;stroke-linejoin:round}
.ag-copy{margin:6px 0 0 -6px;opacity:0;transition:opacity .15s}
.ag-row:hover .ag-copy,.ag-row:last-child .ag-copy,.ag-copy:focus-visible{opacity:1}
.ag-icon.is-done{color:var(--accent)}

.ag-bot{font-size:14px;line-height:24px;color:#DDD;overflow-wrap:anywhere}
.ag-bot>*:last-child{margin-bottom:0}
.ag-bot p{margin:0 0 14px}
.ag-bot h1,.ag-bot h2,.ag-bot h3,.ag-bot h4{margin:16px 0 8px;color:#F0F0F0;font-weight:600;line-height:1.45}
.ag-bot>h1:first-child,.ag-bot>h2:first-child,.ag-bot>h3:first-child,.ag-bot>h4:first-child{margin-top:0}
.ag-bot h1{font-size:19px}.ag-bot h2{font-size:17px}.ag-bot h3,.ag-bot h4{font-size:15px}
.ag-bot strong{font-weight:600;color:#F0F0F0}
.ag-bot a{color:var(--accent-hover);text-decoration:underline;text-underline-offset:2px}
.ag-bot hr{height:1px;border:0;background:#2a2a2a;margin:10px 0 14px}
.ag-bot ul,.ag-bot ol{margin:2px 0 12px;padding-left:22px}.ag-bot li{margin-bottom:4px}.ag-bot li>ul,.ag-bot li>ol{margin:4px 0 0}
.ag-bot blockquote{margin:4px 0 16px;padding:2px 0 2px 12px;border-left:3px solid #444;color:#AAA}
.ag-bot code{font-family:Consolas,ui-monospace,monospace;font-size:12.5px;background:#232323;color:#DDD;border-radius:4px;padding:0 4px}
.ag-table{margin:6px 0 14px;overflow-x:auto}
.ag-bot table{border-collapse:collapse;min-width:100%}
.ag-bot th,.ag-bot td{padding:6px 9px;border-bottom:1px solid #2e2e2e;text-align:left;vertical-align:top}
.ag-bot th{font-weight:600;color:#F0F0F0}
.ag-code{margin:6px 0 14px;background:#171717;border:1px solid #222;border-radius:10px}
.ag-code__head{display:flex;align-items:center;justify-content:space-between;padding:6px 6px 6px 12px;font-size:11px;line-height:1;color:#777}
.ag-code__head .ag-icon{width:24px;height:24px}.ag-code__head .ag-icon svg{width:14px;height:14px;stroke-width:1.3}
.ag-code pre{margin:0;padding:0 12px 12px;max-height:340px;overflow:auto;font-family:Consolas,ui-monospace,monospace;font-size:12.5px;line-height:1.5;color:#DDD}
.ag-code pre code{background:none;padding:0}
.ag-thinking{color:#777;animation:ag-pulse 1.4s ease-in-out infinite}
@keyframes ag-pulse{50%{opacity:.4}}
.ag-error{font-size:13px;color:#C1A98A}

.ag-bottom{padding:0 12px 12px}
.ag-composer{background:#1C1C1C;border:1px solid #262626;border-radius:16px;transition:border-color .15s}
.ag-composer:focus-within{border-color:#333}
.ag-input{display:block;width:100%;min-height:56px;max-height:160px;resize:none;border:0;outline:0;padding:14px 15px 6px;background:transparent;color:#F1F1F1;caret-color:#fff;font:inherit;font-size:14px;line-height:1.5}
.ag-input::placeholder{color:#6c6c6c}
.ag-tools{display:flex;align-items:center;gap:6px;padding:0 10px 10px 8px}
.ag-model-wrap{position:relative;margin-right:auto}
.ag-model{appearance:none;-webkit-appearance:none;height:29px;padding:0 26px 0 8px;border:0;border-radius:8px;background:transparent;color:#AAA;font:inherit;font-size:13px;cursor:pointer;outline:0}
.ag-model:hover{background:#262626;color:#DDD}
.ag-model option{background:#202020;color:#DDD}
.ag-model-wrap:after{content:"";position:absolute;right:11px;top:50%;width:6px;height:6px;border-right:1.5px solid #888;border-bottom:1.5px solid #888;transform:translateY(-70%) rotate(45deg);pointer-events:none}
.ag-tools .ag-icon{width:32px;height:32px;border-radius:50%;background:#262626;color:#BBB}
.ag-tools .ag-icon:hover{background:#303030;color:#fff}
.ag-send{width:32px;height:32px;display:grid;place-items:center;border:0;border-radius:50%;background:var(--accent);color:#fff;transition:background .15s}
.ag-send:hover{background:var(--accent-hover)}.ag-send:active{opacity:.85}
.ag-send svg{width:12px;height:14px;stroke:currentColor;stroke-width:2.2;fill:none;stroke-linecap:round;stroke-linejoin:round}
.ag-send .ag-stop{width:10px;height:10px;border-radius:2px;background:#fff}
.ag-send:disabled{opacity:.4;cursor:default}

@media (max-width:860px){.home-chat{margin-top:56px}.ag{height:480px;border-radius:16px}.ag-bottom{padding:0 10px 10px}}
.ag-meta{display:flex;align-items:center;min-height:24px;margin-top:4px;font-size:11px;color:#666;font-variant-numeric:tabular-nums}
.ag-row--user .ag-meta{align-self:flex-end;margin-right:4px}
.ag-meta .ag-copy{width:28px;height:28px;margin:0 2px 0 -7px;color:#888}.ag-meta .ag-copy svg{width:17px;height:17px;stroke-width:1.6}
.ag-meta{gap:5px}.ag-meta__dot{color:#4a4a4a}
/* v12: a touch darker, lower contrast */
.ag{background:#0a0a0a;border-color:#1a1a1a;color:#D2D2D2}
.ag-composer{background:#171717;border-color:#212121}.ag-composer:focus-within{border-color:#2c2c2c}
.ag-user{background:#1c1c1c;color:#E6E6E6}
.ag-tools .ag-icon{background:#1f1f1f;color:#A8A8A8}.ag-tools .ag-icon:hover{background:#2a2a2a}
.ag-model{color:#9a9a9a}.ag-input{color:#E6E6E6}.ag-input::placeholder,.ag-empty{color:#626262}
.ag-bot{color:#D2D2D2}.ag-code{background:#131313;border-color:#1e1e1e}
/* v13: one more step darker */
.ag{background:#070707;border-color:#161616;color:#C8C8C8}
.ag-composer{background:#121212;border-color:#1c1c1c}.ag-composer:focus-within{border-color:#262626}
.ag-user{background:#181818;color:#DEDEDE}
.ag-tools .ag-icon{background:#1a1a1a;color:#9a9a9a}.ag-tools .ag-icon:hover{background:#242424}
.ag-model{color:#8e8e8e}.ag-input{color:#DEDEDE}.ag-input::placeholder,.ag-empty{color:#585858}
.ag-bot{color:#C8C8C8}.ag-code{background:#0f0f0f;border-color:#1a1a1a}
/* v14: darker again */
.ag{background:#040404;border-color:#131313;color:#BEBEBE}
.ag-composer{background:#0e0e0e;border-color:#181818}.ag-composer:focus-within{border-color:#222}
.ag-user{background:#141414;color:#D6D6D6}
.ag-tools .ag-icon{background:#161616;color:#8c8c8c}.ag-tools .ag-icon:hover{background:#202020}
.ag-model{color:#828282}.ag-input{color:#D6D6D6}.ag-input::placeholder,.ag-empty{color:#505050}
.ag-bot{color:#BEBEBE}.ag-code{background:#0b0b0b;border-color:#161616}
/* v15: readable text on the dark panel */
.ag-empty{color:#8C8C8C}.ag-input::placeholder{color:#6E6E6E}
.ag{color:#D4D4D4}.ag-bot{color:#D4D4D4}.ag-user{color:#E8E8E8}.ag-input{color:#E8E8E8}
.ag-model{color:#A0A0A0}.ag-meta{color:#707070}
/* v16: phones — 16px fields stop iOS auto-zoom on focus (it made the page slide sideways); clip stray horizontal overflow */
@media (max-width:860px){.ag-input,.ag-input::placeholder,.ag-model{font-size:16px}html,body{overflow-x:clip}}
.ag-bot th,.ag-bot td{overflow-wrap:normal;word-break:normal;min-width:72px}
/* v18: custom model menu */
.ag-model-wrap:after{content:none}
.ag-model-btn{display:inline-flex;align-items:center;gap:8px;height:30px;padding:0 10px 0 8px;border:0;border-radius:8px;background:transparent;color:#A0A0A0;font-size:13px}
.ag-model-btn:hover,.ag-model-btn[aria-expanded=true]{background:#161616;color:#E0E0E0}
.ag-model-btn svg{width:12px;height:12px;stroke:currentColor;stroke-width:1.5;fill:none;stroke-linecap:round;stroke-linejoin:round;transition:transform .15s}
.ag-model-btn[aria-expanded=true] svg{transform:rotate(180deg)}
.ag-menu{position:absolute;left:0;bottom:calc(100% + 6px);z-index:5;min-width:184px;padding:4px;background:#101010;border:1px solid #222;border-radius:12px;box-shadow:0 12px 32px rgba(0,0,0,.6)}
.ag-menu[hidden]{display:none}
.ag-menu__item{display:flex;align-items:center;justify-content:space-between;gap:16px;width:100%;height:34px;padding:0 10px;border:0;border-radius:8px;background:transparent;color:#C8C8C8;font-size:13px;text-align:left;outline:0}
.ag-menu__item:hover,.ag-menu__item:focus-visible{background:#1a1a1a;color:#fff}
.ag-menu__item svg{width:14px;height:14px;stroke:var(--accent);stroke-width:1.8;fill:none;stroke-linecap:round;stroke-linejoin:round;visibility:hidden}
.ag-menu__item[aria-selected=true]{color:#fff}.ag-menu__item[aria-selected=true] svg{visibility:visible}
.ag-bottom{position:relative;overflow:visible}.ag{overflow:visible}.ag-scroll{border-radius:18px 18px 0 0}
@media (max-width:860px){.ag-model-btn,.ag-menu__item{font-size:15px}.ag-menu__item{height:40px}}
/* v19: streaming caret */
.ag-bot.is-streaming>:last-child:after{content:"";display:inline-block;width:7px;height:15px;margin-left:3px;vertical-align:-2px;background:var(--accent);border-radius:1px;animation:ag-caret 1s steps(1) infinite}
.ag-bot.is-streaming>.ag-code:last-child:after,.ag-bot.is-streaming>.ag-table:last-child:after,.ag-bot.is-streaming>ul:last-child:after,.ag-bot.is-streaming>ol:last-child:after{content:none}
@keyframes ag-caret{50%{opacity:0}}
/* v23: breathing room above the composer, soft fade at the scroll edge */
.ag-msgs{padding-bottom:40px}
.ag-bottom{padding-top:6px}
.ag-scroll{-webkit-mask-image:linear-gradient(to bottom,#000 calc(100% - 28px),transparent);mask-image:linear-gradient(to bottom,#000 calc(100% - 28px),transparent)}
@media (max-width:860px){.ag-msgs{padding-bottom:32px}}
/* v24: full-page mode */
.home-chat.is-full{position:fixed;inset:0;z-index:5000;max-width:none;margin:0;padding:16px;background:rgba(0,0,0,.92);backdrop-filter:blur(6px)}
.home-chat.is-full .ag{height:100%;max-height:none;border-radius:18px}
.home-chat.is-full .ag-msgs{width:100%;max-width:820px;margin:0 auto;padding-top:32px}
.home-chat.is-full .ag-bottom{width:100%;max-width:844px;margin:0 auto;padding-bottom:20px}
html.ag-lock,html.ag-lock body{overflow:hidden}
@media (max-width:860px){.home-chat.is-full{padding:0}.home-chat.is-full .ag{border-radius:0;border:0}}
