.portfolio-assistant {
    --assistant-accent: #a855f7;
    --assistant-accent-bright: #c084fc;
    --assistant-accent-soft: #e9d5ff;
    --assistant-cyan: #67e8f9;
    --assistant-panel: #111114;
    --assistant-surface: #1b1b20;
    --assistant-surface-raised: #23232a;
    --assistant-border: rgba(255, 255, 255, 0.12);
    --assistant-text: #f7f7f8;
    --assistant-muted: #a1a1aa;
    --assistant-online: #4ade80;
    position: fixed;
    z-index: 1200;
    right: max(20px, env(safe-area-inset-right));
    bottom: max(20px, env(safe-area-inset-bottom));
    width: 0;
    height: 0;
    color: var(--assistant-text);
    font-family: 'Inter', sans-serif;
    isolation: isolate;
    pointer-events: none;
}

.portfolio-assistant,
.portfolio-assistant * {
    box-sizing: border-box;
}

.portfolio-assistant [hidden] {
    display: none !important;
}

.portfolio-assistant button,
.portfolio-assistant textarea,
.portfolio-assistant a {
    font: inherit;
}

.portfolio-assistant__launcher {
    position: absolute;
    right: 0;
    bottom: 0;
    display: grid;
    min-width: 218px;
    min-height: 64px;
    padding: 0.62rem 0.7rem;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 0.72rem;
    color: var(--assistant-text);
    background:
        linear-gradient(135deg, rgba(168, 85, 247, 0.11), transparent 48%),
        rgba(17, 17, 20, 0.97);
    border: 1px solid rgba(216, 180, 254, 0.34);
    border-radius: 20px 20px 5px 20px;
    box-shadow:
        0 22px 54px rgba(0, 0, 0, 0.46),
        inset 0 1px 0 rgba(255, 255, 255, 0.07);
    cursor: pointer;
    overflow: hidden;
    pointer-events: auto;
    touch-action: manipulation;
    transition:
        transform 220ms ease,
        border-color 220ms ease,
        box-shadow 220ms ease,
        opacity 160ms ease,
        visibility 160ms ease;
}

.portfolio-assistant__launcher::before {
    content: '';
    position: absolute;
    top: 0;
    right: 18px;
    left: 18px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--assistant-accent-bright), var(--assistant-cyan), transparent);
    opacity: 0.8;
}

.portfolio-assistant__launcher:hover {
    border-color: rgba(216, 180, 254, 0.66);
    box-shadow:
        0 26px 62px rgba(0, 0, 0, 0.52),
        0 0 34px rgba(168, 85, 247, 0.14),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    transform: translateY(-4px);
}

.portfolio-assistant__launcher:focus-visible,
.portfolio-assistant__close:focus-visible,
.portfolio-assistant__send:focus-visible,
.portfolio-assistant__suggestion:focus-visible,
.portfolio-assistant__action:focus-visible,
.portfolio-assistant__input:focus-visible {
    outline: 2px solid #c4b5fd;
    outline-offset: 3px;
}

.portfolio-assistant__launcher-mark {
    position: relative;
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    color: #ffffff;
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.17), transparent 45%),
        linear-gradient(145deg, #6d28d9, #a855f7);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 13px 13px 4px 13px;
    box-shadow: 0 10px 26px rgba(168, 85, 247, 0.28);
    font-size: 0.72rem;
    font-weight: 850;
    letter-spacing: 0.04em;
}

