/* OrionAIChat.Com — Vril Hosting aligned shell (subset of hosting gradients / tokens). */

:root {
    --card-bg: #ffffff;
    --bg-surface: #f8f9fa;
    --bg-body: #ffffff;
    --body-color: #1e293b;
    --secondary: #64748b;
    --muted: #94a3b8;
    --border-color: #e2e8f0;
    --primary: #667eea;
    --primary-rgb: 102, 126, 234;
    --accent: #764ba2;
    --accent-rgb: 118, 75, 162;
    --nav-height: 80px;
    color-scheme: light;
}

[data-bs-theme="dark"] {
    --card-bg: #1e293b;
    --bg-surface: #0f172a;
    --bg-body: #0a0f1a;
    --body-color: #f1f5f9;
    --secondary: #94a3b8;
    --muted: #64748b;
    --border-color: #334155;
    --primary: #818cf8;
    --primary-rgb: 129, 140, 248;
    --accent: #a78bfa;
    --accent-rgb: 167, 139, 250;
    color-scheme: dark;
}

@keyframes vril-gradient-shift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes vril-glow-pulse {
    0%, 100% { opacity: 0.4; transform: scale(1); }
    50% { opacity: 0.7; transform: scale(1.08); }
}

@keyframes vril-shimmer {
    0% { transform: translateX(-100%) rotate(45deg); }
    100% { transform: translateX(200%) rotate(45deg); }
}

@keyframes vril-slide-down {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes vril-fade-in-up {
    0% { opacity: 0; transform: translateY(36px); }
    100% { opacity: 1; transform: translateY(0); }
}

@keyframes vril-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

@keyframes vril-outer-drift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

body.vril-hosting-shell {
    padding-top: var(--nav-height);
    background-color: var(--bg-body);
    color: var(--body-color);
}

/* Same outer content rhythm as VrilHosting (_Layout page-wrapper / page-body / container-xl). */
.page-wrapper {
    min-height: calc(100vh - var(--nav-height) - 200px);
}

.page-body {
    padding: 3rem 0;
}

.navbar.vril-navbar {
    height: var(--nav-height);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 25%, #f093fb 50%, #4facfe 75%, #00f2fe 100%);
    background-size: 300% 300%;
    animation: vril-gradient-shift 15s ease infinite;
    border: none;
    box-shadow: 0 10px 40px rgba(var(--primary-rgb), 0.3), 0 0 100px rgba(var(--primary-rgb), 0.08) inset;
    backdrop-filter: blur(18px);
    z-index: 1030;
}

.navbar.vril-navbar::before {
    content: '';
    position: absolute;
    inset: -40%;
    background:
        radial-gradient(circle at 30% 50%, rgba(255,255,255,0.28) 0%, transparent 55%),
        radial-gradient(circle at 70% 50%, rgba(255,255,255,0.18) 0%, transparent 55%);
    animation: vril-glow-pulse 6s ease-in-out infinite;
    pointer-events: none;
    z-index: 0;
}

.navbar.vril-navbar::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.45), transparent);
    animation: vril-shimmer 3s ease-in-out infinite;
    z-index: 1;
}

.navbar.vril-navbar .container-fluid {
    position: relative;
    z-index: 2;
}

.navbar .container-xl {
    max-width: 100%;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
    position: relative;
    z-index: 2;
}

@media (min-width: 1400px) {
    .navbar .container-xl {
        max-width: 1600px;
    }
}

.navbar.vril-navbar .navbar-brand {
    font-weight: 800;
    color: #fff !important;
    text-shadow: 0 2px 14px rgba(0, 0, 0, 0.28);
    padding: 0.45rem 0.95rem;
    border-radius: 0.75rem;
    background: rgba(255, 255, 255, 0.14);
    border: 2px solid rgba(255, 255, 255, 0.22);
}

.navbar.vril-navbar .navbar-nav .nav-link {
    color: rgba(255, 255, 255, 0.92) !important;
    font-weight: 600;
    border-radius: 0.55rem;
    padding: 0.65rem 0.85rem !important;
    transition: transform 0.2s ease, background 0.2s ease;
}

.vril-nav-icon-svg {
    width: 22px;
    height: 22px;
    display: inline-block;
    vertical-align: middle;
}

