/* ==========================================================================
   California DMV Traffic School — Main Styles
   Built on the California Design System (designsystem.webstandards.ca.gov)
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');

/* ==========================================================================
   1. Design Tokens — California Design System
   ========================================================================== */

:root {
    /* --- Primary (CA.gov theme) --- */
    --primary-100: #dff4fe;
    --primary-300: #64c7fa;
    --primary-500: #0077c8;
    --primary-700: #0b669e;
    --primary-900: #163159;

    /* --- Accent 1 (orange) --- */
    --accent1-100: #ffead6;
    --accent1-300: #ffa656;
    --accent1-500: #de6516;
    --accent1-700: #9c4510;
    --accent1-900: #642a0a;

    /* --- Accent 2 (gold) --- */
    --accent2-100: #ffecc4;
    --accent2-300: #ecb32d;
    --accent2-500: #ac8227;
    --accent2-700: #775a20;
    --accent2-900: #4a3918;

    /* --- CA.gov brand --- */
    --cagov-highlight: #ffd457;       /* DMV focus/accent yellow */
    --cagov-primary: #0077c8;         /* DMV primary blue */
    --cagov-primary-dark: #0b669e;    /* DMV teal blue */
    --cagov-secondary: #ff8000;

    /* --- Grayscale --- */
    --white: #ffffff;
    --gray-50: #fafcfe;
    --gray-100: #f3f7fb;
    --gray-200: #d6dade;
    --gray-300: #d3d8dd;
    --gray-400: #949494;
    --gray-500: #7e8993;
    --gray-600: #5d6c7a;
    --gray-700: #5d6c7a;
    --gray-800: #394655;
    --gray-900: #394655;
    --black: #000000;

    /* --- System status — Success --- */
    --success-100: #e5f1e7;
    --success-300: #9ac7a4;
    --success-500: #489b62;
    --success-700: #0f6d38;
    --success-900: #154425;

    /* --- System status — Danger --- */
    --danger-100: #fce9e8;
    --danger-300: #eeaba9;
    --danger-500: #d5676a;
    --danger-700: #b91b37;
    --danger-900: #721923;

    /* --- System status — Warning --- */
    --warning-100: #ffef97;
    --warning-300: #dcba00;
    --warning-500: #a38900;
    --warning-700: #6f5e00;
    --warning-900: #463b00;

    /* --- System status — Info --- */
    --info-100: #ededf6;
    --info-300: #b9b9dc;
    --info-500: #8585c2;
    --info-700: #5555aa;
    --info-900: #2b2b95;

    /* --- Spacing (8px grid) --- */
    --s-sm: 0.25rem;   /* 4px */
    --s-1: 0.5rem;     /* 8px */
    --s-2: 1rem;       /* 16px */
    --s-3: 1.5rem;     /* 24px */
    --s-4: 2rem;       /* 32px */
    --s-5: 3rem;       /* 48px */
    --s-6: 4rem;       /* 64px */
    --s-7: 6rem;       /* 96px */

    /* --- Container widths --- */
    --w-lg: 1176px;
    --w-md: 960px;
    --w-sm: 720px;
    --w-page-content: 876px;

    /* --- Border radius --- */
    --radius-1: 2px;
    --radius-2: 4px;
    --radius-3: 0.5rem;
    --radius-round: 50%;

    /* --- Border widths --- */
    --border-1: 1px;
    --border-2: 2px;
    --border-4: 4px;

    /* --- Typography --- */
    --site-font: 'Inter', system-ui, -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", "Noto Sans", "Liberation Sans", Arial, sans-serif;
    --heading-font: 'Inter', system-ui, -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", "Noto Sans", "Liberation Sans", Arial, sans-serif;
    --font-mono: ui-monospace, "SF Mono", "Cascadia Mono", "Consolas", "Liberation Mono", monospace;

    --font-size-xs: 0.75rem;
    --font-size-sm: 0.875rem;
    --font-size-1: 1rem;
    --font-size-2: 1.125rem;
    --font-size-3: 1.25rem;
    --font-size-4: 1.4375rem;
    --font-size-5: 1.625rem;
    --font-size-6: 1.8125rem;
    --font-size-7: 2.0625rem;
    --font-size-8: 2.3175rem;
    --font-size-9: 2.625rem;
    --font-size-10: 2.9375rem;

    --font-weight-4: 400;
    --font-weight-5: 500;
    --font-weight-6: 600;
    --font-weight-7: 700;

    --font-lineheight-1: 1.25;
    --font-lineheight-2: 1.375;
    --font-lineheight-3: 1.5;
    --font-lineheight-4: 1.625;
    --font-lineheight-5: 1.75;

    /* --- Focus ring (CA gold) --- */
    --focus-color: var(--cagov-highlight);
    --focus-width: 2px;
    --focus-offset: 2px;

    /* --- Component tokens (CA Design System) --- */
    --btn-padding-y: 0.5rem;
    --btn-padding-x: 1.25rem;
    --card-padding: 1.5rem;
    --card-border: var(--border-1) solid var(--gray-200);
    --input-padding-y: 0.5rem;
    --input-padding-x: 0.75rem;
    --input-border: var(--border-1) solid var(--gray-500);
    --table-cell-padding: 0.75rem 1rem;

    /* --- Heading sizes (CA Design System scale) --- */
    --h1-size: 2.625rem;    /* 42px mobile */
    --h1-size-lg: 2.9375rem;/* 47px desktop */
    --h2-size: 2.3125rem;   /* 37px */
    --h3-size: 1.8125rem;   /* 29px */
    --h4-size: 1.4375rem;   /* 23px */
    --h5-size: 1.125rem;    /* 18px */

    /* ----------------------------------------------------------------------
       Legacy --dmv-* aliases — keep so existing rules continue to resolve.
       ---------------------------------------------------------------------- */
    --dmv-navy: var(--primary-900);
    --dmv-navy-dark: var(--cagov-primary-dark);
    --dmv-blue: var(--primary-700);
    --dmv-blue-dark: var(--primary-900);
    --dmv-white: var(--white);
    --dmv-gray-lightest: var(--gray-50);
    --dmv-gray-light: var(--gray-100);
    --dmv-gray: var(--gray-200);
    --dmv-gray-dark: var(--gray-600);
    --dmv-text: var(--gray-900);
    --dmv-text-light: var(--gray-700);
    --dmv-success: var(--success-700);
    --dmv-warning: var(--accent1-700);
    --dmv-error: var(--danger-700);
    --dmv-info-bg: var(--primary-100);
    --dmv-warning-bg: var(--accent1-100);
    --dmv-success-bg: var(--success-100);
    --dmv-error-bg: var(--danger-100);
    --dmv-font: var(--site-font);
    --dmv-radius: var(--radius-2);
    --dmv-max-width: var(--w-lg);
    --dmv-content-width: var(--w-page-content);
}

