
        :root {
            --bg-main: #0B0F19;
            --bg-card: #161B26;
            --bg-card-hover: #1E2638;
            --accent: #38BDF8;
            --accent-2: #818CF8;
            --accent-hover: #0EA5E9;
            --brand-green: #3DDC84; /* PassRight logo green */
            --brand-gold: #F5C247; /* PassRight logo gold */
            --brand-red: #FF0004; /* PassRight logo red */
            --fb-color: #1877F2;
            --fb-hover: #166FE5;
            --text-main: #F3F4F6;
            --text-muted: #9CA3AF;
            --text-faint: #6B7280;
            --border: rgba(255, 255, 255, 0.07);
            --border-soft: rgba(255, 255, 255, 0.04);
            --border-radius: 16px;
            --border-radius-sm: 10px;
            --shadow-soft: 0 20px 40px rgba(0, 0, 0, 0.35);
            --transition: all 0.2s ease-in-out;
        }

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

        html {
            scroll-behavior: smooth;
        }

        body {
            font-family: 'Inter', sans-serif;
            background-color: var(--bg-main);
            background-image:
                radial-gradient(ellipse 800px 500px at 15% -10%, rgba(56, 189, 248, 0.12), transparent 60%),
                radial-gradient(ellipse 700px 500px at 85% 5%, rgba(129, 140, 248, 0.10), transparent 60%);
            background-repeat: no-repeat;
            color: var(--text-main);
            line-height: 1.6;
            -webkit-font-smoothing: antialiased;
        }

        img {
            max-width: 100%;
        }

        ::selection {
            background: rgba(56, 189, 248, 0.3);
            color: var(--text-main);
        }

        header {
            position: sticky;
            top: 0;
            width: 100%;
            z-index: 9999;
            background: rgba(11, 15, 25, 0.95);
            border-bottom: 1px solid rgba(255, 255, 255, 0.05);
            padding: 1rem 1.25rem;
        }

        .nav-container {
            max-width: 1200px;
            margin: 0 auto;
            display: flex;
            align-items: center;
            justify-content: space-between;
            flex-wrap: wrap;
        }

        .logo {
            font-weight: 800;
            font-size: 1.3rem;
            letter-spacing: -0.5px;
            color: var(--text-main);
            text-decoration: none;
            display: inline-flex;
            align-items: center;
            gap: 8px;
        }

        .logo span {
            color: #FF0004;
        }

        .mobile-toggle {
            position: relative;
            width: 28px;
            height: 20px;
            background: none;
            border: none;
            padding: 0;
            cursor: pointer;
            flex-shrink: 0;
            z-index: 10001;
        }

        .mobile-toggle span {
            position: absolute;
            left: 0;
            width: 100%;
            height: 2px;
            background-color: var(--text-main);
            border-radius: 2px;
            transition: all 0.3s ease;
        }

        .mobile-toggle span:nth-child(1) { top: 0; }
        .mobile-toggle span:nth-child(2) { top: 9px; }
        .mobile-toggle span:nth-child(3) { top: 18px; }

        .mobile-toggle.open span:nth-child(1) {
            top: 9px;
            transform: rotate(45deg);
            background-color: var(--brand-gold);
        }

        .mobile-toggle.open span:nth-child(2) {
            opacity: 0;
        }

        .mobile-toggle.open span:nth-child(3) {
            top: 9px;
            transform: rotate(-45deg);
            background-color: var(--brand-gold);
        }

        @media (min-width: 850px) {
            .mobile-toggle { display: none; }
        }

        .nav-links {
            display: none;
            width: 100%;
            flex-direction: column;
            gap: 1rem;
            margin-top: 1rem;
            padding-top: 1rem;
            border-top: 1px solid rgba(255, 255, 255, 0.05);
        }

        .nav-links.open { display: flex; }

        .nav-links a {
            color: var(--text-muted);
            text-decoration: none;
            font-size: 0.95rem;
            font-weight: 600;
            transition: var(--transition);
            padding: 0.4rem 0;
        }

        .nav-links a:hover { color: var(--brand-gold); }

        @media (min-width: 850px) {
            .nav-links {
                display: flex !important;
                width: auto;
                flex-direction: row;
                gap: 1.5rem;
                margin-top: 0;
                padding-top: 0;
                border-top: none;
                align-items: center;
            }
            .nav-links a { font-size: 0.9rem; }
        }

        /* Full-screen mobile dropdown overlay, styled after taariqfaker.co.za's nav */
        @media (max-width: 849px) {
            .nav-links.open {
                position: fixed;
                inset: 0;
                width: 100%;
                height: 100vh;
                margin: 0;
                padding: 2rem;
                border-top: none;
                background: rgba(11, 15, 25, 0.98);
                backdrop-filter: blur(12px);
                -webkit-backdrop-filter: blur(12px);
                justify-content: center;
                align-items: center;
                gap: 1.75rem;
                z-index: 10000;
                overflow-y: auto;
            }

            .nav-links.open a {
                display: flex;
                align-items: center;
                gap: 1rem;
                padding: 0;
                color: var(--text-muted);
                font-family: 'JetBrains Mono', SFMono-Regular, Consolas, monospace;
                font-size: 1.1rem;
                font-weight: 500;
                letter-spacing: 1.5px;
                text-transform: uppercase;
            }

            .nav-links.open a .dash {
                display: block;
                width: 32px;
                height: 2px;
                background: currentColor;
                transition: width 0.3s ease, background-color 0.3s ease;
            }

            .nav-links.open a:hover,
            .nav-links.open a:focus-visible {
                color: var(--brand-gold);
            }

            .nav-links.open a:hover .dash,
            .nav-links.open a:focus-visible .dash {
                width: 56px;
            }
        }

        .download-dropdown {
            position: relative;
            display: inline-block;
        }

        .btn-download {
            background-color: var(--bg-card);
            color: var(--text-main);
            padding: 0.5rem 1rem;
            border-radius: 100px;
            border: 1px solid rgba(255, 255, 255, 0.1);
            font-size: 0.85rem;
            font-weight: 600;
            cursor: pointer;
            transition: var(--transition);
            display: inline-flex;
            align-items: center;
            gap: 6px;
        }

        .btn-download span {
            color: var(--brand-gold);
        }

        .btn-download:hover, .download-dropdown.active .btn-download {
            border-color: var(--brand-gold);
            box-shadow: 0 0 15px rgba(245, 194, 71, 0.2);
        }

        .dropdown-menu {
            position: absolute;
            left: 0;
            top: calc(100% + 10px);
            width: 280px;
            max-height: 380px;
            overflow-y: auto;
            background-color: var(--bg-card);
            border: 1px solid rgba(255, 255, 255, 0.1);
            border-radius: var(--border-radius);
            box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
            padding: 0.5rem;
            display: flex;
            flex-direction: column;
            gap: 2px;
            opacity: 0;
            visibility: hidden;
            transform: translateY(-8px);
            transition: all 0.2s ease-in-out;
            z-index: 10000;
        }

        @media (min-width: 850px) {
            .dropdown-menu { left: auto; right: 0; }
        }

        .download-dropdown.active .dropdown-menu {
            opacity: 1;
            visibility: visible;
            transform: translateY(0);
        }

        .dropdown-menu a {
            color: var(--text-main) !important;
            padding: 0.65rem 0.9rem;
            font-size: 0.85rem !important;
            font-weight: 500 !important;
            border-radius: 8px;
            transition: var(--transition);
            display: block;
            text-decoration: none;
        }

        .dropdown-menu a:hover {
            background-color: rgba(245, 194, 71, 0.12);
            color: var(--brand-gold) !important;
        }

        .content-container {
            max-width: 1800px;
            margin: 2rem auto 4rem;
            padding: 0 1.25rem;
            display: grid;
            grid-template-columns: 1fr;
            gap: 2rem;
        }

        @media (min-width: 992px) {
            .content-container { grid-template-columns: 280px 1fr 280px; }
        }

        .sidebar {
            display: flex;
            flex-direction: column;
            gap: 1.5rem;
        }

        .sidebar-card {
            background-color: var(--bg-card);
            border: 1px solid rgba(255, 255, 255, 0.05);
            border-radius: var(--border-radius);
            padding: 1.25rem;
            text-align: center;
        }

        .sidebar-card h5 {
            font-size: 1.05rem;
            font-weight: 800;
            margin-bottom: 1rem;
            text-transform: uppercase;
        }

        .sidebar-card img {
            max-width: 100%;
            height: auto;
            border-radius: 10px;
            transition: var(--transition);
        }

        .sidebar-card img:hover { transform: scale(1.02); }

        .aside-nav-list {
            list-style: none;
            display: flex;
            flex-direction: column;
            gap: 0.5rem;
            text-align: left;
        }

        .aside-nav-list a {
            color: var(--text-muted);
            text-decoration: none;
            font-size: 0.9rem;
            font-weight: 600;
            padding: 0.6rem 0.8rem;
            border-radius: 8px;
            display: block;
            transition: var(--transition);
            background: rgba(255, 255, 255, 0.02);
        }

        .aside-nav-list a:hover {
            background-color: rgba(245, 194, 71, 0.1);
            color: var(--brand-gold);
        }

        .main-content {
            background-color: #ffffff;
            color: #000000;
            border: 1px solid rgba(255, 255, 255, 0.05);
            border-radius: var(--border-radius);
            padding: 1.75rem 1.5rem;
        }

        @media (min-width: 768px) {
            .main-content { padding: 2.5rem; }
        }

        .page-badge {
            display: inline-block;
            background: rgba(125, 46, 92, 0.5);
            color: #ffffff;
            font-weight: 700;
            font-size: 0.8rem;
            padding: 0.35rem 0.9rem;
            border-radius: 100px;
            margin-bottom: 1rem;
            text-transform: uppercase;
            border: 1px solid #7D2E5C;
        }

        .page-title {
            font-size: clamp(1.8rem, 4vw, 2.4rem);
            font-weight: 900;
            margin-bottom: 1.5rem;
            line-height: 1.2;
        }

        .page-title span {
            color: var(--brand-red);
            -webkit-text-stroke: 0.5px rgba(0, 0, 0, 0.55);
            paint-order: stroke fill;
        }

        .content-body p {
            color: #000000;
            font-size: 1rem;
            margin-bottom: 1.25rem;
            line-height: 1.7;
        }

        .content-body strong {
            color: #000000;
            font-weight: 700;
        }

        .callout-box {
            position: relative;
            background: rgba(56, 189, 248, 0.04);
            border-radius: 8px;
            padding: 1.25rem;
            margin: 1.5rem 0;
            overflow: hidden;
        }

        .callout-box::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            width: 4px;
            height: 100%;
            background: linear-gradient(to bottom, #FF00FF, #ffffff);
        }

        .callout-box h4 {
            color: var(--brand-red);
            font-size: 1.1rem;
            font-weight: 800;
            margin-bottom: 0.75rem;
            text-transform: uppercase;
        }

        .system-list {
            list-style: none;
            display: flex;
            flex-direction: column;
            gap: 0.75rem;
            margin-top: 0.5rem;
        }

        .system-list li {
            position: relative;
            padding-left: 1.5rem;
            color: #000000;
            font-weight: 600;
        }

        .system-list li::before {
            content: "•";
            color: var(--brand-red);
            font-size: 1.5rem;
            position: absolute;
            left: 0;
            top: -4px;
        }

        .content-illustration {
            display: block;
            width: 50%;
            height: auto;
            border-radius: var(--border-radius);
            border: 1px solid rgba(255, 255, 255, 0.08);
            margin: 2rem auto 1rem;


        }   .content-illustration1 {
            display: block;
            width: 90%;
            height: auto;
            border-radius: var(--border-radius);
            border: 1px solid rgba(255, 255, 255, 0.08);
            margin: 2rem auto 1rem;
        }

        .video-wrapper {
            position: relative;
            padding-bottom: 56.25%;
            height: 0;
            border-radius: var(--border-radius);
            overflow: hidden;
            border: 1px solid rgba(255, 255, 255, 0.08);
            margin: 2rem 0 1rem;
            background: var(--bg-main);
        }

        .video-wrapper iframe {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
        }

        .pagination-container {
            display: flex;
            justify-content: center;
            align-items: center;
            margin: 0 auto 3rem;
            width: 100%;
            max-width: 1200px;
        }

        .pagination {
            display: inline-flex;
            align-items: center;
            gap: 0.5rem;
            background-color: var(--bg-card);
            padding: 0.5rem 0.75rem;
            border-radius: 100px;
            border: 1px solid rgba(255, 255, 255, 0.08);
            box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
        }

        .pagination a {
            color: var(--text-muted);
            text-decoration: none;
            font-weight: 700;
            font-size: 0.9rem;
            min-width: 40px;
            height: 40px;
            display: flex;
            align-items: center;
            justify-content: center;
            border-radius: 50%;
            transition: var(--transition);
        }

        .pagination a[aria-label="Previous Page"],
        .pagination a[aria-label="Next Page"] {
            color: var(--brand-gold);
        }

        .pagination a:hover {
            color: var(--text-main);
            background-color: rgba(255, 255, 255, 0.05);
        }

        .pagination a.active {
            background-color: var(--brand-gold);
            color: var(--bg-main);
            box-shadow: 0 0 15px rgba(245, 194, 71, 0.4);
        }

        .pagination a.disabled {
            opacity: 0.3;
            cursor: not-allowed;
            pointer-events: none;
        }

        .facebook-community-section {
            max-width: 1200px;
            margin: 0 auto 2rem;
            padding: 2.5rem 1.5rem;
            background-color: var(--bg-card);
            border: 1px solid rgba(255, 255, 255, 0.05);
            border-radius: var(--border-radius);
            text-align: center;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            gap: 1.5rem;
        }

        .facebook-community-section h3 {
            font-size: 1.2rem;
            font-weight: 800;
            color: var(--text-main);
            text-transform: uppercase;
        }

        .facebook-buttons-wrapper {
            display: flex;
            flex-wrap: wrap;
            align-items: center;
            justify-content: center;
            gap: 1rem;
        }

        .btn-fb {
            display: inline-flex;
            align-items: center;
            gap: 8px;
            background-color: var(--fb-color);
            color: #ffffff;
            font-weight: 600;
            font-size: 0.9rem;
            padding: 0.65rem 1.4rem;
            border-radius: 100px;
            text-decoration: none;
            transition: var(--transition);
        }

        .btn-fb:hover {
            background-color: var(--fb-hover);
            transform: translateY(-2px);
        }

        .btn-fb svg {
            width: 18px;
            height: 18px;
            fill: currentColor;
        }

        footer {
            border-top: 1px solid rgba(255, 255, 255, 0.05);
            padding: 3rem 1.5rem;
            text-align: center;
            font-size: 0.85rem;
            color: var(--text-muted);
        }

        footer a { color: var(--brand-gold); text-decoration: none; }

        #backToTop {
            position: fixed;
            bottom: 2rem;
            right: 2rem;
            width: 48px;
            height: 48px;
            background-color: var(--bg-card);
            color: var(--brand-gold);
            border: 1px solid rgba(245, 194, 71, 0.3);
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            opacity: 0;
            visibility: hidden;
            transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.2s ease;
            z-index: 9998;
        }

        #backToTop.show { opacity: 1; visibility: visible; }
        #backToTop svg { width: 22px; height: 22px; fill: currentColor; }

        .quiz-instruction {
            font-size: 0.85rem;
            font-weight: 700;
            color: var(--brand-gold);
            text-transform: uppercase;
            letter-spacing: 0.5px;
            margin-bottom: 1rem;
        }

        .quiz-question {
            font-size: 1.15rem;
            font-weight: 800;
            color: #000000;
            margin-bottom: 1rem;
            line-height: 1.5;
        }

        .quiz-options {
            list-style: none;
            display: flex;
            flex-direction: column;
            gap: 0.75rem;
            margin: 1rem 0 0.5rem;
        }

        .quiz-options li {
            display: flex;
            align-items: center;
            gap: 0.75rem;
            padding: 0.85rem 1rem;
            border-radius: 10px;
            border: 1px solid rgba(0, 0, 0, 0.1);
            background: rgba(0, 0, 0, 0.02);
            font-weight: 600;
            color: #000000;
            cursor: pointer;
            transition: var(--transition);
        }

        .quiz-options li .quiz-letter {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            width: 28px;
            height: 28px;
            border-radius: 50%;
            background: var(--bg-card);
            color: var(--text-main);
            font-weight: 800;
            font-size: 0.85rem;
            flex-shrink: 0;
        }

        .quiz-options .quiz-tag {
            display: none;
            margin-left: auto;
            font-size: 0.7rem;
            font-weight: 800;
            text-transform: uppercase;
            letter-spacing: 0.5px;
            color: var(--brand-green);
        }

        .quiz-options.revealed li {
            cursor: default;
        }

        .quiz-options.revealed li.correct {
            border-color: var(--brand-green);
            background: rgba(61, 220, 132, 0.12);
        }

        .quiz-options.revealed li.correct .quiz-letter {
            background: var(--brand-green);
            color: var(--bg-main);
        }

        .quiz-options.revealed li.correct .quiz-tag {
            display: inline;
        }

        .quiz-options.revealed li.selected.incorrect {
            border-color: var(--brand-red);
            background: rgba(255, 0, 4, 0.08);
        }

        .quiz-options.revealed li.selected.incorrect .quiz-letter {
            background: var(--brand-red);
            color: #ffffff;
        }
    
