/* Dynamic AI Business Brain · chat demo (bosslevel.biz/air/demo/chat/), from the BREIN real estate chat
   The "company GPT" layout: one conversation, the firm's knowledge behind it.
   Same Boss Level tokens as ../demo.css so the two layouts read as one product. */

:root{
  color-scheme:dark;
  --bg:#050508;--panel:#0c0c11;--panel-2:#16161d;--raised:#1c1c25;--line:#26262f;--line-strong:#383844;
  --ink:#f3f7fa;--soft:#d2dbe2;--muted:#94a3ae;
  --orange:#007ac2;--orange-text:#4fb0ea;--orange-tint:#007ac21f;
  --gold:#ff8106;--gold-text:#ffa24d;--gold-tint:#ff810617;
  --display:'Barlow Condensed','Arial Narrow',Impact,sans-serif;
  --body:'Manrope',Arial,sans-serif;
  --shadow:0 24px 60px -24px #000000cc;
}
:root[data-theme="light"]{
  color-scheme:light;
  --bg:#f2f6fa;--panel:#ffffff;--panel-2:#e8eff5;--raised:#ffffff;--line:#0e1a241c;--line-strong:#0e1a2433;
  --ink:#0e1a24;--soft:#34424e;--muted:#56646f;
  --orange-text:#0a619a;--orange-tint:#007ac214;
  --gold-text:#a34f00;--gold-tint:#ff810624;
  --shadow:0 24px 60px -28px #0e1a2440;
}