/* ==========================================================================
   2. Reset & Base
   ========================================================================== */

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

html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body {
    font-family: var(--site-font);
    font-size: 1.125rem;
    font-weight: var(--font-weight-4);
    line-height: var(--font-lineheight-3);
    color: var(--gray-900);
    background: var(--white);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img,
svg,
video {
    max-width: 100%;
    height: auto;
}

button {
    font-family: inherit;
}

/* ==========================================================================
   3. Typography
   ========================================================================== */

h1, h2, h3, h4, h5, h6 {
    font-family: var(--site-font);
    color: var(--primary-900);
    font-weight: var(--font-weight-7);
    margin: 0 0 var(--s-2);
}

h1 {
    font-size: var(--h1-size);
    line-height: var(--font-lineheight-1);
}

h2 {
    font-size: var(--h2-size);
    line-height: var(--font-lineheight-2);
}

h3 {
    font-size: var(--h3-size);
    line-height: var(--font-lineheight-2);
}

h4 {
    font-size: var(--h4-size);
    line-height: var(--font-lineheight-3);
}

h5 {
    font-size: var(--h5-size);
    line-height: var(--font-lineheight-3);
}

@media (min-width: 768px) {
    h1 { font-size: var(--h1-size-lg); }
}

p {
    margin: 0 0 var(--s-2);
    line-height: var(--font-lineheight-3);
}

ul, ol {
    margin: 0 0 var(--s-2);
    padding-left: var(--s-3);
}

li {
    margin-bottom: var(--s-sm);
    line-height: var(--font-lineheight-3);
}

strong, b {
    font-weight: var(--font-weight-7);
}

a {
    color: var(--primary-700);
    text-decoration: underline;
    text-underline-offset: 2px;
}

a:hover {
    color: var(--primary-900);
    text-decoration: underline;
}

a:focus-visible {
    outline: var(--focus-width) solid var(--focus-color);
    outline-offset: var(--focus-offset);
    border-radius: var(--radius-1);
}

/* ==========================================================================
   4. CA.gov Utility Bar
   ========================================================================== */

.ca-utility-bar {
    background: var(--primary-900);
    color: var(--white);
    padding: var(--s-1) var(--s-4);
    font-size: var(--font-size-sm);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ca-utility-bar .ca-branding {
    display: flex;
    align-items: center;
    gap: var(--s-1);
    font-weight: var(--font-weight-6);
}

.ca-utility-bar .ca-branding .ca-bear {
    font-size: 1.2rem;
}

.ca-utility-bar .utility-links {
    display: flex;
    gap: var(--s-3);
}

.ca-utility-bar .utility-links a {
    color: rgba(255, 255, 255, 0.92);
    text-decoration: none;
    font-size: var(--font-size-sm);
}

.ca-utility-bar .utility-links a:hover {
    color: var(--white);
    text-decoration: underline;
}

/* ==========================================================================
   5. Site Header
   ========================================================================== */

.site-header {
    background: var(--white);
    padding: var(--s-2) var(--s-4);
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: var(--border-1) solid var(--gray-200);
    position: sticky;
    top: 0;
    z-index: 100;
}

.site-header .site-identity {
    display: flex;
    align-items: center;
    gap: var(--s-2);
}

.site-header .site-identity .site-logo-badge {
    width: 44px;
    height: 44px;
    background: var(--primary-900);
    border-radius: var(--radius-2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 1.125rem;
    font-weight: var(--font-weight-7);
    flex-shrink: 0;
}

.site-header .site-identity .site-name {
    font-size: 1.125rem;
    font-weight: var(--font-weight-7);
    color: var(--primary-900);
    line-height: 1.2;
}

.site-header .site-identity .site-name small {
    display: block;
    font-size: 0.75rem;
    font-weight: var(--font-weight-5);
    color: var(--gray-700);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.site-header .site-nav {
    display: flex;
    align-items: center;
    gap: var(--s-3);
}

.site-header .site-nav a {
    color: var(--primary-900);
    text-decoration: none;
    font-size: 1rem;
    font-weight: var(--font-weight-6);
    padding: var(--s-1) 0;
    border-bottom: var(--border-2) solid transparent;
}

.site-header .site-nav a:hover {
    border-bottom-color: var(--primary-700);
    color: var(--primary-700);
    text-decoration: none;
}

.site-header .header-auth-btn {
    background: var(--primary-700);
    color: var(--white);
    border: var(--border-2) solid var(--primary-700);
    padding: var(--btn-padding-y) var(--btn-padding-x);
    border-radius: var(--radius-2);
    font-size: 1rem;
    font-weight: var(--font-weight-7);
    cursor: pointer;
    font-family: var(--site-font);
    transition: background-color 0.15s ease, border-color 0.15s ease;
}

.site-header .header-auth-btn:hover {
    background: var(--primary-900);
    border-color: var(--primary-900);
}

/* ==========================================================================
   6. Breadcrumb Bar
   ========================================================================== */

.breadcrumb-bar {
    background: var(--gray-50);
    padding: var(--s-1) var(--s-4);
    font-size: var(--font-size-sm);
    color: var(--gray-700);
    border-bottom: var(--border-1) solid var(--gray-200);
}

.breadcrumb-bar a {
    color: var(--primary-700);
    text-decoration: underline;
}

.breadcrumb-bar a:hover {
    color: var(--primary-900);
    text-decoration: underline;
}

.breadcrumb-bar .separator {
    margin: 0 var(--s-1);
    color: var(--gray-500);
    text-decoration: none;
}

/* ==========================================================================
   7. Trust Badges Bar
   ========================================================================== */

.trust-badges-bar {
    background: var(--gray-50);
    border-bottom: var(--border-1) solid var(--gray-200);
    padding: var(--s-2) var(--s-4);
}

.trust-badges-bar .badges-inner {
    max-width: var(--w-lg);
    margin: 0 auto;
    display: flex;
    justify-content: center;
    gap: var(--s-4);
    flex-wrap: wrap;
}

.trust-badge-item {
    display: flex;
    align-items: center;
    gap: var(--s-1);
    font-size: var(--font-size-sm);
    color: var(--gray-900);
    font-weight: var(--font-weight-6);
}

.trust-badge-item .badge-icon {
    font-size: 1rem;
    color: var(--primary-700);
    flex-shrink: 0;
}

/* ==========================================================================
   8. Hero / Landing Section
   ========================================================================== */

.hero {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: var(--s-5) var(--s-4);
    background: var(--white);
    color: var(--gray-900);
    border-bottom: var(--border-1) solid var(--gray-200);
    border-top: var(--border-4) solid var(--primary-900);
}

.hero h1 {
    color: var(--primary-900);
    margin-bottom: var(--s-2);
}

.hero-content {
    max-width: var(--w-page-content);
    width: 100%;
}

.badge {
    display: inline-block;
    background: var(--primary-100);
    border: var(--border-1) solid var(--primary-700);
    padding: var(--s-sm) var(--s-2);
    border-radius: var(--radius-2);
    color: var(--primary-900);
    font-weight: var(--font-weight-7);
    font-size: var(--font-size-sm);
    letter-spacing: 0.5px;
    text-transform: uppercase;
    margin-bottom: var(--s-3);
}

.highlight {
    color: var(--primary-700);
}

.subtitle {
    font-size: 1.25rem;
    color: var(--gray-800);
    margin: 0 auto var(--s-3);
    line-height: var(--font-lineheight-4);
    max-width: 720px;
    font-weight: var(--font-weight-4);
}

/* ==========================================================================
   9. Buttons (CTA)
   ========================================================================== */

.cta-container {
    display: flex;
    gap: var(--s-2);
    justify-content: center;
    flex-wrap: wrap;
    margin-top: var(--s-3);
}

.cta-button {
    padding: var(--btn-padding-y) var(--btn-padding-x);
    font-size: 1rem;
    font-weight: var(--font-weight-7);
    font-family: var(--site-font);
    line-height: var(--font-lineheight-3);
    border: var(--border-2) solid transparent;
    border-radius: var(--radius-2);
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.cta-button:hover {
    text-decoration: none;
}

.cta-button:focus-visible {
    outline: var(--focus-width) solid var(--focus-color);
    outline-offset: var(--focus-offset);
}

.cta-primary {
    background: var(--primary-700);
    color: var(--white);
    border-color: var(--primary-700);
}

.cta-primary:hover {
    background: var(--primary-900);
    border-color: var(--primary-900);
    color: var(--white);
}

.cta-secondary {
    background: var(--white);
    border-color: var(--primary-700);
    color: var(--primary-700);
}

.cta-secondary:hover {
    background: var(--primary-100);
    border-color: var(--primary-900);
    color: var(--primary-900);
}

.cta-secondary-dark {
    background: var(--white);
    border-color: var(--primary-700);
    color: var(--primary-700);
}

.cta-secondary-dark:hover {
    background: var(--primary-100);
    border-color: var(--primary-900);
    color: var(--primary-900);
}

/* ==========================================================================
   10. Pricing / Fee Schedule
   ========================================================================== */

.pricing-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 0;
    max-width: var(--w-page-content);
    margin: var(--s-4) auto;
    padding: 0 var(--s-2);
    border: var(--border-1) solid var(--gray-200);
    border-radius: var(--radius-2);
    background: var(--white);
}

.pricing-card {
    background: var(--white);
    color: var(--gray-900);
    padding: var(--s-3);
    border-bottom: var(--border-1) solid var(--gray-200);
    text-align: left;
    position: relative;
}

.pricing-card:last-child {
    border-bottom: none;
}

.pricing-card:hover {
    background: var(--gray-50);
}

.pricing-card.featured {
    background: rgba(255, 255, 255, 0.9);
    border-left: var(--border-1) solid var(--gray-200);
}

.pricing-badge {
    display: inline-block;
    background: var(--primary-700);
    color: var(--white);
    padding: var(--s-sm) var(--s-1);
    border-radius: var(--radius-2);
    font-size: var(--font-size-xs);
    font-weight: var(--font-weight-7);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: var(--s-1);
}

.pricing-card h3 {
    font-size: 1.25rem;
    margin-bottom: var(--s-1);
    color: var(--primary-900);
    font-weight: var(--font-weight-7);
}

.pricing-price {
    font-size: 2rem;
    font-weight: var(--font-weight-7);
    color: var(--primary-900);
    margin: var(--s-1) 0;
    line-height: var(--font-lineheight-1);
}

.pricing-features {
    list-style: none;
    padding: 0;
    margin: var(--s-2) 0;
    text-align: left;
}

.pricing-features li {
    padding: var(--s-1) 0;
    border-bottom: var(--border-1) solid var(--gray-100);
    font-size: 1rem;
    color: var(--gray-900);
    line-height: var(--font-lineheight-3);
}

.pricing-features li:last-child {
    border-bottom: none;
}

.pricing-features li:before {
    content: "";
    color: var(--success-700);
    font-weight: var(--font-weight-7);
    margin-right: var(--s-1);
}

.hidden { display: none !important; }

/* ==========================================================================
   11. Course Page Layout
   ========================================================================== */

#coursePage {
    min-height: 100vh;
    background: var(--gray-50);
    display: flex;
    flex-direction: column;
}

#coursePage:not(.hidden) ~ #landingPageContent,
#coursePage:not(.hidden) ~ #landingPage {
    display: none !important;
}

#courseProgressBar {
    height: 100%;
    background: var(--cagov-highlight);
    border-radius: 0;
    transition: width 0.5s ease;
}

/* --- Course Header (sticky) --- */

.course-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--primary-900);
    color: var(--white);
    padding: var(--s-2) var(--s-4) var(--s-1);
    border-bottom: var(--border-1) solid var(--cagov-primary-dark);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: var(--w-lg);
    margin: 0 auto var(--s-1);
}

