.aees-assist {
    --aa-navy: #071b33;
    --aa-blue: #024170;
    --aa-gold: #d6aa4e;
    --aa-gold-l: #f4dfae;
    --aa-ink: #0d2a56;
    --aa-muted: #5c6d80;
    --aa-line: rgba(214, 170, 78, .35);
    --aa-serif: "Source Serif 4", Palatino, Georgia, serif;
    --aa-sans: "Source Sans 3", "Source Sans Pro", "Segoe UI", system-ui, sans-serif;
    position: fixed;
    z-index: 8400;
    right: 22px;
    bottom: 22px;
    font-family: var(--aa-sans);
}
.aees-assist *,
.aees-assist *::before,
.aees-assist *::after { box-sizing: border-box; }
.aees-assist-launch {
    position: relative;
    display: grid;
    place-items: center;
    width: 62px;
    height: 62px;
    padding: 0;
    border: 1px solid var(--aa-gold);
    border-radius: 50%;
    background: var(--aa-blue);
    box-shadow: 0 12px 28px rgba(7, 27, 51, .28), inset 0 0 0 1px rgba(244, 223, 174, .25);
    color: #fff;
    cursor: pointer;
    transition: transform .28s ease, box-shadow .28s ease;
}
.aees-assist-launch:hover,
.aees-assist-launch:focus-visible {
    transform: translateY(-3px) scale(1.03);
    box-shadow: 0 16px 32px rgba(7, 27, 51, .34), inset 0 0 0 1px rgba(244, 223, 174, .55);
    outline: 0;
}
.aees-assist-launch svg { width: 26px; height: 26px; }
.aees-assist-launch::after {
    content: "";
    position: absolute;
    inset: -6px;
    border: 1px solid rgba(214, 170, 78, .35);
    border-radius: 50%;
    animation: aees-assist-pulse 2.4s ease-out infinite;
    pointer-events: none;
}
.aees-assist.is-open .aees-assist-launch { transform: scale(.92); }
.aees-assist.is-open .aees-assist-launch::after { display: none; }
.aees-assist-panel {
    position: absolute;
    right: 0;
    bottom: 76px;
    display: flex;
    flex-direction: column;
    width: min(400px, calc(100vw - 28px));
    height: min(560px, calc(100vh - 120px));
    overflow: hidden;
    border: 1px solid var(--aa-gold);
    border-radius: 18px;
    background: #f7f9fc;
    box-shadow: 0 28px 60px rgba(7, 27, 51, .28), inset 0 0 0 1px rgba(244, 223, 174, .35);
    opacity: 0;
    visibility: hidden;
    transform: translateY(12px) scale(.98);
    transform-origin: bottom right;
    transition: opacity .28s ease, transform .28s ease, visibility .28s;
}
.aees-assist.is-open .aees-assist-panel {
    opacity: 1;
    visibility: visible;
    transform: none;
}
.aees-assist-head {
    display: flex;
    align-items: center;
    gap: .85rem;
    padding: .9rem 1rem .85rem 1.05rem;
    background: linear-gradient(118deg, #071b33, #024170);
    color: #fff;
}
.aees-assist-mark {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border: 1px solid var(--aa-gold);
    border-radius: 50%;
    color: var(--aa-gold-l);
    font: 700 .72rem var(--aa-serif);
    letter-spacing: .04em;
}
.aees-assist-head strong {
    display: block;
    font: 650 1rem var(--aa-serif);
    letter-spacing: -.01em;
}
.aees-assist-head small {
    display: block;
    margin-top: .12rem;
    color: var(--aa-gold-l);
    font-size: .68rem;
    letter-spacing: .08em;
    text-transform: uppercase;
}
.aees-assist-head-actions { margin-left: auto; display: flex; gap: .15rem; }
.aees-assist-icon {
    width: 34px;
    height: 34px;
    padding: 0;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #fff;
    cursor: pointer;
}
.aees-assist-icon:hover { background: rgba(255, 255, 255, .08); }
.aees-assist-log {
    flex: 1;
    overflow: auto;
    padding: 1rem .9rem 0;
    display: flex;
    flex-direction: column;
    gap: .7rem;
}
.aees-assist-msg { display: flex; max-width: 92%; }
.aees-assist-msg.is-bot { align-self: flex-start; }
.aees-assist-msg.is-user { align-self: flex-end; }
.aees-assist-bubble {
    padding: .75rem .9rem;
    border-radius: 14px;
    font-size: .9rem;
    line-height: 1.45;
    color: var(--aa-ink);
}
.aees-assist-msg.is-bot .aees-assist-bubble {
    background: #fff;
    border: 1px solid #e3ebf3;
    border-bottom-left-radius: 5px;
}
.aees-assist-msg.is-user .aees-assist-bubble {
    background: var(--aa-blue);
    color: #fff;
    border-bottom-right-radius: 5px;
}
.aees-assist-bubble p { margin: 0 0 .55rem; }
.aees-assist-bubble p:last-child { margin-bottom: 0; }
.aees-assist-links {
    display: grid;
    gap: .4rem;
    margin-top: .7rem;
}
.aees-assist-links a {
    display: block;
    padding: .55rem .7rem;
    border: 1px solid var(--aa-line);
    border-radius: 8px;
    color: var(--aa-blue);
    font-size: .8rem;
    font-weight: 700;
    text-decoration: none;
    background: #fbf8ef;
}
.aees-assist-links a:hover { border-color: var(--aa-gold); }
.aees-assist-chips {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem;
    margin-top: .7rem;
}
.aees-assist-chips button {
    padding: .35rem .7rem;
    border: 1px solid #d5dfeb;
    border-radius: 999px;
    background: #fff;
    color: var(--aa-blue);
    font: 650 .74rem var(--aa-sans);
    cursor: pointer;
}
.aees-assist-chips button:hover { border-color: var(--aa-gold); background: #fffaf0; }
.aees-assist-typing {
    display: inline-flex;
    gap: 5px;
    padding: .2rem 0;
}
.aees-assist-typing span {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--aa-gold);
    animation: aees-assist-dots 1s ease-in-out infinite;
}
.aees-assist-typing span:nth-child(2) { animation-delay: .15s; }
.aees-assist-typing span:nth-child(3) { animation-delay: .3s; }
.aees-assist-form {
    display: flex;
    gap: .45rem;
    padding: .75rem .8rem .85rem;
    border-top: 1px solid #e3ebf3;
    background: #fff;
}
.aees-assist-form input {
    flex: 1;
    min-width: 0;
    min-height: 40px;
    padding: .4rem .8rem;
    border: 1px solid #cbd5df;
    border-radius: 999px;
    outline: 0;
    font: 400 .88rem var(--aa-sans);
}
.aees-assist-form input:focus {
    border-color: var(--aa-gold);
    box-shadow: 0 0 0 3px rgba(214, 170, 78, .18);
}
.aees-assist-form button[type="submit"] {
    width: 40px;
    height: 40px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: var(--aa-blue);
    color: #fff;
    cursor: pointer;
}
.aees-assist-form button[type="submit"]:hover { background: var(--aa-navy); }
.aees-assist-legal {
    margin: 0;
    padding: 0 .95rem .7rem;
    color: var(--aa-muted);
    font-size: .68rem;
    line-height: 1.35;
    background: #fff;
}
@keyframes aees-assist-pulse {
    0% { opacity: .7; transform: scale(.92); }
    100% { opacity: 0; transform: scale(1.18); }
}
@keyframes aees-assist-dots {
    0%, 80%, 100% { opacity: .25; transform: translateY(0); }
    40% { opacity: 1; transform: translateY(-3px); }
}
@media (prefers-reduced-motion: reduce) {
    .aees-assist-launch,
    .aees-assist-panel { transition: none; }
    .aees-assist-launch::after,
    .aees-assist-typing span { animation: none; }
}
@media (max-width: 680px) {
    .aees-assist { right: 14px; bottom: 14px; }
    .aees-assist-panel {
        width: min(100vw - 16px, 400px);
        height: min(72vh, 560px);
    }
}
@media print {
    .aees-assist { display: none !important; }
}
