/* Linux Latin America Chat - visual theme inspired by provided mock */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --font-display: "Aptos Display", "Segoe UI Variable", "Inter", "Segoe UI", sans-serif;
    --font-body: "IBM Plex Sans", "Inter", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
    --space-1: 6px;
    --space-2: 10px;
    --space-3: 14px;
    --space-4: 18px;
    --space-5: 24px;
    --space-6: 32px;
    --radius-sm: 10px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-pill: 999px;
    --bg-dark: #040a18;
    --bg-panel: rgba(8, 18, 38, 0.82);
    --bg-panel-strong: rgba(10, 25, 52, 0.9);
    --surface-1: rgba(10, 24, 46, 0.78);
    --surface-2: rgba(9, 20, 39, 0.84);
    --surface-3: rgba(8, 16, 31, 0.9);
    --bg-user: rgba(19, 64, 113, 0.55);
    --cyan: #63d8ff;
    --cyan-strong: #21beff;
    --cyan-dark: #0f9fd8;
    --text: #e9f1ff;
    --text-dim: #94a7c6;
    --text-soft: #aac3e2;
    --border: rgba(122, 206, 255, 0.28);
    --border-strong: rgba(122, 206, 255, 0.48);
    --ring-focus: rgba(107, 191, 246, 0.36);
    --shadow: 0 16px 44px rgba(3, 11, 28, 0.5);
    --shadow-soft: 0 12px 30px rgba(2, 10, 24, 0.34);
}

html,
body {
    width: 100%;
    height: 100%;
    overflow: hidden;
}

body {
    position: relative;
    display: flex;
    flex-direction: column;
    color: var(--text);
    font-family: var(--font-body);
    font-feature-settings: "cv02" 1, "cv03" 1, "ss01" 1;
    line-height: 1.5;
    letter-spacing: 0.002em;
    background:
        radial-gradient(1200px 540px at 12% -2%, rgba(47, 114, 210, 0.28), transparent 70%),
        radial-gradient(900px 620px at 90% 28%, rgba(0, 196, 255, 0.16), transparent 65%),
        linear-gradient(180deg, #08152b 0%, #040a18 62%, #030711 100%),
        url("bg-tech.svg") center/cover no-repeat;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    background: linear-gradient(90deg, rgba(2, 8, 20, 0.75) 0%, rgba(4, 11, 24, 0.42) 48%, rgba(6, 18, 35, 0.2) 100%);
    pointer-events: none;
    z-index: 1;
}

body::after {
    content: "";
    position: fixed;
    right: clamp(10px, 4vw, 60px);
    top: 150px;
    width: clamp(240px, 31vw, 520px);
    height: clamp(240px, 39vw, 620px);
    background: url("brain-circuit.svg") center/contain no-repeat;
    opacity: 0.74;
    filter: drop-shadow(0 0 24px rgba(75, 190, 255, 0.22));
    pointer-events: none;
    z-index: 2;
}

#circuit-canvas {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    opacity: 0.1;
    pointer-events: none;
    mix-blend-mode: screen;
}

.chat-header,
.chat-main,
.chat-input-container,
.chat-footer {
    position: relative;
    z-index: 3;
}