.header-content h1 {
    font-size: var(--h4-size);
    font-weight: var(--font-weight-7);
    margin: 0;
    color: var(--white);
    line-height: var(--font-lineheight-2);
}

.header-right {
    display: flex;
    align-items: center;
    gap: var(--s-3);
}

.section-timer {
    background: rgba(255, 255, 255, 0.15);
    padding: var(--s-1) var(--s-2);
    border-radius: var(--radius-2);
    color: var(--white);
    font-weight: var(--font-weight-6);
    display: flex;
    align-items: center;
    gap: var(--s-1);
    border: var(--border-1) solid rgba(255, 255, 255, 0.3);
}

.timer-label {
    font-size: var(--font-size-xs);
    opacity: 0.92;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.timer-countdown {
    font-family: var(--font-mono);
    font-size: 1rem;
    color: var(--white);
    font-variant-numeric: tabular-nums;
}

.logo-link {
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

.logo-link:hover h1 {
    opacity: 0.9;
}

.progress-bar-container {
    max-width: var(--w-lg);
    margin: 0 auto;
    padding: 0 0 var(--s-1);
}

.progress-bar-container .progress-bar {
    background: rgba(255, 255, 255, 0.25);
    margin: 0;
}

/* --- Course Navigation (fixed bottom bar) --- */

.course-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--white);
    padding: var(--s-2) var(--s-4);
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: var(--border-1) solid var(--gray-200);
    z-index: 100;
}

