.hm-advisor-nav-pill {
    min-height: 42px;
    border: 0;
    border-radius: 999px;
    padding: 8px 18px;
    background: #ffffff;
    color: #111827;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-weight: 800;
    line-height: 1.1;
    white-space: nowrap;
    box-shadow: 0 12px 34px rgba(15, 23, 42, 0.18);
}

.hm-advisor-nav-pill i {
    color: #0f766e;
    font-size: 1.1rem;
}

.hm-advisor-nav-pill:hover,
.hm-advisor-nav-pill:focus {
    color: #111827;
    transform: translateY(-1px);
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.24);
}

.hm-assistant {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 18px;
    z-index: 1080;
    display: flex;
    justify-content: center;
    padding: 0 16px;
    font-family: inherit;
    pointer-events: none;
}

.hm-assistant__button {
    position: absolute;
    right: 18px;
    bottom: 0;
    min-width: 58px;
    height: 58px;
    border: 0;
    border-radius: 999px;
    padding: 0 18px;
    background: #111827;
    color: #ffffff;
    box-shadow: 0 18px 38px rgba(15, 23, 42, 0.28);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 1rem;
    font-weight: 800;
    pointer-events: auto;
}

.hm-assistant__button i {
    font-size: 1.25rem;
}

.hm-assistant__dock-close {
    position: absolute;
    right: 28px;
    bottom: 86px;
    z-index: 3;
    min-height: 42px;
    border: 1px solid #dbe5ea;
    border-radius: 999px;
    padding: 8px 14px;
    background: #ffffff;
    color: #111827;
    box-shadow: 0 14px 32px rgba(15, 23, 42, 0.2);
    display: none;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 0.94rem;
    font-weight: 850;
    line-height: 1;
    pointer-events: auto;
}

.hm-assistant.is-open .hm-assistant__dock-close {
    display: inline-flex;
}

.hm-assistant__dock-close:hover,
.hm-assistant__dock-close:focus {
    color: #ffffff;
    background: #111827;
}

