:root {
  color-scheme: light;
  --ink: #18263e;
  --muted: #718096;
  --line: #e6ebf2;
  --blue: #2463d3;
  --blue-soft: #edf4ff;
  --red: #bd2929;
  --red-soft: #fff0ef;
  --amber: #a85e08;
  --amber-soft: #fff7e8;
  --green: #16734c;
  --green-soft: #edf8f2;
  --purple: #6b4cc2;
  --purple-soft: #f4f0ff;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: #f4f7fb;
  color: var(--ink);
}

* { box-sizing: border-box; }
body { min-width: 320px; min-height: 100vh; margin: 0; background: radial-gradient(ellipse at 50% -25%, #e4efff 0, transparent 55%), #f4f7fb; }
button, textarea { font: inherit; }
button { cursor: pointer; }
a { color: #174ea6; }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible { outline: 3px solid #9bbcf2; outline-offset: 3px; }
.app-shell { width: min(100%, 760px); min-height: 100vh; margin: 0 auto; padding: 22px 22px 28px; display: flex; flex-direction: column; }
.app-header { display: flex; align-items: center; gap: 13px; padding: 6px 2px 18px; }
.brand-mark { position: relative; isolation: isolate; width: 46px; height: 46px; display: grid; place-items: center; overflow: hidden; border: 1px solid #d8e7ff; border-radius: 16px; background: linear-gradient(145deg, #f4f8ff, #e4efff); }
.brand-mark::before, .brand-mark::after { position: absolute; z-index: 0; left: 50%; content: ''; transform: translateX(-50%); border: 1.5px solid #9bb9ec; border-top: 0; border-radius: 0 0 50% 50%; }
.brand-mark::before { bottom: 5px; width: 34px; height: 23px; }
.brand-mark::after { bottom: 5px; width: 23px; height: 15px; border-color: #bfd1f1; }
.brand-shield { position: relative; z-index: 1; display: grid; width: 19px; height: 22px; margin-top: -3px; place-items: center; clip-path: polygon(50% 0, 94% 17%, 88% 65%, 50% 100%, 12% 65%, 6% 17%); background: linear-gradient(155deg, #3678df, #1c54b3); color: #fff; font-size: 11px; font-weight: 900; filter: drop-shadow(0 2px 2px rgba(24, 69, 145, .22)); }
.brand-copy h1 { margin: 0; font: 800 17px/1.25 Manrope, sans-serif; letter-spacing: -.35px; }
.brand-copy p { margin: 4px 0 0; color: var(--muted); font-size: 12px; }
.header-status { margin-left: auto; border: 1px solid #dce7f7; border-radius: 999px; padding: 7px 11px; color: #315d9d; background: #f9fbff; font-size: 11px; font-weight: 700; }
.safety-strip { display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; border: 1px solid #f3dfb7; border-radius: 14px; background: #fffaf0; color: #63430f; font-size: 12px; line-height: 1.5; }
.safety-strip span { font-size: 15px; }
.safety-strip p { margin: 0; }
.chat-panel { flex: 1; margin-top: 17px; overflow: hidden; border: 1px solid var(--line); border-radius: 24px; background: rgba(255,255,255,.94); box-shadow: 0 15px 45px rgba(34,58,90,.07); }
.access-gate { width: min(100%, 470px); margin: 12vh auto 20px; padding: 27px; border: 1px solid var(--line); border-radius: 23px; background: #fff; box-shadow: 0 15px 45px rgba(34,58,90,.07); }
.access-gate[hidden], #protected-content[hidden] { display: none; }
.gate-icon { width: 46px; height: 46px; display: grid; place-items: center; margin-bottom: 16px; border-radius: 15px; background: #edf4ff; font-size: 21px; }
.access-gate .eyebrow { margin: 0; }
.access-gate h2 { margin: 7px 0; font: 800 21px/1.25 Manrope, system-ui, sans-serif; letter-spacing: -.4px; }
.access-gate > p:not(.eyebrow):not(.status-message) { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.access-form { display: grid; gap: 10px; margin-top: 18px; }
.access-form input { width: 100%; padding: 12px 13px; border: 1px solid #dfe6ef; border-radius: 12px; outline: 0; font: inherit; font-size: 13px; }
.access-form input:focus { border-color: #8eafe4; box-shadow: 0 0 0 3px #e9f1ff; }
.access-form button { border: 0; border-radius: 12px; padding: 12px; background: var(--blue); color: white; font-weight: 700; }
.access-form button:disabled { opacity: .6; }
.access-gate .status-message { padding: 8px 0 0; }
.chat-intro { padding: 23px 24px 15px; }
.intro-kicker, .eyebrow { color: var(--blue); font-size: 10px; font-weight: 800; letter-spacing: .11em; text-transform: uppercase; }
.chat-intro h2 { margin: 6px 0 4px; font: 800 22px/1.2 Manrope, sans-serif; letter-spacing: -.55px; }
.chat-intro p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.55; }
.suggestions { display: flex; gap: 8px; overflow-x: auto; padding: 0 24px 17px; scrollbar-width: thin; }
.suggestion { flex: 0 0 auto; min-height: 40px; max-width: 220px; border: 1px solid #dce6f4; border-radius: 999px; padding: 9px 12px; background: #fff; color: #3d5779; font-size: 11px; text-align: left; transition: border-color .16s ease, background .16s ease, transform .16s ease; }
.suggestion:hover { border-color: #9bb8e7; background: #f7faff; }
.suggestion:active { transform: translateY(1px); }
.suggestion:disabled { cursor: wait; opacity: .58; }
.conversation { display: flex; flex-direction: column; gap: 13px; padding: 18px 24px 12px; border-top: 1px solid #f0f2f6; background: linear-gradient(180deg, #fbfcfe, #fff 28%); }
.welcome-card { display: flex; gap: 10px; max-width: 95%; color: #526178; font-size: 12px; line-height: 1.55; }
.welcome-card p { margin: 0; }
.welcome-title { margin-bottom: 3px !important; color: var(--ink); font-size: 13px; font-weight: 700; }
.bot-avatar { flex: 0 0 30px; width: 30px; height: 30px; display: grid; place-items: center; border-radius: 11px; background: #eaf1ff; color: var(--blue); font-weight: 800; }
.user-bubble { align-self: flex-end; max-width: 84%; padding: 11px 14px; border: 1px solid #d9e6fb; border-radius: 16px 16px 4px 16px; background: #eef5ff; color: #253a58; font-size: 13px; line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; }
.assistant-block { display: flex; align-items: flex-start; gap: 9px; }
.assistant-block .bot-avatar { margin-top: 2px; }
.typing-avatar { animation: avatar-pulse 1.8s ease-in-out infinite; }
.typing-card { display: flex; align-items: center; gap: 11px; min-height: 46px; max-width: min(100%, 545px); padding: 10px 14px; border: 1px solid #e4eaf3; border-radius: 15px; background: #fff; color: #61718a; box-shadow: 0 3px 10px rgba(36,55,79,.035); }
.typing-message { margin: 0; font-size: 12px; line-height: 1.45; }
.typing-dots { display: inline-flex; flex: 0 0 auto; align-items: center; gap: 3px; height: 16px; }
.typing-dot { width: 5px; height: 5px; border-radius: 50%; background: #3974d6; animation: dot-bounce 1.1s ease-in-out infinite; }
.typing-dot:nth-child(2) { animation-delay: .14s; }
.typing-dot:nth-child(3) { animation-delay: .28s; }
@keyframes dot-bounce { 0%, 60%, 100% { transform: translateY(0); opacity: .48; } 30% { transform: translateY(-4px); opacity: 1; } }
@keyframes avatar-pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(36,99,211,0); } 50% { box-shadow: 0 0 0 5px rgba(36,99,211,.08); } }
.result-stack { display: grid; width: min(100%, 545px); gap: 9px; }
.result-card { border: 1px solid var(--line); border-radius: 15px; padding: 13px 15px; background: #fff; box-shadow: 0 3px 10px rgba(36,55,79,.035); }
.result-heading { display: flex; align-items: center; gap: 8px; margin: 0 0 6px; font: 700 13px/1.3 Manrope, sans-serif; }
.result-heading .icon { width: 22px; height: 22px; display: grid; place-items: center; border-radius: 8px; font-size: 13px; }
.result-card p, .result-card li { margin: 0; color: #4b586a; font-size: 12px; line-height: 1.55; }
.alert-card { border-color: #f2c8c5; background: linear-gradient(130deg, #fff8f7, #fff 72%); }
.alert-card .result-heading { color: var(--red); font-size: 15px; }
.alert-card .icon { background: #ffe4e1; }
.caution-card { border-color: #f0ddb8; background: #fffaf1; }
.caution-card .result-heading { color: var(--amber); }
.caution-card .icon { background: #ffedc9; }
.why-card .result-heading { color: var(--blue); }
.why-card .icon { background: #e8f1ff; }
.action-card { border-color: #f0ddb8; background: #fffaf1; }
.action-card .result-heading { color: var(--amber); }
.action-card .icon { background: #ffedc9; }
.action-card ul { display: grid; gap: 5px; margin: 0; padding: 0; list-style: none; }
.action-card li { display: flex; gap: 8px; }
.action-card li::before { content: '✓'; color: var(--amber); font-weight: 800; }
.source-card { background: #f8f8fc; }
.source-card .result-heading { color: #5c4a8e; }
.source-card .icon { background: #eee8ff; }
.source-link { display: inline-block; margin-top: 5px; font-size: 11px; font-weight: 700; }
.followup-card { border-color: #cddcf4; background: #f7faff; }
.followup-card .result-heading { color: var(--blue); }
.status-message { min-height: 18px; margin: 0; padding: 0 24px; color: #9b3d20; font-size: 11px; line-height: 1.5; }
.composer { display: flex; align-items: flex-end; gap: 10px; margin: 4px 17px 0; padding: 8px 8px 8px 14px; border: 1px solid #dfe6ef; border-radius: 18px; background: #fff; box-shadow: 0 4px 12px rgba(40,60,88,.04); }
.composer:focus-within { border-color: #8eafe4; box-shadow: 0 0 0 3px #e9f1ff; }
.composer textarea { width: 100%; max-height: 115px; min-height: 34px; resize: none; border: 0; outline: 0; color: var(--ink); background: transparent; font-size: 13px; line-height: 1.45; }
.composer textarea::placeholder { color: #9aa6b5; }
.send-button { flex: 0 0 42px; width: 42px; height: 42px; display: grid; place-items: center; border: 0; border-radius: 14px; background: var(--blue); color: white; transition: background .16s ease, transform .16s ease; }
.send-button:hover { background: #174ea6; }
.send-button:active:not(:disabled) { transform: scale(.96); }
.send-button:disabled { cursor: wait; opacity: .55; }
.send-button svg { width: 18px; height: 18px; fill: currentColor; }
.composer-footer { display: flex; justify-content: space-between; gap: 10px; padding: 8px 23px 16px; color: #8b96a5; font-size: 10px; }
.text-button { padding: 0; border: 0; background: transparent; color: #58739d; font-size: 10px; font-weight: 700; }
.text-button:hover { text-decoration: underline; }
.app-footer { padding: 17px 5px 0; color: #697789; text-align: center; font-size: 11px; line-height: 1.6; }
.app-footer p { margin: 0 0 4px; }
.disclaimer { color: #8993a1; font-size: 10px; }
.safety-dialog { width: min(calc(100% - 30px), 430px); border: 1px solid #e6ebf2; border-radius: 25px; padding: 27px; color: var(--ink); box-shadow: 0 30px 100px rgba(18,34,58,.3); }
.safety-dialog::backdrop { background: rgba(15,28,48,.7); backdrop-filter: blur(5px); }
.dialog-icon { width: 48px; height: 48px; display: grid; place-items: center; margin-bottom: 17px; border-radius: 16px; background: #edf4ff; font-size: 23px; }
.safety-dialog .eyebrow { margin: 0; }
.safety-dialog h2 { margin: 7px 0 9px; font: 800 22px/1.2 Manrope, sans-serif; letter-spacing: -.5px; }
.dialog-copy { margin: 0; color: #4c5c70; font-size: 13px; line-height: 1.65; }
.acknowledge-row { display: flex; align-items: flex-start; gap: 10px; margin: 19px 0 14px; color: #42536a; font-size: 12px; line-height: 1.45; }
.acknowledge-row input { width: 17px; height: 17px; flex: 0 0 auto; margin: 0; accent-color: var(--blue); }
.agree-button { width: 100%; border: 0; border-radius: 13px; padding: 13px 16px; background: var(--blue); color: #fff; font-weight: 700; }
.agree-button:disabled { cursor: not-allowed; background: #c6d0de; }
.dialog-note { margin: 12px 0 0; color: #8994a3; font-size: 10px; text-align: center; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

@media (min-width: 700px) {
  .app-shell { padding-top: 34px; }
  .chat-panel { min-height: 620px; display: flex; flex-direction: column; }
  .conversation { flex: 1; }
}
@media (max-width: 480px) {
  .app-shell { padding: 12px 12px 20px; }
  .brand-mark { width: 41px; height: 41px; }
  .header-status { padding: 6px 9px; }
  .chat-panel { border-radius: 20px; }
  .chat-intro { padding: 19px 17px 13px; }
  .suggestions { padding-right: 17px; padding-left: 17px; }
  .conversation { padding-right: 15px; padding-left: 15px; }
  .composer { margin-right: 12px; margin-left: 12px; }
  .composer-footer { padding-right: 16px; padding-left: 16px; }
}