.course-nav #sectionIndicator {
    font-weight: var(--font-weight-6);
    color: var(--primary-900);
    font-size: 1rem;
}

/* --- Course Container --- */

.course-container {
    max-width: var(--w-page-content);
    margin: 0 auto;
    padding: var(--s-3) var(--s-4) var(--s-6);
    background: var(--white);
    min-height: 100vh;
}

.course-title {
    font-size: var(--h2-size);
    margin-bottom: var(--s-1);
    color: var(--primary-900);
    font-weight: var(--font-weight-7);
    line-height: var(--font-lineheight-2);
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: var(--gray-100);
    border-radius: 0;
    margin: var(--s-2) 0;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--cagov-highlight);
    border-radius: 0;
    transition: width 0.5s ease;
}

/* ==========================================================================
   12. Lesson Sections
   ========================================================================== */

.lesson-section {
    background: var(--white);
    padding: var(--card-padding);
    margin-bottom: var(--s-3);
    border: var(--card-border);
    border-radius: var(--radius-2);
}

.lesson-section h2 {
    color: var(--primary-900);
    margin-bottom: var(--s-2);
    font-size: var(--h3-size);
    font-weight: var(--font-weight-7);
    padding-bottom: 0;
    border-bottom: 0;
    line-height: var(--font-lineheight-2);
}

