/* ====================================================================
   Eter Iordanashvili — premium standalone UI
   Dark, gradient-rich, agent-color tinted. Mobile-first, no framework.
   ==================================================================== */

:root {
    --bg-0:     #07071a;
    --bg-1:     #0d0d24;
    --bg-2:     #131333;
    --line:     rgba(255, 255, 255, 0.08);
    --line-2:   rgba(255, 255, 255, 0.16);
    --ink:      #f8fafc;
    --ink-mut:  #94a3b8;
    --ink-dim:  #64748b;
    --brand:    #6366f1;
    --brand-2:  #8b5cf6;
    --brand-3:  #ec4899;
    --shadow:   0 30px 80px -20px rgba(0, 0, 0, 0.55);
    --radius:   24px;
    --ag-color: #6366f1; /* overridden per-agent */
    --maxw:     1200px;
}

/* Font stacks (single source of truth — used via var() everywhere)
   • --font-ui      → Noto Sans Georgian: body text, UI, labels
   • --font-display → Noto Serif Georgian: large editorial display (hero name, closing)
   • --font-latin   → PT Sans: Latin-only contexts, fallback for ASCII
*/
:root {
    --font-ui:      'Noto Sans Georgian', 'PT Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    --font-display: 'Noto Serif Georgian', 'Noto Sans Georgian', 'PT Sans', Georgia, serif;
    --font-latin:   'PT Sans', 'Noto Sans Georgian', system-ui, sans-serif;
}

/* Georgian descender-clip defense.
   Tight line-heights inside containers with overflow:hidden can chop the
   bottom of letters like ი, ლ, რ, ე, ც, ყ. Setting `leading-trim: normal`
   plus a tiny baseline pad keeps the glyph box intact even at line-height < 1.2. */
h1, h2, h3, h4, h5, h6, .ei-msg, .ei-chatpanel__lead, .ei-card__name, .ei-pitch__title {
    text-edge: cap alphabetic; /* progressive enhancement */
}

* { box-sizing: border-box; }
html, body { padding: 0; margin: 0; }
body {
    font-family: var(--font-ui);
    font-optical-sizing: auto;
    font-variation-settings: "wdth" 100;
    background: radial-gradient(ellipse at 20% -10%, rgba(99, 102, 241, 0.28), transparent 60%),
                radial-gradient(ellipse at 90% 0%, rgba(236, 72, 153, 0.18), transparent 55%),
                radial-gradient(ellipse at 50% 110%, rgba(139, 92, 246, 0.22), transparent 60%),
                var(--bg-0);
    color: var(--ink);
    min-height: 100vh;
    line-height: 1.55;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
img { display: block; max-width: 100%; }

/* ──────────── Agent dock — integrated left column on desktop, bottom dock on mobile ──────────── */
.ei-dock {
    position: fixed;
    z-index: 80;
    pointer-events: none;
}
.ei-dock__inner {
    pointer-events: auto;
    display: flex;
    background: rgba(7, 7, 26, 0.5);
    backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
    border-right: 1px solid var(--line);
    transition: width 280ms cubic-bezier(0.32, 0.72, 0, 1);
}

/* Toggle button (chevron) — subtle, integrated */
.ei-dock__toggle {
    position: relative;
    flex: none;
    width: 100%; height: 32px;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--ink-dim);
    border-radius: 8px;
    display: grid; place-items: center;
    cursor: pointer;
    transition: background 180ms ease, color 180ms ease;
}
.ei-dock__toggle:hover { background: rgba(255, 255, 255, 0.05); color: var(--ink); }
.ei-dock__chev { width: 16px; height: 16px; transition: transform 280ms cubic-bezier(0.32, 0.72, 0, 1); }
.ei-dock.is-expanded .ei-dock__chev { transform: rotate(180deg); }

.ei-dock__btn {
    position: relative;
    display: flex; align-items: center; gap: 12px;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--ink);
    cursor: pointer;
    border-radius: 14px;
    transition: background 180ms ease;
}
.ei-dock__avatar {
    flex: none;
    display: grid; place-items: center;
    width: 48px; height: 48px;
    border-radius: 14px;
    background: color-mix(in srgb, var(--ag-color) 18%, transparent);
    border: 1px solid color-mix(in srgb, var(--ag-color) 40%, transparent);
    color: var(--ag-color);
    transition: background 200ms ease, border-color 200ms ease, box-shadow 200ms ease;
}
.ei-dock__avatar svg { width: 22px; height: 22px; }
.ei-dock__btn:hover .ei-dock__avatar {
    background: color-mix(in srgb, var(--ag-color) 35%, transparent);
    border-color: color-mix(in srgb, var(--ag-color) 70%, transparent);
    box-shadow: 0 0 0 6px color-mix(in srgb, var(--ag-color) 12%, transparent);
}
/* Active = currently selected agent (driven by JS) */
.ei-dock__btn.is-active .ei-dock__avatar {
    background: color-mix(in srgb, var(--ag-color) 45%, transparent);
    border-color: var(--ag-color);
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--ag-color) 18%, transparent),
                0 8px 24px -6px color-mix(in srgb, var(--ag-color) 60%, transparent);
}
.ei-dock__btn.is-active::before {
    content: '';
    position: absolute;
    left: -10px; top: 50%; transform: translateY(-50%);
    width: 4px; height: 22px;
    border-radius: 4px;
    background: var(--ag-color);
    box-shadow: 0 0 12px var(--ag-color);
}

.ei-dock__label {
    display: flex; flex-direction: column;
    text-align: left;
    line-height: 1.2;
}
.ei-dock__name {
    font-family: var(--font-ui);
    font-size: 13px; font-weight: 800;
    letter-spacing: -0.01em;
    color: var(--ink);
}
.ei-dock__role {
    font-size: 10px; font-weight: 700;
    letter-spacing: 0.1em; text-transform: uppercase;
    color: var(--ink-mut);
    margin-top: 2px;
}
.ei-dock__btn--main .ei-dock__avatar {
    background: linear-gradient(135deg, color-mix(in srgb, var(--ag-color) 35%, transparent), color-mix(in srgb, var(--brand-3) 25%, transparent));
    border-color: color-mix(in srgb, var(--ag-color) 65%, transparent);
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--ag-color) 10%, transparent);
}

/* Separator between agents and the Saved-Ideas utility button */
.ei-dock__sep {
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--line-2), transparent);
    margin: 4px 0;
    flex: none;
}

/* Saved Ideas dock button — distinct (amber) accent */
.ei-dock__btn--saved .ei-dock__avatar {
    position: relative;
    background: linear-gradient(135deg,
        color-mix(in srgb, var(--ag-color) 30%, transparent),
        color-mix(in srgb, var(--ag-color) 8%, transparent));
}
/* Count badge — number of saved ideas */
.ei-dock__count {
    position: absolute;
    top: -6px; right: -6px;
    min-width: 18px; height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    background: linear-gradient(135deg, #ef4444, #ec4899);
    color: #fff;
    font-size: 10px; font-weight: 800;
    line-height: 18px;
    display: inline-flex; align-items: center; justify-content: center;
    box-shadow: 0 0 0 2px var(--bg-1), 0 4px 10px -2px rgba(239, 68, 68, 0.6);
}

/* ─────── Desktop: dock attached to chat panel's LEFT edge (right side stack) ─────── */
@media (min-width: 900px) {
    .ei-dock {
        right: 400px;       /* sits flush against the chat panel's left edge */
        left: auto;
        top: 0; bottom: 0;
    }
    .ei-dock__inner {
        flex-direction: column;
        gap: 10px;
        padding: 20px 14px;
        border-radius: 0;
        border-left: 1px solid var(--line);  /* separator from page content (LEFT side now) */
        border-right: 0;                      /* attached to chat — no separator on right */
        width: 76px;
        height: 100%;
        box-shadow: none;
        overflow: visible;                    /* no internal scrollbars — content fits */
        align-items: stretch;
    }
    .ei-dock__toggle { width: 100%; height: 36px; margin-bottom: 4px; }
    .ei-dock__btn { width: 100%; }

    /* COLLAPSED: tooltip-style label on hover */
    .ei-dock:not(.is-expanded) .ei-dock__label {
        position: absolute;
        left: calc(100% + 12px);
        top: 50%; transform: translateY(-50%) translateX(-6px);
        background: rgba(7, 7, 26, 0.95);
        border: 1px solid var(--line-2);
        -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
        padding: 8px 14px;
        border-radius: 12px;
        white-space: nowrap;
        opacity: 0; pointer-events: none;
        transition: opacity 180ms ease, transform 180ms ease;
        box-shadow: 0 12px 32px -10px rgba(0, 0, 0, 0.5);
        z-index: 5;
    }
    .ei-dock:not(.is-expanded) .ei-dock__btn:hover .ei-dock__label,
    .ei-dock:not(.is-expanded) .ei-dock__btn:focus-visible .ei-dock__label {
        opacity: 1;
        transform: translateY(-50%) translateX(0);
    }

    /* EXPANDED: dock widens, labels shown inline next to icons */
    .ei-dock.is-expanded .ei-dock__inner { width: 240px; }
    .ei-dock.is-expanded .ei-dock__btn {
        padding: 0 12px 0 0;
    }
    .ei-dock.is-expanded .ei-dock__label {
        position: static;
        opacity: 1;
        background: transparent;
        border: 0;
        padding: 0;
        box-shadow: none;
        backdrop-filter: none;
        white-space: normal;
        flex: 1;
        transform: none;
        pointer-events: none;
    }
    .ei-dock.is-expanded .ei-dock__btn:hover { background: rgba(255, 255, 255, 0.04); }

    /* The chat panel sits next to the dock (handled in its own block below).
       Page content is offset for both via .ei-page margin-left.
       Body itself stays unpadded so top bar / chat panel can pin to viewport edges. */
}

/* ─────── Mobile/tablet: horizontal dock pinned to bottom ─────── */
@media (max-width: 899px) {
    .ei-dock {
        left: 0; right: 0;
        bottom: 0;
        padding: 8px 8px 12px;
    }
    .ei-dock__inner {
        flex-direction: row;
        gap: 6px;
        padding: 8px;
        border-radius: 20px;
        align-items: center;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    .ei-dock__toggle { display: none; } /* On mobile, expansion is implicit (horizontal scroll) */
    .ei-dock__btn { flex: 0 0 auto; }
    .ei-dock__avatar { width: 44px; height: 44px; border-radius: 12px; }
    .ei-dock__avatar svg { width: 20px; height: 20px; }
    .ei-dock__label { display: none; }
    .ei-dock__btn.is-active::before {
        left: 50%; top: -12px; transform: translateX(-50%);
        width: 22px; height: 4px;
    }
    body { padding-bottom: 84px; }
}

/* ──────── Visitor lock state — non-main agents in visitor mode ──────── */
.ei-dock__avatar { position: relative; }   /* anchor for lock + count badges */

.ei-dock__btn.is-locked .ei-dock__avatar {
    filter: grayscale(0.65) brightness(0.78);
    opacity: 0.65;
}
.ei-dock__btn.is-locked:hover .ei-dock__avatar {
    filter: grayscale(0.4) brightness(0.9);
    opacity: 0.9;
}
.ei-dock__btn.is-locked .ei-dock__role {
    color: rgba(248, 113, 113, 0.7);
    font-weight: 700;
}
.ei-dock__lock {
    position: absolute;
    bottom: -3px; right: -3px;
    width: 18px; height: 18px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ef4444, #f59e0b);
    color: #fff;
    display: grid; place-items: center;
    box-shadow: 0 0 0 2px var(--bg-1), 0 4px 8px -2px rgba(239, 68, 68, 0.6);
}
.ei-dock__lock svg { width: 9px; height: 9px; }

.ei-army__cell.is-locked .ei-army__avatar {
    filter: grayscale(0.6) brightness(0.75);
    opacity: 0.65;
    animation: none;  /* stop the bob — locked agents are inert */
}
.ei-army__cell.is-locked .ei-army__halo {
    opacity: 0.15 !important;
    animation: none;
}
.ei-army__cell.is-locked:hover .ei-army__avatar {
    transform: translateY(-4px) scale(1.02);
    filter: grayscale(0.3) brightness(0.95);
    opacity: 0.9;
}
.ei-army__cell.is-locked .ei-army__name { color: var(--ink-mut); }
.ei-army__cell.is-locked .ei-army__tag {
    color: rgba(248, 113, 113, 0.8);
    font-weight: 800;
}
.ei-army__lock {
    position: absolute;
    bottom: -4px; right: -4px;
    width: 22px; height: 22px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ef4444, #f59e0b);
    color: #fff;
    display: grid; place-items: center;
    box-shadow: 0 0 0 2px var(--bg-0), 0 6px 12px -2px rgba(239, 68, 68, 0.55);
}
.ei-army__lock svg { width: 11px; height: 11px; }

.ei-card.is-locked {
    filter: grayscale(0.5);
    opacity: 0.75;
}
.ei-card.is-locked:hover {
    filter: grayscale(0.2);
    opacity: 0.95;
    transform: translateY(-2px);
}
.ei-card.is-locked .ei-card__cta {
    color: rgba(248, 113, 113, 0.9);
}
.ei-card.is-locked .ei-card__halo {
    opacity: 0.08;
}
.ei-card__lock {
    position: absolute;
    top: -8px; right: -8px;
    width: 28px; height: 28px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ef4444, #f59e0b);
    color: #fff;
    display: grid; place-items: center;
    box-shadow: 0 0 0 3px var(--bg-1), 0 8px 18px -4px rgba(239, 68, 68, 0.55);
    animation: ei-pulse 2.4s ease-in-out infinite;
}
.ei-card__lock svg { width: 14px; height: 14px; }
.ei-card__icon {
    position: relative;  /* anchor for the lock badge */
}

/* ════════════════════════════════════════════════════════════════════
   PERSISTENT CHAT PANEL — full-height, between dock and content (desktop)
   On mobile it becomes a regular section that flows above the hero.
   ════════════════════════════════════════════════════════════════════ */
.ei-chatpanel {
    --panel-w: 400px;
    background: linear-gradient(180deg,
        color-mix(in srgb, var(--ag-color) 12%, var(--bg-1)) 0%,
        var(--bg-1) 35%);
    border-left: 1px solid var(--line);
    display: flex; flex-direction: column;
    z-index: 70;
}
.ei-chatpanel__head {
    display: flex; align-items: center; gap: 14px;
    padding: 22px 22px 18px;
    border-bottom: 1px solid var(--line);
    background: linear-gradient(180deg,
        color-mix(in srgb, var(--ag-color) 18%, transparent) 0%,
        transparent 100%);
}
.ei-chatpanel__avatar {
    flex: none;
    width: 56px; height: 56px;
    border-radius: 18px;
    display: grid; place-items: center;
    background: linear-gradient(135deg,
        color-mix(in srgb, var(--ag-color) 35%, transparent),
        color-mix(in srgb, var(--ag-color) 12%, transparent));
    border: 1px solid color-mix(in srgb, var(--ag-color) 55%, transparent);
    color: var(--ag-color);
    box-shadow: 0 12px 28px -8px color-mix(in srgb, var(--ag-color) 60%, transparent);
    transition: background 280ms ease, border-color 280ms ease, color 280ms ease, box-shadow 280ms ease;
}
.ei-chatpanel__avatar svg { width: 28px; height: 28px; }
.ei-chatpanel__id { flex: 1; min-width: 0; }
.ei-chatpanel__role {
    font-size: 10px; font-weight: 700;
    letter-spacing: 0.18em; text-transform: uppercase;
    color: color-mix(in srgb, var(--ag-color) 80%, white);
    margin-bottom: 4px;
}
.ei-chatpanel__name {
    font-family: var(--font-ui);
    font-size: 18px; font-weight: 800;
    letter-spacing: -0.01em;
    color: var(--ink);
}
.ei-chatpanel__live {
    flex: none;
    display: inline-flex; align-items: center; gap: 6px;
    font-size: 9px; font-weight: 700;
    letter-spacing: 0.16em;
    color: var(--ink-mut);
    padding: 4px 8px;
    border-radius: 999px;
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.25);
}
.ei-chatpanel__live span {
    width: 6px; height: 6px; border-radius: 50%;
    background: #22c55e;
    box-shadow: 0 0 6px #22c55e;
    animation: ei-pulse 1.6s ease-in-out infinite;
}

.ei-chatpanel__intro {
    padding: 20px 22px 16px;
    border-bottom: 1px solid var(--line);
}
.ei-chatpanel__lead {
    font-family: var(--font-ui);
    font-size: 17px; font-weight: 800;
    letter-spacing: -0.01em;
    line-height: 1.3;
    margin: 0 0 8px;
    color: var(--ink);
}
.ei-chatpanel__body {
    font-size: 13.5px;
    color: var(--ink-mut);
    line-height: 1.55;
    margin: 0;
}

.ei-chatpanel__thread {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 18px 22px;
    display: flex; flex-direction: column; gap: 12px;
}
.ei-chatpanel__thread::-webkit-scrollbar { width: 6px; }
.ei-chatpanel__thread::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 3px;
}
.ei-chatpanel__thread::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, 0.18); }

