:root {
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  color: #111827;
  background: #f4f6f8;
}

* { box-sizing: border-box; }
body { margin: 0; }
.chat-shell { width: min(960px, 100%); min-height: 100vh; margin: auto; background: #fff; display: flex; flex-direction: column; box-shadow: 0 0 48px #15294a10; }
.topbar { height: 76px; padding: 0 32px; border-bottom: 1px solid #edf0f5; display: flex; justify-content: space-between; align-items: center; }
.brand { display: flex; gap: 10px; align-items: center; color: inherit; text-decoration: none; }
.brand-mark, .avatar { display: grid; place-items: center; color: #fff; font-weight: 800; background: linear-gradient(135deg, #155eef, #6d5dfc); border-radius: 11px; }
.brand-mark { width: 36px; height: 36px; font-size: 18px; }
.brand strong, .brand small { display: block; }
.brand strong { font-size: 15px; letter-spacing: -.2px; }
.brand small { margin-top: 2px; color: #8290a6; font-size: 10px; letter-spacing: .5px; }
.topbar-actions { display: flex; align-items: center; gap: 16px; }
.service-status { color: #637086; font-size: 12px; }
.service-status i { display: inline-block; width: 7px; height: 7px; margin-right: 5px; border-radius: 50%; background: #12b76a; }
.new-chat { border: 1px solid #d9e0ec; border-radius: 8px; padding: 8px 11px; background: #fff; color: #41506a; font-size: 12px; cursor: pointer; }
.messages { flex: 1; padding: 48px 64px 28px; display: flex; flex-direction: column; gap: 18px; overflow: auto; }
.welcome { padding-bottom: 14px; }
.eyebrow { margin: 0 0 12px; color: #3764e8; font-size: 11px; font-weight: 750; letter-spacing: 1.2px; }
.welcome h1 { margin: 0; color: #192743; font-size: 32px; letter-spacing: -1.2px; }
.welcome > p:not(.eyebrow) { margin: 12px 0 24px; color: #6d7b91; font-size: 14px; }
.suggestions { display: flex; flex-wrap: wrap; gap: 8px; }
.suggestions button { padding: 9px 12px; border: 1px solid #dbe3f0; border-radius: 9px; background: #fff; color: #40506a; font: inherit; font-size: 12px; cursor: pointer; transition: .15s; }
.suggestions button:hover { border-color: #9ab5ff; background: #f3f6ff; color: #155eef; }
.message { display: flex; gap: 9px; max-width: 88%; white-space: pre-wrap; line-height: 1.65; font-size: 14px; }
.avatar { flex: 0 0 27px; width: 27px; height: 27px; margin-top: 2px; border-radius: 9px; font-size: 12px; }
.bubble { padding: 12px 14px; border-radius: 4px 14px 14px; background: #f2f5fa; color: #32415a; }
.message.user { align-self: flex-end; display: block; }
.message.user .bubble, .user { padding: 12px 14px; border-radius: 14px 4px 14px 14px; background: #155eef; color: #fff; }
.message.assistant:not(.intro-message) { align-self: flex-start; }
.feedback { margin: 0 0 2px 36px; }
.feedback button { margin-right: 6px; padding: 6px 9px; border: 1px solid #dbe3f0; border-radius: 7px; background: #fff; color: #56657c; font-size: 11px; cursor: pointer; }
.composer-area { padding: 14px 32px 20px; border-top: 1px solid #edf0f5; }
.chat-options { display: flex; align-items: center; flex-wrap: wrap; gap: 0; margin-bottom: 10px; }
.question-type-control { display: inline-flex; align-items: center; gap: 8px; height: 30px; margin-right: 2px; cursor: pointer; }
.option-label { color: #667085; font-size: 12px; font-weight: 600; white-space: nowrap; }
.select-shell { position: relative; display: inline-flex; align-items: center; }
.select-shell select { appearance: none; width: 168px; height: 30px; padding: 0 30px 0 12px; border: 1px solid #e4e7ec; border-radius: 8px; outline: 0; background: #fff; color: #111827; font: inherit; font-size: 12px; cursor: pointer; }
.select-shell select:hover { border-color: #cbd5e1; background: #f8fafc; }
.select-shell select:focus { border-color: #93c5fd; box-shadow: 0 0 0 2px #dbeafe; }
.select-chevron { position: absolute; right: 11px; top: 4px; color: #667085; font-size: 17px; line-height: 19px; pointer-events: none; }
.option-toggle { display: inline-flex; align-items: center; min-height: 30px; margin-left: 8px; padding: 5px 10px; border: 1px solid #e4e7ec; border-radius: 8px; background: #f8fafc; color: #667085; font-size: 12px; cursor: pointer; }
.option-toggle:has(input:checked) { border-color: #bfdbfe; background: #eff6ff; color: #1d4ed8; font-weight: 650; }
.option-toggle input { position: absolute; width: 1px; height: 1px; margin: -1px; opacity: 0; pointer-events: none; }
.option-toggle:focus-within { outline: 2px solid #93c5fd; outline-offset: 1px; }
.composer { display: flex; align-items: flex-end; gap: 10px; padding: 8px 9px 8px 16px; border: 1px solid #ccd7e7; border-radius: 14px; box-shadow: 0 4px 12px #18223008; }
.composer:focus-within { border-color: #6e97fa; box-shadow: 0 0 0 3px #dce7ff; }
.composer textarea { flex: 1; max-height: 130px; resize: none; border: 0; outline: 0; padding: 8px 0; background: transparent; color: #26354d; font: inherit; font-size: 14px; line-height: 1.45; }
.composer textarea::placeholder { color: #99a6b9; }
.composer button { display: grid; place-items: center; width: 38px; height: 38px; padding: 0; border: 0; border-radius: 10px; background: #155eef; color: #fff; cursor: pointer; }
.composer button:disabled { background: #a4b8e7; cursor: wait; }
.composer svg { width: 18px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }
.notice { margin: 10px 4px 0; color: #95a0b0; font-size: 10px; text-align: center; }
.answer-details { margin-top: 12px; color: #667085; font-size: 12px; }
.answer-details summary { cursor: pointer; user-select: none; }
.answer-details-content { max-height: 220px; overflow: auto; margin-top: 8px; padding: 10px; border-radius: 8px; background: #f8fafc; color: #344054; font-size: 12px; line-height: 1.55; white-space: pre-wrap; }
.sr-only { position: absolute; clip: rect(0, 0, 0, 0); }
@media (max-width: 600px) {
  .topbar { height: 64px; padding: 0 18px; }
  .service-status { display: none; }
  .messages { padding: 30px 18px 20px; }
  .welcome h1 { font-size: 26px; }
  .suggestions { display: grid; grid-template-columns: 1fr 1fr; }
  .suggestions button { min-height: 48px; text-align: left; }
  .message { max-width: 94%; }
  .composer-area { padding: 12px 14px 16px; }
  .chat-options { align-items: stretch; }
  .question-type-control { flex: 1 1 100%; height: auto; margin: 0 0 8px; }
  .select-shell { flex: 1; }
  .select-shell select { width: 100%; }
  .brand small { display: none; }
  .intro-message { margin-top: 4px; }
}
