/* Josh Talks — Onboarding Assistant (semantic) · styling. Re-theme via :root. */
:root {
  --navy:#0B1B3A; --navy-2:#12294A; --blue:#2E6BF0; --blue-ink:#1B4FC0;
  --orange:#F5821F; --bg:#EEF2F8; --surface:#FFFFFF; --bot-bubble:#F1F4F9;
  --ink:#10243F; --muted:#5B6B82; --line:#E3E8F0; --radius:18px;
  --shadow:0 18px 50px rgba(11,27,58,.16);
  --font:"Inter",-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;
}
*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;font-family:var(--font);color:var(--ink);
  background:radial-gradient(1100px 600px at 12% -10%,#DCE6F7 0%,rgba(220,230,247,0) 55%),var(--bg);
  display:flex;align-items:center;justify-content:center;padding:24px;-webkit-font-smoothing:antialiased;
}
.app{
  width:100%;max-width:460px;height:min(760px,92vh);background:var(--surface);
  border-radius:var(--radius);box-shadow:var(--shadow);display:flex;flex-direction:column;overflow:hidden;
}
.header{background:linear-gradient(135deg,var(--navy),var(--navy-2));color:#fff;padding:18px 20px 16px}
.logo{font-weight:800;letter-spacing:.14em;font-size:15px;display:inline-flex;align-items:center;gap:7px}
.logo .dot{width:8px;height:8px;border-radius:50%;background:var(--orange);display:inline-block;margin-top:2px}
.logo .accent{color:var(--orange)}
.header h1{margin:9px 0 2px;font-size:19px;font-weight:700;letter-spacing:-.01em}
.header .subtitle{margin:0;font-size:12.5px;color:#B9C6DE;font-weight:500}

.progress{padding:12px 20px 10px;border-bottom:1px solid var(--line);background:#FAFBFE}
.progress[hidden]{display:none}
.progress-bar{display:flex;gap:6px;margin-bottom:7px}
.seg{flex:1;height:5px;border-radius:99px;background:#DDE4F0;transition:background .35s ease}
.seg--on{background:var(--orange)}
.progress-label{font-size:10.5px;font-weight:700;letter-spacing:.1em;color:var(--orange)}

.messages{flex:1;overflow-y:auto;padding:18px 18px 6px;display:flex;flex-direction:column;gap:10px}
.msg{display:flex}
.msg--bot{justify-content:flex-start}
.msg--user{justify-content:flex-end}
.bubble{max-width:86%;padding:11px 14px;font-size:14.5px;line-height:1.5;border-radius:16px;word-wrap:break-word}
.msg--bot .bubble{background:var(--bot-bubble);color:var(--ink);border-bottom-left-radius:5px}
.msg--user .bubble{background:var(--blue);color:#fff;border-bottom-right-radius:5px}
.bubble strong{font-weight:700}
.msg--bot .bubble a{color:var(--blue-ink);font-weight:600}
.msg--user .bubble a{color:#fff;text-decoration:underline}
.muted{color:var(--muted);font-size:13.5px;display:inline-flex;align-items:center;gap:8px}

.typing{display:inline-flex;gap:4px;align-items:center}
.typing span{width:6px;height:6px;border-radius:50%;background:#9DAAC0;animation:blink 1.2s infinite ease-in-out}
.typing span:nth-child(2){animation-delay:.2s}
.typing span:nth-child(3){animation-delay:.4s}
@keyframes blink{0%,80%,100%{opacity:.3}40%{opacity:1}}

.composer{border-top:1px solid var(--line);padding:12px 16px 16px;background:#fff}
.actions{margin-bottom:10px}
.chips{display:flex;flex-wrap:wrap;gap:7px}
.controls{display:flex;align-items:center;gap:8px}
.btn{font-family:inherit;font-size:13px;font-weight:600;border-radius:999px;border:1px solid transparent;cursor:pointer;transition:background .15s,border-color .15s,transform .05s}
.btn:active{transform:translateY(1px)}
.btn--chip{padding:7px 13px;background:#fff;border-color:var(--line);color:var(--ink)}
.btn--chip:hover{background:#F3F6FC;border-color:#C9D4E6}
.btn--solid{padding:9px 18px;background:var(--blue);color:#fff}
.btn--solid:hover{background:var(--blue-ink)}
.btn--ghost{padding:9px 15px;background:#fff;border-color:var(--line);color:var(--ink)}
.btn--ghost:hover{background:#F3F6FC}
.btn--text{padding:9px 8px;background:transparent;color:var(--orange);margin-left:auto}
.btn--text:hover{text-decoration:underline}

.input-row{display:flex;align-items:flex-end;gap:9px}
#input{flex:1;resize:none;font-family:inherit;font-size:14.5px;line-height:1.4;color:var(--ink);padding:11px 14px;border:1px solid var(--line);border-radius:14px;background:#F7F9FC;outline:none;max-height:120px}
#input:focus{border-color:var(--blue);background:#fff}
#input::placeholder{color:#97A4BA}
#input:disabled{opacity:.6;cursor:not-allowed}
#send{flex:none;width:42px;height:42px;border:none;border-radius:12px;background:var(--blue);color:#fff;cursor:pointer;display:grid;place-items:center;transition:background .15s}
#send:hover{background:var(--blue-ink)}
#send:disabled{opacity:.5;cursor:not-allowed}
#send svg{width:20px;height:20px}
.btn:focus-visible,#input:focus-visible,#send:focus-visible{outline:3px solid rgba(46,107,240,.45);outline-offset:2px}

@media (max-width:520px){
  body{padding:0}
  .app{max-width:none;height:100vh;height:100dvh;border-radius:0}
}
@media (prefers-reduced-motion:reduce){*,*::before,*::after{animation:none!important;transition:none!important}}