.chat-header {
    width: min(1260px, 92vw);
    margin: 22px auto 12px;
    padding: var(--space-4) var(--space-5);
    border-radius: 0 0 var(--radius-md) var(--radius-md);
    border: 1px solid rgba(126, 203, 255, 0.33);
    background:
        linear-gradient(180deg, rgba(26, 47, 80, 0.7), rgba(14, 30, 56, 0.78)),
        url("bg-tech.svg") center/cover no-repeat;
    box-shadow: var(--shadow-soft), inset 0 1px 0 rgba(170, 220, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.header-brand {
    display: flex;
    align-items: center;
    gap: var(--space-4);
}

.header-meta {
    display: inline-flex;
    align-items: center;
    gap: var(--space-3);
}

.assistant-status {
    height: 38px;
    border-radius: var(--radius-pill);
    border: 1px solid rgba(123, 211, 255, 0.3);
    background: rgba(8, 23, 48, 0.62);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0 12px;
    color: var(--text-soft);
    font-size: 0.8rem;
    letter-spacing: 0.012em;
    backdrop-filter: blur(8px);
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: var(--radius-pill);
    background: #39ec9a;
    box-shadow: 0 0 0 0 rgba(57, 236, 154, 0.35);
    animation: statusPulse 2.6s infinite;
}

.assistant-status.offline .status-dot {
    background: #f59e0b;
    box-shadow: none;
    animation: none;
}

.status-text {
    font-family: var(--font-display);
    font-size: 0.79rem;
    font-weight: 600;
}

.status-latency {
    color: #8daece;
    font-variant-numeric: tabular-nums;
}

@keyframes statusPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(57, 236, 154, 0.45);
    }
    70% {
        box-shadow: 0 0 0 5px rgba(57, 236, 154, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(57, 236, 154, 0);
    }
}

.logo-tux-img {
    width: 62px;
    height: 62px;
    border-radius: var(--radius-md);
    padding: 6px;
    background: rgba(4, 14, 31, 0.7);
    border: 1px solid rgba(145, 215, 255, 0.26);
    filter: drop-shadow(0 0 10px rgba(67, 178, 255, 0.2));
}

.brand-wordmark {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
}

.brand-name {
    display: inline-flex;
    align-items: baseline;
    gap: 10px;
    font-family: var(--font-display);
    font-size: clamp(1.2rem, 2.2vw, 2rem);
    font-weight: 700;
    letter-spacing: 0.012em;
    line-height: 1.05;
    text-shadow: 0 4px 16px rgba(10, 35, 68, 0.45);
    animation: wordmarkReveal 0.65s ease both;
}

.brand-name-main {
    color: #eef4ff;
}

.brand-name-accent {
    font-weight: 700;
    color: transparent;
    background: linear-gradient(92deg, #8be3ff 0%, #6ad3ff 40%, #bfe9ff 100%);
    -webkit-background-clip: text;
    background-clip: text;
}

.brand-tagline {
    font-family: var(--font-display);
    font-size: 0.7rem;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: #8fc2e6;
    opacity: 0.92;
}

.brand-accent-line {
    display: block;
    width: 100%;
    max-width: 278px;
    height: 2px;
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(113, 218, 255, 0.9) 0%, rgba(87, 187, 255, 0.65) 45%, rgba(58, 131, 203, 0.08) 100%);
    box-shadow: 0 0 16px rgba(96, 201, 255, 0.24);
    transform-origin: left center;
    animation: accentSweep 0.8s ease 0.12s both;
}

@keyframes wordmarkReveal {
    from {
        opacity: 0;
        transform: translateY(4px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes accentSweep {
    from {
        opacity: 0;
        transform: scaleX(0.2);
    }
    to {
        opacity: 1;
        transform: scaleX(1);
    }
}

.menu-icon {
    min-width: 52px;
    height: 50px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: rgba(7, 16, 31, 0.48);
    color: #d4e7ff;
    cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.menu-icon svg {
    width: 21px;
    height: 21px;
}

.menu-icon svg path {
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
}

.menu-icon:hover {
    border-color: var(--border-strong);
    background: rgba(14, 29, 56, 0.72);
    transform: translateY(-1px);
}

.command-palette-overlay {
    position: fixed;
    inset: 0;
    z-index: 20;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 84px 16px 24px;
    background: rgba(2, 8, 20, 0.62);
    backdrop-filter: blur(6px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.command-palette-overlay.is-open {
    opacity: 1;
    pointer-events: auto;
}

.command-palette {
    width: min(620px, 96vw);
    border-radius: 18px;
    border: 1px solid rgba(125, 206, 255, 0.32);
    background: linear-gradient(180deg, rgba(11, 27, 52, 0.95), rgba(7, 18, 39, 0.97));
    box-shadow: 0 22px 56px rgba(0, 0, 0, 0.48);
    padding: 14px;
}

.command-palette-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.command-palette-header h2 {
    font-family: var(--font-display);
    font-size: 0.95rem;
    font-weight: 620;
    color: #d9ecff;
}

.command-kbd {
    border-radius: 8px;
    border: 1px solid rgba(133, 201, 255, 0.34);
    background: rgba(14, 36, 67, 0.65);
    color: #afd3f8;
    font-family: var(--font-display);
    font-size: 0.74rem;
    padding: 3px 8px;
}

.command-search {
    width: 100%;
    border-radius: 12px;
    border: 1px solid rgba(124, 196, 255, 0.34);
    background: rgba(9, 24, 47, 0.86);
    color: #deeeff;
    font: inherit;
    font-size: 0.95rem;
    padding: 10px 12px;
    margin-bottom: 10px;
    outline: 0;
}

.command-search:focus {
    border-color: rgba(153, 222, 255, 0.72);
    box-shadow: 0 0 0 2px rgba(104, 184, 241, 0.18);
}

.command-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.command-item {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    border-radius: 12px;
    border: 1px solid rgba(110, 190, 255, 0.24);
    background: rgba(11, 30, 57, 0.56);
    color: #d0e6ff;
    text-align: left;
    cursor: pointer;
    transition: all 0.16s ease;
    padding: 11px 12px;
}

.command-item:hover,
.command-item.is-highlighted {
    border-color: rgba(145, 218, 255, 0.65);
    background: rgba(17, 42, 76, 0.78);
    transform: translateY(-1px);
}

.command-item-label {
    font-family: var(--font-display);
    font-size: 0.92rem;
}

.command-item-kbd {
    border-radius: 8px;
    border: 1px solid rgba(125, 194, 253, 0.38);
    color: #98c6ee;
    font-size: 0.73rem;
    min-width: 25px;
    height: 23px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(9, 26, 50, 0.7);
}

.chat-main {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    width: min(1260px, 94vw);
    margin: 8px auto 0;
    padding: 14px 0 12px;
}

.chat-main::-webkit-scrollbar {
    width: 8px;
}

.chat-main::-webkit-scrollbar-thumb {
    background: rgba(110, 201, 255, 0.38);
    border-radius: 999px;
}

.messages-container {
    width: min(920px, 100%);
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: var(--space-5);
}

.message-group {
    display: flex;
    gap: var(--space-3);
    align-items: flex-start;
    animation: slideIn 0.35s ease;
}

.message-group.user {
    flex-direction: row-reverse;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.message-avatar {
    flex-shrink: 0;
}

.avatar-bot-img {
    width: 84px;
    height: 84px;
    border-radius: var(--radius-pill);
    padding: var(--space-2);
    background: radial-gradient(circle at 50% 35%, rgba(59, 177, 255, 0.26), rgba(6, 22, 51, 0.8));
    border: 1px solid rgba(113, 203, 255, 0.35);
    box-shadow: 0 0 28px rgba(50, 175, 255, 0.32);
}

.avatar-user {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-pill);
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(155deg, rgba(32, 96, 164, 0.7), rgba(40, 81, 136, 0.7));
    border: 1px solid rgba(145, 210, 255, 0.4);
}

.message-bubble {
    flex: 1;
    max-width: 760px;
    border-radius: 26px;
    border: 1px solid var(--border);
    background: linear-gradient(175deg, rgba(17, 33, 61, 0.88), rgba(7, 18, 41, 0.84));
    backdrop-filter: blur(8px);
    box-shadow: 0 14px 28px rgba(2, 8, 22, 0.34), inset 0 1px 0 rgba(183, 222, 255, 0.05);
    padding: var(--space-5);
    line-height: 1.58;
}

.message-group.user .message-bubble {
    max-width: 680px;
    border-radius: var(--radius-md);
    border-color: rgba(146, 215, 255, 0.35);
    background: linear-gradient(180deg, rgba(19, 48, 86, 0.87), rgba(11, 26, 51, 0.9));
}

.message-bubble p {
    margin-bottom: var(--space-2);
    font-size: clamp(1rem, 1.1vw, 1.17rem);
    color: var(--text);
    line-height: 1.62;
}

.message-bubble p:last-child {
    margin-bottom: 0;
}

.message-bubble strong {
    font-family: var(--font-display);
    font-weight: 640;
}

.message-question {
    margin-top: 10px;
    color: var(--cyan);
    font-size: 1.08em;
}

.text-cyan {
    color: var(--cyan);
}

.quick-replies {
    margin-top: var(--space-4);
    display: grid;
    gap: var(--space-2);
}

.quick-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    text-align: left;
    border-radius: var(--radius-pill);
    padding: 13px 22px;
    font-size: clamp(0.98rem, 1.35vw, 1.15rem);
    color: #d8e8ff;
    border: 1px solid rgba(104, 194, 255, 0.34);
    background: linear-gradient(180deg, rgba(16, 35, 66, 0.8), rgba(8, 22, 44, 0.76));
    cursor: pointer;
    transition: border-color 0.18s ease, background 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.quick-btn:hover {
    border-color: rgba(120, 213, 255, 0.7);
    transform: translateY(-1px);
    box-shadow: 0 6px 14px rgba(14, 80, 136, 0.22);
}

.quick-icon {
    width: 26px;
    height: 26px;
    flex-shrink: 0;
    border-radius: var(--radius-pill);
    border: 1px solid rgba(122, 206, 255, 0.35);
    background: rgba(17, 49, 88, 0.45);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.quick-icon svg {
    width: 15px;
    height: 15px;
    stroke: #89dcff;
    stroke-width: 1.9;
    fill: none;
}

.quick-label {
    font-family: var(--font-display);
    letter-spacing: 0.003em;
}

.explore-panel {
    margin-top: 2px;
}

.explore-grid {
    margin-top: 14px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.explore-block {
    border: 1px solid rgba(111, 190, 255, 0.2);
    border-radius: 14px;
    background: rgba(10, 27, 51, 0.48);
    padding: 10px;
}

.explore-block h4 {
    font-family: var(--font-display);
    font-size: 0.82rem;
    color: #9ed4f9;
    margin: 0 0 8px;
    letter-spacing: 0.01em;
}

.explore-pill-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.explore-pill {
    border: 1px solid rgba(110, 192, 255, 0.26);
    border-radius: var(--radius-pill);
    background: rgba(9, 23, 46, 0.78);
    color: #c5ddf6;
    font-size: 0.76rem;
    font-family: var(--font-display);
    padding: 6px 10px;
    cursor: pointer;
    transition: all 0.14s ease;
}

.explore-pill:hover {
    border-color: rgba(148, 218, 255, 0.58);
    color: #e3f2ff;
}

.explore-pill.is-active {
    border-color: rgba(161, 226, 255, 0.86);
    color: #062744;
    background: linear-gradient(180deg, rgba(133, 216, 255, 0.96), rgba(102, 196, 243, 0.96));
}

.explore-profile-summary {
    margin-top: 11px;
    color: #9fc0df;
    font-size: 0.85rem;
    line-height: 1.45;
}

.route-grid {
    margin-top: 14px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
}

.route-card-btn {
    width: 100%;
    border: 1px solid rgba(109, 189, 255, 0.24);
    border-radius: 14px;
    background: linear-gradient(180deg, rgba(12, 31, 58, 0.72), rgba(8, 21, 42, 0.78));
    color: #d2e8ff;
    text-align: left;
    cursor: pointer;
    padding: 11px 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    transition: all 0.15s ease;
}

.route-card-btn:hover {
    border-color: rgba(146, 217, 255, 0.68);
    background: linear-gradient(180deg, rgba(16, 41, 75, 0.82), rgba(10, 26, 50, 0.82));
    transform: translateY(-1px);
}

.route-card-title {
    font-family: var(--font-display);
    font-size: 0.9rem;
}

.route-card-desc {
    color: #9ebddc;
    font-size: 0.8rem;
    line-height: 1.35;
}

.explore-note {
    margin-top: 12px;
    color: #89a8ca;
    font-size: 0.8rem;
}

.learning-plan {
    margin-top: 2px;
}

.ai-insight {
    border: 1px solid rgba(120, 198, 255, 0.26);
    border-radius: 12px;
    background: rgba(11, 30, 57, 0.56);
    padding: 10px 11px;
}

.learning-plan-meta {
    margin-top: 8px;
    color: #9bc0df;
    font-size: 0.86rem;
}

.plan-scope-list {
    margin-top: 10px;
    padding-left: 18px;
    color: #c0dcf5;
    font-size: 0.88rem;
    line-height: 1.45;
    display: grid;
    gap: 4px;
}

.problem-phase-grid {
    margin-top: 12px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.problem-phase {
    border: 1px solid rgba(109, 189, 255, 0.22);
    border-radius: 12px;
    background: rgba(9, 25, 48, 0.6);
    padding: 10px;
}

.problem-phase ul {
    margin: 6px 0 0;
    padding-left: 16px;
    color: #c6def6;
    font-size: 0.84rem;
    line-height: 1.4;
    display: grid;
    gap: 5px;
}

.plan-weeks {
    margin-top: 12px;
    display: grid;
    gap: 8px;
}

.plan-week {
    border: 1px solid rgba(108, 188, 255, 0.22);
    border-radius: 12px;
    background: rgba(9, 25, 48, 0.58);
    padding: 10px 11px;
}

.plan-week-label {
    display: inline-block;
    margin-bottom: 4px;
    font-family: var(--font-display);
    font-size: 0.8rem;
    color: #88c7f2;
}

.plan-week p {
    margin: 0;
    font-size: 0.9rem;
}

.plan-deliverable {
    margin-top: 10px;
    color: #b8d8f5;
    font-size: 0.88rem;
}

.explore-cta-row {
    margin-top: 14px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.explore-cta-btn {
    border: 1px solid rgba(118, 196, 255, 0.34);
    border-radius: var(--radius-pill);
    background: rgba(10, 29, 55, 0.72);
    color: #d6eafc;
    font-family: var(--font-display);
    font-size: 0.82rem;
    padding: 8px 12px;
    cursor: pointer;
    transition: all 0.14s ease;
}

.explore-cta-btn:hover {
    border-color: rgba(152, 220, 255, 0.68);
    background: rgba(13, 38, 68, 0.8);
}

.typing-indicator {
    display: flex;
    gap: 6px;
    padding: 4px 2px;
}

.typing-meta {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.typing-label {
    color: #99c7e8;
    font-size: 0.86rem;
    letter-spacing: 0.01em;
}

.typing-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--cyan);
    opacity: 0.7;
    animation: bounce 1.2s infinite;
}

.typing-dot:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-dot:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); opacity: 0.4; }
    45% { transform: translateY(-6px); opacity: 1; }
}

.back-to-menu {
    margin-top: 14px;
}

.menu-btn-back {
    border: 1px solid rgba(105, 191, 255, 0.45);
    background: rgba(14, 40, 73, 0.56);
    color: #d1e6ff;
    border-radius: var(--radius-pill);
    padding: 10px 16px;
    display: inline-flex;
    gap: 10px;
    align-items: center;
    cursor: pointer;
}

.menu-btn-back:hover {
    background: rgba(18, 55, 96, 0.75);
}

.chat-input-container {
    width: min(1260px, 94vw);
    margin: 10px auto 0;
    padding: 10px 0 8px;
}

.input-wrapper {
    width: min(760px, 100%);
    margin: 0 auto;
    border-radius: var(--radius-pill);
    border: 1px solid var(--border);
    background: linear-gradient(180deg, rgba(8, 20, 42, 0.84), rgba(5, 15, 35, 0.9));
    box-shadow: 0 8px 20px rgba(3, 12, 31, 0.34), inset 0 1px 0 rgba(168, 221, 255, 0.05);
    padding: var(--space-2) 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.input-wrapper:focus-within {
    border-color: var(--border-strong);
    box-shadow: 0 0 0 2px var(--ring-focus), 0 8px 18px rgba(3, 15, 38, 0.34);
}

.attach-btn {
    width: 42px;
    height: 42px;
    border-radius: var(--radius-pill);
    border: 0;
    background: transparent;
    color: var(--cyan-strong);
    font-size: 1.9rem;
    line-height: 1;
    cursor: pointer;
}

.chat-textarea {
    flex: 1;
    border: 0;
    outline: 0;
    resize: none;
    max-height: 220px;
    color: #dce9ff;
    background: transparent;
    font: inherit;
    font-size: clamp(1rem, 1.25vw, 1.1rem);
    line-height: 1.4;
    padding: 8px 4px;
}

.chat-textarea::placeholder {
    color: rgba(165, 183, 210, 0.72);
}

.send-btn {
    width: 46px;
    height: 46px;
    border-radius: var(--radius-pill);
    border: 0;
    cursor: pointer;
    color: #5cf0f7;
    background: radial-gradient(circle at 35% 25%, rgba(76, 202, 255, 0.5), rgba(11, 71, 126, 0.4));
    box-shadow: 0 0 10px rgba(88, 193, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}

.send-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 0 14px rgba(88, 193, 255, 0.26);
    filter: brightness(1.04);
}

.send-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.send-icon {
    width: 21px;
    height: 21px;
}

.smart-chips {
    width: min(760px, 100%);
    margin: 10px auto 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.smart-chip-btn {
    border: 1px solid rgba(109, 193, 255, 0.32);
    background: rgba(11, 29, 55, 0.58);
    color: #c7dcf6;
    border-radius: var(--radius-pill);
    font-family: var(--font-display);
    font-size: 0.82rem;
    letter-spacing: 0.004em;
    padding: 7px 12px;
    cursor: pointer;
    transition: all 0.16s ease;
}

.smart-chip-btn:hover {
    transform: translateY(-1px);
    border-color: rgba(139, 214, 255, 0.62);
    color: #e2f3ff;
    background: rgba(16, 41, 77, 0.72);
}

button:focus-visible,
.smart-chip-btn:focus-visible,
.quick-btn:focus-visible,
.menu-icon:focus-visible,
.send-btn:focus-visible,
.menu-btn-back:focus-visible,
.explore-cta-btn:focus-visible {
    outline: none;
    box-shadow: 0 0 0 2px var(--ring-focus);
}

.chat-footer {
    width: min(1260px, 94vw);
    margin: 0 auto 12px;
    text-align: center;
    color: #7f95b6;
    font-size: 0.8rem;
    letter-spacing: 0.01em;
    padding: 4px 8px;
}

.chat-footer a {
    color: #8ed6ff;
    text-decoration: none;
}

.chat-footer a:hover {
    color: #bae9ff;
}

@media (max-width: 980px) {
    body::after {
        opacity: 0.5;
        right: -50px;
        top: 180px;
        width: 320px;
    }

    .chat-header {
        margin-top: 14px;
        padding: 12px 14px;
        width: min(1260px, 94vw);
    }

    .logo-tux-img {
        width: 50px;
        height: 50px;
    }

    .brand-wordmark {
        gap: 1px;
    }

    .brand-name {
        font-size: clamp(1.05rem, 2vw, 1.45rem);
        gap: 8px;
    }

    .brand-tagline {
        font-size: 0.66rem;
        letter-spacing: 0.1em;
    }

    .brand-accent-line {
        max-width: 210px;
    }

    .header-brand {
        min-width: 0;
        gap: 10px;
    }

    .header-meta {
        flex-shrink: 0;
    }

    .menu-icon {
        min-width: 46px;
        height: 42px;
    }

    .assistant-status {
        height: 34px;
        padding: 0 10px;
        font-size: 0.78rem;
    }

    .status-latency {
        display: none;
    }

    .command-palette-overlay {
        padding-top: 70px;
    }

    .message-bubble {
        border-radius: 24px;
        padding: 16px;
    }

    .avatar-bot-img {
        width: 64px;
        height: 64px;
    }

    .quick-btn {
        padding: 12px 16px;
    }

    .explore-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .problem-phase-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .assistant-status {
        display: none;
    }

    .chat-header {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: center;
        gap: 10px;
    }

    .header-meta {
        gap: 0;
    }

    .menu-icon {
        min-width: 44px;
        width: 44px;
        height: 40px;
    }
}

@media (max-width: 640px) {
    body::after {
        opacity: 0.28;
        right: -90px;
        top: 240px;
    }

    .chat-main {
        width: 96vw;
        padding-top: 8px;
    }

    .header-meta {
        gap: 8px;
    }

    .brand-name {
        font-size: clamp(0.98rem, 4.5vw, 1.2rem);
        gap: 5px;
    }

    .brand-tagline {
        display: none;
    }

    .brand-accent-line {
        max-width: 138px;
    }

    .assistant-status {
        max-width: 165px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .command-palette {
        padding: 12px;
    }

    .command-item-label {
        font-size: 0.88rem;
    }

    .messages-container {
        gap: 16px;
    }

    .message-group {
        gap: 10px;
    }

    .avatar-user {
        width: 36px;
        height: 36px;
    }

    .avatar-bot-img {
        width: 54px;
        height: 54px;
    }

    .chat-input-container,
    .chat-footer {
        width: 96vw;
    }

    .input-wrapper {
        border-radius: 22px;
    }

    .smart-chips {
        margin-top: 8px;
        gap: 7px;
    }

    .smart-chip-btn {
        font-size: 0.78rem;
        padding: 6px 10px;
    }

    .explore-grid,
    .route-grid,
    .problem-phase-grid {
        grid-template-columns: 1fr;
    }
}

@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}