*{box-sizing:border-box}
html,body{height:100%}
body{margin:0;display:flex;background:var(--bg);color:var(--ink);font:15px/1.6 var(--body);-webkit-font-smoothing:antialiased;overflow:hidden}
button,input,textarea{font:inherit;color:inherit}
button{cursor:pointer}
h1,h2,p{margin:0}
small{display:block;font-size:12px;color:var(--muted)}
:focus-visible{outline:2px solid var(--orange);outline-offset:3px}
.icon{width:19px;height:19px;flex:none;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.visually-hidden{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}

/* ---------- logo mark (the Dynamic logo overrides are at the end) ---------- */
.brein{display:inline-flex;align-items:center;gap:10px;color:var(--ink)}
.brein-mark{width:38px;height:38px;flex:none;fill:none;stroke-linecap:round;stroke-linejoin:round}
.brein-roof{stroke:var(--orange);stroke-width:3.2}
.brein-walls{stroke:currentColor;stroke-width:2.4}
.brein-net{stroke:var(--gold);stroke-width:1.6}
.brein-node{fill:var(--gold)}
.brein-word{display:flex;flex-direction:column;line-height:1}
.brein-word b{font-family:var(--display);font-weight:800;font-size:27px;letter-spacing:.03em}
.brein-word i{font-style:normal;color:var(--orange)}
.brein-word small{margin-top:3px;font-size:9px;font-weight:800;letter-spacing:.32em;text-transform:uppercase;color:var(--muted)}

/* ---------- sidebar ---------- */
#side{width:256px;flex:none;display:flex;flex-direction:column;gap:6px;padding:22px 14px 16px;background:var(--panel);border-right:1px solid var(--line);overflow-y:auto}
#side .brein{margin:0 8px 18px}
.new-chat{display:flex;align-items:center;gap:10px;width:100%;padding:11px 14px;border:1px solid var(--line-strong);border-radius:12px;background:transparent;font-weight:700;font-size:14px;transition:border-color .2s,color .2s}
.new-chat:hover{border-color:var(--orange);color:var(--orange-text)}
.side-label{margin:18px 10px 6px;font-size:11px;font-weight:700;letter-spacing:.16em;text-transform:uppercase;color:var(--muted)}
#recent button{display:block;width:100%;padding:9px 10px;border:0;border-radius:9px;background:none;color:var(--soft);font-size:13px;font-weight:600;text-align:left;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#recent button:hover{background:var(--panel-2);color:var(--ink)}
.side-foot{margin-top:auto;display:flex;flex-direction:column;gap:14px;padding-top:14px;border-top:1px solid var(--line)}
.knowledge{display:flex;align-items:center;gap:9px;padding:0 6px;font-size:12px;font-weight:600;color:var(--soft)}
.dot{width:8px;height:8px;border-radius:50%;background:#35c46a;box-shadow:0 0 0 4px #35c46a26}
.who{display:flex;align-items:center;gap:10px;padding:0 4px}
.who strong{font-size:13px}
.avatar{display:grid;place-items:center;flex:none;width:34px;height:34px;border-radius:10px;background:var(--orange-tint);color:var(--orange-text);font-size:13px;font-weight:800}

/* ---------- main ---------- */
.main{flex:1;min-width:0;display:flex;flex-direction:column;height:100%}
.bar{display:flex;align-items:center;gap:16px;height:62px;flex:none;padding:0 24px;border-bottom:1px solid var(--line)}
#menu{display:none;place-items:center;width:40px;height:40px;padding:0;border:1px solid var(--line);border-radius:10px;background:transparent}
.back-link{display:inline-flex;align-items:center;gap:8px;padding:8px 14px 8px 10px;border:1px solid var(--line-strong);border-radius:999px;color:var(--ink);font-size:13px;font-weight:700;text-decoration:none;white-space:nowrap;transition:border-color .2s,color .2s}
.back-link:hover{border-color:var(--orange);color:var(--orange-text)}
.back-link .icon{width:17px;height:17px;transition:transform .2s}
.back-link:hover .icon{transform:translateX(-3px)}
.back-short{display:none}
.is-embed .back-link{display:none}
.model{font-weight:800;font-size:14px}
.model span{font-weight:600;color:var(--muted)}
.demo-pill{margin-left:auto;padding:5px 11px;border-radius:999px;background:var(--gold-tint);color:var(--gold-text);font-size:12px;font-weight:700;white-space:nowrap}

#thread{flex:1;overflow-y:auto;outline:none;scroll-behavior:smooth}
.lane{width:min(760px,100% - 48px);margin:0 auto}

/* empty state */
.hello{display:flex;flex-direction:column;align-items:center;text-align:center;padding:clamp(28px,7vh,72px) 0 24px}
.hello .brein-mark{width:64px;height:64px;margin-bottom:18px}
.hello h1{font-family:var(--display);font-weight:800;text-transform:uppercase;font-size:clamp(32px,4vw,46px);line-height:.95}
.hello p{margin-top:12px;max-width:44ch;color:var(--muted)}
.starters{display:grid;grid-template-columns:1fr 1fr;gap:12px;width:100%;margin-top:30px}
.starter{display:flex;flex-direction:column;gap:4px;padding:15px 16px;border:1px solid var(--line);border-radius:14px;background:var(--panel);text-align:left;transition:border-color .2s,transform .2s}
.starter strong{font-size:14px}
.starter span{font-size:13px;color:var(--muted)}
.starter:hover{border-color:#007ac280;transform:translateY(-2px)}

/* messages */
.msg{display:flex;gap:14px;padding:22px 0 4px}
.msg.user{justify-content:flex-end}
.msg.user .bubble{max-width:78%;padding:12px 16px;border-radius:18px 18px 4px 18px;background:var(--panel-2);white-space:pre-wrap}
.msg.bot .avatar-mark{flex:none;display:grid;place-items:center;width:34px;height:34px;border-radius:10px;border:1px solid var(--line);background:var(--panel)}
.msg.bot .avatar-mark .brein-mark{width:24px;height:24px}
.msg.bot .body{flex:1;min-width:0;padding-top:4px}
.answer{white-space:pre-wrap;color:var(--soft);line-height:1.7}
.answer strong{color:var(--ink)}
.caret{display:inline-block;width:8px;height:16px;margin-left:2px;vertical-align:-2px;background:var(--orange);animation:blink 1s steps(2) infinite}
@keyframes blink{50%{opacity:0}}
.thinking{display:inline-flex;gap:5px;padding:10px 0}
.thinking i{width:7px;height:7px;border-radius:50%;background:var(--muted);animation:pulse 1.2s ease-in-out infinite}
.thinking i:nth-child(2){animation-delay:.15s}.thinking i:nth-child(3){animation-delay:.3s}
@keyframes pulse{0%,100%{opacity:.25;transform:translateY(0)}50%{opacity:1;transform:translateY(-3px)}}
.sources{display:flex;flex-wrap:wrap;gap:8px;margin-top:14px}
.source{display:inline-flex;align-items:center;gap:7px;padding:5px 11px;border:1px solid var(--line);border-radius:999px;font-size:12px;font-weight:600;color:var(--soft)}
.source .icon{width:14px;height:14px;color:var(--orange-text)}
.source.flag{border-color:color-mix(in srgb,var(--gold) 40%,transparent);background:var(--gold-tint);color:var(--gold-text)}
.tools{display:flex;flex-wrap:wrap;gap:6px;margin-top:12px}
.tools button{display:inline-flex;align-items:center;gap:6px;padding:6px 11px;border:1px solid transparent;border-radius:999px;background:none;color:var(--muted);font-size:12px;font-weight:700}
.tools button:hover{border-color:var(--line-strong);color:var(--ink)}
.tools .icon{width:15px;height:15px}
.followups{display:flex;flex-wrap:wrap;gap:8px;margin-top:14px}
.followups button{padding:7px 12px;border:1px solid var(--line);border-radius:999px;background:transparent;color:var(--soft);font-size:12px;font-weight:600}
.followups button:hover{border-color:var(--orange);color:var(--ink)}

/* live AI status */
.live-status{display:flex;align-items:center;gap:10px;margin-bottom:10px;padding:8px 14px;border:1px solid var(--line);border-radius:12px;background:var(--panel);font-size:12.5px;color:var(--soft)}
.live-status strong{color:var(--ink)}
.live-status a{color:var(--orange-text);font-weight:800}
.live-dot{width:8px;height:8px;flex:none;border-radius:50%;background:var(--muted)}
.live-status.on{border-color:#35c46a66;background:#2f9e5a1f}
.live-status.on .live-dot{background:#35c46a;box-shadow:0 0 0 4px #35c46a26}
.live-status.off .live-dot{background:var(--gold)}
.tag{display:inline-block;margin-bottom:8px;padding:2px 9px;border-radius:999px;font-size:11px;font-weight:800;letter-spacing:.06em;text-transform:uppercase}
.tag.live{background:#2f9e5a1f;color:#8fd3a6}
:root[data-theme="light"] .tag.live{color:#1f7a44}
.tag.sample{background:var(--panel-2);color:var(--muted)}
.live-error{margin-top:10px;font-size:13px;color:var(--gold-text)}

/* composer */
.composer{flex:none;width:min(760px,100% - 48px);margin:0 auto;padding:12px 0 16px}
.composer-box{display:flex;align-items:flex-end;gap:10px;padding:10px 10px 10px 18px;border:1px solid var(--line-strong);border-radius:22px;background:var(--panel);box-shadow:var(--shadow);transition:border-color .2s}
.composer-box:focus-within{border-color:var(--orange)}
#prompt{flex:1;min-width:0;max-height:160px;padding:8px 0;border:0;background:none;resize:none;outline:none;line-height:1.5}
#prompt::placeholder{color:var(--muted)}
.send{display:grid;place-items:center;flex:none;width:40px;height:40px;padding:0;border:0;border-radius:12px;background:var(--orange);color:#ffffff;transition:background .2s,opacity .2s}
.send:hover{background:#1b8fd8}
.send:disabled{opacity:.4;cursor:not-allowed}
.fine{margin-top:9px;font-size:11.5px;text-align:center;color:var(--muted)}

#toast{position:fixed;bottom:110px;left:50%;z-index:50;display:none;max-width:90vw;padding:11px 18px;border:1px solid var(--line-strong);border-radius:999px;background:var(--raised);font-size:13px;font-weight:600;box-shadow:var(--shadow);transform:translateX(-50%)}
#toast.show{display:block}

@media (max-width:760px){
  #side{position:fixed;inset:0 auto 0 0;z-index:20;width:260px;transform:translateX(-100%);transition:transform .25s cubic-bezier(.2,.8,.2,1)}
  #side.open{transform:none;box-shadow:var(--shadow)}
  #menu{display:grid}
  .bar{gap:10px;padding:0 14px}
  .back-long{display:none}.back-short{display:inline}
  .back-link{padding:8px 12px 8px 9px}
  .model span{display:none}
  .demo-pill{font-size:11px;padding:4px 9px}
  .lane,.composer{width:calc(100% - 28px)}
  .starters{grid-template-columns:1fr}
  .msg.user .bubble{max-width:88%}
  .msg.bot .avatar-mark{display:none}
}
@media (prefers-reduced-motion:reduce){*{transition:none!important;animation:none!important;scroll-behavior:auto!important}}

/* Dynamic Air Quality Solutions logo: their wordmark, white on dark, blue on light */
.brein.dyn{flex-direction:column;align-items:flex-start;gap:5px;line-height:1}
.dyn-logo{display:block;width:auto;height:34px}
.dyn-logo.on-light{display:none}
:root[data-theme="light"] .dyn-logo.on-dark{display:none}
:root[data-theme="light"] .dyn-logo.on-light{display:block}
.dyn-sub{display:block;margin:0;font-size:8.5px;font-weight:800;letter-spacing:.3em;text-transform:uppercase;color:var(--muted)}
img.brein-mark{object-fit:contain}
.bar .dyn-logo{height:28px}
@media (max-width:420px){.bar .dyn-sub{display:none}.bar .dyn-logo{height:24px}}
/* The shared unlock card and lock button (/realestate/demo/unlock.css) in Dynamic blue */
html .brein-lock{border-color:#007ac266;background:#007ac21a}
html .brein-lock:hover{background:#007ac22e;border-color:var(--orange)}
html .bu-card{box-shadow:0 30px 80px -24px #000000d9,0 0 0 1px #007ac21a}
html .bu-submit{color:#fff;box-shadow:0 12px 30px -12px #007ac2aa}
html .bu-submit:hover{background:#1b8fd8}
html .bu-form input:focus{box-shadow:0 0 0 3px #007ac229}
