        :root {
            color-scheme: dark light;

            /* Dark mode (default) */
            --bg-deep: #081019;
            --bg-mid: #0e1724;
            --bg-panel: rgba(12, 19, 31, 0.78);
            --bg-panel-strong: rgba(8, 13, 22, 0.94);
            --bg-soft: rgba(255, 255, 255, 0.04);
            --line-soft: rgba(255, 255, 255, 0.09);
            --line-strong: rgba(139, 233, 253, 0.25);
            --text-main: #f0ebe0;
            --text-soft: #c4c8d6;
            --text-muted: #8b94a8;
            --accent-teal: #5ac5b8;
            --accent-gold: #dbb25e;
            --accent-coral: #e88668;
            --accent-cyan: #6ef3ff;
            --accent-rose: #f5a8d1;
            --shadow-panel: 0 20px 60px rgba(0, 0, 0, 0.35);
            --shadow-glow: 0 0 40px rgba(77, 182, 172, 0.18);
            --focus-ring: 3px solid #6ef3ff;
            --focus-ring-offset: 2px;
            --theme-toggle-bg: rgba(240, 235, 224, 0.14);
            --theme-toggle-bg-hover: rgba(240, 235, 224, 0.22);
            --theme-toggle-border: rgba(240, 235, 224, 0.42);
            --theme-toggle-icon: #ffffff;
            --theme-toggle-shadow: 0 10px 24px rgba(0, 0, 0, 0.22);
            --radius-xl: 28px;
            --radius-lg: 22px;
            --radius-md: 16px;
            --radius-sm: 12px;
            --header-height: 84px;
            --transition-fast: 140ms cubic-bezier(0.4, 0, 0.2, 1);
            --transition-normal: 200ms cubic-bezier(0.4, 0, 0.2, 1);
        }

        /* Light theme - via media query or explicit class */
        @media (prefers-color-scheme: light) {
            :root:not(.theme-dark) {
                --bg-deep: #f5f3f0;
                --bg-mid: #efefeb;
                --bg-panel: rgba(255, 255, 255, 0.72);
                --bg-panel-strong: rgba(248, 246, 242, 0.94);
                --bg-soft: rgba(0, 0, 0, 0.03);
                --line-soft: rgba(0, 0, 0, 0.08);
                --line-strong: rgba(77, 182, 172, 0.18);
                --text-main: #1a1a18;
                --text-soft: #4a4a48;
                --text-muted: #7a7a78;
                --accent-teal: #2b8f86;
                --accent-gold: #b8860b;
                --accent-coral: #c85a3a;
                --accent-cyan: #0088bb;
                --accent-rose: #c85a8f;
                --shadow-panel: 0 20px 60px rgba(0, 0, 0, 0.08);
                --shadow-glow: 0 0 40px rgba(43, 143, 134, 0.1);
                --focus-ring: 3px solid #0088bb;
            }
        }

        /* Explicit light theme class */
        html.theme-light {
            --bg-deep: #f5f3f0;
            --bg-mid: #efefeb;
            --bg-panel: rgba(255, 255, 255, 0.72);
            --bg-panel-strong: rgba(248, 246, 242, 0.94);
            --bg-soft: rgba(0, 0, 0, 0.03);
            --line-soft: rgba(0, 0, 0, 0.08);
            --line-strong: rgba(77, 182, 172, 0.18);
            --text-main: #1a1a18;
            --text-soft: #4a4a48;
            --text-muted: #7a7a78;
            --accent-teal: #2b8f86;
            --accent-gold: #b8860b;
            --accent-coral: #c85a3a;
            --accent-cyan: #0088bb;
            --accent-rose: #c85a8f;
            --shadow-panel: 0 20px 60px rgba(0, 0, 0, 0.08);
            --shadow-glow: 0 0 40px rgba(43, 143, 134, 0.1);
            --focus-ring: 3px solid #0088bb;
            --theme-toggle-bg: rgba(255, 255, 255, 0.92);
            --theme-toggle-bg-hover: rgba(255, 255, 255, 0.98);
            --theme-toggle-border: rgba(0, 136, 187, 0.45);
            --theme-toggle-icon: #111111;
            --theme-toggle-shadow: 0 12px 28px rgba(0, 67, 92, 0.14);
        }

        @media (prefers-color-scheme: light) and (prefers-contrast: more) {
            :root:not(.theme-dark) {
                --text-main: #000000;
                --text-soft: #1a1a1a;
                --text-muted: #333333;
                --accent-cyan: #0052cc;
                --accent-gold: #996600;
                --line-soft: rgba(0, 0, 0, 0.15);
                --line-strong: rgba(0, 0, 0, 0.3);
            }
        }

        html.theme-light {
            color-scheme: light;
        }

        html.theme-dark {
            color-scheme: dark;
        }

        * {
            box-sizing: border-box;
        }

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

        .sr-only {
            position: absolute;
            width: 1px;
            height: 1px;
            padding: 0;
            margin: -1px;
            overflow: hidden;
            clip: rect(0, 0, 0, 0);
            white-space: nowrap;
            border-width: 0;
        }

        .sr-only-focusable:focus,
        .sr-only-focusable:focus-visible {
            position: static;
            width: auto;
            height: auto;
            overflow: visible;
            clip: auto;
            white-space: normal;
        }

        html {
            color-scheme: dark light;
            scroll-behavior: smooth;
            font-size: 16px;
        }

        @media (prefers-contrast: more) {
            :root {
                --text-main: #ffffff;
                --text-soft: #e0e0e0;
                --text-muted: #a0a0a0;
                --accent-cyan: #00ffff;
                --accent-gold: #ffff00;
                --line-soft: rgba(255, 255, 255, 0.2);
                --line-strong: rgba(255, 255, 255, 0.4);
            }
        }

        body {
            margin: 0;
            min-height: 100vh;
            font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Georgia", "Times New Roman", serif;
            font-size: 1rem;
            line-height: 1.6;
            color: var(--text-main);
            background:
                radial-gradient(circle at 18% 18%, rgba(214, 164, 88, 0.16), transparent 0 22%),
                radial-gradient(circle at 80% 20%, rgba(77, 182, 172, 0.18), transparent 0 24%),
                radial-gradient(circle at 52% 74%, rgba(238, 161, 200, 0.12), transparent 0 22%),
                linear-gradient(180deg, #050a12 0%, #09121e 38%, #071018 100%);
            overflow-x: hidden;
            -webkit-font-smoothing: antialiased;
            -moz-osx-font-smoothing: grayscale;
            transition: background var(--transition-normal);
        }

        @media (prefers-color-scheme: light) {
            body:not(.theme-dark body) {
                background:
                    radial-gradient(circle at 18% 18%, rgba(214, 164, 88, 0.08), transparent 0 22%),
                    radial-gradient(circle at 80% 20%, rgba(77, 182, 172, 0.1), transparent 0 24%),
                    radial-gradient(circle at 52% 74%, rgba(238, 161, 200, 0.06), transparent 0 22%),
                    linear-gradient(180deg, #faf8f5 0%, #f5f3f0 38%, #f9f6f3 100%);
            }
        }

        html.theme-light body {
            background:
                radial-gradient(circle at 18% 18%, rgba(214, 164, 88, 0.08), transparent 0 22%),
                radial-gradient(circle at 80% 20%, rgba(77, 182, 172, 0.1), transparent 0 24%),
                radial-gradient(circle at 52% 74%, rgba(238, 161, 200, 0.06), transparent 0 22%),
                linear-gradient(180deg, #faf8f5 0%, #f5f3f0 38%, #f9f6f3 100%);
        }

        body::before,
        body::after {
            content: "";
            position: fixed;
            inset: 0;
            pointer-events: none;
        }

        body::before {
            background-image:
                linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
                linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
            background-size: 80px 80px;
            -webkit-mask-image: radial-gradient(circle at center, black 35%, transparent 82%);
            mask-image: radial-gradient(circle at center, black 35%, transparent 82%);
            opacity: 0.5;
        }

        @media (prefers-color-scheme: light) {
            body:not(.theme-dark body)::before {
                background-image:
                    linear-gradient(rgba(0, 0, 0, 0.02) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(0, 0, 0, 0.02) 1px, transparent 1px);
            }
        }

        html.theme-light body::before {
            background-image:
                linear-gradient(rgba(0, 0, 0, 0.02) 1px, transparent 1px),
                linear-gradient(90deg, rgba(0, 0, 0, 0.02) 1px, transparent 1px);
        }

        body::after {
            background:
                radial-gradient(circle at 50% 50%, rgba(139, 233, 253, 0.08), transparent 36%),
                radial-gradient(circle at 20% 80%, rgba(214, 164, 88, 0.08), transparent 28%);
            animation: atmosphericShift 18s ease-in-out infinite alternate;
        }

        @media (prefers-color-scheme: light) {
            body:not(.theme-dark body)::after {
                background:
                    radial-gradient(circle at 50% 50%, rgba(77, 182, 172, 0.06), transparent 36%),
                    radial-gradient(circle at 20% 80%, rgba(184, 134, 11, 0.04), transparent 28%);
            }
        }

        html.theme-light body::after {
            background:
                radial-gradient(circle at 50% 50%, rgba(77, 182, 172, 0.06), transparent 36%),
                radial-gradient(circle at 20% 80%, rgba(184, 134, 11, 0.04), transparent 28%);
        }

        @keyframes atmosphericShift {
            from {
                transform: translate3d(0, 0, 0) scale(1);
                opacity: 0.7;
            }

            to {
                transform: translate3d(0, -2%, 0) scale(1.06);
                opacity: 1;
            }
        }

        .shell {
            position: relative;
            z-index: 1;
            display: grid;
            grid-template-rows: auto auto 1fr auto;
            min-height: 100vh;
            gap: 20px;
            padding: 18px;
        }

        .panel {
            background: var(--bg-panel);
            border: 2px solid var(--line-soft);
            border-radius: var(--radius-lg);
            box-shadow: var(--shadow-panel), var(--shadow-glow);
            -webkit-backdrop-filter: blur(18px);
            backdrop-filter: blur(18px);
            transition: background var(--transition-normal), border-color var(--transition-normal), box-shadow var(--transition-normal);
        }

        html.theme-light .panel {
            border-color: rgba(0, 0, 0, 0.12);
        }

        .topbar {
            display: grid;
            grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(280px, 0.8fr) auto;
            gap: 18px;
            align-items: center;
            padding: 18px 22px;
            min-height: var(--header-height);
        }

        .search-bar-inline {
            display: flex;
            gap: 10px;
            align-items: center;
        }

        .search-bar-inline input {
            flex: 1;
            padding: 9px 14px;
            border: 1px solid var(--line-soft);
            border-radius: 999px;
            background: rgba(255, 255, 255, 0.04);
            color: var(--text-main);
            font: inherit;
            font-size: 0.9rem;
            transition: 160ms ease;
        }

        .search-bar-inline input::placeholder {
            color: var(--text-muted);
        }

        .search-bar-inline input:focus {
            outline: var(--focus-ring);
            outline-offset: var(--focus-ring-offset);
            background: rgba(255, 255, 255, 0.08);
            border-color: var(--accent-cyan);
            box-shadow: 0 0 24px rgba(110, 243, 255, 0.16);
        }

        /* Universal focus styles for all interactive elements */
        button:focus-visible,
        a:focus-visible,
        input:focus-visible,
        select:focus-visible,
        textarea:focus-visible {
            outline: var(--focus-ring);
            outline-offset: var(--focus-ring-offset);
        }

        /* Enhanced keyboard navigation indicator */
        *:focus-visible {
            outline: var(--focus-ring);
            outline-offset: var(--focus-ring-offset);
        }

        .search-results-dropdown {
            position: fixed;
            top: auto;
            left: auto;
            background: var(--bg-panel);
            border: 1px solid var(--line-soft);
            border-radius: var(--radius-md);
            max-height: 400px;
            overflow-y: auto;
            z-index: 10000;
            display: none;
            box-shadow: var(--shadow-panel);
            min-width: 280px;
            max-width: 400px;
        }

        .search-results-dropdown.is-active {
            display: block;
        }

        .search-result-item {
            padding: 12px 16px;
            border-bottom: 1px solid var(--line-soft);
            cursor: pointer;
            transition: background 160ms ease;
        }

        .search-result-item:last-child {
            border-bottom: none;
        }

        .search-result-item:hover {
            background: rgba(139, 233, 253, 0.08);
        }

        .search-result-item strong {
            display: block;
            color: var(--text-main);
        }

        .search-result-item small {
            display: block;
            color: var(--text-soft);
            font-size: 0.85rem;
            margin-top: 4px;
        }

        .detail-section {
            padding: 22px 24px;
            border-bottom: 1px solid var(--line-soft);
            background:
                linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02)),
                radial-gradient(circle at top right, rgba(139, 233, 253, 0.08), transparent 42%);
        }

        .detail-section:last-child {
            border-bottom: none;
        }

        .detail-section--spotlight {
            border: 1px solid rgba(139, 233, 253, 0.14);
            border-radius: var(--radius-lg);
            box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
        }

        .detail-kicker {
            margin: 0 0 10px;
            color: var(--accent-cyan);
            font-size: 0.8rem;
            font-weight: 700;
            letter-spacing: 0.12em;
            text-transform: uppercase;
        }

        html.theme-light .detail-kicker {
            color: #0088bb !important;
        }

        .detail-section h3 {
            margin: 0 0 14px;
            font-size: 1.4rem;
            font-weight: 600;
            color: #f9f6f0;
            line-height: 1.2;
        }

        .detail-row {
            margin: 12px 0 0;
            color: var(--text-soft);
            font-size: 0.95rem;
            line-height: 1.65;
        }

        .detail-row--id {
            color: var(--text-muted);
            font-family: "Courier New", monospace;
            font-size: 0.82rem;
        }

        .related-section {
            margin-top: 16px;
            padding-top: 12px;
            border-top: 1px solid var(--line-soft);
        }

        .related-section h4 {
            margin: 0 0 10px;
            font-size: 0.9rem;
            color: var(--accent-cyan);
            text-transform: uppercase;
            letter-spacing: 0.05em;
        }

        .related-cards {
            display: flex;
            flex-direction: column;
            gap: 8px;
        }

        .related-card {
            padding: 12px 14px;
            border-radius: var(--radius-sm);
            border: 2px solid rgba(255, 255, 255, 0.14);
            background: rgba(255, 255, 255, 0.04);
            cursor: pointer;
            transition: all var(--transition-normal);
        }

        html.theme-light .related-card {
            border-color: rgba(0, 0, 0, 0.12) !important;
            background: rgba(0, 0, 0, 0.03) !important;
        }

        .related-card:hover,
        .related-card:focus-visible {
            background: rgba(106, 243, 255, 0.1);
            border-color: var(--accent-cyan);
            transform: translateX(4px);
        }

        html.theme-light .related-card:hover,
        html.theme-light .related-card:focus-visible {
            background: rgba(0, 136, 187, 0.1) !important;
            border-color: #0088bb !important;
        }

        .related-card strong {
            display: block;
            color: #f9f6f0;
            font-size: 0.95rem;
            font-weight: 600;
            margin-bottom: 4px;
        }

        .related-card small {
            display: block;
            color: var(--text-soft);
            font-size: 0.85rem;
            line-height: 1.5;
        }

        .brand {
            display: flex;
            flex-direction: column;
            gap: 4px;
        }

        .eyebrow {
            font-family: "Courier New", monospace;
            font-size: 0.8rem;
            font-weight: 600;
            letter-spacing: 0.15em;
            text-transform: uppercase;
            color: var(--accent-cyan);
        }

        .brand h1 {
            margin: 0;
            font-size: clamp(2rem, 4vw, 3.8rem);
            line-height: 1;
            letter-spacing: 0.01em;
            font-weight: 700;
            color: var(--text-main);
        }

        html.theme-light .brand h1 {
            color: #1a1a18;
        }

        .brand p {
            margin: 0;
            color: var(--text-soft);
            max-width: 70ch;
            font-size: 1rem;
        }

        .mode-switcher,
        .lang-status {
            display: flex;
            align-items: center;
            gap: 10px;
            flex-wrap: wrap;
            justify-content: flex-end;
        }

        .chip,
        .ghost-button,
        .mode-button,
        .lang-button {
            border: 2px solid var(--line-soft);
            border-radius: 999px;
            background: rgba(255, 255, 255, 0.04);
            color: var(--text-main);
            padding: 9px 14px;
            font: inherit;
            cursor: pointer;
            transition: var(--transition-normal);
            position: relative;
        }

        .chip {
            font-family: "Courier New", monospace;
            font-size: 0.82rem;
            color: var(--text-soft);
        }

        .chip.is-live {
            border-color: rgba(139, 233, 253, 0.34);
            color: var(--accent-cyan);
            box-shadow: 0 0 18px rgba(139, 233, 253, 0.12);
        }

        .mode-button,
        .lang-button,
        .theme-toggle {
            font-family: Arial, Helvetica, sans-serif;
            font-size: 0.9rem;
        }

        .lang-controls {
            display: flex;
            gap: 8px;
            align-items: center;
        }

        .theme-toggle {
            appearance: none;
            -webkit-appearance: none;
            border: 2px solid var(--theme-toggle-border);
            border-radius: 999px;
            background: var(--theme-toggle-bg);
            color: var(--theme-toggle-icon);
            padding: 10px 12px;
            cursor: pointer;
            transition: var(--transition-normal);
            display: flex;
            align-items: center;
            justify-content: center;
            min-width: 48px;
            height: 44px;
            box-shadow: var(--theme-toggle-shadow);
        }

        .theme-toggle:hover,
        .theme-toggle:focus-visible {
            transform: scale(1.1);
            border-color: var(--accent-cyan);
            background: var(--theme-toggle-bg-hover);
        }

        .theme-toggle:active {
            transform: scale(0.95);
        }

        .theme-toggle svg {
            width: 22px;
            height: 22px;
            transition: transform var(--transition-normal);
            stroke: currentColor;
            stroke-width: 2;
            fill: none;
            color: currentColor;
            overflow: visible;
        }

        .theme-toggle .sun-icon,
        .theme-toggle .moon-icon {
            display: none;
        }

        .theme-toggle .sun-icon {
            display: block;
        }

        @media (prefers-color-scheme: light) {
            :root:not(.theme-dark) {
                --theme-toggle-bg: rgba(255, 255, 255, 0.92);
                --theme-toggle-bg-hover: rgba(255, 255, 255, 0.98);
                --theme-toggle-border: rgba(0, 136, 187, 0.45);
                --theme-toggle-icon: #005f83;
                --theme-toggle-shadow: 0 12px 28px rgba(0, 67, 92, 0.14);
            }

            html:not(.theme-dark) .theme-toggle {
                color: var(--theme-toggle-icon);
            }

            html:not(.theme-dark) .theme-toggle:hover,
            html:not(.theme-dark) .theme-toggle:focus-visible {
                border-color: var(--accent-cyan);
            }

            html:not(.theme-dark) .theme-toggle svg {
                color: currentColor !important;
            }

            html:not(.theme-dark) .theme-toggle .sun-icon {
                display: none;
            }

            html:not(.theme-dark) .theme-toggle .moon-icon {
                display: block;
            }
        }

        html.theme-light .theme-toggle {
            color: var(--theme-toggle-icon);
        }

        html.theme-light .theme-toggle:hover,
        html.theme-light .theme-toggle:focus-visible {
            border-color: var(--accent-cyan);
        }

        html.theme-light .theme-toggle svg {
            color: currentColor !important;
        }

        html.theme-light .theme-toggle .sun-icon {
            display: none !important;
        }

        html.theme-light .theme-toggle .moon-icon {
            display: block !important;
        }

        .mode-button.is-active,
        .lang-button.is-active {
            background: linear-gradient(135deg, rgba(106, 243, 255, 0.18), rgba(106, 243, 255, 0.12));
            border-color: var(--accent-cyan);
            box-shadow: 0 0 0 2px rgba(110, 243, 255, 0.2), 0 0 28px rgba(110, 243, 255, 0.14);
        }

        .ghost-button:hover,
        .mode-button:hover,
        .lang-button:hover {
            transform: translateY(-2px);
            border-color: rgba(255, 255, 255, 0.32);
            background: rgba(255, 255, 255, 0.08);
        }

        .ghost-button:active,
        .mode-button:active,
        .lang-button:active {
            transform: translateY(0);
        }

        .top-dashboard {
            display: grid;
            grid-template-columns: minmax(240px, 0.92fr) minmax(0, 1.25fr) minmax(320px, 0.92fr);
            gap: 20px;
            align-items: start;
        }

        .hero {
            grid-column: 1;
            display: block;
            padding: 24px 28px;
            overflow: hidden;
        }

        .rail {
            grid-column: 1;
            grid-row: 2;
        }

        .stage {
            grid-column: 2 / 4;
            grid-row: 1 / 3;
        }

        .hero-journey {
            margin-top: 4px;
        }

        .hero-copy {
            display: flex;
            flex-direction: column;
            gap: 16px;
        }

        .hero-copy h2 {
            margin: 0;
            font-size: clamp(2rem, 3vw, 3rem);
            line-height: 1.15;
            max-width: 16ch;
            font-weight: 700;
            color: var(--text-main);
        }

        html.theme-light .hero-copy h2 {
            color: #1a1a18;
        }

        .hero-copy p {
            margin: 0;
            color: var(--text-soft);
            max-width: 68ch;
            font-size: 1.05rem;
            line-height: 1.7;
        }

        .hero-actions {
            display: grid;
            grid-template-columns: 1fr;
            gap: 12px;
        }

        .entry-card {
            position: relative;
            min-height: 118px;
            padding: 18px 20px;
            border-radius: var(--radius-md);
            border: 2px solid rgba(255, 255, 255, 0.12);
            background:
                linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02)),
                radial-gradient(circle at top right, rgba(106, 243, 255, 0.08), transparent 50%);
            overflow: hidden;
            cursor: pointer;
            transition: all var(--transition-normal);
        }

        html.theme-light .entry-card {
            border-color: rgba(0, 0, 0, 0.12);
            background:
                linear-gradient(180deg, rgba(0, 0, 0, 0.03), rgba(0, 0, 0, 0.01)),
                radial-gradient(circle at top right, rgba(43, 143, 134, 0.06), transparent 50%);
        }

        .entry-card:hover {
            border-color: rgba(255, 255, 255, 0.24);
            background:
                linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.04)),
                radial-gradient(circle at top right, rgba(106, 243, 255, 0.12), transparent 50%);
            transform: translateY(-2px);
        }

        html.theme-light .entry-card:hover {
            border-color: rgba(0, 0, 0, 0.2);
            background:
                linear-gradient(180deg, rgba(0, 0, 0, 0.06), rgba(0, 0, 0, 0.02)),
                radial-gradient(circle at top right, rgba(43, 143, 134, 0.1), transparent 50%);
        }

        .entry-card strong {
            display: block;
            margin-bottom: 8px;
            font-size: 1.1rem;
            font-weight: 600;
            color: var(--text-main);
        }

        html.theme-light .entry-card strong {
            color: #1a1a18;
        }

        .entry-card span {
            display: block;
            color: var(--text-soft);
            font-size: 0.95rem;
            line-height: 1.5;
        }

        .entry-card::after {
            content: "";
            position: absolute;
            right: -20px;
            bottom: -24px;
            width: 100px;
            height: 100px;
            border-radius: 50%;
            background: radial-gradient(circle, rgba(214, 164, 88, 0.2), transparent 70%);
        }

        .hero-side {
            display: grid;
            align-content: start;
            gap: 12px;
        }

        .preview-card {
            padding: 16px;
            border-radius: var(--radius-md);
            border: 2px solid var(--line-soft);
            background: rgba(255, 255, 255, 0.03);
        }

        html.theme-light .preview-card {
            border-color: rgba(0, 0, 0, 0.12);
            background: rgba(0, 0, 0, 0.02);
        }

        .preview-card h3,
        .section-title {
            margin: 0 0 12px;
            font-family: Arial, Helvetica, sans-serif;
            font-size: 0.85rem;
            font-weight: 700;
            letter-spacing: 0.14em;
            text-transform: uppercase;
            color: var(--accent-cyan);
        }

        .preview-card p {
            margin: 0;
            line-height: 1.5;
        }

        .trail {
            display: inline-flex;
            flex-wrap: wrap;
            gap: 8px;
            align-items: center;
            color: var(--text-soft);
        }

        .trail strong {
            color: var(--text-main);
        }

        .graphql-preview {
            margin: 0;
            white-space: pre-wrap;
            font-family: "Courier New", monospace;
            color: var(--accent-cyan);
            font-size: 0.85rem;
            line-height: 1.6;
        }

        .workspace {
            display: grid;
            grid-template-columns: 1fr;
            gap: 20px;
            min-height: 0;
        }

        .hero,
        .rail,
        .stage,
        .mirror {
            min-height: 100%;
        }

        .rail,
        .mirror {
            padding: 18px;
            display: grid;
            align-content: start;
            gap: 16px;
        }

        .mirror {
            grid-template-columns: minmax(0, 1fr) minmax(260px, 0.92fr);
            align-items: start;
        }

        .mirror-primary,
        .mirror-variables,
        .mirror-document,
        .mirror-response,
        .mirror-interpretation {
            grid-column: 1;
        }

        .mirror-session {
            grid-column: 2;
            grid-row: 1 / span 5;
            align-self: stretch;
            display: grid;
            align-content: start;
            gap: 10px;
        }

        .query-session-list {
            display: grid;
            gap: 10px;
        }

        .session-entry {
            display: grid;
            gap: 4px;
            width: 100%;
            padding: 10px 12px;
            border-radius: 16px;
            border: 1px solid rgba(255, 255, 255, 0.08);
            background: rgba(255, 255, 255, 0.03);
            text-align: left;
            font: inherit;
            cursor: pointer;
            transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease, transform 160ms ease;
        }

        .session-entry:hover,
        .session-entry:focus-visible {
            border-color: rgba(255, 255, 255, 0.2);
            transform: translateY(-1px);
            outline: none;
        }

        .session-entry strong,
        .session-entry small {
            display: block;
        }

        .session-entry strong {
            color: var(--text-main);
            font-size: 0.9rem;
        }

        .session-entry small {
            color: var(--text-soft);
            line-height: 1.45;
        }

        .session-entry.is-live {
            border-color: rgba(139, 233, 253, 0.28);
            box-shadow: inset 0 0 0 1px rgba(139, 233, 253, 0.08);
        }

        .session-entry.is-error {
            border-color: rgba(219, 122, 97, 0.34);
        }

        .session-entry.is-replaying {
            border-color: rgba(214, 164, 88, 0.34);
            box-shadow: inset 0 0 0 1px rgba(214, 164, 88, 0.12);
        }

        .stage {
            position: relative;
            overflow: hidden;
            padding: 22px;
            display: grid;
            grid-template-rows: auto 1fr auto;
            gap: 16px;
        }

        .stage-head {
            display: flex;
            justify-content: space-between;
            gap: 18px;
            flex-wrap: wrap;
            align-items: start;
        }

        .stage-head h3 {
            margin: 0;
            font-size: 1.45rem;
            font-weight: 700;
            color: var(--text-main);
        }

        html.theme-light .stage-head h3 {
            color: #1a1a18;
        }

        .stage-head p {
            margin: 8px 0 0;
            color: var(--text-soft);
            max-width: 60ch;
            line-height: 1.6;
        }

        .constellation {
            position: relative;
            border-radius: calc(var(--radius-lg) - 4px);
            border: 2px solid var(--line-soft);
            background:
                radial-gradient(circle at center, rgba(110, 243, 255, 0.06), transparent 44%),
                linear-gradient(180deg, rgba(255, 255, 255, 0.025), rgba(255, 255, 255, 0.01));
            overflow: hidden;
            min-height: 520px;
            transition: background var(--transition-normal), border-color var(--transition-normal);
        }

        @media (prefers-color-scheme: light) {
            html:not(.theme-dark) .constellation {
                border-color: rgba(0, 0, 0, 0.14);
                background:
                    radial-gradient(circle at center, rgba(77, 182, 172, 0.04), transparent 44%),
                    linear-gradient(180deg, rgba(0, 0, 0, 0.01), rgba(0, 0, 0, 0.005));
            }
        }

        html.theme-light .constellation {
            border-color: rgba(0, 0, 0, 0.14) !important;
            background:
                radial-gradient(circle at center, rgba(77, 182, 172, 0.04), transparent 44%),
                linear-gradient(180deg, rgba(0, 0, 0, 0.01), rgba(0, 0, 0, 0.005));
        }

        .constellation::before {
            content: "";
            position: absolute;
            inset: 0;
            background:
                radial-gradient(circle at 20% 24%, rgba(77, 182, 172, 0.2), transparent 0 20%),
                radial-gradient(circle at 70% 30%, rgba(214, 164, 88, 0.16), transparent 0 16%),
                radial-gradient(circle at 50% 76%, rgba(219, 122, 97, 0.12), transparent 0 18%);
            animation: stageGlow 16s ease-in-out infinite alternate;
        }

        @keyframes stageGlow {
            from {
                transform: scale(1) translate3d(0, 0, 0);
            }

            to {
                transform: scale(1.08) translate3d(1%, -1%, 0);
            }
        }

        .constellation-grid,
        .constellation-links,
        .constellation-nodes,
        .stage-overlay {
            position: absolute;
            inset: 0;
        }

        .constellation-grid {
            z-index: 0;
            background-image:
                linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
                linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
            background-size: 88px 88px;
            -webkit-mask-image: radial-gradient(circle at center, black 28%, transparent 85%);
            mask-image: radial-gradient(circle at center, black 28%, transparent 85%);
        }

        @media (prefers-color-scheme: light) {
            html:not(.theme-dark) .constellation-grid {
                background-image:
                    linear-gradient(rgba(0, 0, 0, 0.02) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(0, 0, 0, 0.02) 1px, transparent 1px);
            }
        }

        html.theme-light .constellation-grid {
            background-image:
                linear-gradient(rgba(0, 0, 0, 0.02) 1px, transparent 1px),
                linear-gradient(90deg, rgba(0, 0, 0, 0.02) 1px, transparent 1px);
        }

        .constellation-links {
            z-index: 1;
        }

        .constellation-nodes {
            z-index: 2;
        }

        .link {
            position: absolute;
            height: 1px;
            background: linear-gradient(90deg, transparent, rgba(139, 233, 253, 0.5), transparent);
            transform-origin: left center;
            opacity: 0.7;
            transition: opacity 160ms ease, filter 160ms ease;
        }

        .node {
            position: absolute;
            display: grid;
            place-items: center;
            border-radius: 50%;
            border: 2px solid rgba(255, 255, 255, 0.22);
            -webkit-backdrop-filter: blur(6px);
            backdrop-filter: blur(6px);
            box-shadow: 0 0 24px rgba(110, 243, 255, 0.15);
            cursor: pointer;
            transform: translate(-50%, -50%);
            -webkit-appearance: none;
            appearance: none;
            padding: 0;
            margin: 0;
            animation: nodeAppear 260ms ease;
            transition: transform var(--transition-normal), box-shadow var(--transition-normal), border-color var(--transition-normal), opacity var(--transition-normal), filter var(--transition-normal);
        }

        .node:hover,
        .node:focus-visible {
            transform: translate(-50%, -50%) scale(1.08);
            border-color: rgba(255, 255, 255, 0.48);
            box-shadow: 0 0 32px rgba(110, 243, 255, 0.28);
        }

        .node.is-selected {
            border-color: rgba(214, 164, 88, 0.58);
            box-shadow: 0 0 34px rgba(214, 164, 88, 0.24);
        }

        .node.is-selected.node--work {
            width: 58px;
            height: 58px;
            z-index: 5;
            background: radial-gradient(circle, rgba(238, 161, 200, 0.56), rgba(238, 161, 200, 0.12));
            box-shadow: 0 0 42px rgba(238, 161, 200, 0.3), 0 0 20px rgba(214, 164, 88, 0.18);
        }

        .node.is-loading {
            border-color: rgba(139, 233, 253, 0.62);
            box-shadow: 0 0 30px rgba(139, 233, 253, 0.28);
            animation: nodePulse 1.1s ease-in-out infinite;
        }

        .node.is-muted-temporal,
        .link.is-muted-temporal {
            opacity: 0.2;
            filter: saturate(0.75);
        }

        .node.is-temporal-focus {
            box-shadow: 0 0 30px rgba(77, 182, 172, 0.28);
        }

        .node.is-filter-muted,
        .link.is-filter-muted {
            opacity: 0.16;
            filter: saturate(0.7);
        }

        .node.is-filter-focus {
            box-shadow: 0 0 28px rgba(214, 164, 88, 0.18);
        }

        .node--movement {
            width: 72px;
            height: 72px;
            background: radial-gradient(circle, rgba(214, 164, 88, 0.34), rgba(214, 164, 88, 0.06));
        }

        .node--artist {
            width: 42px;
            height: 42px;
            background: radial-gradient(circle, rgba(77, 182, 172, 0.34), rgba(77, 182, 172, 0.06));
        }

        .node--work {
            width: 26px;
            height: 26px;
            background: radial-gradient(circle, rgba(238, 161, 200, 0.34), rgba(238, 161, 200, 0.06));
        }

        .node-label {
            position: absolute;
            top: calc(100% + 10px);
            left: 50%;
            transform: translateX(-50%);
            white-space: nowrap;
            font-family: Arial, Helvetica, sans-serif;
            font-size: 0.77rem;
            letter-spacing: 0.04em;
            color: var(--text-soft);
            pointer-events: none;
        }

        .node.is-selected .node-label {
            color: var(--text-main);
            font-weight: 600;
            font-size: 0.84rem;
            text-shadow: 0 0 14px rgba(255, 255, 255, 0.12);
        }

        @keyframes nodeAppear {
            from {
                opacity: 0;
                transform: translate(-50%, -50%) scale(0.82);
            }

            to {
                opacity: 1;
                transform: translate(-50%, -50%) scale(1);
            }
        }

        @keyframes nodePulse {

            0%,
            100% {
                transform: translate(-50%, -50%) scale(1);
            }

            50% {
                transform: translate(-50%, -50%) scale(1.08);
            }
        }

        .constellation-empty {
            position: absolute;
            inset: 0;
            display: grid;
            place-items: center;
            padding: 24px;
            text-align: center;
            color: var(--text-soft);
            font-family: Arial, Helvetica, sans-serif;
            letter-spacing: 0.03em;
        }

        .stage-overlay {
            z-index: 3;
            display: grid;
            align-items: end;
            padding: 18px;
            pointer-events: none;
        }

        html.theme-light .stage-overlay strong {
            color: #1a1a18;
        }

        .stage-caption {
            width: min(460px, 100%);
            padding: 16px 18px;
            border-radius: var(--radius-md);
            background: rgba(6, 10, 16, 0.72);
            border: 2px solid rgba(255, 255, 255, 0.14);
            box-shadow: 0 10px 40px rgba(0, 0, 0, 0.25);
        }

        html.theme-light .stage-caption {
            background: rgba(255, 255, 255, 0.98) !important;
            border-color: rgba(0, 0, 0, 0.18) !important;
            box-shadow: 0 10px 40px rgba(0, 0, 0, 0.12) !important;
        }

        .stage-caption strong {
            display: block;
            margin-bottom: 6px;
            font-size: 1rem;
            color: var(--text-main);
            font-weight: 700;
        }

        html.theme-light .stage-caption strong {
            color: #1a1a18 !important;
        }

        .stage-caption span {
            color: var(--text-soft);
            line-height: 1.45;
            font-size: 0.94rem;
        }

        html.theme-light .stage-caption span {
            color: #4a4a48 !important;
        }

        .app-root {
            position: relative;
            z-index: 0;
            width: 100%;
            min-height: 110px;
            padding: 16px;
            border-radius: var(--radius-md);
            background: rgba(7, 11, 18, 0.76);
            border: 2px dashed rgba(110, 243, 255, 0.28);
            box-shadow: 0 12px 30px rgba(0, 0, 0, 0.28);
            overflow: auto;
        }

        html.theme-light .app-root {
            background: rgba(255, 255, 255, 0.6) !important;
            border-color: rgba(0, 136, 187, 0.3) !important;
            box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08) !important;
        }

        .app-root-hint {
            margin: 0 0 10px;
            color: var(--text-soft);
            font-family: Arial, Helvetica, sans-serif;
            font-size: 0.9rem;
            line-height: 1.5;
        }

        html.theme-light .app-root-hint {
            color: #4a4a48 !important;
        }

        .app-root-hint strong {
            color: var(--text-main);
        }

        html.theme-light .app-root-hint strong {
            color: #1a1a18 !important;
        }

        .polyglot-studio-panel {
            display: none;
            margin-top: 14px;
            padding-top: 14px;
            border-top: 1px solid rgba(255, 255, 255, 0.08);
            grid-template-columns: repeat(3, minmax(0, 1fr));
            gap: 12px;
        }

        .polyglot-studio-panel.is-visible {
            display: grid;
        }

        .polyglot-card {
            padding: 12px;
            border-radius: var(--radius-sm);
            background: rgba(255, 255, 255, 0.035);
            border: 2px solid rgba(255, 255, 255, 0.1);
        }

        html.theme-light .polyglot-card {
            background: rgba(0, 0, 0, 0.03) !important;
            border-color: rgba(0, 0, 0, 0.12) !important;
        }

        .polyglot-card h4 {
            margin: 0 0 8px;
            font-family: Arial, Helvetica, sans-serif;
            font-size: 0.78rem;
            text-transform: uppercase;
            letter-spacing: 0.12em;
            color: var(--accent-cyan);
        }

        html.theme-light .polyglot-card h4 {
            color: #0088bb !important;
        }

        .polyglot-card p,
        .polyglot-card pre {
            margin: 0;
            color: var(--text-soft);
            line-height: 1.5;
        }

        .polyglot-card pre {
            white-space: pre-wrap;
            font-family: "Courier New", monospace;
            font-size: 0.8rem;
            color: var(--accent-gold);
        }

        .card-stack {
            display: grid;
            gap: 14px;
        }

        .subpanel {
            padding: 16px;
            border-radius: var(--radius-md);
            border: 2px solid var(--line-soft);
            background: rgba(255, 255, 255, 0.03);
        }

        html.theme-light .subpanel {
            border-color: rgba(0, 0, 0, 0.12);
            background: rgba(0, 0, 0, 0.02);
        }

        .subpanel h4 {
            margin: 0 0 8px;
            font-size: 1rem;
        }

        .subpanel p,
        .subpanel li,
        .subpanel dd {
            color: var(--text-soft);
        }

        .subpanel dl {
            margin: 0;
            display: grid;
            gap: 10px;
        }

        .subpanel dt {
            font-family: Arial, Helvetica, sans-serif;
            font-size: 0.78rem;
            text-transform: uppercase;
            letter-spacing: 0.12em;
            color: var(--text-muted);
            margin-bottom: 4px;
        }

        .subpanel dd {
            margin: 0;
        }

        .compass {
            display: grid;
            place-items: center;
            padding: 12px 0 8px;
        }

        .compass-ring {
            position: relative;
            width: 232px;
            aspect-ratio: 1;
            border-radius: 50%;
            border: 1px solid rgba(255, 255, 255, 0.12);
            background:
                radial-gradient(circle at center, rgba(77, 182, 172, 0.14), transparent 34%),
                radial-gradient(circle at center, rgba(255, 255, 255, 0.03), transparent 62%);
            transition: background var(--transition-normal), border-color var(--transition-normal);
        }

        @media (prefers-color-scheme: light) {
            html:not(.theme-dark) .compass-ring {
                border-color: rgba(0, 0, 0, 0.1);
                background:
                    radial-gradient(circle at center, rgba(43, 143, 134, 0.08), transparent 34%),
                    radial-gradient(circle at center, rgba(0, 0, 0, 0.02), transparent 62%);
            }
        }

        html.theme-light .compass-ring {
            border-color: rgba(0, 0, 0, 0.1);
            background:
                radial-gradient(circle at center, rgba(43, 143, 134, 0.08), transparent 34%),
                radial-gradient(circle at center, rgba(0, 0, 0, 0.02), transparent 62%);
        }

        .compass-ring::before,
        .compass-ring::after {
            content: "";
            position: absolute;
            inset: 18px;
            border-radius: 50%;
            border: 1px dashed rgba(255, 255, 255, 0.08);
        }

        .compass-ring::after {
            inset: 42px;
        }

        .compass-axis {
            position: absolute;
            top: 50%;
            left: 50%;
            border-radius: 999px;
            background: linear-gradient(180deg, transparent, rgba(139, 233, 253, 0.12), transparent);
            transform-origin: center;
            pointer-events: none;
        }

        .compass-axis--vertical {
            width: 1px;
            height: 84%;
            transform: translate(-50%, -50%);
        }

        .compass-axis--horizontal {
            width: 84%;
            height: 1px;
            background: linear-gradient(90deg, transparent, rgba(139, 233, 253, 0.1), transparent);
            transform: translate(-50%, -50%);
        }

        .compass-axis--diagonal-left,
        .compass-axis--diagonal-right {
            width: 1px;
            height: 76%;
            transform: translate(-50%, -50%) rotate(45deg);
        }

        .compass-axis--diagonal-right {
            transform: translate(-50%, -50%) rotate(-45deg);
        }

        .compass-core {
            position: absolute;
            top: 50%;
            left: 50%;
            width: 74px;
            height: 74px;
            transform: translate(-50%, -50%);
            border-radius: 50%;
            display: grid;
            place-items: center;
            background:
                radial-gradient(circle, rgba(7, 14, 24, 0.96), rgba(7, 14, 24, 0.72)),
                linear-gradient(135deg, rgba(77, 182, 172, 0.1), rgba(214, 164, 88, 0.08));
            border: 1px solid rgba(255, 255, 255, 0.1);
            box-shadow: inset 0 0 18px rgba(139, 233, 253, 0.08), 0 0 20px rgba(7, 14, 24, 0.3);
            transition: background var(--transition-normal), border-color var(--transition-normal), box-shadow var(--transition-normal);
        }

        @media (prefers-color-scheme: light) {
            html:not(.theme-dark) .compass-core {
                background:
                    radial-gradient(circle, rgba(245, 243, 240, 0.96), rgba(245, 243, 240, 0.88)),
                    linear-gradient(135deg, rgba(43, 143, 134, 0.08), rgba(184, 134, 11, 0.06));
                border-color: rgba(0, 0, 0, 0.12);
                box-shadow: inset 0 0 18px rgba(77, 182, 172, 0.06), 0 0 20px rgba(0, 0, 0, 0.1);
            }
        }

        html.theme-light .compass-core {
            background:
                radial-gradient(circle, rgba(245, 243, 240, 0.96), rgba(245, 243, 240, 0.88)),
                linear-gradient(135deg, rgba(43, 143, 134, 0.08), rgba(184, 134, 11, 0.06));
            border-color: rgba(0, 0, 0, 0.12);
            box-shadow: inset 0 0 18px rgba(77, 182, 172, 0.06), 0 0 20px rgba(0, 0, 0, 0.1);
        }

        .compass-core-label {
            font-family: Arial, Helvetica, sans-serif;
            font-size: 0.72rem;
            letter-spacing: 0.16em;
            text-transform: uppercase;
            color: var(--accent-cyan);
        }

        .compass-pole {
            position: absolute;
            top: 50%;
            left: 50%;
            min-width: 82px;
            padding: 10px 14px;
            border-radius: 999px;
            text-align: center;
            font-family: Arial, Helvetica, sans-serif;
            font-size: 0.8rem;
            font-weight: 500;
            letter-spacing: 0.08em;
            text-transform: uppercase;
            background: rgba(255, 255, 255, 0.08);
            border: 2px solid rgba(255, 255, 255, 0.14);
            color: var(--text-main);
            transform: translate(-50%, -50%);
            cursor: pointer;
            transition: transform var(--transition-normal), border-color var(--transition-normal), box-shadow var(--transition-normal), background var(--transition-normal), color var(--transition-normal), opacity var(--transition-normal);
        }

        .compass-pole.is-primary {
            background: linear-gradient(135deg, rgba(106, 243, 255, 0.16), rgba(106, 243, 255, 0.08));
            border-color: rgba(106, 243, 255, 0.36);
            box-shadow: 0 0 24px rgba(106, 243, 255, 0.16);
        }

        .compass-pole:hover,
        .compass-pole:focus-visible,
        .preset-button:hover,
        .preset-button:focus-visible {
            border-color: rgba(255, 255, 255, 0.36);
            background: rgba(255, 255, 255, 0.12);
            transform: translate(-50%, -50%) scale(1.05);
        }

        .compass-pole[data-position="top"] {
            transform: translate(-50%, -214%);
        }

        .compass-pole[data-position="top-right"] {
            transform: translate(38%, -154%);
        }

        .compass-pole[data-position="bottom-right"] {
            transform: translate(38%, 54%);
        }

        .compass-pole[data-position="bottom"] {
            transform: translate(-50%, 118%);
        }

        .compass-pole[data-position="bottom-left"] {
            transform: translate(-138%, 54%);
        }

        .compass-pole[data-position="top-left"] {
            transform: translate(-138%, -154%);
        }

        .compass-pole.is-active,
        .preset-button.is-active {
            background: linear-gradient(135deg, rgba(77, 182, 172, 0.26), rgba(139, 233, 253, 0.18));
            border-color: rgba(139, 233, 253, 0.28);
            box-shadow: 0 0 22px rgba(139, 233, 253, 0.12);
        }

        .compass-pole.is-muted,
        .preset-button.is-muted {
            opacity: 0.55;
        }

        .preset-list,
        .trail-list {
            display: grid;
            gap: 10px;
        }

        .preset {
            display: flex;
            justify-content: space-between;
            gap: 14px;
            align-items: baseline;
            padding: 11px 12px;
            border-radius: var(--radius-sm);
            background: rgba(255, 255, 255, 0.025);
            border: 1px solid rgba(255, 255, 255, 0.06);
            font-family: Arial, Helvetica, sans-serif;
        }

        .preset-button {
            width: 100%;
            color: inherit;
            text-align: left;
            font: inherit;
            cursor: pointer;
            transition: border-color var(--transition-normal), box-shadow var(--transition-normal), background var(--transition-normal), opacity var(--transition-normal);
            padding: 10px 12px;
            border: 1px solid rgba(255, 255, 255, 0.1);
            border-radius: var(--radius-sm);
            background: rgba(255, 255, 255, 0.04);
        }

        .preset-button:hover,
        .preset-button:focus-visible {
            background: rgba(255, 255, 255, 0.08);
            border-color: rgba(255, 255, 255, 0.2);
        }

        .subpanel-head {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 12px;
            margin-bottom: 10px;
        }

        .subpanel-head .section-title {
            margin: 0;
        }

        .subpanel-action {
            padding: 6px 11px;
            font-size: 0.76rem;
            letter-spacing: 0.06em;
            text-transform: uppercase;
        }

        .preset small {
            color: var(--text-muted);
            font-size: 0.78rem;
        }

        .query-list {
            display: flex;
            flex-wrap: wrap;
            gap: 8px;
        }

        .code-box,
        .response-box {
            margin: 0;
            padding: 14px;
            border-radius: var(--radius-sm);
            background: rgba(0, 0, 0, 0.28);
            border: 1px solid rgba(139, 233, 253, 0.12);
            font-family: "Courier New", monospace;
            font-size: 0.82rem;
            line-height: 1.6;
            overflow: auto;
            white-space: pre-wrap;
            color: var(--accent-cyan);
            min-height: 138px;
            transition: background var(--transition-normal), border-color var(--transition-normal), color var(--transition-normal);
        }

        .response-box {
            color: var(--text-soft);
        }

        @media (prefers-color-scheme: light) {
            html:not(.theme-dark) .code-box,
            html:not(.theme-dark) .response-box {
                background: rgba(0, 0, 0, 0.04);
                border-color: rgba(0, 0, 0, 0.12);
            }

            html:not(.theme-dark) .code-box {
                color: #0088bb;
            }
        }

        html.theme-light .code-box,
        html.theme-light .response-box {
            background: rgba(0, 0, 0, 0.04);
            border-color: rgba(0, 0, 0, 0.12);
        }

        html.theme-light .code-box {
            color: #0088bb;
        }

        .footer-rail {
            display: grid;
            grid-template-columns: 1.25fr 1.15fr 1.1fr 1.25fr auto;
            gap: 18px;
            padding: 18px 20px;
            align-items: start;
        }

        .footer-rail section {
            min-width: 0;
        }

        .footer-rail section:last-child {
            grid-column: 1 / -1;
        }

        .footer-preview {
            max-height: none;
            overflow: visible;
            white-space: pre-wrap;
        }

        .timeline {
            display: grid;
            gap: 10px;
        }

        .timeline-insights {
            display: grid;
            gap: 8px;
        }

        .timeline-insights .preset {
            margin: 0;
        }

        .timeline-caption {
            font-family: Arial, Helvetica, sans-serif;
            font-size: 0.8rem;
            color: var(--text-soft);
        }

        .timeline-track {
            position: relative;
            height: 8px;
            border-radius: 999px;
            background: rgba(255, 255, 255, 0.08);
            overflow: hidden;
        }

        .timeline-window {
            position: absolute;
            left: 22%;
            width: 36%;
            top: 0;
            bottom: 0;
            border-radius: 999px;
            background: linear-gradient(90deg, rgba(214, 164, 88, 0.85), rgba(77, 182, 172, 0.85));
            box-shadow: 0 0 18px rgba(77, 182, 172, 0.18);
            transition: background var(--transition-normal), box-shadow var(--transition-normal);
        }

        @media (prefers-color-scheme: light) {
            html:not(.theme-dark) .timeline-window {
                background: linear-gradient(90deg, rgba(184, 134, 11, 0.75), rgba(43, 143, 134, 0.75));
                box-shadow: 0 0 18px rgba(43, 143, 134, 0.24);
            }
        }

        html.theme-light .timeline-window {
            background: linear-gradient(90deg, rgba(184, 134, 11, 0.75), rgba(43, 143, 134, 0.75));
            box-shadow: 0 0 18px rgba(43, 143, 134, 0.24);
        }

        .timeline-labels,
        .entity-pill {
            display: flex;
            justify-content: space-between;
            gap: 12px;
            align-items: center;
            font-family: Arial, Helvetica, sans-serif;
            font-size: 0.84rem;
            color: var(--text-soft);
        }

        .entity-pill {
            justify-content: flex-start;
            flex-wrap: wrap;
        }

        .entity-pill strong {
            color: var(--text-main);
        }

        .entity-pill .chip {
            padding-block: 6px;
        }

        body[data-mode="query-theater"] .mirror {
            border-color: rgba(139, 233, 253, 0.18);
            box-shadow: var(--shadow-panel), 0 0 32px rgba(139, 233, 253, 0.08);
        }

        body[data-mode="query-theater"] .stage {
            box-shadow: var(--shadow-panel);
        }

        body[data-mode="temporal-river"] .timeline-window {
            background: linear-gradient(90deg, rgba(77, 182, 172, 0.9), rgba(214, 164, 88, 0.86), rgba(238, 161, 200, 0.82));
            box-shadow: 0 0 22px rgba(77, 182, 172, 0.24);
        }

        body[data-mode="temporal-river"] .timeline {
            border-left: 2px solid rgba(77, 182, 172, 0.22);
            padding-left: 10px;
        }

        .mobile-only {
            display: none;
        }

        /* Search bar moved to topbar inline - see .search-bar-inline styles above */

        .detail-panel-overlay {
            position: relative;
            width: 100%;
            max-height: 420px;
            z-index: 10;
            display: none;
            overflow: hidden;
            margin-top: 20px;
            border: 2px solid var(--line-soft);
            border-radius: var(--radius-xl);
            background:
                linear-gradient(180deg, rgba(7, 14, 24, 0.96), rgba(10, 18, 30, 0.94)),
                radial-gradient(circle at top right, rgba(214, 164, 88, 0.08), transparent 35%);
            box-shadow: var(--shadow-panel), 0 0 36px rgba(139, 233, 253, 0.12);
            -webkit-backdrop-filter: blur(22px);
            backdrop-filter: blur(22px);
        }

        html.theme-light .detail-panel-overlay {
            background:
                linear-gradient(180deg, rgba(248, 246, 242, 0.98), rgba(245, 243, 240, 0.96)),
                radial-gradient(circle at top right, rgba(43, 143, 134, 0.06), transparent 35%) !important;
            border-color: rgba(0, 0, 0, 0.15) !important;
            box-shadow: var(--shadow-panel), 0 0 36px rgba(77, 182, 172, 0.08) !important;
        }

        .detail-panel-overlay.is-active {
            display: block;
        }

        #__ml_detail_root {
            max-height: 420px;
            overflow-y: auto;
            padding: 18px;
            color: var(--text-main);
        }

        html.theme-light #__ml_detail_root {
            color: #1a1a18 !important;
        }

        #__ml_detail_root h3,
        #__ml_detail_root h4,
        #__ml_detail_root strong {
            color: var(--text-main);
        }

        html.theme-light #__ml_detail_root h3,
        html.theme-light #__ml_detail_root h4,
        html.theme-light #__ml_detail_root strong {
            color: #1a1a18 !important;
        }

        #__ml_detail_root p,
        #__ml_detail_root span,
        #__ml_detail_root small {
            color: var(--text-soft);
        }

        html.theme-light #__ml_detail_root p,
        html.theme-light #__ml_detail_root span,
        html.theme-light #__ml_detail_root small {
            color: #4a4a48 !important;
        }

        #__ml_detail_root .detail-section {
            background: rgba(255, 255, 255, 0.03);
        }

        html.theme-light #__ml_detail_root .detail-section {
            background: rgba(0, 0, 0, 0.03) !important;
        }

        #__ml_detail_root button,
        #__ml_detail_root a {
            color: var(--text-main);
        }

        html.theme-light #__ml_detail_root button,
        html.theme-light #__ml_detail_root a {
            color: #0088bb !important;
        }

        @media (max-width: 1200px) {

            .top-dashboard,
            .hero,
            .workspace,
            .footer-rail,
            .topbar {
                grid-template-columns: 1fr;
            }

            .rail,
            .stage {
                grid-column: auto;
                grid-row: auto;
            }

            .mode-switcher,
            .lang-status {
                justify-content: flex-start;
            }

            .hero-actions {
                grid-template-columns: 1fr;
            }

            .constellation {
                min-height: 460px;
            }

            .mirror {
                grid-template-columns: 1fr;
            }

            .mirror .subpanel:last-child {
                grid-column: auto;
            }
        }

        @media (min-width: 1201px) and (max-width: 1480px) {
            .footer-rail {
                grid-template-columns: repeat(3, minmax(0, 1fr));
            }
        }

        @media (max-width: 760px) {
            .shell {
                padding: 12px;
                gap: 16px;
            }

            .topbar,
            .hero,
            .rail,
            .mirror,
            .stage,
            .footer-rail {
                padding: 18px;
            }

            .polyglot-studio-panel.is-visible {
                grid-template-columns: 1fr;
            }

            .brand h1 {
                font-size: 2.25rem;
            }

            .hero-copy h2 {
                max-width: none;
            }

            .compass-ring {
                width: min(88vw, 210px);
            }

            .constellation {
                min-height: 380px;
            }

            .mobile-only {
                display: inline-flex;
            }

            /* Improve touch targets on mobile */
            button,
            input,
            select,
            textarea {
                min-height: 44px;
                min-width: 44px;
            }

            .mode-button,
            .lang-button,
            .compass-pole,
            .preset-button {
                padding: 12px 16px;
                font-size: 0.9rem;
            }
        }

        /* Enhance touch and keyboard navigation */
        @media (hover: none) and (pointer: coarse) {
            button,
            a,
            input,
            select,
            textarea {
                min-height: 48px;
            }
        }

        /* Polyglot Studio Visualization Styles */
        .polyglot-studio-visualization {
            display: none;
            height: 100%;
        }

        .polyglot-studio-visualization.is-active {
            display: flex;
        }

        .polyglot-studio-container {
            width: 100%;
            height: 100%;
            display: flex;
            flex-direction: column;
            background: rgba(20, 28, 32, 0.5);
            border-radius: var(--radius-md);
            overflow: hidden;
        }

        .polyglot-header {
            padding: 16px 20px;
            border-bottom: 1px solid rgba(255, 255, 255, 0.08);
            background: rgba(0, 0, 0, 0.2);
        }

        .polyglot-title-section {
            display: flex;
            flex-direction: column;
            gap: 4px;
            margin-bottom: 12px;
        }

        .polyglot-header h2 {
            margin: 0;
            font-size: 1.1rem;
            color: var(--text-main);
            font-weight: 600;
        }

        .polyglot-hint {
            font-size: 0.75rem;
            color: var(--text-soft);
            font-style: italic;
            letter-spacing: 0.02em;
        }

        .polyglot-controls {
            display: flex;
            gap: 8px;
            flex-wrap: wrap;
        }

        .language-toggle {
            padding: 6px 12px;
            border: 1px solid rgba(255, 255, 255, 0.15);
            border-radius: var(--radius-sm);
            background: rgba(255, 255, 255, 0.04);
            color: var(--text-soft);
            font-size: 0.85rem;
            cursor: pointer;
            transition: all 200ms cubic-bezier(0.4, 0, 0.2, 1);
        }

        .language-toggle:hover {
            background: rgba(255, 255, 255, 0.08);
            border-color: rgba(255, 255, 255, 0.25);
            transform: translateY(-2px);
        }

        .language-toggle.is-active {
            background: var(--accent-cyan);
            border-color: var(--accent-cyan);
            color: #000;
            box-shadow: 0 4px 12px rgba(0, 188, 212, 0.3);
        }

        .view-toggle {
            padding: 6px 12px;
            border: 1px solid rgba(255, 255, 255, 0.15);
            border-radius: var(--radius-sm);
            background: rgba(255, 255, 255, 0.04);
            color: var(--text-soft);
            font-size: 0.85rem;
            cursor: pointer;
            transition: all 200ms ease;
            margin-left: auto;
        }

        .view-toggle:hover {
            background: rgba(255, 255, 255, 0.08);
            border-color: rgba(255, 255, 255, 0.25);
        }

        .polyglot-surfaces {
            display: grid;
            grid-template-columns: 1fr 1fr;
            flex: 1;
            gap: 0;
            overflow: hidden;
        }

        .polyglot-surface {
            padding: 20px;
            overflow-y: auto;
            border-right: 1px solid rgba(255, 255, 255, 0.08);
            animation: slideInSurface 400ms cubic-bezier(0.4, 0, 0.2, 1);
        }

        .polyglot-surface:last-child {
            border-right: none;
        }

        .polyglot-surface.surface-fr {
            background: rgba(100, 150, 255, 0.03);
        }

        .polyglot-surface.surface-en {
            background: rgba(255, 150, 100, 0.03);
        }

        .polyglot-surface-active {
            flex: 1;
            overflow-y: auto;
            padding: 20px;
            animation: fadeInUp 400ms cubic-bezier(0.4, 0, 0.2, 1);
        }

        @keyframes slideInSurface {
            from {
                opacity: 0;
                transform: translateX(20px);
            }

            to {
                opacity: 1;
                transform: translateX(0);
            }
        }

        @keyframes fadeInUp {
            from {
                opacity: 0;
                transform: translateY(10px);
            }

            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

        .entity-id {
            display: inline-block;
            padding: 4px 8px;
            background: rgba(255, 255, 255, 0.08);
            border-radius: var(--radius-sm);
            font-size: 0.75rem;
            color: var(--text-soft);
            font-family: monospace;
        }

        .entity-properties {
            display: flex;
            flex-direction: column;
            gap: 16px;
        }

        .property-group {
            display: flex;
            flex-direction: column;
            gap: 6px;
        }

        .property-label {
            font-size: 0.85rem;
            font-weight: 600;
            color: var(--accent-cyan);
            text-transform: uppercase;
            letter-spacing: 0.05em;
        }

        .property-value {
            margin: 0;
            font-size: 0.95rem;
            color: var(--text-soft);
            line-height: 1.5;
        }

        .property-section {
            display: flex;
            flex-direction: column;
            gap: 12px;
            padding-bottom: 16px;
            border-bottom: 1px solid rgba(255, 255, 255, 0.06);
        }

        .property-section:last-child {
            border-bottom: none;
        }

        .section-title {
            font-size: 0.9rem;
            font-weight: 700;
            color: var(--accent-gold);
            text-transform: uppercase;
            letter-spacing: 0.08em;
            margin: 8px 0 4px;
            opacity: 0.9;
        }

        .entity-type-badge {
            display: inline-block;
            padding: 4px 10px;
            background: var(--accent-teal);
            color: var(--bg-deep);
            border-radius: var(--radius-sm);
            font-size: 0.75rem;
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: 0.05em;
            margin-left: 8px;
        }

        .entity-header {
            display: flex;
            align-items: center;
            flex-wrap: wrap;
            gap: 8px;
            margin-bottom: 20px;
            padding-bottom: 16px;
            border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        }

        .entity-label {
            margin: 0;
            font-size: 1.3rem;
            color: var(--text-main);
            font-weight: 600;
            flex: 1;
            min-width: 200px;
        }

        .property-group.clickable .entity-link {
            cursor: pointer;
            color: var(--accent-cyan);
            text-decoration: underline;
            text-decoration-style: dotted;
            text-underline-offset: 3px;
            transition: all 180ms ease;
        }

        .property-group.clickable .entity-link:hover {
            color: var(--accent-gold);
            text-decoration-style: solid;
            transform: translateX(2px);
        }

        @media (max-width: 768px) {
            .polyglot-surfaces {
                grid-template-columns: 1fr;
            }

            .polyglot-surface {
                border-right: none;
                border-bottom: 1px solid rgba(255, 255, 255, 0.08);
            }

            .polyglot-surface:last-child {
                border-bottom: none;
            }

            .polyglot-controls {
                flex-direction: column;
            }

            .view-toggle {
                margin-left: 0;
            }
        }