.ei-chatpanel__form {
    display: flex; gap: 10px;
    padding: 14px 16px;
    border-top: 1px solid var(--line);
    background: rgba(0, 0, 0, 0.25);
}
.ei-chatpanel__input {
    flex: 1; min-width: 0;
    padding: 13px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--line-2);
    border-radius: 12px;
    color: var(--ink);
    font-size: 14px;
    transition: border-color 180ms ease, box-shadow 180ms ease;
}
.ei-chatpanel__input:focus {
    outline: none;
    border-color: var(--ag-color);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--ag-color) 25%, transparent);
}
.ei-chatpanel__input::placeholder { color: var(--ink-dim); }
.ei-chatpanel__send {
    width: 44px; height: 44px;
    flex: none;
    border: 0; border-radius: 12px;
    background: var(--ag-color);
    color: #fff;
    display: grid; place-items: center;
    transition: filter 150ms ease, transform 150ms ease, background 280ms ease;
}
.ei-chatpanel__send svg { width: 18px; height: 18px; }
.ei-chatpanel__send:hover { filter: brightness(1.12); transform: scale(1.04); }
.ei-chatpanel__send:disabled { opacity: 0.55; cursor: progress; }

/* ── Desktop: chat panel + dock both pinned to the right ── */
@media (min-width: 900px) {
    .ei-chatpanel {
        position: fixed;
        right: 0;
        top: 0; bottom: 0;
        width: var(--panel-w);
        border-left: 0;             /* dock provides the left separator now (they're attached) */
        transition: background 280ms ease;
    }

    /* Page content sits to the LEFT of the dock+chat stack */
    .ei-page {
        margin-left: 0;
        margin-right: calc(76px + 400px);   /* dock + chat */
        transition: margin-right 280ms cubic-bezier(0.32, 0.72, 0, 1);
    }
    body.dock-expanded .ei-page {
        margin-right: calc(240px + 400px);
    }
    /* (dock width transition handled by .ei-dock.is-expanded — see dock styles above) */
}

/* ── Mobile: chat panel becomes a regular full-width section above content ── */
@media (max-width: 899px) {
    .ei-chatpanel {
        position: relative;
        width: 100%;
        border-left: 0;
        border-bottom: 1px solid var(--line);
    }
    .ei-chatpanel__thread { max-height: 360px; }
    .ei-page { margin-left: 0; margin-right: 0; }
}

/* ──────────── Top bar ──────────── */
.ei-top {
    position: sticky; top: 0; z-index: 50;
    display: flex; align-items: center; justify-content: space-between;
    padding: 18px 24px;
    background: rgba(7, 7, 26, 0.65);
    backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--line);
}
.ei-top__brand { display: flex; align-items: center; gap: 12px; }
.ei-top__name  { font-weight: 700; font-size: 14px; letter-spacing: -0.01em; }
.ei-dot {
    width: 10px; height: 10px; border-radius: 50%;
    background: #22d3ee;
    box-shadow: 0 0 0 0 rgba(34, 211, 238, 0.55);
    animation: ei-pulse 2s ease-in-out infinite;
}
@keyframes ei-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(34, 211, 238, 0.55); }
    50%      { box-shadow: 0 0 0 12px rgba(34, 211, 238, 0); }
}
.ei-lang {
    font-size: 12px; font-weight: 700; letter-spacing: 0.12em;
    padding: 8px 14px; border: 1px solid var(--line-2);
    border-radius: 999px; transition: background 150ms ease, border-color 150ms ease;
}
.ei-lang:hover { background: rgba(255, 255, 255, 0.06); border-color: rgba(255, 255, 255, 0.25); }

/* ── Auth pill (top bar) ── */
.ei-top__actions { display: flex; align-items: center; gap: 8px; }
.ei-auth-pill {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 7px 14px;
    border: 1px solid var(--line-2);
    background: rgba(255, 255, 255, 0.04);
    color: var(--ink);
    border-radius: 999px;
    font-size: 12px; font-weight: 700; letter-spacing: 0.04em;
    cursor: pointer;
    transition: background 150ms ease, border-color 150ms ease, color 150ms ease;
}
.ei-auth-pill svg { width: 14px; height: 14px; }
.ei-auth-pill:hover {
    background: rgba(99, 102, 241, 0.14);
    border-color: rgba(99, 102, 241, 0.5);
    color: #c7d2fe;
}
.ei-auth-pill--on {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.18), rgba(99, 102, 241, 0.14));
    border-color: rgba(34, 197, 94, 0.5);
    color: #86efac;
    cursor: default;
}
.ei-auth-pill--on:hover { background: linear-gradient(135deg, rgba(34, 197, 94, 0.22), rgba(99, 102, 241, 0.18)); }
.ei-auth-pill__logout {
    display: inline-grid; place-items: center;
    width: 22px; height: 22px;
    margin-left: 4px;
    border: 0; background: transparent;
    color: inherit; opacity: 0.7;
    border-radius: 6px;
    cursor: pointer;
    transition: opacity 150ms ease, background 150ms ease;
}
.ei-auth-pill__logout svg { width: 12px; height: 12px; }
.ei-auth-pill__logout:hover { opacity: 1; background: rgba(255, 255, 255, 0.1); }

/* ── Login modal ── */
.ei-login {
    position: fixed; inset: 0; z-index: 220;
    display: none;
    align-items: center; justify-content: center;
    padding: 24px;
}
.ei-login.is-open { display: flex; }
.ei-login__bd {
    position: absolute; inset: 0;
    background: rgba(3, 7, 18, 0.78);
    backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
}
.ei-login__card {
    position: relative;
    width: 100%; max-width: 420px;
    background: linear-gradient(180deg, color-mix(in srgb, var(--brand) 8%, var(--bg-1)), var(--bg-1) 60%);
    border: 1px solid var(--line-2);
    border-radius: 22px;
    padding: 36px 28px 28px;
    box-shadow: 0 32px 72px -12px rgba(0,0,0,0.7);
    transform: scale(0.96); opacity: 0;
    animation: ei-login-in 280ms cubic-bezier(0.32, 1.32, 0.5, 1) forwards;
}
@keyframes ei-login-in {
    to { transform: scale(1); opacity: 1; }
}
.ei-login__close {
    position: absolute; top: 14px; right: 14px;
    width: 36px; height: 36px;
    border: 0; background: transparent;
    color: var(--ink-mut);
    border-radius: 10px;
    display: grid; place-items: center;
    cursor: pointer;
    transition: background 150ms ease, color 150ms ease;
}
.ei-login__close svg { width: 18px; height: 18px; }
.ei-login__close:hover { background: rgba(255,255,255,0.06); color: var(--ink); }

.ei-login__head { text-align: center; margin-bottom: 22px; }
.ei-login__icon {
    width: 56px; height: 56px;
    margin: 0 auto 14px;
    border-radius: 16px;
    display: grid; place-items: center;
    background: linear-gradient(135deg, color-mix(in srgb, var(--brand) 35%, transparent), color-mix(in srgb, var(--brand-3) 22%, transparent));
    border: 1px solid color-mix(in srgb, var(--brand) 60%, transparent);
    color: #fff;
    box-shadow: 0 12px 28px -8px color-mix(in srgb, var(--brand) 60%, transparent);
}
.ei-login__icon svg { width: 26px; height: 26px; }
.ei-login__title {
    font-family: var(--font-display);
    font-size: 22px; font-weight: 700;
    margin: 0 0 8px;
    color: var(--ink);
}
.ei-login__sub {
    font-size: 13px; color: var(--ink-mut);
    margin: 0;
}

.ei-login__form { display: flex; flex-direction: column; gap: 14px; }
.ei-login__field {
    display: flex; flex-direction: column; gap: 6px;
}
.ei-login__field span {
    font-size: 11px; font-weight: 700;
    letter-spacing: 0.16em; text-transform: uppercase;
    color: var(--ink-mut);
}
.ei-login__field input {
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--line-2);
    color: var(--ink);
    border-radius: 12px;
    font-size: 14px;
    font-family: var(--font-ui);
    transition: border-color 180ms ease, box-shadow 180ms ease;
}
.ei-login__field input:focus {
    outline: none;
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.18);
}

.ei-login__err {
    font-size: 12px;
    color: #fca5a5;
    min-height: 16px;
    text-align: center;
    font-weight: 600;
}
.ei-login__submit {
    margin-top: 4px;
    padding: 14px 20px;
    background: linear-gradient(135deg, var(--brand), var(--brand-2));
    color: #fff;
    border: 0; border-radius: 12px;
    font-size: 14px; font-weight: 800;
    letter-spacing: 0.04em;
    cursor: pointer;
    transition: filter 150ms ease, transform 150ms ease;
    box-shadow: 0 12px 28px -8px rgba(99, 102, 241, 0.5);
}
.ei-login__submit:hover { filter: brightness(1.1); transform: translateY(-1px); }
.ei-login__submit:disabled { opacity: 0.55; cursor: progress; }

.ei-login__hint {
    margin: 16px 0 0;
    text-align: center;
    font-size: 11px;
    color: var(--ink-dim);
    font-style: italic;
}

/* ── Visitor banner inside chat panel ── */
.ei-chatpanel__visitor {
    margin-top: 16px;
    padding: 14px 14px 12px 16px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.12), rgba(99, 102, 241, 0.08));
    border: 1px solid rgba(245, 158, 11, 0.3);
    display: flex; gap: 12px;
    color: var(--ink);
}
.ei-chatpanel__visitor svg {
    width: 22px; height: 22px;
    flex: none;
    color: #fcd34d;
    margin-top: 2px;
}
.ei-chatpanel__visitor div { flex: 1; min-width: 0; }
.ei-chatpanel__visitor strong {
    display: block;
    font-size: 12px; font-weight: 800;
    letter-spacing: 0.08em;
    color: #fcd34d;
    margin-bottom: 4px;
    text-transform: uppercase;
}
.ei-chatpanel__visitor span {
    display: block;
    font-size: 12.5px;
    line-height: 1.5;
    color: var(--ink-mut);
    margin-bottom: 8px;
}
.ei-chatpanel__visitor-cta {
    padding: 6px 14px;
    background: linear-gradient(135deg, var(--brand), var(--brand-2));
    color: #fff;
    border: 0; border-radius: 8px;
    font-size: 11px; font-weight: 800;
    letter-spacing: 0.06em;
    cursor: pointer;
    transition: filter 150ms ease;
}
.ei-chatpanel__visitor-cta:hover { filter: brightness(1.12); }

/* ──────────── Hero ──────────── */
.ei-hero {
    position: relative;
    padding: 64px 24px 48px;
    overflow: hidden;
}
.ei-hero__glow {
    position: absolute; pointer-events: none; filter: blur(80px); opacity: 0.7;
    border-radius: 50%;
}
.ei-hero__glow--a { width: 480px; height: 480px; background: var(--brand);   top: -120px; left: -120px; }
.ei-hero__glow--b { width: 420px; height: 420px; background: var(--brand-3); top: 60px;  right: -100px; }

.ei-hero__inner {
    position: relative; z-index: 2;
    max-width: var(--maxw); margin: 0 auto;
    display: grid; grid-template-columns: 1fr; gap: 40px;
    align-items: center;
}
@media (min-width: 768px) {
    .ei-hero__inner { grid-template-columns: 1.3fr 0.9fr; gap: 56px; }
    .ei-hero       { padding: 96px 32px 80px; }
}