.portfolio-assistant__bot-icon {
    width: 25px;
    height: 25px;
    position: relative;
    z-index: 1;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.65;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.portfolio-assistant__launcher-status {
    position: absolute;
    right: -3px;
    bottom: -3px;
    width: 11px;
    height: 11px;
    background: var(--assistant-online);
    border: 2px solid #111114;
    border-radius: 50%;
    box-shadow: 0 0 13px rgba(74, 222, 128, 0.76);
}

.portfolio-assistant__launcher-copy {
    display: flex;
    min-width: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.14rem;
}

.portfolio-assistant__launcher-eyebrow {
    color: #a1a1aa;
    font-size: 0.53rem;
    font-weight: 750;
    letter-spacing: 0.16em;
    line-height: 1;
}

.portfolio-assistant__launcher-label {
    color: #fafafa;
    font-size: 0.91rem;
    font-weight: 760;
    letter-spacing: -0.02em;
    line-height: 1.2;
    white-space: nowrap;
}

.portfolio-assistant__launcher-arrow {
    display: grid;
    width: 29px;
    height: 29px;
    place-items: center;
    color: #d8b4fe;
    background: rgba(255, 255, 255, 0.045);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 9px;
    font-size: 0.85rem;
    transition: color 180ms ease, background-color 180ms ease, transform 180ms ease;
}

.portfolio-assistant__launcher:hover .portfolio-assistant__launcher-arrow {
    color: #ffffff;
    background: rgba(168, 85, 247, 0.18);
    transform: translate(2px, -2px);
}

.portfolio-assistant__discovery {
    position: absolute;
    right: 0;
    bottom: 76px;
    width: max-content;
    max-width: min(270px, calc(100vw - 32px));
    padding: 0.68rem 0.84rem;
    color: #e4e4e7;
    background: rgba(21, 21, 25, 0.98);
    border: 1px solid rgba(216, 180, 254, 0.3);
    border-radius: 12px 12px 3px 12px;
    box-shadow: 0 16px 38px rgba(0, 0, 0, 0.42);
    font-size: 0.75rem;
    font-weight: 650;
    line-height: 1.35;
    letter-spacing: -0.01em;
    opacity: 0;
    transform: translateY(7px);
    pointer-events: none;
    transition: opacity 220ms ease, transform 220ms ease;
}

.portfolio-assistant__discovery::before {
    content: '';
    position: absolute;
    top: 0;
    right: 14px;
    left: 14px;
    height: 1px;
    background: linear-gradient(90deg, transparent, #a855f7, transparent);
}

.portfolio-assistant__discovery.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.portfolio-assistant__panel {
    position: absolute;
    right: 0;
    bottom: 0;
    display: flex;
    width: min(430px, calc(100vw - 32px));
    height: min(680px, calc(100dvh - 96px));
    min-height: 460px;
    overflow: hidden;
    flex-direction: column;
    color: var(--assistant-text);
    background: rgba(14, 14, 17, 0.985);
    border: 1px solid rgba(255, 255, 255, 0.13);
    border-radius: 24px 24px 7px 24px;
    box-shadow:
        0 34px 100px rgba(0, 0, 0, 0.68),
        0 0 0 1px rgba(168, 85, 247, 0.05),
        inset 0 1px 0 rgba(255, 255, 255, 0.06);
    opacity: 0;
    visibility: hidden;
    transform: translateY(18px) scale(0.97);
    transform-origin: bottom right;
    pointer-events: none;
    transition: opacity 210ms ease, transform 210ms ease, visibility 0s linear 210ms;
}

.portfolio-assistant__panel::before {
    content: '';
    position: absolute;
    z-index: 0;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.018) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.018) 1px, transparent 1px);
    background-size: 28px 28px;
    mask-image: linear-gradient(to bottom, black, transparent 72%);
    pointer-events: none;
}

.portfolio-assistant__panel::after {
    content: '';
    position: absolute;
    z-index: 3;
    top: 0;
    right: 28px;
    left: 28px;
    height: 1px;
    background: linear-gradient(90deg, transparent, #a855f7 38%, #67e8f9 64%, transparent);
    opacity: 0.9;
    pointer-events: none;
}

.portfolio-assistant__ambient {
    position: absolute;
    z-index: 0;
    top: -150px;
    right: -130px;
    width: 330px;
    height: 330px;
    background: radial-gradient(circle, rgba(168, 85, 247, 0.2), rgba(103, 232, 249, 0.035) 42%, transparent 68%);
    border-radius: 50%;
    filter: blur(3px);
    pointer-events: none;
    animation: portfolio-assistant-ambient 8s ease-in-out infinite alternate;
}

.portfolio-assistant.is-open .portfolio-assistant__panel {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
    pointer-events: auto;
    transition-delay: 0s;
}

.portfolio-assistant.is-open .portfolio-assistant__launcher {
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px) scale(0.94);
    pointer-events: none;
}

.portfolio-assistant__header,
.portfolio-assistant__conversation,
.portfolio-assistant__composer {
    position: relative;
    z-index: 1;
}

.portfolio-assistant__header {
    flex: 0 0 auto;
    background:
        linear-gradient(135deg, rgba(168, 85, 247, 0.09), transparent 54%),
        rgba(19, 19, 23, 0.94);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(18px);
}

.portfolio-assistant__header-row {
    display: flex;
    min-height: 84px;
    padding: 0.95rem 1rem 0.78rem;
    align-items: center;
    gap: 0.78rem;
}

