:root {
    --bg: #08121d;
    --panel: rgba(17, 29, 43, 0.9);
    --panel-soft: rgba(255, 255, 255, 0.06);
    --line: rgba(255, 255, 255, 0.13);
    --text: #f2f7fb;
    --muted: #9fb0c0;
    --cyan: #68d8ff;
    --green: #64e09d;
    --ink: #07111f;
    --font-heading: 'Space Grotesk', sans-serif;
    --font-body: 'Inter', sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    min-height: 100vh;
    font-family: var(--font-body);
    color: var(--text);
    background:
        linear-gradient(135deg, rgba(104, 216, 255, 0.14), transparent 30%),
        linear-gradient(220deg, rgba(100, 224, 157, 0.13), transparent 28%),
        #08121d;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
    background-size: 48px 48px;
    mask-image: linear-gradient(to bottom, #000, transparent 82%);
    pointer-events: none;
}

button,
input {
    font: inherit;
}

.page-shell {
    position: relative;
    width: min(1080px, calc(100% - 36px));
    min-height: 100vh;
    margin: 0 auto;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    gap: 18px;
    padding: 28px 0;
}

.pitch-strip,
.chat-shell {
    border: 1px solid var(--line);
    background: var(--panel);
    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.24);
    backdrop-filter: blur(18px);
}

.pitch-strip {
    display: grid;
    grid-template-columns: 1fr minmax(280px, 0.9fr);
    gap: 18px;
    align-items: end;
    padding: 24px 28px;
}

.eyebrow {
    grid-column: 1 / -1;
    color: var(--green);
    font-family: var(--font-heading);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

h1 {
    font-family: var(--font-heading);
    font-size: clamp(2.2rem, 4vw, 4.25rem);
    line-height: 1;
    letter-spacing: 0;
    text-wrap: balance;
}

.pitch-strip p:last-child {
    color: #d7e2ec;
    font-size: 1rem;
    line-height: 1.5;
}

.chat-shell {
    min-height: 0;
    display: grid;
    grid-template-rows: auto minmax(360px, 1fr) auto auto;
}

.chat-header {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: center;
    padding: 18px 22px;
    border-bottom: 1px solid var(--line);
}

.agent-id {
    display: flex;
    align-items: center;
    gap: 12px;
}

.avatar {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    color: var(--ink);
    background: linear-gradient(135deg, var(--green), var(--cyan));
    font-family: var(--font-heading);
    font-weight: 800;
}

.agent-name {
    font-family: var(--font-heading);
    font-size: 1.08rem;
    font-weight: 800;
}

.agent-subtitle {
    color: var(--muted);
    font-size: 0.9rem;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 7px 11px;
    color: var(--ink);
    background: linear-gradient(135deg, var(--green), var(--cyan));
    font-size: 0.82rem;
    font-weight: 800;
    white-space: nowrap;
}

.chat-log {
    min-height: 360px;
    max-height: min(54vh, 560px);
    overflow-y: auto;
    padding: 22px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.message {
    display: flex;
}

.message.user {
    justify-content: flex-end;
}

.bubble {
    width: fit-content;
    max-width: min(720px, 82%);
    padding: 14px 16px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.07);
}

.message.user .bubble {
    color: var(--ink);
    background: linear-gradient(135deg, rgba(100, 224, 157, 0.95), rgba(104, 216, 255, 0.95));
    border-color: transparent;
}

.bubble.highlight {
    border-color: rgba(104, 216, 255, 0.35);
    background:
        linear-gradient(135deg, rgba(104, 216, 255, 0.12), transparent 58%),
        rgba(255, 255, 255, 0.07);
}

.message-kicker {
    display: block;
    margin-bottom: 6px;
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.message.user .message-kicker {
    color: rgba(7, 17, 31, 0.72);
}

.bubble p {
    color: inherit;
    font-size: 1.02rem;
    line-height: 1.48;
}

.voice-control {
    min-height: 30px;
    margin-top: 12px;
    border: 0;
    border-bottom: 1px solid rgba(104, 216, 255, 0.52);
    color: var(--cyan);
    background: transparent;
    cursor: pointer;
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.voice-control:hover,
.voice-control:focus {
    color: var(--green);
    outline: none;
}

.voice-control:disabled {
    cursor: wait;
    opacity: 0.6;
}

.thinking-bubble {
    min-width: 92px;
}

.typing-dots {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    height: 22px;
}

.typing-dots span {
    width: 7px;
    height: 7px;
    border-radius: 999px;
    background: var(--muted);
    animation: typingPulse 1s infinite ease-in-out;
}

.typing-dots span:nth-child(2) {
    animation-delay: 0.16s;
}

.typing-dots span:nth-child(3) {
    animation-delay: 0.32s;
}

@keyframes typingPulse {
    0%,
    80%,
    100% {
        opacity: 0.36;
        transform: translateY(0);
    }

    40% {
        opacity: 1;
        transform: translateY(-3px);
    }
}

.prompt-panel {
    display: flex;
    gap: 9px;
    overflow-x: auto;
    padding: 16px 22px;
    border-top: 1px solid var(--line);
}

.prompt-panel button,
.composer-row button {
    min-height: 40px;
    border: 1px solid var(--line);
    color: var(--text);
    background: var(--panel-soft);
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 800;
    white-space: nowrap;
    transition: transform 0.16s ease, background 0.16s ease, border-color 0.16s ease;
}

.prompt-panel button {
    padding: 0 14px;
}

.prompt-panel button:hover,
.prompt-panel button:focus,
.composer-row button:hover,
.composer-row button:focus {
    transform: translateY(-1px);
    border-color: rgba(104, 216, 255, 0.65);
    background: rgba(104, 216, 255, 0.13);
    outline: none;
}

.prompt-panel button:disabled,
.composer-row button:disabled,
.composer-row input:disabled {
    cursor: wait;
    opacity: 0.62;
    transform: none;
}

.composer {
    padding: 0 22px 22px;
}

.composer label {
    display: block;
    margin-bottom: 8px;
    color: var(--muted);
    font-size: 0.84rem;
    font-weight: 800;
}

.composer-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 104px;
    gap: 10px;
}

.composer-row input {
    width: 100%;
    min-height: 44px;
    border: 1px solid var(--line);
    color: var(--text);
    background: rgba(255, 255, 255, 0.07);
    padding: 0 14px;
    outline: none;
}

.composer-row input:focus {
    border-color: rgba(100, 224, 157, 0.72);
}

.composer-row input::placeholder {
    color: rgba(215, 226, 236, 0.52);
}

.composer-row button {
    color: var(--ink);
    background: linear-gradient(135deg, var(--green), var(--cyan));
    border-color: transparent;
}

@media (max-width: 760px) {
    .page-shell {
        width: min(100% - 20px, 1080px);
        padding: 12px 0;
    }

    .pitch-strip {
        grid-template-columns: 1fr;
        padding: 18px;
    }

    .chat-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .chat-log {
        max-height: 52vh;
        padding: 16px;
    }

    .bubble {
        max-width: 92%;
    }

    .composer-row {
        grid-template-columns: 1fr;
    }
}