.ei-badge {
    display: inline-flex; align-items: center; gap: 10px;
    padding: 8px 16px; border-radius: 999px;
    background: rgba(99, 102, 241, 0.15);
    border: 1px solid rgba(99, 102, 241, 0.4);
    color: #c7d2fe;
    font-size: 12px; font-weight: 600; letter-spacing: 0.04em;
    margin-bottom: 24px;
}
.ei-badge__pulse {
    width: 8px; height: 8px; border-radius: 50%;
    background: #a5b4fc;
    box-shadow: 0 0 8px rgba(165, 180, 252, 0.8);
    animation: ei-pulse 1.6s ease-in-out infinite;
}
.ei-hero__name {
    font-family: var(--font-display); /* Noto Serif Georgian — editorial accent */
    font-size: clamp(38px, 7vw, 80px);
    font-weight: 700;
    letter-spacing: -0.015em;
    line-height: 1.22;       /* loose enough for Georgian descenders (ლ, ი, რ, ე) */
    margin: 0 0 16px;
    padding-bottom: 0.08em;  /* extra safety pad — keeps the bottom of letters visible
                                 even if a parent has overflow: hidden */
    background: linear-gradient(135deg, #ffffff 0%, #c7d2fe 50%, #f0abfc 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.ei-hero__sub {
    font-size: clamp(15px, 1.6vw, 19px);
    color: var(--ink-mut);
    max-width: 520px;
    margin: 0;
}

.ei-hero__portrait {
    position: relative;
    width: min(360px, 80%);
    aspect-ratio: 1 / 1;
    margin: 0 auto;
    border-radius: 50%;
    overflow: hidden;
}
.ei-hero__portrait img { width: 100%; height: 100%; object-fit: cover; }
.ei-hero__portrait-ring {
    position: absolute; inset: -6px;
    border-radius: 50%;
    background: conic-gradient(from 90deg, var(--brand), var(--brand-2), var(--brand-3), var(--brand));
    z-index: -1;
    animation: ei-spin 18s linear infinite;
    filter: blur(2px);
}
@keyframes ei-spin { to { transform: rotate(360deg); } }
.ei-hero__portrait--placeholder {
    display: grid; place-items: center;
    background: linear-gradient(135deg, var(--bg-1), var(--bg-2));
    color: rgba(255, 255, 255, 0.45);
    font-family: var(--font-ui);
    font-size: clamp(80px, 18vw, 180px);
    font-weight: 800;
}

/* (legacy .ei-main inline block — replaced by the persistent .ei-chatpanel above) */

/* ──────────── AI Army row (in the hero) ──────────── */
.ei-army {
    position: relative;
    max-width: 1100px;
    margin: 56px auto 0;
    padding: 0 12px;
}
@media (min-width: 768px) { .ei-army { margin-top: 72px; padding: 0 24px; } }

.ei-army__head {
    text-align: center;
    margin-bottom: 22px;
    display: flex; flex-direction: column; gap: 4px; align-items: center;
}
.ei-army__kicker {
    font-family: var(--font-ui);
    font-size: 11px; font-weight: 800;
    letter-spacing: 0.28em; text-transform: uppercase;
    background: linear-gradient(90deg, #c7d2fe, #f0abfc);
    -webkit-background-clip: text; background-clip: text; color: transparent;
}
.ei-army__sub {
    font-size: 11px; font-weight: 600;
    color: var(--ink-mut);
    letter-spacing: 0.06em;
}

/* Decorative animated rail behind the avatars */
.ei-army__rail {
    position: absolute;
    top: 90px;                          /* lines up with avatar centers (head + 38px) */
    left: 8%; right: 8%;
    height: 1px;
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(99, 102, 241, 0.6) 20%,
        rgba(236, 72, 153, 0.6) 50%,
        rgba(99, 102, 241, 0.6) 80%,
        transparent 100%);
    pointer-events: none;
    animation: ei-army-rail 5s ease-in-out infinite;
    z-index: 0;
}
@keyframes ei-army-rail {
    0%, 100% { opacity: 0.35; }
    50%      { opacity: 0.75; }
}

.ei-army__list {
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 8px;
    z-index: 1;
}

.ei-army__cell {
    flex: 1;
    min-width: 0;
    display: flex; flex-direction: column; align-items: center;
    gap: 8px;
    padding: 4px 4px 8px;
    background: transparent;
    border: 0;
    color: var(--ink);
    cursor: pointer;
    text-align: center;
    animation: ei-army-in 700ms cubic-bezier(0.32, 1.56, 0.64, 1) both;
    animation-delay: calc(0.1s * var(--i));
    transition: transform 220ms cubic-bezier(0.32, 1.56, 0.64, 1);
}
@keyframes ei-army-in {
    0%   { opacity: 0; transform: translateY(28px) scale(0.85); }
    60%  { opacity: 1; transform: translateY(-4px) scale(1.04); }
    100% { opacity: 1; transform: translateY(0) scale(1); }
}

.ei-army__avatar {
    position: relative;
    width: 76px; height: 76px;
    border-radius: 22px;
    display: grid; place-items: center;
    background: linear-gradient(135deg,
        color-mix(in srgb, var(--ag-color) 38%, transparent),
        color-mix(in srgb, var(--ag-color) 12%, transparent) 70%);
    border: 1px solid color-mix(in srgb, var(--ag-color) 55%, transparent);
    color: var(--ag-color);
    box-shadow: 0 12px 30px -10px color-mix(in srgb, var(--ag-color) 70%, transparent);
    animation: ei-army-bob 4.5s ease-in-out infinite;
    animation-delay: calc(0.4s * var(--i));
    transition: transform 240ms ease, border-color 240ms ease, box-shadow 240ms ease;
    z-index: 2;
}
.ei-army__avatar svg { width: 32px; height: 32px; position: relative; z-index: 2; }

@keyframes ei-army-bob {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-6px); }
}

/* Soft animated halo glow behind each avatar */
.ei-army__halo {
    position: absolute;
    inset: -6px;
    border-radius: 28px;
    background: radial-gradient(circle, color-mix(in srgb, var(--ag-color) 50%, transparent) 0%, transparent 65%);
    opacity: 0.4;
    z-index: 1;
    filter: blur(8px);
    animation: ei-army-halo 3s ease-in-out infinite;
    animation-delay: calc(0.3s * var(--i));
}
@keyframes ei-army-halo {
    0%, 100% { opacity: 0.25; transform: scale(1); }
    50%      { opacity: 0.55; transform: scale(1.08); }
}

/* The Strategist (Director) — slightly larger + spinning halo */
.ei-army__cell--main .ei-army__avatar {
    width: 86px; height: 86px;
    border-radius: 26px;
    background: linear-gradient(135deg,
        color-mix(in srgb, var(--ag-color) 42%, transparent),
        color-mix(in srgb, #ec4899 28%, transparent) 100%);
    border-color: color-mix(in srgb, var(--ag-color) 70%, transparent);
}
.ei-army__cell--main .ei-army__avatar svg { width: 38px; height: 38px; }
.ei-army__cell--main .ei-army__halo {
    inset: -10px;
    background: conic-gradient(
        color-mix(in srgb, var(--ag-color) 60%, transparent),
        rgba(236, 72, 153, 0.5),
        color-mix(in srgb, var(--ag-color) 60%, transparent));
    opacity: 0.45;
    animation: ei-army-spin 9s linear infinite, ei-army-halo 3s ease-in-out infinite;
}
@keyframes ei-army-spin {
    to { transform: rotate(360deg); }
}

/* Hover — lift + intensify glow */
.ei-army__cell:hover .ei-army__avatar {
    transform: translateY(-10px) scale(1.06);
    border-color: var(--ag-color);
    box-shadow: 0 22px 50px -10px color-mix(in srgb, var(--ag-color) 80%, transparent),
                0 0 0 4px color-mix(in srgb, var(--ag-color) 22%, transparent);
}
.ei-army__cell:hover .ei-army__halo { opacity: 0.7; }

/* Active state — when this agent is the one in the chat panel */
.ei-army__cell.is-active .ei-army__avatar {
    border-color: var(--ag-color);
    box-shadow: 0 18px 40px -8px color-mix(in srgb, var(--ag-color) 70%, transparent),
                0 0 0 4px color-mix(in srgb, var(--ag-color) 28%, transparent);
}
.ei-army__cell.is-active .ei-army__halo { opacity: 0.6; }
.ei-army__cell.is-active .ei-army__name { color: var(--ag-color); }

.ei-army__name {
    font-family: var(--font-ui);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: -0.005em;
    color: var(--ink);
    transition: color 220ms ease;
    margin-top: 6px;
}
.ei-army__tag {
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--ink-mut);
}

/* Mobile — smaller avatars, no role tag */
@media (max-width: 720px) {
    .ei-army { margin-top: 36px; }
    .ei-army__head { margin-bottom: 16px; }
    .ei-army__kicker { font-size: 10px; letter-spacing: 0.2em; }
    .ei-army__sub { font-size: 10px; }
    .ei-army__rail { top: 64px; left: 5%; right: 5%; }
    .ei-army__list { gap: 4px; }
    .ei-army__cell { gap: 6px; padding: 2px 2px 6px; }
    .ei-army__avatar { width: 54px; height: 54px; border-radius: 16px; }
    .ei-army__avatar svg { width: 22px; height: 22px; }
    .ei-army__cell--main .ei-army__avatar { width: 60px; height: 60px; border-radius: 18px; }
    .ei-army__cell--main .ei-army__avatar svg { width: 26px; height: 26px; }
    .ei-army__name { font-size: 11px; margin-top: 2px; }
    .ei-army__tag { display: none; }
}

.ei-msg {
    padding: 11px 16px;
    border-radius: 14px;
    max-width: 92%;
    line-height: 1.55;
    font-size: 14px;
    word-wrap: break-word;
    overflow-wrap: anywhere;
}
.ei-msg--user {
    align-self: flex-end;
    background: linear-gradient(135deg, var(--brand), var(--brand-2));
    color: #fff;
    border-bottom-right-radius: 4px;
}
.ei-msg--bot {
    align-self: flex-start;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--line);
    border-bottom-left-radius: 4px;
}
.ei-msg--err {
    align-self: stretch; text-align: center;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #fca5a5;
    font-size: 13px;
}
.ei-typing { display: inline-flex; gap: 4px; padding: 8px 0; }
.ei-typing span {
    width: 7px; height: 7px; border-radius: 50%;
    background: var(--ink-dim);
    animation: ei-bounce 1s infinite;
}
.ei-typing span:nth-child(2) { animation-delay: 0.15s; }
.ei-typing span:nth-child(3) { animation-delay: 0.3s; }
@keyframes ei-bounce {
    0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
    30%           { transform: translateY(-4px); opacity: 1; }
}

/* ──────────── Presentation ──────────── */
.ei-pres {
    max-width: var(--maxw);
    margin: 0 auto 80px;
    padding: 0 24px;
}
@media (min-width: 768px) { .ei-pres { padding: 0 32px; } }
.ei-pres__head { text-align: center; margin-bottom: 24px; }
.ei-pres__title {
    font-family: var(--font-ui);
    font-size: clamp(24px, 3.5vw, 36px);
    font-weight: 800;
    letter-spacing: -0.02em;
    margin: 0 0 8px;
}
.ei-pres__sub  { color: var(--ink-mut); margin: 0; font-size: 14px; }
.ei-pres__frame {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--line-2);
    box-shadow: var(--shadow);
    aspect-ratio: 16 / 10;
    background: var(--bg-1);
}
.ei-pres__frame iframe { width: 100%; height: 100%; border: 0; }
.ei-pres__btn {
    display: inline-flex; align-items: center; gap: 10px;
    padding: 14px 24px;
    margin: 24px auto 0;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--line-2);
    border-radius: 14px;
    color: var(--ink);
    font-weight: 600; font-size: 14px;
    transition: background 150ms ease, border-color 150ms ease;
}
.ei-pres__btn:hover { background: rgba(255, 255, 255, 0.1); border-color: rgba(255, 255, 255, 0.3); }
.ei-pres__btn svg { width: 18px; height: 18px; }
.ei-pres { display: flex; flex-direction: column; align-items: stretch; }
.ei-pres__btn { align-self: center; }
.ei-pres__placeholder {
    border: 1px dashed var(--line-2);
    border-radius: var(--radius);
    padding: 60px 24px;
    text-align: center;
    color: var(--ink-mut);
    display: flex; flex-direction: column; align-items: center; gap: 14px;
}
.ei-pres__placeholder svg { width: 36px; height: 36px; opacity: 0.5; }

/* ──────────── Strategy case study ──────────── */
.ei-case {
    max-width: var(--maxw);
    margin: 0 auto 96px;
    padding: 0 24px;
}
@media (min-width: 768px) { .ei-case { padding: 0 32px; } }