.lesson-section h3 {
    color: var(--primary-900);
    margin: var(--s-3) 0 var(--s-1);
    font-size: var(--h4-size);
    font-weight: var(--font-weight-7);
    line-height: var(--font-lineheight-3);
}

.lesson-section h4 {
    color: var(--primary-900);
    margin: var(--s-2) 0 var(--s-sm);
    font-size: 1.125rem;
    font-weight: var(--font-weight-7);
    line-height: var(--font-lineheight-3);
}

.lesson-section p,
.lesson-section ul,
.lesson-section ol {
    line-height: var(--font-lineheight-3);
    color: var(--gray-900);
    margin-bottom: var(--s-2);
    font-size: 1.125rem;
}

.lesson-section ul,
.lesson-section ol {
    padding-left: var(--s-4);
}

.lesson-section li {
    margin-bottom: var(--s-sm);
}

.lesson-section li ul,
.lesson-section li ol {
    margin-top: var(--s-sm);
    margin-bottom: var(--s-sm);
}

.lesson-section h3 + p {
    margin-top: 0;
}

.lesson-section strong {
    color: var(--primary-900);
    font-weight: var(--font-weight-7);
}

.lesson-section a {
    color: var(--primary-700);
    text-decoration: underline;
}

.lesson-section a:hover {
    color: var(--primary-900);
}

/* --- Tables (CA Design System: borderless, row dividers) --- */

.lesson-section table,
.cds-table {
    width: 100%;
    border-collapse: collapse;
    margin: var(--s-2) 0;
    font-size: 1rem;
    background: var(--white);
}

.lesson-section th,
.lesson-section td,
.cds-table th,
.cds-table td {
    padding: var(--table-cell-padding);
    text-align: left;
    border-bottom: var(--border-1) solid var(--gray-200);
    line-height: var(--font-lineheight-3);
}

.lesson-section th,
.cds-table th {
    font-weight: var(--font-weight-7);
    color: var(--primary-900);
    border-bottom: var(--border-1) solid var(--gray-200);
    background: var(--gray-50);
}

.lesson-section tbody tr:hover,
.cds-table tbody tr:hover {
    background: var(--gray-50);
}

/* ==========================================================================
   13. Quiz
   ========================================================================== */

.quiz-container {
    max-width: var(--w-page-content);
    margin: 0 auto;
    padding: var(--s-3) var(--s-4) var(--s-6);
    background: var(--white);
    min-height: 100vh;
}

.quiz-header {
    text-align: left;
    margin-bottom: var(--s-3);
    padding-bottom: var(--s-2);
    border-bottom: var(--border-2) solid var(--gray-200);
}

.timer {
    font-size: 1.25rem;
    color: var(--danger-700);
    font-weight: var(--font-weight-7);
    margin: var(--s-2) 0;
    background: rgba(255, 255, 255, 0.86);
    border: var(--border-1) solid var(--gray-200);
    border-left: var(--border-1) solid var(--gray-200);
    padding: var(--s-1) var(--s-2);
    border-radius: var(--radius-2);
    display: inline-block;
    font-variant-numeric: tabular-nums;
}

.question-card {
    background: var(--gray-50);
    padding: var(--card-padding);
    margin-bottom: var(--s-3);
    border: var(--card-border);
    border-radius: var(--radius-2);
}