.portfolio-assistant__avatar {
    position: relative;
    width: 48px;
    height: 48px;
    flex: 0 0 48px;
    padding: 2px;
    overflow: hidden;
    background: linear-gradient(145deg, #a855f7, #67e8f9);
    border-radius: 15px 15px 5px 15px;
    box-shadow: 0 10px 28px rgba(168, 85, 247, 0.22);
}

.portfolio-assistant__avatar img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border: 2px solid #151518;
    border-radius: 12px 12px 3px 12px;
}

.portfolio-assistant__identity {
    display: flex;
    min-width: 0;
    flex: 1;
    flex-direction: column;
}

.portfolio-assistant__identity-kicker {
    margin-bottom: 0.2rem;
    color: #a78bfa;
    font-size: 0.52rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    line-height: 1;
}

.portfolio-assistant__identity h2 {
    margin: 0 !important;
    color: #ffffff !important;
    font-size: 1.08rem !important;
    font-weight: 780 !important;
    line-height: 1.22 !important;
    letter-spacing: -0.025em !important;
    text-align: left !important;
    animation: none !important;
}

.portfolio-assistant__identity p {
    display: flex;
    margin: 0.28rem 0 0;
    align-items: center;
    gap: 0.38rem;
    color: #a1a1aa;
    font-size: 0.66rem;
    font-weight: 560;
    line-height: 1.25;
}

.portfolio-assistant__online-dot {
    position: relative;
    width: 7px;
    height: 7px;
    flex: 0 0 7px;
    background: var(--assistant-online);
    border-radius: 50%;
    box-shadow: 0 0 11px rgba(74, 222, 128, 0.86);
}

.portfolio-assistant__online-dot::after {
    content: '';
    position: absolute;
    inset: -4px;
    border: 1px solid rgba(74, 222, 128, 0.6);
    border-radius: inherit;
    animation: portfolio-assistant-online 2.1s ease-out infinite;
}

.portfolio-assistant__close {
    display: grid;
    width: 40px;
    height: 40px;
    padding: 0;
    flex: 0 0 40px;
    place-items: center;
    color: #a1a1aa;
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 12px;
    cursor: pointer;
    touch-action: manipulation;
    transition: color 180ms ease, background-color 180ms ease, border-color 180ms ease, transform 180ms ease;
}

.portfolio-assistant__close:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.085);
    border-color: rgba(255, 255, 255, 0.18);
    transform: rotate(3deg);
}

.portfolio-assistant__close svg,
.portfolio-assistant__send svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.portfolio-assistant__scope {
    display: grid;
    min-height: 34px;
    padding: 0 1rem;
    grid-template-columns: repeat(3, 1fr);
    align-items: center;
    color: #71717a;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.54rem;
    font-weight: 650;
    letter-spacing: 0.08em;
    text-align: center;
    text-transform: uppercase;
}

.portfolio-assistant__scope span + span {
    border-left: 1px solid rgba(255, 255, 255, 0.07);
}

.portfolio-assistant__conversation {
    display: flex;
    min-height: 0;
    padding: 0.88rem 0.95rem 0.8rem;
    flex: 1 1 auto;
    flex-direction: column;
    overflow-x: hidden;
    overflow-y: auto;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0.012), transparent 28%);
    overscroll-behavior: contain;
    scrollbar-color: #47474f transparent;
    scrollbar-width: thin;
    scroll-behavior: smooth;
}

.portfolio-assistant__conversation::-webkit-scrollbar {
    width: 6px;
}

.portfolio-assistant__conversation::-webkit-scrollbar-track {
    background: transparent;
}

.portfolio-assistant__conversation::-webkit-scrollbar-thumb {
    background: #45454d;
    border-radius: 999px;
}

.portfolio-assistant__thread-label {
    margin: 0 0 0.82rem 2.42rem;
    color: #666670;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.5rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    line-height: 1.3;
}

.portfolio-assistant__messages {
    display: flex;
    flex-direction: column;
    gap: 0.95rem;
}

.portfolio-assistant__message {
    display: flex;
    width: 100%;
    align-items: flex-end;
    gap: 0.56rem;
}

.portfolio-assistant__message--user {
    justify-content: flex-end;
}

.portfolio-assistant__message-avatar {
    display: block;
    width: 30px;
    height: 30px;
    flex: 0 0 30px;
    padding: 1px;
    overflow: hidden;
    background: linear-gradient(145deg, rgba(168, 85, 247, 0.95), rgba(103, 232, 249, 0.72));
    border-radius: 9px 9px 3px 9px;
}