.ei-case__head { text-align: center; margin-bottom: 40px; }
.ei-case__kicker {
    display: inline-block;
    font-size: 11px; font-weight: 700;
    letter-spacing: 0.22em; text-transform: uppercase;
    color: #c4b5fd;
    background: rgba(139, 92, 246, 0.14);
    border: 1px solid rgba(139, 92, 246, 0.35);
    padding: 6px 14px; border-radius: 999px;
    margin-bottom: 16px;
}
.ei-case__title {
    font-family: var(--font-display);  /* Serif — case study client name as editorial display */
    font-size: clamp(28px, 4vw, 44px);
    font-weight: 700;
    letter-spacing: -0.012em;
    line-height: 1.28;
    margin: 0 0 8px;
    padding-bottom: 0.06em;
    background: linear-gradient(135deg, #fff 0%, #c7d2fe 100%);
    -webkit-background-clip: text; background-clip: text; color: transparent;
}
.ei-case__sub  { color: var(--ink-mut); margin: 0 0 14px; font-size: 14px; letter-spacing: 0.04em; }
.ei-case__intro {
    color: var(--ink-mut); font-size: 15px;
    max-width: 640px; margin: 0 auto;
}

/* Core trio */
.ei-core {
    display: grid; gap: 18px;
    margin-bottom: 56px;
}
@media (min-width: 768px) { .ei-core { gap: 22px; } }
.ei-core__row {
    padding: 22px 26px;
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.08), rgba(139, 92, 246, 0.04));
    border: 1px solid rgba(99, 102, 241, 0.18);
}
.ei-core__row--lead {
    background: linear-gradient(135deg, rgba(236, 72, 153, 0.14), rgba(139, 92, 246, 0.08));
    border-color: rgba(236, 72, 153, 0.3);
}
.ei-core__label {
    font-size: 10px; font-weight: 700;
    letter-spacing: 0.2em; text-transform: uppercase;
    color: var(--brand-2);
    margin-bottom: 8px;
}
.ei-core__row--lead .ei-core__label { color: #f9a8d4; }
.ei-core__text {
    font-family: var(--font-ui);
    font-size: clamp(17px, 2.4vw, 24px);
    font-weight: 700;
    line-height: 1.35;
    letter-spacing: -0.01em;
}

/* Strategy section card */
.ei-sect {
    margin-bottom: 32px;
    padding: 28px 24px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.025), transparent 80%), var(--bg-1);
    border: 1px solid var(--line);
    border-radius: 22px;
}
@media (min-width: 768px) { .ei-sect { padding: 36px 40px; margin-bottom: 36px; } }
.ei-sect__head {
    display: flex; align-items: flex-start; gap: 18px;
    margin-bottom: 18px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--line);
}
.ei-sect__roman {
    flex: none;
    width: 56px; height: 56px;
    border-radius: 16px;
    display: grid; place-items: center;
    font-family: var(--font-ui);
    font-size: 22px; font-weight: 800;
    background: linear-gradient(135deg, var(--brand) 0%, var(--brand-2) 100%);
    color: #fff;
    box-shadow: 0 12px 32px -10px rgba(99, 102, 241, 0.55);
}
.ei-sect__meta { flex: 1; min-width: 0; }
.ei-sect__title {
    font-family: var(--font-ui);
    font-size: clamp(18px, 2.5vw, 24px);
    font-weight: 800;
    letter-spacing: -0.02em;
    margin: 0 0 10px;
}
.ei-sect__by { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.ei-sect__by-label {
    font-size: 10px; font-weight: 700;
    letter-spacing: 0.18em; text-transform: uppercase;
    color: var(--ink-dim);
}
.ei-stamp { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.ei-stamp__chip {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 4px 10px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--ag-color) 15%, transparent);
    border: 1px solid color-mix(in srgb, var(--ag-color) 40%, transparent);
    color: color-mix(in srgb, var(--ag-color) 85%, white);
    font-size: 11px; font-weight: 700;
    letter-spacing: 0.04em;
}
.ei-stamp__chip svg { width: 12px; height: 12px; }

.ei-sect__lead {
    color: var(--ink-mut);
    font-size: 15px;
    margin: 0 0 16px;
    line-height: 1.65;
}
.ei-sect__sub {
    margin: 18px 0 8px;
    font-size: 13px; font-weight: 700;
    letter-spacing: 0.12em; text-transform: uppercase;
    color: var(--ink);
}
.ei-bul {
    margin: 0; padding: 0; list-style: none;
    display: grid; gap: 10px;
}
.ei-bul li {
    position: relative;
    padding: 10px 14px 10px 38px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid var(--line);
    color: var(--ink);
    font-size: 14.5px; line-height: 1.55;
}
.ei-bul li::before {
    content: '';
    position: absolute; left: 14px; top: 18px;
    width: 6px; height: 6px; border-radius: 50%;
    background: var(--brand-2);
    box-shadow: 0 0 8px var(--brand-2);
}

.ei-sect__closer {
    margin-top: 18px;
    padding: 14px 18px;
    border-left: 3px solid var(--brand-2);
    background: rgba(139, 92, 246, 0.08);
    border-radius: 0 12px 12px 0;
    font-weight: 600;
    color: var(--ink);
}

/* Competitive table */
.ei-tbl-wrap { overflow-x: auto; margin: 12px -8px 0; padding: 0 8px; }
.ei-tbl {
    width: 100%; border-collapse: collapse;
    min-width: 540px;
    font-size: 14px;
}
.ei-tbl thead th {
    text-align: left;
    padding: 12px 14px;
    font-size: 11px; font-weight: 700;
    letter-spacing: 0.12em; text-transform: uppercase;
    color: var(--ink-dim);
    border-bottom: 1px solid var(--line-2);
}
.ei-tbl tbody td {
    padding: 14px;
    border-bottom: 1px solid var(--line);
    color: var(--ink-mut);
    vertical-align: top;
}
.ei-tbl tbody tr:last-child td { border-bottom: 0; }
.ei-tbl tbody td:first-child { color: var(--ink); font-weight: 600; }
.ei-tbl__row--us td {
    background: linear-gradient(90deg, rgba(99, 102, 241, 0.16), rgba(236, 72, 153, 0.10));
    color: var(--ink) !important;
    font-weight: 600;
}
.ei-tbl__row--us td:first-child {
    border-left: 3px solid var(--brand-2);
}

/* Layer cards (Section V) */
.ei-layers {
    margin-top: 18px;
    display: grid; gap: 14px;
    grid-template-columns: 1fr;
}
@media (min-width: 640px) { .ei-layers { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px){ .ei-layers { grid-template-columns: repeat(4, 1fr); } }
.ei-layer {
    padding: 18px 20px;
    background: linear-gradient(150deg, rgba(245, 158, 11, 0.08), transparent 70%);
    border: 1px solid rgba(245, 158, 11, 0.22);
    border-radius: 14px;
    transition: transform 200ms ease, border-color 200ms ease;
}
.ei-layer:hover { transform: translateY(-2px); border-color: rgba(245, 158, 11, 0.45); }
.ei-layer__name {
    font-family: var(--font-ui);
    font-size: 14px; font-weight: 800;
    letter-spacing: 0.06em; text-transform: uppercase;
    color: #fcd34d;
    margin-bottom: 8px;
}
.ei-layer__desc { font-size: 13.5px; line-height: 1.55; color: var(--ink); margin-bottom: 8px; }
.ei-layer__fmt  { font-size: 12px; color: var(--ink-mut); }

/* Rhythm */
.ei-rhythm { margin-top: 22px; padding-top: 22px; border-top: 1px dashed var(--line); }
.ei-rhythm__title {
    margin: 0 0 14px;
    font-size: 12px; font-weight: 700;
    letter-spacing: 0.18em; text-transform: uppercase;
    color: var(--ink-dim);
}
.ei-rhythm__row { display: grid; gap: 10px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .ei-rhythm__row { grid-template-columns: repeat(3, 1fr); } }
.ei-rhythm__day {
    padding: 14px 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--line);
    border-radius: 12px;
}
.ei-rhythm__d {
    font-family: var(--font-ui);
    font-size: 13px; font-weight: 700;
    color: var(--ink);
}
.ei-rhythm__l {
    font-size: 11px; font-weight: 700;
    letter-spacing: 0.14em; text-transform: uppercase;
    color: var(--brand-2);
    margin: 4px 0 6px;
}
.ei-rhythm__n { font-size: 13px; color: var(--ink-mut); }

/* Channels grid */
.ei-channels {
    margin-top: 18px;
    display: grid; gap: 12px;
    grid-template-columns: 1fr;
}
@media (min-width: 700px) { .ei-channels { grid-template-columns: repeat(2, 1fr); } }
.ei-channel {
    padding: 14px 16px;
    background: linear-gradient(120deg, color-mix(in srgb, var(--ag-color) 10%, transparent), transparent);
    border: 1px solid color-mix(in srgb, var(--ag-color) 25%, var(--line));
    border-left: 3px solid var(--ag-color);
    border-radius: 12px;
}
.ei-channel__name {
    font-family: var(--font-ui);
    font-size: 14px; font-weight: 800;
    color: var(--ag-color);
    margin-bottom: 4px;
}
.ei-channel__role { font-size: 13px; color: var(--ink-mut); line-height: 1.55; }

/* SEO landing block */
.ei-seo { margin-top: 24px; padding-top: 24px; border-top: 1px dashed var(--line); }
.ei-seo__head { margin-bottom: 14px; }
.ei-seo__title {
    margin: 0 0 6px;
    font-family: var(--font-ui);
    font-size: 15px; font-weight: 800;
    color: #6ee7b7; /* emerald accent */
}
.ei-seo__note { font-size: 13px; color: var(--ink-mut); margin: 0; }
.ei-seo__list {
    list-style: none; margin: 0; padding: 0;
    display: grid; gap: 8px;
    grid-template-columns: 1fr;
}
@media (min-width: 600px)  { .ei-seo__list { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .ei-seo__list { grid-template-columns: repeat(3, 1fr); } }
.ei-seo__list li {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 14px;
    background: rgba(16, 185, 129, 0.06);
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-radius: 10px;
    font-size: 13.5px;
    color: var(--ink);
}
.ei-seo__num {
    font-family: var(--font-ui);
    font-size: 11px; font-weight: 800;
    color: #6ee7b7;
    background: rgba(16, 185, 129, 0.12);
    padding: 2px 7px; border-radius: 6px;
    flex: none;
}

/* Resources (team + budget) */
.ei-res {
    margin-top: 16px;
    display: grid; gap: 24px;
    grid-template-columns: 1fr;
}
@media (min-width: 768px) { .ei-res { grid-template-columns: 1fr 1fr; gap: 32px; } }
.ei-res__title {
    margin: 0 0 14px;
    font-size: 12px; font-weight: 700;
    letter-spacing: 0.18em; text-transform: uppercase;
    color: var(--ink-dim);
}
.ei-res__team {
    list-style: none; margin: 0; padding: 0;
    display: grid; gap: 8px;
}
.ei-res__team li {
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--line);
    border-radius: 10px;
    font-size: 14px;
    color: var(--ink);
}
.ei-res__budget {
    padding: 14px 16px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), transparent);
    border: 1px solid rgba(99, 102, 241, 0.25);
    border-radius: 12px;
    margin-bottom: 12px;
}
.ei-res__period {
    font-size: 11px; font-weight: 700;
    letter-spacing: 0.14em; text-transform: uppercase;
    color: var(--ink-dim);
    margin-bottom: 4px;
}
.ei-res__amount {
    font-family: var(--font-ui);
    font-size: 22px; font-weight: 800;
    color: var(--ink);
    margin-bottom: 6px;
}
.ei-res__note { font-size: 13px; color: var(--ink-mut); }

/* Scenario scripts */
.ei-scenes { margin-top: 56px; }
.ei-scenes__head {
    display: flex; align-items: center; flex-wrap: wrap; gap: 14px;
    margin-bottom: 24px;
}
.ei-scenes__title {
    font-family: var(--font-ui);
    font-size: clamp(20px, 2.6vw, 26px);
    font-weight: 800; letter-spacing: -0.02em;
    margin: 0;
}
.ei-scenes__grid { display: grid; gap: 18px; grid-template-columns: 1fr; }
@media (min-width: 1100px) { .ei-scenes__grid { grid-template-columns: repeat(3, 1fr); } }

.ei-scene {
    padding: 24px;
    background: linear-gradient(165deg, rgba(244, 63, 94, 0.08), var(--bg-1) 70%);
    border: 1px solid rgba(244, 63, 94, 0.22);
    border-radius: 18px;
}
.ei-scene__head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.ei-scene__num {
    font-family: var(--font-ui);
    font-size: 16px; font-weight: 800;
    color: #fb7185;
}
.ei-scene__day {
    font-size: 11px; font-weight: 700;
    letter-spacing: 0.14em; text-transform: uppercase;
    color: var(--ink-dim);
}
.ei-scene__layer {
    font-size: 10px; font-weight: 700;
    letter-spacing: 0.18em; text-transform: uppercase;
    padding: 3px 8px; border-radius: 6px;
    background: rgba(244, 63, 94, 0.15);
    color: #fda4af;
}
.ei-scene__title {
    font-family: var(--font-ui);
    font-size: 16px; font-weight: 800;
    margin: 0 0 8px;
    line-height: 1.3;
    letter-spacing: -0.01em;
}
.ei-scene__fmt {
    font-size: 12px;
    color: var(--ink-mut);
    margin: 0 0 16px;
    padding-bottom: 12px;
    border-bottom: 1px dashed var(--line);
}
.ei-scene__beats { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.ei-scene__beats li {
    display: grid;
    grid-template-columns: 1fr;
    gap: 4px;
    font-size: 13.5px;
    line-height: 1.55;
    padding-left: 14px;
    border-left: 2px solid rgba(244, 63, 94, 0.3);
}
.ei-scene__t {
    font-family: var(--font-ui);
    font-size: 11px; font-weight: 800;
    letter-spacing: 0.06em;
    color: #fb7185;
}
.ei-scene__label {
    font-size: 10px; font-weight: 700;
    letter-spacing: 0.18em; text-transform: uppercase;
    color: var(--ink-dim);
}
.ei-scene__text { color: var(--ink); }

/* Topic bank */
.ei-topics { margin-top: 56px; }
.ei-topics__head {
    display: flex; align-items: center; flex-wrap: wrap; gap: 14px;
    margin-bottom: 20px;
}
.ei-topics__title {
    font-family: var(--font-ui);
    font-size: clamp(20px, 2.6vw, 26px);
    font-weight: 800; letter-spacing: -0.02em;
    margin: 0;
}
.ei-topics__grid { display: grid; gap: 10px; grid-template-columns: 1fr; }
@media (min-width: 640px)  { .ei-topics__grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .ei-topics__grid { grid-template-columns: repeat(3, 1fr); } }
.ei-topic {
    display: flex; align-items: center; gap: 12px;
    padding: 12px 16px;
    background: rgba(245, 158, 11, 0.06);
    border: 1px solid rgba(245, 158, 11, 0.2);
    border-radius: 12px;
    color: var(--ink);
    font-size: 13.5px;
    line-height: 1.4;
    transition: border-color 200ms ease, transform 200ms ease;
}
.ei-topic:hover { transform: translateX(2px); border-color: rgba(245, 158, 11, 0.5); }
.ei-topic__n {
    font-family: var(--font-ui);
    font-size: 11px; font-weight: 800;
    color: #fcd34d;
    background: rgba(245, 158, 11, 0.18);
    padding: 3px 8px; border-radius: 6px;
    flex: none;
}

/* Featured section break — used to give the relocated "Final Vision" section
   plenty of breathing room above it (it lives between topic bank & closing). */
.ei-sect--break {
    margin-top: 64px;
    position: relative;
}
.ei-sect--break::before {
    content: '';
    position: absolute;
    top: -32px; left: 50%;
    transform: translateX(-50%);
    width: 60px; height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.25), transparent);
}
@media (min-width: 768px) {
    .ei-sect--break { margin-top: 88px; }
    .ei-sect--break::before { top: -44px; width: 80px; }
}

/* ════════════════════════════════════════════════════════════════════
   BRAINSTORM SESSION MODAL — opens on [[IDEAS:agents=...:topic=...]]
   Each listed agent gets its own card; replies stream in via typewriter.
   ════════════════════════════════════════════════════════════════════ */