.question-number {
    color: var(--primary-900);
    font-weight: var(--font-weight-7);
    margin-bottom: var(--s-1);
    font-size: var(--font-size-sm);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.question-text {
    font-size: 1.25rem;
    margin-bottom: var(--s-2);
    line-height: var(--font-lineheight-3);
    color: var(--gray-900);
    font-weight: var(--font-weight-6);
}

.answer-option {
    background: var(--white);
    padding: var(--s-1) var(--s-2);
    border-radius: var(--radius-2);
    margin-bottom: var(--s-1);
    cursor: pointer;
    border: var(--border-1) solid var(--gray-300);
    min-height: 44px;
    display: flex;
    align-items: center;
    transition: background-color 0.15s ease, border-color 0.15s ease;
}

.answer-option:hover {
    background: var(--primary-100);
    border-color: var(--primary-700);
}

.answer-option.selected {
    border-color: var(--primary-700);
    border-width: var(--border-2);
    background: var(--primary-100);
}

.answer-option input {
    margin-right: var(--s-1);
    accent-color: var(--primary-700);
}

.nav-buttons {
    display: flex;
    gap: var(--s-2);
    justify-content: space-between;
    margin-top: var(--s-3);
    padding-top: var(--s-2);
    border-top: var(--border-1) solid var(--gray-200);
}

/* --- Quiz Summary / Results --- */

.quiz-summary {
    background: var(--gray-50);
    padding: var(--s-4);
    border-radius: var(--radius-2);
    text-align: center;
    border: var(--border-1) solid var(--gray-200);
    border-top: var(--border-4) solid var(--primary-900);
}

.score-display {
    font-size: var(--h1-size);
    color: var(--primary-900);
    font-weight: var(--font-weight-7);
    margin: var(--s-2) 0;
    line-height: var(--font-lineheight-1);
}

.certificate-preview {
    background: var(--white);
    color: var(--gray-900);
    padding: var(--s-4);
    margin: var(--s-3) 0;
    border: var(--border-2) solid var(--primary-900);
    border-radius: var(--radius-2);
}

/* ==========================================================================
   14. Alert Boxes (CA Design System pattern)
   Neutral surface cards without colored side bars
   ========================================================================== */

.info-box {
    background: rgba(255, 255, 255, 0.82);
    border: var(--border-1) solid var(--gray-200);
    border-left: var(--border-1) solid var(--gray-200);
    padding: var(--s-2) var(--s-3);
    margin: var(--s-2) 0;
    border-radius: var(--radius-2);
    font-size: 1rem;
    line-height: var(--font-lineheight-3);
    color: var(--gray-900);
}

.warning-box {
    background: rgba(255, 255, 255, 0.82);
    border: var(--border-1) solid var(--gray-200);
    border-left: var(--border-1) solid var(--gray-200);
    padding: var(--s-2) var(--s-3);
    margin: var(--s-2) 0;
    border-radius: var(--radius-2);
    font-size: 1rem;
    line-height: var(--font-lineheight-3);
    color: var(--gray-900);
}

.success-box {
    background: rgba(255, 255, 255, 0.82);
    border: var(--border-1) solid var(--gray-200);
    border-left: var(--border-1) solid var(--gray-200);
    padding: var(--s-2) var(--s-3);
    margin: var(--s-2) 0;
    border-radius: var(--radius-2);
    font-size: 1rem;
    line-height: var(--font-lineheight-3);
    color: var(--gray-900);
}

.danger-box {
    background: rgba(255, 255, 255, 0.82);
    border: var(--border-1) solid var(--gray-200);
    border-left: var(--border-1) solid var(--gray-200);
    padding: var(--s-2) var(--s-3);
    margin: var(--s-2) 0;
    border-radius: var(--radius-2);
    font-size: 1rem;
    line-height: var(--font-lineheight-3);
    color: var(--gray-900);
}

.info-box p,
.info-box ul,
.info-box ol,
.warning-box p,
.warning-box ul,
.warning-box ol,
.success-box p,
.success-box ul,
.success-box ol,
.danger-box p,
.danger-box ul,
.danger-box ol {
    margin-bottom: var(--s-1);
}

.info-box p:last-child,
.info-box ul:last-child,
.info-box ol:last-child,
.warning-box p:last-child,
.warning-box ul:last-child,
.warning-box ol:last-child,
.success-box p:last-child,
.success-box ul:last-child,
.success-box ol:last-child,
.danger-box p:last-child,
.danger-box ul:last-child,
.danger-box ol:last-child {
    margin-bottom: 0;
}

/* ==========================================================================
   15. Modern Quiz UI
   ========================================================================== */

.quiz-container-modern {
    max-width: var(--w-page-content);
    margin: 0 auto;
    padding: var(--card-padding);
    background: var(--white);
    border: var(--card-border);
    border-radius: var(--radius-2);
    overflow: hidden;
}

#coursePage:not(.hidden) .quiz-container-modern:not(.hidden) {
    margin-top: var(--s-3);
    margin-bottom: var(--s-3);
}

.quiz-header-modern {
    text-align: left;
    margin-bottom: var(--s-3);
    padding: var(--s-3);
    background: var(--primary-900);
    border-radius: var(--radius-2);
    color: var(--white);
}

.quiz-header-modern h2 {
    color: var(--white);
    font-size: var(--h3-size);
    font-weight: var(--font-weight-7);
    margin-bottom: var(--s-sm);
    line-height: var(--font-lineheight-2);
}

.quiz-header-modern p {
    color: rgba(255, 255, 255, 0.95);
    font-size: 1rem;
    margin: 0;
    line-height: var(--font-lineheight-3);
}

.quiz-progress {
    width: 100%;
    height: 8px;
    background-color: var(--gray-100);
    border-radius: 0;
    margin-bottom: var(--s-2);
}

.quiz-progress-bar {
    width: 0%;
    height: 100%;
    background: var(--cagov-highlight);
    border-radius: 0;
    transition: width 0.3s ease;
}

