/* FAQ assistant: quiet colours, readable answers and an accessible mobile drawer. */
.ai-page-wrapper {
    --assistant-ink: #203b50;
    --assistant-muted: #506b7b;
    --assistant-line: #dae5ea;
    display: flex;
    height: calc(100dvh - 120px);
    min-height: 420px;
    overflow: hidden;
    color: var(--assistant-ink);
    background: #fff;
}
.assistant-sidebar {
    width: 318px;
    flex-shrink: 0;
    overflow-y: auto;
    background: #f2f6f7;
    border-right: 1px solid var(--assistant-line);
    scrollbar-width: thin;
}
.sidebar-brand { display: flex; align-items: center; gap: 12px; padding: 24px; border-bottom: 1px solid var(--assistant-line); font-size: 17px; font-weight: 700; }
.sidebar-brand-icon { display: grid; place-items: center; width: 36px; height: 36px; flex-shrink: 0; border-radius: 11px; background: #244769; color: #fff; }
.sidebar-section { padding: 22px 24px; }
.sidebar-section + .sidebar-section { border-top: 1px solid var(--assistant-line); }
.sidebar-section h2 { margin: 0 0 10px; font: 700 12px/1.6 'Inter', sans-serif; letter-spacing: .08em; text-transform: uppercase; color: var(--assistant-muted); }
.sidebar-help { margin: 0 0 16px; font-size: 13px; line-height: 1.6; color: var(--assistant-muted); }
.suggestion-btn {
    display: block; width: 100%; margin: 0 0 9px; padding: 12px 14px;
    border: 1px solid var(--assistant-line); border-radius: 11px; background: #fff;
    text-align: left; color: var(--assistant-ink); font: 500 15px/1.5 'Inter', sans-serif;
    cursor: pointer; transition: border-color .18s, background .18s;
}
.suggestion-btn:hover { border-color: #799fae; background: #e9f1f4; }
.browse-faq, .answer-faq-link { display: inline-block; font-size: 14px; font-weight: 600; text-decoration: underline; text-underline-offset: 4px; }
.browse-faq { margin-top: 10px; }
.ai-page-wrapper a { color: #225773; }
.ai-page-wrapper a:hover { color: #122f49; }
.ai-page-wrapper :is(button, a, select, textarea, summary, [tabindex]):focus-visible { outline: 3px solid #598995; outline-offset: 3px; }
.ai-page-wrapper [hidden] { display: none !important; }
.coming-soon-label { margin-left: 5px; letter-spacing: 0; text-transform: none; font-weight: 500; }
#modelSelect { width: 100%; min-height: 44px; padding: 10px; border: 1px solid #c7d8e0; border-radius: 9px; background: #fff; color: var(--assistant-ink); font: 500 15px 'Inter', sans-serif; margin-bottom: 10px; }
.model-section .sidebar-help { margin: 0; }
.retry-questions { padding: 9px 14px; border: 1px solid #799fae; border-radius: 8px; color: var(--assistant-ink); background: #fff; cursor: pointer; }
.assistant-tools-toggle { display: none; }
.chat-container { flex: 1; display: flex; flex-direction: column; min-width: 0; min-height: 0; overflow: hidden; }
.chat-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-shrink: 0; padding: 22px 28px; border-bottom: 1px solid var(--assistant-line); }
.chat-header h1 { margin: 0 0 4px; font: 700 22px/1.3 'Manrope', sans-serif; letter-spacing: -.025em; color: var(--assistant-ink); }
.chat-header-sub { margin: 0; color: var(--assistant-muted); font-size: 14px; line-height: 1.5; }
.faq-mode-badge { display: flex; align-items: center; gap: 7px; flex-shrink: 0; padding: 7px 11px; border: 1px solid #cce1de; border-radius: 20px; font-size: 12px; font-weight: 600; color: #2c6260; background: #eef7f4; }
.faq-mode-badge > span { width: 6px; height: 6px; border-radius: 50%; background: #4c837a; }
.chat-messages { flex: 1; min-height: 0; overflow-y: auto; padding: 28px; display: flex; flex-direction: column; gap: 22px; scrollbar-width: thin; }
.message { display: flex; flex-shrink: 0; gap: 12px; max-width: min(94%, 960px); min-width: 0; }
.message.assistant { align-self: flex-start; }
.message.user { align-self: flex-end; flex-direction: row-reverse; max-width: min(85%, 820px); }
.avatar { width: 32px; height: 32px; flex-shrink: 0; display: grid; place-items: center; border-radius: 50%; font-size: 12px; margin-top: 3px; background: #23466a; color: #fff; }
.message.user .avatar { background: #ede9e3; color: #506475; }
.message-content { min-width: 0; padding: 22px 24px; border: 1px solid var(--assistant-line); border-radius: 3px 18px 18px; background: #f2f7f9; color: #243b4b; font-size: 17px; line-height: 1.8; overflow-wrap: anywhere; }
.message.user .message-content { border-radius: 18px 3px 18px 18px; background: #f3f0eb; border-color: #e4dfd7; white-space: pre-wrap; }
.message-content p { margin: 0 0 14px; }
.message-content p:last-child { margin-bottom: 0; }
.message-content .message-eyebrow { margin: 0 0 10px; color: #496c7c; font-size: 12px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; line-height: 1.6; }
.message-content h2 { margin: 0 0 12px; font: 700 28px/1.3 'Manrope', sans-serif; color: var(--assistant-ink); letter-spacing: -.035em; }
.message-content h3, .message-content h4, .message-content h5 { margin: 22px 0 10px; font-size: 18px; line-height: 1.5; color: var(--assistant-ink); }
.message-content ul, .message-content ol { margin: 10px 0 18px; padding-left: 24px; }
.message-content li { margin-bottom: 9px; padding-left: 3px; }
.message-content a { text-decoration: underline; text-underline-offset: 3px; }
.message-content .care-reminder { padding-top: 14px; border-top: 1px solid var(--assistant-line); font-size: 13px; line-height: 1.7; color: var(--assistant-muted); }
.message-content .faq-care-note { border-left: 3px solid #85aeb4; background: #e6f0f2; border-radius: 0 8px 8px 0; padding: 14px 16px; margin: 18px 0; font-size: 15px; line-height: 1.8; }
.faq-table-scroll { overflow-x: auto; max-width: 100%; margin: 20px 0; border: 1px solid #cfdee4; border-radius: 10px; background: #fff; }
.faq-answer-content table { width: 100%; min-width: 350px; border-collapse: collapse; font-size: 14px; line-height: 1.7; }
.faq-answer-content caption { text-align: left; padding: 14px; font-weight: 600; color: var(--assistant-ink); }
.faq-answer-content th, .faq-answer-content td { text-align: left; vertical-align: top; padding: 12px 14px; border-top: 1px solid var(--assistant-line); }
.faq-answer-content thead { background: #eaf1f4; }
.faq-answer-content th { font-weight: 600; }
.answer-sources { margin: 20px 0 14px; padding-top: 14px; border-top: 1px solid #d4e2e8; font-size: 14px; }
.answer-sources summary { cursor: pointer; font-weight: 600; color: #315b72; }
.answer-sources ul { margin-bottom: 0; }
.input-area { flex-shrink: 0; padding: 16px 28px; border-top: 1px solid var(--assistant-line); background: #fff; }
.input-wrapper { display: flex; align-items: flex-end; gap: 10px; padding: 10px 12px 10px 16px; border: 1px solid #bfcfd8; border-radius: 14px; background: #fff; }
.input-wrapper:focus-within { border-color: #6e94a5; box-shadow: 0 0 0 3px #e8eff3; }
#userInput { flex: 1; min-width: 0; width: 100%; min-height: 40px; max-height: 140px; border: none; border-radius: 4px; background: transparent; box-shadow: none; padding: 6px 0; resize: none; font: 400 17px/1.6 'Inter', sans-serif; color: var(--assistant-ink); }
#userInput:focus-visible { outline: none; }
#userInput::placeholder { color: #667d8d; }
.send-btn { display: grid; place-items: center; width: 42px; height: 42px; flex-shrink: 0; border: 0; border-radius: 11px; background: #24496b; color: #fff; cursor: pointer; }
.send-btn:hover { background: #163c5c; }
.send-btn:disabled { background: #dbe5eb; color: #697f8f; cursor: default; }
.input-hint { margin: 9px 0 0; text-align: center; color: var(--assistant-muted); font-size: 12px; line-height: 1.6; }
.no-script-note { padding: 15px; }
.ai-page-wrapper .visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
@media (max-width: 1100px) {
    .assistant-sidebar { width: 285px; }
    .sidebar-section { padding: 20px; }
    .chat-messages { padding: 22px; }
    .message { max-width: 100%; }
    .keyboard-hint { display: none; }
}
@media (max-width: 768px) {
    .ai-page-wrapper { flex-direction: column; }
    .assistant-sidebar { width: 100%; flex-shrink: 0; overflow: visible; border-right: 0; border-bottom: 1px solid var(--assistant-line); }
    .sidebar-brand { display: none; }
    .assistant-tools-toggle { display: flex; align-items: center; justify-content: space-between; width: 100%; min-height: 48px; padding: 12px 18px; border: 0; background: #edf3f5; color: var(--assistant-ink); font: 600 14px/1.5 'Inter', sans-serif; cursor: pointer; }
    .assistant-tools-toggle[aria-expanded="true"] i { transform: rotate(180deg); }
    .assistant-tools { display: none; }
    .assistant-tools.open { display: block; max-height: min(42dvh, 350px); overflow-y: auto; }
    .sidebar-section { padding: 16px 18px; }
    .chat-header { padding: 15px 18px; gap: 10px; }
    .chat-header h1 { font-size: 20px; }
    .chat-header-sub { font-size: 12px; }
    .faq-mode-badge { font-size: 11px; padding: 6px 9px; }
    .chat-messages { padding: 18px 14px; gap: 18px; }
    .message { gap: 8px; }
    .avatar { width: 25px; height: 25px; font-size: 10px; }
    .message-content { font-size: 16px; padding: 17px; }
    .message-content h2 { font-size: 24px; }
    .message-content .message-eyebrow { font-size: 11px; }
    .input-area { padding: 12px 14px; }
    .input-hint { font-size: 11px; }
}
@media (prefers-reduced-motion: reduce) {
    .ai-page-wrapper * { transition: none !important; scroll-behavior: auto !important; }
}