.ei-bs {
    position: fixed; inset: 0; z-index: 200;
    display: none; align-items: stretch; justify-content: center;
    padding: 16px;
    opacity: 0;
    transition: opacity 240ms ease;
}
.ei-bs.is-open { display: flex; opacity: 1; }
@media (min-width: 768px) { .ei-bs { padding: 32px; } }

.ei-bs__bd {
    position: absolute; inset: 0;
    background: rgba(3, 7, 18, 0.78);
    backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
}
.ei-bs__panel {
    position: relative;
    width: 100%; max-width: 1280px;
    max-height: calc(100vh - 32px);
    margin: auto;
    background: linear-gradient(180deg, color-mix(in srgb, var(--brand) 8%, var(--bg-1)), var(--bg-1) 30%);
    border: 1px solid var(--line-2);
    border-radius: 24px;
    box-shadow: 0 32px 80px -16px rgba(0,0,0,0.7);
    display: flex; flex-direction: column;
    overflow: hidden;
    transform: translateY(20px) scale(0.98);
    transition: transform 320ms cubic-bezier(0.32, 1.32, 0.5, 1);
}
.ei-bs.is-open .ei-bs__panel { transform: translateY(0) scale(1); }

.ei-bs__head {
    display: flex; align-items: center; gap: 16px;
    padding: 20px 24px;
    border-bottom: 1px solid var(--line);
    background: linear-gradient(180deg, color-mix(in srgb, var(--brand) 14%, transparent), transparent);
    flex: none;
}
.ei-bs__head-icon {
    width: 44px; height: 44px;
    border-radius: 14px;
    display: grid; place-items: center;
    background: linear-gradient(135deg, color-mix(in srgb, var(--brand) 35%, transparent), color-mix(in srgb, var(--brand-3) 25%, transparent));
    border: 1px solid color-mix(in srgb, var(--brand) 55%, transparent);
    color: #fff;
    flex: none;
    box-shadow: 0 8px 22px -6px color-mix(in srgb, var(--brand) 60%, transparent);
    animation: ei-bs-spin 12s linear infinite;
}
.ei-bs__head-icon svg { width: 22px; height: 22px; }
@keyframes ei-bs-spin { to { transform: rotate(360deg); } }

.ei-bs__head-text { flex: 1; min-width: 0; }
.ei-bs__title {
    font-family: var(--font-display);
    font-size: 22px; font-weight: 700;
    margin: 0; line-height: 1.2;
    color: var(--ink);
}
.ei-bs__topic {
    font-size: 13px; color: var(--ink-mut);
    margin: 4px 0 0;
    overflow: hidden; text-overflow: ellipsis;
    white-space: nowrap;
}
.ei-bs__close {
    width: 40px; height: 40px;
    flex: none;
    border: 0; background: transparent;
    color: var(--ink-mut);
    border-radius: 12px;
    display: grid; place-items: center;
    cursor: pointer;
    transition: background 150ms ease, color 150ms ease;
}
.ei-bs__close svg { width: 18px; height: 18px; }
.ei-bs__close:hover { background: rgba(255,255,255,0.06); color: var(--ink); }

.ei-bs__body {
    flex: 1; min-height: 0;
    overflow-y: auto;
    padding: 24px;
}
@media (min-width: 768px) { .ei-bs__body { padding: 28px 32px; } }

.ei-bs__grid {
    display: grid;
    gap: 14px;
    grid-template-columns: 1fr;
}
@media (min-width: 700px)  { .ei-bs__grid { grid-template-columns: repeat(2, 1fr); gap: 16px; } }
@media (min-width: 1100px) { .ei-bs__grid { grid-template-columns: repeat(3, 1fr); } }

/* ── Agent card inside the modal ── */
.ei-bs-card {
    --card-color: #6366f1;
    background: linear-gradient(165deg,
        color-mix(in srgb, var(--card-color) 10%, var(--bg-1)),
        var(--bg-1) 60%);
    border: 1px solid color-mix(in srgb, var(--card-color) 30%, var(--line));
    border-radius: 18px;
    padding: 18px 20px 20px;
    display: flex; flex-direction: column;
    min-height: 240px;
    transition: border-color 300ms ease, box-shadow 300ms ease;
    position: relative;
    overflow: hidden;
}
.ei-bs-card.is-thinking {
    border-color: color-mix(in srgb, var(--card-color) 55%, var(--line));
    animation: ei-bs-card-pulse 2.4s ease-in-out infinite;
}

/* Standby — agents are convened but no task yet; they listen */
.ei-bs-card.is-waiting {
    border-style: dashed;
    border-color: color-mix(in srgb, var(--card-color) 38%, var(--line));
    animation: ei-bs-card-listen 3.6s ease-in-out infinite;
}
.ei-bs-card.is-waiting .ei-bs-card__state {
    background: color-mix(in srgb, var(--card-color) 14%, transparent);
    color: color-mix(in srgb, var(--card-color) 80%, white);
}
.ei-bs-card.is-waiting .ei-bs-card__text {
    color: var(--ink-mut);
    font-style: italic;
    display: flex; align-items: center; gap: 8px;
}
.ei-bs-card.is-waiting .ei-bs-card__text::before {
    content: '';
    width: 8px; height: 8px;
    border-radius: 50%;
    background: var(--card-color);
    box-shadow: 0 0 8px var(--card-color);
    animation: ei-pulse 1.8s ease-in-out infinite;
    flex: none;
}
@keyframes ei-bs-card-listen {
    0%, 100% { box-shadow: 0 0 0 0 transparent; }
    50%      { box-shadow: 0 0 24px -8px color-mix(in srgb, var(--card-color) 35%, transparent); }
}
@keyframes ei-bs-card-pulse {
    0%, 100% { box-shadow: 0 0 0 0 transparent; }
    50%      { box-shadow: 0 0 32px -6px color-mix(in srgb, var(--card-color) 50%, transparent); }
}
.ei-bs-card.is-streaming {
    border-color: color-mix(in srgb, var(--card-color) 70%, var(--line));
    box-shadow: 0 0 28px -8px color-mix(in srgb, var(--card-color) 50%, transparent);
}
.ei-bs-card.is-done {
    border-color: color-mix(in srgb, var(--card-color) 45%, var(--line));
}
.ei-bs-card.is-error {
    border-color: rgba(239, 68, 68, 0.5);
}

.ei-bs-card__head {
    display: flex; align-items: center; gap: 12px;
    margin-bottom: 14px;
    padding-bottom: 12px;
    border-bottom: 1px dashed color-mix(in srgb, var(--card-color) 30%, var(--line));
}
.ei-bs-card__avatar {
    flex: none;
    width: 40px; height: 40px;
    border-radius: 11px;
    display: grid; place-items: center;
    background: color-mix(in srgb, var(--card-color) 22%, transparent);
    border: 1px solid color-mix(in srgb, var(--card-color) 50%, transparent);
    color: var(--card-color);
}
.ei-bs-card__avatar svg { width: 20px; height: 20px; }
.ei-bs-card__id { flex: 1; min-width: 0; }
.ei-bs-card__name {
    font-family: var(--font-ui);
    font-size: 14px; font-weight: 800;
    color: var(--ink);
    line-height: 1.2;
}
.ei-bs-card__role {
    font-size: 10px; font-weight: 700;
    letter-spacing: 0.14em; text-transform: uppercase;
    color: color-mix(in srgb, var(--card-color) 80%, white);
    margin-top: 3px;
}
.ei-bs-card__state {
    flex: none;
    font-size: 9px; font-weight: 700;
    letter-spacing: 0.14em; text-transform: uppercase;
    padding: 4px 8px; border-radius: 6px;
    background: rgba(255,255,255,0.04);
    color: var(--ink-mut);
}
.ei-bs-card.is-thinking .ei-bs-card__state {
    background: rgba(245, 158, 11, 0.14);
    color: #fcd34d;
}
.ei-bs-card.is-streaming .ei-bs-card__state {
    background: color-mix(in srgb, var(--card-color) 18%, transparent);
    color: var(--card-color);
}
.ei-bs-card.is-done .ei-bs-card__state {
    background: rgba(34, 197, 94, 0.14);
    color: #4ade80;
}
.ei-bs-card.is-error .ei-bs-card__state {
    background: rgba(239, 68, 68, 0.14);
    color: #fca5a5;
}

.ei-bs-card__text {
    flex: 1;
    font-size: 14px;
    line-height: 1.6;
    color: var(--ink);
    white-space: pre-wrap;
    word-wrap: break-word;
    overflow-wrap: anywhere;
    overflow-y: auto;
    max-height: 240px;
    padding-right: 6px;
    transition: max-height 380ms cubic-bezier(0.32, 0.72, 0, 1);

    /* Pretty scrollbar — agent-colored, thin, rounded */
    scrollbar-width: thin;
    scrollbar-color: color-mix(in srgb, var(--card-color) 55%, transparent) transparent;
}
.ei-bs-card__text::-webkit-scrollbar { width: 6px; height: 6px; }
.ei-bs-card__text::-webkit-scrollbar-track { background: transparent; }
.ei-bs-card__text::-webkit-scrollbar-thumb {
    background: color-mix(in srgb, var(--card-color) 50%, transparent);
    border-radius: 8px;
    transition: background 200ms ease;
}
.ei-bs-card__text::-webkit-scrollbar-thumb:hover {
    background: color-mix(in srgb, var(--card-color) 80%, transparent);
}

/* Expanded card — turns into a "reading mode" with a comfortable column.
   The card spans the full grid width but text is centered & narrow for
   readability; padding, font, header all scale up. */
.ei-bs-card.is-expanded {
    grid-column: 1 / -1;
    padding: 32px 28px 28px;
    background: linear-gradient(165deg,
        color-mix(in srgb, var(--card-color) 14%, var(--bg-1)),
        var(--bg-1) 70%);
    border-color: color-mix(in srgb, var(--card-color) 50%, var(--line));
    box-shadow: 0 22px 56px -12px color-mix(in srgb, var(--card-color) 40%, transparent);
    animation: ei-bs-expand-in 360ms cubic-bezier(0.32, 0.72, 0, 1);
}
@media (min-width: 768px) {
    .ei-bs-card.is-expanded { padding: 40px 48px 36px; }
}
@keyframes ei-bs-expand-in {
    from { opacity: 0.6; transform: scale(0.98); }
    to   { opacity: 1;   transform: scale(1); }
}

/* Header gets bigger — feels like a featured "article" header */
.ei-bs-card.is-expanded .ei-bs-card__head {
    max-width: 760px;
    margin: 0 auto 20px;
    padding-bottom: 18px;
    width: 100%;
}
.ei-bs-card.is-expanded .ei-bs-card__avatar {
    width: 52px; height: 52px;
    border-radius: 16px;
}
.ei-bs-card.is-expanded .ei-bs-card__avatar svg {
    width: 26px; height: 26px;
}
.ei-bs-card.is-expanded .ei-bs-card__name {
    font-size: 17px;
}
.ei-bs-card.is-expanded .ei-bs-card__role {
    font-size: 11px;
}

/* Text column: narrow & centered for readability + larger type */
.ei-bs-card.is-expanded .ei-bs-card__text {
    max-height: none;
    overflow-y: visible;
    max-width: 720px;
    margin: 0 auto;
    font-size: 15.5px;
    line-height: 1.75;
    padding-right: 0;
    width: 100%;
}

/* Actions row matches the text column width and gets more top breathing */
.ei-bs-card.is-expanded .ei-bs-card__actions {
    max-width: 720px;
    margin: 24px auto 0;
    width: 100%;
    padding-top: 18px;
}

/* Card action row */
.ei-bs-card__actions {
    display: flex; gap: 8px;
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px dashed color-mix(in srgb, var(--card-color) 25%, var(--line));
}
.ei-bs-card__action {
    flex: 1;
    display: inline-flex; align-items: center; justify-content: center;
    gap: 6px;
    padding: 8px 10px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--line);
    color: var(--ink);
    border-radius: 10px;
    font-size: 11px; font-weight: 700;
    letter-spacing: 0.04em;
    cursor: pointer;
    transition: background 160ms ease, border-color 160ms ease, color 160ms ease, transform 160ms ease;
}
.ei-bs-card__action svg { width: 13px; height: 13px; }
.ei-bs-card__action:hover:not(:disabled) {
    background: color-mix(in srgb, var(--card-color) 14%, transparent);
    border-color: color-mix(in srgb, var(--card-color) 50%, transparent);
    color: color-mix(in srgb, var(--card-color) 90%, white);
    transform: translateY(-1px);
}
.ei-bs-card__action:disabled {
    opacity: 0.4; cursor: not-allowed;
}
.ei-bs-card__action--save.is-saved {
    background: rgba(34, 197, 94, 0.16);
    border-color: rgba(34, 197, 94, 0.5);
    color: #4ade80;
    transform: scale(1.02);
}

/* ── Modal footer: agent chips + new task input ── */
.ei-bs__foot {
    flex: none;
    border-top: 1px solid var(--line);
    background: rgba(0, 0, 0, 0.25);
    padding: 14px 20px 16px;
    display: flex; flex-direction: column; gap: 10px;
}
@media (min-width: 768px) {
    .ei-bs__foot { padding: 16px 28px 18px; gap: 12px; }
}

.ei-bs__chips-wrap {
    display: flex; align-items: center; gap: 10px;
    flex-wrap: wrap;
}
.ei-bs__chips-label {
    font-size: 10px; font-weight: 700;
    letter-spacing: 0.16em; text-transform: uppercase;
    color: var(--ink-mut);
    flex: none;
}
.ei-bs__chips {
    display: flex; flex-wrap: wrap; gap: 6px;
    flex: 1; min-width: 0;
}
.ei-bs__chip {
    --ag-color: #6366f1;
    display: inline-flex; align-items: center; gap: 6px;
    padding: 5px 10px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--line);
    color: var(--ink-mut);
    border-radius: 999px;
    font-size: 11px; font-weight: 700;
    letter-spacing: 0.02em;
    cursor: pointer;
    transition: background 160ms ease, border-color 160ms ease, color 160ms ease, transform 160ms ease;
}
.ei-bs__chip svg { width: 12px; height: 12px; }
.ei-bs__chip:hover {
    border-color: color-mix(in srgb, var(--ag-color) 40%, var(--line));
    color: color-mix(in srgb, var(--ag-color) 80%, white);
    transform: translateY(-1px);
}
.ei-bs__chip.is-on {
    background: color-mix(in srgb, var(--ag-color) 18%, transparent);
    border-color: color-mix(in srgb, var(--ag-color) 60%, transparent);
    color: color-mix(in srgb, var(--ag-color) 90%, white);
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--ag-color) 18%, transparent);
}

