:root {
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #18243a;
  background: #f5f7fb;
}

* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; }
button, input, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; }
[hidden] { display: none !important; }

.page { min-height: 100vh; display: flex; flex-direction: column; }
.site-header {
  height: 72px; padding: 0 clamp(20px, 5vw, 64px); display: flex; align-items: center;
  justify-content: space-between; gap: 16px; background: #fff; border-bottom: 1px solid #e2e8f0;
}
.brand { font-size: 17px; font-weight: 750; letter-spacing: -.02em; }
.brand-light { color: #52627a; font-weight: 500; }
.test-badge {
  border-radius: 999px; padding: 6px 10px; background: #eaf1ff; color: #214e97;
  font-size: 12px; font-weight: 700; white-space: nowrap;
}
.main { width: 100%; max-width: 920px; margin: 0 auto; padding: 28px 20px; flex: 1; display: flex; align-items: center; }
.entry-card, .chat-card { width: 100%; background: #fff; border: 1px solid #dce3ee; border-radius: 18px; box-shadow: 0 14px 38px rgb(25 47 85 / 7%); }
.entry-card { max-width: 460px; margin: 0 auto; padding: clamp(26px, 5vw, 42px); }
.entry-icon, .ready-mark { color: #245ab2; font-size: 30px; }
h1, h2, p { margin-top: 0; }
h1 { font-size: clamp(24px, 4vw, 30px); line-height: 1.2; letter-spacing: -.035em; margin-bottom: 12px; }
.intro { color: #46566e; line-height: 1.5; margin-bottom: 12px; }
.disclosure { color: #58677b; font-size: 13px; line-height: 1.5; margin-bottom: 28px; }
label { display: block; margin-bottom: 8px; font-weight: 650; font-size: 14px; }
input, textarea { width: 100%; border: 1px solid #abb8c9; border-radius: 10px; padding: 12px 14px; color: #18243a; background: #fff; }
input::placeholder, textarea::placeholder { color: #65748a; }
input:focus-visible, textarea:focus-visible, button:focus-visible { outline: 3px solid #75a8ff; outline-offset: 2px; }
input[aria-invalid="true"] { border-color: #b72f42; }
.primary-button { border: 0; border-radius: 10px; padding: 12px 20px; color: #fff; background: #245ab2; font-weight: 700; }
.primary-button:hover:not(:disabled) { background: #18478f; }
.primary-button:disabled { background: #8795ab; color: #fff; }
#continue-button { width: 100%; margin-top: 18px; }
.feedback { font-size: 14px; line-height: 1.4; margin: 10px 0 0; }
.error { color: #a32337; }

.chat-card { height: min(740px, calc(100vh - 128px)); min-height: 460px; display: flex; flex-direction: column; overflow: hidden; }
.chat-header { padding: 20px 28px; display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; border-bottom: 1px solid #e2e8f0; }
.eyebrow { color: #58677b; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 5px; }
.chat-header h1 { font-size: 21px; margin-bottom: 5px; }
.conversation-status { font-size: 13px; color: #52627a; margin: 0; }
.text-button { border: 0; background: transparent; color: #245ab2; padding: 7px 0; font-size: 14px; font-weight: 700; white-space: nowrap; }
.text-button:hover { text-decoration: underline; }
.messages { flex: 1; min-height: 0; overflow-y: auto; padding: 24px; display: flex; flex-direction: column; gap: 16px; }
.ready-state { max-width: 400px; margin: auto; text-align: center; color: #46566e; }
.ready-state h2 { color: #18243a; font-size: 20px; margin: 10px 0 7px; }
.ready-state p { margin: 0; line-height: 1.5; }
.message { max-width: min(78%, 560px); padding: 12px 16px; border-radius: 14px; line-height: 1.5; overflow-wrap: anywhere; }
.message--user { align-self: flex-end; color: #fff; background: #245ab2; border-bottom-right-radius: 4px; }
.message--assistant { align-self: flex-start; background: #eff3f9; border-bottom-left-radius: 4px; }
.message strong { display: block; font-size: 13px; margin-bottom: 5px; }
.message p { margin: 0; white-space: pre-wrap; }
.message ul { margin: 4px 0 0; padding-left: 20px; font-size: 13px; }
.composer-area { padding: 18px 24px 20px; border-top: 1px solid #e2e8f0; }
.composer { display: flex; gap: 10px; align-items: stretch; }
.composer textarea { resize: none; min-height: 48px; }
.composer textarea:disabled { background: #f1f4f8; color: #58677b; }
.composer-note { color: #58677b; font-size: 12px; margin: 8px 0 0; }
.visually-hidden { 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: 600px) {
  .site-header { height: 60px; padding: 0 16px; }
  .main { padding: 14px; align-items: stretch; }
  .entry-card { align-self: center; }
  .chat-card { height: calc(100dvh - 88px); min-height: 380px; border-radius: 14px; }
  .chat-header { padding: 16px; }
  .messages { padding: 16px; }
  .composer-area { padding: 14px 16px; }
  .composer .primary-button { padding: 10px 14px; }
}
