/* Web chat: calm, light, teal accent. No external fonts or assets. */

:root {
  --bg: #f7f9f9;
  --surface: #ffffff;
  --sidebar: #eff4f4;
  --line: #dde5e6;
  --line-strong: #c9d4d6;
  --text: #1b2433;
  --muted: #5d6b78;
  --faint: #8a97a3;
  --accent: #0e8577;
  --accent-strong: #0a6b60;
  --accent-soft: #e2f3f0;
  --accent-tint: #f0f9f7;
  /* /brand.css overrides the accent variables per client (src/channels/web/brand.ts derives the same set). */
  --accent-hover: #0a6b60;
  --accent-wash: rgba(14, 133, 119, 0.07);
  --on-accent: #fff;
  --mint: #34e0b0;
  --slate: #1b2433;
  --danger: #b42318;
  --danger-soft: #fdecea;
  --owner: #4f46c8;
  --owner-strong: #3b33a6;
  --owner-soft: #eeedfc;
  --owner-line: #d6d3f5;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(27, 36, 51, 0.06), 0 4px 16px rgba(27, 36, 51, 0.06);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
}

button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: 0.5; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
[hidden] { display: none !important; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.button-primary {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 46px; padding: 0 20px;
  border: 0; border-radius: 10px;
  background: var(--accent); color: var(--on-accent); font-weight: 600;
  transition: background 0.15s;
}
.button-primary:hover:not(:disabled) { background: var(--accent-hover); }

.link-button {
  border: 0; background: none; padding: 4px 2px;
  color: var(--muted); font-size: 14px; text-decoration: underline; text-underline-offset: 3px;
}
.link-button:hover { color: var(--text); }

.button-secondary {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 46px; padding: 0 18px;
  border: 1px solid var(--line-strong); border-radius: 10px;
  background: var(--surface); color: var(--text); font-weight: 600;
  transition: border-color 0.15s, background 0.15s;
}
.button-secondary:hover:not(:disabled) { border-color: var(--faint); background: var(--bg); }

.icon-button {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border: 0; border-radius: 10px;
  background: none; color: var(--muted);
}
.icon-button:hover:not(:disabled) { background: var(--accent-soft); color: var(--accent-strong); }

/* ---------- login ---------- */

.login-page {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  min-height: 100%; padding: 32px 16px;
  background:
    radial-gradient(1200px 500px at 50% -10%, var(--accent-soft), transparent 70%),
    var(--bg);
}

.login-card {
  width: 100%; max-width: 400px;
  padding: 36px 32px 32px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
  text-align: center;
}
.login-logo { display: block; margin: 0 auto 18px; border-radius: 18px; }
.login-card h1 { margin: 0 0 6px; font-size: 22px; line-height: 1.3; letter-spacing: -0.01em; }
.login-lead { margin: 0 0 26px; color: var(--muted); font-size: 15px; }

#login-form { display: flex; flex-direction: column; text-align: left; }
#login-form label { margin: 0 0 6px; font-size: 14px; font-weight: 600; }
#login-form input {
  height: 46px; margin-bottom: 16px; padding: 0 14px;
  border: 1px solid var(--line-strong); border-radius: 10px; background: #fff;
  font-size: 16px;
}
#login-form input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
#login-form .button-primary { margin-top: 6px; }

.form-error {
  margin: 0 0 12px; padding: 10px 12px;
  border-radius: 10px; background: var(--danger-soft); color: var(--danger); font-size: 14px;
}
.login-foot { margin: 22px 0 0; color: var(--muted); font-size: 14px; text-align: center; }

/* ---------- chat layout ---------- */

.chat-page { overflow: hidden; }

.app {
  display: grid;
  grid-template-columns: 290px 1fr;
  height: 100vh;
  height: 100dvh;
}

.sidebar {
  display: flex; flex-direction: column; min-height: 0;
  background: var(--sidebar);
  border-right: 1px solid var(--line);
  padding: 16px 12px 12px;
}

