:root {
  color-scheme: light;
  --ink: #171412;
  --muted: #625d57;
  --paper: #fbfbfa;
  --cream: #f6f1e7;
  --rule: #d8d1c5;
  --leaf: #286044;
  --leaf-dark: #1b4932;
  --warm: #e8ddc8;
  font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
html { background: var(--cream); }
body { margin: 0; color: var(--ink); background: var(--cream); }
button, textarea { font: inherit; }
button { min-height: 44px; }
.demo-shell { width: min(100%, 760px); min-height: 100vh; margin: 0 auto; background: var(--paper); border-inline: 1px solid var(--rule); }
.demo-header { display: flex; align-items: center; gap: 14px; padding: 20px 22px; border-bottom: 1px solid var(--rule); }
.brand-mark { display: grid; place-items: center; width: 44px; height: 44px; flex: 0 0 auto; border-radius: 50%; color: white; background: var(--leaf); font-family: Georgia, serif; font-size: 24px; font-weight: 700; }
.eyebrow { margin: 0 0 3px; color: var(--leaf-dark); font-size: 11px; font-weight: 800; letter-spacing: .11em; text-transform: uppercase; }
h1 { margin: 0; font-family: Georgia, "Times New Roman", serif; font-size: clamp(21px, 4vw, 29px); line-height: 1.05; }
.context { padding: 18px 22px; background: var(--warm); border-bottom: 1px solid var(--rule); }
.context h2 { margin: 0 0 6px; font-size: 15px; }
.context p, .disclosure { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.55; }
.chat { display: flex; min-height: 420px; flex-direction: column; }
.messages { display: flex; min-height: 300px; max-height: 470px; flex: 1; flex-direction: column; gap: 13px; overflow-y: auto; padding: 22px; scroll-behavior: smooth; }
.message { width: fit-content; max-width: min(88%, 580px); padding: 13px 15px; border: 1px solid var(--rule); font-size: 14px; line-height: 1.55; }
.message p { margin: 0; }
.message p + p, .message ul { margin-top: 8px; }
.message ul { margin-bottom: 0; padding-left: 20px; }
.message.assistant { align-self: flex-start; background: var(--cream); }
.message.user { align-self: flex-end; color: white; background: var(--leaf-dark); border-color: var(--leaf-dark); }
.speaker { margin-bottom: 5px !important; color: var(--leaf-dark); font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.message.user .speaker { color: #dcebe3; }
.message.pending { opacity: .65; }
.composer { display: grid; grid-template-columns: 1fr auto; gap: 10px; padding: 14px 16px; border-top: 1px solid var(--rule); background: var(--paper); }
textarea { min-height: 52px; max-height: 130px; resize: vertical; padding: 12px; color: var(--ink); background: white; border: 1px solid #9d9589; border-radius: 0; line-height: 1.4; }
textarea:focus, button:focus-visible { outline: 3px solid #e6332a; outline-offset: 2px; }
button { align-self: stretch; padding: 0 20px; color: white; background: var(--leaf-dark); border: 0; cursor: pointer; font-weight: 800; }
button:hover { background: var(--leaf); }
button:disabled, textarea:disabled { cursor: wait; opacity: .6; }
.status { min-height: 20px; margin: 0; padding: 0 22px 10px; color: var(--muted); font-size: 12px; }
.disclosure { padding: 16px 22px 20px; border-top: 1px solid var(--rule); }
.disclosure strong { color: var(--ink); }
.noscript { margin: 0; padding: 16px 22px; color: #7a271a; border-top: 1px solid var(--rule); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
@media (max-width: 520px) {
  .demo-shell { border: 0; }
  .demo-header, .context { padding-inline: 16px; }
  .messages { padding: 16px; }
  .message { max-width: 94%; }
  .composer { grid-template-columns: 1fr; }
  button { min-height: 48px; }
  .disclosure { padding-inline: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  .messages { scroll-behavior: auto; }
}
