/* Genesis lessons and unit quizzes on the Origin design system.
   Loads last, after styles.css, the lesson CSS and the page's own <style>. */

.po-lesson {
    --origin-blue: var(--navy);
    --origin-blue-light: var(--navy);
    --origin-blue-dark: var(--navy-700);
    --origin-blue-subtle: var(--mist);
    --bg-primary: #fff;
    --bg-secondary: var(--mist);
    --bg-tertiary: var(--mist);
    --bg-accent: var(--mist);
    --text-primary: var(--ink);
    --text-secondary: var(--ink-soft);
    --text-tertiary: var(--muted);
    --border-light: var(--line);
    --border-medium: var(--line);
    --gradient-primary: linear-gradient(var(--navy), var(--navy));

    --cmd-bg-darkest: var(--navy-900);
    --cmd-bg-dark: #00105e;
    --cmd-bg-panel: #001676;
    --cmd-border: rgba(255, 255, 255, .16);
    --cmd-border-glow: rgba(255, 255, 255, .3);
    --cmd-accent-blue: var(--accent);
    --cmd-glow-blue: none;

    background: #fff;
    overflow-x: clip;
}

/* Square corners, like the rest of the site. Round markers stay round. */
.po-lesson main *:not([class*="marker"]):not([class*="dot"]):not([class*="avatar"]):not([class*="thumb"]):not(.question-number),
.po-lesson main *::before, .po-lesson main *::after,
.po-lesson .points-display, .po-lesson .points-earned, .po-lesson .lesson-complete-content {
    border-radius: 0 !important;
}

/* Type */
.po-lesson main, .po-lesson main p, .po-lesson main li, .po-lesson main button, .po-lesson main input, .po-lesson main textarea { font-family: var(--font-body); }
.po-lesson main h2, .po-lesson main h3,
.po-lesson [class$="-title"], .po-lesson .complete-stat-value, .po-lesson .points-value, .po-lesson .points-earned {
    font-family: var(--font-display) !important;
    letter-spacing: -0.01em;
}