.navbar.vril-navbar .navbar-nav .nav-link:hover {
    color: #fff !important;
    background: rgba(255, 255, 255, 0.16);
    transform: translateY(-1px);
}

.navbar.vril-navbar .dropdown-menu.orion-user-dropdown {
    border-radius: 0.8rem;
    border: 1px solid rgba(var(--primary-rgb), 0.18);
    box-shadow: 0 20px 48px rgba(0, 0, 0, 0.22), 0 8px 24px rgba(var(--primary-rgb), 0.25);
    animation: vril-slide-down 0.25s ease;
}

.vril-notify-host .vril-notify-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.vril-notify-badge {
    top: 2px;
    right: -10px;
    font-size: 0.66rem;
    min-width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(20, 20, 24, 0.9);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.vril-notify-dropdown {
    border-radius: 0.9rem;
    border: 1px solid rgba(var(--primary-rgb), 0.2);
    overflow: hidden;
}

.theme-toggle-wrapper {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.theme-toggle-wrapper svg {
    transition: transform .2s, opacity .2s, color .2s;
    opacity: .9;
}

.theme-toggle-wrapper:hover svg {
    opacity: 1;
    transform: scale(1.1);
    color: #f5c542;
}

html[data-bs-theme="dark"] #icon-sun {
    color: #f5c542;
}

html[data-bs-theme="light"] #icon-moon {
    color: #4a5568;
}

.orion-user-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
}

.orion-avatar {
    width: 28px;
    height: 28px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.24);
    border: 1px solid rgba(255, 255, 255, 0.38);
    font-size: 0.8rem;
    font-weight: 700;
    color: #fff;
}

.navbar.vril-navbar .btn-sign-link {
    color: rgba(255, 255, 255, 0.92) !important;
    font-weight: 600;
    text-decoration: none;
}

.navbar.vril-navbar .navbar-toggler {
    border-color: rgba(255, 255, 255, 0.35);
}

.navbar.vril-navbar .navbar-toggler-icon {
    filter: invert(1);
}

.vril-footer {
    border-top: 1px solid var(--border-color);
    padding: 0;
    margin-top: 2rem;
    font-size: 0.875rem;
    color: var(--muted);
    background: var(--bg-surface);
}

/* Orion footer: centered stack, readable line length, icon aligned with tagline */
.vril-footer .orion-footer-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    padding: 1.25rem 0 1.5rem;
    text-align: center;
}

.vril-footer .orion-footer-message {
    max-width: 36rem;
    margin-inline: auto;
    line-height: 1.55;
}

.vril-footer .orion-footer-line {
    margin-bottom: 0;
}

.vril-footer .orion-footer-byline {
    font-weight: 500;
    color: var(--text);
}

.vril-footer .orion-footer-heart {
    display: inline-block;
    color: #e11d48;
    transform: translateY(-0.05em);
}

[data-bs-theme="dark"] .vril-footer .orion-footer-heart {
    color: #fb7185;
}

.vril-footer .orion-footer-tagline {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.5rem 0.65rem;
    text-align: left;
    text-wrap: balance;
}

@media (min-width: 576px) {
    .vril-footer .orion-footer-tagline {
        align-items: center;
        text-align: center;
    }
}

.vril-footer .orion-footer-clover {
    flex-shrink: 0;
    margin-top: 0.2rem;
    color: #16a34a;
}

@media (min-width: 576px) {
    .vril-footer .orion-footer-clover {
        margin-top: 0;
    }
}

[data-bs-theme="dark"] .vril-footer .orion-footer-clover {
    color: #4ade80;
}

.vril-footer .orion-footer-tagline-text {
    flex: 1 1 12rem;
    min-width: 0;
    color: var(--muted);
}

.vril-footer .orion-footer-copy {
    font-size: 0.8125rem;
    opacity: 0.92;
    color: var(--muted);
}

.vril-footer .orion-footer-links {
    width: 100%;
    display: flex;
    justify-content: center;
}

.vril-footer .orion-footer-privacy-link {
    font-size: 0.8125rem;
    font-weight: 500;
    text-decoration: none;
    color: var(--primary);
}

.vril-footer .orion-footer-privacy-link:hover,
.vril-footer .orion-footer-privacy-link:focus-visible {
    text-decoration: underline;
}