/* ------------------------------------------------------------------
   Module themes.
   Each content page carries one of these classes on <body>; the rules
   below override the defaults baked into the base above.
   ------------------------------------------------------------------ */

/* Examination */
.m-exam .page-badge {
    background: rgba(125, 46, 92, 0.5);
    color: #ffffff;
    border: 1px solid #7D2E5C;
}
.m-exam .callout-box::before {
    background: linear-gradient(to bottom, #FF00FF, #ffffff);
}

/* Warning signs */
.m-warn .page-badge {
    background: rgba(255, 0, 4, 0.6);
    color: #000000;
    border: 1px solid var(--brand-red);
}
.m-warn .callout-box::before {
    background: linear-gradient(to bottom, var(--brand-red), transparent);
}

/* Regulatory signs */
.m-reg .page-badge {
    background: rgba(56, 189, 248, 0.5);
    color: #ffffff;
    border: 1px solid var(--accent);
}
.m-reg .callout-box::before {
    background: linear-gradient(to bottom, var(--accent), #ffffff);
}

/* Rules of the road */
.m-rules .page-badge {
    background: #000000;
    color: #ffffff;
    border: 1px solid #ffffff;
}
.m-rules .callout-box::before {
    background: linear-gradient(to bottom, #000000, #ffffff);
}

/* Driver safety */
.m-safety .page-badge {
    background: rgba(61, 220, 132, 0.5);
    color: #000000;
    border: 1px solid var(--brand-green);
}
.m-safety .callout-box::before {
    background: linear-gradient(to bottom, var(--brand-red), transparent);
}

/* Centres images inside callout boxes. Applied to rules pg32-pg54 only,
   matching the previous per-page rule. */
.center-callout-img .callout-box img {
    display: block;
    margin: 1rem auto 0;
}