.quiz-question-counter {
    text-align: left;
    margin-bottom: var(--s-2);
    font-weight: var(--font-weight-7);
    color: var(--primary-900);
    font-size: var(--font-size-sm);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.quiz-question-view {
    display: none;
    padding: var(--card-padding);
    background: var(--gray-50);
    border: var(--card-border);
    border-radius: var(--radius-2);
}

.quiz-question-view.active {
    display: block;
}

.quiz-question-view h3 {
    font-size: 1.25rem;
    margin-bottom: var(--s-2);
    color: var(--primary-900);
    line-height: var(--font-lineheight-3);
    font-weight: var(--font-weight-6);
}

.quiz-answers-modern {
    display: flex;
    flex-direction: column;
    gap: var(--s-1);
}

.quiz-answer-label {
    display: block;
    padding: var(--s-1) var(--s-2);
    border: var(--border-1) solid var(--gray-300);
    border-radius: var(--radius-2);
    cursor: pointer;
    position: relative;
    font-size: 1rem;
    line-height: var(--font-lineheight-3);
    background: var(--white);
    min-height: 44px;
    transition: background-color 0.15s ease, border-color 0.15s ease;
}

.quiz-answer-label:hover {
    border-color: var(--primary-700);
    background-color: var(--primary-100);
}

.quiz-answer-label input {
    display: none;
}

.quiz-answer-label input:checked + span {
    font-weight: var(--font-weight-7);
    color: var(--primary-900);
}

.quiz-answer-label.selected {
    border-color: var(--primary-700);
    border-width: var(--border-2);
    background-color: var(--primary-100);
}

.quiz-navigation {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--white);
    padding: var(--s-2) var(--s-4);
    display: flex;
    justify-content: center;
    gap: var(--s-2);
    border-top: var(--border-1) solid var(--gray-200);
    z-index: 100;
}

/* --- Nav Button Overrides (light backgrounds) --- */

.course-nav .cta-button.cta-secondary,
.quiz-navigation .cta-button.cta-secondary {
    background: var(--white);
    border: var(--border-2) solid var(--primary-700);
    color: var(--primary-700);
}

.course-nav .cta-button.cta-secondary:hover,
.quiz-navigation .cta-button.cta-secondary:hover {
    background: var(--primary-100);
    border-color: var(--primary-900);
    color: var(--primary-900);
}

/* ==========================================================================
   16. Modal
   ========================================================================== */

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10000;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: var(--white);
    padding: var(--s-3);
    border-radius: var(--radius-2);
    max-width: 500px;
    width: 90%;
    text-align: center;
    border: var(--border-1) solid var(--gray-200);
    border-top: var(--border-4) solid var(--primary-900);
}

/* ==========================================================================
   17. Visual Aids / Figures
   ========================================================================== */

.visual-aid {
    margin: var(--s-2) 0;
    background: var(--white);
    padding: var(--s-2);
    border: var(--border-1) solid var(--gray-200);
    border-radius: var(--radius-2);
    box-shadow: var(--shadow-sm);
}

.image-placeholder {
    background:
        linear-gradient(135deg, rgba(0, 119, 200, 0.08), rgba(255, 212, 87, 0.15)),
        var(--gray-50);
    color: var(--gray-800);
    padding: clamp(1.25rem, 3vw, 2rem);
    border: 1px solid var(--gray-200);
    border-left: 1px solid var(--gray-200);
    border-radius: var(--radius-2);
    margin-bottom: var(--s-1);
    font-size: 1rem;
    line-height: 1.55;
    text-align: left;
}

.visual-label {
    color: var(--cagov-primary-dark);
    display: block;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    margin-bottom: 0.35rem;
    text-transform: uppercase;
}

.visual-aid figcaption {
    font-size: var(--font-size-sm);
    color: var(--gray-700);
    font-style: italic;
    margin-top: var(--s-1);
    line-height: var(--font-lineheight-3);
}

/* ==========================================================================
   18. Chapter Quiz
   ========================================================================== */

.chapter-quiz-container {
    background: var(--white);
    padding: var(--card-padding);
    margin: var(--s-3) 0;
    border: var(--card-border);
    border-radius: var(--radius-2);
}

.chapter-quiz-container h3 {
    color: var(--primary-900);
    margin-bottom: var(--s-2);
    border-bottom: var(--border-2) solid var(--primary-900);
    padding-bottom: var(--s-1);
    display: inline-block;
    font-size: 1.25rem;
}

.quiz-question {
    margin-bottom: var(--s-2);
    padding-bottom: var(--s-2);
    border-bottom: var(--border-1) solid var(--gray-100);
}

.quiz-question:last-child {
    border-bottom: none;
}

.quiz-question p {
    font-weight: var(--font-weight-6);
    margin-bottom: var(--s-1);
    color: var(--gray-900);
    font-size: 1.125rem;
}

.quiz-question .options label {
    display: block;
    margin-bottom: var(--s-sm);
    cursor: pointer;
    padding: var(--s-1) var(--s-2);
    border-radius: var(--radius-2);
    font-size: 1rem;
    line-height: var(--font-lineheight-3);
}

.quiz-question .options label:hover {
    background: var(--primary-100);
}

.quiz-question input[type="radio"] {
    margin-right: var(--s-1);
    accent-color: var(--primary-700);
}

/* ==========================================================================
   19. Pricing Disclosure
   ========================================================================== */

