html {
            scroll-behavior: smooth;
        }
        .theory-content {
            max-width: 1000px;
            margin: 2rem auto;
            padding: 2rem;
            background: white;
            border-radius: 10px;
            box-shadow: 0 2px 10px rgba(0,0,0,0.1);
        }
        .od-section {
            margin-bottom: 3rem;
            padding-bottom: 2rem;
            border-bottom: 1px solid var(--border);
            display: block !important;
        }
        .od-section:last-child {
            border-bottom: none;
        }
        h2 {
            color: var(--primary);
            margin-bottom: 1rem;
        }
        h3 {
            color: var(--secondary);
            margin-top: 1.5rem;
            margin-bottom: 0.75rem;
        }
        .axiom-box {
            background: #1a1a2e;
            color: #eee;
            padding: 1.5rem;
            border-radius: 8px;
            margin: 1rem 0;
            font-family: 'IBM Plex Mono', monospace;
        }
        .axiom-box .label {
            color: #4ecdc4;
            font-weight: bold;
            margin-bottom: 0.5rem;
        }
        .definition-box {
            background: #f8f9fa;
            padding: 1.25rem;
            border-left: 4px solid var(--secondary);
            margin: 1rem 0;
        }
        .prediction-box {
            background: #fff8e6;
            padding: 1.25rem;
            border-left: 4px solid #f39c12;
            margin: 1rem 0;
        }
        .example-box {
            background: #f0f8f0;
            padding: 1.25rem;
            border-left: 4px solid var(--success);
            margin: 1rem 0;
        }
        .quote-box {
            background: #f5f5f5;
            padding: 1.25rem;
            border-left: 4px solid #666;
            margin: 1rem 0;
            font-style: italic;
        }
        .quote-box .attribution {
            font-style: normal;
            color: #666;
            margin-top: 0.5rem;
            font-size: 0.9rem;
        }
        .table-scroll {
            overflow-x: auto;
            margin: 1rem 0;
            -webkit-overflow-scrolling: touch;
        }
        table {
            width: 100%;
            border-collapse: collapse;
            margin: 1rem 0;
            font-size: 0.95rem;
        }
        .table-scroll table {
            margin: 0;
            min-width: 500px;
        }
        th, td {
            border: 1px solid var(--border);
            padding: 0.6rem;
            text-align: left;
        }
        th {
            background: var(--primary);
            color: white;
        }
        .state-display {
            font-family: 'IBM Plex Mono', monospace;
            background: #f5f5f5;
            padding: 0.2rem 0.4rem;
            border-radius: 3px;
            font-size: 0.85rem;
            display: inline-block;
            white-space: nowrap;
        }
        @media (max-width: 480px) {
            .state-display {
                font-size: 0.7rem;
                white-space: normal;
            }
        }
        .T { color: #27ae60; font-weight: bold; }
        .O { color: #e67e22; font-weight: bold; }
        .B { color: #95a5a6; font-weight: bold; }
        .toc {
            background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
            padding: 1.5rem 2rem;
            border-radius: 12px;
            margin-bottom: 2rem;
            border: 1px solid #dee2e6;
        }
        .toc h3 {
            margin-top: 0;
            margin-bottom: 1rem;
            color: var(--primary);
            font-size: 1rem;
            text-transform: uppercase;
            letter-spacing: 0.05em;
        }
        .toc ul {
            margin: 0;
            padding: 0;
            list-style: none;
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
            gap: 0.5rem 1.5rem;
        }
        .toc li {
            margin: 0;
        }
        .toc a {
            color: #495057;
            text-decoration: none;
            font-size: 0.9rem;
            display: block;
            padding: 0.3rem 0;
            border-bottom: 1px solid transparent;
            transition: all 0.2s;
        }
        .toc a:hover {
            color: var(--primary);
            border-bottom-color: var(--primary);
        }
        /* Floating TOC button for mobile */
        .toc-fab {
            display: none;
            position: fixed;
            bottom: 20px;
            right: 20px;
            width: 50px;
            height: 50px;
            border-radius: 50%;
            background: var(--primary);
            color: white;
            border: none;
            font-size: 1.2rem;
            cursor: pointer;
            box-shadow: 0 2px 10px rgba(0,0,0,0.3);
            z-index: 1000;
            transition: transform 0.2s;
        }
        .toc-fab:hover {
            transform: scale(1.1);
        }
        .toc-fab.open {
            background: var(--secondary);
        }
        .toc-mobile {
            display: none;
            position: fixed;
            bottom: 80px;
            right: 20px;
            background: white;
            border-radius: 8px;
            box-shadow: 0 2px 20px rgba(0,0,0,0.2);
            z-index: 999;
            max-height: 60vh;
            overflow-y: auto;
            padding: 1rem;
            width: 250px;
        }
        .toc-mobile.show {
            display: block;
        }
        .toc-mobile ul {
            list-style: none;
            margin: 0;
            padding: 0;
        }
        .toc-mobile li {
            margin: 0.5rem 0;
        }
        .toc-mobile a {
            color: var(--text);
            text-decoration: none;
            font-size: 0.9rem;
        }
        .toc-mobile a:hover {
            color: var(--primary);
        }
        @media (max-width: 768px) {
            .toc-fab {
                display: flex;
                align-items: center;
                justify-content: center;
            }
            .toc {
                display: none;
            }
        }
        .back-link {
            display: inline-block;
            margin-bottom: 1.5rem;
            color: var(--secondary);
            text-decoration: none;
        }
        .back-link:hover {
            text-decoration: underline;
        }
        #landscape-container {
            width: 100%;
            height: 500px;
            border: 1px solid var(--border);
            border-radius: 8px;
            background: #fafafa;
            margin: 1rem 0;
        }
        #practice-table-container {
            overflow: auto;
            max-height: 500px;
            border: 1px solid var(--border);
            border-radius: 8px;
        }
        #practice-table {
            border-collapse: separate;
            border-spacing: 0;
        }
        #practice-table thead th {
            position: sticky;
            top: 0;
            z-index: 2;
            background: var(--primary);
            box-shadow: 0 1px 0 var(--border);
        }
        #practice-table thead th:first-child {
            position: sticky;
            left: 0;
            z-index: 3;
        }
        #practice-table tbody td:first-child {
            position: sticky;
            left: 0;
            z-index: 1;
            background: white;
            box-shadow: 1px 0 0 var(--border);
        }
        #practice-table tbody tr:hover td:first-child {
            background: #f5f5f5;
        }
        .practice-row:hover {
            background: #f5f5f5;
        }
        .region-header {
            writing-mode: vertical-rl;
            text-orientation: mixed;
            font-size: 0.75rem;
        }
        .formula {
            font-family: 'IBM Plex Mono', monospace;
            background: #f5f5f5;
            padding: 0.75rem 1rem;
            border-radius: 4px;
            display: block;
            margin: 0.5rem 0;
            overflow-x: auto;
        }
        .inline-formula {
            font-family: 'IBM Plex Mono', monospace;
            background: #f5f5f5;
            padding: 0.1rem 0.3rem;
            border-radius: 2px;
        }
        /* List styling */
        .od-section ul, .od-section ol {
            padding-left: 1.5rem;
            margin: 0.75rem 0;
        }
        .od-section li {
            margin: 0.4rem 0;
        }
        .example-box ol {
            padding-left: 1.25rem;
            margin: 0.5rem 0;
        }
        .example-box li {
            margin: 0.3rem 0;
        }
        /* Sortable headers */
        th.sortable {
            cursor: pointer;
            user-select: none;
            position: relative;
            padding-right: 1.2rem;
        }
        th.sortable:hover {
            background: var(--secondary);
        }
        th.sortable::after {
            content: '⇅';
            position: absolute;
            right: 0.3rem;
            opacity: 0.5;
            font-size: 0.8rem;
        }
        th.sortable.asc::after {
            content: '↑';
            opacity: 1;
        }
        th.sortable.desc::after {
            content: '↓';
            opacity: 1;
        }
        /* Lens Stack Visualization */
        #lens-visualization {
            background: linear-gradient(180deg, #0a0a1a 0%, #1a1a3a 100%);
            border-radius: 12px;
            padding: 2rem;
            margin: 2rem 0;
            position: relative;
            overflow: hidden;
        }
        #lens-container {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 0;
            height: 320px;
            position: relative;
        }
        .light-source {
            width: 60px;
            height: 60px;
            background: radial-gradient(circle, #fff 0%, #ffd700 50%, transparent 70%);
            border-radius: 50%;
            box-shadow: 0 0 40px #ffd700, 0 0 80px #ffa500;
            animation: pulse-light 2s ease-in-out infinite;
            flex-shrink: 0;
        }
        @keyframes pulse-light {
            0%, 100% { transform: scale(1); opacity: 1; }
            50% { transform: scale(1.1); opacity: 0.9; }
        }
        .light-beam {
            position: absolute;
            left: 80px;
            top: 50%;
            height: 4px;
            background: linear-gradient(90deg, rgba(255,215,0,0.8), rgba(255,215,0,0.1));
            transform: translateY(-50%);
            transition: width 0.5s ease;
            pointer-events: none;
            z-index: 1;
        }
        .lens-stack {
            display: flex;
            align-items: center;
            gap: 8px;
            margin: 0 20px;
            position: relative;
            z-index: 2;
        }
        .lens {
            width: 50px;
            height: 140px;
            border-radius: 8px;
            cursor: pointer;
            transition: all 0.3s ease;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            position: relative;
            border: 2px solid transparent;
        }
        .lens:hover {
            transform: scale(1.05);
        }
        .lens.T {
            background: linear-gradient(180deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0.05) 100%);
            border-color: rgba(39, 174, 96, 0.5);
            box-shadow: 0 0 20px rgba(39, 174, 96, 0.2);
        }
        .lens.O {
            background: linear-gradient(180deg, rgba(230, 126, 34, 0.4) 0%, rgba(230, 126, 34, 0.2) 100%);
            border-color: rgba(230, 126, 34, 0.8);
            box-shadow: 0 0 20px rgba(230, 126, 34, 0.4), inset 0 0 30px rgba(255,255,255,0.1);
        }
        .lens.B {
            background: linear-gradient(180deg, #2c2c2c 0%, #1a1a1a 100%);
            border-color: rgba(149, 165, 166, 0.5);
            box-shadow: inset 0 0 20px rgba(0,0,0,0.5);
        }
        .lens-label {
            font-size: 0.65rem;
            color: #999;
            text-transform: uppercase;
            letter-spacing: 0.5px;
            writing-mode: vertical-rl;
            text-orientation: mixed;
            position: absolute;
            bottom: -25px;
            left: 50%;
            transform: translateX(-50%) rotate(180deg);
        }
        .lens-state {
            font-size: 1.2rem;
            font-weight: bold;
            color: white;
            text-shadow: 0 0 10px currentColor;
        }
        .lens.T .lens-state { color: #27ae60; }
        .lens.O .lens-state { color: #e67e22; }
        .lens.B .lens-state { color: #7f8c8d; }
        .eye-icon {
            width: 80px;
            height: 80px;
            flex-shrink: 0;
            position: relative;
        }
        .eye-icon svg {
            width: 100%;
            height: 100%;
        }
        #lens-controls {
            display: flex;
            flex-wrap: wrap;
            gap: 0.5rem;
            margin-top: 1.5rem;
            justify-content: center;
        }
        .preset-btn {
            padding: 0.5rem 1rem;
            background: rgba(255,255,255,0.1);
            border: 1px solid rgba(255,255,255,0.2);
            border-radius: 20px;
            color: white;
            cursor: pointer;
            font-size: 0.85rem;
            transition: all 0.2s ease;
        }
        .preset-btn:hover {
            background: rgba(255,255,255,0.2);
            border-color: rgba(255,255,255,0.4);
        }
        .preset-btn.active {
            background: var(--primary);
            border-color: var(--primary);
        }
        #lens-info {
            text-align: center;
            margin-top: 1rem;
            color: #ccc;
            font-size: 0.9rem;
        }
        #lens-info .state-notation {
            font-family: 'IBM Plex Mono', monospace;
            font-size: 1.1rem;
            margin: 0.5rem 0;
            letter-spacing: 2px;
        }
        #energy-meter {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 1rem;
            margin-top: 1rem;
            color: #999;
            font-size: 0.85rem;
        }
        #energy-bar {
            width: 150px;
            height: 8px;
            background: rgba(255,255,255,0.1);
            border-radius: 4px;
            overflow: hidden;
        }
        #energy-fill {
            height: 100%;
            background: linear-gradient(90deg, #27ae60, #f39c12, #e74c3c);
            transition: width 0.3s ease;
        }
        /* Guided meditation styles */
        .guided-btn {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
            border-color: #667eea !important;
        }
        .guided-btn:hover {
            background: linear-gradient(135deg, #764ba2 0%, #667eea 100%) !important;
        }
        #guided-meditation {
            background: rgba(102, 126, 234, 0.1);
            border: 1px solid rgba(102, 126, 234, 0.3);
            border-radius: 12px;
            padding: 1.5rem;
            margin-top: 1.5rem;
            text-align: center;
        }
        #guided-instruction {
            font-size: 1.1rem;
            line-height: 1.7;
            color: #eee;
            margin-bottom: 1rem;
            min-height: 80px;
        }
        #guided-instruction .prompt {
            font-size: 1.2rem;
            color: #a8b2ff;
            font-style: italic;
            margin-top: 0.75rem;
            display: block;
        }
        #guided-progress {
            display: flex;
            justify-content: center;
            gap: 8px;
            margin: 1rem 0;
        }
        .progress-dot {
            width: 10px;
            height: 10px;
            border-radius: 50%;
            background: rgba(255,255,255,0.2);
            transition: all 0.3s ease;
        }
        .progress-dot.active {
            background: #667eea;
            transform: scale(1.3);
        }
        .progress-dot.complete {
            background: #27ae60;
        }
        #guided-controls {
            display: flex;
            justify-content: center;
            gap: 0.75rem;
            margin-top: 1rem;
        }
        #guided-controls button {
            padding: 0.5rem 1.25rem;
            background: rgba(255,255,255,0.1);
            border: 1px solid rgba(255,255,255,0.2);
            border-radius: 6px;
            color: white;
            cursor: pointer;
            font-size: 0.9rem;
            transition: all 0.2s ease;
        }
        #guided-controls button:hover {
            background: rgba(255,255,255,0.2);
        }
        #guided-controls button:disabled {
            opacity: 0.4;
            cursor: not-allowed;
        }
        #guided-exit {
            background: rgba(231, 76, 60, 0.2) !important;
            border-color: rgba(231, 76, 60, 0.4) !important;
        }
        .lens.highlighted {
            animation: pulse-lens 1.5s ease-in-out infinite;
            z-index: 10;
        }
        @keyframes pulse-lens {
            0%, 100% { transform: scale(1); box-shadow: 0 0 20px rgba(102, 126, 234, 0.5); }
            50% { transform: scale(1.08); box-shadow: 0 0 30px rgba(102, 126, 234, 0.8); }
        }
        /* Mobile responsiveness */
        @media (max-width: 768px) {
            .theory-content {
                padding: 1rem;
                margin: 1rem;
            }
            #lens-visualization {
                padding: 1rem;
            }
            #lens-container {
                flex-direction: column;
                height: auto;
                gap: 1rem;
            }
            .light-source {
                width: 40px;
                height: 40px;
            }
            .light-beam {
                display: none;
            }
            .lens-stack {
                flex-wrap: nowrap;
                justify-content: center;
                margin: 0;
                gap: 4px;
            }
            .lens {
                width: calc((100vw - 80px) / 8);
                max-width: 38px;
                min-width: 28px;
                height: 70px;
            }
            .lens-state {
                font-size: 1rem;
            }
            .lens-label {
                font-size: 0.5rem;
                bottom: -20px;
            }
            .eye-icon {
                width: 50px;
                height: 50px;
            }
            #lens-controls {
                gap: 0.4rem;
            }
            .preset-btn {
                padding: 0.4rem 0.7rem;
                font-size: 0.75rem;
            }
            #guided-instruction {
                font-size: 0.95rem;
                min-height: 100px;
            }
            #guided-controls {
                flex-wrap: wrap;
            }
            #guided-controls button {
                padding: 0.4rem 0.8rem;
                font-size: 0.8rem;
            }
            table {
                font-size: 0.8rem;
            }
            th, td {
                padding: 0.4rem;
            }
            .region-header {
                font-size: 0.6rem;
            }
            #practice-table-container {
                margin: 0 -1rem;
            }
        }
        @media (max-width: 480px) {
            .lens-stack {
                gap: 2px;
            }
            .lens {
                width: calc((100vw - 60px) / 8);
                min-width: 24px;
                height: 55px;
            }
            .lens-state {
                font-size: 0.75rem;
            }
            .lens-label {
                display: none;
            }
            #lens-controls {
                display: grid;
                grid-template-columns: repeat(3, 1fr);
                gap: 0.3rem;
            }
            .preset-btn {
                padding: 0.35rem 0.3rem;
                font-size: 0.65rem;
                white-space: nowrap;
            }
            .preset-btn.guided-btn {
                grid-column: span 3;
            }
        }
        /* Contact Form */
        .contact-form {
            max-width: 500px;
        }
        .form-group {
            margin-bottom: 1rem;
        }
        .form-group label {
            display: block;
            margin-bottom: 0.4rem;
            font-weight: 500;
            color: #333;
        }
        .form-group input[type="email"],
        .form-group input[type="text"],
        .form-group textarea {
            width: 100%;
            padding: 0.75rem;
            border: 1px solid var(--border);
            border-radius: 6px;
            font-size: 1rem;
            font-family: inherit;
            box-sizing: border-box;
        }
        .form-group input:focus,
        .form-group textarea:focus {
            outline: none;
            border-color: var(--primary);
            box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
        }
        .checkbox-group label {
            display: flex;
            align-items: center;
            gap: 0.5rem;
            cursor: pointer;
        }
        .checkbox-group input[type="checkbox"] {
            width: 18px;
            height: 18px;
            cursor: pointer;
        }
        .contact-form button[type="submit"] {
            background: var(--primary);
            color: white;
            border: none;
            padding: 0.75rem 1.5rem;
            border-radius: 6px;
            font-size: 1rem;
            cursor: pointer;
            transition: background 0.2s;
        }
        .contact-form button[type="submit"]:hover {
            background: #2980b9;
        }
        .contact-form button[type="submit"]:disabled {
            background: #95a5a6;
            cursor: not-allowed;
        }
        .form-status {
            margin-top: 1rem;
            padding: 0.75rem;
            border-radius: 6px;
            display: none;
        }
        .form-status.success {
            display: block;
            background: #d4edda;
            color: #155724;
            border: 1px solid #c3e6cb;
        }
        .form-status.error {
            display: block;
            background: #f8d7da;
            color: #721c24;
            border: 1px solid #f5c6cb;
        }

        /* Additional Visualizations */
        .viz-container {
            background: #fafafa;
            border: 1px solid var(--border);
            border-radius: 8px;
            padding: 1rem;
            margin: 1.5rem 0;
        }
        .viz-container h4 {
            margin-top: 0;
            color: var(--primary);
        }
        .viz-svg {
            width: 100%;
            height: 400px;
        }
        .viz-controls {
            display: flex;
            gap: 1rem;
            flex-wrap: wrap;
            margin-bottom: 1rem;
        }
        .viz-controls label {
            font-size: 0.9rem;
        }
        .viz-controls select, .viz-controls input {
            padding: 0.3rem 0.5rem;
            border-radius: 4px;
            border: 1px solid var(--border);
        }
        /* Similarity Network */
        .network-node {
            cursor: pointer;
            transition: all 0.2s ease;
        }
        .network-node:hover {
            filter: brightness(1.2);
        }
        .network-link {
            stroke: #ccc;
            stroke-opacity: 0.6;
        }
        /* Correlation Matrix */
        .matrix-cell {
            stroke: white;
            stroke-width: 1;
        }
        .matrix-label {
            font-size: 11px;
            fill: #333;
        }
        /* Timeline */
        .timeline-stage {
            cursor: pointer;
            transition: all 0.2s ease;
        }
        .timeline-stage:hover {
            filter: brightness(1.1);
        }
        .timeline-connector {
            stroke: var(--primary);
            stroke-width: 2;
            fill: none;
        }
/* Mobile header centering fix for theory pages (no hamburger) */
@media (max-width: 768px) {
    header h1,
    header p {
        padding-right: 0;
        text-align: center;
    }
}