.portfolio-assistant__message-avatar img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border: 1px solid #17171b;
    border-radius: 7px 7px 2px 7px;
}

.portfolio-assistant__bubble {
    position: relative;
    width: fit-content;
    max-width: 84%;
    padding: 0.82rem 0.9rem;
    overflow: hidden;
    color: #e4e4e7;
    background: rgba(28, 28, 33, 0.91);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 5px 16px 16px 16px;
    box-shadow: 0 11px 26px rgba(0, 0, 0, 0.15);
    overflow-wrap: anywhere;
}

.portfolio-assistant__message--assistant .portfolio-assistant__bubble::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 2px;
    background: linear-gradient(to bottom, #a855f7, rgba(103, 232, 249, 0.42));
}

.portfolio-assistant__message--user .portfolio-assistant__bubble {
    color: #ffffff;
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.08), transparent 44%),
        linear-gradient(145deg, #6d28d9, #9333ea);
    border-color: rgba(216, 180, 254, 0.28);
    border-radius: 16px 5px 16px 16px;
    box-shadow: 0 12px 30px rgba(126, 34, 206, 0.2);
}

.portfolio-assistant__bubble p {
    margin: 0;
    color: inherit;
    font-size: 0.81rem;
    line-height: 1.58;
    letter-spacing: -0.006em;
    text-align: left;
    white-space: pre-line;
}

