:root {
  color-scheme: light;
  --navy: #101d32;
  --navy-soft: #1a2b45;
  --orange: #f47a35;
  --cream: #f7f2e8;
  --paper: #fffdf8;
  --ink: #15233a;
  --muted: #657086;
  --line: #dfe3e7;
  --shadow: 0 28px 80px rgba(8, 21, 41, 0.22);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 10% 8%, rgba(244, 122, 53, 0.25), transparent 27rem),
    linear-gradient(135deg, var(--navy) 0 45%, #203654 100%);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.page-shell {
  width: min(1180px, calc(100% - 40px));
  min-height: 100vh;
  margin: auto;
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 72px;
  align-items: center;
  padding: 48px 0;
}

.intro { color: white; }
.prototype-label {
  display: inline-flex;
  padding: 8px 12px;
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 999px;
  background: rgba(255,255,255,.08);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.eyebrow { margin: 36px 0 14px; color: var(--orange); font-weight: 900; letter-spacing: .22em; }
.intro h1 { margin: 0; font-family: Georgia, serif; font-size: clamp(44px, 5vw, 72px); line-height: .98; letter-spacing: -.045em; }
.intro-copy { max-width: 520px; margin: 28px 0; color: rgba(255,255,255,.78); font-size: 19px; line-height: 1.55; }
.guardrail-note { max-width: 480px; display: grid; gap: 5px; border-left: 3px solid var(--orange); padding: 4px 0 4px 18px; }
.guardrail-note strong { font-size: 14px; }
.guardrail-note span { color: rgba(255,255,255,.68); font-size: 13px; line-height: 1.45; }

.chat-card {
  height: min(760px, calc(100vh - 72px));
  min-height: 600px;
  display: grid;
  grid-template-rows: auto 1fr auto auto auto;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.45);
  border-radius: 26px;
  background: var(--paper);
  box-shadow: var(--shadow);
}
.chat-header { display: flex; align-items: center; gap: 12px; padding: 18px 22px; border-bottom: 1px solid var(--line); background: white; }
.avatar { width: 42px; height: 42px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 13px; color: white; background: var(--orange); font-family: Georgia, serif; font-size: 23px; font-weight: 800; }
.chat-header h2 { margin: 0 0 3px; font-size: 15px; }
.chat-header p { margin: 0; color: var(--muted); font-size: 12px; }
.status-dot { display: inline-block; width: 7px; height: 7px; margin-right: 6px; border-radius: 50%; background: #30a46c; }
.text-button { margin-left: auto; border: 0; color: var(--muted); background: transparent; cursor: pointer; font: inherit; font-size: 12px; }
.text-button:hover { color: var(--orange); }

.messages { overflow-y: auto; padding: 26px 22px 14px; background: linear-gradient(#fffdf8, #fbf8f1); }
.message { display: flex; margin-bottom: 16px; }
.message.user { justify-content: flex-end; }
.bubble { max-width: 82%; padding: 13px 16px; border-radius: 18px; font-size: 14px; line-height: 1.55; white-space: pre-wrap; }
.assistant .bubble { border-bottom-left-radius: 6px; background: white; box-shadow: 0 3px 18px rgba(17,29,49,.08); }
.user .bubble { border-bottom-right-radius: 6px; color: white; background: var(--navy-soft); }
.bubble a { color: var(--orange); font-weight: 700; }
.source-list { max-width: 82%; margin: -8px 0 16px; color: var(--muted); font-size: 11px; }
.source-list a { color: var(--muted); }
.typing .bubble { color: var(--muted); }

.suggestions { display: flex; gap: 8px; overflow-x: auto; padding: 10px 22px; border-top: 1px solid var(--line); background: white; }
.suggestions button { flex: 0 0 auto; padding: 9px 12px; border: 1px solid var(--line); border-radius: 999px; color: var(--ink); background: white; cursor: pointer; font: inherit; font-size: 11px; }
.suggestions button:hover { border-color: var(--orange); color: var(--orange); }

.composer { display: flex; align-items: flex-end; gap: 10px; padding: 13px 16px; border-top: 1px solid var(--line); background: white; }
.composer textarea { width: 100%; max-height: 120px; resize: none; border: 0; outline: 0; padding: 10px 4px; color: var(--ink); background: transparent; font: inherit; font-size: 14px; line-height: 1.35; }
.composer button { width: 42px; height: 42px; flex: 0 0 auto; display: grid; place-items: center; border: 0; border-radius: 13px; color: white; background: var(--orange); cursor: pointer; }
.composer button:disabled { opacity: .45; cursor: wait; }
.composer svg { width: 21px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.chat-card footer { padding: 0 18px 13px; color: var(--muted); background: white; text-align: center; font-size: 10px; }
.chat-card footer a { color: inherit; }
.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: 850px) {
  .page-shell { width: min(680px, calc(100% - 24px)); grid-template-columns: 1fr; gap: 28px; align-items: start; padding: 28px 0; }
  .intro h1 { font-size: 44px; }
  .intro-copy, .guardrail-note { display: none; }
  .eyebrow { margin-top: 22px; }
  .chat-card { height: 680px; min-height: 0; }
}