.brand { display: flex; align-items: center; gap: 10px; padding: 2px 6px 16px; }
.brand img { border-radius: 9px; flex: none; }
.brand-title { font-weight: 700; font-size: 15px; line-height: 1.25; }

.button-new {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  height: 42px; margin: 0 4px 18px;
  border: 1px solid var(--line-strong); border-radius: 10px;
  background: var(--surface); font-weight: 600; font-size: 15px; color: var(--accent-strong);
  transition: border-color 0.15s, background 0.15s;
}
.button-new:hover:not(:disabled) { border-color: var(--accent); background: var(--accent-tint); }

.conversation-nav { flex: 1; min-height: 0; overflow-y: auto; margin: 0 -4px; padding: 0 4px; }
.nav-heading {
  margin: 0 8px 6px; font-size: 12px; font-weight: 600; letter-spacing: 0.04em;
  text-transform: uppercase; color: var(--faint);
}
.conversation-list { list-style: none; margin: 0; padding: 0; }
.conversation { position: relative; display: flex; align-items: center; border-radius: 10px; }
.conversation:hover { background: var(--accent-wash); }
.conversation.active { background: var(--surface); box-shadow: 0 1px 2px rgba(27, 36, 51, 0.08); }
.conversation-link {
  flex: 1; min-width: 0; display: flex; flex-direction: column;
  padding: 9px 36px 9px 10px; color: inherit; text-decoration: none;
}
.conversation-title-row { display: flex; align-items: center; gap: 7px; min-width: 0; }
.conversation-title { min-width: 0; font-size: 14px; line-height: 1.35; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.conversation.active .conversation-title, .conversation.unread .conversation-title { font-weight: 600; }
.unread-dot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--owner); box-shadow: 0 0 0 2px var(--owner-soft); }
.conversation-meta { display: flex; align-items: center; gap: 6px; min-width: 0; }
.conversation-date { font-size: 12px; color: var(--faint); }
.status-chip {
  flex: none; padding: 0 7px; border-radius: 999px;
  background: var(--owner-soft); color: var(--owner-strong);
  font-size: 11.5px; font-weight: 600; line-height: 18px;
}
.conversation-delete {
  position: absolute; right: 4px; top: 50%; transform: translateY(-50%);
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; border: 0; border-radius: 8px;
  background: none; color: var(--faint); opacity: 0; transition: opacity 0.15s;
}
.conversation:hover .conversation-delete, .conversation.active .conversation-delete, .conversation-delete:focus-visible { opacity: 1; }
.conversation-delete:hover { color: var(--danger); background: var(--danger-soft); }
.list-empty { margin: 4px 10px; font-size: 14px; color: var(--faint); }

.sidebar-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  margin-top: 10px; padding: 12px 8px 2px; border-top: 1px solid var(--line);
}
.user-name { min-width: 0; font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-actions { display: flex; align-items: center; gap: 10px; flex: none; }
.admin-link { color: var(--accent-strong); font-weight: 600; }
.admin-link:hover { color: var(--accent); }

.scrim { display: none; }

.main { display: flex; flex-direction: column; min-width: 0; min-height: 0; background: var(--bg); }

.topbar {
  display: flex; align-items: center; gap: 8px;
  height: 56px; padding: 0 20px; flex: none;
  border-bottom: 1px solid var(--line); background: rgba(247, 249, 249, 0.9);
}
.chat-title {
  flex: 1; min-width: 0; margin: 0;
  font-size: 16px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.menu-toggle, .new-chat-top { display: none; }
.menu-toggle { position: relative; }
.menu-toggle.has-unread::after {
  content: ""; position: absolute; top: 8px; right: 7px;
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--owner); box-shadow: 0 0 0 2px var(--bg);
}

.escalate-button {
  display: inline-flex; align-items: center; gap: 7px; flex: none;
  height: 36px; padding: 0 13px;
  border: 1px solid var(--owner-line); border-radius: 10px;
  background: var(--surface); color: var(--owner-strong);
  font-size: 14px; font-weight: 600; white-space: nowrap;
  transition: border-color 0.15s, background 0.15s;
}
.escalate-button:hover { border-color: var(--owner); background: var(--owner-soft); }
.escalate-button:focus-visible, .handoff-button:focus-visible, .banner-link:focus-visible { outline-color: var(--owner); }
.escalate-short { display: none; }

.status-banner {
  display: flex; align-items: flex-start; gap: 12px; flex: none;
  padding: 11px max(20px, calc((100% - 760px) / 2)); border-bottom: 1px solid var(--owner-line);
  background: var(--owner-soft); color: var(--text);
}
.status-banner > * { min-width: 0; }
.banner-avatar {
  display: inline-flex; align-items: center; justify-content: center; flex: none;
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--owner); color: #fff; font-weight: 700; font-size: 14px;
}
.banner-text { flex: 1; max-width: 760px; }
.banner-main { margin: 0; font-weight: 650; font-size: 15px; line-height: 1.4; color: var(--owner-strong); }
.banner-sub { margin: 1px 0 0; font-size: 13.5px; line-height: 1.45; color: var(--muted); }
.banner-link {
  border: 0; background: none; padding: 0;
  color: var(--owner-strong); font-size: inherit; text-decoration: underline; text-underline-offset: 3px;
}
.banner-link:hover { color: var(--owner); }

