@font-face {
  font-family: "Open Sans";
  src: url("/static/assets/OpenSans-variable.ttf") format("truetype");
  font-style: normal;
  font-weight: 300 800;
  font-display: swap;
}

:root {
  color-scheme: light;
  --navy: #161f36;
  --blue: #5873ba;
  --pale: #f5f7fc;
  --white: #fff;
  --text: #20212b;
  --dark: #0d141a;
  --gray: #8a9099;
  --muted-text: #515969;
  --header-shadow: 0 1px 3px rgba(0, 0, 0, .1);
  font-family: "Open Sans", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  color: var(--text);
  background: var(--pale);
}
* { box-sizing: border-box; }
body { margin: 0; }
.prototype {
  position: sticky; top: 0; z-index: 10;
  padding: 8px 16px; background: var(--navy); color: var(--white);
  text-align: center; font-size: 12px; font-weight: 600; line-height: 20px; letter-spacing: .04em;
}
header { background: var(--white); box-shadow: var(--header-shadow); }
.header-inner, main { width: min(900px, 100%); margin: auto; padding: 0 24px; }
.header-inner, .brand, .chat-top, .compose, .language-control { display: flex; align-items: center; gap: 16px; }
.header-inner, .chat-top { justify-content: space-between; }
.header-inner { min-height: 112px; padding-top: 16px; padding-bottom: 16px; }
.brand { color: var(--navy); font-size: 22px; font-weight: 700; letter-spacing: .02em; }
.brand img { width: 80px; height: 80px; object-fit: contain; flex-shrink: 0; }
.brand span { font-size: 14px; font-weight: 600; letter-spacing: .12em; }
.language-control { gap: 8px; }
.language-control label, form label { font-size: 14px; line-height: 22.4px; font-weight: 600; }
button, textarea, select { font: inherit; }
button, select { cursor: pointer; }
select { min-height: 48px; padding: 8px 12px; border: 1px solid var(--gray); border-radius: 8px; color: var(--text); background: var(--white); }
.intro { padding: 32px 0 24px; }
.eyebrow { color: var(--blue); font-size: 12px; font-weight: 700; letter-spacing: .08em; margin: 0 0 8px; }
h1 { font-size: 38px; line-height: 57px; font-weight: 700; letter-spacing: -.025em; color: var(--navy); margin: 0 0 8px; }
.intro > p:last-child { margin: 0; max-width: 680px; font-size: 16px; line-height: 24px; }
.chat { background: var(--white); border: 1px solid var(--gray); border-radius: 8px; overflow: hidden; }
.chat-top { padding: 8px 24px; border-bottom: 1px solid var(--gray); color: var(--navy); font-size: 16px; font-weight: 600; }
#clear { min-height: 44px; border: 0; border-radius: 8px; background: transparent; color: var(--navy); padding: 8px 16px; font-size: 14px; font-weight: 600; }
#messages { height: clamp(280px, 35vh, 440px); overflow-y: auto; padding: 24px; overscroll-behavior: contain; scroll-padding: 16px; }
.message { max-width: 92%; margin-bottom: 24px; }
.message:last-child { margin-bottom: 0; }
.message .speaker { margin: 0 0 8px; color: var(--muted-text); font-size: 12px; font-weight: 700; letter-spacing: .04em; }
.message .body { margin: 0; padding: 16px; border-radius: 8px; background: var(--pale); color: var(--text); font-size: 16px; line-height: 24px; white-space: pre-wrap; overflow-wrap: anywhere; }
.message.user { margin-left: auto; }
.message.user .speaker { text-align: right; }
.message.user .body { background: var(--navy); color: var(--white); }
.message.referral .body { border-left: 4px solid var(--blue); }
.message.referral .speaker { color: var(--navy); }
.suggestions { display: flex; flex-wrap: wrap; gap: 8px; padding: 8px 24px 24px; }
.suggestions button { min-height: 44px; max-width: 100%; border: 1px solid var(--gray); border-radius: 50px; background: var(--white); color: var(--navy); text-align: left; padding: 8px 16px; font-size: 14px; line-height: 22.4px; overflow-wrap: anywhere; }
.suggestions button:hover, #clear:hover { background: var(--pale); color: var(--navy); }
.suggestions button:hover { border-color: var(--blue); }
form { padding: 24px; border-top: 1px solid var(--gray); }
form label { display: block; margin-bottom: 8px; color: var(--dark); }
.compose { align-items: stretch; gap: 16px; }
textarea { flex: 1; min-width: 0; width: 100%; min-height: 80px; max-height: 240px; resize: vertical; padding: 12px 16px; border: 1px solid var(--gray); border-radius: 8px; background: var(--white); color: var(--dark); font-size: 16px; line-height: 25.6px; }
textarea::placeholder { color: var(--muted-text); opacity: 1; }
#send { min-height: 48px; padding: 12px 24px; border: 0; border-radius: 8px; background: var(--blue); color: var(--white); font-size: 16px; font-weight: 500; white-space: nowrap; }
#send:hover { background: var(--navy); }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }
#messages:focus-visible { outline-offset: -4px; }
button:disabled, select:disabled { opacity: .65; cursor: wait; }
textarea:read-only { background: var(--pale); }
#input-hint, #status { font-size: 12px; line-height: 20px; color: var(--muted-text); }
#input-hint { margin: 8px 0 0; }
#status { margin: 8px 0 0; color: var(--navy); font-weight: 600; }
#status:empty { display: none; }
footer { padding: 16px 0 24px; text-align: center; color: var(--muted-text); font-size: 12px; line-height: 20px; }
@media (max-width: 600px) {
  .header-inner, main { padding-left: 16px; padding-right: 16px; }
  .header-inner { min-height: 88px; gap: 8px; }
  .brand { gap: 8px; font-size: 18px; }
  .brand img { width: 56px; height: 56px; }
  .brand span { display: block; font-size: 11px; }
  .language-control { display: block; }
  .language-control label { display: block; margin-bottom: 4px; font-size: 12px; }
  select { min-height: 44px; padding: 8px; font-size: 14px; }
  .intro { padding-top: 24px; }
  h1 { font-size: 30px; line-height: 42px; }
  .chat-top { gap: 8px; padding: 8px 16px; font-size: 14px; }
  #clear { padding: 8px; flex-shrink: 0; }
  #messages, form { padding: 16px; }
  #messages { height: 320px; }
  .message { max-width: 100%; }
  .suggestions { padding: 8px 16px 16px; }
  .compose { flex-direction: column; gap: 8px; }
  #send { width: 100%; }
}
@media (forced-colors: active) {
  button, .message .body { border: 1px solid ButtonText; }
  .message.referral .body { border-left-width: 4px; }
}