/**
 * Subtle lift + hover depth: light theme = darker neutral shadow; dark theme = soft light / primary glow.
 * Add class <c>vril-card-lift</c> next to Bootstrap <c>shadow-sm</c> / themed panels.
 */
.vril-card-lift {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.vril-card-lift:hover {
    transform: translateY(-2px);
    box-shadow:
        0 18px 40px rgba(15, 23, 42, 0.12),
        0 8px 20px rgba(0, 0, 0, 0.1) !important;
}

[data-bs-theme="dark"] .vril-card-lift:hover {
    box-shadow:
        0 20px 48px rgba(255, 255, 255, 0.1),
        0 0 36px rgba(var(--primary-rgb), 0.28),
        0 10px 28px rgba(var(--accent-rgb), 0.14) !important;
}

@media (prefers-reduced-motion: reduce) {
    .vril-card-lift {
        transition: none;
    }

    .vril-card-lift:hover {
        transform: none;
    }
}

/* Auth pages (ported style direction from Vril apps) */
.orion-auth-wrapper {
    min-height: calc(100vh - var(--nav-height) - 120px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    position: relative;
    overflow: hidden;
    background: linear-gradient(90deg, #0a0f14 0%, #131b2b 20%, #080c0f 40%, #080b0f 60%, #080c0f 80%, #0a0f14 90%, #0a0f14 100%);
    background-size: 300% 300%;
    animation: vril-outer-drift 17s ease-in-out infinite;
    border-radius: 1rem;
}

.orion-auth-wrapper::before {
    content: "";
    position: absolute;
    inset: -20%;
    background:
        radial-gradient(circle at 30% 40%, rgba(118, 75, 250, 0.20), transparent 60%),
        radial-gradient(circle at 70% 60%, rgba(102, 126, 234, 0.18), transparent 70%);
    filter: blur(90px);
    opacity: 0.55;
    pointer-events: none;
}

.orion-auth-card {
    max-width: 560px;
    width: 100%;
    border-radius: 1.35rem;
    overflow: hidden;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    box-shadow: 0 24px 64px rgba(var(--primary-rgb), 0.24), 0 12px 30px rgba(0, 0, 0, 0.16);
    animation: vril-fade-in-up 0.7s ease-out;
    position: relative;
    z-index: 2;
}

.orion-register-card { max-width: 720px; }

.orion-auth-header {
    background: linear-gradient(135deg, #667eea, #764ba2, #f093fb, #4facfe, #00f2fe);
    background-size: 300% 300%;
    animation: vril-gradient-shift 15s ease infinite;
    padding: 2.25rem 1.75rem 1.5rem;
    text-align: center;
    color: #fff;
}

.orion-auth-icon {
    width: 68px;
    height: 68px;
    margin: 0 auto 0.85rem auto;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.24);
    border: 2px solid rgba(255, 255, 255, 0.33);
    font-weight: 800;
    letter-spacing: 1px;
    animation: vril-float 4s ease-in-out infinite;
}

.orion-auth-title {
    font-size: 1.7rem;
    font-weight: 800;
    margin-bottom: 0.2rem;
    text-shadow: 0 2px 16px rgba(0, 0, 0, 0.25);
}

.orion-auth-subtitle {
    margin: 0;
    opacity: 0.92;
    font-weight: 500;
}

.orion-auth-body {
    padding: 1.5rem 1.5rem 1.8rem;
}

.orion-auth-form .form-control {
    border-radius: 0.75rem;
    border: 1px solid var(--border-color);
}

.orion-auth-form .form-control:focus {
    border-color: rgba(var(--primary-rgb), 0.75);
    box-shadow: 0 0 0 0.25rem rgba(var(--primary-rgb), 0.16);
}

.orion-auth-links {
    margin-top: 1rem;
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
}

.orion-auth-links a {
    font-weight: 700;
    text-decoration: none;
}

.orion-profile-wrap {
    min-height: calc(100vh - var(--nav-height) - 140px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.25rem 0;
}

.orion-profile-card {
    max-width: 880px;
    width: 100%;
    border-radius: 1.25rem;
    overflow: hidden;
    border: 1px solid var(--border-color);
    background: var(--card-bg);
    box-shadow: 0 22px 60px rgba(var(--primary-rgb), 0.18), 0 10px 28px rgba(0, 0, 0, 0.12);
    animation: vril-fade-in-up 0.5s ease-out;
}

.orion-profile-header {
    background: linear-gradient(135deg, #667eea, #764ba2, #4facfe);
    background-size: 200% 200%;
    animation: vril-gradient-shift 12s ease infinite;
    color: #fff;
    padding: 1.5rem 1.5rem 1.25rem;
}

.orion-profile-avatar {
    width: 58px;
    height: 58px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.6rem;
    font-weight: 800;
    font-size: 1.2rem;
    background: rgba(255, 255, 255, 0.25);
    border: 2px solid rgba(255, 255, 255, 0.35);
}

.orion-profile-title {
    font-size: 1.45rem;
    font-weight: 800;
}

.orion-profile-subtitle {
    opacity: 0.9;
}

.orion-profile-body {
    padding: 1.35rem 1.35rem 1.5rem;
}

.orion-profile-field {
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    padding: 0.8rem 0.9rem;
    background: var(--bg-surface);
}

.orion-profile-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--muted);
    font-weight: 700;
}

.orion-profile-value {
    margin-top: 0.2rem;
    font-weight: 600;
    color: var(--body-color);
}

@media (max-width: 991.98px) {
    .navbar.vril-navbar {
        height: auto;
        min-height: var(--nav-height);
    }

    body.vril-hosting-shell {
        padding-top: 95px;
    }

    .orion-auth-wrapper {
        min-height: auto;
        padding: 1rem 0.5rem;
    }
}

/* Chat layout — mz-* aligns with hosting card motif */
.mz-chat-shell .mz-card-chat {
    position: relative;
    padding: 1rem;
    background: linear-gradient(135deg, rgba(var(--primary-rgb), 0.06), rgba(var(--accent-rgb), 0.06));
    border: 1px solid rgba(var(--primary-rgb), 0.12);
    border-radius: 0.85rem;
    animation: vril-slide-down 0.35s ease-out;
}

.mz-chat-shell .talk-thread {
    max-height: min(58vh, 560px);
    overflow-y: auto;
    padding: 0.75rem;
    background: var(--card-bg);
    border-radius: 0.65rem;
    border: 1px solid var(--border-color);
    min-height: 220px;
}

.mz-chat-shell .talk-bubble {
    max-width: 92%;
    margin-bottom: 0.65rem;
    padding: 0.65rem 0.85rem;
    border-radius: 0.75rem;
    white-space: pre-wrap;
    word-break: break-word;
}

.mz-chat-shell .talk-bubble-user {
    margin-left: auto;
    background: linear-gradient(135deg, rgba(var(--primary-rgb), 0.25), rgba(var(--accent-rgb), 0.2));
    color: var(--body-color);
    border: 1px solid rgba(var(--primary-rgb), 0.2);
}

.mz-chat-shell .talk-bubble-assistant {
    margin-right: auto;
    background: var(--bg-surface);
    color: var(--body-color);
    border: 1px solid var(--border-color);
}

.mz-chat-shell .talk-meta {
    font-size: 0.75rem;
    color: var(--muted);
}

.orion-model-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.3rem 0.65rem;
    border-radius: 999px;
    border: 1px solid rgba(var(--primary-rgb), 0.3);
    background: linear-gradient(135deg, rgba(var(--primary-rgb), 0.16), rgba(var(--accent-rgb), 0.14));
    font-weight: 700;
    font-size: 0.78rem;
}

.orion-model-dot {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: #10b981;
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.5);
    animation: vril-online-pulse 1.8s ease-out infinite;
}

@keyframes vril-online-pulse {
    0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.45); }
    70% { box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); }
    100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.mz-chat-shell .talk-thread {
    box-shadow: inset 0 0 0 1px rgba(var(--primary-rgb), 0.05);
}