.scroller { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 28px 20px 12px; }

/* ---------- intro ---------- */

.intro { max-width: 640px; margin: 4vh auto 0; text-align: center; }
.intro-logo { border-radius: 16px; margin-bottom: 14px; }
.intro h2 { margin: 0 0 8px; font-size: 24px; line-height: 1.3; letter-spacing: -0.01em; }
.intro-lead { margin: 0 auto 20px; max-width: 520px; color: var(--muted); white-space: pre-line; }
.intro-facts {
  list-style: none; margin: 0 auto 26px; padding: 14px 18px; max-width: 520px;
  text-align: left; font-size: 15px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
}
.intro-facts li { position: relative; padding: 5px 0 5px 26px; }
.intro-facts li::before {
  content: ""; position: absolute; left: 4px; top: 13px;
  width: 8px; height: 8px; border-radius: 50%; background: var(--accent);
}
.intro-examples-label { margin: 0 0 10px; font-size: 14px; font-weight: 600; color: var(--muted); }
.examples { display: flex; flex-direction: column; align-items: stretch; gap: 8px; max-width: 520px; margin: 0 auto; }
.example {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 16px; text-align: left;
  border: 1px solid var(--line-strong); border-radius: 12px; background: var(--surface);
  font-size: 15px; color: var(--text);
  transition: border-color 0.15s, background 0.15s, transform 0.15s;
}
.example::after { content: "→"; flex: none; color: var(--accent); }
.example:hover { border-color: var(--accent); background: var(--accent-tint); }

/* ---------- messages ---------- */

.messages { max-width: 760px; margin: 0 auto; display: flex; flex-direction: column; gap: 22px; }

.message.user { display: flex; justify-content: flex-end; }
.message.user .bubble {
  max-width: 85%; padding: 10px 15px;
  background: var(--accent-soft); color: var(--text);
  border-radius: 16px 16px 4px 16px;
  white-space: pre-wrap; overflow-wrap: anywhere;
}

.message.assistant { display: flex; align-items: flex-start; gap: 12px; }
.avatar { width: 30px; height: 30px; border-radius: 8px; flex: none; margin-top: 2px; }
.assistant-body { flex: 1; min-width: 0; }

.progress {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  min-height: 34px; padding: 6px 12px;
  border-radius: 10px; background: var(--surface); border: 1px solid var(--line);
  color: var(--muted); font-size: 14px;
}
.progress-label { min-width: 0; overflow-wrap: anywhere; }
.progress-count { margin-left: auto; font-size: 12px; color: var(--faint); font-variant-numeric: tabular-nums; }
.spinner {
  width: 14px; height: 14px; flex: none; border-radius: 50%;
  border: 2px solid var(--accent-soft); border-top-color: var(--accent);
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation-duration: 2.4s; } }

.message.failed .error-text {
  margin: 0; padding: 10px 14px; border-radius: 10px;
  background: var(--danger-soft); color: var(--danger); font-size: 15px;
}