.portfolio-assistant__actions {
    display: flex;
    margin-top: 0.75rem;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.portfolio-assistant__action {
    display: inline-flex;
    min-height: 34px;
    padding: 0.42rem 0.64rem;
    align-items: center;
    gap: 0.32rem;
    color: #f3e8ff;
    background: rgba(168, 85, 247, 0.09);
    border: 1px solid rgba(216, 180, 254, 0.3);
    border-radius: 9px 9px 3px 9px;
    font-size: 0.68rem;
    font-weight: 720;
    line-height: 1;
    text-decoration: none;
    transition: color 180ms ease, background-color 180ms ease, border-color 180ms ease, transform 180ms ease;
}

.portfolio-assistant__action::after {
    content: '↗';
    color: var(--assistant-accent-soft);
    font-size: 0.72rem;
}

.portfolio-assistant__action[href^='mailto:']::after {
    content: '→';
}

.portfolio-assistant__action:hover {
    color: #ffffff;
    background: rgba(168, 85, 247, 0.17);
    border-color: rgba(216, 180, 254, 0.54);
    transform: translateY(-1px);
}

.portfolio-assistant__typing {
    display: inline-flex;
    min-width: 42px;
    min-height: 18px;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.portfolio-assistant__typing-dot {
    width: 5px;
    height: 5px;
    background: #c4b5fd;
    border-radius: 2px;
    opacity: 0.34;
    animation: portfolio-assistant-typing 1.1s ease-in-out infinite;
}

.portfolio-assistant__typing-dot:nth-child(2) {
    animation-delay: 140ms;
}

.portfolio-assistant__typing-dot:nth-child(3) {
    animation-delay: 280ms;
}

.portfolio-assistant__suggestions {
    display: grid;
    margin: 0.92rem 0 0 2.42rem;
    padding-bottom: 0.18rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.48rem;
    counter-reset: assistant-prompt;
}

.portfolio-assistant__suggestions:empty {
    display: none;
}

.portfolio-assistant__suggestion {
    position: relative;
    display: grid;
    min-width: 0;
    min-height: 48px;
    padding: 0.58rem 1.95rem 0.58rem 0.62rem;
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: 0.45rem;
    color: #d4d4d8;
    background: rgba(28, 28, 33, 0.76);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px 12px 4px 12px;
    font-size: 0.66rem;
    font-weight: 620;
    line-height: 1.3;
    text-align: left;
    cursor: pointer;
    counter-increment: assistant-prompt;
    touch-action: manipulation;
    transition: color 180ms ease, background-color 180ms ease, border-color 180ms ease, transform 180ms ease;
}

.portfolio-assistant__suggestion::before {
    content: '0' counter(assistant-prompt);
    color: #a78bfa;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.55rem;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.portfolio-assistant__suggestion::after {
    content: '↗';
    position: absolute;
    right: 0.64rem;
    color: #71717a;
    font-size: 0.68rem;
    transition: color 180ms ease, transform 180ms ease;
}

.portfolio-assistant__suggestion:last-child:nth-child(odd) {
    grid-column: 1 / -1;
}

.portfolio-assistant__suggestion:hover {
    color: #ffffff;
    background: rgba(168, 85, 247, 0.1);
    border-color: rgba(192, 132, 252, 0.4);
    transform: translateY(-2px);
}

.portfolio-assistant__suggestion:hover::after {
    color: #d8b4fe;
    transform: translate(2px, -2px);
}

.portfolio-assistant__composer {
    padding: 0.72rem 0.82rem 0.68rem;
    flex: 0 0 auto;
    background: rgba(16, 16, 19, 0.97);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(16px);
}

.portfolio-assistant__composer-shell {
    display: flex;
    min-height: 50px;
    padding: 0.28rem 0.32rem 0.28rem 0.72rem;
    align-items: flex-end;
    gap: 0.5rem;
    background: rgba(7, 7, 9, 0.86);
    border: 1px solid rgba(255, 255, 255, 0.13);
    border-radius: 15px 15px 5px 15px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.025);
    transition: border-color 180ms ease, box-shadow 180ms ease, background-color 180ms ease;
}

.portfolio-assistant__composer-shell:focus-within {
    background: rgba(12, 12, 15, 0.98);
    border-color: rgba(192, 132, 252, 0.62);
    box-shadow: 0 0 0 3px rgba(168, 85, 247, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.portfolio-assistant__prompt-mark {
    display: grid;
    min-height: 42px;
    align-items: center;
    color: #a855f7;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 1.25rem;
    font-weight: 500;
}

.portfolio-assistant__input {
    width: 100%;
    min-height: 42px;
    max-height: 96px;
    padding: 0.66rem 0;
    flex: 1 1 auto;
    overflow-y: auto;
    color: #f4f4f5;
    caret-color: var(--assistant-cyan);
    background: transparent;
    border: 0;
    outline: 0;
    font-size: 0.79rem;
    line-height: 1.42;
    resize: none;
}

.portfolio-assistant__input::placeholder {
    color: #71717a;
    opacity: 1;
}

.portfolio-assistant__input:focus-visible {
    outline: 0;
}

.portfolio-assistant__send {
    display: grid;
    width: 42px;
    height: 42px;
    padding: 0;
    flex: 0 0 42px;
    place-items: center;
    color: #ffffff;
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.13), transparent 48%),
        linear-gradient(145deg, #7e22ce, #a855f7);
    border: 1px solid rgba(216, 180, 254, 0.24);
    border-radius: 12px 12px 4px 12px;
    box-shadow: 0 9px 24px rgba(168, 85, 247, 0.22);
    cursor: pointer;
    touch-action: manipulation;
    transition: opacity 180ms ease, filter 180ms ease, transform 180ms ease, box-shadow 180ms ease;
}

.portfolio-assistant__send:not(:disabled):hover {
    filter: brightness(1.12);
    box-shadow: 0 11px 30px rgba(168, 85, 247, 0.34);
    transform: translate(1px, -1px);
}

.portfolio-assistant__send:disabled {
    opacity: 0.28;
    box-shadow: none;
    cursor: not-allowed;
}

.portfolio-assistant__composer-note {
    display: flex;
    margin-top: 0.42rem;
    padding: 0 0.18rem;
    justify-content: space-between;
    color: #5d5d66;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.5rem;
    font-weight: 650;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.portfolio-assistant__sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

@keyframes portfolio-assistant-online {
    0% {
        opacity: 0.72;
        transform: scale(0.62);
    }
    75%,
    100% {
        opacity: 0;
        transform: scale(1.42);
    }
}

@keyframes portfolio-assistant-typing {
    0%,
    70%,
    100% {
        opacity: 0.3;
        transform: translateY(0) rotate(0deg);
    }
    35% {
        opacity: 1;
        transform: translateY(-3px) rotate(45deg);
    }
}

@keyframes portfolio-assistant-ambient {
    from {
        opacity: 0.72;
        transform: translate3d(0, 0, 0) scale(0.96);
    }
    to {
        opacity: 1;
        transform: translate3d(-18px, 14px, 0) scale(1.06);
    }
}

@media (max-width: 768px) {
    .portfolio-assistant {
        inset: var(--assistant-viewport-top, 0px) 0 auto 0;
        width: 100%;
        height: var(--assistant-viewport-height, 100dvh);
    }

    .portfolio-assistant__panel {
        top: auto;
        right: max(12px, env(safe-area-inset-right));
        bottom: max(12px, env(safe-area-inset-bottom));
        left: auto;
        width: min(430px, calc(100% - 24px));
        height: min(620px, calc(var(--assistant-viewport-height, 100dvh) - 112px));
        min-height: min(430px, calc(var(--assistant-viewport-height, 100dvh) - 112px));
        max-height: calc(var(--assistant-viewport-height, 100dvh) - 24px);
        background: #0e0e11;
        border-radius: 20px 20px 6px 20px;
        transform-origin: bottom right;
    }

    .portfolio-assistant__launcher {
        right: max(16px, env(safe-area-inset-right));
        bottom: max(16px, env(safe-area-inset-bottom));
        width: 58px;
        min-width: 58px;
        min-height: 58px;
        padding: 7px;
        grid-template-columns: 1fr;
        gap: 0;
        border-radius: 18px 18px 5px 18px;
    }

    .portfolio-assistant__discovery {
        display: none !important;
    }

    .portfolio-assistant__launcher::before,
    .portfolio-assistant__launcher-copy,
    .portfolio-assistant__launcher-arrow {
        display: none;
    }

    .portfolio-assistant__launcher-mark {
        width: 44px;
        height: 44px;
        justify-self: center;
        border-radius: 14px 14px 4px 14px;
    }

    .portfolio-assistant__conversation {
        padding: 0.9rem 0.85rem 0.78rem;
    }

    .portfolio-assistant__bubble {
        max-width: 88%;
    }

    .portfolio-assistant__close {
        width: 44px;
        height: 44px;
        flex-basis: 44px;
    }

    .portfolio-assistant__action {
        min-height: 44px;
    }

    .portfolio-assistant__suggestion {
        min-height: 50px;
    }

    .portfolio-assistant__input,
    .portfolio-assistant__bubble p {
        font-size: 0.84rem;
    }
}

@media (max-width: 420px) {
    .portfolio-assistant__panel {
        border-radius: 18px 18px 5px 18px;
    }

    .portfolio-assistant__header-row {
        min-height: 78px;
        padding: 0.78rem 0.78rem 0.66rem;
    }

    .portfolio-assistant__avatar {
        width: 44px;
        height: 44px;
        flex-basis: 44px;
    }

    .portfolio-assistant__scope {
        padding: 0 0.7rem;
        font-size: 0.5rem;
    }

    .portfolio-assistant__thread-label {
        margin-left: 2.25rem;
    }

    .portfolio-assistant__suggestions {
        margin-left: 0;
    }

    .portfolio-assistant__composer {
        padding-right: max(0.68rem, env(safe-area-inset-right));
        padding-bottom: max(0.62rem, env(safe-area-inset-bottom));
        padding-left: max(0.68rem, env(safe-area-inset-left));
    }
}

@media (max-width: 350px) {
    .portfolio-assistant__suggestions {
        grid-template-columns: 1fr;
    }

    .portfolio-assistant__suggestion:last-child:nth-child(odd) {
        grid-column: auto;
    }

    .portfolio-assistant__identity-kicker,
    .portfolio-assistant__composer-note {
        display: none;
    }
}

@media (min-width: 769px) and (max-height: 560px) {
    .portfolio-assistant__panel {
        height: calc(100dvh - 40px);
        min-height: 0;
    }
}

@media (max-width: 768px) and (max-height: 500px) {
    .portfolio-assistant__panel {
        height: calc(var(--assistant-viewport-height, 100dvh) - 24px);
        min-height: 0;
    }
}

@media (max-height: 500px) {
    .portfolio-assistant__scope,
    .portfolio-assistant__thread-label,
    .portfolio-assistant__composer-note {
        display: none;
    }

    .portfolio-assistant__header-row {
        min-height: 68px;
        padding-block: 0.58rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .portfolio-assistant *,
    .portfolio-assistant *::before,
    .portfolio-assistant *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        transition-delay: 0s !important;
    }

    .portfolio-assistant__launcher:hover,
    .portfolio-assistant__suggestion:hover,
    .portfolio-assistant__action:hover,
    .portfolio-assistant__send:not(:disabled):hover,
    .portfolio-assistant__close:hover {
        transform: none;
    }
}

@media (forced-colors: active) {
    .portfolio-assistant__panel,
    .portfolio-assistant__launcher,
    .portfolio-assistant__bubble,
    .portfolio-assistant__suggestion,
    .portfolio-assistant__composer-shell,
    .portfolio-assistant__send {
        border: 1px solid CanvasText;
    }
}