/* Hero band */
.lesson-hero {
    position: relative;
    overflow: hidden;
    background: var(--navy);
    color: #fff;
    padding: clamp(56px, 7vw, 88px) var(--gutter) clamp(48px, 6vw, 72px);
}
.lesson-hero::after {
    content: "";
    position: absolute;
    right: -70px; top: -60px;
    width: 300px; height: 300px;
    background: var(--accent);
    -webkit-mask: var(--svg-circle) center / contain no-repeat;
            mask: var(--svg-circle) center / contain no-repeat;
    opacity: .9;
    pointer-events: none;
}
.lesson-hero__inner { position: relative; z-index: 1; max-width: 800px; margin: 0 auto; }
.po-lesson .lesson-breadcrumb { margin: 0 0 22px; color: rgba(255, 255, 255, .6); font-size: 14px; font-weight: 600; }
.po-lesson .lesson-breadcrumb a { color: #fff; text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 4px; }
.po-lesson .lesson-breadcrumb a:hover { color: var(--accent); }
.po-lesson .lesson-phase-tag, .po-lesson .quiz-phase-badge {
    display: inline-block;
    margin-bottom: 18px;
    padding: 6px 12px;
    background: var(--accent);
    color: var(--navy-900);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    border-radius: 0;
    box-shadow: none;
}
.po-lesson .lesson-title, .po-lesson .quiz-page-title {
    margin: 0 0 20px;
    color: #fff;
    font-size: clamp(32px, 4.6vw, 54px);
    line-height: 1.08;
}
.po-lesson .lesson-meta { margin: 0; padding: 0; border: 0; gap: 22px; flex-wrap: wrap; color: rgba(255, 255, 255, .78); font-size: 15px; font-weight: 600; }
.po-lesson .lesson-meta svg { color: var(--accent); }
.lesson-hero--quiz .lesson-hero__inner { text-align: center; }
.po-lesson .quiz-page-header { margin: 0; }
.po-lesson .quiz-page-subtitle { color: rgba(255, 255, 255, .82); font-size: 18px; }

/* Reading column */
.po-lesson .lesson-container, .po-lesson .quiz-page-container { max-width: 800px; padding: clamp(40px, 5vw, 64px) 24px clamp(64px, 8vw, 100px); }
.po-lesson .lesson-content > p:first-child { font-size: 20px; color: var(--ink); }
.po-lesson .lesson-content p { font-size: 18px; line-height: 1.75; color: var(--ink-soft); }
.po-lesson .lesson-content li { font-size: 17px; color: var(--ink-soft); }
.po-lesson .lesson-content li::marker { color: var(--navy); font-weight: 700; }
.po-lesson .lesson-content strong { color: var(--ink); }
.po-lesson .lesson-content h2 { margin: 56px 0 18px; color: var(--navy); font-size: clamp(24px, 2.6vw, 30px); line-height: 1.15; }
.po-lesson .lesson-content h3 { margin: 36px 0 14px; color: var(--navy); font-size: 20px; line-height: 1.25; }
.po-lesson .lesson-content a:not([class]) { color: var(--navy); font-weight: 600; text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: 3px; }

.po-lesson .lesson-content h4 { color: var(--navy); }
.po-lesson .mvp-card, .po-lesson .tool-card { background: #fff; border: 2px solid var(--line); box-shadow: none; }
.po-lesson .mvp-card:hover, .po-lesson .tool-card:hover { border-color: var(--navy); transform: none; }
.po-lesson .example-box { background: var(--mist); border: 0; border-left: 6px solid var(--navy); }
.po-lesson .example-box h4 { color: var(--navy); }
.po-lesson .example-box p { color: var(--ink-soft); }
.po-lesson .warning-box { background: #fff4e0; border: 0; border-left: 6px solid #e07b00; }
.po-lesson .phase-complete { background: var(--navy); border: 0; padding: 40px 32px; box-shadow: 8px 8px 0 var(--accent); }
.po-lesson .phase-complete h3, .po-lesson .phase-complete p { color: #fff; }
.po-lesson .phase-complete a { background: var(--accent); color: var(--navy-900); padding: 14px 26px; font-weight: 700; }
.po-lesson .phase-complete a:hover { background: #fff; }

.po-lesson .key-concept { background: var(--mist); border-left: 6px solid var(--accent); padding: 22px 26px; }
.po-lesson .key-concept h4 { color: var(--navy); font-size: 13px; letter-spacing: .08em; }
.po-lesson .key-concept p { color: var(--ink); }

.po-lesson .quote-box { background: var(--navy); padding: 32px 32px 28px 36px; }
.po-lesson .quote-box::before { color: var(--accent); opacity: 1; top: 14px; left: 18px; }
.po-lesson .quote-box blockquote { color: #fff; font-size: 19px; line-height: 1.55; }
.po-lesson .quote-box cite { color: var(--accent); font-style: normal; font-weight: 600; }

.po-lesson .takeaways-box { background: var(--accent); padding: 30px 32px; }
.po-lesson .takeaways-box h4 { color: var(--navy-900); font-family: var(--font-display); font-size: 20px; }
.po-lesson .takeaways-box li { color: var(--navy-900); }
.po-lesson .takeaways-box li::before { color: var(--navy-900); }

.po-lesson .comparison-table { box-shadow: none; border: 2px solid var(--navy); }
.po-lesson .comparison-table th { background: var(--navy); }
.po-lesson .comparison-table tr:nth-child(even) td { background: var(--mist); }

/* Video */
.po-lesson .video-icon { background: var(--navy) !important; color: var(--accent); }
.po-lesson .video-label { color: var(--navy); font-family: var(--font-display); }
.po-lesson .video-wrapper { box-shadow: 8px 8px 0 var(--accent); }
.po-lesson .video-caption { background: var(--mist); border-left: 6px solid var(--accent); }

/* Activity cards */
.po-lesson .quiz-container,
.po-lesson .interactive-activity,
.po-lesson .scenario-container,
.po-lesson .fill-blank-container,
.po-lesson .matching-container {
    background: #fff !important;
    border: 2px solid var(--navy) !important;
    box-shadow: 8px 8px 0 var(--accent) !important;
    padding: clamp(22px, 3vw, 32px);
}
.po-lesson .quiz-container::before { display: none; }
.po-lesson .quiz-icon, .po-lesson .activity-icon, .po-lesson .scenario-icon,
.po-lesson .fill-blank-icon, .po-lesson .matching-icon {
    background: var(--navy) !important;
    box-shadow: none !important;
}
.po-lesson .quiz-title, .po-lesson .activity-title, .po-lesson .scenario-title,
.po-lesson .fill-blank-title, .po-lesson .matching-title { color: var(--navy) !important; font-size: 19px; }
.po-lesson .quiz-subtitle { color: var(--muted); }
.po-lesson .activity-type { background: var(--accent) !important; color: var(--navy-900) !important; font-weight: 700; }
.po-lesson .quiz-question, .po-lesson .scenario-question, .po-lesson .activity-prompt { color: var(--ink); }
.po-lesson .scenario-story { background: var(--mist); border-left: 4px solid var(--navy); color: var(--ink-soft); }

/* Options */
.po-lesson .quiz-option, .po-lesson .scenario-choice, .po-lesson .matching-item, .po-lesson .question-option {
    background: #fff;
    border: 2px solid var(--line);
    box-shadow: none;
    transition: border-color .15s, background .15s;
}
.po-lesson .quiz-option:hover, .po-lesson .scenario-choice:hover, .po-lesson .matching-item:hover, .po-lesson .question-option:hover { border-color: var(--navy); background: #fff; transform: none; }
.po-lesson .quiz-option.selected, .po-lesson .scenario-choice.selected, .po-lesson .matching-item.selected, .po-lesson .question-option.selected { border-color: var(--navy); background: var(--mist); }
.po-lesson .quiz-option.selected .quiz-option-marker, .po-lesson .scenario-choice.selected .scenario-choice-marker, .po-lesson .question-option.selected .option-marker { background: var(--navy); border-color: var(--navy); color: #fff; }
.po-lesson .quiz-option.correct, .po-lesson .question-option.correct, .po-lesson .matching-item.matched { border-color: #1f9d55; background: #eaf7ef; }
.po-lesson .quiz-option.incorrect, .po-lesson .question-option.incorrect { border-color: #c4372b; background: #fdecea; }
.po-lesson .quiz-option-marker, .po-lesson .scenario-choice-marker, .po-lesson .option-marker { border: 2px solid var(--line); color: var(--navy); font-weight: 700; }

.po-lesson .matching-container p, .po-lesson .matching-item { color: var(--ink) !important; }
.po-lesson .matching-line { background: var(--accent) !important; }
.po-lesson .scenario-choice-text, .po-lesson .scenario-choice { color: var(--ink); }

/* Inputs */
.po-lesson .activity-input {
    border: 2px solid var(--line);
    background: #fff;
    font-size: 16px;
    color: var(--ink);
}
.po-lesson .activity-input::placeholder { color: var(--muted); }
.po-lesson .interactive-activity p[style*="#155e75"], .po-lesson .interactive-activity p[style*="#15803d"],
.po-lesson .scenario-container p[style*="#155e75"], .po-lesson .quiz-container p[style*="#155e75"] {
    padding: 12px 16px;
    background: var(--mist);
    border-left: 4px solid var(--accent);
    color: var(--ink-soft) !important;
}
.po-lesson .activity-input:focus { border-color: var(--navy); box-shadow: 4px 4px 0 var(--accent); outline: none; }
.po-lesson .blank-input { border: 0; border-bottom: 3px solid var(--navy); background: var(--mist); color: var(--navy); font-weight: 600; }
.po-lesson .blank-input:focus { border-bottom-color: var(--accent); box-shadow: none; outline: none; }
.po-lesson .blank-input.correct { border-bottom-color: #1f9d55; background: #eaf7ef; }
.po-lesson .blank-input.incorrect { border-bottom-color: #c4372b; background: #fdecea; }
.po-lesson .model-response { background: var(--mist); border: 0; border-left: 6px solid var(--accent); }
.po-lesson .model-response-title { color: var(--navy); }

/* Buttons */
.po-lesson .quiz-check-btn, .po-lesson .activity-btn-primary, .po-lesson .quiz-submit-btn,
.po-lesson .lesson-nav-btn.next, .po-lesson .lesson-complete-actions a:first-child, .po-lesson .lesson-complete-actions button:first-child {
    background: var(--navy) !important;
    color: #fff !important;
    border: 2px solid var(--navy) !important;
    box-shadow: none !important;
    font-family: var(--font-body);
    font-weight: 700;
    transform: none;
    transition: background .2s, color .2s, border-color .2s;
}
.po-lesson .quiz-check-btn:hover:not(:disabled), .po-lesson .activity-btn-primary:hover, .po-lesson .quiz-submit-btn:hover:not(:disabled),
.po-lesson .lesson-nav-btn.next:hover {
    background: var(--accent) !important;
    border-color: var(--accent) !important;
    color: var(--navy-900) !important;
    transform: none;
}
.po-lesson .quiz-check-btn:disabled, .po-lesson .quiz-submit-btn:disabled { background: var(--line) !important; border-color: var(--line) !important; color: var(--muted) !important; opacity: 1; }
.po-lesson .activity-btn-secondary, .po-lesson .lesson-nav-btn.prev {
    background: transparent;
    color: var(--navy);
    border: 2px solid var(--navy);
    font-weight: 700;
}
.po-lesson .activity-btn-secondary:hover, .po-lesson .lesson-nav-btn.prev:hover { background: var(--navy); color: #fff; }
.po-lesson .lesson-nav { border-top: 2px solid var(--line); }
.po-lesson .lesson-nav-btn { padding: 16px 24px; }

/* Simulations: one dark navy palette instead of a different hue per game */
.po-lesson .slider-simulation, .po-lesson .scenario-game, .po-lesson .builder-exercise, .po-lesson .whatif-comparison,
.po-lesson .constraint-puzzle, .po-lesson .timed-decision, .po-lesson .forecast-game, .po-lesson .pattern-drill {
    background: var(--navy-900) !important;
    border: 0 !important;
    box-shadow: 8px 8px 0 var(--accent) !important;
}
.po-lesson :is(.slider-simulation, .scenario-game, .builder-exercise, .whatif-comparison, .constraint-puzzle, .timed-decision, .forecast-game, .pattern-drill, .control-room) strong { color: var(--accent); }
.po-lesson .slider-simulation-icon, .po-lesson .scenario-game-icon, .po-lesson .builder-icon, .po-lesson .puzzle-icon,
.po-lesson .timed-icon, .po-lesson .forecast-icon, .po-lesson .pattern-icon {
    background: var(--accent) !important;
    box-shadow: none !important;
}
.po-lesson .scenario-next-btn, .po-lesson .lock-prediction-btn, .po-lesson .toggle-option.active {
    background: var(--accent) !important;
    color: var(--navy-900) !important;
    box-shadow: none !important;
}
.po-lesson .slider-input::-webkit-slider-thumb, .po-lesson .forecast-slider::-webkit-slider-thumb { background: var(--accent) !important; box-shadow: none !important; }
.po-lesson .dropped-item { background: var(--accent) !important; color: var(--navy-900) !important; }

/* Progress + points */
.po-lesson .lesson-progress-bar { top: 0; height: 5px; background: var(--accent); z-index: 1001; }
.po-lesson .points-display {
    top: auto; bottom: 20px; right: 20px;
    padding: 10px 16px;
    background: var(--navy);
    border: 0;
    box-shadow: 4px 4px 0 var(--accent);
    color: #fff;
}
.po-lesson .points-icon { font-size: 18px; }
.po-lesson .points-value { color: var(--accent); font-size: 18px; }
.po-lesson .points-label { color: rgba(255, 255, 255, .75); }
.po-lesson .points-earned { background: var(--accent); border: 3px solid var(--navy-900); color: var(--navy-900); }

/* Unit quiz pages */
.po-lesson .quiz-progress-header {
    position: sticky; top: calc(var(--header-h) + 12px); z-index: 5;
    background: var(--navy);
    color: #fff;
    border: 0;
    box-shadow: 4px 4px 0 var(--accent);
}
.po-lesson .quiz-progress-text { color: #fff; }
.po-lesson .quiz-score { color: var(--accent); font-family: var(--font-display); }
.po-lesson .quiz-question-card { background: #fff; border: 2px solid var(--line); box-shadow: none; }
.po-lesson .quiz-question-card.correct { border-color: #1f9d55; }
.po-lesson .quiz-question-card.incorrect { border-color: #c4372b; }
.po-lesson .question-number { background: var(--navy); color: var(--accent); border-radius: 0; font-family: var(--font-display); }
.po-lesson .question-text { color: var(--ink); font-weight: 700; }
.po-lesson .question-explanation { background: var(--mist); border-left: 6px solid var(--accent); color: var(--ink-soft); }
.po-lesson .quiz-results { border: 2px solid var(--navy); box-shadow: 8px 8px 0 var(--accent); }
.po-lesson .results-title { color: var(--navy); }
.po-lesson .results-score { color: var(--navy); font-family: var(--font-display); }

@media (max-width: 760px) {
    .lesson-hero::after { width: 180px; height: 180px; right: -60px; top: -50px; }
    .po-lesson .lesson-content > p:first-child { font-size: 18px; }
    .po-lesson .lesson-content p { font-size: 17px; }
    .po-lesson .quiz-container, .po-lesson .interactive-activity, .po-lesson .scenario-container,
    .po-lesson .fill-blank-container, .po-lesson .matching-container { box-shadow: 5px 5px 0 var(--accent) !important; }
    .po-lesson .points-display { bottom: 14px; right: 14px; }
}