.ei-bs__chip-all {
    flex: none;
    padding: 5px 14px;
    background: rgba(99, 102, 241, 0.12);
    border: 1px solid rgba(99, 102, 241, 0.4);
    color: #c7d2fe;
    border-radius: 999px;
    font-size: 11px; font-weight: 800;
    letter-spacing: 0.06em;
    cursor: pointer;
    transition: background 160ms ease, border-color 160ms ease;
}
.ei-bs__chip-all:hover {
    background: rgba(99, 102, 241, 0.22);
    border-color: rgba(99, 102, 241, 0.6);
}

.ei-bs__form {
    display: flex; gap: 8px;
}
.ei-bs__input {
    flex: 1; min-width: 0;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--line-2);
    color: var(--ink);
    border-radius: 12px;
    font-size: 14px;
    font-family: var(--font-ui);
    transition: border-color 180ms ease, box-shadow 180ms ease;
}
.ei-bs__input:focus {
    outline: none;
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.18);
}
.ei-bs__input::placeholder { color: var(--ink-dim); }

.ei-bs__send {
    flex: none;
    width: 44px; height: 44px;
    border: 0; border-radius: 12px;
    background: linear-gradient(135deg, var(--brand), var(--brand-2));
    color: #fff;
    display: grid; place-items: center;
    cursor: pointer;
    transition: filter 150ms ease, transform 150ms ease;
}
.ei-bs__send svg { width: 18px; height: 18px; }
.ei-bs__send:hover { filter: brightness(1.12); transform: scale(1.04); }

/* Pretty scrollbars on the modal body too */
.ei-bs__body {
    scrollbar-width: thin;
    scrollbar-color: rgba(99, 102, 241, 0.4) transparent;
}
.ei-bs__body::-webkit-scrollbar { width: 8px; height: 8px; }
.ei-bs__body::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.02);
    border-radius: 8px;
}
.ei-bs__body::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, rgba(99, 102, 241, 0.5), rgba(236, 72, 153, 0.4));
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.06);
}
.ei-bs__body::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, rgba(99, 102, 241, 0.8), rgba(236, 72, 153, 0.7));
}
/* Blinking caret while typewriter is active */
.ei-bs-card.is-streaming .ei-bs-card__text::after,
.ei-bs-card.is-thinking .ei-bs-card__text::after {
    content: '▎';
    color: var(--card-color);
    animation: ei-bs-cursor 0.85s ease-in-out infinite;
    margin-left: 1px;
}
@keyframes ei-bs-cursor {
    0%, 100% { opacity: 1; }
    50%      { opacity: 0; }
}
/* Subtle thinking dots while waiting for first chars */
.ei-bs-card.is-thinking .ei-bs-card__text::before {
    content: '...';
    color: var(--ink-dim);
    letter-spacing: 0.3em;
    animation: ei-bs-dots 1.4s steps(4) infinite;
}
@keyframes ei-bs-dots {
    0%, 33%   { content: '.'; }
    34%, 66%  { content: '..'; }
    67%, 100% { content: '...'; }
}

/* ──── Inline "Open meeting" suggestion (rendered after a bot reply) ──── */
.ei-suggest {
    margin-top: 10px;
    width: 100%;
}
.ei-suggest__inner {
    background: linear-gradient(140deg,
        rgba(99, 102, 241, 0.12),
        rgba(236, 72, 153, 0.06));
    border: 1px solid rgba(99, 102, 241, 0.35);
    border-radius: 14px;
    padding: 12px 14px;
    display: flex; flex-direction: column; gap: 10px;
}
.ei-suggest__head {
    display: flex; align-items: center; gap: 8px;
    font-size: 11px; font-weight: 800;
    letter-spacing: 0.06em; text-transform: uppercase;
    color: #c7d2fe;
}
.ei-suggest__head svg {
    width: 14px; height: 14px;
    flex: none;
}
.ei-suggest__chips {
    display: flex; flex-wrap: wrap; gap: 6px;
}
.ei-suggest__chip {
    --ag-color: #6366f1;
    display: inline-flex; align-items: center; gap: 5px;
    padding: 3px 9px;
    background: color-mix(in srgb, var(--ag-color) 18%, transparent);
    border: 1px solid color-mix(in srgb, var(--ag-color) 45%, transparent);
    color: color-mix(in srgb, var(--ag-color) 90%, white);
    border-radius: 999px;
    font-size: 10px; font-weight: 700;
    letter-spacing: 0.04em;
}
.ei-suggest__chip svg { width: 11px; height: 11px; }
.ei-suggest__btn {
    display: inline-flex; align-items: center; justify-content: center;
    gap: 8px;
    padding: 9px 14px;
    background: linear-gradient(135deg, var(--brand), var(--brand-2));
    color: #fff;
    border: 0; border-radius: 10px;
    font-size: 12px; font-weight: 800;
    letter-spacing: 0.04em;
    cursor: pointer;
    transition: filter 150ms ease, transform 150ms ease;
    box-shadow: 0 8px 22px -6px rgba(99, 102, 241, 0.5);
    align-self: flex-start;
}
.ei-suggest__btn:hover { filter: brightness(1.12); transform: translateY(-1px); }
.ei-suggest__btn svg { width: 13px; height: 13px; }

/* ════════════════════════════════════════════════════════════════════
   SAVED IDEAS panel — slide-in from right, list of all saved ideas
   ════════════════════════════════════════════════════════════════════ */
.ei-saved {
    position: fixed; inset: 0; z-index: 210;
    display: flex; justify-content: flex-end;
    pointer-events: none;
    visibility: hidden;
}
.ei-saved.is-open { pointer-events: auto; visibility: visible; }

.ei-saved__bd {
    position: absolute; inset: 0;
    background: rgba(3, 7, 18, 0.7);
    backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    opacity: 0;
    transition: opacity 240ms ease;
}
.ei-saved.is-open .ei-saved__bd { opacity: 1; }

.ei-saved__panel {
    position: relative;
    width: 100%; max-width: 540px;
    height: 100%;
    background: var(--bg-1);
    border-left: 1px solid var(--line);
    display: flex; flex-direction: column;
    transform: translateX(100%);
    transition: transform 320ms cubic-bezier(0.32, 0.72, 0, 1);
}
.ei-saved.is-open .ei-saved__panel { transform: translateX(0); }

.ei-saved__head {
    display: flex; align-items: center; gap: 12px;
    padding: 20px 22px;
    border-bottom: 1px solid var(--line);
    background: linear-gradient(180deg, rgba(251, 191, 36, 0.1), transparent);
    flex: none;
}
.ei-saved__title {
    font-family: var(--font-display);
    font-size: 20px; font-weight: 700;
    margin: 0; line-height: 1.2;
    color: var(--ink);
    flex: 1;
}
.ei-saved__sub {
    font-size: 11px; color: var(--ink-mut);
    margin: 4px 0 0;
    letter-spacing: 0.04em;
}
.ei-saved__head > div { flex: 1; min-width: 0; }
.ei-saved__clear {
    flex: none;
    font-size: 11px; font-weight: 700;
    letter-spacing: 0.06em;
    padding: 6px 12px;
    border: 1px solid rgba(239, 68, 68, 0.3);
    background: rgba(239, 68, 68, 0.08);
    color: #fca5a5;
    border-radius: 8px;
    cursor: pointer;
    transition: background 150ms ease, border-color 150ms ease;
}
.ei-saved__clear:hover {
    background: rgba(239, 68, 68, 0.18);
    border-color: rgba(239, 68, 68, 0.5);
}
.ei-saved__close {
    flex: none;
    width: 36px; height: 36px;
    border: 0; background: transparent;
    color: var(--ink-mut);
    border-radius: 10px;
    display: grid; place-items: center;
    cursor: pointer;
    transition: background 150ms ease, color 150ms ease;
}
.ei-saved__close svg { width: 18px; height: 18px; }
.ei-saved__close:hover { background: rgba(255,255,255,0.06); color: var(--ink); }

.ei-saved__body {
    flex: 1; min-height: 0;
    overflow-y: auto;
    padding: 18px 20px;
    display: flex; flex-direction: column; gap: 12px;

    /* Pretty scrollbar */
    scrollbar-width: thin;
    scrollbar-color: rgba(251, 191, 36, 0.4) transparent;
}
.ei-saved__body::-webkit-scrollbar { width: 6px; }
.ei-saved__body::-webkit-scrollbar-track { background: transparent; }
.ei-saved__body::-webkit-scrollbar-thumb {
    background: rgba(251, 191, 36, 0.45);
    border-radius: 8px;
}
.ei-saved__body::-webkit-scrollbar-thumb:hover { background: rgba(251, 191, 36, 0.7); }

/* Saved card */
.ei-saved-card {
    --card-color: #fbbf24;
    background: linear-gradient(165deg,
        color-mix(in srgb, var(--card-color) 8%, var(--bg-1)),
        var(--bg-1) 70%);
    border: 1px solid color-mix(in srgb, var(--card-color) 25%, var(--line));
    border-radius: 14px;
    padding: 14px 16px 16px;
    transition: border-color 200ms ease, transform 200ms ease;
}
.ei-saved-card:hover {
    border-color: color-mix(in srgb, var(--card-color) 50%, var(--line));
    transform: translateY(-1px);
}
.ei-saved-card__head {
    display: flex; align-items: center; gap: 10px;
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px dashed color-mix(in srgb, var(--card-color) 25%, var(--line));
}
.ei-saved-card__avatar {
    flex: none;
    width: 32px; height: 32px;
    border-radius: 9px;
    display: grid; place-items: center;
    background: color-mix(in srgb, var(--card-color) 22%, transparent);
    border: 1px solid color-mix(in srgb, var(--card-color) 50%, transparent);
    color: var(--card-color);
}
.ei-saved-card__avatar svg { width: 16px; height: 16px; }
.ei-saved-card__id { flex: 1; min-width: 0; }
.ei-saved-card__agent {
    font-size: 10px; font-weight: 800;
    letter-spacing: 0.08em; text-transform: uppercase;
    color: color-mix(in srgb, var(--card-color) 80%, white);
    margin-bottom: 2px;
}
.ei-saved-card__topic {
    font-size: 13px; font-weight: 700;
    color: var(--ink);
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
}
.ei-saved-card__date {
    flex: none;
    font-size: 10px; color: var(--ink-dim);
    letter-spacing: 0.04em;
}
.ei-saved-card__del {
    flex: none;
    width: 28px; height: 28px;
    border: 0; background: transparent;
    color: var(--ink-dim);
    border-radius: 8px;
    display: grid; place-items: center;
    cursor: pointer;
    transition: background 150ms ease, color 150ms ease;
}
.ei-saved-card__del svg { width: 14px; height: 14px; }
.ei-saved-card__del:hover { background: rgba(239, 68, 68, 0.14); color: #f87171; }
.ei-saved-card__text {
    font-size: 13px;
    line-height: 1.6;
    color: var(--ink);
    word-wrap: break-word;
    overflow-wrap: anywhere;
}
.ei-saved-card__text strong { color: color-mix(in srgb, var(--card-color) 90%, white); }

@media (max-width: 540px) {
    .ei-saved__panel { max-width: 100%; border-left: 0; }
}

/* ════════════════════════════════════════════════════════════════════
   CONTACT MODAL — phone option + form (anyone)
   ════════════════════════════════════════════════════════════════════ */
.ei-contact {
    position: fixed; inset: 0; z-index: 230;
    display: none;
    align-items: center; justify-content: center;
    padding: 24px;
}
.ei-contact.is-open { display: flex; }
.ei-contact__bd {
    position: absolute; inset: 0;
    background: rgba(3, 7, 18, 0.78);
    backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
}
.ei-contact__card {
    position: relative;
    width: 100%; max-width: 460px;
    background: linear-gradient(180deg, color-mix(in srgb, var(--brand) 8%, var(--bg-1)), var(--bg-1) 60%);
    border: 1px solid var(--line-2);
    border-radius: 22px;
    padding: 32px 28px 28px;
    box-shadow: 0 32px 72px -12px rgba(0,0,0,0.7);
    transform: scale(0.96); opacity: 0;
    animation: ei-login-in 280ms cubic-bezier(0.32, 1.32, 0.5, 1) forwards;
}
.ei-contact__close {
    position: absolute; top: 14px; right: 14px;
    width: 36px; height: 36px;
    border: 0; background: transparent;
    color: var(--ink-mut);
    border-radius: 10px;
    display: grid; place-items: center;
    cursor: pointer;
    transition: background 150ms ease, color 150ms ease;
}
.ei-contact__close svg { width: 18px; height: 18px; }
.ei-contact__close:hover { background: rgba(255,255,255,0.06); color: var(--ink); }

.ei-contact__head { text-align: center; margin-bottom: 20px; }
.ei-contact__head h3 {
    font-family: var(--font-display);
    font-size: 22px; font-weight: 700;
    margin: 0 0 6px;
    color: var(--ink);
}
.ei-contact__head p {
    font-size: 13px; color: var(--ink-mut);
    margin: 0;
}

.ei-contact__options {
    display: flex; flex-direction: column; gap: 10px;
}
.ei-contact__opt {
    display: flex; align-items: center; gap: 14px;
    padding: 14px 16px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--line-2);
    border-radius: 14px;
    color: var(--ink);
    text-decoration: none;
    cursor: pointer;
    text-align: left;
    width: 100%;
    transition: background 180ms ease, border-color 180ms ease, transform 180ms ease;
}
.ei-contact__opt:hover {
    background: rgba(99, 102, 241, 0.12);
    border-color: rgba(99, 102, 241, 0.5);
    transform: translateY(-2px);
}
.ei-contact__opt--call:hover {
    background: rgba(34, 197, 94, 0.14);
    border-color: rgba(34, 197, 94, 0.5);
}
.ei-contact__opt-icon {
    flex: none;
    width: 44px; height: 44px;
    border-radius: 12px;
    display: grid; place-items: center;
    background: rgba(99, 102, 241, 0.18);
    color: #c7d2fe;
}
.ei-contact__opt--call .ei-contact__opt-icon {
    background: rgba(34, 197, 94, 0.18);
    color: #86efac;
}
.ei-contact__opt-icon svg { width: 20px; height: 20px; }
.ei-contact__opt-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ei-contact__opt-text strong {
    font-size: 14px; font-weight: 800; color: var(--ink);
}
.ei-contact__opt-text span {
    font-size: 12px; color: var(--ink-mut);
}

