/* SilentBot Modern Cyber-Fusion Theme & High-End Adaptive Light Engine */

:root {
    --silent-darkest: #070814;
    --silent-darker: #0b0d1e;
    --silent-dark: #0f1127;
    --silent-surface: #131633;
    --silent-surface-alt: #1a1e45;
    --silent-surface-hover: #23295c;
    --silent-border: #2a2f63;
    --silent-border-light: #3d448c;
    --silent-blue: #3b82f6;
    --silent-indigo: #6366f1;
    --silent-purple: #8b5cf6;
    --silent-violet: #a855f7;
    --silent-accent: #38bdf8;
    --silent-glow: #c084fc;
    --silent-text: #f8fafc;
    --silent-muted: #94a3b8;
    --silent-subtle: #64748b;
    --silent-bg-base: #070814;
}

html {
    scroll-behavior: smooth;
}

/* Light Theme Variables */
html.light {
    --silent-darkest: #ffffff;
    --silent-darker: #f8fafc;
    --silent-dark: #f1f5f9;
    --silent-surface: #ffffff;
    --silent-surface-alt: #f1f5f9;
    --silent-surface-hover: #e2e8f0;
    --silent-border: #e2e8f0;
    --silent-border-light: #cbd5e1;
    --silent-text: #0f172a;
    --silent-muted: #64748b;
    --silent-subtle: #94a3b8;
    --silent-bg-base: #f8fafc;
}

/* Ambient Background Backdrop with Custom Cyber Art Overlay */
body {
    background-color: var(--silent-bg-base);
    background-image: 
        radial-gradient(circle at 12% 18%, rgba(59, 130, 246, 0.12) 0%, transparent 45%),
        radial-gradient(circle at 88% 22%, rgba(139, 92, 246, 0.14) 0%, transparent 50%),
        radial-gradient(circle at 50% 85%, rgba(168, 85, 247, 0.09) 0%, transparent 55%),
        linear-gradient(rgba(7, 8, 20, 0.88), rgba(7, 8, 20, 0.94)),
        url('../img/cyber_bg.jpg');
    background-attachment: fixed;
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center top;
    transition: background-color 0.3s cubic-bezier(0.16, 1, 0.3, 1), color 0.3s ease;
}

