:root {
    color-scheme: light; --ink: #172b32; --muted: #63747a; --line: #dce7e5;
    --teal: #167b70; --teal-dark: #105b54; --mint: #dff3ec;
    --shadow: 0 24px 70px rgba(22, 56, 58, .11);
}
* { box-sizing: border-box; }
body {
    min-width: 320px; min-height: 100vh; margin: 0; color: var(--ink);
    background: radial-gradient(circle at 12% 8%, rgba(191,230,216,.48), transparent 31rem), linear-gradient(145deg,#f5f9f7,#eef5f3 52%,#f9fbfa);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
button, input { font: inherit; } button { cursor: pointer; }
.app-shell { display: flex; min-height: 100vh; flex-direction: column; }
.topbar { display: flex; width: min(1120px,calc(100% - 48px)); align-items: center; justify-content: space-between; margin: 0 auto; padding: 25px 0; }
.brand { display: inline-flex; align-items: center; gap: 12px; color: inherit; text-decoration: none; }
.brand-mark { display: grid; width: 42px; height: 42px; place-items: center; border-radius: 13px; color: #fff; background: var(--teal); font-size: 12px; font-weight: 800; letter-spacing: .06em; }
.brand-copy { display: grid; gap: 3px; } .brand-copy strong { font-size: 14px; } .brand-copy span { color: var(--muted); font-size: 12px; }

.page-content { width: min(790px,calc(100% - 32px)); flex: 1; margin: 29px auto 48px; }
.intro { max-width: 620px; margin: 0 auto 25px; text-align: center; }
.eyebrow { margin: 0 0 10px; color: var(--teal); font-size: 11px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
h1 { margin: 0; font-size: clamp(30px,5vw,43px); font-weight: 720; letter-spacing: -.045em; line-height: 1.12; }
.intro-copy { max-width: 560px; margin: 13px auto 0; color: var(--muted); font-size: 15px; line-height: 1.65; }
.chat-card { overflow: hidden; border: 1px solid rgba(204,220,216,.9); border-radius: 22px; background: #fff; box-shadow: var(--shadow); }
.chat-toolbar { display: flex; min-height: 76px; align-items: center; justify-content: space-between; gap: 16px; padding: 15px 22px; border-bottom: 1px solid var(--line); }
.assistant-state { display: flex; align-items: center; gap: 11px; }
.assistant-avatar, .message-avatar { display: grid; width: 37px; height: 37px; flex: 0 0 auto; place-items: center; border-radius: 12px; color: var(--teal-dark); background: var(--mint); font-size: 11px; font-weight: 800; }
.assistant-state strong { display: block; font-size: 13px; }

.reset-button { padding: 8px 10px; border: 0; border-radius: 8px; color: var(--muted); background: transparent; font-size: 12px; }
.reset-button:hover { color: var(--teal-dark); background: #f3f8f6; } .reset-button:disabled { cursor: wait; opacity: .5; }
.message-list { display: flex; min-height: 340px; max-height: 52vh; flex-direction: column; gap: 19px; overflow-y: auto; padding: 25px 24px 18px; scroll-behavior: smooth; }
.message { display: flex; max-width: 88%; align-items: flex-start; gap: 10px; } .message--user { align-self: flex-end; flex-direction: row-reverse; }
.message-body { padding: 12px 15px; border: 1px solid #e5eeeb; border-radius: 4px 15px 15px; color: #294047; background: #f6faf8; font-size: 14px; line-height: 1.6; overflow-wrap: anywhere; }
.message-body p { margin: 0; white-space: pre-wrap; } .message-body p + p { margin-top: 9px; }
.message--user .message-body { border-color: var(--teal); border-radius: 15px 4px 15px 15px; color: #fff; background: var(--teal); }
.message--user .message-avatar { color: #44565b; background: #e8efed; }
.message--pending .message-body { min-width: 68px; color: var(--muted); }
.citation-list { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.citation { display: inline-flex; align-items: center; gap: 6px; padding: 5px 8px; border: 1px solid #d4e8e1; border-radius: 7px; color: #246a5c; background: #fff; font-size: 11px; font-weight: 650; }
.citation-icon { font-size: 9px; font-weight: 800; letter-spacing: .04em; }
.suggestions { display: flex; flex-wrap: wrap; gap: 8px; padding: 4px 24px 15px 71px; }
.suggestion { padding: 8px 11px; border: 1px solid #d9e8e3; border-radius: 999px; color: #3c6861; background: #fff; font-size: 11px; }
.suggestion:hover { border-color: #8dc6b4; background: #f4faf7; }
.chat-form { display: flex; align-items: center; gap: 10px; margin: 0 18px; padding: 9px 9px 9px 17px; border: 1px solid #d9e5e1; border-radius: 14px; background: #fbfdfc; }
.chat-form:focus-within { border-color: #82b9a8; box-shadow: 0 0 0 3px rgba(22,123,112,.09); }
.chat-form input { width: 100%; min-width: 0; padding: 8px 0; border: 0; outline: 0; color: var(--ink); background: transparent; font-size: 14px; }
.chat-form input::placeholder { color: #91a09d; }
.send-button { display: grid; width: 39px; height: 39px; flex: 0 0 auto; place-items: center; border: 0; border-radius: 11px; color: #fff; background: var(--teal); transition: background 160ms ease,transform 160ms ease; }
.send-button:hover { transform: translateY(-1px); background: var(--teal-dark); } .send-button:disabled { cursor: wait; opacity: .58; }
.send-button svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }
.privacy-note { margin: 11px 18px 16px; color: #899794; font-size: 10px; line-height: 1.5; text-align: center; }

.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; clip-path: inset(50%); }
@media (max-width: 600px) {
    .topbar { width: calc(100% - 30px); padding: 17px 0; } .brand-mark { width: 38px; height: 38px; }
    .brand-copy strong { font-size: 12px; } .brand-copy span { max-width: 160px; overflow: hidden; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
    .page-content { width: calc(100% - 22px); margin-top: 30px; }
    .intro { margin-bottom: 20px; } .intro-copy { font-size: 13px; } .chat-card { border-radius: 17px; }
    .chat-toolbar { min-height: 68px; padding: 12px 13px; } .reset-button { padding: 7px; font-size: 10px; }
    .message-list { min-height: 330px; max-height: 55vh; padding: 18px 13px 14px; } .message { max-width: 96%; gap: 7px; }
    .message-avatar { width: 30px; height: 30px; border-radius: 10px; font-size: 9px; } .message-body { padding: 10px 12px; font-size: 13px; }
    .suggestions { gap: 6px; padding: 4px 13px 13px 50px; } .suggestion { padding: 7px 9px; font-size: 10px; }
    .chat-form { margin: 0 10px; padding-left: 12px; } .chat-form input { font-size: 13px; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}