.talk-row {
    display: flex;
    margin-bottom: 0.35rem;
}

.talk-row-user {
    justify-content: flex-end;
}

.talk-row-assistant {
    justify-content: flex-start;
}

.mz-chat-shell .talk-bubble {
    border-radius: 0.9rem;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.08);
}

.talk-bubble-content {
    line-height: 1.45;
}

/* Assistant markdown-lite: fenced ``` … ``` and inline `code` */
.mz-chat-shell .talk-bubble-assistant.talk-bubble--rich {
    white-space: normal;
}

.talk-bubble-content--rich .talk-prose-segment {
    white-space: pre-wrap;
    word-break: break-word;
}

.talk-bubble-content--rich .talk-prose-segment + .talk-code-window {
    margin-top: 0.35rem;
}

/* Fenced code “window” — toolbar + mac dots + language label + copy */
.talk-code-window {
    --talk-accent: rgba(var(--primary-rgb), 0.65);
    margin: 0 0 0.85rem 0;
    max-width: 100%;
    border-radius: 0.7rem;
    overflow: hidden;
    background: var(--card-bg);
    box-shadow:
        0 2px 4px rgba(0, 0, 0, 0.04),
        0 12px 28px rgba(var(--primary-rgb), 0.08),
        0 0 0 1px rgba(var(--primary-rgb), 0.14);
}

