/* Base layout, tokens, cards, buttons. */

        :root {
            --primary: #10b981;
            --primary-2: #34d399;
            --dark-bg: #020617;
            --dark-card: rgba(15, 23, 42, 0.82);
            --dark-card-strong: rgba(15, 23, 42, 0.94);
            --dark-border: rgba(148, 163, 184, 0.18);
            --text: #e5e7eb;
            --muted: #94a3b8;
            --blue: #3b82f6;
            --purple: #a855f7;
            --gold: #f59e0b;
        }

        @property --title-glow-opacity {
            syntax: "<number>";
            inherits: false;
            initial-value: 0;
        }

        * { box-sizing: border-box; }
        html { scroll-behavior: smooth; }

        body {
            margin: 0;
            min-height: 100vh;
            cursor: default;
            color: var(--text);
            background:
                radial-gradient(circle at 18% 18%, rgba(16, 185, 129, 0.13), transparent 28%),
                radial-gradient(circle at 78% 24%, rgba(59, 130, 246, 0.12), transparent 30%),
                radial-gradient(circle at 54% 82%, rgba(168, 85, 247, 0.08), transparent 34%),
                linear-gradient(180deg, #03111f 0%, #020817 45%, #010611 100%);
            overflow-x: hidden;
            font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
        }

        html.agent-workspace-active,
        body.agent-workspace-active {
            height: 100%;
            overflow: hidden !important;
        }

        body.agent-workspace-active .app-shell {
            height: 100vh;
            overflow: hidden;
        }

        #bg-particles {
            position: fixed;
            inset: 0;
            width: 100%;
            height: 100%;
            z-index: 0;
            pointer-events: none;
            opacity: 0.66;
        }

        .frontend-build-badge {
            position: fixed;
            right: 12px;
            bottom: 10px;
            z-index: 60;
            pointer-events: none;
            padding: 6px 8px;
            border: 1px solid rgba(125, 211, 252, 0.16);
            border-radius: 10px;
            background: rgba(2, 6, 23, 0.36);
            color: rgba(191, 219, 254, 0.72);
            font-size: 10px;
            line-height: 1.35;
            font-weight: 700;
            backdrop-filter: blur(10px);
            opacity: 0.58;
            display: none;
        }

        html.dev-mode .frontend-build-badge {
            display: block;
        }

        .dev-only {
            display: none !important;
        }

        html.dev-mode .dev-only {
            display: inline-flex !important;
            align-items: center;
            justify-content: center;
        }

        html.dev-mode .dev-only.dev-block {
            display: block !important;
        }

        html.dev-mode .dev-only.dev-grid {
            display: grid !important;
        }

        html.dev-mode .workspace-nav {
            grid-template-columns: repeat(5, minmax(0, 1fr));
        }

        @media (max-width: 640px) {
            .frontend-build-badge {
                display: none;
            }
        }

        .app-shell,
        #landing-screen,
        #feature-hub,
        #workspace-shell,
        nav,
        header,
        main,
        section,
        .modal-panel {
            position: relative;
            z-index: 1;
        }

        .app-shell {
            min-height: 100vh;
            display: flex;
            flex-direction: column;
        }

        .site-icp-footer {
            position: relative;
            z-index: 2;
            flex: 0 0 auto;
            width: 100%;
            padding: 24px 16px 30px;
            text-align: center;
            font-size: 12px;
            line-height: 1.7;
            color: rgba(226, 232, 240, 0.66);
        }

        .site-disclaimer {
            max-width: 980px;
            margin: 0 auto 8px;
            color: rgba(226, 232, 240, 0.72);
        }

        .site-disclaimer-en {
            font-size: 11px;
            color: rgba(226, 232, 240, 0.56);
        }

        .site-icp-footer a {
            display: inline-block;
            margin-top: 4px;
            color: rgba(226, 232, 240, 0.72);
            text-decoration: none;
        }

        .site-icp-footer a:hover {
            color: rgba(226, 232, 240, 0.92);
            text-decoration: underline;
        }

        body.agent-workspace-active .site-icp-footer {
            padding-top: 4px;
            padding-bottom: 8px;
        }

        .glass-card {
            background: var(--dark-card);
            border: 1px solid var(--dark-border);
            box-shadow: 0 16px 44px rgba(0, 0, 0, 0.24);
            backdrop-filter: blur(12px);
        }

        .glass-card-strong {
            background: var(--dark-card-strong);
            border: 1px solid var(--dark-border);
            box-shadow: 0 18px 48px rgba(0, 0, 0, 0.28);
            backdrop-filter: blur(14px);
        }

        .text-gradient {
            background: linear-gradient(135deg, #d1fae5 0%, #34d399 42%, #60a5fa 100%);
            -webkit-background-clip: text;
            background-clip: text;
            color: transparent;
        }

        button,
        a,
        [role="button"],
        .btn-active,
        .module-card,
        .home-feature-card,
        .home-quick-question,
        .workspace-tab,
        .agent-evidence-tab,
        .nav-tab,
        .quick-chip,
        .card-clickable {
            cursor: pointer;
        }

        input,
        textarea,
        [contenteditable="true"] {
            cursor: text;
            user-select: text;
        }

        .glow-hover-title,
        .section-title,
        .panel-title,
        .agent-title,
        .evidence-title,
        .home-feature-card h3,
        .home-feature-card p,
        .workspace-tab,
        .home-quick-question,
        nav button,
        nav a {
            user-select: none;
        }

        .glow-hover-title,
        .section-title,
        .panel-title,
        .agent-title,
        .evidence-title,
        .home-feature-card h3,
        .home-feature-card p {
            cursor: default;
        }

        .glow-hover-title {
            --title-glow-x: 50%;
            --title-glow-y: 50%;
            --title-glow-opacity: 0;
            position: relative;
            display: inline-block;
            overflow: visible;
            background-image:
                radial-gradient(circle at var(--title-glow-x) var(--title-glow-y),
                    rgb(248 250 252 / var(--title-glow-opacity)) 0%,
                    rgb(94 234 212 / calc(var(--title-glow-opacity) * 0.7)) 14%,
                    rgb(96 165 250 / calc(var(--title-glow-opacity) * 0.42)) 28%,
                    transparent 48%),
                linear-gradient(135deg, #d1fae5 0%, #34d399 42%, #60a5fa 100%);
            background-size: 100% 100%;
            background-position: 0 0;
            -webkit-background-clip: text;
            background-clip: text;
            color: transparent;
            transition: --title-glow-opacity 0.22s ease, text-shadow 0.2s ease, filter 0.2s ease;
        }

        .glow-hover-title::before,
        .glow-hover-title::after {
            pointer-events: none;
        }

        .glow-hover-title.is-local-glowing {
            text-shadow: 0 0 16px rgba(45, 212, 191, 0.16);
        }

        .btn-active {
            transition: transform 0.22s ease, box-shadow 0.22s ease, background 0.22s ease, border-color 0.22s ease;
        }
        .btn-active:hover { transform: translateY(-2px); }

        .screen-enter { animation: screenFadeIn 0.55s ease both; }
        @keyframes screenFadeIn {
            from { opacity: 0; transform: translateY(18px); }
            to { opacity: 1; transform: translateY(0); }
        }

        .module-card {
            transition: transform 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease;
        }
        .module-card:hover {
            transform: translateY(-8px) scale(1.018);
            border-color: rgba(16, 185, 129, 0.38);
            box-shadow: 0 24px 70px rgba(16, 185, 129, 0.13);
        }

        @media (prefers-reduced-motion: reduce) {
            html { scroll-behavior: auto; }
            .screen-enter,
            .module-card,
            .btn-active {
                animation: none !important;
                transition-duration: 0.01ms !important;
            }
        }

        html.perf-no-blur *,
        body.perf-no-blur * {
            backdrop-filter: none !important;
            -webkit-backdrop-filter: none !important;
            filter: none !important;
            text-shadow: none !important;
        }

        html.perf-no-blur .glass-card,
        html.perf-no-blur .glass-card-strong,
        html.perf-no-blur nav,
        html.perf-no-blur .home-agent-shell,
        body.perf-no-blur .glass-card,
        body.perf-no-blur .glass-card-strong,
        body.perf-no-blur nav,
        body.perf-no-blur .home-agent-shell {
            box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18) !important;
        }

        html.perf-no-motion,
        html.perf-no-motion *,
        body.perf-no-motion,
        body.perf-no-motion * {
            scroll-behavior: auto !important;
            animation: none !important;
            transition-duration: 0.01ms !important;
            transition-delay: 0ms !important;
        }

        html.perf-no-motion .module-card:hover,
        html.perf-no-motion .btn-active:hover,
        html.perf-no-motion .glow-hover-title:hover,
        body.perf-no-motion .module-card:hover,
        body.perf-no-motion .btn-active:hover,
        body.perf-no-motion .glow-hover-title:hover {
            transform: none !important;
        }

        html.perf-no-motion .glow-hover-title,
        html.perf-no-motion .glow-hover-title::after,
        body.perf-no-motion .glow-hover-title,
        body.perf-no-motion .glow-hover-title::after {
            animation: none !important;
            text-shadow: none !important;
            --title-glow-opacity: 0 !important;
        }

        html.perf-particles-off #bg-particles,
        body.perf-particles-off #bg-particles,
        html.perf-hero3d-off #nba-hero-3d-root,
        body.perf-hero3d-off #nba-hero-3d-root,
        .nba-hero3d-disabled-by-perf {
            display: none !important;
        }

        .perf-chart-paused {
            min-height: 112px;
            display: grid;
            place-items: center;
            text-align: center;
        }
