
        

        /* ── Light Mode: Graphite + Safety Amber ── */
        :root,
        [data-theme="light"] {
            --pico-font-family: system-ui, -apple-system, sans-serif;
            --pico-primary: #d97706;
            --pico-primary-hover: #b45309;
            --pico-primary-background: #d97706;
            --pico-primary-hover-background: #b45309;
            --pico-primary-focus: rgba(217, 119, 6, 0.2);
            --pico-background-color: #f8fafc;
            --pico-color: #44403c;
            --pico-muted-color: #78716c;
            --pico-card-background-color: #ffffff;
            --pico-card-sectioning-background-color: #ffffff;
            --pico-card-border-color: #e7e5e4;
            --pico-form-element-background-color: #ffffff;
            --pico-form-element-border-color: #d6d3d1;
            --pico-form-element-color: #44403c;
            --pico-form-element-placeholder-color: #a8a29e;
            --pico-table-border-color: #e7e5e4;
            --pico-table-row-stripped-background-color: #f8fafc;
            --pico-code-background-color: #1c1917;
            --pico-code-color: #f5f5f4;
            --pico-mark-background-color: #d97706;
            --pico-h1-color: #1e293b;
            --pico-h2-color: #1e293b;
            --pico-h3-color: #1e293b;
            --pico-text-selection-color: rgba(217, 119, 6, 0.2);

            --body-bg: #f8fafc;
            --header-bg: rgba(255, 255, 255, 0.94);
            --header-border: #e7e5e4;
            --logo-color: #1e293b;
            --nav-link-color: #57534e;
            --card-bg: #ffffff;
            --card-border: #e7e5e4;
            --card-hover-shadow: rgba(28, 25, 23, 0.06);
            --text-color: #44403c;
            --text-muted: #78716c;
            --text-muted-light: #a8a29e;
            --heading-color: #1e293b;
            --section-border: #e7e5e4;
            --footer-bg: #f5f5f4;
            --footer-border: #e7e5e4;
            --faq-bg: #ffffff;
            --faq-border: #e7e5e4;
            --faq-open-border: #d97706;
            --step-bg: #ffffff;
            --step-border: #e7e5e4;
            --search-bg: #ffffff;
            --search-border: #d6d3d1;
            --search-focus-shadow: rgba(217, 119, 6, 0.12);
            --search-result-hover: #fffbeb;
            --calc-bg: #fafaf9;
            --calc-border: #e7e5e4;
            --badge-bg: #fffbeb;
            --badge-color: #b45309;
            --severity-bg: #fef2f2;
            --severity-color: #dc2626;
        }

        /* ── Dark Mode: Graphite + Safety Amber ── */
        [data-theme="dark"] {
            --pico-background-color: #1c1917;
            --pico-color: #d6d3d1;
            --pico-muted-color: #a8a29e;
            --pico-card-background-color: #292524;
            --pico-card-sectioning-background-color: #292524;
            --pico-card-border-color: #44403c;
            --pico-form-element-background-color: #292524;
            --pico-form-element-border-color: #57534e;
            --pico-form-element-color: #e7e5e4;
            --pico-form-element-placeholder-color: #78716c;
            --pico-table-border-color: #44403c;
            --pico-table-row-stripped-background-color: rgba(41, 37, 36, 0.5);
            --pico-code-background-color: #1c1917;
            --pico-code-color: #e7e5e4;
            --pico-h1-color: #f5f5f4;
            --pico-h2-color: #f5f5f4;
            --pico-h3-color: #f5f5f4;

            --body-bg: #1c1917;
            --header-bg: rgba(28, 25, 23, 0.96);
            --header-border: #292524;
            --logo-color: #f5f5f4;
            --nav-link-color: #a8a29e;
            --card-bg: #292524;
            --card-border: #44403c;
            --card-hover-shadow: rgba(0, 0, 0, 0.3);
            --text-color: #d6d3d1;
            --text-muted: #a8a29e;
            --text-muted-light: #78716c;
            --heading-color: #f5f5f4;
            --section-border: #44403c;
            --footer-bg: #1c1917;
            --footer-border: #292524;
            --faq-bg: #292524;
            --faq-border: #44403c;
            --faq-open-border: #d97706;
            --step-bg: #292524;
            --step-border: #44403c;
            --search-bg: #292524;
            --search-border: #44403c;
            --search-focus-shadow: rgba(217, 119, 6, 0.2);
            --search-result-hover: rgba(217, 119, 6, 0.08);
            --calc-bg: #292524;
            --calc-border: #44403c;
            --badge-bg: rgba(217, 119, 6, 0.15);
            --badge-color: #fbbf24;
            --severity-bg: rgba(220, 38, 38, 0.15);
            --severity-color: #f87171;
        }

        body {
            background: var(--body-bg);
            min-height: 100vh;
            -webkit-font-smoothing: antialiased;
            -moz-osx-font-smoothing: grayscale;
            color: var(--text-color);
        }

        /* ── Theme Toggle ──────────────────────── */
        .theme-toggle {
            background: rgba(255, 255, 255, 0.06);
            border: 1px solid rgba(255, 255, 255, 0.1);
            border-radius: 100px;
            padding: 0.4rem 1rem;
            cursor: pointer;
            font-size: 0.82rem;
            font-weight: 600;
            font-family: system-ui, -apple-system, sans-serif;
            letter-spacing: 0.01em;
            color: var(--nav-link-color);
            backdrop-filter: blur(8px);
            -webkit-backdrop-filter: blur(8px);
            transition: all 0.2s;
            white-space: nowrap;
            box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
        }
        .theme-toggle:hover {
            background: rgba(217, 119, 6, 0.08);
            border-color: rgba(217, 119, 6, 0.25);
            color: #d97706;
            box-shadow: 0 2px 8px rgba(217, 119, 6, 0.1);
        }
        [data-theme="dark"] .theme-toggle {
            background: rgba(255, 255, 255, 0.04);
            border-color: rgba(255, 255, 255, 0.06);
            color: #a8a29e;
        }
        [data-theme="dark"] .theme-toggle:hover {
            background: rgba(217, 119, 6, 0.15);
            border-color: rgba(217, 119, 6, 0.3);
            color: #fbbf24;
        }

        /* ── Header ────────────────────────────── */
        header {
            background: var(--header-bg);
            backdrop-filter: blur(12px);
            -webkit-backdrop-filter: blur(12px);
            border-bottom: 1px solid var(--header-border);
        }

        header .header-inner {
            display: flex;
            align-items: center;
            justify-content: space-between;
            flex-wrap: wrap;
            gap: 0.75rem;
            padding: 0.75rem 1rem;
            max-width: 1200px;
            margin: 0 auto;
        }

        header nav {
            display: flex;
            align-items: center;
            flex-wrap: wrap;
            gap: 0.5rem;
        }

        header .logo {
            font-size: 1.35rem;
            font-weight: 700;
            color: var(--logo-color);
            text-decoration: none;
            white-space: nowrap;
            letter-spacing: -0.02em;
        }

        header .logo span {
            color: #d97706;
        }
        [data-theme="dark"] header .logo span {
            color: #fbbf24;
        }

        header .nav-links {
            display: flex;
            gap: 0.25rem;
            list-style: none;
            margin: 0;
            padding: 0;
            flex-wrap: wrap;
            align-items: center;
        }
        header .nav-links li {
            list-style: none;
        }
        header .nav-links li::marker {
            display: none;
        }

        header .nav-links li a {
            color: var(--nav-link-color);
            text-decoration: none;
            font-weight: 500;
            font-size: 0.88rem;
            padding: 0.35rem 0.7rem;
            border-radius: 6px;
            transition: color 0.15s, background 0.15s;
            white-space: nowrap;
        }

        header .nav-links li a:hover {
            color: #d97706;
            background: rgba(217, 119, 6, 0.06);
        }

        /* ── Hamburger (Mobile) ────────────────── */
        .hamburger {
            display: none;
            background: none;
            border: none;
            cursor: pointer;
            padding: 0.4rem;
            z-index: 101;
        }
        .hamburger span {
            display: block;
            width: 22px;
            height: 2px;
            background: var(--nav-link-color);
            margin: 5px 0;
            transition: transform 0.25s, opacity 0.25s;
            border-radius: 2px;
        }
        .hamburger.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
        .hamburger.active span:nth-child(2) { opacity: 0; }
        .hamburger.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

        /* ── Main ──────────────────────────────── */
        main {
            padding: 2rem 1rem;
            max-width: 1200px;
            margin: 0 auto;
        }

        /* ── Search ────────────────────────────── */
        .search-bar {
            margin-bottom: 2rem;
        }

        .search-bar input {
            width: 100%;
            padding: 0.65rem 0.9rem;
            font-size: 0.95rem;
            border: 1.5px solid var(--search-border);
            border-radius: 8px;
            background: var(--search-bg);
            color: var(--text-color);
            transition: border-color 0.15s, box-shadow 0.15s;
            font-family: system-ui, -apple-system, sans-serif;
        }

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

        .search-bar input:focus {
            border-color: #d97706;
            outline: none;
            box-shadow: 0 0 0 3px var(--search-focus-shadow);
        }

        .search-results {
            display: none;
            margin-top: 0.35rem;
            background: var(--search-bg);
            border: 1px solid var(--search-border);
            border-radius: 8px;
            max-height: 320px;
            overflow-y: auto;
            box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
        }

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

        .search-results a {
            display: block;
            padding: 0.6rem 0.9rem;
            color: var(--text-color);
            text-decoration: none;
            border-bottom: 1px solid var(--section-border);
            transition: background 0.1s;
            font-size: 0.9rem;
        }

        .search-results a:last-child {
            border-bottom: none;
        }

        .search-results a:hover {
            background: var(--search-result-hover);
        }

        /* ── Cards ──────────────────────────────── */
        .card-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
            gap: 1.25rem;
            margin-top: 1.25rem;
        }

        .card {
            background: var(--card-bg);
            border: 1px solid var(--card-border);
            border-radius: 10px;
            padding: 1.35rem;
            transition: box-shadow 0.2s, border-color 0.2s;
            display: flex;
            flex-direction: column;
            overflow: hidden;
        }

        .card:hover {
            border-color: #cbd5e1;
            box-shadow: 0 2px 12px var(--card-hover-shadow);
        }

        .card h3 {
            margin-top: 0;
            font-size: 1.1rem;
            line-height: 1.35;
            overflow: hidden;
            text-overflow: ellipsis;
            display: -webkit-box;
            -webkit-line-clamp: 2;
            -webkit-box-orient: vertical;
        }

        .card h3 a {
            color: var(--heading-color);
            text-decoration: none;
            font-weight: 600;
        }

        .card h3 a:hover {
            color: #d97706;
        }

        .card .meta {
            font-size: 0.8rem;
            color: var(--text-muted);
            display: flex;
            gap: 0.75rem;
            flex-wrap: wrap;
            margin-bottom: 0.5rem;
            flex-shrink: 0;
        }

        .card .meta .badge {
            background: var(--badge-bg);
            color: var(--badge-color);
            padding: 0.15rem 0.55rem;
            border-radius: 4px;
            font-weight: 600;
            font-size: 0.72rem;
            letter-spacing: 0.01em;
        }

        .card .card-body-text {
            color: var(--text-muted);
            font-size: 0.85rem;
            line-height: 1.5;
            overflow: hidden;
            text-overflow: ellipsis;
            display: -webkit-box;
            -webkit-line-clamp: 3;
            -webkit-box-orient: vertical;
            margin-bottom: 0.75rem;
        }

        /* ── Properties Table ───────────────────── */
        .properties-table {
            width: 100%;
            border-collapse: collapse;
            margin: 0.75rem 0 0;
            font-size: 0.82rem;
            table-layout: fixed;
        }

        .properties-table th,
        .properties-table td {
            padding: 0.45rem 0.6rem;
            border-bottom: 1px solid var(--section-border);
            text-align: left;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }

        .properties-table th {
            width: 40%;
        }

        .properties-table td {
            width: 60%;
        }

        [data-theme="light"] .properties-table tr:nth-child(even) {
            background: #f8fafc;
        }
        [data-theme="dark"] .properties-table tr:nth-child(even) {
            background: rgba(30, 41, 59, 0.4);
        }

        .properties-table th {
            color: var(--text-muted);
            font-weight: 600;
            width: 220px;
            font-size: 0.82rem;
            letter-spacing: 0.02em;
            text-transform: uppercase;
        }

        .properties-table td {
            color: var(--heading-color);
            font-weight: 500;
        }

        /* ── Calculator ─────────────────────────── */
        .calculator-box {
            background: var(--calc-bg);
            border: 1px solid var(--calc-border);
            border-radius: 10px;
            padding: 1.5rem;
            margin: 2rem 0;
        }

        .calculator-box h3 {
            color: var(--heading-color);
            margin-top: 0;
            font-size: 1.1rem;
        }

        .calculator-box .input-group {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
            gap: 0.9rem;
            margin-bottom: 1rem;
        }

        .calculator-box label {
            display: block;
            font-weight: 600;
            margin-bottom: 0.2rem;
            color: var(--text-muted);
            font-size: 0.82rem;
        }

        .calculator-box input {
            width: 100%;
            padding: 0.5rem 0.65rem;
            border: 1.5px solid var(--calc-border);
            border-radius: 6px;
            background: var(--body-bg);
            color: var(--text-color);
            font-family: system-ui, -apple-system, sans-serif;
            font-size: 0.9rem;
            transition: border-color 0.15s;
        }

        .calculator-box input:focus {
            border-color: #d97706;
            outline: none;
            box-shadow: 0 0 0 3px rgba(217, 119, 6, 0.1);
        }

        .calculator-box button {
            background: #d97706;
            color: #fff;
            border: none;
            padding: 0.55rem 1.5rem;
            border-radius: 6px;
            font-weight: 600;
            cursor: pointer;
            font-family: system-ui, -apple-system, sans-serif;
            font-size: 0.9rem;
            transition: background 0.15s;
        }

        .calculator-box button:hover {
            background: #b45309;
        }

        .calculator-box .result {
            background: #f0fdf4;
            border: 1px solid #bbf7d0;
            border-radius: 8px;
            padding: 1rem;
            margin-top: 1rem;
            font-size: 1rem;
            color: #166534;
        }

        .calc-results-grid {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 1.5rem;
        }
        .calc-col {
            background: var(--body-bg);
            border: 1px solid var(--section-border);
            border-radius: 8px;
            padding: 1rem 1.1rem;
        }
        .calc-col .calc-row {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 0.45rem 0;
            border-bottom: 1px solid var(--section-border);
            font-size: 0.9rem;
        }
        .calc-col .calc-row:last-child {
            border-bottom: none;
        }
        .calc-col .calc-label {
            color: var(--text-muted);
            font-size: 0.82rem;
        }
        .calc-col .calc-value {
            font-weight: 700;
            color: var(--heading-color);
            text-align: right;
        }
        .calc-col .calc-value.highlight {
            color: #d97706;
            font-size: 1.05rem;
        }
        .calc-copied {
            color: #16a34a;
            font-size: 0.8rem;
            font-weight: 600;
            margin-left: 0.75rem;
            opacity: 0;
            transition: opacity 0.2s;
        }
        .calc-copied.show {
            opacity: 1;
        }
        @media (max-width: 600px) {
            .calc-results-grid {
                grid-template-columns: 1fr;
                gap: 0.75rem;
            }
        }

        /* ── FAQ ─────────────────────────────────── */
        .faq-section {
            margin-top: 2rem;
        }

        .faq-section details {
            margin-bottom: 0.75rem;
            background: var(--faq-bg);
            border: 1px solid var(--faq-border);
            border-radius: 8px;
            padding: 0.9rem 1.1rem;
            transition: border-color 0.15s;
        }

        .faq-section details:hover {
            border-color: #cbd5e1;
        }

        .faq-section details summary {
            font-weight: 600;
            color: var(--heading-color);
            cursor: pointer;
            font-size: 0.95rem;
        }

        .faq-section details[open] {
            border-color: var(--faq-open-border);
        }

        .faq-section details[open] summary {
            color: #d97706;
        }

        /* ── Alert Box ──────────────────────────── */
        .alert-box {
            background: var(--severity-bg);
            border: 1px solid var(--severity-color);
            border-radius: 8px;
            padding: 1rem;
            margin: 1rem 0;
        }

        .alert-box .severity {
            font-weight: 700;
            color: var(--severity-color);
        }

        /* ── Troubleshooting Steps ──────────────── */
        .troubleshooting-steps {
            counter-reset: step;
            margin: 1.25rem 0;
        }

        .troubleshooting-steps .step {
            counter-increment: step;
            display: flex;
            gap: 1rem;
            padding: 0.9rem;
            margin-bottom: 0.6rem;
            background: var(--step-bg);
            border: 1px solid var(--step-border);
            border-radius: 8px;
        }

        .troubleshooting-steps .step::before {
            content: counter(step);
            width: 28px;
            height: 28px;
            background: #d97706;
            color: #fff;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-weight: 700;
            font-size: 0.85rem;
            flex-shrink: 0;
        }

        /* ── Pagination ─────────────────────────── */
        .pagination {
            display: flex;
            justify-content: center;
            gap: 0.4rem;
            margin: 2rem 0;
        }

        .pagination a {
            padding: 0.45rem 0.85rem;
            background: var(--card-bg);
            border: 1px solid var(--card-border);
            border-radius: 6px;
            color: var(--text-muted);
            text-decoration: none;
            font-weight: 500;
            font-size: 0.9rem;
            transition: all 0.15s;
        }

        .pagination a:hover {
            border-color: #d97706;
            color: #d97706;
        }

        .pagination a.active {
            background: #d97706;
            border-color: #d97706;
            color: #fff;
        }

        /* ── Breadcrumb ─────────────────────────── */
        .breadcrumb {
            font-size: 0.82rem;
            color: var(--text-muted);
            margin-bottom: 1.25rem;
        }

        .breadcrumb a {
            color: var(--text-muted);
            text-decoration: none;
        }

        .breadcrumb a:hover {
            color: #d97706;
        }

        .breadcrumb span {
            margin: 0 0.35rem;
        }

        /* ── Code Blocks ────────────────────────── */
        pre, code {
            background: #1e293b;
            color: #e2e8f0;
            border-radius: 6px;
            font-size: 0.85rem;
        }

        pre {
            padding: 1rem;
            overflow-x: auto;
        }

        code {
            padding: 0.15rem 0.4rem;
        }

        /* ── Footer ─────────────────────────────── */
        footer {
            background: var(--footer-bg);
            border-top: 1px solid var(--footer-border);
            padding: 2rem 1rem;
            text-align: center;
            margin-top: 4rem;
        }

        footer .footer-links {
            display: flex;
            justify-content: center;
            gap: 2rem;
            flex-wrap: wrap;
            margin-bottom: 1rem;
        }

        footer .footer-links a {
            color: var(--text-muted);
            text-decoration: none;
            font-weight: 500;
            font-size: 0.9rem;
        }

        footer .footer-links a:hover {
            color: #d97706;
        }

        footer p {
            color: var(--text-muted-light);
            font-size: 0.82rem;
        }

        /* ── Content typography ─────────────────── */
        article h1 {
            font-size: 1.7rem;
            font-weight: 700;
            letter-spacing: -0.02em;
            color: var(--heading-color);
        }

        article h2 {
            font-size: 1.35rem;
            font-weight: 700;
            letter-spacing: -0.01em;
            color: var(--heading-color);
        }

        article h3 {
            font-size: 1.15rem;
            font-weight: 600;
            color: var(--heading-color);
        }

        article p, article li {
            line-height: 1.75;
            color: var(--text-color);
        }

        section h2, section h3 {
            margin-top: 2rem;
        }

        /* ── Responsive ─────────────────────────── */
        @media (max-width: 768px) {
            header .header-inner {
                flex-direction: row;
                align-items: center;
                gap: 0.5rem;
                flex-wrap: wrap;
                position: relative;
            }
            header nav {
                width: auto;
                justify-content: flex-start;
                z-index: 101;
            }
            .hamburger { display: flex !important; flex-direction: column; align-items: center; justify-content: center; z-index: 101; }

            /* Mobile nav overlay */
            header .nav-links {
                display: none;
                flex-direction: column;
                width: 100%;
                background: var(--header-bg);
                backdrop-filter: blur(16px);
                -webkit-backdrop-filter: blur(16px);
                border: 1px solid var(--header-border);
                border-radius: 0 0 10px 10px;
                padding: 0.75rem;
                gap: 0;
                position: absolute;
                top: 100%;
                left: 0;
                right: 0;
                z-index: 100;
                box-shadow: 0 12px 24px rgba(0,0,0,0.1);
                max-height: 70vh;
                overflow-y: auto;
            }
            header .nav-links.open { display: flex; }
            header .nav-links li {
                list-style: none;
                width: 100%;
            }
            header .nav-links li::marker { display: none; }
            header .nav-links li a {
                display: block;
                width: 100%;
                font-size: 0.9rem;
                padding: 0.55rem 0.75rem;
                border-radius: 6px;
            }
            .theme-toggle {
                padding: 0.35rem 0.85rem;
                font-size: 0.78rem;
                z-index: 101;
            }
            .card-grid {
                grid-template-columns: 1fr;
                gap: 1rem;
            }
            main {
                padding: 1.25rem 0.75rem;
            }
            article h1 {
                font-size: 1.4rem;
            }
            .properties-table th {
                width: 120px;
                font-size: 0.75rem;
                padding: 0.45rem 0.6rem;
            }
            .properties-table td {
                font-size: 0.82rem;
                padding: 0.45rem 0.6rem;
            }
            .calculator-box .input-group {
                grid-template-columns: 1fr;
            }
            .troubleshooting-steps .step {
                padding: 0.7rem;
                gap: 0.7rem;
            }
            .breadcrumb {
                font-size: 0.75rem;
                overflow-x: auto;
                white-space: nowrap;
            }
        }

        @media (max-width: 480px) {
            header .header-inner {
                gap: 0.4rem;
            }
            header .logo {
                font-size: 1.1rem;
            }
            header .nav-links li a {
                font-size: 0.74rem;
                padding: 0.25rem 0.4rem;
            }
            .theme-toggle {
                font-size: 0.74rem;
                padding: 0.3rem 0.7rem;
            }
            .card {
                padding: 1rem;
            }
            .card h3 {
                font-size: 1rem;
            }
            .card-grid {
                gap: 0.75rem;
            }
        }
    