[data-bs-theme="dark"] .talk-code-window {
    box-shadow:
        0 2px 8px rgba(0, 0, 0, 0.35),
        0 0 0 1px rgba(255, 255, 255, 0.06);
}

.talk-code-window[data-lang="python"] { --talk-accent: #3776ab; }
.talk-code-window[data-lang="csharp"],
.talk-code-window[data-lang="cs"] { --talk-accent: #68217a; }
.talk-code-window[data-lang="javascript"],
.talk-code-window[data-lang="js"] { --talk-accent: #f7df1e; }
.talk-code-window[data-lang="typescript"],
.talk-code-window[data-lang="ts"] { --talk-accent: #3178c6; }
.talk-code-window[data-lang="rust"] { --talk-accent: #dea584; }
.talk-code-window[data-lang="go"] { --talk-accent: #00add8; }
.talk-code-window[data-lang="cpp"],
.talk-code-window[data-lang="c"] { --talk-accent: #00599c; }

.talk-code-toolbar {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.45rem 0.65rem 0.5rem;
    background: linear-gradient(
        135deg,
        rgba(var(--primary-rgb), 0.14) 0%,
        rgba(var(--accent-rgb), 0.1) 50%,
        rgba(var(--primary-rgb), 0.06) 100%
    );
    border-bottom: 1px solid rgba(var(--primary-rgb), 0.15);
    border-top: 2px solid var(--talk-accent);
}

.talk-code-dots {
    display: inline-flex;
    gap: 0.28rem;
    align-items: center;
    flex-shrink: 0;
}

.talk-code-dot {
    width: 9px;
    height: 9px;
    border-radius: 999px;
    box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.35);
}

.talk-code-dot--r { background: linear-gradient(180deg, #ff8578, #ff5f56); }
.talk-code-dot--y { background: linear-gradient(180deg, #ffe08a, #ffbd2e); }
.talk-code-dot--g { background: linear-gradient(180deg, #9ae69c, #27c93f); }

.talk-code-lang {
    flex: 1;
    min-width: 0;
    display: inline-flex;
    align-items: baseline;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0;
    row-gap: 0.1rem;
    text-align: center;
    font-size: 0.68rem;
    color: var(--secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.talk-code-lang-name {
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.talk-code-lang-sep {
    font-weight: 700;
    opacity: 0.55;
    margin: 0 0.06rem;
}

.talk-code-lang-lines {
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: none;
    color: var(--muted);
    font-variant-numeric: tabular-nums;
}

.talk-code-copy {
    flex-shrink: 0;
    border: 1px solid rgba(var(--primary-rgb), 0.28);
    background: var(--bg-surface);
    color: var(--body-color);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 0.25rem 0.55rem;
    border-radius: 0.4rem;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
}

.talk-code-copy:hover {
    border-color: rgba(var(--primary-rgb), 0.55);
    background: rgba(var(--primary-rgb), 0.12);
}

.talk-code-copy:active {
    transform: scale(0.97);
}

.talk-code-copy.is-copied {
    border-color: rgba(16, 185, 129, 0.55);
    color: #10b981;
}

[data-bs-theme="dark"] .talk-code-copy {
    background: rgba(15, 23, 42, 0.55);
}

.talk-code-body {
    margin: 0;
    padding: 0;
}

.talk-fenced-pre {
    margin: 0;
    padding: 0.75rem 0.9rem 0.85rem;
    border-radius: 0;
    background: rgba(15, 23, 42, 0.045);
    border: none;
    border-top: 1px solid rgba(var(--primary-rgb), 0.08);
    overflow-x: auto;
    max-width: 100%;
}

[data-bs-theme="dark"] .talk-fenced-pre {
    background: rgba(0, 0, 0, 0.45);
    border-top-color: rgba(255, 255, 255, 0.06);
}

.talk-fenced-code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
    font-size: 0.8125rem;
    line-height: 1.5;
    display: block;
    white-space: pre;
    color: inherit;
    tab-size: 4;
}

.talk-inline-code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
    font-size: 0.88em;
    padding: 0.08em 0.38em;
    border-radius: 0.3rem;
    background: rgba(var(--primary-rgb), 0.14);
    border: 1px solid rgba(var(--primary-rgb), 0.2);
}

.talk-bubble-meta {
    margin-top: 0.45rem;
    font-size: 0.7rem;
    opacity: 0.78;
}

.talk-composer-wrap {
    border-top: 1px solid var(--border-color);
    padding-top: 0.9rem;
}

.talk-composer {
    border-radius: 0.85rem;
    border: 1px solid rgba(var(--primary-rgb), 0.18);
    resize: vertical;
    min-height: 92px;
}

.talk-composer:focus {
    border-color: rgba(var(--primary-rgb), 0.75);
    box-shadow: 0 0 0 0.22rem rgba(var(--primary-rgb), 0.16);
}

.talk-send-btn {
    border-radius: 0.7rem;
    padding: 0.5rem 1.15rem;
}

/* Typing row: dots + “thinking” + collapsible prompt preview (shows text submitted while waiting). */
.talk-typing-row {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 0.65rem 0.85rem;
    margin-top: -0.35rem;
    margin-bottom: 0.55rem;
    padding: 0.4rem 0.65rem;
    border-radius: 0.7rem;
    background: rgba(var(--primary-rgb), 0.08);
    border: 1px solid rgba(var(--primary-rgb), 0.16);
}

.talk-typing-main {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    flex: 0 0 auto;
}

.talk-prompt-preview {
    flex: 1 1 180px;
    min-width: min(100%, 200px);
    max-width: 100%;
    border-radius: 0.55rem;
    border: 1px solid rgba(var(--primary-rgb), 0.22);
    background: rgba(255, 255, 255, 0.22);
    padding: 0.35rem 0.45rem 0.45rem;
}

@media (prefers-color-scheme: dark) {
    .talk-prompt-preview {
        background: rgba(0, 0, 0, 0.22);
    }
}

.talk-prompt-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.35rem;
    width: 100%;
    padding: 0.12rem 0.15rem;
    margin: 0 0 0.2rem;
    border: none;
    background: transparent;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--muted);
    cursor: pointer;
    text-align: left;
}

.talk-prompt-toggle:hover {
    color: var(--body-color);
}

.talk-prompt-chevron {
    display: inline-block;
    width: 0.42rem;
    height: 0.42rem;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg);
    transition: transform 0.2s ease;
    flex-shrink: 0;
    margin-top: -0.15rem;
}

.talk-prompt-preview.is-expanded .talk-prompt-chevron {
    transform: rotate(-135deg);
    margin-top: 0.1rem;
}

.talk-prompt-body-wrap {
    overflow: hidden;
}

.talk-prompt-pre {
    margin: 0;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 0.72rem;
    line-height: 1.45;
    color: var(--body-color);
    white-space: pre-wrap;
    word-break: break-word;
}

/* Optional reasoning channel from the inference server (delta.reasoning_content, etc.) */
.talk-prompt-pre--reasoning {
    font-style: italic;
    color: var(--muted);
}

/* Collapsed: show ~3 lines; expanded: full prompt */
.talk-prompt-preview:not(.is-expanded) .talk-prompt-pre {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    overflow: hidden;
}

.talk-prompt-preview.is-expanded .talk-prompt-pre {
    display: block;
    max-height: min(40vh, 320px);
    overflow-y: auto;
}

.talk-typing-dot {
    width: 7px;
    height: 7px;
    border-radius: 999px;
    background: rgba(var(--primary-rgb), 0.85);
    animation: vril-typing-bounce 1s infinite ease-in-out;
}

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

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

.talk-typing-text {
    margin-left: 0.35rem;
    font-size: 0.76rem;
    color: var(--muted);
}

@keyframes vril-typing-bounce {
    0%, 80%, 100% { transform: translateY(0); opacity: 0.55; }
    40% { transform: translateY(-3px); opacity: 1; }
}

.orion-talk-panel {
    border-radius: 1rem;
    border: 1px solid rgba(var(--primary-rgb), 0.18);
    background: linear-gradient(145deg, rgba(var(--primary-rgb), 0.08), rgba(var(--accent-rgb), 0.07));
    box-shadow: 0 18px 42px rgba(var(--primary-rgb), 0.12);
    padding: 1rem;
    animation: vril-fade-in-up 0.45s ease-out;
}

.orion-talk-stat {
    display: grid;
    gap: 0.2rem;
}

.orion-talk-stat-label {
    font-size: 0.73rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--muted);
    font-weight: 700;
}

.orion-talk-stat-value {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--body-color);
}

.orion-talk-tips {
    padding-left: 1.1rem;
    color: var(--secondary);
    display: grid;
    gap: 0.4rem;
    font-size: 0.85rem;
}

.orion-talk-tips kbd {
    font-size: 0.72rem;
    border-radius: 0.35rem;
    padding: 0.15rem 0.35rem;
    background: var(--card-bg);
    color: var(--body-color);
    border: 1px solid var(--border-color);
}

/* ---------- Home landing (premium copy + Talk link) ---------- */
.home-premium-hero {
    position: relative;
    padding: 2.25rem 1rem 1.5rem;
    border-radius: 1.1rem;
    background:
        linear-gradient(135deg, rgba(var(--primary-rgb), 0.11) 0%, rgba(var(--accent-rgb), 0.09) 45%, transparent 85%),
        var(--card-bg);
    border: 1px solid rgba(var(--primary-rgb), 0.18);
    box-shadow: 0 22px 50px rgba(var(--primary-rgb), 0.14), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

[data-bs-theme="dark"] .home-premium-hero {
    box-shadow: 0 22px 50px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.home-premium-hero-inner {
    max-width: 52rem;
}

.home-premium-eyebrow {
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    color: var(--muted);
}

.home-premium-title {
    background: linear-gradient(120deg, var(--primary), var(--accent), var(--primary));
    background-size: 180% auto;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: vril-gradient-shift 14s ease infinite;
}

.home-premium-tag {
    max-width: 42rem;
}

.home-essay {
    border-radius: 1rem !important;
    overflow: hidden;
}

.home-cap-list li {
    position: relative;
    padding-left: 1.35rem;
    margin-bottom: 0.85rem;
    color: var(--body-color);
    line-height: 1.55;
}

.home-cap-list li:last-child {
    margin-bottom: 0;
}

.home-cap-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.55rem;
    width: 6px;
    height: 6px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.15);
}

.home-model-tile {
    border-radius: 0.95rem !important;
    border: 1px solid rgba(var(--primary-rgb), 0.12) !important;
    background: var(--card-bg);
}

.home-model-badge {
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    padding: 0.35rem 0.65rem;
    background: linear-gradient(135deg, rgba(var(--primary-rgb), 0.22), rgba(var(--accent-rgb), 0.18));
    color: var(--body-color);
    border: 1px solid rgba(var(--primary-rgb), 0.28);
}

.home-model-id {
    font-size: 0.82rem;
    padding: 0.45rem 0.65rem;
    border-radius: 0.5rem;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    word-break: break-all;
}

.home-status-card-head {
    background: linear-gradient(90deg, rgba(var(--primary-rgb), 0.08), transparent);
    border-radius: 0.85rem 0.85rem 0 0 !important;
}

.home-talk-anchor {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-weight: 700;
    font-size: 1.05rem;
    letter-spacing: 0.02em;
    text-decoration: none;
    color: var(--primary);
    padding: 0.35rem 0;
    border-bottom: 2px solid rgba(var(--primary-rgb), 0.35);
    transition: color 0.15s ease, border-color 0.15s ease, gap 0.15s ease;
}

.home-talk-anchor:hover {
    color: var(--accent);
    border-bottom-color: rgba(var(--accent-rgb), 0.65);
    gap: 0.5rem;
}

.home-talk-anchor-arrow {
    font-size: 1.15em;
    transition: transform 0.15s ease;
}

.home-talk-anchor:hover .home-talk-anchor-arrow {
    transform: translateX(3px);
}