.hm-assistant__button:focus-visible,
.hm-assistant__dock-close:focus-visible,
.hm-assistant__send:focus-visible,
.hm-assistant__close:focus-visible,
.hm-assistant__cta:focus-visible {
    outline: 3px solid rgba(71, 180, 138, 0.35);
}

    .hm-assistant__cta:focus-visible,
    .hm-assistant__tool:focus-visible,
    .hm-assistant__prompt:focus-visible,
    .hm-advisor-nav-pill:focus-visible {
        outline: 3px solid rgba(20, 184, 166, 0.35);
        outline-offset: 3px;
    }

    .hm-assistant__panel {
        width: min(920px, calc(100vw - 32px));
        max-width: calc(100vw - 32px);
        max-height: min(760px, calc(100vh - 104px));
        margin-bottom: 74px;
        background: #f8fbfc;
        border: 1px solid #dce7ea;
        border-radius: 8px;
        box-shadow: 0 28px 80px rgba(15, 23, 42, 0.24);
        display: none;
        overflow: hidden;
        pointer-events: auto;
    }

    .hm-assistant.is-open .hm-assistant__panel {
        display: grid;
        grid-template-rows: auto auto auto minmax(170px, 1fr) auto auto;
    }

    .hm-assistant__header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 14px;
        padding: 16px 18px;
        background: #1f2933;
        color: #ffffff;
    }

    .hm-assistant__identity {
        display: flex;
        align-items: center;
        gap: 12px;
        min-width: 0;
    }

    .hm-assistant__avatar,
    .hm-assistant__portrait {
        flex: 0 0 auto;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        border-radius: 999px;
    }

    .hm-assistant__avatar {
        width: 42px;
        height: 42px;
        background: #ffffff;
        color: #0f766e;
        font-size: 1.25rem;
    }

    .hm-assistant__eyebrow {
        margin: 0 0 2px;
        color: #b7f7e8;
        font-size: 0.76rem;
        font-weight: 800;
        letter-spacing: 0.08em;
        text-transform: uppercase;
    }

    .hm-assistant__title {
        margin: 0;
        color: #ffffff;
        font-size: 1.05rem;
        font-weight: 850;
        line-height: 1.15;
    }

    .hm-assistant__close {
        width: 36px;
        height: 36px;
        border: 0;
        border-radius: 999px;
        background: rgba(255, 255, 255, 0.12);
        color: #ffffff;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .hm-assistant__intro {
        display: flex;
        align-items: center;
        gap: 16px;
        padding: 22px 26px 8px;
        background: #eef6f8;
    }

    .hm-assistant__portrait {
        width: 58px;
        height: 58px;
        background: #dff1ec;
        color: #0f766e;
        font-size: 1.55rem;
    }

    .hm-assistant__intro h3 {
        margin: 0 0 6px;
        color: #1f2933;
        font-size: clamp(1.25rem, 2.2vw, 2rem);
        font-weight: 850;
        line-height: 1.15;
        letter-spacing: 0;
    }

    .hm-assistant__intro p {
        margin: 0;
        color: #4b5563;
        font-size: 1rem;
        line-height: 1.45;
    }

    .hm-assistant__prompts {
        display: flex;
        gap: 10px;
        padding: 18px 26px 16px;
        background: #eef6f8;
        overflow-x: auto;
    }

    .hm-assistant__prompt {
        flex: 0 0 auto;
        min-height: 36px;
        border: 0;
        border-radius: 999px;
        padding: 7px 12px;
        background: transparent;
        color: #1f2933;
        display: inline-flex;
        align-items: center;
        gap: 7px;
        font-weight: 750;
        white-space: nowrap;
    }

    .hm-assistant__prompt:hover {
        background: rgba(15, 118, 110, 0.1);
    }

    .hm-assistant__messages {
        padding: 18px 26px;
        background: #eef6f8;
        overflow-y: auto;
    }

    .hm-assistant__message {
        position: relative;
        max-width: min(720px, 88%);
        padding: 13px 15px;
        margin-bottom: 12px;
        border-radius: 8px;
        font-size: 0.98rem;
        line-height: 1.5;
        overflow-wrap: anywhere;
    }

    .hm-assistant__message-text {
        display: block;
    }

    .hm-assistant__cta {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        max-width: 100%;
        min-height: 34px;
        margin-top: 10px;
        padding: 7px 11px;
        border-radius: 8px;
        background: #151515;
        color: #fff;
        font-size: 0.84rem;
        font-weight: 700;
        line-height: 1.2;
        text-decoration: none;
        overflow-wrap: anywhere;
    }

    .hm-assistant__cta:hover {
        color: #fff;
        text-decoration: none;
        background: #1d6f50;
    }

    .hm-assistant__message--bot {
        background: #ffffff;
        color: #25303b;
        border: 1px solid #dde7eb;
        padding-right: 46px;
        box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
    }

    .hm-assistant__message--user {
        margin-left: auto;
        background: #0f766e;
        color: #ffffff;
    }

    .hm-assistant__message--thinking {
        color: #64748b;
    }

    .hm-assistant__cta {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        max-width: 100%;
        min-height: 36px;
        margin-top: 12px;
        padding: 8px 12px;
        border-radius: 8px;
        background: #111827;
        color: #ffffff;
        font-size: 0.88rem;
        font-weight: 800;
        line-height: 1.2;
        text-decoration: none;
        overflow-wrap: anywhere;
    }

    .hm-assistant__cta:hover {
        color: #ffffff;
        text-decoration: none;
        background: #0f766e;
    }

    .hm-assistant__speech {
        position: absolute;
        right: 9px;
        top: 9px;
        width: 30px;
        height: 30px;
        border: 1px solid #dbe5ea;
        border-radius: 999px;
        background: #f8fbfc;
        color: #111827;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        font-size: 0.88rem;
    }

    .hm-assistant__speech:disabled {
        color: #6b7280;
        cursor: wait;
    }

    .hm-assistant__history {
        max-height: 184px;
        padding: 12px 26px 16px;
        background: #ffffff;
        border-top: 1px solid #e2eaee;
        overflow-y: auto;
    }

    .hm-assistant__history-title {
        margin-bottom: 8px;
        color: #111827;
        font-size: 0.82rem;
        font-weight: 850;
        text-transform: uppercase;
        letter-spacing: 0.08em;
    }

    .hm-assistant__history-empty {
        margin: 0;
        color: #64748b;
        font-size: 0.92rem;
    }

    .hm-assistant__history-item {
        width: 100%;
        border: 1px solid #e2eaee;
        border-radius: 8px;
        background: #f8fbfc;
        padding: 9px 10px;
        margin-bottom: 8px;
        color: #1f2933;
        display: grid;
        gap: 2px;
        text-align: left;
    }

    .hm-assistant__history-item strong {
        font-size: 0.78rem;
    }

    .hm-assistant__history-item span {
        color: #64748b;
        font-size: 0.9rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .hm-assistant__form {
        display: grid;
        grid-template-columns: 1fr auto;
        gap: 12px;
        padding: 16px 18px 18px;
        border-top: 1px solid #dce7ea;
        background: #ffffff;
    }

    .hm-assistant__input {
        min-width: 0;
        min-height: 62px;
        max-height: 138px;
        border: 0;
        border-radius: 8px;
        padding: 12px 2px;
        resize: none;
        color: #1f2933;
        background: transparent;
        font-size: 1.05rem;
        line-height: 1.45;
        outline: 0;
    }

    .hm-assistant__tools {
        grid-column: 1 / -1;
        display: flex;
        align-items: center;
        gap: 14px;
        order: 3;
    }

    .hm-assistant__tool {
        border: 0;
        background: transparent;
        color: #5f676f;
        display: inline-flex;
        align-items: center;
        gap: 7px;
        padding: 4px 0;
        font-weight: 800;
    }

    .hm-assistant__tool:hover {
        color: #0f766e;
    }

    .hm-assistant__actions {
        display: flex;
        align-items: flex-end;
        gap: 8px;
    }

    .hm-assistant__send,
    .hm-assistant__mic {
        width: 42px;
        height: 42px;
        border: 0;
        border-radius: 999px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        font-size: 1.1rem;
    }

    .hm-assistant__send {
        background: #2563eb;
        color: #ffffff;
    }

    .hm-assistant__send:disabled {
        background: #94a3b8;
        cursor: wait;
    }

    .hm-assistant__mic {
        background: transparent;
        color: #6b7280;
    }

    .hm-assistant__mic:disabled {
        opacity: 0.7;
    }

    html[data-hm-theme="dark"] .hm-assistant__panel,
    html[data-hm-theme="dark"] .hm-assistant__form,
    html[data-hm-theme="dark"] .hm-assistant__history,
    html[data-hm-theme="dark"] .hm-assistant__history-item,
    html[data-hm-theme="dark"] .hm-assistant__message--bot {
        background: #0f1b2d;
        border-color: rgba(148, 163, 184, 0.28);
        color: #f8fafc;
    }

    html[data-hm-theme="dark"] .hm-assistant__intro,
    html[data-hm-theme="dark"] .hm-assistant__prompts,
    html[data-hm-theme="dark"] .hm-assistant__messages {
        background: #07111f;
    }

    html[data-hm-theme="dark"] .hm-assistant__intro h3,
    html[data-hm-theme="dark"] .hm-assistant__history-title,
    html[data-hm-theme="dark"] .hm-assistant__input,
    html[data-hm-theme="dark"] .hm-assistant__prompt {
        color: #f8fafc;
    }

    html[data-hm-theme="dark"] .hm-assistant__intro p,
    html[data-hm-theme="dark"] .hm-assistant__history-empty,
    html[data-hm-theme="dark"] .hm-assistant__history-item span,
    html[data-hm-theme="dark"] .hm-assistant__tool {
        color: #cbd5e1;
    }

    html[data-hm-theme="dark"] .hm-assistant__portrait {
        background: rgba(20, 184, 166, 0.18);
        color: #5eead4;
    }

    @media (max-width: 991px) {
        .hm-advisor-nav-pill {
            width: 100%;
            margin: 8px 0;
        }
    }

    @media (max-width: 640px) {
        .hm-assistant {
            right: 0;
            bottom: 10px;
            padding: 0 10px;
        }

        .hm-assistant__button {
            right: 12px;
            width: 54px;
            height: 54px;
            min-width: 54px;
            padding: 0;
        }

        .hm-assistant__dock-close {
            right: 16px;
            bottom: 76px;
            min-height: 38px;
            padding: 7px 11px;
            font-size: 0.86rem;
        }

        .hm-assistant__button span {
            position: absolute;
            width: 1px;
            height: 1px;
            overflow: hidden;
            clip: rect(0, 0, 0, 0);
            white-space: nowrap;
        }

        .hm-assistant__panel {
            width: calc(100vw - 20px);
            max-height: calc(100vh - 88px);
            margin-bottom: 64px;
        }

        .hm-assistant.is-open .hm-assistant__panel {
            grid-template-rows: auto auto auto minmax(140px, 1fr) auto auto;
        }

        .hm-assistant__intro {
            align-items: flex-start;
            padding: 18px 16px 8px;
        }

        .hm-assistant__portrait {
            width: 46px;
            height: 46px;
            font-size: 1.2rem;
        }

        .hm-assistant__prompts,
        .hm-assistant__messages,
        .hm-assistant__history {
            padding-left: 16px;
            padding-right: 16px;
        }

        .hm-assistant__message {
            max-width: 94%;
        }

        .hm-assistant__form {
            grid-template-columns: 1fr;
        }

        .hm-assistant__actions {
            justify-content: flex-end;
        }

        .hm-assistant__tools {
            justify-content: space-between;
            gap: 10px;
        }
    }
