:root {
    --aimc-gold: #e8ad2e;
    --aimc-gold-soft: #bd8114;
    --aimc-bg: #030708;
    --aimc-panel: #080b0c;
    --aimc-field: #141416;
    --aimc-text: #f5f0e5;
    --aimc-muted: #c9c0ae;
}

body.aimc-chat-page {
    background: var(--aimc-bg) !important;
    color: var(--aimc-text);
}

.aimc-chat-page * { box-sizing: border-box; }

.aimc-chat-nav {
    width: 100%;
    border-bottom: 1px solid rgba(232, 173, 46, .22);
    background: rgba(5, 8, 9, .98);
}

.aimc-chat-nav__inner {
    width: min(100% - 32px, 1220px);
    min-height: 62px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.aimc-chat-nav__link {
    color: #d9d4ca;
    font: 600 14px/1.2 Arial, sans-serif;
    text-decoration: none;
    transition: color .2s ease;
}

.aimc-chat-nav__link:hover,
.aimc-chat-nav__link.is-active { color: var(--aimc-gold); }

.aimc-chat-nav__language {
    min-width: 30px;
    padding: 7px 6px;
    border: 1px solid var(--aimc-gold-soft);
    border-radius: 6px;
    text-align: center;
    font-size: 11px;
}

.aimc-chat-nav__language.is-current {
    color: #111;
    background: var(--aimc-gold);
}

.aimc-chat-shell {
    width: min(100% - 32px, 1220px);
    margin: 24px auto 24px;
}

.aimc-chat-hero {
    position: relative;
    height: 245px;
    min-height: 245px;
    overflow: hidden;
    border-radius: 3px;
    isolation: isolate;
    background: #090806;
}

.aimc-chat-hero__image,
.aimc-chat-hero__shade {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.aimc-chat-hero__image {
    z-index: -2;
    object-fit: cover;
    object-position: center;
}

.aimc-chat-hero__shade {
    z-index: -1;
    background: linear-gradient(90deg, rgba(3,5,5,.96) 0%, rgba(3,5,5,.78) 33%, rgba(3,5,5,.18) 58%, rgba(3,5,5,.06) 100%);
}

.aimc-chat-hero__copy {
    width: min(59%, 690px);
    padding: 27px 38px 22px;
}

.aimc-chat-eyebrow {
    margin-bottom: 8px;
    color: var(--aimc-gold);
    font: 800 14px/1.2 Georgia, serif;
    letter-spacing: .07em;
}

.aimc-chat-hero h1 {
    margin: 0 0 5px;
    color: #fff;
    font: 700 clamp(42px, 4.4vw, 56px)/.98 Georgia, serif;
}

.aimc-chat-hero p {
    max-width: 670px;
    margin: 0;
    color: #f4efe5;
    font: 600 clamp(16px, 1.5vw, 20px)/1.4 Georgia, serif;
}

.aimc-chat-script {
    margin-top: 14px;
    color: #ffc435;
    font: italic 600 clamp(21px, 2vw, 26px)/1.2 cursive;
}

.aimc-chat-panel {
    margin-top: 12px;
    padding: 18px;
    border: 1px solid var(--aimc-gold-soft);
    border-radius: 10px;
    background: rgba(5, 9, 10, .96);
    box-shadow: 0 18px 60px rgba(0,0,0,.28);
}

.aimc-chat-panel > header {
    display: flex;
    align-items: center;
    gap: 9px;
    margin: 0 0 13px;
    color: var(--aimc-gold);
    font: 800 13px/1.2 Georgia, serif;
    letter-spacing: .03em;
}

.aimc-chat-status-dot {
    width: 10px;
    height: 10px;
    flex: 0 0 auto;
    border-radius: 50%;
    background: #65da6a;
    box-shadow: 0 0 10px rgba(101,218,106,.7);
}

.aimc-chat-messages {
    height: clamp(190px, 21vh, 240px);
    overflow-y: auto;
    padding: 16px;
    border: 1px solid rgba(189,129,20,.62);
    border-radius: 6px;
    background: #05090a;
    scrollbar-color: var(--aimc-gold-soft) #111;
}

.aimc-chat-empty {
    min-height: 100%;
    display: grid;
    place-items: center;
    color: #d8cdb8;
    font: 500 17px/1.4 Georgia, serif;
    text-align: center;
}

.aimc-chat-message {
    display: flex;
    align-items: flex-start;
    gap: 11px;
    margin-bottom: 14px;
}

.aimc-chat-message__avatar {
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
    border-radius: 50%;
    object-fit: cover;
}

.aimc-chat-message__bubble {
    max-width: min(82%, 760px);
    padding: 10px 13px;
    border: 1px solid rgba(232,173,46,.22);
    border-radius: 4px 12px 12px;
    background: #111315;
}

.aimc-chat-message__meta {
    display: flex;
    gap: 12px;
    align-items: baseline;
    color: var(--aimc-gold);
    font: 600 13px/1.25 Arial, sans-serif;
}

.aimc-chat-message__meta time { color: #8f8a80; font-size: 11px; }
.aimc-chat-message__text { margin-top: 4px; color: #eee9df; font: 400 15px/1.45 Arial, sans-serif; }

.aimc-chat-status {
    min-height: 18px;
    padding: 3px 4px 0;
    color: #efb743;
    font: 600 12px/1.3 Arial, sans-serif;
}

.aimc-chat-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    align-items: stretch;
}

.aimc-chat-form textarea {
    width: 100%;
    min-height: 66px;
    resize: vertical;
    padding: 14px;
    border: 1px solid #3b3934;
    border-radius: 6px;
    outline: none;
    background: var(--aimc-field);
    color: #fff;
    font: 400 15px/1.4 Arial, sans-serif;
}

.aimc-chat-form textarea:focus {
    border-color: var(--aimc-gold);
    box-shadow: 0 0 0 2px rgba(232,173,46,.12);
}

.aimc-chat-form button,
.aimc-chat-login a {
    min-width: 126px;
    padding: 12px 22px;
    border: 0;
    border-radius: 999px;
    background: linear-gradient(180deg, #ffc342, #d99a1d);
    color: #171008;
    font: 800 15px/1 Arial, sans-serif;
    text-decoration: none;
    cursor: pointer;
}

.aimc-chat-form button:disabled { opacity: .62; cursor: wait; }

.aimc-chat-login {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 15px 17px;
    border-radius: 6px;
    background: #111315;
    color: var(--aimc-muted);
}

.aimc-chat-footer {
    width: min(100% - 32px, 1220px);
    margin: 0 auto 28px;
    padding-top: 19px;
    border-top: 1px solid rgba(232,173,46,.2);
    display: flex;
    justify-content: center;
    gap: 12px 26px;
    flex-wrap: wrap;
}

.aimc-chat-footer a { color: #a9a399; font: 500 13px Arial, sans-serif; text-decoration: none; }
.aimc-chat-footer a:hover { color: var(--aimc-gold); }

@media (max-width: 820px) {
    .aimc-chat-nav__inner { gap: 12px 16px; padding: 14px 0; }
    .aimc-chat-hero { height: 280px; min-height: 280px; }
    .aimc-chat-hero__image { object-position: 67% center; opacity: .62; }
    .aimc-chat-hero__shade { background: linear-gradient(90deg, rgba(3,5,5,.93), rgba(3,5,5,.62)); }
    .aimc-chat-hero__copy { width: 78%; padding: 37px 28px; }
}

@media (max-width: 560px) {
    .aimc-chat-shell { width: min(100% - 20px, 1220px); margin-top: 14px; }
    .aimc-chat-hero { height: 310px; min-height: 310px; }
    .aimc-chat-hero__copy { width: 100%; padding: 30px 22px; }
    .aimc-chat-hero p { max-width: 92%; font-size: 16px; }
    .aimc-chat-panel { padding: 12px; }
    .aimc-chat-messages { height: 210px; padding: 12px; }
    .aimc-chat-form { grid-template-columns: 1fr; }
    .aimc-chat-form button { min-height: 48px; }
    .aimc-chat-login { align-items: stretch; flex-direction: column; }
    .aimc-chat-login a { text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
    .aimc-chat-page * { scroll-behavior: auto !important; transition: none !important; }
}
