.cjt-chat {
    --chat-ink: #22313f;
    --chat-muted: #616c77;
    --chat-line: #e2e7eb;
    --chat-surface: #f6f8f9;
    color: var(--chat-ink);
    font: 14px/1.8 var(--font-family-base);
    letter-spacing: 0;
}
.cjt-chat [hidden] { display: none !important; }
.cjt-chat :where(button) { cursor: pointer; font: inherit; }
.cjt-chat button:disabled { cursor: not-allowed; color: #75808a; }
.cjt-chat :is(button, a, summary, textarea, input):focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 3px;
}
.cjt-chat svg { flex-shrink: 0; }
.cjt-chat a { color: var(--primary-dark); text-decoration: underline; text-underline-offset: 4px; }
.cjt-chat__launcher {
    position: fixed;
    right: max(24px, env(safe-area-inset-right));
    bottom: max(24px, env(safe-area-inset-bottom));
    z-index: 990;
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 50px;
    padding: 10px 18px;
    border: 1px solid #d3e0eb;
    border-radius: 8px;
    background: #fff;
    color: var(--primary-dark);
    box-shadow: 0 2px 4px #16263208, 0 6px 24px #16263214;
    font-weight: 700;
    transition: border-color 150ms, box-shadow 150ms;
}
.menu-open .cjt-chat__launcher { visibility: hidden; }
.cjt-chat__dialog {
    position: fixed;
    inset: auto max(24px, env(safe-area-inset-right)) calc(max(24px, env(safe-area-inset-bottom)) + var(--cjt-chat-keyboard, 0px)) auto;
    width: 408px;
    max-width: calc(100% - 32px);
    height: 620px;
    max-height: calc(var(--cjt-chat-height, 100dvh) - 48px);
    margin: 0;
    padding: 0;
    overflow: hidden;
    border: 1px solid #d5dde4;
    border-radius: 8px;
    color: var(--chat-ink);
    background: #fff;
    box-shadow: 0 4px 12px #1626320d, 0 20px 64px #16263229;
    font: inherit;
}
.cjt-chat__dialog::backdrop { background: #1723330a; }
body:has(.cjt-chat__dialog[open]) { overflow: hidden; }
.cjt-chat__frame { display: flex; flex-direction: column; height: 100%; min-height: 0; }
.cjt-chat__header {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 14px;
    padding: 16px 12px 16px 24px;
    border-bottom: 1px solid var(--chat-line);
}
.cjt-chat__brand { flex-shrink: 0; width: 56px; height: 24px; object-fit: contain; }
.cjt-chat__heading { flex: 1; min-width: 0; }
.cjt-chat__heading h2 { margin: 0; font-size: 15px; font-weight: 700; line-height: 1.5; }
.cjt-chat__mode { margin: 3px 0 0; color: var(--chat-muted); font-size: 11px; line-height: 1.5; }
.cjt-chat__tools { display: flex; flex-shrink: 0; gap: 0; }
.cjt-chat__icon {
    display: inline-flex;
    flex: 0 0 44px;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 0;
    border-radius: 6px;
    color: var(--chat-muted);
    background: transparent;
    transition: background-color 150ms, color 150ms;
}
.cjt-chat__tools svg { width: 18px; height: 18px; }
.cjt-chat__steps {
    display: flex;
    flex: 0 0 auto;
    gap: 12px;
    margin: 0;
    padding: 14px 24px;
    list-style: none;
    counter-reset: chat-step;
    border-bottom: 1px solid var(--chat-line);
    background: var(--chat-surface);
}
.cjt-chat__steps li { display: flex; flex: 1; align-items: center; gap: 6px; color: var(--chat-muted); font-size: 12px; white-space: nowrap; }
.cjt-chat__steps li::before {
    display: grid;
    flex: 0 0 22px;
    place-items: center;
    height: 22px;
    border: 1px solid #ccd5dc;
    border-radius: 50%;
    font: 12px/1 var(--font-family-en);
    content: counter(chat-step);
    counter-increment: chat-step;
}
.cjt-chat__steps [aria-current] { color: var(--primary-dark); font-weight: 700; }
.cjt-chat__steps [aria-current]::before { border-color: var(--primary-dark); background: var(--primary-dark); color: #fff; }
.cjt-chat__steps .is-complete { color: #38745d; }
.cjt-chat__steps .is-complete::before { border-color: #aec6bb; background: #eef5f1; }
.cjt-chat__scroll { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 24px; scrollbar-width: thin; scrollbar-color: #c7cfd6 transparent; }
.cjt-chat__message { margin-bottom: 24px; overflow-wrap: anywhere; }
.cjt-chat__message p { margin: 5px 0 0; white-space: pre-wrap; }
.cjt-chat__message strong { display: block; font-size: 11px; color: var(--chat-muted); font-weight: 500; }
.cjt-chat__message:first-child { margin-bottom: 26px; }
.cjt-chat__message:first-child strong { display: none; }
.cjt-chat__message:first-child p { margin: 0; font-size: 17px; font-weight: 700; line-height: 1.85; }
.cjt-chat__message--user { max-width: 92%; margin-left: auto; padding: 10px 14px; border-radius: 6px; background: #f0f3f5; }
.cjt-chat__sources { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 12px; font-size: 12px; }
.cjt-chat__faq { margin-bottom: 20px; }
.cjt-chat__faq summary { display: flex; align-items: center; justify-content: space-between; min-height: 40px; cursor: pointer; list-style: none; color: var(--chat-muted); font-size: 12px; font-weight: 500; }
.cjt-chat__faq summary::-webkit-details-marker { display: none; }
.cjt-chat__faq summary svg { width: 16px; height: 16px; transition: transform 150ms; }
.cjt-chat__faq[open] summary svg { transform: rotate(90deg); }
.cjt-chat__choices { display: grid; }
.cjt-chat__choice {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    min-height: 54px;
    padding: 12px 0;
    border: 0;
    border-bottom: 1px solid var(--chat-line);
    border-radius: 0;
    color: var(--chat-ink);
    background: transparent;
    text-align: left;
    overflow-wrap: anywhere;
    transition: color 150ms;
}
.cjt-chat__choice svg { width: 16px; height: 16px; color: #85939f; }
.cjt-chat__action { display: block; width: 100%; min-height: 44px; padding: 10px 0; border: 0; background: transparent; color: var(--chat-muted); text-align: center; }
.cjt-chat__primary { min-height: 44px; padding: 10px 16px; border: 1px solid transparent; border-radius: 6px; color: #fff; background: var(--primary-dark); font-size: 14px; font-weight: 700; transition: background-color 150ms; }
.cjt-chat__primary:disabled { background: #e8edf1; }
.cjt-chat__continue { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; min-height: 48px; text-align: left; }
.cjt-chat__continue svg { width: 18px; height: 18px; }
.cjt-chat__bottom { flex: 0 0 auto; padding: 14px 24px 12px; border-top: 1px solid var(--chat-line); background: var(--chat-surface); }
.cjt-chat__notice { margin: 0; font-size: 11px; color: var(--chat-muted); }
.cjt-chat__status { margin: 0 0 10px; font-size: 12px; color: var(--primary-dark); }
.cjt-chat__status[data-state="error"] { color: #a03228; }
.cjt-chat__status:empty { display: none; }
.cjt-chat__composer { display: flex; align-items: flex-end; gap: 8px; margin-top: 12px; padding: 4px; border: 1px solid #b8c6d1; border-radius: 8px; background: #fff; transition: border-color 150ms, box-shadow 150ms; }
.cjt-chat__composer:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px #0066cc14; }
.cjt-chat textarea {
    display: block;
    min-width: 0;
    width: 100%;
    margin: 0;
    padding: 12px;
    border: 1px solid #b8c6d1;
    border-radius: 6px;
    color: var(--chat-ink);
    background: #fff;
    font: 16px/1.65 var(--font-family-base);
    letter-spacing: 0;
    resize: vertical;
}
.cjt-chat__composer textarea { flex: 1; height: 68px; max-height: 112px; padding: 7px 8px; border: 0; border-radius: 0; resize: none; }
.cjt-chat__composer textarea:focus-visible { outline: 0; }
.cjt-chat__primary.cjt-chat__icon { padding: 0; }
.cjt-chat__footnote { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; margin: 8px 0 0; font-size: 11px; color: var(--chat-muted); }
.cjt-chat__footnote a { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 4px 0; font-size: 12px; font-weight: 500; text-decoration: none; }
.cjt-chat__footnote svg { width: 14px; height: 14px; }
.cjt-chat__review label { display: block; margin-bottom: 12px; font-size: 16px; font-weight: 700; }
.cjt-chat__review p { margin: 14px 0 18px; font-size: 12px; color: var(--chat-muted); }
.cjt-chat__review .cjt-chat__primary { width: 100%; }
.cjt-chat__sr { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
@media (hover: hover) {
    .cjt-chat__launcher:hover { border-color: var(--primary); box-shadow: 0 4px 20px #16263224; }
    .cjt-chat__icon:hover:not(:disabled) { background: #e9eef2; color: var(--chat-ink); }
    .cjt-chat__action:hover, .cjt-chat__choice:hover:not(:disabled), .cjt-chat__faq summary:hover { color: var(--primary-dark); }
    .cjt-chat__primary:hover:not(:disabled) { background: #004f9e; color: #fff; }
    .cjt-chat__footnote a:hover { text-decoration: underline; }
}
@media (max-width: 600px) {
    .cjt-chat__launcher { right: max(16px, env(safe-area-inset-right)); bottom: max(16px, env(safe-area-inset-bottom)); }
    .cjt-chat__dialog {
        inset: auto 8px calc(max(8px, env(safe-area-inset-bottom)) + var(--cjt-chat-keyboard, 0px)) 8px;
        width: calc(100% - 16px);
        max-width: none;
        max-height: calc(var(--cjt-chat-height, 100dvh) - 24px - env(safe-area-inset-bottom));
    }
    .cjt-chat__header { gap: 10px; padding: 14px 8px 14px 16px; }
    .cjt-chat__brand { width: 48px; height: 21px; }
    .cjt-chat__heading h2 { font-size: 14px; }
    .cjt-chat__scroll { padding: 20px; }
    .cjt-chat__steps { padding: 12px 20px; }
    .cjt-chat__bottom { padding-inline: 20px; }
}
@media (prefers-reduced-motion: reduce) {
    .cjt-chat *, .cjt-chat *::before { transition: none; }
}
.cjt-chat--compact .cjt-chat__header { padding-block: 8px; }
.cjt-chat--compact .cjt-chat__steps { padding-block: 8px; }
.cjt-chat--compact .cjt-chat__scroll { padding-block: 14px; }
.cjt-chat--compact .cjt-chat__message:first-child { margin-bottom: 18px; }
.cjt-chat--compact .cjt-chat__message:last-child { margin-bottom: 0; }
.cjt-chat--compact .cjt-chat__faq { margin-bottom: 16px; }
.cjt-chat--compact .cjt-chat__bottom { padding-block: 8px; }
.cjt-chat--compact .cjt-chat__composer textarea { height: 48px; }
.cjt-chat--compact .cjt-chat__footnote { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 0 8px; }
@media print { .cjt-chat { display: none; } }
