/* =====================================================
   E-voque Learning — style.css
   ===================================================== */

/* --- Google Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700;800&family=Open+Sans:wght@400;500;600&display=swap');

/* --- CSS Variables --- */
:root {
    --primary:      #C41230;
    --primary-dark: #9e0e26;
    --primary-light:#fdf0f2;
    --dark:         #1C1C28;
    --light-bg:     #F5F5F7;
    --text:         #2C2C3A;
    --text-muted:   #6b7280;
    --success:      #27AE60;
    --success-light:#edfaf3;
    --warning:      #f59e0b;
    --warning-light:#fffbeb;
    --border:       #e5e7eb;
    --white:        #ffffff;
    --shadow-sm:    0 1px 3px rgba(0,0,0,.10);
    --shadow-md:    0 4px 12px rgba(0,0,0,.12);
    --shadow-lg:    0 8px 30px rgba(0,0,0,.14);
    --radius:       10px;
    --radius-lg:    16px;
    --transition:   .22s ease;
}

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; scroll-behavior: smooth; }

body {
    font-family: 'Open Sans', sans-serif;
    color: var(--text);
    background: var(--light-bg);
    line-height: 1.7;
    min-height: 100vh;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    line-height: 1.3;
    color: var(--dark);
}

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

img { max-width: 100%; display: block; }

ul, ol { padding-left: 1.4rem; }
li { margin-bottom: .35rem; }

/* =====================================================
   NAVBAR
   ===================================================== */
.navbar {
    background: var(--dark);
    padding: 0 2rem;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-md);
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: .75rem;
    text-decoration: none;
}

.navbar-brand .brand-icon {
    width: 36px;
    height: 36px;
    background: var(--primary);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Montserrat', sans-serif;
    font-weight: 800;
    color: #fff;
    font-size: 1rem;
    flex-shrink: 0;
}

.navbar-brand .brand-text {
    color: #fff;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 1.1rem;
    letter-spacing: -.01em;
}

.navbar-brand .brand-text span {
    color: var(--primary);
}

.navbar-user {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.navbar-user .user-name {
    color: #d1d5db;
    font-size: .9rem;
    font-weight: 500;
}

.navbar-user .user-avatar {
    width: 34px;
    height: 34px;
    background: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 700;
    font-size: .85rem;
    font-family: 'Montserrat', sans-serif;
}

/* =====================================================
   BUTTONS
   ===================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    padding: .62rem 1.4rem;
    border-radius: var(--radius);
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    font-size: .9rem;
    cursor: pointer;
    border: 2px solid transparent;
    transition: background var(--transition), color var(--transition), border-color var(--transition), box-shadow var(--transition), transform var(--transition);
    text-decoration: none;
    white-space: nowrap;
    line-height: 1.2;
}

.btn:hover { text-decoration: none; transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn:active { transform: translateY(0); box-shadow: var(--shadow-sm); }

.btn-primary {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}
.btn-primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); color: #fff; }

.btn-outline {
    background: transparent;
    color: var(--primary);
    border-color: var(--primary);
}
.btn-outline:hover { background: var(--primary); color: #fff; }

.btn-success {
    background: var(--success);
    color: #fff;
    border-color: var(--success);
}
.btn-success:hover { background: #1e9650; border-color: #1e9650; color: #fff; }

.btn-dark {
    background: var(--dark);
    color: #fff;
    border-color: var(--dark);
}
.btn-dark:hover { background: #2d2d3e; color: #fff; }

.btn-ghost {
    background: transparent;
    color: var(--text-muted);
    border-color: var(--border);
}
.btn-ghost:hover { background: var(--light-bg); color: var(--text); }

.btn-sm { padding: .42rem 1rem; font-size: .82rem; }
.btn-lg { padding: .85rem 2rem; font-size: 1rem; }

.btn-block { width: 100%; justify-content: center; }

/* =====================================================
   LOGIN PAGE
   ===================================================== */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--dark) 0%, #2d2d44 100%);
    padding: 2rem 1rem;
}

.login-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 2.8rem 2.6rem;
    width: 100%;
    max-width: 420px;
    box-shadow: var(--shadow-lg);
}

.login-logo {
    text-align: center;
    margin-bottom: 2rem;
}

.login-logo .logo-icon {
    width: 64px;
    height: 64px;
    background: var(--primary);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Montserrat', sans-serif;
    font-weight: 800;
    color: #fff;
    font-size: 1.6rem;
    margin: 0 auto 1rem;
}

.login-logo h1 {
    font-size: 1.6rem;
    color: var(--dark);
    margin-bottom: .25rem;
}

.login-logo p {
    color: var(--text-muted);
    font-size: .9rem;
}

.form-group {
    margin-bottom: 1.2rem;
}

.form-group label {
    display: block;
    font-weight: 600;
    font-size: .88rem;
    margin-bottom: .45rem;
    color: var(--text);
    font-family: 'Montserrat', sans-serif;
}

.form-control {
    width: 100%;
    padding: .72rem 1rem;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    font-family: 'Open Sans', sans-serif;
    font-size: .95rem;
    color: var(--text);
    background: var(--white);
    transition: border-color var(--transition), box-shadow var(--transition);
    outline: none;
}

.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(196,18,48,.13);
}

