        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        button {
            font: inherit;
            color: inherit;
        }

        :root {
            --accent: #ff6b00;
            --black: #0a0a0a;
            --dark-gray: #1a1a1a;
            --medium-gray: #2a2a2a;
            --light-gray: #4a4a4a;
            --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
        }

        body {
            background: var(--black);
            color: #d0d0d0;
            font-family: var(--font);
            -webkit-font-smoothing: antialiased;
            overflow-x: hidden;
        }

        body::before {
            content: '';
            position: fixed;
            inset: 0;
            background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.03'/%3E%3C/svg%3E");
            pointer-events: none;
            z-index: 1000;
        }

        a {
            color: var(--accent);
        }

        /* Navigation top */
        nav.top {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            background: rgba(10, 10, 10, 0.95);
            backdrop-filter: blur(10px);
            z-index: 999;
            border-bottom: 2px solid var(--accent);
        }

        .nav-container {
            max-width: 1500px;
            margin: 0 auto;
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 1rem 2rem;
        }

        .nav-logo {
            font-size: 1.4rem;
            font-weight: 700;
            text-transform: uppercase;
            color: var(--accent);
            letter-spacing: 0.18em;
            text-decoration: none;
        }

        .nav-links {
            display: flex;
            gap: 2rem;
            list-style: none;
        }

        .nav-links a {
            color: #fff;
            text-decoration: none;
            text-transform: uppercase;
            font-weight: 600;
            letter-spacing: 0.1em;
            font-size: 1rem;
            transition: color 0.2s ease;
        }

        .nav-links a:hover,
        .nav-links a.active {
            color: var(--accent);
        }

        .menu-toggle {
            display: none;
            flex-direction: column;
            justify-content: center;
            gap: 5px;
            width: 40px;
            height: 40px;
            background: none;
            border: 0;
            cursor: pointer;
        }

        .menu-toggle span {
            width: 25px;
            height: 3px;
            background: var(--accent);
        }

        /* Shell */
        .shell {
            max-width: 1400px;
            margin: 0 auto;
            padding: 90px 2rem 0;
            display: grid;
            grid-template-columns: 288px 1fr;
            gap: 3.5rem;
            align-items: start;
        }

        /* Sidebar */
        .tree {
            position: sticky;
            top: 90px;
            align-self: start;
            max-height: calc(100vh - 110px);
            overflow-y: auto;
            padding: 1.5rem 0 2rem;
            font-size: 0.92rem;
        }

        .tree::-webkit-scrollbar {
            width: 8px;
        }

        .tree::-webkit-scrollbar-thumb {
            background: var(--medium-gray);
            border-radius: 4px;
        }

        .tree-title {
            font-size: 0.72rem;
            letter-spacing: 0.14em;
            text-transform: uppercase;
            color: #6a6a6a;
            margin-bottom: 0.9rem;
            padding: 0 0.7rem;
        }

        /* Search */
        .search {
            padding: 0 0 1rem;
            position: relative;
        }

        .search input {
            width: 100%;
            background: var(--dark-gray);
            border: 1px solid var(--medium-gray);
            border-radius: 6px;
            color: #fff;
            padding: 0.6rem 0.8rem;
            font-size: 0.9rem;
        }

        .search input::placeholder {
            color: #7a7a7a;
        }

        .search input:focus {
            outline: none;
            border-color: var(--accent);
        }

        .search-results {
            margin-top: 0.5rem;
            border: 1px solid var(--medium-gray);
            border-radius: 6px;
            background: #121212;
            max-height: 340px;
            overflow-y: auto;
        }

        .search-results[hidden] {
            display: none;
        }

        .search-result {
            display: block;
            width: 100%;
            text-align: left;
            background: none;
            border: 0;
            border-bottom: 1px solid #1c1c1c;
            padding: 0.6rem 0.8rem;
            cursor: pointer;
        }

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

        .search-result:hover,
        .search-result.kb {
            background: rgba(255, 107, 0, 0.08);
        }

        .search-result .sr-title {
            display: block;
            font-weight: 600;
            color: #fff;
            font-size: 0.85rem;
            margin-bottom: 0.15rem;
        }

        .search-result .sr-snippet {
            display: block;
            font-size: 0.8rem;
            color: #9a9a9a;
            line-height: 1.45;
        }

        .search-result mark {
            background: rgba(255, 107, 0, 0.35);
            color: #fff;
            border-radius: 2px;
        }

        .search-empty {
            padding: 0.7rem 0.8rem;
            font-size: 0.82rem;
            color: #7a7a7a;
        }

        /* Tree links */
        .tree a,
        .tree-group > button {
            display: block;
            width: 100%;
            text-align: left;
            padding: 0.45rem 0.7rem;
            color: #9a9a9a;
            text-decoration: none;
            background: none;
            border: 0;
            border-left: 2px solid transparent;
            line-height: 1.35;
            cursor: pointer;
            transition: color 0.15s ease;
        }

        .tree a:hover,
        .tree-group > button:hover {
            color: #fff;
        }

        .tree a.current {
            color: var(--accent);
            border-left-color: var(--accent);
            background: rgba(255, 107, 0, 0.07);
            font-weight: 600;
        }

        .tree-root {
            color: #e8e8e8;
            font-weight: 600;
            text-transform: uppercase;
            font-size: 0.78rem;
            letter-spacing: 0.06em;
            margin-top: 0.9rem;
        }

        .tree-body > .tree-root:first-child {
            margin-top: 0;
        }

        .tree-group {
            margin-top: 0.9rem;
        }

        .tree-group > button {
            color: #e8e8e8;
            font-weight: 600;
            text-transform: uppercase;
            font-size: 0.78rem;
            letter-spacing: 0.06em;
            display: flex;
            align-items: center;
            gap: 0.5rem;
        }

        .tree-group > button .chev {
            font-size: 0.7rem;
            transition: transform 0.2s ease;
        }

        .tree-group > button[aria-expanded="false"] .chev {
            transform: rotate(-90deg);
        }

        .tree-children {
            margin-top: 0.25rem;
        }

        .tree-children[hidden] {
            display: none;
        }

        .tree-children a {
            padding-left: 1.4rem;
        }

        .tree-children a.sub {
            padding-left: 2.5rem;
            font-size: 0.88rem;
        }

        .tree-mobile-toggle {
            display: none;
        }

        /* Content */
        .content {
            min-width: 0;
            padding: 2.25rem 0 4rem;
            max-width: 720px;
        }

        .page[hidden] {
            display: none;
        }

        .breadcrumb {
            font-size: 0.82rem;
            color: #7a7a7a;
            margin-bottom: 1.1rem;
        }

        .breadcrumb span + span::before {
            content: "›";
            margin: 0 0.5rem;
            color: #555;
        }

        .content h1 {
            font-size: 1.8rem;
            font-weight: 700;
            color: #fff;
            margin-bottom: 0.4rem;
        }

        .page-intro {
            color: #9a9a9a;
            font-size: 1.05rem;
            line-height: 1.6;
            margin-bottom: 2rem;
        }

        .content h2 {
            font-size: 1.15rem;
            font-weight: 700;
            color: #fff;
            margin: 2.25rem 0 0.9rem;
        }

        .content h3 {
            font-size: 0.98rem;
            font-weight: 700;
            color: #fff;
            margin: 1.6rem 0 0.6rem;
        }

        .content p {
            line-height: 1.7;
            margin: 0.85rem 0;
        }

        .content ul,
        .content ol {
            margin: 0.85rem 0;
            padding-left: 1.3rem;
            line-height: 1.7;
        }

        .content li {
            margin: 0.45rem 0;
        }

        .content li::marker {
            color: var(--accent);
        }

        .content strong {
            color: #f0f0f0;
        }

        /* Numbered rule list */
        .rules-list {
            list-style: none;
            padding-left: 0;
        }

        .rules-list li {
            display: grid;
            grid-template-columns: 2rem 1fr;
            gap: 0.6rem;
            padding: 0.6rem 0;
            line-height: 1.65;
            margin: 0;
        }

        .rules-list li + li {
            border-top: 1px solid #161616;
        }

        .rules-list .ref {
            color: var(--accent);
            font-weight: 700;
            font-variant-numeric: tabular-nums;
        }

        .rules-list ul {
            grid-column: 2;
            margin: 0.4rem 0 0;
        }

        /* Definition list */
        .terms {
            margin: 1.5rem 0;
        }

        .term {
            padding: 1.1rem 0;
            border-top: 1px solid #1c1c1c;
        }

        .term:first-child {
            border-top: 0;
        }

        .term dt {
            font-weight: 700;
            color: #fff;
            font-size: 1.02rem;
            margin-bottom: 0.4rem;
        }

        .term .def {
            margin: 0.2rem 0;
            line-height: 1.6;
        }

        .term .ex {
            margin: 0.35rem 0 0;
            color: #8a8a8a;
            font-style: italic;
            line-height: 1.55;
            font-size: 0.95rem;
        }

        .term .ex::before {
            content: "Ex. ";
            font-style: normal;
            color: #6a6a6a;
        }

        /* Callouts */
        .callout {
            border-left: 3px solid var(--light-gray);
            background: rgba(255, 255, 255, 0.03);
            padding: 0.85rem 1.1rem;
            margin: 1.4rem 0;
        }

        .callout p {
            margin: 0.4rem 0 0;
            font-size: 0.96rem;
            line-height: 1.55;
        }

        .callout p:first-child {
            margin-top: 0;
        }

        .callout .c-label {
            display: block;
            font-size: 0.68rem;
            font-weight: 700;
            letter-spacing: 0.14em;
            text-transform: uppercase;
            color: #9a9a9a;
            margin-bottom: 0.35rem;
        }

        .callout.danger {
            border-left-color: #e5484d;
            background: rgba(229, 72, 77, 0.08);
        }

        .callout.danger .c-label {
            color: #ff6b6f;
        }

        /* Tables */
        .table-wrap {
            overflow-x: auto;
            margin: 1.25rem 0;
        }

        table {
            width: 100%;
            border-collapse: collapse;
            font-size: 0.95rem;
        }

        th,
        td {
            text-align: left;
            padding: 0.6rem 0.9rem;
            border-bottom: 1px solid #1c1c1c;
            vertical-align: top;
            line-height: 1.5;
        }

        thead th {
            color: #9a9a9a;
            font-weight: 600;
            font-size: 0.76rem;
            text-transform: uppercase;
            letter-spacing: 0.08em;
            border-bottom-color: var(--medium-gray);
        }

        tbody tr:last-child td {
            border-bottom: 0;
        }

        td strong {
            color: #fff;
        }

        /* Prev / next */
        .page-nav {
            display: flex;
            justify-content: space-between;
            gap: 1rem;
            margin-top: 3.5rem;
            padding-top: 1.5rem;
            border-top: 1px solid var(--medium-gray);
        }

        .page-nav a {
            display: flex;
            flex-direction: column;
            gap: 0.2rem;
            max-width: 48%;
            padding: 0.8rem 1rem;
            border: 1px solid var(--medium-gray);
            border-radius: 6px;
            text-decoration: none;
            color: #d0d0d0;
            transition: border-color 0.2s ease;
        }

        .page-nav a:hover {
            border-color: var(--accent);
        }

        .page-nav a.next {
            margin-left: auto;
            text-align: right;
            align-items: flex-end;
        }

        .page-nav .pn-label {
            font-size: 0.72rem;
            text-transform: uppercase;
            letter-spacing: 0.1em;
            color: #7a7a7a;
        }

        .page-nav .pn-title {
            font-weight: 600;
            color: #fff;
        }

        /* Flash highlight after search jump */
        @keyframes flashbg {
            0%, 100% { background: transparent; }
            12% { background: rgba(255, 107, 0, 0.22); }
        }

        .flash {
            animation: flashbg 1.9s ease;
            border-radius: 4px;
        }

        /* Footer */
        footer {
            background: var(--dark-gray);
            padding: 4rem 2rem 2rem;
            margin-top: 4rem;
            border-top: 2px solid var(--accent);
        }

        .footer-content {
            max-width: 1400px;
            margin: 0 auto 3rem;
            display: grid;
            grid-template-columns: 2fr 1fr 1fr 1fr;
            gap: 3rem;
        }

        .footer-brand {
            display: flex;
            flex-direction: column;
            gap: 1.25rem;
        }

        .footer-logo-container {
            display: flex;
            align-items: center;
            gap: 1.25rem;
        }

        .footer-logo-icon {
            width: 56px;
            height: 56px;
            background: var(--accent);
            border-radius: 8px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 1.3rem;
            font-weight: 700;
            color: var(--black);
        }

        .footer-logo-text {
            font-size: 1.5rem;
            font-weight: 700;
            text-transform: uppercase;
            color: var(--accent);
            letter-spacing: 0.18em;
            line-height: 1;
        }

        .footer-text {
            color: #999;
            font-size: 1rem;
            line-height: 1.7;
        }

        .footer-social {
            display: flex;
            gap: 1rem;
        }

        .footer-social a {
            width: 44px;
            height: 44px;
            border-radius: 8px;
            background: var(--medium-gray);
            border: 2px solid var(--light-gray);
            display: flex;
            align-items: center;
            justify-content: center;
            color: #fff;
            font-size: 1.25rem;
            transition: all 0.2s ease;
        }

        .footer-social a:hover {
            background: var(--accent);
            border-color: var(--accent);
            color: var(--black);
        }

        .footer-section-title {
            font-size: 0.95rem;
            font-weight: 700;
            text-transform: uppercase;
            color: var(--accent);
            letter-spacing: 0.1em;
            margin-bottom: 1.25rem;
        }

        .footer-links {
            list-style: none;
            display: flex;
            flex-direction: column;
            gap: 0.9rem;
        }

        .footer-links a {
            color: #ccc;
            text-decoration: none;
            display: flex;
            align-items: center;
            gap: 0.8rem;
            font-size: 1rem;
            transition: color 0.2s ease;
        }

        .footer-links a i {
            color: var(--accent);
            min-width: 20px;
        }

        .footer-links a:hover {
            color: var(--accent);
        }

        .footer-bottom {
            max-width: 1400px;
            margin: 0 auto;
            padding-top: 2rem;
            border-top: 1px solid var(--light-gray);
            display: flex;
            justify-content: space-between;
            align-items: center;
            gap: 1rem;
            color: #777;
            font-size: 0.9rem;
        }

        .footer-bottom a {
            color: #999;
            text-decoration: none;
        }

        .footer-bottom a:hover {
            color: var(--accent);
        }

        /* Responsive */
        @media (max-width: 1000px) {
            .shell {
                grid-template-columns: 1fr;
                gap: 0;
            }

            .tree-mobile-toggle {
                display: flex;
                align-items: center;
                gap: 0.6rem;
                width: 100%;
                margin-top: 0.25rem;
                background: var(--dark-gray);
                border: 1px solid var(--medium-gray);
                border-radius: 4px;
                padding: 0.8rem 1rem;
                color: #fff;
                font-weight: 600;
                text-transform: uppercase;
                letter-spacing: 0.06em;
                font-size: 0.85rem;
                cursor: pointer;
            }

            .tree-mobile-toggle .chev {
                margin-left: auto;
                transition: transform 0.2s ease;
            }

            .tree-mobile-toggle[aria-expanded="true"] .chev {
                transform: rotate(180deg);
            }

            .tree {
                position: static;
                max-height: none;
                overflow: visible;
                padding: 0.75rem 0 1.25rem;
                border-bottom: 1px solid var(--medium-gray);
            }

            .tree-title {
                display: none;
            }

            .tree-body[hidden] {
                display: none;
            }

            .content {
                padding-top: 2rem;
            }
        }

        @media (max-width: 768px) {
            .nav-links {
                position: absolute;
                top: 100%;
                left: 0;
                width: 100%;
                background: var(--black);
                flex-direction: column;
                gap: 0;
                max-height: 0;
                overflow: hidden;
                visibility: hidden;
                transition: max-height 0.3s ease;
                border-top: 2px solid var(--accent);
            }

            .nav-links.active {
                max-height: 300px;
                visibility: visible;
            }

            .nav-links a {
                padding: 1.1rem 2rem;
                border-bottom: 1px solid var(--medium-gray);
            }

            .menu-toggle {
                display: flex;
            }

            .footer-content {
                grid-template-columns: 1fr 1fr;
                gap: 2rem;
            }

            .footer-brand {
                grid-column: 1 / -1;
            }

            .footer-bottom {
                flex-direction: column;
                text-align: center;
            }

            .page-nav {
                flex-direction: column;
            }

            .page-nav a,
            .page-nav a.next {
                max-width: 100%;
                text-align: left;
                align-items: flex-start;
            }
        }

        @media (max-width: 480px) {
            .footer-content {
                grid-template-columns: 1fr;
            }
        }

        @media (prefers-reduced-motion: reduce) {
            * {
                scroll-behavior: auto !important;
            }
        }