.pricing-disclosure {
    text-align: center;
    margin-top: var(--s-3);
    color: var(--gray-700);
    font-style: italic;
    font-size: var(--font-size-sm);
    line-height: var(--font-lineheight-3);
}

.dmv-disclaimer {
    margin-top: var(--s-4);
    padding-top: var(--s-3);
    border-top: var(--border-1) solid var(--gray-100);
    color: var(--gray-700);
    font-size: var(--font-size-sm);
    text-align: center;
    line-height: var(--font-lineheight-3);
}

/* ==========================================================================
   20. Site Footer
   ========================================================================== */

.site-footer {
    background: var(--gray-100);
    color: var(--gray-900);
    padding: 0;
    border-top: var(--border-1) solid var(--gray-200);
}

.footer-main {
    max-width: var(--w-lg);
    margin: 0 auto;
    padding: var(--s-4) var(--s-4) var(--s-3);
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: var(--s-4);
}

.footer-main h4 {
    color: var(--primary-900);
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-7);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: var(--s-2);
}

.footer-main p,
.footer-main a {
    color: var(--gray-800);
    font-size: 1rem;
    line-height: var(--font-lineheight-4);
    text-decoration: none;
}

.footer-main a {
    text-decoration: underline;
    color: var(--primary-700);
}

.footer-main a:hover {
    color: var(--primary-900);
    text-decoration: underline;
}

.footer-main ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-main ul li {
    margin-bottom: var(--s-sm);
}

.footer-bottom {
    border-top: var(--border-1) solid var(--gray-200);
    padding: var(--s-2) var(--s-4);
    text-align: center;
    font-size: var(--font-size-sm);
    color: var(--gray-700);
    background: var(--gray-200);
}

/* ==========================================================================
   21. Responsive
   ========================================================================== */

@media (max-width: 768px) {
    body {
        font-size: 1rem;
    }

    .ca-utility-bar {
        flex-direction: column;
        gap: var(--s-1);
        text-align: center;
        padding: var(--s-1) var(--s-2);
    }

    .site-header {
        flex-direction: column;
        gap: var(--s-1);
        padding: var(--s-2);
    }

    .site-header .site-nav {
        flex-wrap: wrap;
        justify-content: center;
        gap: var(--s-2);
    }

    .header-content {
        flex-direction: column;
        gap: var(--s-1);
        text-align: center;
    }

    .header-content h1 {
        font-size: 1.25rem;
    }

    .course-header {
        padding: var(--s-2);
    }

    .course-container,
    .quiz-container {
        padding: var(--s-2) var(--s-2) var(--s-6);
    }

    .lesson-section {
        padding: var(--s-2);
    }

    .pricing-cards {
        grid-template-columns: 1fr;
    }

    .cta-button {
        padding: var(--btn-padding-y) var(--btn-padding-x);
        font-size: 1rem;
        width: 100%;
    }

    .cta-container {
        flex-direction: column;
        align-items: stretch;
    }

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

    .nav-buttons button {
        width: 100%;
    }

    .quiz-container-modern {
        padding: var(--s-2);
    }

    .quiz-navigation {
        flex-wrap: wrap;
        padding: var(--s-1) var(--s-2);
        gap: var(--s-1);
    }

    .course-nav {
        padding: var(--s-1) var(--s-2);
        flex-wrap: wrap;
        gap: var(--s-1);
        justify-content: center;
    }

    .course-nav #sectionIndicator {
        width: 100%;
        text-align: center;
        order: -1;
        font-size: var(--font-size-sm);
    }

    .footer-main {
        grid-template-columns: 1fr;
        padding: var(--s-3) var(--s-2);
        gap: var(--s-3);
    }

    .trust-badges-bar .badges-inner {
        gap: var(--s-2);
    }
}

@media (max-width: 480px) {
    .hero {
        padding: var(--s-3) var(--s-2);
    }

    .course-title {
        font-size: var(--h3-size);
    }

    .timer {
        font-size: 1.125rem;
    }

    .question-text {
        font-size: 1.125rem;
    }
}

/* ==========================================================================
   22. Print
   ========================================================================== */

@media print {
    .nav-buttons,
    .cta-button,
    .accessibility-toolbar,
    .accessibility-toggle,
    .section-timer,
    .header-right,
    .course-nav,
    .quiz-navigation,
    .ca-utility-bar,
    .site-header,
    .breadcrumb-bar,
    .site-footer,
    .trust-badges-bar,
    .chatbot-container,
    .chatbot-trigger,
    #support-tab,
    #support-panel,
    #notification-container {
        display: none !important;
    }

    body {
        background: white;
        color: black;
        font-size: 12pt;
    }

    .hero {
        background: none;
        color: black;
        min-height: auto;
        padding: var(--s-2) 0;
        border: none;
    }

    .course-header {
        position: static;
        background: none;
        color: black;
        box-shadow: none;
    }

    .course-container,
    .quiz-container,
    .quiz-container-modern {
        padding: var(--s-2) 0;
    }

    .lesson-section,
    .question-card {
        border: 1px solid #ccc;
        box-shadow: none;
        page-break-inside: avoid;
    }

    .certificate-preview {
        border: 2px solid #333;
        box-shadow: none;
    }

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

    h1, h2, h3, h4 {
        color: black;
    }
}