html.light body {
    background-color: #f8fafc;
    background-image: 
        radial-gradient(circle at 12% 18%, rgba(59, 130, 246, 0.05) 0%, transparent 45%),
        radial-gradient(circle at 88% 22%, rgba(139, 92, 246, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 50% 85%, rgba(56, 189, 248, 0.04) 0%, transparent 55%),
        linear-gradient(rgba(248, 250, 252, 0.94), rgba(248, 250, 252, 0.98)),
        url('../img/cyber_bg.jpg');
    color: #0f172a;
}

/* Smooth Page & Section Entrance Animations */
@keyframes pageFadeIn {
    0% {
        opacity: 0;
        transform: translateY(6px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}
main {
    animation: pageFadeIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes docSectionFadeIn {
    0% {
        opacity: 0;
        transform: translateY(8px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}
.doc-section:not(.hidden) {
    animation: docSectionFadeIn 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Custom Scrollbars */
::-webkit-scrollbar {
    width: 7px;
    height: 7px;
}
::-webkit-scrollbar-track {
    background: var(--silent-darkest);
}
::-webkit-scrollbar-thumb {
    background: #1f2452;
    border-radius: 4px;
    border: 1px solid #2a2f63;
}
::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(to bottom, #3b82f6, #8b5cf6);
}
html.light ::-webkit-scrollbar-track {
    background: #f1f5f9;
}
html.light ::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border: 1px solid #94a3b8;
}

/* Inline Code Badges */
code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    background-color: rgba(26, 30, 69, 0.85);
    color: #a5b4fc;
    padding: 0.15rem 0.4rem;
    border-radius: 0.375rem;
    font-size: 0.88em;
    border: 1px solid rgba(61, 68, 140, 0.6);
}
html.light code:not(pre code) {
    background-color: #f1f5f9;
    color: #4338ca;
    border: 1px solid #cbd5e1;
}

/* Pre & Code Blocks - Robust Horizontal Containment & Sizing */
pre:not(.CodeMirror-line):not(.CodeMirror-line-like) {
    background-color: #0b0d1f !important;
    border: 1px solid #2a2f63;
    border-radius: 0.75rem;
    padding: 1.1rem 5.5rem 1.1rem 1.1rem !important;
    position: relative;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    overflow-x: auto !important;
    max-width: 100% !important;
    white-space: pre !important;
    word-break: normal !important;
    word-wrap: normal !important;
    box-sizing: border-box !important;
    color: #f8fafc !important;
    line-height: 1.6;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

pre:not(.CodeMirror-line):not(.CodeMirror-line-like)::-webkit-scrollbar {
    height: 6px;
}
pre:not(.CodeMirror-line):not(.CodeMirror-line-like)::-webkit-scrollbar-track {
    background: #070814;
    border-bottom-left-radius: 0.75rem;
    border-bottom-right-radius: 0.75rem;
}
pre:not(.CodeMirror-line):not(.CodeMirror-line-like)::-webkit-scrollbar-thumb {
    background: #23295c;
    border-radius: 3px;
    border: 1px solid #3d448c;
}
pre:not(.CodeMirror-line):not(.CodeMirror-line-like)::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(to right, #3b82f6, #8b5cf6);
}

/* Ensure CodeMirror pre elements stay transparent and use CodeMirror font metrics */
.CodeMirror pre,
.CodeMirror pre.CodeMirror-line,
.CodeMirror pre.CodeMirror-line-like {
    background-color: transparent !important;
    background: transparent !important;
    border: none !important;
    padding: 0 6px !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    overflow-x: visible !important;
}

/* Ensure code blocks stay dark and crisp in both dark and light modes */
html.light pre:not(.CodeMirror-line):not(.CodeMirror-line-like) {
    background-color: #0b0d1f !important;
    border-color: #2a2f63 !important;
    color: #f8fafc !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
}
html.light pre code {
    background-color: transparent !important;
    border: none !important;
    color: inherit !important;
}

/* Code Copy Button */
.copy-btn {
    position: absolute;
    top: 0.65rem;
    right: 0.65rem;
    z-index: 10;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: rgba(26, 30, 69, 0.85);
    backdrop-filter: blur(8px);
    color: #c7d2fe;
    border: 1px solid rgba(61, 68, 140, 0.8);
    border-radius: 0.5rem;
    padding: 0.35rem 0.65rem;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    user-select: none;
}
.copy-btn:hover {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.9), rgba(139, 92, 246, 0.9));
    color: #ffffff;
    border-color: #c084fc;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(99, 102, 241, 0.35);
}
.copy-btn:active {
    transform: translateY(0) scale(0.96);
}

/* Universal SilentBot DSL Syntax Highlighting Rules (Matches Editor) */
.cm-keyword { color: #f472b6 !important; font-weight: 700; }
.cm-variable-2 { color: #38bdf8 !important; font-weight: 600; }
.cm-def { color: #facc15 !important; font-weight: 700; }
.cm-string { color: #4ade80 !important; }
.cm-atom { color: #c084fc !important; font-weight: 600; }
.cm-link { color: #818cf8 !important; text-decoration: underline; }
.cm-number { color: #fb923c !important; }
.cm-operator { color: #f472b6 !important; font-weight: 600; }
.cm-comment { color: #64748b !important; font-style: italic; }

/* Interactive Cards & Buttons */
.glow-card-bv {
    transition: all 0.25s ease;
}
.glow-card-bv:hover {
    border-color: rgba(168, 85, 247, 0.5);
    box-shadow: 0 8px 30px rgba(7, 8, 20, 0.8), 0 0 20px rgba(99, 102, 241, 0.2);
    transform: translateY(-2px);
}
html.light .glow-card-bv:hover {
    box-shadow: 0 8px 30px rgba(99, 102, 241, 0.12), 0 0 15px rgba(168, 85, 247, 0.15);
}

/* Universal Button Enhancements */
a.bg-gradient-to-r,
button.bg-gradient-to-r,
.btn-silent-primary {
    position: relative;
    transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1) !important;
}
a.bg-gradient-to-r:hover,
button.bg-gradient-to-r:hover,
.btn-silent-primary:hover {
    transform: translateY(-1.5px);
    box-shadow: 0 10px 25px -4px rgba(99, 102, 241, 0.45);
}
a.bg-gradient-to-r:active,
button.bg-gradient-to-r:active,
.btn-silent-primary:active {
    transform: translateY(0) scale(0.98);
}

/* Documentation Sidebar Navigation Links */
.sidebar-link {
    transition: all 0.15s ease;
}
.sidebar-link.active {
    background: linear-gradient(90deg, rgba(59, 130, 246, 0.25), rgba(139, 92, 246, 0.25));
    border-left: 3px solid #a855f7;
    color: #ffffff;
    font-weight: 600;
}
html.light .sidebar-link.active {
    background: linear-gradient(90deg, rgba(59, 130, 246, 0.12), rgba(139, 92, 246, 0.12));
    border-left: 3px solid #7c3aed;
    color: #4338ca;
}

/* Modern iOS Style Toggle Switches */
label.cursor-pointer input[type="checkbox"] + div {
    transition: background-color 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}
label.cursor-pointer input[type="checkbox"]:checked + div {
    box-shadow: 0 0 12px rgba(16, 185, 129, 0.35);
}
label.cursor-pointer input[type="checkbox"] + div:after {
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), background-color 0.2s ease !important;
}

/* Theme Toggle Button */
.theme-toggle-btn {
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
.theme-toggle-btn:hover {
    transform: rotate(15deg) scale(1.08);
}
.theme-toggle-btn:active {
    transform: rotate(45deg) scale(0.95);
}

/* Toast Notifications */
@keyframes toastSlideIn {
    0% {
        opacity: 0;
        transform: translateY(-12px) scale(0.96);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}
.silent-toast-enter {
    animation: toastSlideIn 0.28s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* ==========================================================================
   Comprehensive Light Mode Theme Overrides
   ========================================================================== */

/* Surfaces & Containers */
html.light .bg-silent-darkest {
    background-color: #ffffff !important;
}
html.light header {
    background-color: rgba(255, 255, 255, 0.94) !important;
    border-color: #e2e8f0 !important;
}
html.light footer {
    background-color: #ffffff !important;
    border-color: #e2e8f0 !important;
}
html.light .bg-silent-darker {
    background-color: #f8fafc !important;
}
html.light .bg-silent-surface {
    background-color: #ffffff !important;
    border-color: #e2e8f0 !important;
    box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.05) !important;
}
html.light .bg-silent-surfaceAlt {
    background-color: #f1f5f9 !important;
    border-color: #e2e8f0 !important;
}
html.light .bg-silent-surface\/95,
html.light .bg-silent-surface\/90,
html.light .bg-silent-surface\/80,
html.light .bg-silent-surface\/75 {
    background-color: rgba(255, 255, 255, 0.94) !important;
    border-color: #e2e8f0 !important;
}
html.light .bg-silent-surfaceAlt\/60 {
    background-color: rgba(241, 245, 249, 0.8) !important;
}
html.light .bg-silent-surface\/70 {
    background-color: rgba(255, 255, 255, 0.9) !important;
    border-color: #e2e8f0 !important;
}
html.light .border-silent-border {
    border-color: #e2e8f0 !important;
}
html.light .border-silent-borderLight {
    border-color: #cbd5e1 !important;
}

/* Form Controls in Light Mode */
html.light input:not([type="checkbox"]):not([type="radio"]):not([type="range"]),
html.light select,
html.light textarea {
    background-color: #ffffff !important;
    color: #0f172a !important;
    border-color: #cbd5e1 !important;
}
html.light input::placeholder,
html.light textarea::placeholder {
    color: #94a3b8 !important;
}
html.light input:focus,
html.light select:focus,
html.light textarea:focus {
    border-color: #6366f1 !important;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15) !important;
    background-color: #ffffff !important;
}

/* Typography in Light Mode */
html.light .text-silent-text {
    color: #0f172a !important;
}
html.light .text-silent-muted {
    color: #64748b !important;
}
html.light .text-slate-200,
html.light .text-slate-300 {
    color: #334155 !important;
}
html.light .text-slate-400 {
    color: #64748b !important;
}
html.light h1.text-white,
html.light h2.text-white,
html.light h3.text-white,
html.light h4.text-white {
    color: #0f172a !important;
}
/* Pastel Module Badges in Light Mode */
html.light [class*="bg-blue-950"] {
    background-color: rgba(219, 234, 254, 0.85) !important;
    border-color: rgba(147, 197, 253, 0.8) !important;
    color: #1d4ed8 !important;
}
html.light [class*="bg-purple-950"] {
    background-color: rgba(243, 232, 255, 0.85) !important;
    border-color: rgba(216, 180, 254, 0.8) !important;
    color: #7e22ce !important;
}
html.light [class*="bg-indigo-950"] {
    background-color: rgba(224, 231, 255, 0.85) !important;
    border-color: rgba(165, 180, 252, 0.8) !important;
    color: #4338ca !important;
}
html.light [class*="bg-emerald-950"] {
    background-color: rgba(209, 250, 229, 0.85) !important;
    border-color: rgba(110, 231, 183, 0.8) !important;
    color: #047857 !important;
}
html.light [class*="bg-rose-950"] {
    background-color: rgba(255, 228, 230, 0.85) !important;
    border-color: rgba(253, 164, 175, 0.8) !important;
    color: #be123c !important;
}
html.light [class*="bg-amber-950"] {
    background-color: rgba(254, 243, 199, 0.85) !important;
    border-color: rgba(252, 211, 77, 0.8) !important;
    color: #b45309 !important;
}
html.light [class*="bg-cyan-950"] {
    background-color: rgba(207, 250, 254, 0.85) !important;
    border-color: rgba(103, 232, 249, 0.8) !important;
    color: #0e7490 !important;
}
html.light [class*="bg-teal-950"] {
    background-color: rgba(204, 251, 241, 0.85) !important;
    border-color: rgba(94, 234, 212, 0.8) !important;
    color: #0f766e !important;
}

/* Sidebar Navigation in Light Mode */
html.light .nav-cat-btn {
    color: #334155 !important;
}
html.light .nav-cat-btn:hover {
    background-color: #f1f5f9 !important;
    color: #0f172a !important;
}
html.light .nav-cat-btn.active {
    background: linear-gradient(135deg, rgba(224, 231, 255, 0.9), rgba(243, 232, 255, 0.9)) !important;
    border-color: rgba(139, 92, 246, 0.45) !important;
    color: #4338ca !important;
}
html.light .nav-sub-list a {
    color: #64748b !important;
}
html.light .nav-sub-list a:hover {
    color: #4338ca !important;
}

/* Mobile Nav Drawers in Light Mode */
html.light #mobileNavMenu,
html.light #docMobileDrawer {
    background-color: #ffffff !important;
    border-color: #e2e8f0 !important;
}
html.light #mobileNavMenu a,
html.light #mobileNavMenu button {
    color: #334155 !important;
}
html.light #mobileNavMenu a:hover,
html.light #mobileNavMenu button:hover {
    background-color: #f1f5f9 !important;
    color: #0f172a !important;
}

/* Tables in Light Mode */
html.light table th {
    background-color: #f8fafc !important;
    color: #1e293b !important;
    border-color: #e2e8f0 !important;
}
html.light table td {
    border-color: #f1f5f9 !important;
}
html.light table tr:hover td {
    background-color: #f8fafc !important;
}

/* =====================================================================
   Interface refresh: clearer hierarchy, calmer motion, and light theme
   ===================================================================== */

:root {
    --silent-shadow: 0 18px 50px -24px rgba(2, 6, 23, 0.72);
    --silent-shadow-raised: 0 24px 54px -22px rgba(2, 6, 23, 0.86);
    --silent-ring: 0 0 0 4px rgba(129, 140, 248, 0.22);
    --silent-ease: cubic-bezier(0.16, 1, 0.3, 1);
}

body.site-shell {
    font-family: "Manrope", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    letter-spacing: -0.01em;
    isolation: isolate;
    overflow-x: hidden;
}

body.site-shell::before,
body.site-shell::after {
    content: "";
    position: fixed;
    z-index: -1;
    pointer-events: none;
}

body.site-shell::before {
    width: 36rem;
    height: 36rem;
    right: -14rem;
    top: 7rem;
    border-radius: 999px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.16), transparent 66%);
    filter: blur(12px);
}

body.site-shell::after {
    inset: 0;
    opacity: 0.35;
    background-image: linear-gradient(rgba(148, 163, 184, 0.05) 1px, transparent 1px), linear-gradient(90deg, rgba(148, 163, 184, 0.05) 1px, transparent 1px);
    background-size: 48px 48px;
    mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.5), transparent 72%);
}

h1, h2, h3, h4 {
    font-family: "Space Grotesk", "Manrope", ui-sans-serif, system-ui, sans-serif;
    letter-spacing: -0.035em;
}

.site-header {
    box-shadow: 0 10px 35px -24px rgba(2, 6, 23, 0.82);
    transition: background-color 220ms var(--silent-ease), border-color 220ms var(--silent-ease), box-shadow 220ms var(--silent-ease);
}

.brand-avatar {
    box-shadow: 0 0 0 3px rgba(129, 140, 248, 0.1), 0 10px 22px -9px rgba(124, 58, 237, 0.62);
}

.site-nav-link {
    position: relative;
    padding: 0.5rem 0.1rem;
    transition: color 180ms var(--silent-ease), transform 180ms var(--silent-ease) !important;
}

.site-nav-link::after {
    content: "";
    position: absolute;
    right: 0.1rem;
    bottom: 0.05rem;
    left: 0.1rem;
    height: 2px;
    border-radius: 999px;
    transform: scaleX(0);
    transform-origin: right;
    background: linear-gradient(90deg, #38bdf8, #818cf8, #c084fc);
    transition: transform 200ms var(--silent-ease);
}

.site-nav-link:hover {
    transform: translateY(-1px);
}

.site-nav-link:hover::after,
.site-nav-link:focus-visible::after {
    transform: scaleX(1);
    transform-origin: left;
}

.button-primary,
.button-secondary,
.icon-button {
    position: relative;
    isolation: isolate;
    transition: transform 200ms var(--silent-ease), box-shadow 200ms var(--silent-ease), border-color 200ms var(--silent-ease), background-color 200ms var(--silent-ease), color 200ms var(--silent-ease) !important;
}

.button-primary {
    overflow: hidden;
    box-shadow: 0 16px 30px -14px rgba(99, 102, 241, 0.75);
}

.button-primary::before {
    content: "";
    position: absolute;
    z-index: -1;
    top: -140%;
    left: -35%;
    width: 45%;
    height: 350%;
    transform: rotate(22deg) translateX(-170%);
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.32), transparent);
    transition: transform 560ms var(--silent-ease);
}

.button-primary:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 22px 36px -14px rgba(99, 102, 241, 0.72) !important;
}

.button-primary:hover::before {
    transform: rotate(22deg) translateX(450%);
}

.button-secondary:hover,
.icon-button:hover {
    transform: translateY(-2px);
    border-color: rgba(129, 140, 248, 0.62) !important;
    box-shadow: var(--silent-shadow);
}

.button-primary:active,
.button-secondary:active,
.icon-button:active {
    transform: translateY(0) scale(0.975) !important;
}

:where(a, button, input, select, textarea):focus-visible {
    outline: none;
    box-shadow: var(--silent-ring) !important;
}

.home-page > * {
    animation: ui-rise 620ms var(--silent-ease) both;
}

.home-page > :nth-child(2) { animation-delay: 60ms; }
.home-page > :nth-child(3) { animation-delay: 110ms; }
.home-page > :nth-child(4) { animation-delay: 150ms; }
.home-page > :nth-child(5) { animation-delay: 190ms; }
.home-page > :nth-child(6) { animation-delay: 240ms; }
.home-page > :nth-child(7) { animation-delay: 280ms; }

@keyframes ui-rise {
    from { opacity: 0; transform: translateY(18px); }
    to { opacity: 1; transform: translateY(0); }
}

.hero-avatar-glow {
    animation: hero-breathe 3.8s ease-in-out infinite;
}

@keyframes hero-breathe {
    0%, 100% { opacity: 0.58; transform: scale(0.96); }
    50% { opacity: 0.92; transform: scale(1.05); }
}

.hero-eyebrow {
    box-shadow: 0 10px 30px -20px rgba(129, 140, 248, 0.65);
}

.hero-stats {
    position: relative;
    overflow: hidden;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), var(--silent-shadow);
}

.hero-stats::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 3px;
    background: linear-gradient(#38bdf8, #818cf8, #c084fc);
}

.feature-card {
    position: relative;
    overflow: hidden;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.045), var(--silent-shadow);
}

.feature-card::before {
    content: "";
    position: absolute;
    top: 0;
    right: 12%;
    left: 12%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(165, 180, 252, 0.78), transparent);
    opacity: 0.7;
}

.feature-card:hover {
    transform: translateY(-6px) !important;
    border-color: rgba(129, 140, 248, 0.62) !important;
    box-shadow: 0 26px 42px -28px rgba(99, 102, 241, 0.72), 0 0 0 1px rgba(129, 140, 248, 0.1) !important;
}

.feature-card:nth-child(1) { animation: ui-rise 580ms 260ms var(--silent-ease) both; }
.feature-card:nth-child(2) { animation: ui-rise 580ms 310ms var(--silent-ease) both; }
.feature-card:nth-child(3) { animation: ui-rise 580ms 360ms var(--silent-ease) both; }
.feature-card:nth-child(4) { animation: ui-rise 580ms 410ms var(--silent-ease) both; }
.feature-card:nth-child(5) { animation: ui-rise 580ms 460ms var(--silent-ease) both; }
.feature-card:nth-child(6) { animation: ui-rise 580ms 510ms var(--silent-ease) both; }

.home-cta {
    position: relative;
    overflow: hidden;
    box-shadow: var(--silent-shadow-raised);
}

.home-cta::before {
    content: "";
    position: absolute;
    width: 18rem;
    height: 18rem;
    top: -13rem;
    right: 4%;
    border-radius: 999px;
    background: rgba(96, 165, 250, 0.2);
    filter: blur(38px);
}

/* Cards and controls that were previously only styled for the dark dashboard. */
.bg-silent-surface,
.bg-silent-surfaceAlt,
[class*="bg-[#"] {
    transition: background-color 220ms var(--silent-ease), border-color 220ms var(--silent-ease), box-shadow 220ms var(--silent-ease), transform 220ms var(--silent-ease);
}

input:not([type="checkbox"]):not([type="radio"]):not([type="range"]),
select,
textarea {
    transition: border-color 180ms var(--silent-ease), box-shadow 180ms var(--silent-ease), background-color 180ms var(--silent-ease) !important;
}

/* Light theme: every commonly used hard-coded dark utility gets a readable surface. */
html.light {
    --silent-shadow: 0 18px 44px -28px rgba(15, 23, 42, 0.34);
    --silent-shadow-raised: 0 24px 54px -30px rgba(15, 23, 42, 0.38);
    --silent-ring: 0 0 0 4px rgba(79, 70, 229, 0.2);
}

html.light body.site-shell::before {
    background: radial-gradient(circle, rgba(99, 102, 241, 0.11), transparent 67%);
}

html.light body.site-shell::after {
    opacity: 0.2;
    background-image: linear-gradient(rgba(100, 116, 139, 0.12) 1px, transparent 1px), linear-gradient(90deg, rgba(100, 116, 139, 0.12) 1px, transparent 1px);
}

html.light .site-header {
    box-shadow: 0 10px 32px -24px rgba(15, 23, 42, 0.22) !important;
}

html.light .site-nav-link {
    color: #475569 !important;
}

html.light .site-nav-link:hover,
html.light .site-nav-link:focus-visible {
    color: #312e81 !important;
}

html.light .button-secondary {
    color: #1e293b !important;
    background-color: rgba(255, 255, 255, 0.9) !important;
    border-color: #cbd5e1 !important;
}

html.light .button-secondary:hover,
html.light .icon-button:hover {
    color: #312e81 !important;
    background-color: #ffffff !important;
}

html.light .button-primary,
html.light .button-primary *,
html.light :is(a, button).bg-gradient-to-r,
html.light :is(a, button).bg-gradient-to-r * {
    color: #ffffff !important;
}

html.light :is(a, button).button-primary,
html.light :is(a, button).button-primary *,
html.light :is(a, button).button-secondary {
    color: inherit !important;
}

html.light :is(a, button).button-primary,
html.light :is(a, button).button-primary * {
    color: #ffffff !important;
}

html.light :is(a, button).button-secondary {
    color: #1e293b !important;
}

html.light .home-cta .text-white,
html.light .keep-white {
    color: #ffffff !important;
}

html.light .feature-card,
html.light .hero-stats {
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), var(--silent-shadow) !important;
}