.steps { margin-top: 10px; font-size: 13px; color: var(--muted); }
.steps summary { cursor: pointer; width: fit-content; color: var(--faint); list-style: none; }
.steps summary::-webkit-details-marker { display: none; }
.steps summary::before { content: "▸ "; }
.steps[open] summary::before { content: "▾ "; }
.steps summary:hover { color: var(--accent-strong); }
.steps ol { margin: 6px 0 0; padding-left: 22px; }
.steps li { margin: 2px 0; overflow-wrap: anywhere; }
/* Client mode: only that it looked in the software and how often, nothing to expand. */
.lookups { margin: 10px 0 0; font-size: 13px; color: var(--faint); }

.message.user { flex-direction: column; align-items: flex-end; }
.message-caption { margin-top: 4px; padding-right: 4px; font-size: 12px; color: var(--faint); }
.message.to-owner .message-caption::before { content: "→ "; }

.message.owner { display: flex; align-items: flex-start; gap: 12px; }
.avatar-initial {
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%; background: var(--owner); color: #fff;
  font-weight: 700; font-size: 14px; line-height: 1;
}
.owner-body { flex: 1; min-width: 0; }
.owner-head { display: flex; align-items: baseline; gap: 8px; margin: 0 0 4px; }
.owner-name { font-weight: 650; font-size: 14px; color: var(--owner-strong); }
.owner-time { font-size: 12px; color: var(--faint); }
.owner-bubble {
  padding: 11px 15px;
  background: var(--owner-soft); border: 1px solid var(--owner-line);
  border-radius: 4px 16px 16px 16px;
}
.owner-bubble.markdown a { color: var(--owner-strong); }
.owner-bubble.markdown code { background: #e1e0f6; color: #2b2670; }
.owner-bubble.markdown blockquote { border-left-color: var(--owner); background: rgba(255, 255, 255, 0.55); }

.event-line { text-align: center; color: var(--muted); font-size: 13px; padding: 0 12px; }
.event-text { display: flex; align-items: center; gap: 12px; margin: 0; }
.event-text::before, .event-text::after { content: ""; flex: 1 0 16px; height: 1px; background: var(--line); }
.event-label { flex: 0 1 auto; min-width: 0; line-height: 1.4; }
.event-time { color: var(--faint); white-space: nowrap; }
.event-note {
  max-width: 520px; margin: 6px auto 0; padding: 7px 12px;
  border-radius: 10px; background: var(--surface); border: 1px solid var(--line);
  color: var(--text); font-size: 14px; text-align: left;
  white-space: pre-wrap; overflow-wrap: anywhere;
}

.handoff-card {
  display: flex; align-items: center; justify-content: space-between; gap: 10px 14px; flex-wrap: wrap;
  margin-top: 12px; padding: 10px 10px 10px 14px;
  border: 1px solid var(--owner-line); border-radius: 12px; background: var(--owner-soft);
}
.handoff-text { margin: 0; font-size: 14.5px; font-weight: 600; color: var(--owner-strong); }
.handoff-button {
  min-height: 38px; padding: 0 14px; border: 0; border-radius: 9px;
  background: var(--owner); color: #fff; font-size: 14px; font-weight: 600;
  transition: background 0.15s;
}
.handoff-button:hover { background: var(--owner-strong); }

/* ---------- hand-over dialog ---------- */

.dialog {
  width: calc(100% - 32px); max-width: 480px; padding: 0;
  border: 0; border-radius: 18px; background: var(--surface); color: var(--text);
  box-shadow: 0 20px 60px rgba(27, 36, 51, 0.25);
}
.dialog::backdrop { background: rgba(27, 36, 51, 0.45); }
.dialog-form { display: flex; flex-direction: column; padding: 24px 24px 20px; }
.dialog-title { margin: 0 0 6px; font-size: 19px; line-height: 1.3; }
.dialog-lead { margin: 0 0 18px; color: var(--muted); font-size: 15px; }
.dialog-label { margin: 0 0 6px; font-size: 14px; font-weight: 600; }
/* Question / bug / wish: radio buttons styled as a segmented control (arrow keys move between them). */
.dialog-kinds { margin: 0 0 16px; padding: 0; border: 0; min-width: 0; }
.dialog-kinds legend { padding: 0; }
.kind-options { display: flex; gap: 0; border: 1px solid var(--line-strong); border-radius: 10px; overflow: hidden; }
.kind-option { flex: 1; position: relative; display: flex; }
.kind-option + .kind-option { border-left: 1px solid var(--line-strong); }
.kind-option input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.kind-option span {
  flex: 1; padding: 9px 10px; text-align: center; font-size: 15px; color: var(--muted); background: #fff;
}
.kind-option input:checked + span { background: var(--owner-soft); color: var(--owner-strong); font-weight: 600; }
.kind-option input:focus-visible + span { outline: 2px solid var(--owner); outline-offset: -2px; }
.kind-option:hover span { color: var(--owner-strong); }
.dialog-textarea {
  min-height: 104px; max-height: 40vh; padding: 10px 12px; resize: vertical;
  border: 1px solid var(--line-strong); border-radius: 10px; background: #fff;
  font-size: 16px; line-height: 1.5;
}
.dialog-textarea:focus { outline: none; border-color: var(--owner); box-shadow: 0 0 0 3px var(--owner-soft); }
.dialog .form-error { margin: 12px 0 0; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }
.dialog .button-primary { background: var(--owner); color: #fff; }
.dialog .button-primary:hover:not(:disabled) { background: var(--owner-strong); }

/* While the conversation is with the owner, the composer speaks to him. */
.is-with-owner .composer:focus-within { border-color: var(--owner); box-shadow: 0 0 0 3px var(--owner-soft), var(--shadow); }
.is-with-owner .send-button { background: var(--owner); }
.is-with-owner .send-button:hover { background: var(--owner-strong); }

/* ---------- rendered Markdown ---------- */

.markdown { overflow-wrap: anywhere; }
.markdown > :first-child { margin-top: 0; }
.markdown > :last-child { margin-bottom: 0; }
.markdown p { margin: 0 0 12px; }
.markdown h3, .markdown h4, .markdown h5 { margin: 20px 0 8px; line-height: 1.3; }
.markdown h3 { font-size: 18px; }
.markdown h4 { font-size: 16px; }
.markdown h5 { font-size: 15px; color: var(--muted); }
.markdown ul, .markdown ol { margin: 0 0 12px; padding-left: 24px; }
.markdown li { margin: 4px 0; }
.markdown li > ul, .markdown li > ol { margin: 4px 0 0; }
.markdown strong { font-weight: 650; }
.markdown a { color: var(--accent-strong); text-underline-offset: 2px; }
.markdown code {
  font-family: var(--mono); font-size: 0.88em;
  padding: 0.12em 0.38em; border-radius: 5px;
  background: #e9eff0; color: #1d3a40;
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
}
.markdown pre {
  margin: 0 0 14px; padding: 12px 14px; overflow-x: auto;
  border-radius: 10px; background: var(--slate); color: #e6edf3;
  font-size: 13.5px; line-height: 1.5;
}
.markdown pre code { padding: 0; background: none; color: inherit; font-size: inherit; white-space: pre; overflow-wrap: normal; }
.markdown blockquote {
  margin: 0 0 12px; padding: 4px 14px;
  border-left: 3px solid var(--accent); color: var(--muted); background: var(--accent-tint); border-radius: 0 8px 8px 0;
}
.markdown hr { border: 0; border-top: 1px solid var(--line); margin: 16px 0; }
.markdown .table-wrap { margin: 0 0 14px; overflow-x: auto; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.markdown table { border-collapse: collapse; width: 100%; font-size: 14.5px; }
.markdown th, .markdown td { padding: 8px 12px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
.markdown th { background: var(--accent-tint); font-weight: 600; }
.markdown tr:last-child td { border-bottom: 0; }
.markdown .align-center { text-align: center; }
.markdown .align-right { text-align: right; }
.markdown td code { overflow-wrap: normal; white-space: nowrap; }

/* ---------- composer ---------- */

.composer-wrap { flex: none; padding: 8px 20px 14px; background: linear-gradient(to bottom, rgba(247, 249, 249, 0), var(--bg) 30%); }
.notice {
  max-width: 760px; margin: 0 auto 8px; padding: 9px 14px;
  border-radius: 10px; background: #fff6e5; color: #7a4b00; border: 1px solid #f3d9a4; font-size: 14px;
}
.composer {
  position: relative; display: flex; align-items: flex-end; gap: 8px;
  max-width: 760px; margin: 0 auto; padding: 8px 8px 8px 16px;
  background: var(--surface); border: 1px solid var(--line-strong); border-radius: 16px;
  box-shadow: var(--shadow);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.composer:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft), var(--shadow); }
.composer textarea {
  flex: 1; min-height: 40px; max-height: 220px; padding: 8px 0; resize: none;
  border: 0; outline: none; background: transparent; font-size: 16px; line-height: 1.5;
}
.composer textarea:disabled { background: transparent; opacity: 0.6; }
.send-button, .stop-button {
  display: inline-flex; align-items: center; justify-content: center; flex: none;
  width: 40px; height: 40px; border: 0; border-radius: 11px;
  background: var(--accent); color: var(--on-accent); transition: background 0.15s;
}
.send-button:hover { background: var(--accent-hover); }
.stop-button { background: var(--slate); color: #fff; }
.stop-button:hover { background: #2c3a50; }
.composer-hint { max-width: 760px; margin: 8px auto 0; text-align: center; font-size: 12.5px; color: var(--faint); }

/* ---------- small screens ---------- */

@media (max-width: 820px) {
  .app { grid-template-columns: 1fr; }
  .sidebar {
    position: fixed; inset: 0 auto 0 0; z-index: 20;
    width: min(320px, 86vw);
    transform: translateX(-102%); transition: transform 0.2s ease;
    box-shadow: 0 0 40px rgba(27, 36, 51, 0.18);
  }
  .sidebar.open { transform: none; }
  .scrim { display: block; position: fixed; inset: 0; z-index: 10; background: rgba(27, 36, 51, 0.35); }
  .scrim[hidden] { display: none; }
  .menu-toggle, .new-chat-top { display: inline-flex; }
  .topbar { padding: 0 8px; }
  .chat-title { text-align: center; }
  .scroller { padding: 18px 14px 8px; }
  .intro { margin-top: 0; }
  .intro-logo { width: 48px; height: 48px; margin-bottom: 8px; }
  .intro h2 { font-size: 20px; }
  .intro-lead { font-size: 15px; margin-bottom: 16px; }
  .intro-facts { padding: 10px 14px; font-size: 14.5px; margin-bottom: 20px; }
  .intro-facts li { padding: 4px 0 4px 22px; }
  .intro-facts li::before { top: 12px; left: 2px; }
  .example { padding: 11px 14px; }
  .composer-wrap { padding: 6px 10px 10px; padding-bottom: max(10px, env(safe-area-inset-bottom)); }
  .composer-hint { display: none; }
  .message.user .bubble { max-width: 92%; }
  .message.assistant { gap: 10px; }
  .avatar { width: 26px; height: 26px; }
  .conversation-delete { opacity: 1; }
  .escalate-button { height: 34px; padding: 0 10px; gap: 5px; font-size: 13.5px; }
  .escalate-long { display: none; }
  .escalate-short { display: inline; }
  .status-banner { padding: 9px 14px; gap: 10px; }
  .banner-avatar { width: 26px; height: 26px; font-size: 13px; }
  .banner-main { font-size: 14.5px; }
  .banner-sub { font-size: 13px; }
  .message.owner { gap: 10px; }
  .avatar-initial { font-size: 13px; }
  .dialog { margin: max(16px, 8vh) auto auto; width: calc(100% - 24px); }
  .dialog-form { padding: 20px 18px 16px; }
  .dialog-actions > * { flex: 1; }
}