.ei-contact__form { display: flex; flex-direction: column; gap: 12px; }
.ei-contact__back {
    align-self: flex-start;
    padding: 4px 8px;
    background: transparent; border: 0;
    color: var(--ink-mut);
    font-size: 12px; font-weight: 700;
    cursor: pointer;
    border-radius: 6px;
}
.ei-contact__back:hover { background: rgba(255,255,255,0.06); color: var(--ink); }

.ei-contact__field { display: flex; flex-direction: column; gap: 4px; }
.ei-contact__field span {
    font-size: 11px; font-weight: 700;
    letter-spacing: 0.14em; text-transform: uppercase;
    color: var(--ink-mut);
}
.ei-contact__field input,
.ei-contact__field textarea {
    padding: 12px 14px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--line-2);
    color: var(--ink);
    border-radius: 10px;
    font-size: 14px;
    font-family: var(--font-ui);
    transition: border-color 180ms ease, box-shadow 180ms ease;
    resize: vertical;
}
.ei-contact__field input:focus,
.ei-contact__field textarea:focus {
    outline: none;
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.18);
}
.ei-contact__err {
    font-size: 12px;
    color: #fca5a5;
    min-height: 14px;
    text-align: center;
    font-weight: 600;
}
.ei-contact__submit {
    margin-top: 4px;
    padding: 13px 20px;
    background: linear-gradient(135deg, var(--brand), var(--brand-2));
    color: #fff;
    border: 0; border-radius: 12px;
    font-size: 14px; font-weight: 800;
    letter-spacing: 0.04em;
    cursor: pointer;
    transition: filter 150ms ease, transform 150ms ease;
    box-shadow: 0 12px 28px -8px rgba(99, 102, 241, 0.5);
}
.ei-contact__submit:hover { filter: brightness(1.1); transform: translateY(-1px); }
.ei-contact__submit:disabled { opacity: 0.55; cursor: progress; }

.ei-contact__success { text-align: center; padding: 12px 0; }
.ei-contact__check {
    width: 64px; height: 64px;
    margin: 0 auto 16px;
    border-radius: 50%;
    background: rgba(34, 197, 94, 0.18);
    border: 2px solid rgba(34, 197, 94, 0.6);
    color: #4ade80;
    display: grid; place-items: center;
    animation: ei-pulse 1.6s ease-in-out infinite;
}
.ei-contact__check svg { width: 30px; height: 30px; }
.ei-contact__success h4 {
    font-family: var(--font-display);
    font-size: 22px; font-weight: 700;
    margin: 0 0 6px;
}
.ei-contact__success p {
    font-size: 13px; color: var(--ink-mut);
    margin: 0;
}

/* ════════════════════════════════════════════════════════════════════
   HISTORY PANEL — Eto's full chat archive (slide-in from right)
   ════════════════════════════════════════════════════════════════════ */
.ei-history {
    position: fixed; inset: 0; z-index: 217;
    display: flex; justify-content: flex-end;
    pointer-events: none; visibility: hidden;
}
.ei-history.is-open { pointer-events: auto; visibility: visible; }
.ei-history__bd {
    position: absolute; inset: 0;
    background: rgba(3, 7, 18, 0.7);
    backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    opacity: 0;
    transition: opacity 240ms ease;
}
.ei-history.is-open .ei-history__bd { opacity: 1; }
.ei-history__panel {
    position: relative;
    width: 100%; max-width: 720px;
    height: 100%;
    background: var(--bg-1);
    border-left: 1px solid var(--line);
    display: flex; flex-direction: column;
    transform: translateX(100%);
    transition: transform 320ms cubic-bezier(0.32, 0.72, 0, 1);
}
.ei-history.is-open .ei-history__panel { transform: translateX(0); }

.ei-history__head {
    display: flex; align-items: center; gap: 10px;
    padding: 18px 20px;
    border-bottom: 1px solid var(--line);
    background: linear-gradient(180deg, rgba(148, 163, 184, 0.08), transparent);
    flex: none;
}
.ei-history__head > div { flex: 1; min-width: 0; }
.ei-history__title {
    font-family: var(--font-display);
    font-size: 19px; font-weight: 700;
    margin: 0;
    color: var(--ink);
}
.ei-history__sub {
    font-size: 11px; color: var(--ink-mut);
    margin: 4px 0 0;
    letter-spacing: 0.04em;
}

.ei-history__refresh,
.ei-history__close {
    flex: none;
    width: 36px; height: 36px;
    border: 0; background: transparent;
    color: var(--ink-mut);
    border-radius: 10px;
    display: grid; place-items: center;
    cursor: pointer;
    transition: background 150ms ease, color 150ms ease;
}
.ei-history__refresh svg, .ei-history__close svg { width: 16px; height: 16px; }
.ei-history__refresh:hover, .ei-history__close:hover { background: rgba(255,255,255,0.06); color: var(--ink); }

.ei-history__danger {
    flex: none;
    display: inline-flex; align-items: center; gap: 6px;
    padding: 7px 12px;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.35);
    color: #fca5a5;
    border-radius: 8px;
    font-size: 11px; font-weight: 700;
    letter-spacing: 0.04em;
    cursor: pointer;
    transition: background 150ms ease, border-color 150ms ease;
}
.ei-history__danger svg { width: 13px; height: 13px; }
.ei-history__danger:hover {
    background: rgba(239, 68, 68, 0.2);
    border-color: rgba(239, 68, 68, 0.55);
}

.ei-history__body {
    flex: 1; min-height: 0;
    overflow-y: auto;
    padding: 14px 18px;
    display: flex; flex-direction: column; gap: 10px;
    scrollbar-width: thin;
    scrollbar-color: rgba(148, 163, 184, 0.4) transparent;
}
.ei-history__body::-webkit-scrollbar { width: 6px; }
.ei-history__body::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.45);
    border-radius: 8px;
}

.ei-history__loading {
    text-align: center;
    color: var(--ink-mut);
    font-size: 13px;
    padding: 40px 20px;
}

/* ── Session card ── */
.ei-hst-card {
    background: var(--bg-1);
    border: 1px solid var(--line);
    border-radius: 12px;
    overflow: hidden;
    transition: border-color 180ms ease;
}
.ei-hst-card:hover { border-color: var(--line-2); }
.ei-hst-card.is-open { border-color: rgba(148, 163, 184, 0.5); }

.ei-hst-card__head {
    padding: 12px 14px;
    cursor: pointer;
    display: grid;
    grid-template-areas:
        'title    actions'
        'meta     actions'
        'preview  preview';
    grid-template-columns: 1fr auto;
    gap: 4px 10px;
    transition: background 150ms ease;
}
.ei-hst-card__head:hover { background: rgba(255, 255, 255, 0.025); }