html.light .hero-eyebrow {
    color: #4c1d95 !important;
    background: linear-gradient(100deg, rgba(219, 234, 254, 0.96), rgba(237, 233, 254, 0.96)) !important;
    border-color: rgba(129, 140, 248, 0.38) !important;
}

html.light .hero-avatar .absolute.-bottom-2 {
    background-color: #ffffff !important;
    border-color: #bbf7d0 !important;
    color: #047857 !important;
}

html.light .feature-card:hover {
    box-shadow: 0 26px 42px -30px rgba(79, 70, 229, 0.36), 0 0 0 1px rgba(99, 102, 241, 0.12) !important;
}

html.light .home-cta {
    background-image: linear-gradient(110deg, rgba(224, 231, 255, 0.82), rgba(243, 232, 255, 0.82), rgba(224, 242, 254, 0.76)) !important;
    border-color: rgba(129, 140, 248, 0.36) !important;
}

html.light .home-cta :is(h1, h2, h3, h4, p, .text-white) {
    color: #172033 !important;
}

html.light .home-cta .button-primary,
html.light .home-cta .button-primary * {
    color: #ffffff !important;
}

html.light .text-slate-300,
html.light .text-slate-400 {
    color: #526277 !important;
}

html.light .text-slate-500,
html.light .text-silent-muted {
    color: #5b6b80 !important;
}

html.light table tbody tr:nth-child(even) td {
    background-color: rgba(248, 250, 252, 0.78) !important;
}

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

/* ============================================================
   MIDNIGHT ICE DESIGN SYSTEM (palette matched to bot logo)
   Deep midnight-navy surfaces + ice-cyan glow accents.
   ============================================================ */

:root {
    --ice-50: #f0f9ff;
    --ice-100: #e0f2fe;
    --ice-200: #bae6fd;
    --ice-300: #7dd3fc;
    --ice-400: #38bdf8;
    --ice-500: #0ea5e9;
    --ice-glow: rgba(125, 211, 252, 0.35);
    --ice-gradient: linear-gradient(100deg, #7dd3fc, #818cf8 55%, #c084fc);
    --card-glow: 0 24px 48px -24px rgba(56, 189, 248, 0.35);
    --reveal-delay: 0s;
}

/* ---------- Ambient background ---------- */
.aurora-stage {
    position: fixed;
    inset: 0;
    z-index: -2;
    overflow: hidden;
    pointer-events: none;
}
.aurora-blob {
    position: absolute;
    width: 44vmax;
    height: 44vmax;
    border-radius: 9999px;
    filter: blur(90px);
    opacity: 0.5;
    will-change: transform;
}
.aurora-a {
    left: -12vmax;
    top: -14vmax;
    background: radial-gradient(circle at center, rgba(56, 189, 248, 0.28), transparent 65%);
    animation: auroraDrift 26s ease-in-out infinite alternate;
}
.aurora-b {
    right: -14vmax;
    top: 8vh;
    background: radial-gradient(circle at center, rgba(139, 92, 246, 0.3), transparent 65%);
    animation: auroraDrift 32s ease-in-out infinite alternate-reverse;
}
.aurora-c {
    left: 22vw;
    bottom: -18vmax;
    background: radial-gradient(circle at center, rgba(14, 165, 233, 0.2), transparent 65%);
    animation: auroraDrift 38s ease-in-out infinite alternate;
}
@keyframes auroraDrift {
    0% { transform: translate3d(0, 0, 0) scale(1); }
    50% { transform: translate3d(6vmax, 4vmax, 0) scale(1.12); }
    100% { transform: translate3d(-4vmax, 7vmax, 0) scale(0.94); }
}
.bg-grid-overlay {
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(125, 211, 252, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(125, 211, 252, 0.05) 1px, transparent 1px);
    background-size: 44px 44px;
    mask-image: radial-gradient(ellipse 90% 60% at 50% 0%, black 30%, transparent 75%);
    -webkit-mask-image: radial-gradient(ellipse 90% 60% at 50% 0%, black 30%, transparent 75%);
}

/* ---------- Scroll progress ---------- */
#scrollProgress {
    position: fixed;
    top: 0;
    left: 0;
    height: 2px;
    width: 0%;
    z-index: 9999;
    background: var(--ice-gradient);
    box-shadow: 0 0 12px rgba(56, 189, 248, 0.8);
}

/* ---------- Glass & cards ---------- */
.glass {
    background: linear-gradient(160deg, rgba(20, 34, 78, 0.72), rgba(10, 15, 36, 0.78));
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(125, 211, 252, 0.14);
}
.ice-card {
    position: relative;
    border-radius: 1.25rem;
    background: linear-gradient(165deg, rgba(23, 38, 86, 0.85), rgba(9, 13, 32, 0.9));
    border: 1px solid rgba(125, 211, 252, 0.12);
    box-shadow: 0 18px 40px -22px rgba(2, 6, 23, 0.9);
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.35s ease, box-shadow 0.35s ease;
    overflow: hidden;
}
.ice-card::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 2px;
    background: var(--ice-gradient);
    opacity: 0;
    transition: opacity 0.35s ease;
}
.ice-card:hover {
    transform: translateY(-6px);
    border-color: rgba(125, 211, 252, 0.4);
    box-shadow: var(--card-glow), 0 0 0 1px rgba(125, 211, 252, 0.12);
}
.ice-card:hover::before {
    opacity: 1;
}
.ice-icon-tile {
    width: 3rem;
    height: 3rem;
    border-radius: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    color: var(--ice-300);
    background: linear-gradient(150deg, rgba(56, 189, 248, 0.22), rgba(99, 102, 241, 0.18));
    border: 1px solid rgba(125, 211, 252, 0.3);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 8px 20px -10px rgba(56, 189, 248, 0.5);
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.ice-card:hover .ice-icon-tile {
    transform: scale(1.1) rotate(-6deg);
}

/* ---------- Buttons ---------- */
.btn-ice {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    font-weight: 800;
    color: #04121f;
    background: linear-gradient(100deg, #7dd3fc, #38bdf8 60%, #818cf8);
    border-radius: 0.9rem;
    box-shadow: 0 12px 32px -10px rgba(56, 189, 248, 0.65), inset 0 1px 0 rgba(255, 255, 255, 0.5);
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s ease, filter 0.25s ease;
    overflow: hidden;
}
.btn-ice:hover {
    transform: translateY(-2px);
    filter: brightness(1.06);
    box-shadow: 0 18px 40px -10px rgba(56, 189, 248, 0.75), inset 0 1px 0 rgba(255, 255, 255, 0.5);
}
.btn-ice:active {
    transform: translateY(0) scale(0.98);
}
.btn-ice::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    width: 45%;
    left: -60%;
    background: linear-gradient(105deg, transparent, rgba(255, 255, 255, 0.55), transparent);
    transform: skewX(-20deg);
    animation: btnSheen 3.6s ease-in-out infinite;
}
@keyframes btnSheen {
    0%, 55% { left: -60%; }
    85%, 100% { left: 130%; }
}
.btn-ghost {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    font-weight: 700;
    color: var(--ice-200);
    background: rgba(125, 211, 252, 0.06);
    border: 1px solid rgba(125, 211, 252, 0.25);
    border-radius: 0.9rem;
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), background 0.25s ease, border-color 0.25s ease;
}
.btn-ghost:hover {
    transform: translateY(-2px);
    background: rgba(125, 211, 252, 0.12);
    border-color: rgba(125, 211, 252, 0.5);
    color: #fff;
}

/* ---------- Typography helpers ---------- */
.grad-ice-text {
    background: linear-gradient(95deg, #bae6fd 5%, #7dd3fc 35%, #818cf8 70%, #c084fc 95%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: gradientShift 7s ease infinite;
}
@keyframes gradientShift {
    0%, 100% { background-position: 0% center; }
    50% { background-position: 100% center; }
}
.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 1rem;
    border-radius: 9999px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--ice-200);
    background: rgba(56, 189, 248, 0.08);
    border: 1px solid rgba(125, 211, 252, 0.28);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

/* ---------- Nav ---------- */
.site-header {
    transition: background-color 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}
.site-header.scrolled {
    box-shadow: 0 10px 40px -12px rgba(2, 6, 23, 0.8), 0 1px 0 rgba(125, 211, 252, 0.12);
}
.nav-link {
    position: relative;
    transition: color 0.25s ease;
}
.nav-link::after {
    content: "";
    position: absolute;
    left: 0;
    right: 100%;
    bottom: -6px;
    height: 2px;
    border-radius: 2px;
    background: var(--ice-gradient);
    transition: right 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.nav-link:hover::after,
.nav-link.nav-active::after {
    right: 0;
}
.nav-link.nav-active {
    color: #fff !important;
}
.brand-avatar-ring {
    box-shadow: 0 0 0 1px rgba(125, 211, 252, 0.4), 0 0 22px -2px rgba(56, 189, 248, 0.55);
}

/* ---------- Hero avatar ---------- */
.avatar-orbit {
    position: absolute;
    inset: -18px;
    border-radius: 2rem;
    border: 1px dashed rgba(125, 211, 252, 0.35);
    animation: orbitSpin 24s linear infinite;
    pointer-events: none;
}
.avatar-orbit::before {
    content: "";
    position: absolute;
    top: -5px;
    left: 50%;
    width: 9px;
    height: 9px;
    border-radius: 9999px;
    background: #7dd3fc;
    box-shadow: 0 0 14px 3px rgba(125, 211, 252, 0.8);
}
@keyframes orbitSpin {
    to { transform: rotate(360deg); }
}
.float-slow {
    animation: floatY 6s ease-in-out infinite;
}
@keyframes floatY {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-12px); }
}
.avatar-ice-glow {
    background: radial-gradient(circle at 50% 35%, rgba(56, 189, 248, 0.5), rgba(99, 102, 241, 0.35) 45%, transparent 70%);
    filter: blur(28px);
    animation: glowPulse 4.5s ease-in-out infinite;
}
@keyframes glowPulse {
    0%, 100% { opacity: 0.65; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.08); }
}