.form-control::placeholder { color: #9ca3af; }

.login-hint {
    margin-top: 1.6rem;
    background: var(--light-bg);
    border-radius: var(--radius);
    padding: 1rem 1.1rem;
    font-size: .82rem;
    color: var(--text-muted);
}

.login-hint strong { color: var(--text); }

.alert {
    padding: .82rem 1rem;
    border-radius: var(--radius);
    margin-bottom: 1.2rem;
    font-size: .9rem;
    font-weight: 500;
}

.alert-danger { background: #fee2e2; color: #b91c1c; border: 1px solid #fca5a5; }
.alert-success { background: var(--success-light); color: #166534; border: 1px solid #86efac; }

/* =====================================================
   DASHBOARD
   ===================================================== */
.dashboard {
    max-width: 1100px;
    margin: 0 auto;
    padding: 2.5rem 2rem;
}

.welcome-banner {
    background: linear-gradient(135deg, var(--dark) 0%, #2d2d44 100%);
    border-radius: var(--radius-lg);
    padding: 2.2rem 2.5rem;
    margin-bottom: 2.2rem;
    color: #fff;
    position: relative;
    overflow: hidden;
}

.welcome-banner::before {
    content: '';
    position: absolute;
    top: -40px; right: -40px;
    width: 200px; height: 200px;
    background: rgba(196,18,48,.18);
    border-radius: 50%;
}

.welcome-banner::after {
    content: '';
    position: absolute;
    bottom: -60px; right: 80px;
    width: 140px; height: 140px;
    background: rgba(196,18,48,.10);
    border-radius: 50%;
}

.welcome-banner h2 {
    color: #fff;
    font-size: 1.6rem;
    margin-bottom: .4rem;
    position: relative;
    z-index: 1;
}

.welcome-banner p {
    color: #9ca3af;
    font-size: .95rem;
    position: relative;
    z-index: 1;
}

.welcome-banner .course-badge {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    background: rgba(196,18,48,.25);
    border: 1px solid rgba(196,18,48,.4);
    color: #fca5a5;
    padding: .35rem .9rem;
    border-radius: 999px;
    font-size: .8rem;
    font-weight: 600;
    font-family: 'Montserrat', sans-serif;
    margin-bottom: .85rem;
    position: relative;
    z-index: 1;
}

.chapters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.6rem;
}

/* =====================================================
   CHAPTER CARDS
   ===================================================== */
.chapter-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 2px solid var(--border);
    transition: box-shadow var(--transition), border-color var(--transition), transform var(--transition);
    overflow: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
}

.chapter-card:hover {
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
    transform: translateY(-2px);
}

.chapter-card.locked {
    opacity: .88;
}

.chapter-card.locked:hover {
    border-color: var(--border);
    transform: none;
    box-shadow: var(--shadow-sm);
}

.card-header-stripe {
    height: 6px;
    background: var(--primary);
}

.chapter-card.locked .card-header-stripe {
    background: #d1d5db;
}

.card-body {
    padding: 1.8rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.chapter-number {
    width: 52px;
    height: 52px;
    background: var(--primary-light);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Montserrat', sans-serif;
    font-weight: 800;
    color: var(--primary);
    font-size: 1.4rem;
    margin-bottom: 1rem;
    flex-shrink: 0;
}

.chapter-card.locked .chapter-number {
    background: #f3f4f6;
    color: #9ca3af;
}

.chapter-card h3 {
    font-size: 1rem;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .05em;
    margin-bottom: .3rem;
}

.chapter-card h2 {
    font-size: 1.22rem;
    margin-bottom: .7rem;
}

.chapter-card p {
    color: var(--text-muted);
    font-size: .9rem;
    margin-bottom: 1.2rem;
    flex: 1;
}

/* Badge */
.badge {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .28rem .75rem;
    border-radius: 999px;
    font-size: .78rem;
    font-weight: 600;
    font-family: 'Montserrat', sans-serif;
    margin-bottom: 1rem;
}

.badge-not-started { background: #f3f4f6; color: var(--text-muted); }
.badge-in-progress { background: var(--warning-light); color: #92400e; }
.badge-passed      { background: var(--success-light); color: #166534; }
.badge-locked      { background: #f3f4f6; color: #9ca3af; }

/* Progress bar */
.progress-bar {
    background: #e5e7eb;
    border-radius: 999px;
    height: 8px;
    overflow: hidden;
    margin-bottom: 1rem;
}

.progress-fill {
    height: 100%;
    background: var(--primary);
    border-radius: 999px;
    transition: width .5s ease;
}

.progress-fill.success { background: var(--success); }

.progress-label {
    font-size: .8rem;
    color: var(--text-muted);
    margin-bottom: .45rem;
    font-weight: 500;
}

.lock-overlay {
    display: flex;
    align-items: center;
    gap: .6rem;
    color: var(--text-muted);
    font-size: .88rem;
    font-weight: 600;
    padding: .7rem 1rem;
    background: #f9fafb;
    border-radius: var(--radius);
    border: 1px dashed #d1d5db;
}

.lock-overlay .lock-icon {
    font-size: 1.1rem;
    flex-shrink: 0;
}

/* =====================================================
   LEARN LAYOUT
   ===================================================== */
.learn-layout {
    display: flex;
    min-height: calc(100vh - 64px);
}

/* Sidebar */
.section-nav {
    width: 250px;
    flex-shrink: 0;
    background: var(--white);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 64px;
    height: calc(100vh - 64px);
    overflow-y: auto;
}

.section-nav-header {
    padding: 1.4rem 1.4rem 1rem;
    border-bottom: 1px solid var(--border);
}

/* Desktop: toggle hidden, list always visible, wrapper is transparent */
.sidebar-toggle { display: none; }
.section-list-wrap { display: block; }

.section-nav-header h3 {
    font-size: .85rem;
    text-transform: uppercase;
    letter-spacing: .07em;
    color: var(--text-muted);
    margin-bottom: .3rem;
}

.section-nav-header .chapter-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--dark);
}

.section-list {
    list-style: none;
    padding: .75rem 0;
    flex: 1;
    margin: 0;
}

.section-list li { margin: 0; }

.section-list a {
    display: flex;
    align-items: flex-start;
    gap: .75rem;
    padding: .65rem 1.4rem;
    color: var(--text-muted);
    font-size: .875rem;
    font-weight: 500;
    text-decoration: none;
    transition: background var(--transition), color var(--transition);
    cursor: pointer;
    border-left: 3px solid transparent;
    line-height: 1.4;
}

.section-list a:hover {
    background: var(--light-bg);
    color: var(--text);
    text-decoration: none;
}

.section-list a.active {
    background: var(--primary-light);
    color: var(--primary);
    border-left-color: var(--primary);
    font-weight: 600;
}

.section-list a.completed {
    color: var(--success);
}

.section-list .section-num {
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    background: #e5e7eb;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .72rem;
    font-weight: 700;
    font-family: 'Montserrat', sans-serif;
    margin-top: .05rem;
}

.section-list a.active .section-num {
    background: var(--primary);
    color: #fff;
}

.section-list a.completed .section-num {
    background: var(--success);
    color: #fff;
}

/* Main content area */
.learn-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.learn-topbar {
    padding: 1.1rem 2rem;
    background: var(--white);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.learn-topbar .back-link {
    color: var(--text-muted);
    font-size: .88rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: .35rem;
    text-decoration: none;
    flex-shrink: 0;
}
.learn-topbar .back-link:hover { color: var(--primary); text-decoration: none; }

.learn-topbar .chapter-meta {
    flex: 1;
    min-width: 0;
}

.learn-topbar .chapter-meta h2 {
    font-size: 1rem;
    margin-bottom: .1rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.learn-topbar .progress-text {
    font-size: .8rem;
    color: var(--text-muted);
    margin-bottom: .35rem;
}

.learn-topbar .progress-bar {
    height: 5px;
    margin-bottom: 0;
    max-width: 300px;
}

/* Content area */
.content-area {
    flex: 1;
    padding: 2.2rem 2.5rem;
    max-width: 820px;
}

.content-section {
    animation: fadeIn .3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

.content-section h1 {
    font-size: 1.65rem;
    margin-bottom: .5rem;
    color: var(--dark);
}

.section-subtitle {
    color: var(--text-muted);
    font-size: .95rem;
    margin-bottom: 1.8rem;
    padding-bottom: 1.2rem;
    border-bottom: 1px solid var(--border);
}

.content-section p {
    margin-bottom: 1.1rem;
    color: var(--text);
}

.content-section h2 {
    font-size: 1.2rem;
    margin: 1.8rem 0 .75rem;
    color: var(--dark);
}

.content-section h3 {
    font-size: 1.05rem;
    margin: 1.4rem 0 .6rem;
    color: var(--dark);
}

/* Key Concept Box */
.key-concept {
    background: var(--primary-light);
    border-left: 4px solid var(--primary);
    border-radius: 0 var(--radius) var(--radius) 0;
    padding: 1.1rem 1.4rem;
    margin: 1.4rem 0;
}

.key-concept .kc-label {
    font-family: 'Montserrat', sans-serif;
    font-size: .78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .07em;
    color: var(--primary);
    margin-bottom: .4rem;
}

.key-concept p { margin: 0; color: var(--dark); }

/* Quote */
.quote-box {
    background: #f8f9fa;
    border-left: 4px solid var(--dark);
    border-radius: 0 var(--radius) var(--radius) 0;
    padding: 1.1rem 1.4rem;
    margin: 1.4rem 0;
    font-style: italic;
    color: var(--text-muted);
}

.quote-box cite {
    display: block;
    margin-top: .5rem;
    font-style: normal;
    font-size: .82rem;
    font-weight: 600;
    color: var(--text);
}

/* Example Box */
.example-box {
    background: #f3f4f6;
    border-radius: var(--radius);
    padding: 1.1rem 1.4rem;
    margin: 1.2rem 0;
}

.example-box .ex-label {
    font-family: 'Montserrat', sans-serif;
    font-size: .78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .07em;
    color: var(--text-muted);
    margin-bottom: .5rem;
}

.example-box p, .example-box li {
    font-style: italic;
    color: var(--text);
    margin-bottom: .3rem;
}

.example-box .speaker {
    font-style: normal;
    font-weight: 600;
    color: var(--dark);
    margin-right: .4rem;
}

.example-box .lang-label {
    font-size: .75rem;
    font-weight: 600;
    background: var(--dark);
    color: #fff;
    padding: .15rem .5rem;
    border-radius: 4px;
    margin-right: .4rem;
    font-style: normal;
}

/* Exercise Box */
.exercise-box {
    background: var(--warning-light);
    border: 2px solid #fcd34d;
    border-radius: var(--radius-lg);
    padding: 1.5rem 1.6rem;
    margin: 1.6rem 0;
}

.exercise-box .ex-header {
    display: flex;
    align-items: center;
    gap: .6rem;
    margin-bottom: 1rem;
}

.exercise-box .ex-icon {
    width: 32px;
    height: 32px;
    background: var(--warning);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
}

.exercise-box .ex-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    color: #92400e;
}

.exercise-box .ex-prompt {
    font-size: .9rem;
    color: #78350f;
    margin-bottom: 1rem;
}

.exercise-item {
    margin-bottom: 1.1rem;
}

.exercise-item .ex-phrase {
    font-weight: 600;
    color: var(--dark);
    margin-bottom: .4rem;
    font-style: italic;
}

.exercise-textarea {
    width: 100%;
    border: 2px solid #fcd34d;
    border-radius: var(--radius);
    padding: .65rem .9rem;
    font-family: 'Open Sans', sans-serif;
    font-size: .9rem;
    resize: vertical;
    min-height: 70px;
    outline: none;
    background: #fff;
    color: var(--text);
    transition: border-color var(--transition);
}

.exercise-textarea:focus {
    border-color: var(--warning);
    box-shadow: 0 0 0 3px rgba(245,158,11,.15);
}

.char-counter {
    font-size: .75rem;
    color: var(--text-muted);
    text-align: right;
    margin-top: .25rem;
}

/* Comparison / Styled Table */
.comparison-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.4rem 0;
    font-size: .9rem;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.comparison-table th {
    background: var(--dark);
    color: #fff;
    padding: .8rem 1rem;
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    font-size: .85rem;
    text-align: left;
}

.comparison-table th.col-sem { background: #2d5986; }
.comparison-table th.col-prag { background: #1a6645; }

.comparison-table td {
    padding: .75rem 1rem;
    border-bottom: 1px solid var(--border);
    vertical-align: top;
    color: var(--text);
}

.comparison-table tr:nth-child(even) td { background: #f9fafb; }
.comparison-table tr:last-child td { border-bottom: none; }

.comparison-table td strong { color: var(--dark); }

/* Register / Translation Table */
.register-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.2rem 0;
    font-size: .88rem;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.register-table th {
    background: var(--dark);
    color: #fff;
    padding: .7rem 1rem;
    font-family: 'Montserrat', sans-serif;
    font-size: .82rem;
    font-weight: 600;
    text-align: left;
}

.register-table td {
    padding: .65rem 1rem;
    border-bottom: 1px solid var(--border);
    vertical-align: top;
}

.register-table tr:nth-child(even) td { background: #f9fafb; }
.register-table tr:last-child td { border-bottom: none; }

.register-table .wrong { color: #b91c1c; }
.register-table .right { color: #166534; font-weight: 600; }

/* Flow diagram (Source → Target) */
.flow-diagram {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: var(--light-bg);
    border-radius: var(--radius-lg);
    padding: 1.4rem 2rem;
    margin: 1.4rem 0;
    flex-wrap: wrap;
    justify-content: center;
}

.flow-node {
    text-align: center;
    flex: 1;
    min-width: 100px;
}

.flow-node .node-box {
    background: var(--white);
    border: 2px solid var(--border);
    border-radius: var(--radius);
    padding: .7rem 1.1rem;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: .95rem;
    color: var(--dark);
    margin-bottom: .35rem;
}

.flow-node.primary-node .node-box {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

.flow-node .node-label {
    font-size: .75rem;
    color: var(--text-muted);
    font-weight: 600;
}

.flow-arrow {
    color: var(--primary);
    font-size: 1.5rem;
    font-weight: 700;
    flex-shrink: 0;
}

/* Info list */
.info-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.info-list li {
    display: flex;
    align-items: flex-start;
    gap: .7rem;
    padding: .65rem 0;
    border-bottom: 1px solid var(--border);
    font-size: .93rem;
}

.info-list li:last-child { border-bottom: none; }

.info-list .info-num {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    background: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: .72rem;
    font-weight: 700;
    font-family: 'Montserrat', sans-serif;
    margin-top: .15rem;
}

/* Section navigation bottom */
.section-nav-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 3rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
    gap: 1rem;
    flex-wrap: wrap;
}

/* =====================================================
   EXAM PAGE
   ===================================================== */
.exam-page {
    max-width: 800px;
    margin: 0 auto;
    padding: 2.2rem 2rem;
}

.exam-header {
    margin-bottom: 2rem;
}

.exam-header .exam-label {
    font-family: 'Montserrat', sans-serif;
    font-size: .8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .07em;
    color: var(--primary);
    margin-bottom: .4rem;
}

.exam-header h1 {
    font-size: 1.7rem;
    margin-bottom: .5rem;
}

.exam-instruction {
    background: var(--light-bg);
    border-radius: var(--radius);
    padding: 1rem 1.2rem;
    font-size: .9rem;
    color: var(--text-muted);
    display: flex;
    align-items: flex-start;
    gap: .6rem;
}

.exam-instruction .inst-icon {
    flex-shrink: 0;
    color: var(--primary);
    font-size: 1.1rem;
    margin-top: .05rem;
}

.question-card {
    background: var(--white);
    border: 2px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.6rem;
    margin-bottom: 1.2rem;
    transition: border-color var(--transition);
}

.question-card.unanswered {
    border-color: var(--warning);
}

.question-card.correct-ans { border-color: var(--success); }
.question-card.wrong-ans   { border-color: var(--primary); }

.question-num {
    font-family: 'Montserrat', sans-serif;
    font-size: .78rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-muted);
    letter-spacing: .05em;
    margin-bottom: .6rem;
}

.question-text {
    font-size: 1rem;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 1.1rem;
    line-height: 1.5;
}

.options-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: .55rem;
}

.option-label {
    display: flex;
    align-items: flex-start;
    gap: .75rem;
    padding: .75rem 1rem;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    transition: background var(--transition), border-color var(--transition);
    font-size: .92rem;
    line-height: 1.4;
}

.option-label:hover {
    background: var(--primary-light);
    border-color: var(--primary);
}

.option-label input[type="radio"] {
    flex-shrink: 0;
    margin-top: .22rem;
    accent-color: var(--primary);
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.option-label.selected {
    background: var(--primary-light);
    border-color: var(--primary);
}

.option-label.correct {
    background: var(--success-light);
    border-color: var(--success);
}

.option-label.wrong {
    background: #fee2e2;
    border-color: var(--primary);
}

.option-key {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    background: #e5e7eb;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .75rem;
    font-weight: 700;
    font-family: 'Montserrat', sans-serif;
    color: var(--text-muted);
}

.option-label.correct .option-key { background: var(--success); color: #fff; }
.option-label.wrong .option-key   { background: var(--primary); color: #fff; }
.option-label.selected .option-key { background: var(--primary); color: #fff; }

/* Result Banner */
.result-banner {
    border-radius: var(--radius-lg);
    padding: 2rem 2.2rem;
    margin-bottom: 2rem;
    display: flex;
    align-items: flex-start;
    gap: 1.2rem;
    flex-wrap: wrap;
}

.result-banner.pass {
    background: var(--success-light);
    border: 2px solid var(--success);
}

.result-banner.fail {
    background: #fee2e2;
    border: 2px solid var(--primary);
}

.result-banner .result-icon {
    width: 54px;
    height: 54px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.result-banner.pass .result-icon { background: var(--success); color: #fff; }
.result-banner.fail .result-icon { background: var(--primary); color: #fff; }

.result-banner .result-content { flex: 1; }

.result-banner h2 {
    font-size: 1.4rem;
    margin-bottom: .4rem;
}

.result-banner.pass h2 { color: #166534; }
.result-banner.fail h2 { color: #991b1b; }

.result-banner p { color: var(--text-muted); margin-bottom: .8rem; }

.result-banner .result-actions { display: flex; gap: .75rem; flex-wrap: wrap; }

/* Completed state */
.exam-completed {
    background: var(--success-light);
    border: 2px solid var(--success);
    border-radius: var(--radius-lg);
    padding: 2.5rem 2rem;
    text-align: center;
}

.exam-completed .completed-icon {
    width: 72px;
    height: 72px;
    background: var(--success);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: #fff;
    margin: 0 auto 1.2rem;
}

.exam-completed h2 { color: #166534; margin-bottom: .5rem; }
.exam-completed p  { color: var(--text-muted); margin-bottom: 1.4rem; }

.score-display {
    font-family: 'Montserrat', sans-serif;
    font-size: 3rem;
    font-weight: 800;
    color: var(--success);
    margin-bottom: .2rem;
}

.exam-submit-bar {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}

.error-msg {
    color: var(--primary);
    font-size: .88rem;
    font-weight: 600;
}

/* =====================================================
   SECTION INTERACTION — scroll sentinel + check question
   ===================================================== */

/* Locked Next/Exam button */
.btn-locked {
    opacity: .4 !important;
    cursor: not-allowed !important;
    filter: grayscale(40%);
    pointer-events: none;
}

/* Pulse when unlocked */
@keyframes pulse-green {
    0%   { box-shadow: 0 0 0 0 rgba(39,174,96,.6); }
    70%  { box-shadow: 0 0 0 10px rgba(39,174,96,0); }
    100% { box-shadow: 0 0 0 0 rgba(39,174,96,0); }
}
.btn-pulse { animation: pulse-green .8s ease; }

/* Scroll sentinel — invisible marker at bottom of section */
.scroll-sentinel {
    height: 1px;
    width: 100%;
    margin-top: 2rem;
    visibility: hidden;
}

/* Section check card — hidden until scroll complete */
.section-check {
    display: none;
    background: var(--dark);
    color: #e5e7eb;
    border-radius: var(--radius-lg);
    padding: 1.6rem 1.8rem;
    margin-top: 2rem;
    border-left: 4px solid var(--primary);
    animation: fadeIn .4s ease;
}
.section-check.check-visible { display: block; }

.check-label {
    font-family: 'Montserrat', sans-serif;
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--primary);
    margin-bottom: .6rem;
}
.check-question {
    font-size: 1.05rem;
    font-weight: 600;
    margin-bottom: 1.1rem;
    color: #f3f4f6;
    line-height: 1.5;
}
.check-options {
    display: flex;
    flex-direction: column;
    gap: .55rem;
    margin-bottom: 1rem;
}
.check-option {
    background: rgba(255,255,255,.06);
    border: 1px solid rgba(255,255,255,.12);
    color: #d1d5db;
    border-radius: var(--radius);
    padding: .75rem 1rem;
    text-align: left;
    cursor: pointer;
    font-size: .95rem;
    transition: background var(--transition), border-color var(--transition), color var(--transition);
    font-family: 'Open Sans', sans-serif;
}
.check-option:hover { background: rgba(255,255,255,.12); color: #fff; border-color: rgba(255,255,255,.25); }
.check-option.opt-selected  { border-color: var(--primary); background: rgba(196,18,48,.15); color: #fff; }
.check-option.opt-correct   { border-color: var(--success)!important; background: rgba(39,174,96,.18)!important; color: #86efac!important; }
.check-option.opt-wrong     { border-color: #ef4444!important; background: rgba(239,68,68,.15)!important; color: #fca5a5!important; }

.check-feedback {
    font-size: .9rem;
    padding: .6rem .9rem;
    border-radius: var(--radius);
    font-weight: 500;
    min-height: 1.5rem;
}
.feedback-correct { background: rgba(39,174,96,.2); color: #86efac; }
.feedback-wrong   { background: rgba(239,68,68,.15); color: #fca5a5; }

/* Sidebar — locked sections */
.section-list a.section-locked {
    opacity: .45;
    cursor: default;
    color: var(--text-muted) !important;
}
.section-list a.section-locked::before {
    content: '🔒';
    font-size: .7rem;
    margin-right: .3rem;
}
.section-list a.completed::after {
    content: ' ✓';
    color: var(--success);
    font-weight: 700;
    font-size: .8rem;
}

/* Shake animation for locked sidebar clicks */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20%  { transform: translateX(-6px); }
    40%  { transform: translateX(6px); }
    60%  { transform: translateX(-4px); }
    80%  { transform: translateX(4px); }
}
.section-list li.shake { animation: shake .45s ease; }

/* =====================================================
   RESPONSIVE
   ===================================================== */
@media (max-width: 768px) {
    .navbar { padding: 0 1rem; }
    .navbar-user .user-name { display: none; }

    .learn-layout { flex-direction: column; }

    /* ── Mobile sidebar: collapsible drawer ── */
    .section-nav {
        width: 100%;
        height: auto;
        position: sticky;
        top: 64px;
        z-index: 100;
        border-right: none;
        border-bottom: 1px solid var(--border);
        background: var(--white);
    }

    .section-nav-header {
        padding: 0;
    }

    /* Hide desktop-only labels on mobile */
    .sidebar-desktop-label { display: none; }

    /* Toggle button — full-width tap target */
    .sidebar-toggle {
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        padding: .75rem 1rem;
        background: none;
        border: none;
        cursor: pointer;
        font-size: .85rem;
        font-weight: 600;
        color: var(--text);
        gap: .5rem;
    }
    .sidebar-toggle-crumb {
        flex: 1;
        text-align: left;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        color: var(--primary);
    }
    .sidebar-toggle-arrow {
        font-size: .7rem;
        color: var(--text-muted);
        transition: transform .2s;
        flex-shrink: 0;
    }
    .section-nav.open .sidebar-toggle-arrow {
        transform: rotate(180deg);
    }

    /* List hidden by default on mobile */
    .section-list-wrap {
        display: none;
        border-top: 1px solid var(--border);
        max-height: 55vh;
        overflow-y: auto;
    }
    .section-nav.open .section-list-wrap {
        display: block;
    }

    /* List items inside the drawer */
    .section-list { display: flex; flex-direction: column; padding: .25rem 0; }
    .section-list a {
        padding: .6rem 1rem;
        border-left: none;
        border-bottom: none;
        font-size: .85rem;
        border-left: 3px solid transparent;
    }
    .section-list a.active {
        border-left: 3px solid var(--primary);
        border-bottom: none;
    }

    .learn-topbar { padding: .8rem 1rem; }
    .content-area { padding: 1.4rem 1rem; }

    .exam-page { padding: 1.4rem 1rem; }

    .dashboard { padding: 1.4rem 1rem; }
    .welcome-banner { padding: 1.5rem 1.4rem; }
    .chapters-grid { grid-template-columns: 1fr; }

    .login-card { padding: 2rem 1.4rem; }

    .flow-diagram { padding: 1rem; }

    .comparison-table th, .comparison-table td,
    .register-table th, .register-table td { padding: .55rem .7rem; font-size: .82rem; }

    .section-nav-bottom { flex-direction: column; }
    .section-nav-bottom .btn { width: 100%; justify-content: center; }

    .result-banner { flex-direction: column; }
    .exam-submit-bar { flex-direction: column; }
}

@media (max-width: 480px) {
    .content-area h1 { font-size: 1.35rem; }
    .comparison-table, .register-table { font-size: .78rem; }
}

/* =====================================================
   UTILITIES
   ===================================================== */
.text-center { text-align: center; }
.text-muted  { color: var(--text-muted); }
.mt-1 { margin-top: .5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: .5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.d-flex { display: flex; }
.gap-2  { gap: 1rem; }
.align-center { align-items: center; }
.flex-wrap { flex-wrap: wrap; }
.fw-bold { font-weight: 700; }
.small { font-size: .85rem; }

/* =====================================================
   RICH INTERACTION TYPES
   ===================================================== */

/* Label color variants per interaction type */
.interaction-scenario .check-label { color: #93c5fd; }
.interaction-tf       .check-label { color: #d8b4fe; }
.interaction-match    .check-label { color: #fcd34d; }
.interaction-sort     .check-label { color: #5eead4; }

/* Scenario: quoted context block */
.scenario-context {
    background: rgba(255,255,255,.07);
    border-left: 3px solid var(--primary);
    padding: .75rem 1rem;
    border-radius: 0 6px 6px 0;
    font-style: italic;
    color: #f1f5f9;
    margin-bottom: 1rem;
    font-size: .9rem;
    line-height: 1.55;
}

/* TF: two-button row */
.tf-options {
    display: flex;
    gap: .75rem;
    margin-bottom: 1rem;
}

/* Match: two-column grid */
.match-instruction {
    font-size: .88rem;
    color: #cbd5e1 !important;
    margin-bottom: .9rem;
    line-height: 1.5;
}
.match-arena {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .75rem;
    margin-bottom: 1rem;
}
.match-col {
    display: flex;
    flex-direction: column;
    gap: .5rem;
}
.match-item {
    background: rgba(255,255,255,.06);
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 6px;
    padding: .6rem .85rem;
    color: var(--text-light);
    cursor: pointer;
    text-align: left;
    font-size: .84rem;
    line-height: 1.4;
    transition: all .2s;
    font-family: 'Open Sans', sans-serif;
}
.match-item:hover:not(.match-paired) { background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.25); }
.match-item.match-selected { border-color: var(--primary); background: rgba(196,18,48,.2); color: #fff; }
.match-item.match-paired   { border-color: #64748b; color: #94a3b8; cursor: default; }
.match-item.match-correct  { border-color: var(--success)!important; background: rgba(39,174,96,.18)!important; color: #86efac!important; }
.match-item.match-wrong    { border-color: #ef4444!important; background: rgba(239,68,68,.15)!important; color: #fca5a5!important; }

/* Sort: stacked clickable items */
.sort-arena {
    display: flex;
    flex-direction: column;
    gap: .5rem;
    margin-bottom: 1rem;
}
.sort-item {
    background: rgba(255,255,255,.06);
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 6px;
    padding: .65rem .9rem;
    color: var(--text-light);
    cursor: pointer;
    text-align: left;
    font-size: .88rem;
    line-height: 1.45;
    transition: all .2s;
    font-family: 'Open Sans', sans-serif;
}
.sort-item:hover:not(.sort-selected) { background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.25); }
.sort-item.sort-selected { border-color: var(--primary); background: rgba(196,18,48,.18); color: #fff; cursor: default; font-weight: 600; }
.sort-item.sort-correct  { border-color: var(--success)!important; background: rgba(39,174,96,.18)!important; color: #86efac!important; }
.sort-item.sort-wrong    { border-color: #ef4444!important; background: rgba(239,68,68,.15)!important; color: #fca5a5!important; }

/* Shared verify button for match + sort */
.match-verify-btn, .sort-verify-btn {
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: .65rem 1.4rem;
    font-size: .9rem;
    font-weight: 600;
    cursor: pointer;
    transition: background .2s;
    margin-top: .25rem;
    font-family: 'Open Sans', sans-serif;
}
.match-verify-btn:disabled, .sort-verify-btn:disabled { opacity: .35; cursor: not-allowed; }
.match-verify-btn:not(:disabled):hover, .sort-verify-btn:not(:disabled):hover { background: #a01232; }

/* Select-all-that-apply: stacked toggle items with a checkbox indicator */
.selectall-arena {
    display: flex;
    flex-direction: column;
    gap: .5rem;
    margin-bottom: 1rem;
}
.selectall-item {
    background: rgba(255,255,255,.06);
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 6px;
    padding: .65rem .9rem .65rem 2.4rem;
    position: relative;
    color: var(--text-light);
    cursor: pointer;
    text-align: left;
    font-size: .86rem;
    line-height: 1.45;
    transition: all .2s;
    font-family: 'Open Sans', sans-serif;
}
.selectall-item::before {
    content: "";
    position: absolute;
    left: .85rem; top: 50%; transform: translateY(-50%);
    width: 16px; height: 16px;
    border: 2px solid rgba(255,255,255,.35);
    border-radius: 4px;
    transition: all .15s;
}
.selectall-item:hover:not(.sa-locked) { background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.25); }
.selectall-item.sa-selected { border-color: var(--primary); background: rgba(196,18,48,.18); color: #fff; }
.selectall-item.sa-selected::before { background: var(--primary); border-color: var(--primary); }
.selectall-item.sa-selected::after {
    content: "\2713";
    position: absolute; left: 1.05rem; top: 50%; transform: translateY(-50%);
    color: #fff; font-size: .72rem; font-weight: 700;
}
.selectall-item.sa-correct { border-color: var(--success)!important; background: rgba(39,174,96,.18)!important; color: #86efac!important; }
.selectall-item.sa-correct::before { background: var(--success)!important; border-color: var(--success)!important; }
.selectall-item.sa-wrong   { border-color: #ef4444!important; background: rgba(239,68,68,.15)!important; color: #fca5a5!important; }
.selectall-item.sa-locked  { cursor: default; }
.selectall-verify-btn {
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: .65rem 1.4rem;
    font-size: .9rem;
    font-weight: 600;
    cursor: pointer;
    transition: background .2s;
    margin-top: .25rem;
    font-family: 'Open Sans', sans-serif;
}
.selectall-verify-btn:disabled { opacity: .35; cursor: not-allowed; }
.selectall-verify-btn:not(:disabled):hover { background: #a01232; }

@media (max-width: 600px) {
    .match-arena { grid-template-columns: 1fr; }
    .tf-options  { flex-direction: column; }
}

/* ── Override: .content-section p has higher specificity (0,1,1) than
   single-class interaction selectors (0,1,0). Force correct colors here. ── */
.section-check p,
.section-check .check-question { color: #e2e8f0 !important; }
.content-section .scenario-context { color: #f1f5f9 !important; }
.content-section .match-instruction { color: #cbd5e1 !important; }

/* ── Video gate ─────────────────────────────────────── */
.video-gate-wrap {
    margin: 1.5rem 0 1rem;
}

/* Player box — positions overlay on top of video */
.video-player-box {
    position: relative;
    background: #000;
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    line-height: 0;
}

.video-player-box video {
    width: 100%;
    display: block;
}

/* Click-to-play overlay */
.video-play-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,.35);
    transition: opacity .2s ease;
}

.video-play-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.video-play-icon {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: rgba(255,255,255,.92);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: #c8352a;
    padding-left: 4px; /* optical centering */
    box-shadow: 0 4px 20px rgba(0,0,0,.4);
    transition: transform .15s ease;
}

.video-player-box:hover .video-play-icon {
    transform: scale(1.08);
}

/* Toolbar: note + fullscreen button */
.video-toolbar {
    display: flex;
    align-items: center;
    gap: .75rem;
    margin-top: .65rem;
}

.video-gate-note {
    flex: 1;
    padding: .7rem 1rem;
    background: #1e293b;
    border-left: 3px solid #c8352a;
    border-radius: 0 8px 8px 0;
    font-size: .85rem;
    color: #94a3b8;
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    transition: background .3s, border-color .3s, color .3s;
    margin: 0;
}

.video-gate-note.video-gate-done {
    background: #0f2d1a;
    border-color: #22c55e;
    color: #4ade80;
}

.video-fs-btn {
    flex-shrink: 0;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: .78rem;
    letter-spacing: .04em;
    padding: .6rem 1rem;
    border-radius: 8px;
    border: 2px solid #334155;
    background: transparent;
    color: #64748b;
    cursor: pointer;
    transition: border-color .2s, color .2s;
    white-space: nowrap;
}

.video-fs-btn:hover {
    border-color: #c8352a;
    color: #c8352a;
}

/* Video fills the container when the box div is fullscreened */
.video-player-box:fullscreen,
.video-player-box:-webkit-full-screen,
.video-player-box:-moz-full-screen {
    width: 100vw;
    height: 100vh;
    border-radius: 0;
    background: #000;
}

.video-player-box:fullscreen video,
.video-player-box:-webkit-full-screen video,
.video-player-box:-moz-full-screen video {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* --- Flashcards (module content, reveal-on-tap) --- */
.flashcard-section-label {
    font-family: 'Montserrat', sans-serif;
    font-size: .82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .07em;
    color: var(--primary);
    margin: 1.6rem 0 .25rem;
}
.flashcard-hint-text { font-size: .85rem; color: var(--text-muted); margin-bottom: .9rem; }
.flashcard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin: 1rem 0 1.4rem;
}
.flashcard {
    display: block;
    position: relative;
    background: var(--white);
    border: 1px solid var(--border);
    border-left: 4px solid var(--primary);
    border-radius: var(--radius);
    padding: 1rem 1.1rem;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    transition: box-shadow .2s ease, transform .2s ease;
}
.flashcard:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.flashcard-cb { position: absolute; opacity: 0; width: 0; height: 0; pointer-events: none; }
.flashcard-tag {
    display: block;
    font-family: 'Montserrat', sans-serif;
    font-size: .62rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--text-muted);
    margin-bottom: .3rem;
}
.flashcard-q { font-weight: 700; color: var(--dark); font-size: .95rem; line-height: 1.4; }
.flashcard-a {
    display: none;
    margin-top: .8rem;
    padding-top: .8rem;
    border-top: 1px dashed var(--border);
    font-size: .9rem;
    color: var(--text);
    line-height: 1.5;
}
.flashcard-a .flashcard-tag { color: var(--primary); }
.flashcard-hint-flip {
    display: block;
    margin-top: .7rem;
    font-size: .72rem;
    color: var(--primary);
    font-weight: 600;
    font-style: italic;
}
.flashcard-cb:checked ~ .flashcard-a { display: block; }
.flashcard-cb:checked ~ .flashcard-hint-flip { display: none; }

/* ============================================================
   MODULE 1 REFINEMENTS (client feedback "Ajustes Módulo 1")
   ============================================================ */

/* --- Clean comparison tables (item 3) --- */
.m1-table {
    width: 100%;
    border-collapse: collapse;
    font-size: .88rem;
    margin: 1rem 0 1.4rem;
    border: 1px solid #dbe2ea;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}
.m1-table thead th {
    background: #eaf1f8;
    color: #1f4e79;
    text-align: left;
    font-weight: 700;
    padding: .7rem .9rem;
    border-bottom: 2px solid #cfdcea;
    font-size: .8rem;
    text-transform: uppercase;
    letter-spacing: .03em;
}
.m1-table td {
    padding: .65rem .9rem;
    border-bottom: 1px solid #e6ecf3;
    border-right: 1px solid #eef2f7;
    color: var(--text);
    vertical-align: top;
    line-height: 1.45;
}
.m1-table td:last-child { border-right: none; }
.m1-table tbody tr:nth-child(even) { background: #f6f9fc; }
.m1-table tbody tr:last-child td { border-bottom: none; }
.m1-table td:first-child { font-weight: 600; color: var(--dark); }
.table-lead { color: var(--text); margin-bottom: .3rem; }

/* --- Color-differentiated callouts (item 5) --- */
.callout { border-radius: 10px; padding: 1.05rem 1.3rem; margin: 1.4rem 0; border-left: 5px solid; }
.callout .co-label {
    font-family: 'Montserrat', sans-serif;
    font-size: .74rem; font-weight: 800; text-transform: uppercase;
    letter-spacing: .07em; margin-bottom: .4rem; display: flex; align-items: center; gap: .4rem;
}
.callout p { margin: 0; color: var(--dark); line-height: 1.55; }
/* Professional Tip / Reminder / Patient Safety — RED */
.callout-tip { background: #fdecef; border-left-color: #C41230; }
.callout-tip .co-label { color: #C41230; }
/* Key Idea — GREEN */
.callout-key { background: #e9f7ef; border-left-color: #1e9e57; }
.callout-key .co-label { color: #157347; }
/* Core Definition — BLUE */
.callout-def { background: #eaf1fb; border-left-color: #1f4e79; }
.callout-def .co-label { color: #1f4e79; }

/* --- Mini-case framed card (item 7) --- */
.mini-case {
    position: relative;
    background: #fffaf0;
    border: 1px solid #f3dca6;
    border-left: 5px solid #e0a92e;
    border-radius: 10px;
    padding: 1.05rem 1.3rem 1.05rem 3.2rem;
    margin: 1.5rem 0;
    box-shadow: var(--shadow-sm);
}
.mini-case::before {
    content: "\1F4CB"; /* clipboard */
    position: absolute; left: 1rem; top: 1rem; font-size: 1.3rem;
}
.mini-case .mc-label {
    font-family: 'Montserrat', sans-serif;
    font-size: .74rem; font-weight: 800; text-transform: uppercase;
    letter-spacing: .06em; color: #9a6b12; margin-bottom: .35rem;
}
.mini-case p { margin: 0 0 .5rem; font-style: italic; color: #5b4a25; line-height: 1.55; }
.mini-case p:last-child { margin-bottom: 0; }

/* --- Encouraging transition phrase before activities (item 8) --- */
.transition-cheer {
    background: #eef7f0;
    border: 1px dashed #9ad0ac;
    border-radius: 10px;
    padding: .85rem 1.15rem;
    margin: 1.6rem 0 .5rem;
    color: #157347;
    font-weight: 600;
    display: flex; align-items: center; gap: .55rem;
}
.transition-cheer::before { content: "\2728"; }

/* --- Friendly activity instruction header (item 10) --- */
.activity-instruction {
    background: #f4f7fb;
    border-left: 4px solid #1f4e79;
    border-radius: 0 8px 8px 0;
    padding: .8rem 1.1rem;
    margin-bottom: 1.2rem;
    color: var(--dark);
    line-height: 1.5;
}
.qnum-badge {
    display: inline-block;
    background: #1f4e79; color: #fff;
    font-family: 'Montserrat', sans-serif; font-weight: 700; font-size: .72rem;
    padding: .22rem .7rem; border-radius: 100px; margin-bottom: .6rem;
    letter-spacing: .04em;
}

/* --- Dropdown activity (item, Act 1.3) — lives in a dark .section-check --- */
.dropdown-activity { display: flex; flex-direction: column; gap: .9rem; margin-bottom: 1rem; }
.dropdown-row {
    background: rgba(255,255,255,.05);
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 8px; padding: .8rem .95rem;
}
.dropdown-row .dd-statement { color: #e2e8f0; font-size: .9rem; line-height: 1.45; margin-bottom: .55rem; display: block; }
.dropdown-row select {
    width: 100%; padding: .5rem .6rem; border-radius: 7px;
    border: 1px solid rgba(255,255,255,.25); background: #1f2937; color: #f1f5f9; font-size: .88rem;
}
.dropdown-row.dd-correct { border-color: var(--success); background: rgba(39,174,96,.14); }
.dropdown-row.dd-wrong   { border-color: #ef4444; background: rgba(239,68,68,.12); }
.dropdown-row .dd-feedback { margin-top: .5rem; font-size: .82rem; color: #cbd5e1; display: none; }
.dropdown-row.dd-correct .dd-feedback { display: block; color: #86efac; }
.dropdown-verify-btn {
    background: var(--primary); color: #fff; border: none; border-radius: 8px;
    padding: .6rem 1.4rem; font-size: .9rem; font-weight: 600; cursor: pointer;
    font-family: 'Open Sans', sans-serif;
}
.dropdown-verify-btn:disabled { opacity: .35; cursor: not-allowed; }

/* --- Optional reflection with model feedback reveal (Act 1.4) --- */
.reflection-model {
    display: none;
    margin-top: .9rem; background: #e9f7ef; border-left: 4px solid #1e9e57;
    border-radius: 0 8px 8px 0; padding: .85rem 1.1rem; color: #14532d; line-height: 1.55; font-size: .9rem;
}
.reflection-model.show { display: block; }
.reflection-model .rm-label { font-weight: 800; font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: #157347; margin-bottom: .3rem; }

/* --- Quiz rules as a YELLOW alert (item 12) --- */
.rules-alert {
    background: #fff8e1;
    border: 1px solid #f6d365;
    border-left: 5px solid #e0a92e;
    border-radius: 10px;
    padding: 1.05rem 1.3rem;
    margin: 1.4rem 0;
}
.rules-alert .ra-label {
    font-family: 'Montserrat', sans-serif; font-weight: 800; font-size: .78rem;
    text-transform: uppercase; letter-spacing: .06em; color: #92600a;
    margin-bottom: .5rem; display: flex; align-items: center; gap: .45rem;
}
.rules-alert .ra-label::before { content: "\26A0"; }
.rules-alert p, .rules-alert li { color: #5c4507; line-height: 1.6; }
.rules-alert ul { margin: .5rem 0 0 1.1rem; }

/* --- Quiz results: percentage badge, meta, per-question review (item 13) --- */
.qz-scorecircle {
    width: 128px; height: 128px; border-radius: 50%;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    color: #fff; flex-shrink: 0; box-shadow: var(--shadow-md);
}
.qz-scorecircle .qz-pct { font-family: 'Montserrat', sans-serif; font-size: 2.1rem; font-weight: 800; line-height: 1; }
.qz-scorecircle .qz-state { font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; margin-top: .2rem; }
.qz-scorecircle.pass { background: linear-gradient(135deg,#22c55e,#15803d); }
.qz-scorecircle.fail { background: linear-gradient(135deg,#f87171,#b91c1c); }
.qz-summary { display: flex; gap: 1.6rem; align-items: center; flex-wrap: wrap; background: var(--white); border: 1px solid var(--border); border-radius: 14px; padding: 1.5rem 1.8rem; margin-bottom: 1.6rem; box-shadow: var(--shadow-sm); }
.qz-meta { font-size: .92rem; color: var(--text); line-height: 1.8; }
.qz-meta strong { color: var(--dark); }
.qr-row { border: 1px solid var(--border); border-radius: 10px; padding: 1rem 1.2rem; margin-bottom: .9rem; display: flex; gap: .9rem; align-items: flex-start; }
.qr-row.correct { background: #f0faf3; border-color: #b7e4c7; }
.qr-row.wrong   { background: #fdf0f0; border-color: #f5c2c2; }
.qr-mark { font-size: 1.3rem; line-height: 1.4; flex-shrink: 0; }
.qr-row.correct .qr-mark { color: #157347; }
.qr-row.wrong   .qr-mark { color: #b91c1c; }
.qr-body { flex: 1; }
.qr-q { font-weight: 600; color: var(--dark); margin-bottom: .35rem; line-height: 1.45; }
.qr-ans { font-size: .88rem; color: var(--text); margin: .15rem 0; }
.qr-ans .qr-key { font-weight: 700; }
.qr-ans.right { color: #157347; }
.qr-ans.chosen-wrong { color: #b91c1c; }
.qr-points { font-family: 'Montserrat', sans-serif; font-weight: 800; font-size: .82rem; color: var(--text-muted); white-space: nowrap; }
.qr-hidden-note { font-size: .82rem; color: var(--text-muted); font-style: italic; margin-top: .3rem; }


/* ============================================================
   SOFT REDESIGN — e-voque palette (client feedback round 2)
   Light, airy, low-contrast UI with gentle motion. This block
   intentionally OVERRIDES earlier rules (loaded last wins).
   ============================================================ */
:root {
    --ev-blue:       #2b50c8;
    --ev-blue-dark:  #1e3ca6;
    --ev-blue-soft:  #eef3fc;
    --ev-blue-line:  #dbe4f4;
    --ev-green:      #5f9c4f;
    --ev-green-dark: #4c8140;
    --ev-green-soft: #ecf5e8;
    --ev-rose-soft:  #fcf1f2;
    --ev-amber-soft: #fdfaf2;
}

/* --- Primary actions: e-voque blue; success: soft green --- */
.btn-primary { background: var(--ev-blue); border-color: var(--ev-blue); }
.btn-primary:hover:not(:disabled) { background: var(--ev-blue-dark); border-color: var(--ev-blue-dark); }
.btn-success { background: var(--ev-green); border-color: var(--ev-green); }
.btn-success:hover:not(:disabled) { background: var(--ev-green-dark); border-color: var(--ev-green-dark); }
.btn { transition: background .2s ease, border-color .2s ease, color .2s ease, transform .18s ease, box-shadow .18s ease; }
.btn:not(:disabled):hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(30,60,166,.16); }
.btn:disabled { transform: none; }

/* --- Learn progress + sidebar accents: blue --- */
.progress-fill, .prog-fill { background: var(--ev-blue); }
.section-list a.active { color: var(--ev-blue); border-left-color: var(--ev-blue); background: var(--ev-blue-soft); }
.section-list a.active .section-num { background: var(--ev-blue); color: #fff; }
.section-list a { transition: background .2s ease, color .2s ease, padding-left .2s ease; }
.section-list a:hover:not(.section-locked) { background: var(--ev-blue-soft); }

/* --- Center the reading column (kills the empty right void) --- */
.content-area { margin: 0 auto; max-width: 860px; }

/* ============================================================
   QUESTION PANELS — light theme (was dark navy; too harsh)
   ============================================================ */
.section-check {
    background: #fbfcff;
    color: var(--text);
    border: 1px solid var(--ev-blue-line);
    border-left: 4px solid var(--ev-blue);
    box-shadow: 0 4px 18px rgba(43,80,200,.07);
}
.check-label { color: var(--ev-blue); }
.check-question { color: var(--dark); }
.section-check p,
.section-check .check-question { color: var(--text) !important; }
.content-section .scenario-context { color: var(--text) !important; font-style: italic; }
.content-section .match-instruction { color: var(--text-muted) !important; }

/* Answer options — white cards, gentle motion */
.check-option, .match-item, .sort-item, .selectall-item {
    background: #fff;
    border: 1px solid #d9e1ef;
    color: var(--text);
    box-shadow: 0 1px 2px rgba(30,50,100,.04);
    transition: background .2s ease, border-color .2s ease, color .2s ease, transform .18s ease, box-shadow .18s ease;
}
.check-option:hover, .match-item:hover:not(.match-paired), .sort-item:hover:not(.sort-selected), .selectall-item:hover:not(.sa-locked) {
    background: var(--ev-blue-soft);
    border-color: var(--ev-blue);
    color: var(--dark);
    transform: translateX(4px);
}
.check-option.opt-selected, .match-item.match-selected, .sort-item.sort-selected, .selectall-item.sa-selected {
    background: var(--ev-blue-soft);
    border-color: var(--ev-blue);
    color: var(--ev-blue-dark);
    font-weight: 600;
}
.match-item.match-paired { background: #f4f6fa; border-color: #cfd8e8; color: #8a94a8; }

/* Correct / incorrect — soft pastels + pop / shake */
@keyframes evPop { 0% { transform: scale(1); } 45% { transform: scale(1.03); } 100% { transform: scale(1); } }
.check-option.opt-correct, .match-item.match-correct, .sort-item.sort-correct, .selectall-item.sa-correct {
    background: var(--ev-green-soft) !important;
    border-color: #8dbb7e !important;
    color: #34602a !important;
    animation: evPop .4s ease;
}
.check-option.opt-wrong, .match-item.match-wrong, .sort-item.sort-wrong, .selectall-item.sa-wrong {
    background: #fdf1f1 !important;
    border-color: #e3a7a7 !important;
    color: #a03d3d !important;
    animation: shake .4s ease;
}
.selectall-item::before { border-color: #b9c6dd; background: #fff; }
.selectall-item.sa-selected::before { background: var(--ev-blue); border-color: var(--ev-blue); }
.selectall-item.sa-correct::before { background: var(--ev-green) !important; border-color: var(--ev-green) !important; }

.check-feedback { transition: all .25s ease; }
.feedback-correct { background: var(--ev-green-soft); color: #2f6023; animation: evPop .4s ease; }
.feedback-wrong   { background: #fdf1f1; color: #a03d3d; }

/* Verify buttons: blue */
.match-verify-btn, .sort-verify-btn, .selectall-verify-btn, .dropdown-verify-btn {
    background: var(--ev-blue);
    transition: background .2s ease, transform .18s ease, box-shadow .18s ease;
}
.match-verify-btn:not(:disabled):hover, .sort-verify-btn:not(:disabled):hover,
.selectall-verify-btn:not(:disabled):hover, .dropdown-verify-btn:not(:disabled):hover {
    background: var(--ev-blue-dark);
    transform: translateY(-2px);
    box-shadow: 0 5px 14px rgba(30,60,166,.2);
}

/* Dropdown activity — light */
.dropdown-row { background: #fff; border: 1px solid #d9e1ef; }
.dropdown-row .dd-statement { color: var(--text); }
.dropdown-row select { background: #fff; color: var(--text); border: 1px solid #c6d2e6; }
.dropdown-row select:focus { outline: 2px solid var(--ev-blue-soft); border-color: var(--ev-blue); }
.dropdown-row.dd-correct { border-color: #8dbb7e; background: var(--ev-green-soft); animation: evPop .4s ease; }
.dropdown-row.dd-wrong   { border-color: #e3a7a7; background: #fdf1f1; animation: shake .4s ease; }
.dropdown-row.dd-correct .dd-feedback { color: #34602a; }
.qnum-badge { background: var(--ev-blue); }

/* ============================================================
   SOFTENED CONTENT COMPONENTS (fewer, calmer colors)
   ============================================================ */
.callout-tip { background: var(--ev-rose-soft); border-left-color: #d98a97; }
.callout-tip .co-label { color: #b34a5c; }
.callout-key { background: var(--ev-green-soft); border-left-color: #82b573; }
.callout-key .co-label { color: #3e7d33; }
.callout-def { background: var(--ev-blue-soft); border-left-color: #7f9bdd; }
.callout-def .co-label { color: var(--ev-blue); }
.mini-case { background: var(--ev-amber-soft); border-color: #ecdcb0; border-left-color: #d9b969; box-shadow: none; }
.mini-case .mc-label { color: #93762a; }
.key-concept { background: var(--ev-blue-soft); border-left-color: #7f9bdd; }
.key-concept .kc-label { color: var(--ev-blue); }

.m1-table { border-color: var(--ev-blue-line); box-shadow: 0 2px 10px rgba(43,80,200,.05); }
.m1-table thead th { background: var(--ev-blue-soft); color: var(--ev-blue-dark); border-bottom-color: var(--ev-blue-line); }
.m1-table td { border-color: #eaeff8; }
.m1-table tbody tr { transition: background .18s ease; }
.m1-table tbody tr:hover { background: var(--ev-blue-soft); }
.m1-table tbody tr:nth-child(even) { background: #f8fafd; }

.transition-cheer { background: var(--ev-green-soft); border-color: #a9cf9c; color: #3e7d33; }
.activity-instruction { background: var(--ev-blue-soft); border-left-color: var(--ev-blue); }

.info-list li { transition: background .18s ease, transform .18s ease; border-radius: 8px; }
.info-list li:hover { background: var(--ev-blue-soft); transform: translateX(4px); }
.info-list .info-num { background: var(--ev-blue); color: #fff; }

/* Flashcards — blue accent + lift, animated reveal */
.flashcard { border-left-color: var(--ev-blue); }
.flashcard:hover { box-shadow: 0 8px 22px rgba(43,80,200,.14); transform: translateY(-4px); }
.flashcard-section-label { color: var(--ev-blue); }
.flashcard-a { animation: evFadeUp .35s ease both; }
.flashcard-a .flashcard-tag { color: var(--ev-green-dark); }
.flashcard-hint-flip { color: var(--ev-blue); }

/* ============================================================
   GENTLE ENTRANCE MOTION (staggered fade-up per section)
   ============================================================ */
@keyframes evFadeUp {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: none; }
}
.content-section > * { animation: evFadeUp .5s cubic-bezier(.22,.9,.35,1) both; }
.content-section > *:nth-child(1)  { animation-delay: .00s; }
.content-section > *:nth-child(2)  { animation-delay: .05s; }
.content-section > *:nth-child(3)  { animation-delay: .10s; }
.content-section > *:nth-child(4)  { animation-delay: .15s; }
.content-section > *:nth-child(5)  { animation-delay: .20s; }
.content-section > *:nth-child(6)  { animation-delay: .25s; }
.content-section > *:nth-child(7)  { animation-delay: .30s; }
.content-section > *:nth-child(8)  { animation-delay: .34s; }
.content-section > *:nth-child(9)  { animation-delay: .38s; }
.content-section > *:nth-child(10) { animation-delay: .42s; }
.content-section > *:nth-child(n+11) { animation-delay: .46s; }

/* Section hero illustrations */
.section-hero {
    background: linear-gradient(135deg, #f2f6fd 0%, #eef7f0 100%);
    border: 1px solid var(--ev-blue-line);
    border-radius: 14px;
    padding: .6rem 1rem 0;
    margin: 0 0 1.6rem;
    overflow: hidden;
}
.section-hero svg { width: 100%; height: auto; display: block; max-height: 230px; margin: 0 auto; }

/* Respect users who prefer less motion */
@media (prefers-reduced-motion: reduce) {
    .content-section > *, .flashcard-a, .check-feedback,
    .check-option, .match-item, .sort-item, .selectall-item, .dropdown-row {
        animation: none !important;
        transition: none !important;
    }
}

/* Photo heroes — professional imagery per section */
.section-hero.photo {
    padding: 0;
    border: none;
    background: none;
}
.section-hero.photo img {
    width: 100%;
    max-height: 290px;
    object-fit: cover;
    object-position: center 32%;
    border-radius: 14px;
    display: block;
    box-shadow: 0 8px 26px rgba(30,60,120,.14);
}

/* Fix: transition-cheer was display:flex, which split inline text
   ("Click Next to start...") into separate flex items. Block flow instead. */
.transition-cheer { display: block; }
.transition-cheer::before { content: "✨"; margin-right: .55rem; }

/* Wider reading column — less empty space at the right */
.content-area { max-width: 960px; }

/* ============================================================
   HEADER — light e-voque style (white bar, blue brand)
   ============================================================ */
.navbar {
    background: #ffffff;
    border-bottom: 1px solid var(--ev-blue-line);
    box-shadow: 0 2px 12px rgba(30,60,120,.06);
}
.navbar-brand .brand-icon {
    background: var(--ev-blue);
    box-shadow: 0 3px 10px rgba(43,80,200,.25);
}
.navbar-brand .brand-text { color: var(--dark); }
.navbar-brand .brand-text span { color: var(--ev-blue); }
.navbar-user .user-name { color: var(--text); }
.navbar-user .user-avatar { background: var(--ev-blue); }
.navbar .btn-ghost {
    color: var(--text);
    border: 1px solid #d6deeb;
    background: transparent;
}
.navbar .btn-ghost:hover {
    background: var(--ev-blue-soft);
    color: var(--ev-blue-dark);
    border-color: var(--ev-blue);
}
.navbar .btn-primary { box-shadow: none; }

/* ============================================================
   HEADER v2 — e-voque floating-pill style
   (white pill cards on a soft bar, solid blue action button)
   ============================================================ */
.navbar {
    background: #f6f8fb;
    border-bottom: 1px solid #e7ecf5;
    box-shadow: none;
}
/* Logo inside its own white rounded card */
.navbar-brand {
    background: #ffffff;
    border: 1px solid #e3e9f4;
    border-radius: 14px;
    padding: .38rem .95rem .38rem .45rem;
    box-shadow: 0 2px 10px rgba(30,60,120,.08);
    transition: box-shadow .2s ease, transform .2s ease;
}
.navbar-brand:hover { box-shadow: 0 4px 16px rgba(30,60,120,.14); transform: translateY(-1px); text-decoration: none; }
.navbar-brand .brand-icon {
    width: 32px; height: 32px;
    border-radius: 9px;
    background: var(--ev-blue);
    box-shadow: none;
}
.navbar-brand .brand-text { color: var(--ev-blue-dark); font-size: 1.05rem; }
.navbar-brand .brand-text span { color: var(--ev-blue); font-weight: 600; }

/* Right side: white pill buttons, last one solid blue (like "Apply Now") */
.navbar-user { gap: .7rem; }
.navbar-user .user-name { color: var(--text); font-weight: 600; }
.navbar-user .user-avatar { width: 32px; height: 32px; background: var(--ev-blue); }
.navbar .btn-ghost, .navbar .btn-sm {
    background: #ffffff;
    color: var(--ev-blue-dark);
    border: 1px solid #e3e9f4;
    border-radius: 100px;
    padding: .5rem 1.15rem;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(30,60,120,.06);
}
.navbar .btn-ghost:hover, .navbar .btn-sm:hover {
    background: var(--ev-blue-soft);
    border-color: var(--ev-blue);
    color: var(--ev-blue-dark);
    text-decoration: none;
}
/* The last button in the bar (Log Out) = solid blue pill */
.navbar .navbar-user > .btn:last-child {
    background: var(--ev-blue);
    color: #ffffff;
    border-color: var(--ev-blue);
}
.navbar .navbar-user > .btn:last-child:hover {
    background: var(--ev-blue-dark);
    border-color: var(--ev-blue-dark);
    color: #ffffff;
}
/* Solid-blue primary pills in the bar (e.g. Admin Portal) keep their look */
.navbar .btn-primary {
    border-radius: 100px;
    background: var(--ev-blue);
    border-color: var(--ev-blue);
    color: #fff;
    box-shadow: 0 2px 8px rgba(43,80,200,.25);
}

/* ============================================================
   FLASHCARDS v2 — true 3D flip (question front, answer back)
   ============================================================ */
.flashcard {
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 0;
    height: 210px;
    perspective: 1100px;
    position: relative;
}
.flashcard:hover { transform: none; box-shadow: none; }
.flashcard-q, .flashcard-a {
    position: absolute;
    inset: 0;
    background: #fff;
    border: 1px solid var(--border);
    border-left: 4px solid var(--ev-blue);
    border-top: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem 1.15rem;
    margin: 0;
    box-shadow: var(--shadow-sm);
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    transition: transform .65s cubic-bezier(.35,.1,.25,1), box-shadow .2s ease;
    overflow: auto;
    display: block;
    animation: none;
}
.flashcard:hover .flashcard-q, .flashcard:hover .flashcard-a { box-shadow: 0 8px 22px rgba(43,80,200,.16); }
.flashcard-q { transform: rotateY(0deg); font-weight: 700; }
.flashcard-a { transform: rotateY(-180deg); border-left-color: var(--ev-green); font-size: .9rem; color: var(--text); }
/* backface-visibility alone is not enough: Firefox (and some Chrome builds on
   Windows) ignore it on elements with overflow:auto, so the answer showed
   through before the card was ever flipped. visibility is the belt to that
   suspender; the delay keeps it from popping mid-turn. */
.flashcard-a { visibility: hidden; transition: transform .65s cubic-bezier(.35,.1,.25,1), box-shadow .2s ease, visibility 0s linear .32s; }
.flashcard-cb:checked ~ .flashcard-q { transform: rotateY(180deg); visibility: hidden; transition: transform .65s cubic-bezier(.35,.1,.25,1), box-shadow .2s ease, visibility 0s linear .32s; }
.flashcard-cb:checked ~ .flashcard-a { transform: rotateY(0deg); visibility: visible; }
/* Front hint pinned to the bottom of the card */
.flashcard-hint-flip {
    position: absolute;
    left: 1.15rem;
    bottom: .85rem;
    margin: 0;
    z-index: 3;
    pointer-events: none;
    backface-visibility: hidden;
    transition: opacity .3s ease;
}
.flashcard-cb:checked ~ .flashcard-hint-flip { display: none; }
/* Back-side hint to flip back */
.flashcard-a::after {
    content: "↺ Tap to flip back";
    display: block;
    margin-top: .7rem;
    font-size: .72rem;
    font-style: italic;
    font-weight: 600;
    color: var(--ev-green-dark);
}
@media (prefers-reduced-motion: reduce) {
    .flashcard-q, .flashcard-a { transition: none; }
}

/* ============================================================
   INTERACTIVE CONTENT — tabs & accordions (explore by click)
   ============================================================ */
/* --- Tabs --- */
.ev-tabs {
    background: #fff;
    border: 1px solid var(--ev-blue-line);
    border-radius: 14px;
    box-shadow: 0 2px 12px rgba(43,80,200,.06);
    margin: 1rem 0 1.5rem;
    overflow: hidden;
}
.ev-tab-nav {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem;
    padding: .7rem .8rem;
    background: #f6f8fc;
    border-bottom: 1px solid var(--ev-blue-line);
}
.ev-tab-btn {
    border: 1px solid transparent;
    background: transparent;
    color: var(--text-muted);
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: .85rem;
    padding: .5rem 1.05rem;
    border-radius: 100px;
    cursor: pointer;
    transition: all .2s ease;
}
.ev-tab-btn:hover { color: var(--ev-blue-dark); background: var(--ev-blue-soft); }
.ev-tab-btn.active {
    background: var(--ev-blue);
    color: #fff;
    box-shadow: 0 3px 10px rgba(43,80,200,.25);
}
.ev-tab-pane { display: none; padding: 1.15rem 1.4rem; }
.ev-tab-pane.active { display: block; animation: evFadeUp .35s ease both; }
.ev-facts { list-style: none; padding: 0; margin: 0; }
.ev-facts li {
    padding: .55rem 0 .55rem 1.6rem;
    border-bottom: 1px dashed #e3e9f4;
    position: relative;
    line-height: 1.55;
}
.ev-facts li:last-child { border-bottom: none; }
.ev-facts li::before {
    content: "✓";
    position: absolute; left: .2rem;
    color: var(--ev-green);
    font-weight: 800;
}
.ev-facts li strong { color: var(--dark); }

/* --- Accordion --- */
.ev-acc { display: flex; flex-direction: column; gap: .6rem; margin: 1rem 0 1.5rem; }
.ev-acc-item {
    background: #fff;
    border: 1px solid var(--ev-blue-line);
    border-radius: 12px;
    overflow: hidden;
    transition: box-shadow .2s ease, border-color .2s ease;
}
.ev-acc-item:hover { box-shadow: 0 4px 14px rgba(43,80,200,.10); }
.ev-acc-item.open { border-color: var(--ev-blue); box-shadow: 0 4px 16px rgba(43,80,200,.12); }
.ev-acc-head {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .8rem;
    background: transparent;
    border: none;
    text-align: left;
    padding: .95rem 1.2rem;
    cursor: pointer;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: .95rem;
    color: var(--dark);
    transition: color .2s ease;
}
.ev-acc-head:hover { color: var(--ev-blue-dark); }
.ev-acc-item.open .ev-acc-head { color: var(--ev-blue-dark); }
.ev-acc-icon {
    flex-shrink: 0;
    width: 26px; height: 26px;
    border-radius: 50%;
    background: var(--ev-blue-soft);
    color: var(--ev-blue);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.05rem;
    font-weight: 800;
    transition: transform .3s ease, background .2s ease, color .2s ease;
}
.ev-acc-item.open .ev-acc-icon { transform: rotate(45deg); background: var(--ev-blue); color: #fff; }
.ev-acc-body {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows .35s cubic-bezier(.25,.7,.3,1);
}
.ev-acc-item.open .ev-acc-body { grid-template-rows: 1fr; }
.ev-acc-inner {
    overflow: hidden;
    padding: 0 1.2rem;
    color: var(--text);
    line-height: 1.6;
}
.ev-acc-item.open .ev-acc-inner { padding-bottom: 1.05rem; }
.ev-acc-inner p { margin: 0 0 .5rem; }
.ev-acc-inner p:last-child { margin-bottom: 0; }
.ev-acc-inner .acc-good { color: #2f6023; }
.ev-acc-inner .acc-bad  { color: #a03d3d; }
.ev-hint {
    font-size: .82rem;
    color: var(--ev-blue);
    font-weight: 600;
    margin: 0 0 .5rem;
}
.ev-hint::before { content: "👆 "; }
@media (prefers-reduced-motion: reduce) {
    .ev-tab-pane.active { animation: none; }
    .ev-acc-body { transition: none; }
}

/* ============================================================
   DASHBOARD v2 — e-voque palette (blue hero, soft accents)
   ============================================================ */
.welcome-banner {
    background: linear-gradient(135deg, #2b50c8 0%, #1e3ca6 100%);
}
.welcome-banner::before { background: rgba(255,255,255,.10); }
.welcome-banner::after  { background: rgba(95,156,79,.25); }
.welcome-banner p { color: #dbe4f4; }
.welcome-banner .course-badge {
    background: rgba(255,255,255,.14);
    border: 1px solid rgba(255,255,255,.35);
    color: #ffffff;
}
/* Program progress stats: blue instead of red */
.prog-stat-val { color: var(--ev-blue) !important; }
/* Module cards */
.card-header-stripe { background: linear-gradient(90deg, var(--ev-blue), #5f9c4f); }
.chapter-card:hover { border-color: var(--ev-blue); }
.chapter-number {
    background: var(--ev-blue-soft);
    color: var(--ev-blue);
}
/* Certificate section accent bar */
.cert-section-bar { background: linear-gradient(90deg, var(--ev-blue), #5f9c4f); }

/* ============================================================
   MINI CASE v2 — visual 4-block card (client mockup, ref p.34)
   PATIENT SAYS → WHAT'S HAPPENING → WHAT CAN GO WRONG → TAKEAWAY
   ============================================================ */
.case-card {
    background: #fff;
    border: 1px solid var(--ev-blue-line);
    border-radius: 16px;
    box-shadow: 0 4px 18px rgba(43,80,200,.08);
    margin: 1.6rem 0;
    overflow: hidden;
}
.case-card .cc-head {
    display: flex;
    align-items: center;
    gap: .7rem;
    padding: .85rem 1.25rem;
    background: linear-gradient(90deg, var(--ev-blue-soft), #f2f8f0);
    border-bottom: 1px solid var(--ev-blue-line);
}
.case-card .cc-pill {
    background: var(--ev-blue);
    color: #fff;
    font-family: 'Montserrat', sans-serif;
    font-size: .66rem;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
    padding: .28rem .75rem;
    border-radius: 100px;
    flex-shrink: 0;
}
.case-card .cc-title {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 1rem;
    color: var(--dark);
}
.case-card .cc-body { padding: 1.05rem 1.25rem; display: flex; flex-direction: column; gap: .8rem; }

.cc-block {
    border-radius: 12px;
    padding: .85rem 1.05rem .85rem 3rem;
    position: relative;
    line-height: 1.55;
}
.cc-block .cc-label {
    font-family: 'Montserrat', sans-serif;
    font-size: .68rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .07em;
    margin-bottom: .25rem;
    display: block;
}
.cc-block .cc-icon {
    position: absolute;
    left: .85rem;
    top: .9rem;
    width: 30px; height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .95rem;
    background: #fff;
}
.cc-block p { margin: 0; }

/* Patient/provider quote — blue */
.cc-quote { background: var(--ev-blue-soft); border: 1px solid #d5e0f5; }
.cc-quote .cc-label { color: var(--ev-blue); }
.cc-quote .cc-icon { border: 2px solid var(--ev-blue); }
.cc-quote p { font-style: italic; color: #253b7a; font-size: 1.02rem; }

/* Context / what's happening — neutral */
.cc-context { background: #f7f9fc; border: 1px solid #e4eaf3; }
.cc-context .cc-label { color: #51607a; }
.cc-context .cc-icon { border: 2px solid #8ea2c4; }

/* Risk / what can go wrong — soft amber */
.cc-risk { background: #fdf7ea; border: 1px solid #efdfb5; }
.cc-risk .cc-label { color: #97701c; }
.cc-risk .cc-icon { border: 2px solid #d9b969; }

/* Takeaway — green strip */
.cc-takeaway { background: var(--ev-green-soft); border: 1px solid #c4e0ba; }
.cc-takeaway .cc-label { color: #3e7d33; }
.cc-takeaway .cc-icon { border: 2px solid var(--ev-green); }
.cc-takeaway p { color: #2d5b24; font-weight: 600; }

/* ============================================================
   STANDARDS BADGES — laws & standards as icon cards (ref style)
   ============================================================ */
.std-badges {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: .9rem;
    margin: 1rem 0 1.5rem;
}
.std-badge {
    background: #fff;
    border: 1px solid var(--ev-blue-line);
    border-top: 4px solid var(--ev-blue);
    border-radius: 14px;
    padding: 1.15rem 1.1rem 1rem;
    text-align: center;
    box-shadow: 0 3px 12px rgba(43,80,200,.06);
    transition: transform .2s ease, box-shadow .2s ease;
}
.std-badge:hover { transform: translateY(-4px); box-shadow: 0 8px 22px rgba(43,80,200,.14); }
.std-badge:nth-child(2) { border-top-color: var(--ev-green); }
.std-badge:nth-child(3) { border-top-color: #7f9bdd; }
.std-badge .sb-icon {
    width: 52px; height: 52px;
    margin: 0 auto .6rem;
    border-radius: 50%;
    background: var(--ev-blue-soft);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}
.std-badge .sb-acronym {
    font-family: 'Montserrat', sans-serif;
    font-weight: 800;
    font-size: 1.05rem;
    color: var(--ev-blue-dark);
    letter-spacing: .02em;
}
.std-badge .sb-name {
    font-size: .78rem;
    font-weight: 700;
    color: var(--dark);
    margin: .15rem 0 .4rem;
    line-height: 1.35;
}
.std-badge .sb-desc { font-size: .82rem; color: var(--text-muted); line-height: 1.5; margin: 0; }

/* ============================================================
   FLASHCARDS compact — 3 columns, centered, lower height
   ============================================================ */
.flashcard-grid { grid-template-columns: repeat(3, 1fr); gap: .8rem; }
@media (max-width: 900px) { .flashcard-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .flashcard-grid { grid-template-columns: 1fr; } }
.flashcard { height: 168px; }
.flashcard-q, .flashcard-a {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: .8rem .9rem 1.9rem;
}
.flashcard-q { font-size: .9rem; }
.flashcard-a { font-size: .82rem; line-height: 1.45; }
.flashcard-tag { margin-bottom: .35rem; }
.flashcard-hint-flip { left: 50%; transform: translateX(-50%); bottom: .65rem; white-space: nowrap; font-size: .68rem; }
.flashcard-a::after { margin-top: .45rem; font-size: .66rem; }

/* ============================================================
   OBSERVACIONES M1 — layout & spacing round
   ============================================================ */

/* --- Two-column activities: scenario left, questions right --- */
.activity-split {
    display: grid;
    grid-template-columns: minmax(280px, 5fr) 7fr;
    gap: 1.1rem;
    align-items: start;
}
.activity-split .case-card { margin: 0; }
@media (max-width: 900px) { .activity-split { grid-template-columns: 1fr; } }

/* --- Compact spacing between instruction / scenario / questions --- */
.activity-instruction { margin-bottom: .8rem; }
.section-check { margin-top: .9rem; padding: 1.15rem 1.35rem; }
.section-check .qnum-badge { margin-bottom: .45rem; }
.check-question { margin-bottom: .7rem; }
.check-options { gap: .45rem; margin-bottom: .75rem; }
.case-card .cc-body { padding: .85rem 1.05rem; gap: .6rem; }
.case-card .cc-head { padding: .7rem 1.05rem; }
.content-section .section-subtitle { margin-bottom: 1.2rem; padding-bottom: .8rem; }

/* --- Matching: perfectly aligned rows, equal heights --- */
.match-arena { align-items: stretch; }
.match-col { gap: .5rem; }
.match-col .match-item {
    min-height: 58px;
    display: flex;
    align-items: center;
    width: 100%;
}

/* --- Flashcards: balanced grids (no orphan gaps) ---
   4-card groups → 2×2 ; 8-card groups → 2 rows of 4 */
.flashcard-grid.cards-4 { grid-template-columns: repeat(2, 1fr); }
.flashcard-grid.cards-8 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 1000px) {
    .flashcard-grid.cards-8 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
    .flashcard-grid.cards-4, .flashcard-grid.cards-8 { grid-template-columns: 1fr; }
}
.flashcard-grid.cards-8 .flashcard-q { font-size: .84rem; }
.flashcard-grid.cards-8 .flashcard-a { font-size: .78rem; }

/* --- Learner checklist: real check style (distinct from takeaways) --- */
.learner-checklist { list-style: none; padding: 0; margin: 1rem 0 1.5rem; display: grid; gap: .5rem; }
.learner-checklist .lc-label { font-family: 'Montserrat', sans-serif; font-weight: 700; font-size: .9rem; color: var(--dark); margin-bottom: .35rem; }
.learner-checklist li {
    display: flex;
    align-items: flex-start;
    gap: .7rem;
    background: #fff;
    border: 1px solid var(--ev-blue-line);
    border-radius: 10px;
    padding: .7rem 1rem;
    line-height: 1.5;
    transition: background .18s ease, transform .18s ease;
}
.learner-checklist li:hover { background: var(--ev-green-soft); transform: translateX(4px); }
.learner-checklist .lc-box {
    flex-shrink: 0;
    width: 22px; height: 22px;
    border-radius: 6px;
    background: var(--ev-green);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: .8rem;
    font-weight: 800;
    margin-top: .1rem;
}

/* --- LEP / Qualified Interpreter visual panels (icon grid, not a list) --- */
.icon-points {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: .9rem;
    margin: 1rem 0 1.5rem;
}
.icon-point {
    background: #fff;
    border: 1px solid var(--ev-blue-line);
    border-radius: 14px;
    padding: 1.05rem 1rem;
    text-align: center;
    box-shadow: 0 3px 12px rgba(43,80,200,.06);
    transition: transform .2s ease, box-shadow .2s ease;
}
.icon-point:hover { transform: translateY(-4px); box-shadow: 0 8px 22px rgba(43,80,200,.13); }
.icon-point .ip-icon {
    width: 46px; height: 46px;
    margin: 0 auto .55rem;
    border-radius: 50%;
    background: var(--ev-blue-soft);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
}
.icon-point.green .ip-icon { background: var(--ev-green-soft); }
.icon-point .ip-title {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: .85rem;
    color: var(--dark);
    margin-bottom: .3rem;
}
.icon-point p { font-size: .84rem; color: var(--text-muted); line-height: 1.5; margin: 0; }

/* --- Example cards: teal accent to distinguish from Mini Case (blue) --- */
.case-card.example .cc-pill { background: #0e9488; }
.case-card.example .cc-head { background: linear-gradient(90deg, #e8f7f5, #f2f8f0); border-bottom-color: #c8e8e4; }
.case-card.example { border-color: #c8e8e4; }

/* --- Reflection submit flow --- */
.reflection-thanks {
    display: none;
    margin-top: .7rem;
    background: var(--ev-blue-soft);
    border-left: 4px solid var(--ev-blue);
    border-radius: 0 8px 8px 0;
    padding: .7rem 1rem;
    color: var(--ev-blue-dark);
    font-weight: 600;
    font-size: .9rem;
}
.reflection-thanks.show { display: block; animation: evFadeUp .35s ease both; }

/* =====================================================================
   MULTIPLE-CHOICE LAYOUT v2 (client Módulos 2-3 reference)
   Scenario stacked on top (full width) + options in a 2×2 grid with
   A/B/C/D letter badges. Removes the empty left-column gap that the
   old scenario-left / questions-right split created on Question 2.
   Applies to all single-select multiple-choice activities.
   ===================================================================== */

/* Scenario on top, questions below — full width, no side gap */
.activity-stack { display: block; }
.activity-stack .case-card { margin: 0 0 1.15rem; }
.activity-stack .section-check { margin-top: 0; }

/* Options: 2 up, 2 down (A/B top · C/D bottom) */
.check-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .6rem;
    counter-reset: mcopt;
    align-items: stretch;
}
.check-option {
    counter-increment: mcopt;
    display: flex;
    align-items: center;
    gap: .7rem;
    padding: .7rem .85rem;
    height: 100%;
}
.check-option::before {
    content: counter(mcopt, upper-alpha);
    flex-shrink: 0;
    width: 26px; height: 26px;
    border-radius: 7px;
    background: var(--ev-blue-soft);
    color: var(--ev-blue-dark);
    font-family: 'Montserrat', sans-serif;
    font-weight: 800;
    font-size: .82rem;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.check-option.opt-selected::before { background: var(--ev-blue); color: #fff; }
.check-option.opt-correct::before  { background: var(--ev-green) !important; color: #fff !important; }
.check-option.opt-wrong::before    { background: #d9534f !important; color: #fff !important; }
/* In a grid, the sideways nudge misaligns cells — use a soft lift instead */
.check-options .check-option:hover { transform: translateY(-2px); }

@media (max-width: 640px) {
    .check-options { grid-template-columns: 1fr; }
}

/* =====================================================================
   CLIENT OBSERVATIONS — MODULES 2 & 3
   Three small additions, all following the conventions already used
   above (literal characters in content:, e-voque palette variables).
   ===================================================================== */

/* 1. Negative bullets inside a tab pane (things the interpreter must NOT
      do) — red cross instead of the default green check. */
.ev-facts li.acc-bad::before { content: "✗"; color: #a03d3d; }
.ev-facts li.acc-bad { color: #a03d3d; }

/* 1b. "Example:" now lives one line below the facts list, as its own
       paragraph inside the tab pane — trim the trailing gap. */
.content-section .ev-tab-pane > p { margin-top: .7rem; }
.content-section .ev-tab-pane > p:last-child { margin-bottom: 0; }

/* 2. Learner checklist, tickable variant: the learner checks each item
      manually instead of the box arriving pre-checked. */
.learner-checklist.tickable li { padding: 0; }
.learner-checklist.tickable li > label {
    display: flex;
    align-items: flex-start;
    gap: .7rem;
    width: 100%;
    padding: .7rem 1rem;
    cursor: pointer;
}
.learner-checklist.tickable .lc-cb {
    position: absolute;
    opacity: 0;
    width: 0; height: 0;
}
.learner-checklist.tickable .lc-box {
    background: #fff;
    border: 2px solid var(--ev-blue-line);
    color: transparent;
    transition: background .18s ease, border-color .18s ease, color .18s ease;
}
.learner-checklist.tickable .lc-cb:checked + .lc-box {
    background: var(--ev-green);
    border-color: var(--ev-green);
    color: #fff;
}
.learner-checklist.tickable .lc-cb:focus-visible + .lc-box {
    outline: 2px solid var(--ev-blue);
    outline-offset: 2px;
}

/* 3. Sample scripts shown as separate speech bubbles instead of one
      run-on block of quotes. */
.script-bubbles { display: grid; gap: .6rem; margin-top: .2rem; }
.content-section .script-bubbles .script-bubble {
    position: relative;
    background: #fff;
    border: 1px solid var(--ev-blue-line);
    border-radius: 14px 14px 14px 4px;
    padding: .7rem 1rem;
    margin: 0;
    line-height: 1.55;
    box-shadow: 0 2px 8px rgba(43,80,200,.07);
}
.content-section .script-bubbles .script-bubble::before {
    content: "💬 ";
}

/* =====================================================================
   INTERACTIVE-RESOURCE GATE (client rule, Jul 2026)
   A theory section only releases Next once every tab, accordion and
   flashcard has been opened. This banner tells the learner how many are
   left so the requirement never reads as a dead end.
   ===================================================================== */
.explore-gate {
    margin: 1.4rem 0 .4rem;
    padding: .85rem 1.15rem;
    border-radius: 12px;
    background: var(--ev-blue-soft);
    border: 1px solid var(--ev-blue-line);
    border-left: 4px solid var(--ev-blue);
    color: var(--ev-blue-dark);
    font-size: .9rem;
    font-weight: 600;
    line-height: 1.5;
    animation: evFadeUp .3s ease both;
}
.explore-gate strong { font-weight: 800; }
.explore-gate.done {
    background: var(--ev-green-soft);
    border-color: #b9d9ac;
    border-left-color: var(--ev-green);
    color: #34602a;
}

/* --- Standards badges: official organisation logos + reference downloads --- */
.std-badge .sb-logo {
    height: 54px;
    margin: 0 auto .6rem;
    display: flex;
    align-items: center;
    justify-content: center;
}
.std-badge .sb-logo img {
    max-height: 54px;
    max-width: 100%;
    width: auto;
    object-fit: contain;
}
.std-badge .sb-download {
    display: block;
    margin-top: .55rem;
    padding: .45rem .65rem;
    background: #fff;
    border: 1px solid var(--ev-blue-line);
    border-radius: 8px;
    color: var(--ev-blue-dark);
    font-size: .76rem;
    font-weight: 700;
    line-height: 1.35;
    text-decoration: none;
    transition: background .18s ease, border-color .18s ease, transform .18s ease;
}
.std-badge .sb-download:hover {
    background: var(--ev-blue-soft);
    border-color: var(--ev-blue);
    transform: translateY(-1px);
}
.std-badge .sb-download.downloaded {
    background: var(--ev-green-soft);
    border-color: #8dbb7e;
    color: #34602a;
}

/* --- Drag-and-drop ordering activity --- */
.drag-list {
    list-style: none;
    padding: 0;
    margin: .8rem 0 1rem;
    display: grid;
    gap: .5rem;
}
.drag-item {
    display: flex;
    align-items: center;
    gap: .75rem;
    background: #fff;
    border: 1px solid #d9e1ef;
    border-radius: 10px;
    padding: .7rem .85rem;
    cursor: grab;
    box-shadow: 0 1px 2px rgba(30,50,100,.05);
    transition: background .18s ease, border-color .18s ease, box-shadow .18s ease, transform .12s ease;
}
.drag-item:hover { border-color: var(--ev-blue); background: var(--ev-blue-soft); }
.drag-item.dragging { opacity: .55; cursor: grabbing; box-shadow: 0 8px 20px rgba(30,50,100,.16); }
.drag-item .drag-pos {
    flex-shrink: 0;
    width: 26px; height: 26px;
    border-radius: 7px;
    background: var(--ev-blue-soft);
    color: var(--ev-blue-dark);
    font-family: 'Montserrat', sans-serif;
    font-weight: 800;
    font-size: .82rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.drag-item .drag-text { flex: 1; line-height: 1.45; }
.drag-arrows { display: flex; flex-direction: column; gap: 2px; flex-shrink: 0; }
.drag-arrows button {
    width: 24px; height: 18px;
    padding: 0;
    border: 1px solid #d9e1ef;
    border-radius: 5px;
    background: #fff;
    color: var(--ev-blue);
    font-size: .6rem;
    line-height: 1;
    cursor: pointer;
    transition: background .15s ease, border-color .15s ease;
}
.drag-arrows button:hover { background: var(--ev-blue-soft); border-color: var(--ev-blue); }
.drag-item.drag-correct {
    background: var(--ev-green-soft) !important;
    border-color: #8dbb7e !important;
}
.drag-item.drag-correct .drag-pos { background: var(--ev-green); color: #fff; }
.drag-item.drag-wrong {
    background: #fdf1f1 !important;
    border-color: #e3a7a7 !important;
    animation: shake .4s ease;
}
.drag-list.solved .drag-item { cursor: default; }
.drag-list.solved .drag-arrows { display: none; }
.drag-verify-btn {
    background: var(--ev-blue);
    color: #fff;
    border: none;
    border-radius: 9px;
    padding: .55rem 1.15rem;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: .85rem;
    cursor: pointer;
    transition: background .18s ease;
}
.drag-verify-btn:hover:not(:disabled) { background: var(--ev-blue-dark); }
.drag-verify-btn:disabled { opacity: .4; cursor: not-allowed; }

/* =========================================================
   Anatomía interactiva (Módulo 9) — "reveal" por punto
   Pedido del cliente: el intérprete hace clic sobre cada parte
   y aparece el nombre. Los rótulos van en inglés y español
   juntos, como pide la nota de desarrollo del documento.
   ========================================================= */
.anatomy-figure {
    background: var(--white);
    border: 1px solid var(--ev-blue-line);
    border-radius: 16px;
    padding: 1.1rem 1.2rem 1.25rem;
    margin: 0 0 1.6rem;
    box-shadow: var(--shadow-sm);
}
.anat-head {
    display: flex; align-items: baseline; justify-content: space-between;
    gap: 1rem; flex-wrap: wrap; margin-bottom: .7rem;
}
.anat-title {
    font-family: 'Montserrat', sans-serif; font-weight: 700;
    font-size: .95rem; color: var(--ev-blue-dark);
}
.anat-count {
    font-family: 'Montserrat', sans-serif; font-weight: 700;
    font-size: .8rem; color: var(--text-muted);
    background: var(--ev-blue-soft); border-radius: 999px; padding: .25rem .7rem;
    white-space: nowrap;
}
.anat-count.anat-done { background: var(--success-light); color: #1e7a45; }

.anat-body { display: flex; gap: 1.2rem; align-items: flex-start; flex-wrap: wrap; }
.anat-stage {
    position: relative; flex: 1 1 340px; min-width: 280px; max-width: 520px;
    margin: 0 auto;
}
.anat-stage svg,
.anat-stage img { width: 100%; height: auto; display: block; border-radius: 12px; }

/* Los puntos se posicionan en % sobre el escenario */
.anat-dot {
    position: absolute; transform: translate(-50%, -50%);
    width: 30px; height: 30px; border-radius: 50%;
    border: 2px solid var(--white);
    background: var(--ev-blue); color: var(--white);
    font-family: 'Montserrat', sans-serif; font-weight: 700; font-size: .78rem;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; padding: 0;
    box-shadow: 0 2px 8px rgba(30,60,166,.45);
    transition: transform .16s ease, background .16s ease;
}
.anat-dot:hover, .anat-dot:focus-visible { transform: translate(-50%, -50%) scale(1.18); outline: none; }
.anat-dot:focus-visible { box-shadow: 0 0 0 3px rgba(43,80,200,.35); }
.anat-dot.anat-active { background: var(--ev-blue-dark); transform: translate(-50%, -50%) scale(1.18); }
.anat-dot.anat-found  { background: var(--success); box-shadow: 0 2px 8px rgba(39,174,96,.45); }
.anat-dot.anat-found.anat-active { background: #1e7a45; }
/* halo suave que invita al primer clic; se apaga al encontrar el punto */
.anat-dot:not(.anat-found)::after {
    content: ''; position: absolute; inset: -6px; border-radius: 50%;
    border: 2px solid var(--ev-blue); opacity: .45;
    animation: anatPulse 2.4s ease-out infinite;
}
@keyframes anatPulse {
    0%   { transform: scale(.85); opacity: .5; }
    70%  { transform: scale(1.35); opacity: 0; }
    100% { transform: scale(1.35); opacity: 0; }
}

.anat-panel { flex: 1 1 260px; min-width: 250px; }
.anat-readout {
    background: var(--ev-blue-soft); border-left: 4px solid var(--ev-blue);
    border-radius: 0 12px 12px 0; padding: .85rem 1rem; min-height: 108px;
}
.anat-readout .anat-en {
    font-family: 'Montserrat', sans-serif; font-weight: 700;
    font-size: 1.02rem; color: var(--ev-blue-dark); display: block;
}
.anat-readout .anat-es {
    font-style: italic; color: #3a496a; font-size: .95rem; display: block; margin-top: .1rem;
}
.anat-readout .anat-note {
    display: block; margin-top: .5rem; font-size: .9rem; color: var(--text); line-height: 1.5;
}
.anat-readout .anat-empty { color: var(--text-muted); font-size: .92rem; line-height: 1.5; }

.anat-list { list-style: none; margin: .8rem 0 0; padding: 0; }
.anat-list li {
    display: flex; gap: .55rem; align-items: baseline;
    font-size: .88rem; padding: .28rem 0; color: var(--text-muted);
    border-bottom: 1px dashed var(--border);
}
.anat-list li:last-child { border-bottom: none; }
.anat-list li .anat-num {
    flex: none; width: 1.35rem; height: 1.35rem; border-radius: 50%;
    background: var(--ev-blue-soft); color: var(--ev-blue-dark);
    font-family: 'Montserrat', sans-serif; font-weight: 700; font-size: .72rem;
    display: flex; align-items: center; justify-content: center;
}
.anat-list li.anat-found-row { color: var(--text); }
.anat-list li.anat-found-row .anat-num { background: var(--success-light); color: #1e7a45; }
.anat-list li .anat-hidden { color: var(--text-muted); letter-spacing: .08em; }

.anat-done-msg {
    display: none; margin-top: .85rem; padding: .7rem .95rem;
    background: var(--success-light); border-radius: 10px;
    color: #1e7a45; font-size: .92rem; font-weight: 600;
}
.anat-done-msg.anat-show { display: block; animation: fadeSlideIn .35s ease; }

@media (max-width: 720px) {
    .anat-body { flex-direction: column; }
    .anat-stage { max-width: 100%; }
    .anat-dot { width: 26px; height: 26px; font-size: .72rem; }
}


/* ── Video de seccion (Modulo 9) ──────────────────────────────────
   Reproductor simple embebido dentro de una seccion. Deliberadamente sin
   .gate-video: estos videos acompanan el contenido, no lo bloquean. */
.section-video {
    margin: 1rem 0 1.6rem;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    background: #0f1830;
}
.section-video video { width: 100%; height: auto; display: block; }
.section-video-cap {
    font-size: .8rem;
    color: var(--text-muted);
    margin: -1.2rem 0 1.6rem;
    font-style: italic;
}

/* ============================================================
   Tarjetas de caso simples y listas numeradas
   La clienta reporto (14-set-2026) mini casos y listas que salian
   como texto corrido, sin tarjeta ni separacion visual. Dos causas:

   1) Hay tarjetas cuyo titulo cuelga directo de .case-card
      (<div class="cc-label">) y no de un .cc-block. La unica regla
      para esa clase era .cc-block .cc-label, asi que el titulo
      quedaba como parrafo y las citas sin margen ni color.
   2) .info-list se veia como una lista con lineas finas. El resto
      del curso usa tarjetas, asi que cada item pasa a ser una.
   ============================================================ */

.case-card > .cc-label {
    display: block;
    font-family: 'Montserrat', sans-serif;
    font-size: .68rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .07em;
    color: var(--ev-blue);
    background: linear-gradient(90deg, var(--ev-blue-soft), #f2f8f0);
    border-bottom: 1px solid var(--ev-blue-line);
    padding: .72rem 1.25rem;
    margin: 0;
}
.case-card.example > .cc-label {
    color: #0e9488;
    background: linear-gradient(90deg, #e8f7f5, #f2f8f0);
    border-bottom-color: #c8e8e4;
}
.case-card > p {
    margin: 0;
    padding: .5rem 1.25rem;
    line-height: 1.6;
}
.case-card > .cc-label + p { padding-top: .95rem; }
.case-card > p:last-child  { padding-bottom: .95rem; }

.info-list li {
    background: #fff;
    border: 1px solid var(--ev-blue-line);
    border-bottom: 1px solid var(--ev-blue-line);
    border-radius: 12px;
    padding: .8rem 1rem;
    margin-bottom: .6rem;
    box-shadow: 0 3px 12px rgba(43,80,200,.06);
}
.info-list li:last-child {
    border-bottom: 1px solid var(--ev-blue-line);
    margin-bottom: 0;
}
.info-list li:hover {
    background: #fff;
    border-color: var(--ev-blue);
    box-shadow: 0 6px 18px rgba(43,80,200,.13);
    transform: translateY(-2px);
}