.ei-hst-card__title {
    grid-area: title;
    display: flex; align-items: center; gap: 8px;
    flex-wrap: wrap;
}
.ei-hst-card__sid {
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 11px; font-weight: 700;
    color: var(--ink);
    background: rgba(148, 163, 184, 0.12);
    padding: 2px 7px; border-radius: 5px;
}
.ei-hst-card__badge {
    font-size: 9px; font-weight: 800;
    letter-spacing: 0.14em; text-transform: uppercase;
    padding: 2px 7px; border-radius: 5px;
}
.ei-hst-card__badge--eto     { background: rgba(34, 197, 94, 0.18);  color: #6ee7b7; }
.ei-hst-card__badge--visitor { background: rgba(99, 102, 241, 0.18); color: #c7d2fe; }
.ei-hst-card__lang {
    font-size: 9px; font-weight: 800;
    letter-spacing: 0.14em; text-transform: uppercase;
    color: var(--ink-dim);
}

.ei-hst-card__meta {
    grid-area: meta;
    font-size: 11px;
    color: var(--ink-mut);
    display: flex; flex-wrap: wrap; gap: 4px;
}

.ei-hst-card__preview {
    grid-area: preview;
    margin-top: 6px;
    padding: 8px 10px;
    background: rgba(255, 255, 255, 0.025);
    border-left: 2px solid rgba(148, 163, 184, 0.35);
    border-radius: 0 6px 6px 0;
    font-size: 12px;
    line-height: 1.5;
    color: var(--ink);
    word-break: break-word;
    max-height: 60px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
}

.ei-hst-card__actions {
    grid-area: actions;
    display: flex; align-items: center; gap: 6px;
}
.ei-hst-card__actions button {
    width: 28px; height: 28px;
    border: 1px solid var(--line);
    background: transparent;
    color: var(--ink-mut);
    border-radius: 6px;
    cursor: pointer;
    display: grid; place-items: center;
    transition: background 150ms ease, color 150ms ease, border-color 150ms ease;
}
.ei-hst-card__actions button svg { width: 13px; height: 13px; }
.ei-hst-card__actions button:hover {
    background: rgba(239, 68, 68, 0.12);
    border-color: rgba(239, 68, 68, 0.4);
    color: #fca5a5;
}
.ei-hst-card__chev {
    width: 28px; height: 28px;
    display: grid; place-items: center;
    color: var(--ink-mut);
    transition: transform 200ms ease;
}
.ei-hst-card__chev svg { width: 14px; height: 14px; }
.ei-hst-card.is-open .ei-hst-card__chev { transform: rotate(180deg); }

/* Body — turns list */
.ei-hst-card__body {
    border-top: 1px solid var(--line);
    background: rgba(0, 0, 0, 0.18);
    padding: 14px;
    display: flex; flex-direction: column; gap: 10px;
    max-height: 480px;
    overflow-y: auto;
}
.ei-hst-card__loading {
    text-align: center;
    color: var(--ink-dim);
    font-size: 12px;
    padding: 12px;
}

.ei-hst-turn {
    --ag-color: #6366f1;
    padding: 10px 12px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.025);
    border-left: 3px solid var(--ag-color);
    font-size: 13px; line-height: 1.55;
    word-break: break-word;
}
.ei-hst-turn--user {
    border-left-color: #fbbf24;
    background: rgba(251, 191, 36, 0.06);
}
.ei-hst-turn__meta {
    display: flex; justify-content: space-between; align-items: baseline;
    font-size: 10px; font-weight: 700;
    letter-spacing: 0.08em;
    margin-bottom: 5px;
}
.ei-hst-turn__meta strong {
    color: color-mix(in srgb, var(--ag-color) 85%, white);
    text-transform: uppercase;
}
.ei-hst-turn--user .ei-hst-turn__meta strong { color: #fcd34d; }
.ei-hst-turn__meta span { color: var(--ink-dim); font-weight: 500; }
.ei-hst-turn__text {
    color: var(--ink);
    font-size: 13px;
    word-break: break-word;
    overflow-wrap: anywhere;
}
.ei-hst-turn__text strong { color: color-mix(in srgb, var(--ag-color) 85%, white); }
.ei-hst-turn__text a { color: var(--brand-2); }

@media (max-width: 540px) {
    .ei-history__panel { max-width: 100%; border-left: 0; }
    .ei-history__danger span { display: none; }
}

/* ════════════════════════════════════════════════════════════════════
   CONTACTS PANEL — Eto's inbox (slide-in from right)
   ════════════════════════════════════════════════════════════════════ */
.ei-contacts {
    position: fixed; inset: 0; z-index: 215;
    display: flex; justify-content: flex-end;
    pointer-events: none;
    visibility: hidden;
}
.ei-contacts.is-open { pointer-events: auto; visibility: visible; }
.ei-contacts__bd {
    position: absolute; inset: 0;
    background: rgba(3, 7, 18, 0.7);
    backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    opacity: 0;
    transition: opacity 240ms ease;
}
.ei-contacts.is-open .ei-contacts__bd { opacity: 1; }
.ei-contacts__panel {
    position: relative;
    width: 100%; max-width: 540px;
    height: 100%;
    background: var(--bg-1);
    border-left: 1px solid var(--line);
    display: flex; flex-direction: column;
    transform: translateX(100%);
    transition: transform 320ms cubic-bezier(0.32, 0.72, 0, 1);
}
.ei-contacts.is-open .ei-contacts__panel { transform: translateX(0); }

.ei-contacts__head {
    display: flex; align-items: center; gap: 10px;
    padding: 20px 22px;
    border-bottom: 1px solid var(--line);
    background: linear-gradient(180deg, rgba(52, 211, 153, 0.1), transparent);
    flex: none;
}
.ei-contacts__head > div { flex: 1; min-width: 0; }
.ei-contacts__title {
    font-family: var(--font-display);
    font-size: 20px; font-weight: 700;
    margin: 0;
    color: var(--ink);
}
.ei-contacts__sub {
    font-size: 11px; color: var(--ink-mut);
    margin: 4px 0 0;
    letter-spacing: 0.04em;
}
.ei-contacts__refresh,
.ei-contacts__close {
    flex: none;
    width: 36px; height: 36px;
    border: 0; background: transparent;
    color: var(--ink-mut);
    border-radius: 10px;
    display: grid; place-items: center;
    cursor: pointer;
    transition: background 150ms ease, color 150ms ease;
}
.ei-contacts__refresh svg, .ei-contacts__close svg { width: 16px; height: 16px; }
.ei-contacts__refresh:hover, .ei-contacts__close:hover { background: rgba(255,255,255,0.06); color: var(--ink); }

.ei-contacts__body {
    flex: 1; min-height: 0;
    overflow-y: auto;
    padding: 16px 18px;
    display: flex; flex-direction: column; gap: 10px;
    scrollbar-width: thin;
    scrollbar-color: rgba(52, 211, 153, 0.4) transparent;
}
.ei-contacts__body::-webkit-scrollbar { width: 6px; }
.ei-contacts__body::-webkit-scrollbar-thumb {
    background: rgba(52, 211, 153, 0.45);
    border-radius: 8px;
}

.ei-contacts__loading {
    text-align: center;
    color: var(--ink-mut);
    font-size: 13px;
    padding: 40px 20px;
}

/* Contact card */
.ei-cnt-card {
    background: var(--bg-1);
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 14px 16px;
    transition: border-color 180ms ease, transform 180ms ease;
}
.ei-cnt-card:hover { border-color: var(--line-2); transform: translateY(-1px); }
.ei-cnt-card--new {
    border-color: rgba(52, 211, 153, 0.45);
    background: linear-gradient(165deg, rgba(52, 211, 153, 0.08), var(--bg-1) 70%);
}
.ei-cnt-card--seen { opacity: 0.85; }
.ei-cnt-card--contacted { opacity: 0.75; border-color: rgba(99, 102, 241, 0.3); }
.ei-cnt-card--closed { opacity: 0.55; }
.ei-cnt-card.is-call { border-color: rgba(245, 158, 11, 0.4); }

.ei-cnt-card__head {
    display: flex; align-items: center; gap: 10px;
    margin-bottom: 8px;
}
.ei-cnt-card__avatar {
    flex: none;
    width: 36px; height: 36px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--brand), var(--brand-2));
    color: #fff;
    display: grid; place-items: center;
    font-family: var(--font-display);
    font-size: 16px; font-weight: 800;
}
.ei-cnt-card__id { flex: 1; min-width: 0; }
.ei-cnt-card__name {
    font-size: 14px; font-weight: 800;
    color: var(--ink);
    line-height: 1.2;
    display: flex; align-items: center; gap: 6px;
}
.ei-cnt-card__type {
    font-size: 9px; font-weight: 700;
    letter-spacing: 0.1em; text-transform: uppercase;
    background: rgba(245, 158, 11, 0.18);
    color: #fcd34d;
    padding: 2px 6px; border-radius: 6px;
}
.ei-cnt-card__contact {
    display: flex; flex-wrap: wrap; gap: 8px;
    margin-top: 4px;
    font-size: 11px;
}
.ei-cnt-card__contact a {
    color: var(--ink-mut);
    text-decoration: none;
}
.ei-cnt-card__contact a:hover { color: var(--ink); }
.ei-cnt-card__date {
    flex: none;
    font-size: 10px;
    color: var(--ink-dim);
}
.ei-cnt-card__msg {
    margin: 8px 0 10px;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--line);
    border-radius: 8px;
    font-size: 13px;
    line-height: 1.55;
    color: var(--ink);
    word-break: break-word;
}
.ei-cnt-card__foot {
    display: flex; align-items: center; gap: 10px;
    padding-top: 8px;
    border-top: 1px dashed var(--line);
}
.ei-cnt-card__status {
    flex: none;
    font-size: 9px; font-weight: 700;
    letter-spacing: 0.14em; text-transform: uppercase;
    padding: 3px 8px; border-radius: 999px;
}
.ei-cnt-card__status--new       { background: rgba(52, 211, 153, 0.18); color: #6ee7b7; }
.ei-cnt-card__status--seen      { background: rgba(99, 102, 241, 0.18); color: #c7d2fe; }
.ei-cnt-card__status--contacted { background: rgba(245, 158, 11, 0.18); color: #fcd34d; }
.ei-cnt-card__status--closed    { background: rgba(148, 163, 184, 0.18); color: #94a3b8; }

.ei-cnt-card__actions {
    margin-left: auto;
    display: flex; gap: 4px;
}
.ei-cnt-card__actions button {
    width: 28px; height: 28px;
    border: 1px solid var(--line);
    background: transparent;
    color: var(--ink-mut);
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    transition: background 150ms ease, color 150ms ease, border-color 150ms ease;
}
.ei-cnt-card__actions button:hover {
    background: rgba(255, 255, 255, 0.06);
    color: var(--ink);
    border-color: var(--line-2);
}

@media (max-width: 540px) {
    .ei-contacts__panel { max-width: 100%; border-left: 0; }
}

/* ──────── Highlight state — driven by agent's [[HIGHLIGHT:...]] marker ──────── */
.ei-sect, .ei-scene, .ei-core, .ei-topics, .ei-closing, .ei-seo {
    transition: border-color 350ms ease, box-shadow 350ms ease, transform 350ms ease;
}

.is-highlighted {
    --hl-color: #6366f1;
    position: relative;
    border-color: var(--hl-color) !important;
    animation: ei-hl-pulse 2.4s ease-in-out infinite;
    z-index: 5;
}
.is-highlighted::after {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: inherit;
    border: 2px solid var(--hl-color);
    pointer-events: none;
    box-shadow: 0 0 30px color-mix(in srgb, var(--hl-color) 60%, transparent),
                inset 0 0 30px color-mix(in srgb, var(--hl-color) 18%, transparent);
    animation: ei-hl-frame 2.4s ease-in-out infinite;
}
.is-highlighted::before {
    content: '';
    position: absolute;
    top: -10px; right: -10px;
    width: 18px; height: 18px;
    border-radius: 50%;
    background: var(--hl-color);
    box-shadow: 0 0 18px var(--hl-color),
                0 0 36px color-mix(in srgb, var(--hl-color) 70%, transparent);
    animation: ei-hl-dot 1.8s ease-in-out infinite;
    z-index: 11;
}

@keyframes ei-hl-pulse {
    0%, 100% { box-shadow: 0 0 0 1px color-mix(in srgb, var(--hl-color) 30%, transparent),
                            0 0 60px -10px color-mix(in srgb, var(--hl-color) 50%, transparent); }
    50%      { box-shadow: 0 0 0 2px color-mix(in srgb, var(--hl-color) 50%, transparent),
                            0 0 100px -10px color-mix(in srgb, var(--hl-color) 70%, transparent); }
}
@keyframes ei-hl-frame {
    0%, 100% { opacity: 0.55; transform: scale(1); }
    50%      { opacity: 1;    transform: scale(1.005); }
}
@keyframes ei-hl-dot {
    0%, 100% { transform: scale(1);   opacity: 0.85; }
    50%      { transform: scale(1.3); opacity: 1; }
}

/* The .ei-core has multiple rows — when highlighted, also tint the rows */
.ei-core.is-highlighted .ei-core__row {
    border-color: color-mix(in srgb, var(--hl-color) 45%, transparent);
}

/* Closing line */
.ei-closing {
    margin-top: 56px;
    text-align: center;
    padding: 40px 32px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(236, 72, 153, 0.06));
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius);
    position: relative;
    overflow: hidden;
}
.ei-closing__mark {
    font-family: var(--font-ui);
    font-size: 80px;
    line-height: 1;
    color: rgba(255, 255, 255, 0.08);
    display: block;
    margin-bottom: -8px;
}
.ei-closing__text {
    font-family: var(--font-display); /* Noto Serif Georgian — closing quote feel */
    font-size: clamp(18px, 2.4vw, 26px);
    font-weight: 600;
    font-style: italic;
    letter-spacing: -0.005em;
    line-height: 1.5;
    margin: 0 auto;
    max-width: 720px;
    padding-bottom: 0.05em;
    background: linear-gradient(135deg, #fff 0%, #c7d2fe 60%, #f0abfc 100%);
    -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* ──────────── Agent grid ──────────── */
.ei-team {
    max-width: var(--maxw);
    margin: 0 auto 80px;
    padding: 0 24px;
}
@media (min-width: 768px) { .ei-team { padding: 0 32px; } }
.ei-team__head { text-align: center; margin-bottom: 36px; }
.ei-team__title {
    font-family: var(--font-ui);
    font-size: clamp(26px, 3.5vw, 38px);
    font-weight: 800;
    letter-spacing: -0.02em;
    margin: 0 0 10px;
}
.ei-team__sub { color: var(--ink-mut); margin: 0; font-size: 15px; }

.ei-team__grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px;
}
/* Cards flow and wrap; an incomplete last row centers itself (no orphan gap).
   11 agents → e.g. 4 + 4 + 3, last row centered. */
.ei-team__grid .ei-card { flex: 1 1 230px; max-width: 300px; }
@media (min-width: 1100px){ .ei-team__grid { gap: 20px; } }

.ei-card {
    position: relative;
    text-align: left;
    padding: 24px 22px 22px;
    background: linear-gradient(165deg, color-mix(in srgb, var(--ag-color) 12%, var(--bg-1)), var(--bg-1) 60%);
    border: 1px solid color-mix(in srgb, var(--ag-color) 25%, var(--line));
    border-radius: 22px;
    color: var(--ink);
    overflow: hidden;
    transition: transform 200ms ease, border-color 200ms ease, box-shadow 200ms ease;
    display: flex; flex-direction: column; gap: 10px;
    min-height: 240px;
}
.ei-card__halo {
    position: absolute;
    top: -50%; right: -30%;
    width: 240px; height: 240px;
    border-radius: 50%;
    background: radial-gradient(circle, var(--ag-color), transparent 65%);
    opacity: 0.18;
    pointer-events: none;
    transition: opacity 250ms ease, transform 400ms ease;
}
.ei-card:hover {
    transform: translateY(-4px);
    border-color: color-mix(in srgb, var(--ag-color) 60%, var(--line));
    box-shadow: 0 24px 60px -20px color-mix(in srgb, var(--ag-color) 40%, transparent);
}
.ei-card:hover .ei-card__halo { opacity: 0.32; transform: scale(1.05); }

/* Active card — currently selected agent in main block */
.ei-card.is-active {
    border-color: var(--ag-color);
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--ag-color) 30%, transparent),
                0 24px 60px -20px color-mix(in srgb, var(--ag-color) 50%, transparent);
}
.ei-card.is-active .ei-card__halo { opacity: 0.4; }

.ei-card__icon {
    width: 48px; height: 48px;
    border-radius: 14px;
    display: grid; place-items: center;
    background: color-mix(in srgb, var(--ag-color) 20%, transparent);
    border: 1px solid color-mix(in srgb, var(--ag-color) 45%, transparent);
    color: var(--ag-color);
}
.ei-card__icon svg { width: 24px; height: 24px; }
.ei-card__name {
    font-family: var(--font-ui);
    font-size: 18px; font-weight: 800; letter-spacing: -0.01em;
    margin-top: 4px;
}
.ei-card__role {
    font-size: 11px; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.12em;
    color: color-mix(in srgb, var(--ag-color) 80%, white);
}
.ei-card__tag { font-size: 13px; color: var(--ink-mut); flex: 1; }
.ei-card__cta {
    display: inline-flex; align-items: center; gap: 6px;
    margin-top: 6px;
    font-size: 12px; font-weight: 700; letter-spacing: 0.06em;
    color: var(--ag-color);
}
.ei-card__cta svg { width: 14px; height: 14px; transition: transform 200ms ease; }
.ei-card:hover .ei-card__cta svg { transform: translateX(4px); }

/* ──────────── Pitch ──────────── */
.ei-pitch {
    max-width: 880px;
    margin: 0 auto 100px;
    padding: 56px 28px;
    text-align: center;
    border-radius: var(--radius);
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.12), rgba(236, 72, 153, 0.08));
    border: 1px solid rgba(255, 255, 255, 0.12);
    margin-left: 24px; margin-right: 24px;
}
@media (min-width: 768px) {
    .ei-pitch { padding: 80px 56px; margin-left: auto; margin-right: auto; }
}
.ei-pitch__title {
    font-family: var(--font-ui);
    font-size: clamp(24px, 3.5vw, 38px);
    font-weight: 800;
    line-height: 1.2; letter-spacing: -0.02em;
    margin: 0 0 12px;
}
.ei-pitch__sub {
    color: var(--ink-mut);
    font-size: clamp(15px, 1.5vw, 18px);
    margin: 0 0 32px;
}
.ei-pitch__cta {
    display: inline-flex; padding: 16px 40px;
    background: linear-gradient(135deg, var(--brand) 0%, var(--brand-3) 100%);
    color: #fff; border: 0; border-radius: 16px;
    font-weight: 700; font-size: 15px;
    letter-spacing: 0.02em;
    box-shadow: 0 16px 40px -8px rgba(236, 72, 153, 0.5);
    transition: transform 200ms ease, box-shadow 200ms ease;
}
.ei-pitch__cta:hover  { transform: translateY(-2px); box-shadow: 0 24px 56px -10px rgba(236, 72, 153, 0.65); }

/* ──────────── Footer ──────────── */
.ei-foot {
    text-align: center; padding: 28px 24px 36px;
    color: var(--ink-dim); font-size: 12px; letter-spacing: 0.08em;
}

/* ──────────── (slide-in panel removed — single dynamic main block now) ──────────── */

/* ──────────── Tablet/desktop tweaks ──────────── */
@media (max-width: 480px) {
    .ei-hero { padding: 40px 20px 32px; }
    .ei-main { padding: 24px 20px; margin: 16px 20px 48px; border-radius: 20px; }
    .ei-pres, .ei-team { padding: 0 20px; }
    .ei-pitch { margin-left: 20px; margin-right: 20px; padding: 40px 24px; }
    .ei-top { padding: 14px 20px; }
}

/* ════════════════════════════════════════════════════════════════════
   DESKTOP / LAPTOP ONLY — phones & small touch devices get a full-screen
   notice. Needs the .ei-deskonly markup on the page (added to index.php,
   p/index.php incl. the gate screen). Hidden by default; shown on small/
   touch screens. Uses a real inner card so the text wraps reliably.
   ════════════════════════════════════════════════════════════════════ */
.ei-deskonly { display: none; }
@media (max-width: 768px), (pointer: coarse) and (max-width: 1080px) {
    html, body { overflow: hidden !important; height: 100%; }
    .ei-deskonly {
        display: flex !important;
        flex-direction: column;
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        z-index: 2147483600;
        align-items: center;
        justify-content: center;
        padding: 24px;
        box-sizing: border-box;
        overflow: hidden;
        background:
            radial-gradient(900px 520px at 80% -10%, rgba(99, 102, 241, 0.28), transparent 60%),
            radial-gradient(700px 480px at 0% 110%, rgba(236, 72, 153, 0.20), transparent 55%),
            #07071a;
        font-family: 'Noto Sans Georgian', 'PT Sans', system-ui, -apple-system, sans-serif;
    }
    .ei-deskonly__card { width: min(420px, 86vw); max-width: 100%; text-align: center; }
    .ei-deskonly__icon { font-size: 46px; line-height: 1; margin-bottom: 16px; }
    .ei-deskonly__ka { font-size: 16px; line-height: 1.6; font-weight: 700; color: #f8fafc; margin: 0 0 14px; overflow-wrap: anywhere; }
    .ei-deskonly__en { font-size: 13.5px; line-height: 1.6; font-weight: 600; color: #94a3b8; margin: 0; overflow-wrap: anywhere; }
}