/* ---------- Scroll reveal ---------- */
.reveal {
    opacity: 0;
    transform: translateY(26px);
    transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
    transition-delay: var(--reveal-delay, 0s);
}
.reveal.is-visible {
    opacity: 1;
    transform: none;
}
.reveal-scale {
    transform: translateY(26px) scale(0.97);
}
.reveal-scale.is-visible {
    transform: none;
}

/* ---------- Stats ---------- */
.stat-num {
    font-variant-numeric: tabular-nums;
    text-shadow: 0 0 26px rgba(56, 189, 248, 0.35);
}

/* ---------- Marquee ticker ---------- */
.marquee {
    overflow: hidden;
    -webkit-mask-image: linear-gradient(90deg, transparent, black 8%, black 92%, transparent);
    mask-image: linear-gradient(90deg, transparent, black 8%, black 92%, transparent);
}
.marquee-track {
    display: flex;
    gap: 0.75rem;
    width: max-content;
    animation: marqueeScroll 30s linear infinite;
}
.marquee:hover .marquee-track {
    animation-play-state: paused;
}
@keyframes marqueeScroll {
    to { transform: translateX(-50%); }
}
.marquee-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
    padding: 0.55rem 1rem;
    border-radius: 0.9rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--ice-100);
    background: rgba(125, 211, 252, 0.06);
    border: 1px solid rgba(125, 211, 252, 0.18);
}

