/* === Reset + base === */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  background: linear-gradient(180deg, #f0f6fb 0%, #e8eff5 100%);
  color: #1f2933;
  min-height: 100vh;
  line-height: 1.5;
}

.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;
}

/* Honeypot */
.honeypot {
  position: absolute !important;
  left: -9999px !important;
  width: 1px; height: 1px;
  opacity: 0;
}

.page {
  max-width: 760px;
  margin: 0 auto;
  padding: 30px 18px 60px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* === Hero === */
.hero {
  text-align: center;
  margin-bottom: 28px;
}
.hero h1 {
  font-size: 30px;
  color: #1a3a5c;
  margin: 0 0 14px;
  line-height: 1.15;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.hero .lede {
  font-size: 16px;
  color: #4a5568;
  margin: 0 auto;
  max-width: 600px;
}
.hero .byline {
  font-size: 13px;
  color: #6b7280;
  margin-top: 14px;
  letter-spacing: 0.02em;
}

/* === Chat area === */
.chat-wrap {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 24px rgba(26, 58, 92, 0.08);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 460px;
}
.chat {
  flex: 1;
  padding: 24px 22px;
  overflow-y: auto;
  max-height: 60vh;
  scroll-behavior: smooth;
}

.msg {
  display: flex;
  margin-bottom: 14px;
  animation: slideIn 0.25s ease;
}
@keyframes slideIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.msg.bot { justify-content: flex-start; }
.msg.user { justify-content: flex-end; }

.bubble {
  max-width: 78%;
  padding: 10px 14px;
  border-radius: 16px;
  font-size: 15px;
  line-height: 1.45;
  word-wrap: break-word;
  white-space: pre-wrap;
}
.msg.bot .bubble {
  background: #eef4fa;
  color: #1a3a5c;
  border-bottom-left-radius: 4px;
}
.msg.user .bubble {
  background: #1a3a5c;
  color: #fff;
  border-bottom-right-radius: 4px;
}

.typing .bubble {
  background: #eef4fa;
  color: #1a3a5c;
  padding: 14px 18px;
}
.typing .dot {
  display: inline-block;
  width: 7px; height: 7px;
  margin: 0 1px;
  border-radius: 50%;
  background: #1a3a5c;
  opacity: 0.4;
  animation: blink 1.2s infinite;
}
.typing .dot:nth-child(2) { animation-delay: 0.2s; }
.typing .dot:nth-child(3) { animation-delay: 0.4s; }
@keyframes blink { 0%,80%,100% { opacity: 0.3; transform: scale(0.8); } 40% { opacity: 1; transform: scale(1); } }

.summary {
  background: #f0f6fb;
  border: 1px solid #c4d6e8;
  border-radius: 8px;
  padding: 14px 18px;
  margin: 6px 0;
  font-size: 14px;
  color: #1a3a5c;
}
.summary .row { display: flex; padding: 3px 0; }
.summary .label { color: #4a5568; min-width: 80px; }
.summary .value { font-weight: 600; }

.choices {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 6px 0 14px;
}
.choice-btn {
  background: #fff;
  color: #1a3a5c;
  border: 1.5px solid #1a3a5c;
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 600;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.15s ease;
}
.choice-btn:hover {
  background: #1a3a5c;
  color: #fff;
}

/* === Input area === */
.chat-input {
  display: flex;
  border-top: 1px solid #e5eaf1;
  padding: 14px 16px;
  gap: 10px;
  background: #fafbfc;
}
.chat-input input {
  flex: 1;
  border: 1px solid #d0d7de;
  border-radius: 22px;
  padding: 10px 16px;
  font-size: 15px;
  font-family: inherit;
  background: #fff;
}
.chat-input input:focus {
  outline: none;
  border-color: #1a5fb4;
  box-shadow: 0 0 0 3px rgba(26, 95, 180, 0.15);
}
.chat-input input:disabled {
  background: #f3f4f6;
  cursor: not-allowed;
}
.chat-input button {
  background: #1a3a5c;
  color: #fff;
  border: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: 22px;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.15s ease;
}
.chat-input button:hover:not(:disabled) {
  background: #2a5a8c;
}
.chat-input button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* === Footer === */
.foot {
  text-align: center;
  margin-top: 24px;
  font-size: 12px;
  color: #6b7280;
}
.foot a {
  color: #1a5fb4;
  text-decoration: none;
}
.foot a:hover { text-decoration: underline; }

/* === Mobile === */
@media (max-width: 600px) {
  .hero h1 { font-size: 24px; }
  .hero .lede { font-size: 15px; }
  .bubble { max-width: 90%; font-size: 14px; }
  .chat-wrap { border-radius: 8px; }
  .page { padding: 18px 12px 40px; }
}
