/* l2-course.css — the Level 2 lesson-card styling, for the new course.
 * ---------------------------------------------------------------------------
 * THE WRITTEN COURSE'S OWN, edited here by hand. Until 8 Nov 2026 this file
 * was generated by tools/l2-style-build.js from the inline <style> blocks of
 * the video course's pages (modules/unit210.html, and each modules/unit2NN.html
 * for its accent colour). The written course no longer depends on the video
 * course, so it holds what that last run produced and is now maintained here.
 * tools/l2-style-build.js (check:l2-style) only checks that the rules the
 * written course's pages are built from are still in it.
 *
 * .picker-btn and .picker-count are deliberately absent — lesson-picker.js
 * injects those, and the new page loads it exactly as the old pages do.
 * ---------------------------------------------------------------------------
 */
/* ===== VARIABLES ===== */
        :root {
            --navy: #1a2744;
            --navy-dark: #111c33;
            --navy-light: #243556;
            --blue-accent: #3b82f6;
            --blue-bright: #60a5fa;
            --teal: #14b8a6;
            --teal-light: #5eead4;
            --white: #ffffff;
            --off-white: #f0f4f8;
            --card-bg: #ffffff;
            --text-dark: #1e293b;
            --text-mid: #475569;
            --text-light: #94a3b8;
            --green: #22c55e;
            --green-dark: #16a34a;
            --amber: #f59e0b;
            --red: #ef4444;
            --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
            --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
            --shadow-lg: 0 8px 30px rgba(0,0,0,0.12);
            --radius: 16px;
            --radius-sm: 10px;
            /* Unit 210 accent */
            --unit-accent: #7c3aed;
            --unit-accent-light: #f3e8ff;
            --unit-accent-dark: #5b21b6;
        }

/* ===== LESSON CARDS ===== */
        .lesson-card {
            background: rgba(255,255,255,0.94);
            backdrop-filter: blur(12px);
            -webkit-backdrop-filter: blur(12px);
            border-radius: var(--radius);
            padding: 28px 32px;
            margin-bottom: 20px;
            box-shadow: var(--shadow-sm);
            border: 1px solid rgba(124,58,237,0.12);
            transition: all 0.3s ease;
        }

.lesson-card:hover {
            box-shadow: var(--shadow-md);
            border-color: rgba(124,58,237,0.22);
        }

.lesson-title-row {
            display: flex;
            align-items: center;
            gap: 14px;
            margin-bottom: 18px;
        }

.lesson-number {
            width: 42px; height: 42px;
            background: linear-gradient(135deg, var(--navy), var(--navy-light));
            border-radius: 12px;
            display: flex; align-items: center; justify-content: center;
            color: white;
            font-family: 'Outfit', sans-serif;
            font-weight: 700;
            font-size: 0.82em;
            flex-shrink: 0;
        }

.lesson-title-text h3 {
            font-family: 'Outfit', sans-serif;
            font-size: 1.15em;
            font-weight: 700;
            color: var(--navy);
            margin: 0;
        }

.lesson-subtitle {
            font-size: 0.82em;
            color: var(--text-light);
            font-weight: 500;
            margin-top: 2px;
        }

/* ===== BUTTONS ===== */
/* Watch & Learn, above the lesson text (card D8, 7 Nov 2026). */
        .watch-row { display: flex; flex-wrap: wrap; gap: 10px; margin: 12px 0 4px; }
        .watch-row > * { flex: 0 1 auto; }
        .btn-row {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
            gap: 10px;
            margin-top: 6px;
        }

/* Unified primary-action pills */
        .take-quiz-btn, .interactive-btn, .sa-btn {
            display: inline-flex; align-items: center; justify-content: center; gap: 8px;
            flex: 1 1 180px; padding: 12px 22px;
            font-size: 0.92em; font-weight: 700;
            font-family: 'Plus Jakarta Sans', sans-serif;
            border: none; border-radius: var(--radius-sm);
            color: white; text-decoration: none; cursor: pointer;
            transition: all 0.2s ease;
        }

.take-quiz-btn { background: linear-gradient(135deg, var(--green), var(--green-dark)); box-shadow: 0 2px 8px rgba(34,197,94,0.3); }

.take-quiz-btn:hover { transform: translateY(-2px); box-shadow: 0 4px 16px rgba(34,197,94,0.4); color: white; }