/* ---------- Steps ---------- */
.step-card {
    position: relative;
}
.home-hero-glow {
    position: absolute;
    left: 50%;
    top: -140px;
    width: min(900px, 120vw);
    height: 480px;
    transform: translateX(-50%);
    background: radial-gradient(ellipse at center, rgba(56, 189, 248, 0.16), rgba(99, 102, 241, 0.1) 45%, transparent 70%);
    filter: blur(10px);
    pointer-events: none;
}
.step-num {
    font-family: "Space Grotesk", sans-serif;
    font-size: 2.6rem;
    font-weight: 700;
    line-height: 1;
    background: linear-gradient(180deg, rgba(125, 211, 252, 0.9), rgba(125, 211, 252, 0.05));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* ---------- CTA banner ---------- */
.cta-aurora {
    position: relative;
    overflow: hidden;
    isolation: isolate;
}
.cta-aurora::before,
.cta-aurora::after {
    content: "";
    position: absolute;
    width: 60%;
    padding-bottom: 60%;
    border-radius: 9999px;
    filter: blur(70px);
    z-index: -1;
    opacity: 0.55;
}
.cta-aurora::before {
    left: -15%;
    top: -40%;
    background: radial-gradient(circle, rgba(56, 189, 248, 0.4), transparent 65%);
    animation: auroraDrift 20s ease-in-out infinite alternate;
}
.cta-aurora::after {
    right: -15%;
    bottom: -50%;
    background: radial-gradient(circle, rgba(168, 85, 247, 0.4), transparent 65%);
    animation: auroraDrift 26s ease-in-out infinite alternate-reverse;
}

/* ---------- Tilt ---------- */
[data-tilt] {
    transform-style: preserve-3d;
    will-change: transform;
}

/* ---------- Light theme: Midnight Ice ---------- */
html.light .aurora-blob { opacity: 0.35; }
html.light .bg-grid-overlay {
    background-image:
        linear-gradient(rgba(14, 165, 233, 0.07) 1px, transparent 1px),
        linear-gradient(90deg, rgba(14, 165, 233, 0.07) 1px, transparent 1px);
}
html.light .glass {
    background: linear-gradient(160deg, rgba(255, 255, 255, 0.9), rgba(240, 249, 255, 0.86));
    border-color: rgba(14, 165, 233, 0.2);
}
html.light .ice-card {
    background: linear-gradient(165deg, #ffffff, #f0f9ff);
    border-color: rgba(14, 165, 233, 0.22);
    box-shadow: 0 18px 40px -26px rgba(14, 165, 233, 0.4);
}
html.light .ice-card:hover {
    border-color: rgba(14, 165, 233, 0.5);
    box-shadow: 0 26px 48px -24px rgba(14, 165, 233, 0.45);
}
html.light .eyebrow {
    color: #0369a1;
    background: rgba(14, 165, 233, 0.08);
    border-color: rgba(14, 165, 233, 0.3);
}
html.light .grad-ice-text {
    background: linear-gradient(95deg, #0369a1 5%, #0284c7 40%, #4f46e5 75%, #7c3aed 95%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
html.light .btn-ghost {
    color: #0369a1;
    background: rgba(14, 165, 233, 0.06);
    border-color: rgba(14, 165, 233, 0.3);
}
html.light .btn-ghost:hover {
    color: #0c4a6e;
    background: rgba(14, 165, 233, 0.12);
}
html.light .marquee-chip {
    color: #075985;
    background: rgba(14, 165, 233, 0.07);
    border-color: rgba(14, 165, 233, 0.22);
}
html.light .nav-link.nav-active { color: #0c4a6e !important; }
html.light .step-num {
    background: linear-gradient(180deg, rgba(2, 132, 199, 0.85), rgba(2, 132, 199, 0.06));
    -webkit-background-clip: text;
    background-clip: text;
}

/* ============================================================
   DOCS: sidebar, search, typography, code, tables
   ============================================================ */
#docSidebar {
    background: linear-gradient(170deg, rgba(20, 34, 78, 0.8), rgba(9, 13, 32, 0.88));
    border: 1px solid rgba(125, 211, 252, 0.14);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    box-shadow: 0 18px 40px -24px rgba(2, 6, 23, 0.9);
    border-radius: 1.1rem;
}
#docSidebar::-webkit-scrollbar { width: 6px; }
.nav-cat-btn {
    border: 1px solid transparent;
    transition: background 0.25s ease, border-color 0.25s ease, transform 0.25s ease, color 0.25s ease;
}
.nav-cat-btn:hover {
    background: rgba(125, 211, 252, 0.07);
    border-color: rgba(125, 211, 252, 0.18);
}
.nav-cat-btn.active {
    background: linear-gradient(100deg, rgba(14, 165, 233, 0.22), rgba(99, 102, 241, 0.22)) !important;
    border: 1px solid rgba(125, 211, 252, 0.4) !important;
    color: #fff !important;
    box-shadow: 0 8px 22px -10px rgba(56, 189, 248, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}
.nav-sub-list a {
    position: relative;
    padding-left: 0.4rem;
    border-left: 2px solid transparent;
    transition: color 0.2s ease, border-color 0.2s ease, padding-left 0.2s ease;
}
.nav-sub-list a:hover {
    color: var(--ice-200) !important;
    border-left-color: rgba(125, 211, 252, 0.6);
    padding-left: 0.6rem;
}
.doc-search {
    background: rgba(15, 26, 61, 0.8);
    border: 1px solid rgba(125, 211, 252, 0.22);
    box-shadow: inset 0 2px 8px rgba(2, 6, 23, 0.5);
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
}
.doc-search:focus {
    outline: none;
    border-color: rgba(125, 211, 252, 0.6);
    box-shadow: inset 0 2px 8px rgba(2, 6, 23, 0.5), 0 0 0 3px rgba(56, 189, 248, 0.15);
}
.doc-section {
    scroll-margin-top: 5.5rem;
}
.doc-section h2 {
    position: relative;
    padding-left: 0.9rem;
}
.doc-section h2::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.15em;
    bottom: 0.15em;
    width: 4px;
    border-radius: 4px;
    background: var(--ice-gradient);
    box-shadow: 0 0 12px rgba(56, 189, 248, 0.6);
}
.doc-section code:not(.not-code) {
    font-family: ui-monospace, "JetBrains Mono", Menlo, Consolas, monospace;
    font-size: 0.86em;
    padding: 0.12em 0.42em;
    border-radius: 0.45rem;
    color: var(--ice-200);
    background: rgba(56, 189, 248, 0.1);
    border: 1px solid rgba(125, 211, 252, 0.2);
    white-space: nowrap;
}
.doc-section pre {
    position: relative;
    border-radius: 0.9rem;
    padding: 1rem 1.1rem;
    overflow-x: auto;
    background: linear-gradient(170deg, #0a1230, #060a20);
    border: 1px solid rgba(125, 211, 252, 0.16);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 14px 30px -20px rgba(2, 6, 23, 0.9);
    font-family: ui-monospace, "JetBrains Mono", Menlo, Consolas, monospace;
    line-height: 1.65;
}
.doc-section pre code {
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    white-space: pre !important;
}
.doc-section table {
    border-collapse: separate;
    border-spacing: 0;
    width: 100%;
    border-radius: 0.9rem;
    overflow: hidden;
    border: 1px solid rgba(125, 211, 252, 0.16);
}
.doc-section thead th {
    background: rgba(56, 189, 248, 0.1);
    color: var(--ice-100);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.7rem;
    letter-spacing: 0.06em;
    padding: 0.7rem 0.9rem;
    border-bottom: 1px solid rgba(125, 211, 252, 0.2);
}
.doc-section tbody td {
    padding: 0.7rem 0.9rem;
    border-bottom: 1px solid rgba(125, 211, 252, 0.07);
}
.doc-section tbody tr {
    transition: background 0.2s ease;
}
.doc-section tbody tr:hover {
    background: rgba(125, 211, 252, 0.05);
}
.doc-section tbody tr:last-child td {
    border-bottom: none;
}
html.light #docSidebar {
    background: linear-gradient(170deg, #ffffff, #f0f9ff);
    border-color: rgba(14, 165, 233, 0.22);
}
html.light .nav-cat-btn.active {
    background: linear-gradient(100deg, rgba(14, 165, 233, 0.14), rgba(99, 102, 241, 0.14)) !important;
    border-color: rgba(14, 165, 233, 0.45) !important;
    color: #0c4a6e !important;
}
html.light .nav-sub-list a:hover { color: #0369a1 !important; }
html.light .doc-search {
    background: #ffffff;
    border-color: rgba(14, 165, 233, 0.3);
}
html.light .doc-section code:not(.not-code) {
    color: #0369a1;
    background: rgba(14, 165, 233, 0.08);
    border-color: rgba(14, 165, 233, 0.25);
}
html.light .doc-section pre {
    background: linear-gradient(170deg, #0b1330, #060a20);
}
html.light .doc-section pre code { color: #bae6fd; }
html.light .doc-section thead th {
    background: rgba(14, 165, 233, 0.1);
    color: #0c4a6e;
}

/* ============================================================
   DASHBOARD: tabs, cards, fields, tables, modals
   ============================================================ */
.dash-tabs {
    background: rgba(9, 13, 32, 0.6);
    border: 1px solid rgba(125, 211, 252, 0.12);
    border-radius: 1rem;
    padding: 0.35rem;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}
.dash-tab-btn {
    border: 1px solid transparent;
    border-radius: 0.75rem;
}
.dash-tab-btn:hover {
    background: rgba(125, 211, 252, 0.07);
}
.dash-tab-btn.active {
    background: linear-gradient(100deg, rgba(14, 165, 233, 0.25), rgba(99, 102, 241, 0.25)) !important;
    border: 1px solid rgba(125, 211, 252, 0.4) !important;
    color: #fff !important;
    box-shadow: 0 8px 22px -10px rgba(56, 189, 248, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}
.dash-card {
    background: linear-gradient(165deg, rgba(20, 34, 78, 0.75), rgba(9, 13, 32, 0.88));
    border: 1px solid rgba(125, 211, 252, 0.13);
    border-radius: 1.1rem;
    box-shadow: 0 20px 44px -26px rgba(2, 6, 23, 0.9);
    overflow: hidden;
}
.dash-card-head {
    background: rgba(56, 189, 248, 0.05);
    border-bottom: 1px solid rgba(125, 211, 252, 0.12);
}
input[id^="setting"], select[id^="setting"], textarea[id^="setting"] {
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
}
input[id^="setting"]:focus, select[id^="setting"]:focus, textarea[id^="setting"]:focus {
    border-color: rgba(125, 211, 252, 0.6) !important;
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.15);
    outline: none;
}
.dash-table-wrap {
    border: 1px solid rgba(125, 211, 252, 0.14);
    border-radius: 0.9rem;
    overflow: hidden;
    background: rgba(8, 13, 36, 0.5);
}
.dash-table-wrap table thead th {
    background: rgba(56, 189, 248, 0.08);
    color: var(--ice-100);
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    padding: 0.7rem 1rem;
    border-bottom: 1px solid rgba(125, 211, 252, 0.16);
}
.dash-table-wrap table tbody td {
    padding: 0.7rem 1rem;
    border-bottom: 1px solid rgba(125, 211, 252, 0.06);
}
.dash-table-wrap table tbody tr {
    transition: background 0.2s ease;
}
.dash-table-wrap table tbody tr:hover {
    background: rgba(125, 211, 252, 0.05);
}
.dash-table-wrap table tbody tr:last-child td {
    border-bottom: none;
}
.modal-panel {
    background: linear-gradient(165deg, #14224e, #0a0f24);
    border: 1px solid rgba(125, 211, 252, 0.22);
    border-radius: 1.1rem;
    box-shadow: 0 40px 80px -20px rgba(2, 6, 23, 0.95), 0 0 0 1px rgba(125, 211, 252, 0.06), 0 0 60px -20px rgba(56, 189, 248, 0.35);
    animation: modalPop 0.32s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes modalPop {
    from { opacity: 0; transform: translateY(18px) scale(0.97); }
    to { opacity: 1; transform: none; }
}
html.light .dash-tabs {
    background: rgba(255, 255, 255, 0.8);
    border-color: rgba(14, 165, 233, 0.2);
}
html.light .dash-tab-btn.active {
    background: linear-gradient(100deg, rgba(14, 165, 233, 0.16), rgba(99, 102, 241, 0.16)) !important;
    border-color: rgba(14, 165, 233, 0.45) !important;
    color: #0c4a6e !important;
}
html.light .dash-card {
    background: linear-gradient(165deg, #ffffff, #f0f9ff);
    border-color: rgba(14, 165, 233, 0.22);
}
html.light .dash-card-head { background: rgba(14, 165, 233, 0.06); }
html.light .dash-table-wrap {
    background: #ffffff;
    border-color: rgba(14, 165, 233, 0.2);
}
html.light .dash-table-wrap table thead th {
    background: rgba(14, 165, 233, 0.08);
    color: #0c4a6e;
}
html.light .modal-panel {
    background: linear-gradient(165deg, #ffffff, #f0f9ff);
    border-color: rgba(14, 165, 233, 0.3);
}

/* ============================================================
   EDITOR: cards, mode switch, toolbar, emulator, AI panel
   ============================================================ */
.editor-card {
    background: linear-gradient(165deg, rgba(20, 34, 78, 0.7), rgba(9, 13, 32, 0.88));
    border: 1px solid rgba(125, 211, 252, 0.15);
    border-radius: 1.1rem;
    box-shadow: 0 20px 44px -26px rgba(2, 6, 23, 0.9);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
.editor-card:focus-within {
    border-color: rgba(125, 211, 252, 0.4);
    box-shadow: 0 20px 44px -26px rgba(2, 6, 23, 0.9), 0 0 0 3px rgba(56, 189, 248, 0.1);
}
.editor-card-head {
    background: rgba(56, 189, 248, 0.05);
    border-bottom: 1px solid rgba(125, 211, 252, 0.12);
}
.mode-switch {
    background: rgba(9, 13, 32, 0.65);
    border: 1px solid rgba(125, 211, 252, 0.14);
    border-radius: 0.9rem;
    padding: 0.25rem;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}
.mode-switch button {
    border-radius: 0.65rem;
    transition: all 0.25s ease;
}
.toolbar-btn {
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.15s ease;
}
.toolbar-btn:hover {
    background: rgba(125, 211, 252, 0.1);
    border-color: rgba(125, 211, 252, 0.35);
    color: #fff;
}
.toolbar-btn:active {
    transform: scale(0.94);
}

/* ---------- Toggles: knob shadow + track glow ---------- */
input.sr-only:checked + div::after {
    box-shadow: 0 1px 5px rgba(0, 0, 0, 0.55), 0 0 0 3px rgba(255, 255, 255, 0.14);
}
input.sr-only:checked + div {
    filter: drop-shadow(0 0 7px rgba(255, 255, 255, 0.16));
}
input.sr-only:active + div {
    filter: brightness(1.25);
}
input.sr-only:focus-visible + div {
    outline: 2px solid rgba(125, 211, 252, 0.7);
    outline-offset: 2px;
}

/* ---------- Global press / focus animations for buttons ---------- */
.btn-ice:focus-visible, .btn-ghost:focus-visible,
.dash-tab-btn:focus-visible, .nav-link:focus-visible {
    outline: 2px solid rgba(125, 211, 252, 0.7);
    outline-offset: 2px;
}
.btn-ghost:active {
    transform: translateY(0) scale(0.97);
}
.dash-tab-btn:active {
    transform: scale(0.96);
}
.ice-card .btn-ice:active, .glass .btn-ice:active {
    transform: translateY(0) scale(0.97);
}

/* ---------- Animated checkboxes (dashboard settings) ---------- */
.dash-check {
    appearance: none;
    -webkit-appearance: none;
    width: 1.15rem;
    height: 1.15rem;
    border-radius: 0.4rem;
    border: 1.5px solid rgba(125, 211, 252, 0.4);
    background: rgba(8, 13, 36, 0.7);
    display: inline-grid;
    place-content: center;
    cursor: pointer;
    flex-shrink: 0;
    margin-top: 0.15rem;
    transition: background 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease, transform 0.15s ease;
}
.dash-check::before {
    content: "";
    width: 0.6rem;
    height: 0.6rem;
    border-radius: 0.2rem;
    transform: scale(0) rotate(-20deg);
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
    background: linear-gradient(135deg, #7dd3fc, #818cf8);
    box-shadow: 0 0 8px rgba(125, 211, 252, 0.8);
    clip-path: polygon(14% 44%, 0 65%, 50% 100%, 100% 16%, 80% 0%, 43% 62%);
}
.dash-check:checked {
    border-color: rgba(125, 211, 252, 0.7);
    box-shadow: 0 0 12px -2px rgba(56, 189, 248, 0.6);
}
.dash-check:checked::before {
    transform: scale(1) rotate(0deg);
}
.dash-check:active {
    transform: scale(0.88);
}
.dash-check:focus-visible {
    outline: 2px solid rgba(125, 211, 252, 0.7);
    outline-offset: 2px;
}
html.light .dash-check {
    background: #ffffff;
    border-color: rgba(14, 165, 233, 0.5);
}

/* ---------- Dashboard settings fields ---------- */
select[id^="setting"] {
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%237dd3fc' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.9rem center;
    padding-right: 2.5rem !important;
    cursor: pointer;
}
input[type="color"][id^="setting"] {
    appearance: none;
    -webkit-appearance: none;
    border: 1px solid rgba(125, 211, 252, 0.3);
    background: rgba(8, 13, 36, 0.7);
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
input[type="color"][id^="setting"]:hover {
    transform: scale(1.06);
    border-color: rgba(125, 211, 252, 0.6);
    box-shadow: 0 0 16px -4px rgba(56, 189, 248, 0.6);
}
input[type="color"][id^="setting"]::-webkit-color-swatch-wrapper {
    padding: 3px;
}
input[type="color"][id^="setting"]::-webkit-color-swatch {
    border: none;
    border-radius: 0.55rem;
}
input[type="color"][id^="setting"]::-moz-color-swatch {
    border: none;
    border-radius: 0.55rem;
}
.field-label {
    display: flex;
    align-items: center;
    gap: 0.45rem;
}
.field-label i {
    color: var(--ice-300);
    font-size: 0.7rem;
}
.pre-ice {
    border-radius: 0.9rem;
    padding: 0.8rem 1rem;
    overflow-x: auto;
    background: linear-gradient(170deg, #0a1230, #060a20);
    border: 1px solid rgba(125, 211, 252, 0.16);
    font-family: ui-monospace, "JetBrains Mono", Menlo, Consolas, monospace;
    line-height: 1.65;
    color: var(--ice-200);
}
html.light .pre-ice {
    background: linear-gradient(170deg, #0b1330, #060a20);
    color: #bae6fd;
}
#cmdName:focus, #cmdAliases:focus, #cmdCooldown:focus {
    border-color: rgba(125, 211, 252, 0.6) !important;
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.15);
    outline: none;
}
.emulator-shell {
    background: linear-gradient(165deg, rgba(20, 34, 78, 0.75), rgba(9, 13, 32, 0.9));
    border: 1px solid rgba(125, 211, 252, 0.15);
    border-radius: 1.1rem;
    box-shadow: 0 20px 44px -26px rgba(2, 6, 23, 0.9);
}
#sandboxStatusBadge {
    transition: all 0.3s ease;
}
.ai-panel-glow {
    border: 1px solid rgba(192, 132, 252, 0.25);
    box-shadow: 0 0 30px -12px rgba(168, 85, 247, 0.5);
}
html.light .editor-card {
    background: linear-gradient(165deg, #ffffff, #f0f9ff);
    border-color: rgba(14, 165, 233, 0.22);
}
html.light .editor-card-head { background: rgba(14, 165, 233, 0.06); }
html.light .mode-switch {
    background: rgba(255, 255, 255, 0.85);
    border-color: rgba(14, 165, 233, 0.25);
}
html.light .emulator-shell {
    background: linear-gradient(165deg, #ffffff, #f0f9ff);
    border-color: rgba(14, 165, 233, 0.22);
}

/* ---------- Chat polish ---------- */
.chat-msg-item {
    animation: msgIn 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes msgIn {
    from { opacity: 0; transform: translateY(10px) scale(0.99); }
    to { opacity: 1; transform: none; }
}
.chat-msg-item[class*="purple-950"] {
    background: linear-gradient(150deg, rgba(99, 102, 241, 0.14), rgba(56, 189, 248, 0.07));
    border-color: rgba(125, 211, 252, 0.22) !important;
    box-shadow: 0 10px 26px -18px rgba(56, 189, 248, 0.5);
}
#chatInitialLoader > div {
    border-color: rgba(125, 211, 252, 0.35) !important;
    border-top-color: transparent !important;
    box-shadow: 0 0 20px -6px rgba(56, 189, 248, 0.6);
}
#chatTextInput {
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
}
#chatTextInput:focus {
    border-color: rgba(125, 211, 252, 0.6) !important;
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.14);
}
#chatGuildSelector {
    background: transparent;
}
#chatGuildSelector option {
    background-color: #0b1330;
    color: #f8fafc;
}
html.light #chatGuildSelector option {
    background-color: #ffffff;
    color: #0f172a;
}
.voice-play-btn {
    transition: transform 0.2s ease, filter 0.2s ease;
}
.voice-play-btn:hover {
    transform: scale(1.08);
    filter: brightness(1.1);
}
.voice-play-btn:active {
    transform: scale(0.94);
}

/* ---------- Analytics bars ---------- */
.analytics-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.15rem 0.75rem;
    align-items: center;
    animation: msgIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.analytics-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: #e0f2fe;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.analytics-track {
    grid-column: 1 / -1;
    height: 7px;
    border-radius: 9999px;
    background: rgba(125, 211, 252, 0.1);
    overflow: hidden;
}
.analytics-fill {
    height: 100%;
    border-radius: 9999px;
    background: linear-gradient(90deg, #0ea5e9, #818cf8);
    box-shadow: 0 0 10px rgba(56, 189, 248, 0.5);
    transition: width 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}
.analytics-fill.fail {
    background: linear-gradient(90deg, #f43f5e, #fb923c);
    box-shadow: 0 0 10px rgba(244, 63, 94, 0.5);
}
.analytics-value {
    font-size: 0.72rem;
    font-weight: 800;
    color: #fff;
    font-variant-numeric: tabular-nums;
}
html.light .analytics-label { color: #0c4a6e; }
html.light .analytics-track { background: rgba(14, 165, 233, 0.12); }

/* ---------- editor: live command-name check ---------- */
.name-hint { display: flex; flex-direction: column; gap: .3rem; margin-top: .4rem; font-size: .75rem; line-height: 1.4; color: #fda4af; }
.name-suggest { align-self: flex-start; padding: .2rem .6rem; border-radius: 999px; font-weight: 600; color: #7dd3fc; background: rgba(56, 189, 248, .12); border: 1px solid rgba(56, 189, 248, .35); }
.name-suggest:hover { background: rgba(56, 189, 248, .22); }
input.name-bad { border-color: #f43f5e !important; box-shadow: 0 0 0 3px rgba(244, 63, 94, .18); }
input.name-ok { border-color: rgba(52, 211, 153, .6) !important; }

/* ---------- Emulator debugger (editor) ---------- */
.dbg-toggle { display: inline-flex; align-items: center; gap: .35rem; padding: .2rem .55rem; border-radius: 999px; font-size: 10px; font-weight: 700; color: #94a3b8; background: rgba(148, 163, 184, .08); border: 1px solid rgba(148, 163, 184, .25); transition: color .15s, background .15s, border-color .15s; }
.dbg-toggle:hover { color: #e2e8f0; border-color: rgba(148, 163, 184, .45); }
.dbg-toggle.is-on { color: #fcd34d; background: rgba(245, 158, 11, .14); border-color: rgba(245, 158, 11, .45); }
.dbg { margin-top: .75rem; border-radius: .9rem; border: 1px solid rgba(245, 158, 11, .3); background: rgba(15, 17, 26, .7); font-size: .75rem; overflow: hidden; }
.dbg__head { display: flex; align-items: center; gap: .45rem; padding: .55rem .8rem; border-bottom: 1px solid rgba(245, 158, 11, .2); color: #fcd34d; }
.dbg__head span { margin-left: auto; color: #94a3b8; font-size: .7rem; }
.dbg__sub { font-size: .65rem; text-transform: uppercase; letter-spacing: .06em; color: #94a3b8; margin-bottom: .3rem; }
.dbg__vars { padding: .55rem .8rem; border-bottom: 1px solid rgba(148, 163, 184, .15); display: grid; gap: .2rem; }
.dbg__var { display: flex; gap: .5rem; min-width: 0; }
.dbg__var code { color: #fdba74; flex-shrink: 0; }
.dbg__var span { color: #e2e8f0; overflow-wrap: anywhere; }
.dbg__list { list-style: none; margin: 0; padding: .35rem 0; max-height: 22rem; overflow-y: auto; }
.dbg__stage { padding: .45rem .8rem .2rem; font-size: .65rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: #a5b4fc; }
.dbg__step { display: flex; align-items: baseline; gap: .45rem; padding: .18rem .8rem .18rem calc(.8rem + var(--depth, 0) * 1rem); min-width: 0; }
.dbg__step:hover { background: rgba(148, 163, 184, .07); }
.dbg__step > i { width: .9rem; text-align: center; font-size: .65rem; color: #64748b; flex-shrink: 0; }
.dbg__step code { color: #cbd5e1; font-size: .72rem; background: none; padding: 0; overflow-wrap: anywhere; }
.dbg__step.is-fn > i { color: #7dd3fc; }
.dbg__step.is-var > i { color: #c4b5fd; }
.dbg__step.is-if > i, .dbg__step.is-for > i { color: #fbbf24; }
.dbg__step.is-error { color: #fda4af; }
.dbg__step.is-error > i, .dbg__step.is-error code { color: #fda4af; }
.dbg__arrow { color: #475569; font-weight: 400; flex-shrink: 0; }
.dbg__val { color: #86efac; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .72rem; overflow-wrap: anywhere; }
.dbg__val i, .dbg__var i { color: #64748b; }
.dbg__bool { font-size: .68rem; font-weight: 700; padding: 0 .4rem; border-radius: 999px; flex-shrink: 0; }
.dbg__bool.is-yes { color: #86efac; background: rgba(34, 197, 94, .14); }
.dbg__bool.is-no { color: #fda4af; background: rgba(244, 63, 94, .14); }
.dbg__empty { padding: .6rem .8rem; color: #94a3b8; }

/* ---------- Gallery: sidebar tabs, reactions, bundles ---------- */
.gal-layout { display: grid; gap: 1.25rem; }
@media (min-width: 1024px) { .gal-layout { grid-template-columns: 220px minmax(0, 1fr); align-items: start; } }
.gal-side { display: flex; gap: .4rem; overflow-x: auto; padding-bottom: .25rem; scrollbar-width: none; }
.gal-side::-webkit-scrollbar { display: none; }
@media (min-width: 1024px) { .gal-side { flex-direction: column; position: sticky; top: 6rem; overflow: visible; padding: .6rem; border-radius: 1rem; border: 1px solid rgba(125, 211, 252, .12); background: rgba(15, 23, 42, .45); } }
.gal-side__sep { display: none; margin: .6rem .6rem .2rem; font-size: .65rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: #64748b; }
@media (min-width: 1024px) { .gal-side__sep { display: block; } }
.gal-tab { display: inline-flex; align-items: center; gap: .6rem; flex-shrink: 0; padding: .55rem .8rem; border-radius: .7rem; font-size: .85rem; font-weight: 600; color: #94a3b8; border: 1px solid transparent; text-align: left; transition: color .15s, background .15s, border-color .15s; white-space: nowrap; }
.gal-tab i { width: 1rem; text-align: center; }
.gal-tab:hover { color: #e2e8f0; background: rgba(148, 163, 184, .08); }
.gal-tab.is-active { color: #e0f2fe; background: rgba(56, 189, 248, .14); border-color: rgba(56, 189, 248, .35); }
.gal-tab[data-tab="liked"] i { color: #fb7185; }
.gal-tab[data-tab="saved"] i { color: #fbbf24; }
.gal-tab[data-tab="imported"] i { color: #34d399; }
.gal-filters { display: grid; gap: .75rem; }
@media (min-width: 640px) { .gal-filters { grid-template-columns: minmax(0, 1fr) auto auto; } }
.gal-bundlebar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem; font-size: .85rem; color: #94a3b8; }
.gal-card { padding: 1.25rem; display: flex; flex-direction: column; gap: .75rem; min-width: 0; }
.gal-chip { font-size: 11px; padding: .1rem .5rem; border-radius: 999px; white-space: nowrap; color: #bae6fd; background: rgba(125, 211, 252, .1); border: 1px solid rgba(125, 211, 252, .2); }
.gal-flag { align-self: flex-start; font-size: 11px; color: #fcd34d; }
.gal-meta { display: flex; justify-content: space-between; gap: .5rem; font-size: 11px; color: #94a3b8; }
.gal-react { display: flex; align-items: center; gap: .4rem; }
.gal-btn, .gal-count { display: inline-flex; align-items: center; gap: .35rem; padding: .3rem .65rem; border-radius: 999px; font-size: .78rem; color: #94a3b8; border: 1px solid rgba(148, 163, 184, .22); background: rgba(148, 163, 184, .06); transition: color .15s, background .15s, border-color .15s, transform .15s; }
.gal-btn:hover { color: #e2e8f0; transform: translateY(-1px); }
.gal-btn b, .gal-count b { font-weight: 700; font-variant-numeric: tabular-nums; }
.gal-btn[data-react="like"].is-on { color: #fb7185; border-color: rgba(251, 113, 133, .45); background: rgba(251, 113, 133, .12); }
.gal-btn[data-react="save"].is-on { color: #fbbf24; border-color: rgba(251, 191, 36, .45); background: rgba(251, 191, 36, .12); }
.gal-count { margin-left: auto; cursor: default; }
.gal-count.is-on { color: #34d399; border-color: rgba(52, 211, 153, .4); }
.gal-cmds { display: flex; flex-wrap: wrap; gap: .35rem; }
.gal-cmd { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .75rem; padding: .15rem .5rem; border-radius: .5rem; color: #e0f2fe; background: rgba(56, 189, 248, .1); border: 1px solid rgba(56, 189, 248, .22); }
.gal-cmd:hover { background: rgba(56, 189, 248, .2); }
.gal-modal { position: fixed; inset: 0; z-index: 60; display: flex; align-items: center; justify-content: center; padding: 1rem; background: rgba(2, 6, 23, .7); backdrop-filter: blur(4px); }
.gal-modal__box { width: 100%; max-width: 32rem; max-height: 90vh; overflow-y: auto; padding: 1.4rem; border-radius: 1.1rem; background: #0f172a; border: 1px solid rgba(125, 211, 252, .2); box-shadow: 0 25px 60px rgba(0, 0, 0, .5); }
.gal-label { display: block; margin: .8rem 0 .35rem; font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: #94a3b8; }
.gal-pick { display: grid; gap: .35rem; max-height: 16rem; overflow-y: auto; }
.gal-pick__row { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: .6rem; padding: .45rem .6rem; border-radius: .6rem; border: 1px solid rgba(148, 163, 184, .18); cursor: pointer; }
.gal-pick__row span { color: #e2e8f0; font-size: .85rem; }
.gal-pick__row small { grid-column: 2; color: #94a3b8; font-size: .72rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gal-pick__row:has(input:checked) { border-color: rgba(56, 189, 248, .5); background: rgba(56, 189, 248, .08); }

/* ---------- Dashboard: player data ---------- */
.pd-filters { display: grid; gap: .6rem; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.pd-keys { display: flex; flex-wrap: wrap; gap: .35rem; }
.pd-key { display: inline-flex; align-items: center; gap: .4rem; padding: .2rem .55rem; border-radius: 999px; font-size: .72rem; color: #cbd5e1; background: rgba(148, 163, 184, .08); border: 1px solid rgba(148, 163, 184, .2); }
.pd-key code { background: none; padding: 0; color: inherit; }
.pd-key small { color: #64748b; }
.pd-key.is-on, .pd-key:hover { color: #e0f2fe; border-color: rgba(56, 189, 248, .45); background: rgba(56, 189, 248, .12); }
.pd-table { width: 100%; font-size: .78rem; border-collapse: collapse; }
.pd-table th { text-align: left; font-size: .65rem; text-transform: uppercase; letter-spacing: .06em; color: #64748b; padding: .45rem .5rem; border-bottom: 1px solid rgba(148, 163, 184, .15); }
.pd-table td { padding: .4rem .5rem; border-bottom: 1px solid rgba(148, 163, 184, .08); vertical-align: middle; color: #e2e8f0; }
.pd-table code { background: none; padding: 0; color: #fdba74; }
.pd-who { min-width: 8rem; }
.pd-who b { display: block; font-weight: 600; }
.pd-who small { color: #64748b; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .65rem; }
.pd-value { width: 100%; min-width: 7rem; padding: .3rem .5rem; border-radius: .5rem; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .75rem; color: #f1f5f9; background: rgba(2, 6, 23, .5); border: 1px solid rgba(148, 163, 184, .2); }
.pd-value:focus { outline: none; border-color: rgba(56, 189, 248, .6); }
.pd-value.is-num { color: #86efac; }
.pd-actions { white-space: nowrap; text-align: right; }
.pd-actions button { width: 1.8rem; height: 1.8rem; border-radius: .5rem; color: #94a3b8; }
.pd-actions .pd-save { color: #34d399; background: rgba(52, 211, 153, .12); }
.pd-actions .pd-del:hover { color: #fb7185; background: rgba(251, 113, 133, .12); }
.pd-empty { text-align: center; padding: 1.5rem .5rem !important; color: #94a3b8 !important; }
.pd-board { padding: .9rem; border-radius: .9rem; display: flex; flex-direction: column; gap: .6rem; }
.pd-board code { background: none; padding: 0; color: #fcd34d; font-weight: 700; }
.pd-top { list-style: decimal inside; margin: 0; padding: 0; font-size: .75rem; max-height: 14rem; overflow-y: auto; }
.pd-top:empty { display: none; }
.pd-top li { display: list-item; padding: .15rem 0; color: #cbd5e1; }
.pd-top li span { display: inline-block; max-width: 70%; overflow: hidden; text-overflow: ellipsis; vertical-align: bottom; }
.pd-top li b { float: right; color: #fcd34d; font-variant-numeric: tabular-nums; }
.pd-danger:hover { color: #fb7185 !important; border-color: rgba(251, 113, 133, .45) !important; }
@media (max-width: 639px) { .pd-hide-sm { display: none; } .pd-filters { grid-template-columns: 1fr; } }

/* .btn-* set display; keep the .hidden utility working on them */
.btn-ghost.hidden, .btn-ice.hidden { display: none !important; }

/* ---------- Feedback board ---------- */
.fb-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 1rem; }
.fb-views { display: flex; gap: .35rem; overflow-x: auto; padding: .3rem; border-radius: .9rem; border: 1px solid rgba(125, 211, 252, .12); background: rgba(15, 23, 42, .45); scrollbar-width: none; }
.fb-views::-webkit-scrollbar { display: none; }
.fb-view { display: inline-flex; align-items: center; gap: .45rem; flex-shrink: 0; padding: .45rem .8rem; border-radius: .65rem; font-size: .82rem; font-weight: 600; color: #94a3b8; white-space: nowrap; transition: color .15s, background .15s; }
.fb-view:hover { color: #e2e8f0; background: rgba(148, 163, 184, .08); }
.fb-view.is-active { color: #e0f2fe; background: rgba(56, 189, 248, .16); box-shadow: inset 0 0 0 1px rgba(56, 189, 248, .35); }
.fb-view small { font-size: .68rem; font-weight: 700; padding: 0 .4rem; border-radius: 999px; background: rgba(148, 163, 184, .14); font-variant-numeric: tabular-nums; }
.fb-toolbar { display: grid; gap: .75rem; }
@media (min-width: 900px) { .fb-toolbar { grid-template-columns: minmax(0, 1fr) 18rem; align-items: center; } }
.fb-tags { display: flex; flex-wrap: wrap; gap: .35rem; }
.fb-tagf { display: inline-flex; align-items: center; gap: .35rem; padding: .25rem .65rem; border-radius: 999px; font-size: .75rem; font-weight: 600; color: #94a3b8; border: 1px solid rgba(148, 163, 184, .2); }
.fb-tagf:hover { color: #e2e8f0; }
.fb-tagf.is-active { color: #e0f2fe; border-color: rgba(56, 189, 248, .5); background: rgba(56, 189, 248, .12); }

.fb-list { display: grid; gap: .6rem; }
.fb-item { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 1rem; padding: 1rem 1.1rem; border-radius: 1rem; border: 1px solid rgba(125, 211, 252, .12); background: rgba(15, 23, 42, .55); transition: border-color .15s, transform .15s; }
.fb-item:hover { border-color: rgba(56, 189, 248, .35); transform: translateY(-1px); }
.fb-item__main { min-width: 0; display: flex; flex-direction: column; gap: .4rem; }
.fb-item__title { font-weight: 700; color: #f1f5f9; font-size: 1rem; line-height: 1.35; overflow-wrap: anywhere; }
.fb-item__title:hover { color: #7dd3fc; }
.fb-item__snippet { font-size: .84rem; color: #94a3b8; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.fb-meta { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem .8rem; font-size: .74rem; color: #94a3b8; }
.fb-meta i { opacity: .8; }

.fb-vote { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .1rem; min-width: 3.6rem; padding: .5rem .4rem; border-radius: .85rem; color: #94a3b8; border: 1px solid rgba(148, 163, 184, .22); background: rgba(148, 163, 184, .06); transition: color .15s, background .15s, border-color .15s, transform .15s; }
button.fb-vote:not(:disabled):hover { color: #e0f2fe; border-color: rgba(56, 189, 248, .5); transform: translateY(-1px); }
.fb-vote b { font-size: 1.05rem; font-weight: 800; font-variant-numeric: tabular-nums; color: #e2e8f0; }
.fb-vote.is-on { color: #7dd3fc; border-color: rgba(56, 189, 248, .55); background: rgba(56, 189, 248, .14); }
.fb-vote.is-on b { color: #e0f2fe; }
.fb-vote:disabled { cursor: default; }
.fb-vote--big { width: 100%; flex-direction: row; gap: .8rem; padding: .9rem 1rem; }
.fb-vote--big b { font-size: 1.8rem; }
.fb-vote--big span { font-size: .85rem; font-weight: 700; text-align: left; line-height: 1.2; }
.fb-vote.is-pop { animation: fbPop .35s ease; }
@keyframes fbPop { 50% { transform: scale(1.08); } }

.fb-badge { display: inline-flex; align-items: center; gap: .35rem; padding: .15rem .6rem; border-radius: 999px; font-size: .72rem; font-weight: 700; white-space: nowrap; border: 1px solid; }
.fb-status-new { color: #7dd3fc; border-color: rgba(125, 211, 252, .35); background: rgba(125, 211, 252, .1); }
.fb-status-planned { color: #c4b5fd; border-color: rgba(196, 181, 253, .35); background: rgba(196, 181, 253, .1); }
.fb-status-in_progress { color: #fcd34d; border-color: rgba(252, 211, 77, .35); background: rgba(252, 211, 77, .1); }
.fb-status-resolved { color: #6ee7b7; border-color: rgba(110, 231, 183, .35); background: rgba(110, 231, 183, .1); }
.fb-status-rejected { color: #fda4af; border-color: rgba(253, 164, 175, .35); background: rgba(253, 164, 175, .1); }
.fb-status-duplicate { color: #cbd5e1; border-color: rgba(203, 213, 225, .3); background: rgba(203, 213, 225, .08); }
.fb-tag { display: inline-flex; align-items: center; gap: .3rem; font-size: .72rem; font-weight: 600; }
.fb-tag-bug { color: #fb7185; } .fb-tag-idea { color: #fbbf24; } .fb-tag-improvement { color: #38bdf8; }
.fb-tag-question { color: #a78bfa; } .fb-tag-other { color: #94a3b8; }

.fb-avatar { width: 1.4rem; height: 1.4rem; border-radius: 999px; object-fit: cover; flex-shrink: 0; }
.fb-avatar--letter { display: inline-flex; align-items: center; justify-content: center; font-size: .65rem; font-weight: 800; color: #0b1220; background: #7dd3fc; }
.fb-author { display: inline-flex; align-items: center; gap: .4rem; }
.fb-dev { font-size: .62rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; padding: .05rem .4rem; border-radius: .35rem; color: #0b1220; background: linear-gradient(135deg, #7dd3fc, #a78bfa); }

.fb-layout { display: grid; gap: 1.25rem; }
@media (min-width: 1024px) { .fb-layout { grid-template-columns: minmax(0, 1fr) 20rem; align-items: start; } .fb-aside { position: sticky; top: 6rem; } }
.fb-body { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.65; color: #e2e8f0; font-size: .95rem; }
.fb-files { display: grid; grid-template-columns: repeat(auto-fill, minmax(9rem, 1fr)); gap: .6rem; }
.fb-files a { display: block; aspect-ratio: 4 / 3; border-radius: .75rem; overflow: hidden; border: 1px solid rgba(148, 163, 184, .2); background: rgba(2, 6, 23, .5); }
.fb-files img { width: 100%; height: 100%; object-fit: cover; transition: transform .2s; }
.fb-files a:hover img { transform: scale(1.04); }
.fb-note { border-left: 3px solid #7dd3fc; padding: .8rem 1rem; border-radius: .6rem; background: rgba(56, 189, 248, .07); }
.fb-note p { white-space: pre-wrap; overflow-wrap: anywhere; font-size: .9rem; color: #e2e8f0; }
.fb-admin { border: 1px dashed rgba(167, 139, 250, .45); background: rgba(167, 139, 250, .06); }

.fb-comment { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: .75rem; padding: .9rem 0; border-top: 1px solid rgba(148, 163, 184, .1); }
.fb-comment:first-child { border-top: 0; }
.fb-comment .fb-avatar { width: 2rem; height: 2rem; }
.fb-comment__text { white-space: pre-wrap; overflow-wrap: anywhere; font-size: .9rem; color: #e2e8f0; margin-top: .2rem; }
.fb-comment--dev { background: linear-gradient(90deg, rgba(167, 139, 250, .08), transparent 70%); border-radius: .6rem; padding-left: .6rem; }
.fb-del { font-size: .72rem; color: #64748b; }
.fb-del:hover { color: #fb7185; }

.fb-field { display: grid; gap: .4rem; }
.fb-counter { font-size: .7rem; color: #64748b; font-variant-numeric: tabular-nums; }
.fb-counter.is-bad { color: #fb7185; }
.fb-tagpick { display: flex; flex-wrap: wrap; gap: .45rem; }
.fb-tagpick label { cursor: pointer; }
.fb-tagpick input { position: absolute; opacity: 0; pointer-events: none; }
.fb-tagpick span { display: inline-flex; align-items: center; gap: .45rem; padding: .5rem .85rem; border-radius: .75rem; font-size: .85rem; font-weight: 600; color: #94a3b8; border: 1px solid rgba(148, 163, 184, .22); transition: all .15s; }
.fb-tagpick input:checked + span { color: #e0f2fe; border-color: rgba(56, 189, 248, .55); background: rgba(56, 189, 248, .14); }
.fb-tagpick input:focus-visible + span { outline: 2px solid #38bdf8; outline-offset: 2px; }
.fb-drop { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .4rem; padding: 1.4rem; border-radius: 1rem; text-align: center; font-size: .85rem; color: #94a3b8; border: 1.5px dashed rgba(125, 211, 252, .3); cursor: pointer; transition: border-color .15s, background .15s; }
.fb-drop:hover, .fb-drop.is-over { border-color: #38bdf8; background: rgba(56, 189, 248, .06); color: #e0f2fe; }
.fb-drop i { font-size: 1.4rem; color: #7dd3fc; }
.fb-previews { display: grid; grid-template-columns: repeat(auto-fill, minmax(7rem, 1fr)); gap: .5rem; }
.fb-preview { position: relative; aspect-ratio: 1; border-radius: .7rem; overflow: hidden; border: 1px solid rgba(148, 163, 184, .2); background: rgba(2, 6, 23, .5); }
.fb-preview img { width: 100%; height: 100%; object-fit: cover; }
.fb-preview button { position: absolute; top: .3rem; right: .3rem; width: 1.6rem; height: 1.6rem; border-radius: 999px; font-size: .75rem; color: #fff; background: rgba(2, 6, 23, .75); }
.fb-preview.is-loading::after { content: ""; position: absolute; inset: 0; background: rgba(2, 6, 23, .55) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='9' fill='none' stroke='%237dd3fc' stroke-width='3' stroke-dasharray='40 20'/%3E%3C/svg%3E") center / 1.6rem no-repeat; }
.fb-pages { display: flex; justify-content: center; gap: .35rem; flex-wrap: wrap; }
.fb-pages a, .fb-pages span { min-width: 2.2rem; padding: .4rem .6rem; text-align: center; border-radius: .6rem; font-size: .82rem; color: #94a3b8; border: 1px solid rgba(148, 163, 184, .18); }
.fb-pages .is-active { color: #e0f2fe; border-color: rgba(56, 189, 248, .5); background: rgba(56, 189, 248, .12); }
.fb-empty { text-align: center; padding: 3rem 1rem; color: #94a3b8; font-size: .9rem; }
.fb-empty i { font-size: 2rem; color: #334155; display: block; margin-bottom: .8rem; }
@media (max-width: 639px) {
    .fb-item { grid-template-columns: minmax(0, 1fr); }
    .fb-item .fb-vote { flex-direction: row; gap: .5rem; justify-self: start; min-width: 0; padding: .3rem .7rem; order: 2; }
    .fb-item .fb-vote b { font-size: .9rem; }
}
@media (min-width: 640px) { .fb-item .fb-vote { align-self: start; min-height: 4rem; } }
.site-header nav a { white-space: nowrap; flex-shrink: 0; }
/* Custom server emoji in the editor preview (Discord shows them at 1.375em) */
.discord-custom-emoji { display: inline-block; width: 1.375em; height: 1.375em; object-fit: contain; vertical-align: -0.3em; margin: 0 .05em; }
.emoji-picker__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(2.2rem, 1fr)); gap: .25rem; max-height: 14rem; overflow-y: auto; }
.emoji-picker__grid button { display: flex; align-items: center; justify-content: center; aspect-ratio: 1; border-radius: .5rem; transition: background .12s; }
.emoji-picker__grid button:hover { background: rgba(148, 163, 184, .15); }
.emoji-picker__grid img { width: 1.6rem; height: 1.6rem; object-fit: contain; }

/* Command editor: gray ghost completion and the shortcuts help */
.cm-ghost-completion { color: #64748b; opacity: .85; font-style: italic; pointer-events: none; white-space: pre; }
html.light .cm-ghost-completion { color: #94a3b8; }
.shortcuts-help { position: fixed; inset: 0; z-index: 99990; display: flex; align-items: center; justify-content: center; padding: 1rem; background: rgba(2, 6, 23, .7); backdrop-filter: blur(4px); }
.shortcuts-help__card { width: 100%; max-width: 30rem; max-height: 90vh; overflow-y: auto; padding: 1.4rem; border-radius: 1.1rem; background: #0f172a; border: 1px solid rgba(125, 211, 252, .2); box-shadow: 0 25px 60px rgba(0, 0, 0, .5); }
.shortcuts-help__card h3 { font-weight: 800; color: #fff; margin-bottom: .9rem; }
.shortcuts-help__card dl { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: .55rem 1rem; align-items: center; font-size: .82rem; }
.shortcuts-help__card dt { white-space: nowrap; color: #94a3b8; }
.shortcuts-help__card dd { color: #cbd5e1; }
.shortcuts-help__card kbd { display: inline-block; min-width: 1.6rem; padding: .1rem .4rem; border-radius: .35rem; font: 600 .72rem ui-monospace, SFMono-Regular, Menlo, monospace; text-align: center; color: #e0f2fe; background: rgba(56, 189, 248, .12); border: 1px solid rgba(56, 189, 248, .35); border-bottom-width: 2px; }
html.light .shortcuts-help { background: rgba(15, 23, 42, .35); }
html.light .shortcuts-help__card { background: #fff; border-color: #d0dce7; }
html.light .shortcuts-help__card h3 { color: #0f172a; }
html.light .shortcuts-help__card dd { color: #334155; }
html.light .shortcuts-help__card kbd { color: #075985; background: #e0f2fe; border-color: #7cc4e8; }

/* Feedback: attachment viewer */
.fb-viewer { position: fixed; inset: 0; z-index: 99995; display: flex; align-items: center; justify-content: center; gap: .75rem; padding: 3.5rem 1rem 1.5rem; background: rgba(2, 6, 23, .9); backdrop-filter: blur(6px); animation: fbFade .15s ease; }
@keyframes fbFade { from { opacity: 0; } }
.fb-viewer__img { max-width: min(100%, 1400px); max-height: 100%; object-fit: contain; border-radius: .6rem; box-shadow: 0 20px 60px rgba(0, 0, 0, .6); user-select: none; }
.fb-viewer__bar { position: absolute; top: .8rem; left: 1rem; right: 1rem; display: flex; align-items: center; gap: .6rem; color: #cbd5e1; font-size: .85rem; }
.fb-viewer__count { margin-right: auto; font-variant-numeric: tabular-nums; }
.fb-viewer__open, .fb-viewer__close, .fb-viewer__nav { display: inline-flex; align-items: center; justify-content: center; width: 2.5rem; height: 2.5rem; border-radius: 999px; color: #e2e8f0; background: rgba(15, 23, 42, .75); border: 1px solid rgba(148, 163, 184, .25); transition: background .15s; }
.fb-viewer__open:hover, .fb-viewer__close:hover, .fb-viewer__nav:hover { background: rgba(56, 189, 248, .25); }
.fb-viewer__nav { flex-shrink: 0; width: 2.8rem; height: 2.8rem; }
.fb-viewer__nav[hidden] { display: none; }
@media (max-width: 639px) { .fb-viewer__nav { position: absolute; bottom: 1.2rem; } .fb-viewer__nav.is-prev { left: 30%; } .fb-viewer__nav.is-next { right: 30%; } }

/* ---------- Levels tab: the XP leaderboard, a warm card apart from the settings ---------- */
.xp-top-card { border-radius: 1.25rem; border: 1px solid rgba(245, 158, 11, .28); background: linear-gradient(135deg, rgba(245, 158, 11, .13), rgba(168, 85, 247, .10) 60%, rgba(15, 23, 42, .55)); box-shadow: 0 10px 30px rgba(0, 0, 0, .25); overflow: hidden; }
.xp-top-head { display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: 1rem 1.25rem; border-bottom: 1px solid rgba(245, 158, 11, .18); }
.xp-top-icon { width: 2rem; height: 2rem; border-radius: .6rem; display: grid; place-items: center; background: linear-gradient(135deg, #f59e0b, #f97316); color: #1c1203; font-size: .85rem; }
.xp-top-title { color: #fde68a; }
.xp-top-sub { color: #d6c7a1; }
.xp-top-refresh { padding: .5rem .6rem; border-radius: .75rem; border: 1px solid rgba(245, 158, 11, .3); background: rgba(245, 158, 11, .1); color: #fcd34d; }
.xp-top-refresh:hover { background: rgba(245, 158, 11, .2); color: #fff; }
.xp-top-list { padding: .9rem 1rem 1.1rem; display: flex; flex-direction: column; gap: .5rem; }
.xp-row { display: grid; grid-template-columns: 2rem 2.25rem minmax(0, 1fr) auto; align-items: center; gap: .7rem; padding: .55rem .8rem; border-radius: .9rem; background: rgba(2, 6, 23, .45); border: 1px solid rgba(255, 255, 255, .06); }
.xp-row--1 { border-color: rgba(250, 204, 21, .45); background: rgba(250, 204, 21, .10); }
.xp-row--2 { border-color: rgba(203, 213, 225, .35); }
.xp-row--3 { border-color: rgba(217, 119, 6, .4); }
.xp-rank { text-align: center; font-weight: 800; color: #fcd34d; font-size: .95rem; }
.xp-avatar { width: 2.25rem; height: 2.25rem; border-radius: 999px; object-fit: cover; background: #1e293b; }
.xp-who { min-width: 0; }
.xp-name { display: block; font-weight: 700; color: #f8fafc; font-size: .9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.xp-id { display: block; font-size: .7rem; color: #94a3b8; font-family: ui-monospace, monospace; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.xp-stat { text-align: right; }
.xp-level { display: inline-block; padding: .15rem .55rem; border-radius: 999px; font-size: .75rem; font-weight: 800; background: rgba(245, 158, 11, .18); color: #fcd34d; }
.xp-xp { display: block; font-size: .7rem; color: #cbd5e1; margin-top: .15rem; }
@media (max-width: 480px) { .xp-row { grid-template-columns: 1.6rem 2rem minmax(0, 1fr) auto; gap: .5rem; padding: .5rem .6rem; } }

/* Gallery import: the docs' Discord preview, kept inside its column */
.import-preview .dc { max-width: 100%; }
.import-preview .dc-embed__image { max-height: 320px; object-fit: cover; }

/* ---------- Phones ---------- */
@media (max-width: 767px) {
  /* iOS zooms the page into any field with text under 16px; CodeMirror's hidden textarea too. */
  input:not([type="checkbox"]):not([type="radio"]):not([type="range"]), select, textarea { font-size: 16px !important; }
}
@media (max-width: 380px) {
  /* The smallest phones: the avatar alone stands for the brand. */
  .sn-wordmark { display: none; }
}
.sn-stage { max-width: 100%; }
@media (max-width: 767px) { .sn-hero .sn-stage::before { right: 0; } }  /* the glow stuck out 6% on phones */
@media (max-width: 440px) {
  /* The header must fit: avatar without the name, tighter gaps. */
  .sn-user-chip > span.truncate { display: none; }
  header .flex.items-center.gap-2\.5 { gap: 0.375rem; }
}
