
        /* [STYLES FROM SAMPLE - keeping CSS identical for consistency] */
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }
        
        body {
            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
            background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
            color: #e0e0e0;
            line-height: 1.6;
        }
        
        .container {
            display: flex;
            min-height: 100vh;
        }
        
        .sidebar {
            width: 280px;
            background: rgba(15, 15, 25, 0.95);
            border-right: 2px solid #00d9ff;
            position: fixed;
            height: 100vh;
            overflow-y: auto;
            padding: 20px;
            box-shadow: 4px 0 10px rgba(0, 0, 0, 0.5);
        }
        
        .sidebar h1 {
            color: #00d9ff;
            font-size: 1.5em;
            margin-bottom: 10px;
            text-shadow: 0 0 10px rgba(0, 217, 255, 0.5);
        }
        
        .sidebar h2 {
            color: #00d9ff;
            font-size: 0.9em;
            margin-bottom: 20px;
            opacity: 0.8;
        }
        
        .nav-section {
            margin-bottom: 15px;
        }
        
        .nav-section h3 {
            color: #00ffc8;
            font-size: 0.85em;
            text-transform: uppercase;
            letter-spacing: 1px;
            margin-bottom: 8px;
            padding: 5px;
            background: rgba(0, 255, 200, 0.1);
            border-left: 3px solid #00ffc8;
        }
        
        .nav-section ul {
            list-style: none;
            margin-left: 10px;
        }
        
        .nav-section li {
            margin: 5px 0;
        }
        
        .nav-section a {
            color: #b0b0b0;
            text-decoration: none;
            display: block;
            padding: 5px 10px;
            border-radius: 4px;
            transition: all 0.3s;
            font-size: 0.9em;
        }
        
        .nav-section a:hover {
            background: rgba(0, 217, 255, 0.2);
            color: #00d9ff;
            transform: translateX(5px);
        }
        
        .nav-section a.active {
            background: rgba(0, 217, 255, 0.3);
            color: #00d9ff;
            border-left: 3px solid #00d9ff;
        }
        
        .main-content {
            margin-left: 280px;
            padding: 40px;
            padding-right: 260px; /* prevent quick-ref-panel overlap on desktop */
            flex: 1;
            max-width: 1400px;
        }
        
        .content-section {
            background: rgba(30, 30, 45, 0.8);
            border-radius: 8px;
            padding: 30px;
            margin-bottom: 30px;
            border: 1px solid rgba(0, 217, 255, 0.3);
            box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
        }
        
        .content-section h2 {
            color: #00d9ff;
            font-size: 2em;
            margin-bottom: 20px;
            border-bottom: 2px solid #00d9ff;
            padding-bottom: 10px;
            text-shadow: 0 0 10px rgba(0, 217, 255, 0.3);
        }
        
        .content-section h3 {
            color: #00ffc8;
            font-size: 1.5em;
            margin: 25px 0 15px 0;
        }
        
        .content-section h4 {
            color: #ffaa00;
            font-size: 1.2em;
            margin: 20px 0 10px 0;
        }
        
        .collapsible {
            background: rgba(0, 217, 255, 0.1);
            color: #00d9ff;
            cursor: pointer;
            padding: 15px;
            border: 1px solid #00d9ff;
            border-radius: 5px;
            text-align: left;
            outline: none;
            font-size: 1.1em;
            margin: 10px 0;
            transition: all 0.3s;
            display: flex;
            justify-content: space-between;
            align-items: center;
            width: 100%;
        }
        
        .collapsible:hover {
            background: rgba(0, 217, 255, 0.2);
            box-shadow: 0 0 15px rgba(0, 217, 255, 0.3);
        }
        
        .collapsible:after {
            content: '\002B';
            font-weight: bold;
            font-size: 1.3em;
        }
        
        .collapsible.active:after {
            content: "\2212";
        }
        
        .collapsible-content {
            max-height: 0;
            overflow: hidden;
            transition: max-height 0.3s ease-out;
            background: rgba(0, 0, 0, 0.3);
            border-left: 3px solid #00d9ff;
            margin-bottom: 10px;
        }
        
        .collapsible-content-inner {
            padding: 20px;
        }
        
        .attribute-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
            gap: 15px;
            margin: 20px 0;
        }
        
        .attribute-card {
            background: linear-gradient(135deg, rgba(0, 217, 255, 0.1) 0%, rgba(0, 255, 200, 0.05) 100%);
            border: 1px solid #00d9ff;
            border-radius: 8px;
            padding: 15px;
            transition: all 0.3s;
        }
        
        .attribute-card:hover {
            transform: translateY(-5px);
            box-shadow: 0 5px 20px rgba(0, 217, 255, 0.4);
        }
        
        .attribute-name {
            color: #00ffc8;
            font-size: 1.3em;
            font-weight: bold;
            margin-bottom: 5px;
        }
        
        .attribute-cost {
            color: #ffaa00;
            font-size: 0.9em;
            margin-bottom: 10px;
        }
        
        .attribute-description {
            color: #d0d0d0;
            font-size: 0.9em;
        }
        
        .pdf-link {
            display: inline-block;
            color: #ffaa00;
            text-decoration: none;
            padding: 3px 8px;
            background: rgba(255, 170, 0, 0.1);
            border: 1px solid #ffaa00;
            border-radius: 4px;
            font-size: 0.85em;
            margin-left: 5px;
            transition: all 0.3s;
        }
        
        .pdf-link:hover {
            background: rgba(255, 170, 0, 0.3);
            box-shadow: 0 0 10px rgba(255, 170, 0, 0.5);
        }
        
        .pdf-link:before {
            content: "📖 ";
        }
        
        table {
            width: 100%;
            border-collapse: collapse;
            margin: 20px 0;
            background: rgba(0, 0, 0, 0.3);
        }
        
        th {
            background: rgba(0, 217, 255, 0.2);
            color: #00d9ff;
            padding: 12px;
            text-align: left;
            border: 1px solid #00d9ff;
        }
        
        td {
            padding: 10px;
            border: 1px solid rgba(0, 217, 255, 0.3);
        }
        
        tr:hover {
            background: rgba(0, 217, 255, 0.05);
        }
        
        .info-box {
            background: rgba(0, 217, 255, 0.1);
            border-left: 4px solid #00d9ff;
            padding: 15px;
            margin: 20px 0;
            border-radius: 4px;
        }
        
        .warning-box {
            background: rgba(255, 170, 0, 0.1);
            border-left: 4px solid #ffaa00;
            padding: 15px;
            margin: 20px 0;
            border-radius: 4px;
        }
        
        .critical-box {
            background: rgba(255, 50, 50, 0.1);
            border-left: 4px solid #ff3232;
            padding: 15px;
            margin: 20px 0;
            border-radius: 4px;
        }
        
        .success-box {
            background: rgba(0, 255, 100, 0.1);
            border-left: 4px solid #00ff64;
            padding: 15px;
            margin: 20px 0;
            border-radius: 4px;
        }
        
        .search-box {
            margin-bottom: 20px;
        }
        
        .search-box input {
            width: 100%;
            padding: 12px;
            background: rgba(0, 0, 0, 0.5);
            border: 1px solid #00d9ff;
            border-radius: 5px;
            color: #e0e0e0;
            font-size: 1em;
        }
        
        .search-box input:focus {
            outline: none;
            box-shadow: 0 0 15px rgba(0, 217, 255, 0.5);
        }
        
        .tab-container {
            margin: 20px 0;
        }
        
        .tab-buttons {
            display: flex;
            gap: 10px;
            margin-bottom: 20px;
            flex-wrap: wrap;
        }
        
        .tab-button {
            padding: 10px 20px;
            background: rgba(0, 217, 255, 0.1);
            border: 1px solid #00d9ff;
            color: #00d9ff;
            cursor: pointer;
            border-radius: 5px 5px 0 0;
            transition: all 0.3s;
        }
        
        .tab-button:hover {
            background: rgba(0, 217, 255, 0.2);
        }
        
        .tab-button.active {
            background: rgba(0, 217, 255, 0.3);
            border-bottom: 3px solid #00d9ff;
        }
        
        .tab-content {
            display: none;
            padding: 20px;
            background: rgba(0, 0, 0, 0.3);
            border: 1px solid #00d9ff;
            border-radius: 0 5px 5px 5px;
        }
        
        .tab-content.active {
            display: block;
        }
        
        .tooltip {
            position: relative;
            display: inline-block;
            border-bottom: 1px dotted #00d9ff;
            cursor: help;
        }
        
        .tooltip .tooltiptext {
            visibility: hidden;
            width: 300px;
            background-color: rgba(0, 0, 0, 0.95);
            color: #fff;
            text-align: left;
            border-radius: 6px;
            padding: 10px;
            position: absolute;
            z-index: 1;
            bottom: 125%;
            left: 50%;
            margin-left: -150px;
            border: 1px solid #00d9ff;
            font-size: 0.9em;
            box-shadow: 0 0 20px rgba(0, 217, 255, 0.5);
        }
        
        .tooltip:hover .tooltiptext {
            visibility: visible;
        }
        
        ::-webkit-scrollbar {
            width: 10px;
        }
        
        ::-webkit-scrollbar-track {
            background: rgba(0, 0, 0, 0.3);
        }
        
        ::-webkit-scrollbar-thumb {
            background: rgba(0, 217, 255, 0.5);
            border-radius: 5px;
        }
        
        ::-webkit-scrollbar-thumb:hover {
            background: rgba(0, 217, 255, 0.8);
        }

                .quick-ref-panel {
            position: fixed;
            bottom: 20px;
            right: 20px;
            background: rgba(0,0,0,0.9);
            border: 2px solid #00d9ff;
            border-radius: 8px;
            padding: 15px;
            max-width: 300px;
            box-shadow: 0 0 20px rgba(0,217,255,0.5);
            z-index: 1000;
        }
        .quick-ref-panel h3 {
            color: #00d9ff;
            margin-bottom: 10px;
            font-size: 1.1em;
        }
        .quick-ref-content {
            font-size: 0.9em;
            line-height: 1.8;
        }
        .quick-ref-content a {
            color: #ffaa00;
            text-decoration: none;
        }
        .quick-ref-content a:hover {
            text-decoration: underline;
        }

        ul, ol {
            margin-left: 25px;
            margin-top: 10px;
            margin-bottom: 10px;
        }

        li {
            margin: 5px 0;
        }

        code {
            background: rgba(0, 217, 255, 0.1);
            padding: 2px 6px;
            border-radius: 3px;
            font-family: 'Courier New', monospace;
            color: #00ffc8;
        }

        .template-card {
            background: linear-gradient(135deg, rgba(255, 170, 0, 0.1) 0%, rgba(255, 100, 0, 0.05) 100%);
            border: 1px solid #ffaa00;
            border-radius: 8px;
            padding: 20px;
            margin: 15px 0;
            transition: all 0.3s;
        }

        .template-card:hover {
            transform: translateY(-3px);
            box-shadow: 0 5px 20px rgba(255, 170, 0, 0.4);
        }

        .template-name {
            color: #ffaa00;
            font-size: 1.5em;
            font-weight: bold;
            margin-bottom: 10px;
        }

        .template-tagline {
            color: #d0d0d0;
            font-style: italic;
            margin-bottom: 15px;
        }

        /* Rule Cards */
        .rule-card {
            background: linear-gradient(135deg, rgba(0, 217, 255, 0.05) 0%, rgba(0, 255, 200, 0.05) 100%);
            border: 1px solid rgba(0, 217, 255, 0.3);
            border-left: 4px solid #00d9ff;
            border-radius: 8px;
            padding: 20px;
            margin: 20px 0;
            transition: all 0.3s;
        }

        .rule-card:hover {
            border-left-width: 6px;
            box-shadow: 0 4px 15px rgba(0, 217, 255, 0.2);
        }

        .rule-card h4 {
            color: #00d9ff;
            margin-top: 0;
            margin-bottom: 10px;
            font-size: 1.3em;
        }

        .rule-citation {
            color: #00ffc8;
            font-size: 0.9em;
            margin-bottom: 15px;
            padding: 5px 10px;
            background: rgba(0, 255, 200, 0.1);
            border-radius: 4px;
            display: inline-block;
        }

        .rule-explanation {
            color: #d0d0d0;
            line-height: 1.6;
        }

        .rule-explanation p {
            margin: 10px 0;
        }

        .rule-explanation ul, .rule-explanation ol {
            margin: 10px 0 10px 20px;
        }

        .rule-explanation table {
            margin: 15px 0;
            width: 100%;
        }

        .rule-explanation code {
            display: block;
            padding: 10px;
            margin: 10px 0;
            font-size: 1.1em;
        }

        body.light-mode .rule-card {
            background: linear-gradient(135deg, rgba(0, 128, 255, 0.05) 0%, rgba(0, 200, 150, 0.05) 100%);
            border-color: rgba(0, 128, 255, 0.3);
            border-left-color: #0080ff;
        }

        body.light-mode .rule-card h4 {
            color: #0066cc;
        }

        body.light-mode .rule-citation {
            color: #008866;
            background: rgba(0, 200, 150, 0.1);
        }

        body.light-mode .rule-explanation {
            color: #333;
        }

        /* Dark/Light Mode Toggle */
        .theme-toggle {
            position: fixed;
            top: 20px;
            right: 20px;
            z-index: 1001;
            background: rgba(0, 0, 0, 0.8);
            border: 2px solid #00d9ff;
            border-radius: 50px;
            padding: 10px 20px;
            cursor: pointer;
            transition: all 0.3s;
            display: flex;
            align-items: center;
            gap: 10px;
        }

        .theme-toggle:hover {
            background: rgba(0, 217, 255, 0.2);
            box-shadow: 0 0 20px rgba(0, 217, 255, 0.5);
        }

        .theme-toggle-icon {
            font-size: 1.2em;
        }

        .theme-toggle-text {
            color: #00d9ff;
            font-size: 0.9em;
        }

        /* Light mode styles */
        body.light-mode {
            background: linear-gradient(135deg, #f0f0f0 0%, #e0e0e0 100%);
            color: #1a1a1a;
        }

        body.light-mode .sidebar {
            background: rgba(255, 255, 255, 0.95);
            border-right: 2px solid #0080ff;
        }

        body.light-mode .sidebar h1,
        body.light-mode .sidebar h2 {
            color: #0066cc;
        }

        body.light-mode .nav-section h3 {
            color: #0080ff;
            background: rgba(0, 128, 255, 0.1);
            border-left: 3px solid #0080ff;
        }

        body.light-mode .nav-section a {
            color: #333;
        }

        body.light-mode .nav-section a:hover {
            background: rgba(0, 128, 255, 0.2);
            color: #0066cc;
        }

        body.light-mode .content-section {
            background: rgba(255, 255, 255, 0.9);
            border: 1px solid rgba(0, 128, 255, 0.3);
            color: #1a1a1a;
        }

        body.light-mode .content-section h2 {
            color: #0066cc;
            border-bottom: 2px solid #0080ff;
        }

        body.light-mode .content-section h3 {
            color: #0080ff;
        }

        body.light-mode .content-section h4 {
            color: #ff8800;
        }

        body.light-mode .info-box {
            background: rgba(0, 128, 255, 0.1);
            border-left: 4px solid #0080ff;
        }

        body.light-mode .warning-box {
            background: rgba(255, 170, 0, 0.1);
            border-left: 4px solid #ff8800;
        }

        body.light-mode .critical-box {
            background: rgba(220, 50, 50, 0.1);
            border-left: 4px solid #dc3232;
        }

        body.light-mode table {
            background: rgba(255, 255, 255, 0.5);
        }

        body.light-mode th {
            background: rgba(0, 128, 255, 0.2);
            color: #0066cc;
            border: 1px solid #0080ff;
        }

        body.light-mode td {
            border: 1px solid rgba(0, 128, 255, 0.3);
        }

        /* Offline Mode Indicator */
        .offline-indicator {
            position: fixed;
            bottom: 20px;
            left: 20px;
            background: rgba(255, 170, 0, 0.9);
            color: #000;
            padding: 10px 15px;
            border-radius: 5px;
            font-size: 0.9em;
            display: none;
            z-index: 1000;
        }

        .offline-indicator.show {
            display: block;
        }

        /* Loading Indicator */
        .loading {
            position: fixed;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            background: rgba(0, 0, 0, 0.9);
            border: 2px solid #00d9ff;
            border-radius: 10px;
            padding: 30px;
            text-align: center;
            z-index: 2000;
            display: none;
        }

        .loading.show {
            display: block;
        }

        .loading-spinner {
            border: 4px solid rgba(0, 217, 255, 0.3);
            border-top: 4px solid #00d9ff;
            border-radius: 50%;
            width: 40px;
            height: 40px;
            animation: spin 1s linear infinite;
            margin: 0 auto 15px;
        }

        @keyframes spin {
            0% { transform: rotate(0deg); }
            100% { transform: rotate(360deg); }
        }

        /* Download/Save Buttons */
        .utility-buttons {
            position: fixed;
            top: 80px;
            right: 20px;
            z-index: 1001;
            display: flex;
            flex-direction: column;
            gap: 10px;
        }

        .utility-button {
            background: rgba(0, 0, 0, 0.8);
            border: 2px solid #00d9ff;
            border-radius: 5px;
            padding: 10px 15px;
            color: #00d9ff;
            cursor: pointer;
            transition: all 0.3s;
            font-size: 0.9em;
            text-align: center;
            text-decoration: none;
            display: block;
        }

        .utility-button:hover {
            background: rgba(0, 217, 255, 0.2);
            box-shadow: 0 0 15px rgba(0, 217, 255, 0.5);
        }

        /* Print Styles */
        
        /* Hamburger toggle - hidden on desktop, shown on mobile */
        .menu-toggle {
            display: none;
            position: fixed;
            top: 12px;
            left: 12px;
            z-index: 1100;
            background: rgba(0, 217, 255, 0.15);
            border: 1px solid #00d9ff;
            color: #00d9ff;
            font-size: 1.4em;
            width: 42px;
            height: 42px;
            border-radius: 8px;
            cursor: pointer;
            align-items: center;
            justify-content: center;
            transition: background 0.2s ease;
        }
        .menu-toggle:hover {
            background: rgba(0, 217, 255, 0.3);
        }
        .sidebar-overlay {
            display: none;
        }

        @media print {
            body {
                background: white;
                color: black;
            }

            .sidebar,
            .quick-ref-panel,
            .theme-toggle,
            .utility-buttons,
            .search-box,
            .tab-buttons,
            .collapsible:after {
                display: none !important;
            }

            .main-content {
                margin-left: 0;
                padding: 20px;
            }

            .content-section {
                background: white;
                border: 1px solid #000;
                page-break-inside: avoid;
                margin-bottom: 20px;
            }

            .collapsible-content {
                max-height: none !important;
                display: block !important;
            }

            .collapsible {
                background: #f0f0f0;
                color: black;
                border: 1px solid #000;
            }

            .tab-content {
                display: block !important;
            }

            a {
                color: black;
                text-decoration: underline;
            }

            .pdf-link {
                background: none;
                border: none;
                padding: 0;
            }

            table {
                page-break-inside: avoid;
            }

            h2, h3, h4 {
                page-break-after: avoid;
                color: black;
            }

            .attribute-grid {
                display: block;
            }

            .attribute-card {
                margin-bottom: 15px;
                page-break-inside: avoid;
                border: 1px solid #000;
            }
        }

        /* Mobile Optimization (Enhanced) */
        @media (max-width: 768px) {

            /* Hamburger button - mobile only */
            .menu-toggle {
                display: flex !important;
            }

            /* Sidebar slides off to the left by default */
            .sidebar {
                position: fixed;
                top: 0;
                left: 0;
                width: 280px;
                height: 100vh;
                transform: translateX(-100%);
                transition: transform 0.3s ease;
                z-index: 1000;
                overflow-y: auto;
            }

            /* Sidebar visible when open */
            .sidebar.open {
                transform: translateX(0);
            }

            /* Dim overlay behind open sidebar */
            .sidebar-overlay {
                display: block;
                position: fixed;
                top: 0; left: 0;
                width: 100%; height: 100%;
                background: rgba(0,0,0,0.5);
                z-index: 999;
                opacity: 0;
                pointer-events: none;
                transition: opacity 0.3s ease;
            }

            .sidebar-overlay.active {
                opacity: 1;
                pointer-events: all;
            }

            /* Main content fills full width on mobile */
            .main-content {
                margin-left: 0;
                padding: 15px;
                padding-top: 60px;
            }

            .content-section {
                padding: 15px;
            }

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

            .quick-ref-panel {
                position: static;
                margin: 10px 0;
                max-width: 100%;
            }

            .theme-toggle,
            .utility-buttons {
                position: static;
                margin: 10px;
            }

            .utility-buttons {
                flex-direction: row;
                flex-wrap: wrap;
            }

            .tab-buttons {
                flex-wrap: wrap;
            }

            .tab-button {
                flex: 1 1 45%;
            }

            table {
                font-size: 0.9em;
            }

            th, td {
                padding: 8px 5px;
            }
        }
    
        /* GCS Download Styles */

        .gcs-download-container {
            background: rgba(0, 217, 255, 0.05);
            border: 1px solid rgba(0, 217, 255, 0.3);
            padding: 20px;
            margin: 20px 0;
            border-radius: 12px;
            text-align: center;
        }

        .gcs-button-group {
            display: flex;
            flex-direction: column;
            gap: 15px;
            align-items: center;
        }

        .gcs-main-btn {
            display: block;
            width: 80%;
            background: linear-gradient(135deg, #00d9ff 0%, #0080ff 100%);
            color: #000 !important;
            text-decoration: none;
            font-weight: bold;
            padding: 12px;
            border-radius: 50px;
            transition: all 0.3s ease;
            box-shadow: 0 0 15px rgba(0, 217, 255, 0.4);
        }

        .gcs-main-btn:hover {
            transform: scale(1.02);
            box-shadow: 0 0 25px rgba(0, 217, 255, 0.7);
        }

        .gcs-individual-files {
            display: flex;
            flex-wrap: wrap;
            gap: 10px;
            justify-content: center;
            width: 100%;
        }

        .gcs-sub-btn {
            flex: 1;
            min-width: 120px;
            background: rgba(0, 0, 0, 0.5);
            border: 1px solid #00d9ff;
            color: #00d9ff !important;
            text-decoration: none;
            font-size: 0.8em;
            padding: 8px;
            border-radius: 50px;
            transition: all 0.3s ease;
        }

        .gcs-sub-btn:hover {
            background: rgba(0, 217, 255, 0.2);
        }
    
        body.light-mode code {
            background: rgba(0, 80, 160, 0.12);
            color: #003580;
            border: 1px solid rgba(0, 80, 160, 0.25);
        }

        body.light-mode .rule-explanation code {
            background: rgba(0, 80, 160, 0.1);
            color: #002d6e;
            border: 1px solid rgba(0, 80, 160, 0.3);
        }


                body.light-mode .quick-ref-panel {
            background: #ffffff;
            border: 1px solid #b8d0ea;
            color: #1a1a2e;
            box-shadow: 0 2px 8px rgba(0,0,0,0.1);
        }
        body.light-mode .quick-ref-panel h3 {
            color: #0047ab;
            border-bottom: 1px solid #b8d0ea;
        }