/* Interactive / task pill. Orange, matching 206: green = quiz, purple = short
           answer, orange = interactive. These four units listed .interactive-btn in the
           desktop width-cap and the mobile undo, but NOWHERE in the pill base rule above
           and it had no background of its own — so the button rendered as a bare
           underlined link. NOT copied from 205's standalone rule: these units use the
           compact base-rule pattern, so the base list does the pill and this does colour. */
        .interactive-btn { background: linear-gradient(135deg, #ea580c, #c2410c); box-shadow: 0 2px 8px rgba(234,88,12,0.3); }

.interactive-btn:hover { transform: translateY(-2px); box-shadow: 0 4px 16px rgba(234,88,12,0.4); color: white; }

.sa-btn { background: linear-gradient(135deg, #7c3aed, #6366f1); box-shadow: 0 2px 8px rgba(124,58,237,0.3); }

.sa-btn:hover { transform: translateY(-2px); box-shadow: 0 4px 16px rgba(124,58,237,0.4); color: white; }

.sa-btn-badge { margin-left: 4px; font-size: 0.82em; font-weight: 700; padding: 2px 9px; border-radius: 10px; background: rgba(255,255,255,0.22); }

.progress-cell-activity { justify-content: center; }

.sa-part-row { display:flex; flex-wrap:wrap; gap:6px; justify-content:center; }

/* Tasks stacks several long pills; stretch them so the column edges stay straight */
        .progress-cell-activity[data-label="Quiz & Tasks"] .sa-part-row { justify-content:flex-start; flex:1; }

.progress-summary-pills { display:block !important; }

.pm-prog-head { display:flex; align-items:baseline; gap:10px; flex-wrap:wrap; margin-bottom:8px; }

.pm-prog-big { font-family:'Outfit',sans-serif; font-weight:800; font-size:1.6em; line-height:1; color:var(--green); }

.pm-prog-of { font-size:0.55em; font-weight:600; color:var(--text-mid); }

.pm-prog-pct { margin-left:auto; font-family:'Outfit',sans-serif; font-weight:800; font-size:0.95em; color:var(--text-mid); }

.pm-bar { height:9px; border-radius:999px; background:rgba(15,23,42,0.08); overflow:hidden; }

.pm-bar-fill { height:100%; border-radius:999px; background:linear-gradient(90deg,#4ade80,#16a34a); transition:width .45s ease; }

.pm-sub { display:flex; gap:14px; flex-wrap:wrap; margin-top:9px; font-size:0.78em; font-weight:600; color:var(--text-light); }

.pm-sub b { color:var(--text-mid); }

.pm-sub-lessons { color:var(--unit-accent-dark); }

.sa-part-pill { font-size:0.8em; font-weight:700; padding:3px 9px; border-radius:10px; text-decoration:none; white-space:nowrap; }

.sa-part-pill.sa-part-pass { background:#dcfce7; color:#15803d; }

.sa-part-pill.sa-part-fail { background:#fee2e2; color:#b91c1c; }

.sa-part-pill.sa-part-not-started { background:#f1f5f9; color:#64748b; }

.sa-part-pill.sa-part-soon { background:#f8fafc; color:#94a3b8; border:1px dashed #cbd5e1; cursor:default; }

/* ===== FLASHCARDS BUTTON (per-lesson) ===== */
        .flashcards-btn {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
            flex: 1 1 180px;
            background: linear-gradient(135deg, #0891b2, #155e75);
            color: white;
            border: none;
            padding: 12px 22px;
            font-size: 0.92em;
            font-weight: 700;
            font-family: 'Plus Jakarta Sans', sans-serif;
            border-radius: var(--radius-sm);
            cursor: pointer;
            text-decoration: none;
            transition: all 0.2s ease;
            box-shadow: 0 2px 8px rgba(8,145,178,0.3);
        }

.flashcards-btn:hover {
            transform: translateY(-2px);
            box-shadow: 0 4px 16px rgba(8,145,178,0.4);
            color: white;
        }

/* Further reading strip */
        .further-reading {
            display: flex; align-items: center; gap: 10px;
            flex-wrap: wrap;   /* two links per block wrap instead of overflowing */
            margin-top: 14px; padding: 10px 14px;
            background: rgba(15, 23, 42, 0.03);
            border-left: 3px solid var(--unit-accent);
            border-radius: 6px; font-size: 0.87em; flex-wrap: wrap;
        }

.further-reading-label { font-weight: 700; color: var(--text-mid); font-size: 0.85em; letter-spacing: 0.02em; }

.further-reading-link { color: var(--unit-accent-dark); text-decoration: none; font-weight: 600; transition: color 0.15s; }

.further-reading-link:hover { color: var(--unit-accent); text-decoration: underline; }

@media (max-width: 640px) {
.lesson-card { padding: 20px; }
.btn-row { grid-template-columns: 1fr; }
.take-quiz-btn, .interactive-btn, .sa-btn, .cs-trigger-btn { flex-basis: auto; text-align: center; justify-content: center; }
.further-reading { padding: 10px; font-size: 0.84em; }
}

/* ===== REVISION UNIT BANNER (bold milestone design) ===== */
        .revision-unit-banner {
            background: linear-gradient(135deg, var(--unit-accent), var(--unit-accent-dark));
            border-radius: var(--radius); padding: 36px 40px; margin-top: 28px;
            box-shadow: 0 4px 16px rgba(124,58,237,0.25), 0 12px 32px rgba(124,58,237,0.18);
            position: relative; overflow: hidden;
            display: flex; align-items: center; justify-content: space-between;
            gap: 24px; flex-wrap: wrap; color: white; transition: box-shadow 0.2s;
        }

.revision-unit-banner::before {
            content: ''; position: absolute; top: -40%; right: -15%;
            width: 420px; height: 420px;
            background: radial-gradient(circle, rgba(255,255,255,0.18) 0%, transparent 70%);
            pointer-events: none;
        }

.revision-unit-banner:hover { box-shadow: 0 6px 20px rgba(124,58,237,0.35), 0 16px 40px rgba(124,58,237,0.25); }

.revision-banner-content { display: flex; align-items: center; gap: 20px; flex: 1 1 280px; min-width: 260px; position: relative; z-index: 1; }

.revision-banner-icon {
            width: 64px; height: 64px; background: rgba(255,255,255,0.22); border-radius: 16px;
            display: flex; align-items: center; justify-content: center;
            font-size: 32px; flex-shrink: 0;
            backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
        }

.revision-banner-title-block .eyebrow {
            font-size: 0.72em; font-weight: 700; text-transform: uppercase;
            letter-spacing: 0.12em; color: rgba(255,255,255,0.88);
            margin-bottom: 4px; font-family: 'Outfit', sans-serif;
        }

.revision-banner-title-block h3 {
            font-family: 'Outfit', sans-serif; font-size: 1.65em; font-weight: 800;
            color: white; line-height: 1.1; margin-bottom: 6px;
        }

.revision-banner-subtitle {
            font-size: 0.92em; color: rgba(255,255,255,0.93);
            font-weight: 500; max-width: 520px; line-height: 1.45;
        }

.revision-cta-btn {
            display: inline-flex; align-items: center; gap: 10px;
            padding: 14px 28px; background: white; color: var(--unit-accent-dark);
            border-radius: var(--radius-sm);
            font-family: 'Outfit', sans-serif; font-size: 1.02em; font-weight: 800;
            text-decoration: none; box-shadow: 0 4px 14px rgba(0,0,0,0.18);
            transition: all 0.2s ease; position: relative; z-index: 1; flex-shrink: 0;
        }

.revision-cta-btn:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0,0,0,0.22); color: var(--unit-accent-dark); }

.revision-cta-arrow { font-size: 1.2em; transition: transform 0.2s; }

.revision-cta-btn:hover .revision-cta-arrow { transform: translateX(4px); }

@media (max-width: 640px) {
.revision-unit-banner { padding: 28px 24px; flex-direction: column; align-items: flex-start; }
.revision-banner-title-block h3 { font-size: 1.4em; }
.revision-cta-btn { width: 100%; justify-content: center; }
}

/* ===== LESSON-BASED PROGRESS TABLE ===== */
        .progress-summary-pills { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }

.progress-stat-pill {
            display: inline-flex; align-items: center; gap: 6px;
            padding: 7px 14px; border-radius: 20px;
            font-size: 0.85em; font-weight: 700;
            background: rgba(15,23,42,0.04); color: var(--text-mid);
            font-family: 'Outfit', sans-serif;
        }

.progress-stat-pill.pass    { background: rgba(22,163,74,0.10); color: var(--green); }

.progress-stat-pill.fail    { background: rgba(245,158,11,0.12); color: #b45309; }

.progress-stat-pill.incomp  { background: rgba(100,116,139,0.10); color: var(--text-mid); }

.progress-stat-pill.lessons { background: rgba(124,58,237,0.14); color: var(--unit-accent-dark); }

.progress-table {
            background: white; border-radius: var(--radius); overflow: hidden;
            box-shadow: 0 1px 3px rgba(0,0,0,0.06); border: 1px solid rgba(0,0,0,0.06);
        }

.progress-table-row {
            display: grid; grid-template-columns: minmax(170px, 1.6fr) minmax(0, 2fr) minmax(0, 1.2fr);
            gap: 0; border-bottom: 1px solid rgba(0,0,0,0.05);
            transition: background 0.15s;
        }

.progress-table-row:last-child { border-bottom: none; }

.progress-table-row:not(.progress-table-header):hover { background: rgba(124,58,237,0.04); }

.progress-table-header { background: #f8fafc; }

.progress-cell {
            padding: 12px 14px; font-size: 0.88em;
            display: flex; align-items: center; gap: 6px;
            border-right: 1px solid rgba(0,0,0,0.04); min-height: 44px;
        }

.progress-cell:last-child { border-right: none; }

.progress-table-header .progress-cell {
            font-weight: 700; font-size: 0.74em; text-transform: uppercase;
            letter-spacing: 0.08em; color: var(--text-mid);
            font-family: 'Outfit', sans-serif; padding: 14px; min-height: 0;
        }

.progress-cell-lesson { font-weight: 700; color: var(--navy); font-size: 0.92em; }

.progress-cell-lesson-id {
            color: var(--unit-accent-dark); font-family: 'Outfit', sans-serif;
            font-weight: 800; margin-right: 8px; font-size: 0.95em;
        }

.progress-cell-link {
            display: inline-flex; align-items: center; gap: 6px;
            text-decoration: none; color: inherit;
            padding: 5px 10px; border-radius: 14px;
            font-weight: 600; transition: background 0.15s;
        }

.progress-cell-link:hover { background: rgba(0,0,0,0.05); }

.progress-cell-status-pass        { color: var(--green); }

.progress-cell-status-fail        { color: #b45309; }

.progress-cell-status-not-started { color: var(--text-light); opacity: 0.75; }

.progress-cell-status-na          { color: var(--text-light); opacity: 0.35; font-weight: 400; }

@media (max-width: 640px) {
.progress-table-row { display: block; padding: 14px 16px; grid-template-columns: none; }
.progress-table-header { display: none; }
.progress-cell { border-right: none; padding: 5px 0; min-height: 0; font-size: 0.9em; }
.progress-cell-lesson { padding-bottom: 8px; margin-bottom: 6px; border-bottom: 1px solid rgba(0,0,0,0.08); font-size: 0.98em; }
.progress-cell-activity { display: flex; justify-content: space-between; align-items: center; }
.progress-cell-activity::before { content: attr(data-label); color: var(--text-light); font-weight: 600; font-size: 0.85em; }
}

/* ===== End Tip strip ===== */

/* ===== Cheat Sheet Modal ===== */
.cs-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(17, 28, 51, 0.6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 500;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.cs-overlay.open { display: flex; }

.cs-modal {
    background: #fff;
    border-radius: 20px;
    width: 100%;
    max-width: 560px;
    max-height: 85vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 24px 80px rgba(0,0,0,0.25);
    animation: csSlideUp 0.25s ease-out;
}

.cs-header {
    padding: 20px 24px 16px;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    align-items: flex-start;
    gap: 14px;
    flex-shrink: 0;
}

.cs-header-icon {
    width: 44px; height: 44px;
    background: linear-gradient(135deg, var(--unit-accent, #3b82f6), var(--unit-accent-dark, #1d4ed8));
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 22px; flex-shrink: 0;
}

.cs-header-text { flex: 1; }

.cs-header-eyebrow {
    font-size: 10px; font-weight: 700; letter-spacing: 0.08em;
    text-transform: uppercase; color: #64748b; margin-bottom: 2px;
}

.cs-header-title {
    font-family: 'Outfit', sans-serif;
    font-size: 1.05em; font-weight: 800; color: #1a2744; line-height: 1.3;
}

.cs-close {
    width: 32px; height: 32px; border-radius: 8px;
    background: #f1f5f9; border: none; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    font-size: 18px; color: #64748b; flex-shrink: 0;
    transition: background 0.2s;
}

.cs-close:hover { background: #e2e8f0; }

.cs-body {
    overflow-y: auto;
    padding: 20px 24px 24px;
    flex: 1;
}

.cs-fact-list {
    list-style: none;
    padding: 0; margin: 0;
    display: flex; flex-direction: column; gap: 10px;
}

.cs-fact {
    display: flex; gap: 10px; align-items: flex-start;
    font-size: 0.9em; line-height: 1.6; color: #334155;
}

.cs-fact-bullet {
    width: 20px; height: 20px;
    background: linear-gradient(135deg, var(--unit-accent, #3b82f6), var(--unit-accent-dark, #1d4ed8));
    border-radius: 50%;
    flex-shrink: 0; margin-top: 2px;
    display: flex; align-items: center; justify-content: center;
}

.cs-fact-bullet svg {
    width: 10px; height: 10px; fill: white;
}

.cs-fact strong { color: #1a2744; }

.cs-footer {
    padding: 14px 24px;
    border-top: 1px solid #e2e8f0;
    background: #f8fafc;
    font-size: 0.8em; color: #64748b;
    text-align: center; flex-shrink: 0;
    border-radius: 0 0 20px 20px;
}

/* Trigger button on test cards */
.cs-trigger-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex: 1 1 180px;
    padding: 12px 22px;
    background: linear-gradient(135deg, var(--unit-accent), var(--unit-accent-dark));
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 0.92em;
    font-weight: 700;
    font-family: 'Plus Jakarta Sans', sans-serif;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(124,58,237,0.3);
}

.cs-trigger-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(124,58,237,0.4);
    color: white;
}

/* ===== End Cheat Sheet Modal ===== */

        /* Scroll-target offset so anchor links don't hide title behind any sticky header */
        .lesson-card { scroll-margin-top: 80px; }

/* ── Desktop: cap button width so wrapped buttons don't balloon ── */
        .btn-row {
            justify-content: flex-start;
        }

.take-quiz-btn,
        .interactive-btn,
        .sa-btn,
        .cs-trigger-btn {
            flex: 0 1 auto; /* don't grow; shrink if needed */
            min-width: 150px;
            max-width: 220px;
        }

@media (max-width: 640px) {
.cs-overlay {
                padding: 12px;
                align-items: flex-end; /* slide up from bottom on mobile */
            }
.cs-modal {
                max-width: 100%;
                max-height: 78vh;
                border-radius: 16px 16px 12px 12px;
            }
.cs-header      { padding: 14px 16px 12px; gap: 10px; }
.cs-header-icon { width: 36px; height: 36px; font-size: 18px; border-radius: 10px; }
.cs-header-eyebrow { font-size: 9px; }
.cs-header-title   { font-size: 0.95em; }
.cs-close          { width: 30px; height: 30px; font-size: 16px; }
.cs-body           { padding: 14px 16px 16px; }
.cs-fact-list      { gap: 8px; }
.cs-fact           { font-size: 0.87em; line-height: 1.55; gap: 8px; }
.cs-fact-bullet    { width: 16px; height: 16px; margin-top: 3px; }
.cs-fact-bullet svg { width: 8px; height: 8px; }
.cs-footer { padding: 10px 16px; font-size: 0.72em; border-radius: 0; }
/* On mobile the btn-row is already flex-direction: column,
               so undo the desktop cap — let buttons go full-width */
            .take-quiz-btn,
            .interactive-btn,
            .sa-btn,
            .cs-trigger-btn {
                min-width: 0;
                max-width: none;
            }
}

/* per-unit accents (first lifted from each video-course unit page) */
[data-unit="201"] {
  --unit-accent: #f59e0b;
  --unit-accent-light: #fef3c7;
  --unit-accent-dark: #b45309;
}
[data-unit="202"] {
  --unit-accent: #c2410c;
  --unit-accent-light: #fff1e6;
  --unit-accent-dark: #9a3412;
}
[data-unit="203"] {
  --unit-accent: #0e7490;
  --unit-accent-light: #e0f7fa;
  --unit-accent-dark: #155e75;
}
[data-unit="204"] {
  --unit-accent: #b45309;
  --unit-accent-light: #fef3e2;
  --unit-accent-dark: #92400e;
}
[data-unit="205"] {
  --unit-accent: #0369a1;
  --unit-accent-light: #e0f2fe;
  --unit-accent-dark: #0369a1;
}
[data-unit="206"] {
  --unit-accent: #dc2626;
  --unit-accent-light: #fef2f2;
  --unit-accent-dark: #991b1b;
}
[data-unit="208"] {
  --unit-accent: #7c2d12;
  --unit-accent-light: #fef3eb;
  --unit-accent-dark: #5c1d0c;
}
[data-unit="209"] {
  --unit-accent: #6F4E37;
  --unit-accent-light: #faf5f0;
  --unit-accent-dark: #4a3322;
}
[data-unit="210"] {
  --unit-accent: #7c3aed;
  --unit-accent-light: #f3e8ff;
  --unit-accent-dark: #5b21b6;
}
