/**
 * Enhanced LC Pages CSS - Modern Card-Based Design
 * Add to frontend.css or create as lc-enhanced.css
 */
/* Force white text for LC pathway nav */
.ysp-lc-pathway-navigation-enhanced .lc-chains-theme {
    color: white;
}
.ysp-lc-pathway-navigation-enhanced .lc-chains-theme .nav-title,
.ysp-lc-pathway-navigation-enhanced .lc-chains-theme .nav-button,
.ysp-lc-pathway-navigation-enhanced .lc-chains-theme .progress-text {
    color: white !important;
}
/* ===== MAIN CONTAINER ENHANCEMENT ===== */
.ysp-lc-scenario-content {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    line-height: 1.7;
    color: #2c3e50;
    max-width: 1000px;
    margin: 0 auto;
    padding: 0;
    background: #f8f9fa;
}

.ysp-lc-scenario-page {
    background: transparent;
    padding: 0;
    max-width: 100%;
    margin: 0;
}

/* ===== HEADER SECTION ===== */
.ysp-lc-scenario-header {
    background: linear-gradient(135deg, #1c5f73 0%, #2a7a8a 100%);
    color: white;
    padding: 40px 30px;
    margin: 0 0 30px 0;
    border-radius: 0;
    text-align: center;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.2);
}

.ysp-lc-scenario-title {
    color: white;
    font-size: 2.2rem;
    margin: 0 0 15px 0;
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
}

/* Shared badge styles */
.content-type-badge,
.cefr-badge,
.pathway-badge {
    display: inline-block;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    margin: 5px;
    color: #fff;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.3);
    background: linear-gradient(135deg, #3b82f6, #1d4ed8); /* consistent blue */
}
/* =======================================================
   LC PAGES — CLEAN, WORDPACK-STYLE CARDS
   ======================================================= */

/* Page chrome */
.ysp-lc-scenario-content {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  line-height: 1.7;
  color: #2c3e50;
  max-width: 1000px;
  margin: 0 auto;
  background: #f8f9fa;
}
.ysp-lc-scenario-page { padding: 0; }

/* Badges (unified blue) */
.content-type-badge,
.cefr-badge,
.pathway-badge {
  display: inline-block;
  padding: 4px 12px;          /* was 6px 16px */
  border-radius: 16px;        /* slightly tighter curvature */
  font-size: 0.78rem;         /* was .85rem */
  font-weight: 600;
  text-transform: uppercase;
  margin: 4px;               /* was 5px */
  color: #f8fafc;            /* softer than pure white */
  background: linear-gradient(135deg, #3f6f7c 0%, #4f8691 100%);
  border: 1px solid rgba(255,255,255,.25); /* slightly subtler */
  backdrop-filter: blur(10px);
}

/* =======================
   SECTION CARD + HEADER
   ======================= */

/* Card container (soft blue vibe like wordpacks) */
.ysp-lc-section {
  background: linear-gradient(135deg,#f5f7fa 0%,#c3cfe2 100%);
  border: 1px solid rgba(17,24,39,.08);
  border-radius: 14px;
  box-shadow: 0 6px 18px rgba(18,38,78,.10);
  overflow: hidden;
  margin-bottom: 28px;
  padding: 0; /* header/content manage padding */
  transition: transform .18s, box-shadow .18s;
}
.ysp-lc-section:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(18,38,78,.14);
}

/* Header bar (single style; no nth-child gradients needed) */
.ysp-lc-section .ysp-lc-section-header,
.ysp-lc-section h3.ysp-lc-section-header {
  margin: 0;
  padding: 18px 22px;
  font-size: 1.55rem;
  font-weight: 700;
  line-height: 1.2;
  display: flex;
  align-items: center;
  gap: 12px;
  color: #1f2937;
  background: rgba(255,255,255,.55);
  border-bottom: 1px solid rgba(17,24,39,.08);
  backdrop-filter: blur(3px);
}

/* Section number chip */
.ysp-lc-section .section-number {
  width: 36px; height: 36px;
  border-radius: 999px;
  display: inline-flex; align-items:center; justify-content:center;
  font-weight: 800; font-size: 1.05rem;
  color: #fff;
  background: #3b82f6;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.35);
}

/* =======================
   CONTENT SPACING (no wrapper required)
   ======================= */

/* Add inner padding to any direct child after header */
.ysp-lc-section > *:not(.ysp-lc-section-header) {
  padding-left: 22px;
  padding-right: 22px;
}
.ysp-lc-section > *:not(.ysp-lc-section-header):first-of-type { padding-top: 22px; }
.ysp-lc-section > *:not(.ysp-lc-section-header):last-of-type  { padding-bottom: 22px; }

/* Paragraphs/lists/quotes */
.ysp-lc-section > p { margin: 0 0 16px 0; color: #374151; font-size: 1.05rem; line-height: 1.8; }
.ysp-lc-section > ul,
.ysp-lc-section > ol { margin: 0 0 16px 0; padding-left: 1.25rem; }
.ysp-lc-section li { margin: 4px 0; }

.ysp-lc-section blockquote {
  margin: 12px 0;
  padding: 10px 16px;
  border-left: 4px solid #93c5fd;
  background: #f3f8ff;
  border-radius: 8px;
}

/* Accent bold */
.ysp-lc-section strong,
.ysp-lc-section b {
  font-weight: 700;
  background: linear-gradient(to right,#2563eb,#7c3aed);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* =======================
   LEXICAL GROUPS (toggle-friendly)
   ======================= */
.lexical-groups-display {
  background: rgba(255,255,255,.6);
  border: 1px solid rgba(17,24,39,.06);
  border-radius: 10px;
  padding: 16px;
}
.lexical-group-item + .lexical-group-item { margin-top: 12px; }
.lexical-group-item .group-name {
  font-weight: 700; color: #0f4c81; margin-bottom: 6px;
}
.lexical-group-item .group-terms,
.lexical-group-item .group-examples {
  color: #2b2f33; line-height: 1.6;
}

/* (If you have toggle boxes inside lexical groups, they keep working —
   we’re only styling the wrapper and inner spacing.) */

/* =======================
   VOCABULARY RECAP (page-end)
   ======================= */
.ysp-lc-vocabulary-recap {
  --v-bg: #f3f8ff; --v-border: #dbeafe; --v-card:#fff; --v-term:#0f4c81; --v-def:#2b2f33;
  background: var(--v-bg);
  border: 1px solid var(--v-border);
  border-radius: 12px;
  padding: 14px;
}
.ysp-lc-vocabulary-recap .ysp-lc-section-header { margin: 0 0 10px 0; background: transparent; border: 0; padding: 8px 6px; }
.ysp-lc-vocabulary-recap .vocab-grid { display: grid; grid-template-columns: 1fr; gap: 10px; }
.ysp-lc-vocabulary-recap .vocab-item {
  display: grid; grid-template-columns: 1fr; gap: 6px;
  background: var(--v-card);
  border: 1px solid #eef2f7; border-radius: 10px; padding: 10px 12px;
  box-shadow: 0 1px 2px rgba(15,76,129,.05);
}
.ysp-lc-vocabulary-recap .term { font-weight: 700; color: var(--v-term); font-size: .95rem; }
.ysp-lc-vocabulary-recap .definition { color: var(--v-def); font-size: .92rem; line-height: 1.4; }
@media (min-width: 768px) {
  .ysp-lc-vocabulary-recap .vocab-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .ysp-lc-vocabulary-recap .vocab-item { grid-template-columns: 220px 1fr; align-items: center; gap: 12px; }
}

/* =======================
   MOBILE TUNING
   ======================= */
@media (max-width: 640px) {
  .ysp-lc-section .ysp-lc-section-header { font-size: 1.3rem; padding: 14px 16px; }
  .ysp-lc-section > *:not(.ysp-lc-section-header) { padding-left: 16px; padding-right: 16px; }
  .ysp-lc-section > p { font-size: 1rem; line-height: 1.7; }
  .ysp-lc-section .section-number { width: 32px; height: 32px; font-size: .98rem; }
}


/* ===== VOCABULARY BOX ENHANCEMENT ===== */
.section-vocabulary,
.ysp-lc-vocabulary-box {
    background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%);
    border: none;
    border-radius: 12px;
    padding: 25px;
    margin: 25px 0;
    box-shadow: 0 5px 15px rgba(252, 182, 159, 0.3);
}

.section-vocabulary h4,
.vocab-box-title {
    color: #c44569;
    margin: 0 0 20px 0;
    font-size: 1.2rem;
    font-weight: 700;
}

.vocab-item {
    background: rgba(255,255,255,0.8);
    padding: 12px 15px;
    border-radius: 8px;
    margin-bottom: 12px;
    display: flex;
    align-items: baseline;
    gap: 15px;
    transition: transform 0.2s;
}

.vocab-item:hover {
    transform: translateX(5px);
    background: rgba(255,255,255,0.95);
}

.vocab-term {
    color: #c44569;
    font-weight: 700;
    min-width: 150px;
    font-size: 1.05rem;
}

.vocab-definition {
    color: #4a5568;
    flex: 1;
}

/* Panel */
.ysp-lc-vocabulary-recap {
  --v-bg: #f3f8ff;         /* light blue panel */
  --v-border: #dbeafe;     /* soft blue border */
  --v-card: #ffffff;       /* item background */
  --v-term: #0f4c81;       /* term color */
  --v-def: #2b2f33;        /* def color */

  background: var(--v-bg);
  border: 1px solid var(--v-border);
  border-radius: 12px;
  padding: 14px;
}

/* Title spacing */
.ysp-lc-vocabulary-recap .ysp-lc-section-header {
  margin: 0 0 10px 0;
}

/* List grid */
.ysp-lc-vocabulary-recap .vocab-grid {
  display: grid;
  grid-template-columns: 1fr;        /* phones: single column */
  gap: 10px;
}

/* Item card */
.ysp-lc-vocabulary-recap .vocab-item {
  display: grid;
  grid-template-columns: 1fr;        /* term above def on mobile */
  gap: 6px;
  align-items: start;
  background: var(--v-card);
  border: 1px solid #eef2f7;
  border-radius: 10px;
  padding: 10px 12px;
  box-shadow: 0 1px 2px rgba(15,76,129,0.05);
}

/* Term & definition */
.ysp-lc-vocabulary-recap .term {
  font-weight: 700;
  color: var(--v-term);
  font-size: 0.95rem;
}
.ysp-lc-vocabulary-recap .definition {
  color: var(--v-def);
  font-size: 0.92rem;
  line-height: 1.4;
}

/* Tablet/desktop: two columns of cards; item becomes 2-col row */
@media (min-width: 768px) {
  .ysp-lc-vocabulary-recap .vocab-grid {
    grid-template-columns: 1fr 1fr;  /* two columns */
    gap: 12px;
  }
  .ysp-lc-vocabulary-recap .vocab-item {
    grid-template-columns: 220px 1fr; /* term left, def right */
    align-items: center;
    gap: 12px;
  }
  .ysp-lc-vocabulary-recap .definition { margin: 0; }
}

/* Very small phones: compact text */
@media (max-width: 360px) {
  .ysp-lc-vocabulary-recap .term { font-size: 0.9rem; }
  .ysp-lc-vocabulary-recap .definition { font-size: 0.88rem; }
}

/* ===== DIALOGUE SECTIONS ENHANCEMENT ===== */
.ysp-lc-dialogues,
.dialogue-section {
    background: linear-gradient(135deg, #e0f2fe 0%, #bae6fd 100%);
    border-radius: 12px;
    padding: 25px;
    margin: 25px 0;
    box-shadow: 0 5px 15px rgba(14, 165, 233, 0.15);
}

.dialogue-section h4 {
    color: #0c4a6e;
    margin-bottom: 10px;
    font-size: 1.2rem;
    font-weight: 700;
}

.dialogue-context {
    background: rgba(255,255,255,0.7);
    padding: 12px 15px;
    border-radius: 8px;
    color: #475569;
    font-style: italic;
    margin-bottom: 20px;
    border-left: 4px solid #0ea5e9;
}

.dialogue-exchanges {
    background: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.dialogue-line,
.exchange {
    margin-bottom: 15px;
    padding: 12px;
    border-radius: 8px;
    background: linear-gradient(to right, rgba(14,165,233,0.05), rgba(14,165,233,0));
    transition: all 0.2s;
    border-left: 3px solid transparent;
}

.dialogue-line:hover,
.exchange:hover {
    background: linear-gradient(to right, rgba(14,165,233,0.1), rgba(14,165,233,0.02));
    border-left-color: #0ea5e9;
    transform: translateX(5px);
}

.dialogue-line .speaker,
.exchange .speaker {
    color: #0369a1;
    font-weight: 700;
    display: inline-block;
    min-width: 100px;
    font-size: 1.05rem;
}

/* ===== GRAMMAR SECTIONS ENHANCEMENT ===== */
.grammar-overview-section {
    background: linear-gradient(135deg, #fef3c7 0%, #fcd34d 100%);
    border: none;
    border-radius: 12px;
    padding: 0;
    margin: 25px 0;
    box-shadow: 0 5px 15px rgba(252, 211, 77, 0.3);
    overflow: hidden;
}

.grammar-overview-section h2 {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
    margin: 0;
    padding: 20px 25px;
    border-radius: 0;
    font-size: 1.3rem;
}

.grammar-intro {
    padding: 25px;
    margin: 0;
    background: transparent;
    border: none;
    color: #78350f;
    font-size: 1.05rem;
}

/* ===== TIPS & HIGHLIGHTS ===== */
.ysp-lc-tip {
    background: linear-gradient(135deg, #d9f7be 0%, #b7eb8f 100%);
    border-left: 4px solid #52c41a;
    padding: 15px 20px;
    margin: 20px 0;
    border-radius: 8px;
    box-shadow: 0 3px 10px rgba(82, 196, 26, 0.15);
}

.discourse-marker {
    background: linear-gradient(135deg, #e6f7ff 0%, #bae7ff 100%);
    color: #0050b3;
    padding: 3px 8px;
    border-radius: 4px;
    font-weight: 600;
    border: 1px solid #69c0ff;
}

.vocabulary-highlight {
    background: linear-gradient(135deg, #fff7e6 0%, #ffe7ba 100%);
    color: #ad6800;
    padding: 3px 8px;
    border-radius: 4px;
    font-weight: 600;
    border: 1px solid #ffc53d;
}

/* ===== PRACTICE BUTTONS ENHANCEMENT ===== */
.page-actions {
    text-align: center;
    margin-top: 40px;
    padding: 30px;
    background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
    border-radius: 12px;
}

.action-btn,
.practice-dialogue-btn {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
    color: white !important;
    padding: 14px 28px;
    text-decoration: none;
    border-radius: 30px;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-block;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

.action-btn:hover,
.practice-dialogue-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
    background: linear-gradient(135deg, #059669 0%, #047857 100%) !important;
}

/* ===== RESPONSIVE ADJUSTMENTS ===== */
@media (max-width: 768px) {
    .ysp-lc-scenario-header {
        padding: 25px 20px;
    }
    
    .ysp-lc-scenario-title {
        font-size: 1.8rem;
    }
    
    .ysp-lc-section {
        margin-bottom: 20px;
        border-radius: 8px;
    }
    
    .ysp-lc-section h3,
    .ysp-lc-section-header {
        padding: 15px 20px;
        font-size: 1.15rem;
    }
    
    .section-content {
        padding: 20px;
    }
    
    .section-number {
        width: 30px;
        height: 30px;
        font-size: 1rem;
    }
}

/* ===== ANIMATION ENHANCEMENTS ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.ysp-lc-section {
    animation: fadeInUp 0.5s ease-out;
    animation-fill-mode: both;
}

.ysp-lc-section:nth-child(1) { animation-delay: 0.1s; }
.ysp-lc-section:nth-child(2) { animation-delay: 0.2s; }
.ysp-lc-section:nth-child(3) { animation-delay: 0.3s; }
.ysp-lc-section:nth-child(4) { animation-delay: 0.4s; }
.ysp-lc-section:nth-child(5) { animation-delay: 0.5s; }
.ysp-lc-section:nth-child(6) { animation-delay: 0.6s; }
.ysp-lc-section:nth-child(7) { animation-delay: 0.7s; }

/* ===== PRINT STYLES ===== */
@media print {
    .ysp-lc-section {
        box-shadow: none;
        border: 1px solid #e5e7eb;
        page-break-inside: avoid;
    }
    
    .ysp-lc-scenario-header {
        box-shadow: none;
        background: #667eea !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
}

/* =======================================================
   ELABORATION (Prompt 3) — SOFT LC THEME
   Makes cards/subheaders more subdued to match LC sections
   ======================================================= */

/* Softer meta boxes (Speaker / Context) */
.ysp-lc-elaboration-page .speaker-info,
.ysp-lc-elaboration-page .elaboration-context{
  background: linear-gradient(180deg, #f7f9fe 0%, #f2f5fb 100%);
  border: 1px solid #e6ecf8;
  box-shadow: 0 4px 10px rgba(18, 38, 78, .06);
  border-radius: 12px;
  padding: 14px 16px;
}
.ysp-lc-elaboration-page .speaker-info h2{ color:#1f2a44; }
.ysp-lc-elaboration-page .speaker-info .speaker-role,
.ysp-lc-elaboration-page .elaboration-context p{ color:#485568; }

/* --- Section card (header + body) tuned down --- */

/* Header bar: light blue strip, dark text */
.elaboration-main-content .section-break h2.elaboration-section-header,
.elaboration-main-content .section-break h3.elaboration-subsection-header{
  background: linear-gradient(180deg, #eef3ff 0%, #e8eefc 100%);
  color: #1f2a44;                /* dark, not white */
  border: 1px solid #e2e9fb;
  border-bottom: none;
  border-radius: 12px 12px 0 0;
  box-shadow: 0 2px 6px rgba(18,38,78,.05);
  font-weight: 700;
  padding: 14px 16px;
  margin: 18px 0 0;
}

/* Body: white, faint border, very light shadow */
.elaboration-main-content .section-break + .section-content{
  background: #fff;
  border: 1px solid #e9eef8;
  border-top: none;              /* joins header */
  border-radius: 0 0 12px 12px;
  padding: 16px 18px;
  box-shadow: 0 6px 16px rgba(18,38,78,.06);
  color: #374151;
  line-height: 1.7;
  font-size: 1rem;
}

/* Paragraph/list rhythm (a touch tighter) */
.elaboration-main-content .section-content p{ margin: 0 0 12px; }
.elaboration-main-content .section-content ul,
.elaboration-main-content .section-content ol{
  margin: 0 0 12px 0; padding-left: 1.2rem;
}

/* Emphasis: same LC gradient but subtler */
.elaboration-main-content .section-content strong{
  font-weight: 700;
  background: linear-gradient(to right, #6478e9, #7a66c9);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Vocabulary list at bottom */
.elaboration-vocabulary{
  background:linear-gradient(135deg,#f3f8ff 0%,#edf2fb 100%);
  border:1px solid #dbe4f4;
  border-radius:12px;
  padding:18px;
  margin:22px 0 8px;
}
.elaboration-vocabulary h3{
  margin:0 0 10px;
  font-size:1.1rem;
  font-weight:800;
  color:#1e40af;
}
.elaboration-vocabulary ul{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(220px,1fr));
  gap:8px 12px;
  margin:0; padding:0; list-style:none;
}
.elaboration-vocabulary li{
  background:#fff;
  border:1px solid #e6eef7;
  border-radius:10px;
  padding:8px 10px;
  box-shadow:0 1px 2px rgba(15,76,129,.05);
}

/* Back link */
.elaboration-nav{
  margin:18px 0 10px;
}
.elaboration-nav .back-to-main{
  display:inline-block;
  background:linear-gradient(135deg,#3b82f6,#1e40af);
  color:#fff;
  text-decoration:none;
  padding:8px 14px;
  border-radius:999px;
  font-weight:600;
  box-shadow:0 4px 12px rgba(59,130,246,.25);
}
.elaboration-nav .back-to-main:hover{ transform:translateY(-1px); }

/* Mobile tweaks */
@media (max-width:640px){
  .elaboration-main-content .section-break h2.elaboration-section-header,
  .elaboration-main-content .section-break h3.elaboration-subsection-header{
    padding: 12px 14px; font-size: 1.05rem;
  }
  .elaboration-main-content .section-break + .section-content{
    padding: 14px 14px; box-shadow: 0 4px 12px rgba(18,38,78,.06);
  }
}
/* ===== NEW MULTI PASS ZERO PROMPT CSS ===== */
/* Multi-Pattern Module Styles */
.multi-pattern-module {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    color: #333;
}

.multi-pattern-module h1 {
    color: #2c3e50;
    border-bottom: 3px solid #3498db;
    padding-bottom: 10px;
    margin-bottom: 20px;
}

.multi-pattern-module h2 {
    color: #34495e;
    margin-top: 35px;
    margin-bottom: 15px;
    border-left: 4px solid #3498db;
    padding-left: 15px;
}

.multi-pattern-module h3 {
    color: #555;
    margin-top: 20px;
    margin-bottom: 10px;
}

.reading-time {
    color: #7f8c8d;
    font-style: italic;
    margin-bottom: 30px;
}

/* Introduction Section */
.module-introduction {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 25px;
    margin-bottom: 30px;
}

.common-mistakes {
    background: #fff3cd;
    border-left: 4px solid #ffc107;
    padding: 15px;
    margin: 20px 0;
    border-radius: 4px;
}

.common-mistakes ul {
    margin: 10px 0;
    padding-left: 25px;
}

.learning-outcome {
    background: #d1ecf1;
    border-radius: 4px;
    padding: 15px;
    border-left: 4px solid #17a2b8;
    margin-top: 20px;
}

/* Error Corrections Section */
.error-corrections-section {
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 25px;
    margin: 30px 0;
}

.error-correction-item {
    background: #f8f9fa;
    border-radius: 6px;
    padding: 20px;
    margin: 20px 0;
    border-left: 4px solid #dc3545;
}

.incorrect-example {
    color: #dc3545;
    font-size: 16px;
    margin-bottom: 10px;
}

.incorrect-example del {
    text-decoration: line-through;
    opacity: 0.7;
}

.correct-example {
    color: #28a745;
    font-size: 16px;
    margin-bottom: 10px;
}

.error-explanation {
    color: #666;
    font-style: italic;
    margin: 10px 0;
    padding-left: 20px;
}

.remember-tip {
    background: #fff3cd;
    border-radius: 4px;
    padding: 10px 15px;
    margin-top: 10px;
    font-weight: 500;
}

/* Problematic Text Corrections */
.problematic-text-correction {
    background: #f1f3f5;
    border-radius: 8px;
    padding: 20px;
    margin: 25px 0;
}

.error-text {
    background: #ffebee;
    padding: 15px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    margin: 10px 0;
    white-space: pre-wrap;
}

.corrected-text {
    background: #e8f5e9;
    padding: 15px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    margin: 10px 0;
    white-space: pre-wrap;
}

.errors-list {
    background: white;
    padding: 15px;
    border-radius: 4px;
    margin: 15px 0;
}

.key-learning {
    background: #e3f2fd;
    padding: 12px;
    border-radius: 4px;
    margin-top: 15px;
    border-left: 3px solid #2196f3;
}

/* Term Deep Dives */
.term-deep-dive {
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    padding: 25px;
    margin: 30px 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.core-meaning {
    background: #e8f4f8;
    padding: 15px;
    border-radius: 6px;
    font-size: 16px;
    margin: 15px 0;
}

.when-to-use {
    background: #f5f5f5;
    padding: 20px;
    border-radius: 6px;
    margin: 20px 0;
}

.key-patterns {
    list-style: none;
    padding: 0;
    margin: 15px 0;
}

.key-patterns li {
    background: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 8px 12px;
    margin: 8px 0;
    font-family: 'Courier New', monospace;
}

.key-patterns code {
    background: #f4f4f4;
    padding: 2px 6px;
    border-radius: 3px;
}

.grammar-notes {
    background: #fef9e7;
    padding: 20px;
    border-radius: 6px;
    margin: 20px 0;
}

.important-rule {
    background: #ffe5b4;
    padding: 12px;
    border-radius: 4px;
    border-left: 4px solid #ff9800;
    margin: 15px 0;
    font-weight: 600;
}

.collocations ul {
    display: flex;
    flex-wrap: wrap;
    list-style: none;
    padding: 0;
    gap: 10px;
}

.collocations li {
    background: #e3f2fd;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 14px;
}

.watch-out {
    background: #ffebee;
    padding: 15px;
    border-radius: 6px;
    border-left: 4px solid #f44336;
}

.memory-tip {
    background: #f3e5f5;
    padding: 15px;
    border-radius: 6px;
    margin: 20px 0;
    font-style: italic;
    border-left: 4px solid #9c27b0;
}

/* Context Examples */
.contexts-section {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 8px;
    margin: 30px 0;
}

.context-example {
    background: white;
    padding: 20px;
    border-radius: 6px;
    margin: 20px 0;
    border-left: 4px solid #17a2b8;
}

.context-example blockquote {
    background: #f4f8fb;
    padding: 15px;
    border-radius: 4px;
    font-style: italic;
    margin: 15px 0;
    border-left: 3px solid #17a2b8;
}

.terms-note {
    color: #666;
    font-size: 14px;
    margin: 10px 0;
}

/* Summary Card - Special Table Styling */
.summary-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px;
    border-radius: 12px;
    margin: 40px 0;
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}

.summary-card h2 {
    color: white;
    border-left: 4px solid rgba(255,255,255,0.8);
    margin-bottom: 20px;
}

.quick-reference {
    width: 100%;
    background: rgba(255,255,255,0.95);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.quick-reference thead {
    background: linear-gradient(135deg, #5e72e4 0%, #825ee4 100%);
    color: white;
}

.quick-reference th {
    padding: 15px;
    text-align: left;
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid rgba(255,255,255,0.2);
}

.quick-reference tbody tr {
    transition: all 0.3s ease;
}

.quick-reference tbody tr:nth-child(even) {
    background: rgba(248,249,250,0.5);
}

.quick-reference tbody tr:hover {
    background: rgba(102,126,234,0.1);
    transform: scale(1.01);
}

.quick-reference td {
    padding: 12px 15px;
    color: #333;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

.quick-reference td:first-child {
    font-weight: 700;
    color: #5e72e4;
    font-size: 16px;
}

.quick-reference td:nth-child(2) {
    font-style: italic;
}

.quick-reference td:nth-child(3) {
    background: rgba(40,167,69,0.1);
    font-weight: 500;
}

.quick-reference td:nth-child(4) {
    background: rgba(220,53,69,0.05);
    font-size: 13px;
    color: #dc3545;
}

.final-tip {
    background: rgba(255,255,255,0.9);
    color: #333;
    padding: 20px;
    border-radius: 6px;
    margin-top: 20px;
    text-align: center;
    font-size: 18px;
    font-weight: 600;
    border: 2px solid rgba(255,255,255,0.8);
}

/* Self Check Section */
.self-check {
    background: #e8f5e9;
    padding: 25px;
    border-radius: 8px;
    border: 2px solid #4caf50;
    margin: 30px 0;
}

.checklist {
    list-style: none;
    padding: 0;
}

.checklist li {
    padding: 10px 0;
    padding-left: 35px;
    position: relative;
    font-size: 16px;
}

.checklist li:before {
    content: "☐";
    position: absolute;
    left: 0;
    font-size: 20px;
    color: #4caf50;
}

.next-challenge {
    background: #4caf50;
    color: white;
    padding: 15px;
    border-radius: 6px;
    text-align: center;
    margin-top: 20px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .multi-pattern-module {
        padding: 10px;
    }
    
    .quick-reference {
        font-size: 12px;
    }
    
    .quick-reference th,
    .quick-reference td {
        padding: 8px;
    }
    
    .collocations ul {
        flex-direction: column;
    }
}

/* Print Styles */
@media print {
    .summary-card {
        background: white !important;
        color: black !important;
        border: 2px solid black;
    }
    
    .quick-reference {
        border: 1px solid black;
    }
    
    .quick-reference thead {
        background: #f0f0f0 !important;
        color: black !important;
    }
}

/* ==================== MODULE CONTAINER ==================== */

.multi-pattern-module {
    max-width: 900px;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #1d2327;
}

/* ==================== HEADER SECTION ==================== */

.module-header {
    margin-bottom: 30px;
    border-bottom: 3px solid #0073aa;
    padding-bottom: 20px;
}

.module-header h1 {
    color: #1d2327;
    font-size: 2.2em;
    margin-bottom: 10px;
    font-weight: 700;
}

.reading-time {
    color: #666;
    font-size: 0.95em;
}

/* ==================== INTRODUCTION ==================== */

.module-introduction {
    background: #f0f6fc;
    border-left: 4px solid #0073aa;
    padding: 20px;
    margin-bottom: 30px;
    border-radius: 4px;
}

.module-introduction h2 {
    color: #0073aa;
    font-size: 1.5em;
    margin-top: 0;
}

.common-mistakes {
    background: #fff;
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 15px;
}

.common-mistakes h3 {
    color: #d63638;
    font-size: 1.2em;
    margin-top: 0;
}

.common-mistakes ul {
    margin: 10px 0;
    padding-left: 25px;
    line-height: 1.8;
}

.common-mistakes li {
    color: #50575e;
    margin-bottom: 8px;
}

.learning-outcome {
    background: #fff;
    padding: 15px;
    border-radius: 4px;
    border: 2px solid #00a32a;
}

.learning-outcome strong {
    color: #00a32a;
}

/* ==================== INTERACTIVE PRACTICE ==================== */

.interactive-practice-section {
    margin-bottom: 40px;
}

.interactive-practice-section h2 {
    color: #1d2327;
    font-size: 1.8em;
    margin-bottom: 15px;
    border-bottom: 2px solid #dcdcde;
    padding-bottom: 10px;
}

/* ==================== GAP-FILL EXERCISES ==================== */

.gap-fill-exercises {
    margin-bottom: 30px;
}

.gap-fill-item {
    background: #fff;
    border: 1px solid #dcdcde;
    border-radius: 6px;
    padding: 20px;
    margin-bottom: 20px;
    transition: box-shadow 0.3s ease;
}

.gap-fill-item:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.gap-text {
    font-size: 1.1em;
    line-height: 1.7;
    color: #1d2327;
    margin-bottom: 15px;
    font-weight: 500;
}

.gap-options {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 15px;
}

.option-btn {
    padding: 10px 20px;
    border: 2px solid #dcdcde;
    background: #fff;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1em;
    transition: all 0.2s ease;
    font-family: inherit;
}

.option-btn:not(:disabled):hover {
    background: #f0f6fc;
    border-color: #0073aa;
    transform: translateY(-2px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.option-btn:disabled {
    cursor: not-allowed;
    opacity: 0.8;
}

.option-btn:focus {
    outline: 2px solid #0073aa;
    outline-offset: 2px;
}

.explanation {
    display: none;
    background: #f0f6fc;
    border-left: 3px solid #0073aa;
    padding: 15px;
    margin-top: 15px;
    border-radius: 3px;
    animation: slideDown 0.3s ease;
}

.explanation p {
    margin: 0;
    color: #1d2327;
    line-height: 1.6;
}

.explanation strong {
    color: #0073aa;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==================== PROBLEMATIC PASSAGES ==================== */

.problematic-passages {
    margin-top: 40px;
}

.problematic-passages h3 {
    color: #1d2327;
    font-size: 1.5em;
    margin-bottom: 20px;
}

.passage-item {
    background: #fff;
    border: 2px solid #0073aa;
    border-radius: 6px;
    padding: 25px;
    margin-bottom: 25px;
}

.passage-item h4 {
    color: #0073aa;
    margin-top: 0;
}

.passage-text {
    background: #f6f7f7;
    padding: 20px;
    border-radius: 4px;
    margin-bottom: 20px;
    line-height: 1.8;
    font-size: 1.05em;
}

.passage-gap-select {
    padding: 5px 10px;
    border: 2px solid #dcdcde;
    border-radius: 3px;
    font-size: 1em;
    background: #fff;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

.passage-gap-select:focus {
    outline: 2px solid #0073aa;
    outline-offset: 2px;
    border-color: #0073aa;
}

.passage-gap-select:disabled {
    cursor: not-allowed;
    opacity: 0.9;
}

.check-passage-btn {
    padding: 10px 20px;
    background: #0073aa;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    font-size: 1em;
    transition: all 0.2s ease;
    font-family: inherit;
}

.check-passage-btn:not(:disabled):hover {
    background: #005a87;
    transform: translateY(-2px);
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

.check-passage-btn:disabled {
    cursor: default;
    opacity: 0.9;
}

.check-passage-btn:focus {
    outline: 2px solid #0073aa;
    outline-offset: 2px;
}

.passage-explanations {
    display: none;
    margin-top: 20px;
}

.gap-explanation {
    background: #f0f6fc;
    border-left: 3px solid #0073aa;
    padding: 12px;
    margin-bottom: 10px;
    border-radius: 3px;
    animation: slideDown 0.3s ease;
}

.gap-explanation p {
    margin: 0;
    line-height: 1.6;
}

.key-learning {
    background: #fff3cd;
    border-left: 3px solid #f0b849;
    padding: 15px;
    margin-top: 15px;
    border-radius: 3px;
}

.key-learning p {
    margin: 0;
    color: #1d2327;
}

.key-learning strong {
    color: #8a6116;
}

/* ==================== TERM DEEP DIVES ==================== */

.term-deep-dives {
    margin-bottom: 40px;
}

.term-deep-dives h2 {
    color: #1d2327;
    font-size: 1.8em;
    margin-bottom: 20px;
    border-bottom: 2px solid #dcdcde;
    padding-bottom: 10px;
}

.term-deep-dive {
    background: #fff;
    border: 1px solid #dcdcde;
    border-radius: 8px;
    padding: 25px;
    margin-bottom: 25px;
}

.term-deep-dive h3 {
    color: #0073aa;
    font-size: 1.5em;
    margin-top: 0;
    border-bottom: 2px solid #0073aa;
    padding-bottom: 10px;
}

.core-meaning {
    background: #f0f6fc;
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 20px;
}

.core-meaning p {
    font-size: 1.1em;
    line-height: 1.6;
    margin: 0;
}

.grammar-notes {
    margin-bottom: 20px;
}

.grammar-notes h4 {
    color: #1d2327;
    font-size: 1.2em;
    margin-bottom: 10px;
}

.collocations {
    margin-bottom: 20px;
}

.collocations h4 {
    color: #1d2327;
    font-size: 1.2em;
    margin-bottom: 10px;
}

.collocations > div {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.collocations span {
    background: #e0f2fe;
    color: #0369a1;
    padding: 6px 12px;
    border-radius: 15px;
    font-size: 0.9em;
}

/* ==================== USING THEM TOGETHER ==================== */

.using-together {
    background: #f0f6fc;
    border: 2px solid #0073aa;
    border-radius: 8px;
    padding: 30px;
    margin-bottom: 30px;
}

.using-together h2 {
    color: #0073aa;
    font-size: 1.8em;
    margin-top: 0;
}

.decision-guide {
    background: #fff;
    padding: 20px;
    border-radius: 4px;
    margin-bottom: 25px;
}

.decision-guide h3 {
    margin-top: 0;
}

.combined-example {
    background: #fff;
    padding: 20px;
    border-radius: 4px;
    margin-bottom: 15px;
}

.combined-example h4 {
    margin-top: 0;
}

.combined-example p {
    line-height: 1.8;
    font-style: italic;
    color: #1d2327;
}

.annotations {
    background: #fff;
    padding: 15px;
    border-radius: 4px;
}

.annotations h4 {
    margin-top: 0;
}

.annotations ul {
    margin: 0;
    padding-left: 20px;
    line-height: 1.8;
}

/* ==================== SUMMARY CARD ==================== */

.summary-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border-radius: 8px;
    padding: 30px;
    margin-bottom: 30px;
}

.summary-card h2 {
    color: #fff;
    font-size: 1.8em;
    margin-top: 0;
    margin-bottom: 20px;
}

.summary-card > div:first-of-type {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.summary-card > div:first-of-type > div {
    background: rgba(255,255,255,0.15);
    padding: 15px;
    border-radius: 6px;
    backdrop-filter: blur(10px);
}

.summary-card > div:first-of-type > div > div:first-child {
    font-weight: 600;
    font-size: 1.2em;
    margin-bottom: 8px;
}

.summary-card > div:last-of-type {
    background: rgba(255,255,255,0.2);
    padding: 15px;
    border-radius: 6px;
    text-align: center;
    font-size: 1.05em;
}

/* ==================== RESPONSIVE DESIGN ==================== */

@media (max-width: 768px) {
    .multi-pattern-module {
        padding: 0 15px;
    }
    
    .module-header h1 {
        font-size: 1.8em;
    }
    
    .gap-options {
        flex-direction: column;
    }
    
    .option-btn {
        width: 100%;
    }
    
    .passage-text {
        font-size: 1em;
    }
    
    .summary-card > div:first-of-type {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .module-header h1 {
        font-size: 1.5em;
    }
    
    .gap-text {
        font-size: 1em;
    }
    
    .passage-item {
        padding: 15px;
    }
}

/* ==================== PRINT STYLES ==================== */

@media print {
    .option-btn {
        border: 1px solid #000;
        page-break-inside: avoid;
    }
    
    .check-passage-btn {
        display: none;
    }
    
    .summary-card {
        background: #f0f0f0;
        color: #000;
    }
}

/* ==================== ACCESSIBILITY ==================== */

.option-btn:focus-visible,
.check-passage-btn:focus-visible,
.passage-gap-select:focus-visible {
    outline: 3px solid #0073aa;
    outline-offset: 3px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .option-btn {
        border-width: 3px;
    }
    
    .gap-fill-item,
    .passage-item {
        border-width: 2px;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .option-btn,
    .check-passage-btn,
    .passage-gap-select,
    .explanation,
    .gap-explanation {
        transition: none;
        animation: none;
    }
    
    .option-btn:not(:disabled):hover,
    .check-passage-btn:not(:disabled):hover {
        transform: none;
    }
}
.pathway-nav-header { padding: 2px 5px; } /* was 20px 30px */
.nav-title { font-size: 0.95em; } /* was 1.1em */
.progress-bar { height: 4px; } /* was 8px */

.page-numbers-nav {
    padding: 8px 15px; /* Reduce from default ~15px 20px */
}

.page-number {
    padding: 6px 10px; /* Reduce from default ~8px 12px */
    font-size: 0.9em; /* Slightly smaller text */
    margin: 0 2px; /* Tighter spacing between numbers */
}

.page-ellipsis {
    padding: 6px 8px; /* Match the page numbers */
    font-size: 0.9em;
}

.page-number.current-page {
    padding: 6px 10px; /* Keep consistent with other numbers */
}
.planet-earth-card {
    max-width: 800px;
    margin: 2rem auto;
    background: linear-gradient(135deg, #e5e7e8 0%, #c9cdcf 100%);
    border-radius: 16px;
    padding: 2rem;
    color: #2c3e50;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.card-header {
    text-align: center;
    margin-bottom: 2rem;
}

.category-badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1rem;
}

.situation-title {
    font-size: 2rem;
    margin: 0.5rem 0;
    font-weight: 700;
}

.tagline {
    font-size: 1.125rem;
    opacity: 0.9;
    font-style: italic;
}

.why-matters-section,
.survival-phrases-section,
.key-vocab-section,
.dialogue-section,
.insights-section,
.study-invitation {
    background: rgba(44, 62, 80, 0.08);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    backdrop-filter: blur(10px);
}

.why-matters-section h3,
.survival-phrases-section h3,
.key-vocab-section h3,
.dialogue-section h3,
.insights-section h3,
.study-invitation h3 {
    margin-top: 0;
    margin-bottom: 1rem;
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.matter-details {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.matter-meta {
    display: flex;
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.frequency-badge,
.level-badge {
    display: inline-block;
    padding: 0.375rem 0.75rem;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.2);
}

.phrases-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.phrase-item {
    background: rgba(44, 62, 80, 0.05);
    padding: 1rem;
    border-radius: 8px;
    border-left: 4px solid rgba(44, 62, 80, 0.25);
}

.phrase-text {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.phrase-function {
    opacity: 0.8;
    font-size: 0.875rem;
}

.vocab-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.vocab-tag {
    background: rgba(255, 255, 255, 0.2);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
}

.danger-zone {
    background: rgba(255, 100, 100, 0.3);
    padding: 1rem;
    border-radius: 8px;
    border-left: 4px solid #ff6b6b;
    margin-top: 1rem;
}

.dialogue-context {
    font-style: italic;
    opacity: 0.8;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.dialogue-exchange {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.dialogue-line {
    background: rgba(44, 62, 80, 0.05);
    padding: 0.75rem 1rem;
    border-radius: 8px;
    line-height: 1.6;
}

.dialogue-line strong {
    color: #ffd700;
}

.hidden-rule,
.regional-note {
    margin-bottom: 1rem;
    line-height: 1.6;
}

.hidden-rule:last-child,
.regional-note:last-child {
    margin-bottom: 0;
}

.study-invitation {
    text-align: center;
    background: rgba(255, 255, 255, 0.2);
}

.study-invitation p {
    font-size: 1.125rem;
    margin-bottom: 1.5rem;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Responsive */
@media (max-width: 640px) {
    .planet-earth-card {
        padding: 1.5rem;
    }
    
    .situation-title {
        font-size: 1.5rem;
    }
}


/* ==================== GRAMMAR BOX (embedded grammar bites) ==================== */
.ysp-lc-grammar-box {
    margin: 20px 0;
    padding: 0;
    border-left: 5px solid #d97706; /* Amber/orange - distinct from teal lexical */
    border-radius: 8px;
    background: #fffbeb; /* Warm cream background */
    box-shadow: 0 2px 4px rgba(217, 119, 6, 0.08);
    overflow: hidden;
}

.ysp-lc-grammar-section {
    padding: 14px 18px;
    border-bottom: 1px solid rgba(217, 119, 6, 0.12);
}

.ysp-lc-grammar-section:last-child {
    border-bottom: none;
}

.ysp-lc-grammar-title {
    margin: 0 0 10px 0;
    font-size: 0.92rem;
    font-weight: 700;
    color: #d97706;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.ysp-lc-grammar-list {
    margin: 0 0 0 20px;
    padding: 0;
    list-style-type: disc;
}

.ysp-lc-grammar-list li {
    margin: 6px 0;
    font-size: 0.94rem;
    line-height: 1.6;
    color: #78350f; /* Dark amber for text */
}

/* Common mistake section - special treatment */
.ysp-lc-grammar-mistake-section {
    background: #fef3c7; /* Slightly darker cream */
}

.ysp-lc-grammar-mistake {
    padding: 12px 14px;
    margin: 0;
    background: rgba(217, 119, 6, 0.08);
    border-left: 3px solid #d97706;
    border-radius: 4px;
    font-size: 0.94rem;
    line-height: 1.6;
    color: #78350f;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .ysp-lc-grammar-box {
        margin: 16px 0;
    }
    
    .ysp-lc-grammar-section {
        padding: 12px 15px;
    }
    
    .ysp-lc-grammar-list li {
        font-size: 0.91rem;
    }
}


/* Compare texts */
.ysp-lc-compare-texts{
  margin-top: 14px;
  padding: 14px 16px;
  border: 1px solid rgba(0,0,0,.08);
  border-radius: 12px;
  background: rgba(0,0,0,.02);
}

.ysp-lc-compare-meta{ margin: 6px 0; opacity: .95; }
.ysp-lc-compare-title{ margin: 0 0 8px; font-size: 1rem; }
.ysp-lc-compare-text{ line-height: 1.55; }

/* ==================== TERM DEEP DIVES (Lexical Deep Dive) ==================== */
.ysp-lc-term-deep-dive {
    margin-top: 20px;
}

.ysp-lc-term-card {
    margin: 16px 0;
    padding: 16px 18px;
    border-left: 4px solid #005f73;
    border-radius: 6px;
    background: #f8f9fa;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.ysp-lc-term-title {
    margin: 0 0 8px 0;
    font-size: 1.15rem;
    font-weight: 700;
    color: #005f73;
}

.ysp-lc-term-def {
    margin: 0 0 14px 0;
    font-size: 0.98rem;
    line-height: 1.5;
    color: #2c3e50;
}

.ysp-lc-term-section {
    margin: 12px 0 0 0;
}

.ysp-lc-term-label {
    display: inline-block;
    font-weight: 600;
    font-size: 0.88rem;
    color: #005f73;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-bottom: 6px;
}

/* Collocations as inline badges */
.ysp-lc-term-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 6px;
}

.ysp-lc-term-badge {
    background: #e0f2f5;
    color: #005f73;
    padding: 4px 11px;
    border-radius: 12px;
    font-size: 0.88rem;
    font-weight: 500;
    display: inline-block;
    border: 1px solid rgba(0, 95, 115, 0.15);
}

/* Examples as compact list */
.ysp-lc-term-examples {
    margin: 6px 0 0 20px;
    padding: 0;
    list-style-type: disc;
}

.ysp-lc-term-examples li {
    margin: 4px 0;
    font-size: 0.92rem;
    line-height: 1.5;
    color: #2c3e50;
}

/* Contrast section */
.ysp-lc-term-contrast-section {
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid rgba(0, 95, 115, 0.15);
}

.ysp-lc-term-contrast {
    margin-top: 6px;
    padding: 10px 12px;
    background: rgba(0, 95, 115, 0.05);
    border-radius: 4px;
    font-size: 0.92rem;
    line-height: 1.5;
    color: #34495e;
    font-style: italic;
}

/* Mobile responsive adjustments */
@media (max-width: 768px) {
    .ysp-lc-term-card {
        padding: 14px 15px;
    }
    
    .ysp-lc-term-title {
        font-size: 1.08rem;
    }
    
    .ysp-lc-term-badge {
        font-size: 0.85rem;
        padding: 3px 9px;
    }
}

/* Reflection */
.ysp-lc-reflection-box{
  margin-top: 14px;
  padding: 14px 16px;
  border: 1px solid rgba(0,0,0,.08);
  border-radius: 12px;
  background: rgba(0,0,0,.02);
}
.ysp-lc-reflection-title{ margin: 0 0 8px; font-size: 1rem; }
.ysp-lc-reflection-list{ margin: 0 0 10px 18px; }

/* Chips */
.ysp-lc-chip{
  display: inline-block;
  padding: 4px 10px;
  margin: 4px 6px 0 0;
  border: 1px solid rgba(0,0,0,.10);
  border-radius: 999px;
  font-size: .9rem;
}



/* Make it feel like ONE unit (heavier outline) */
.ysp-lc-nav-with-toc {
  border: 2px solid rgba(41, 120, 136, 0.35); /* nav-ish */
  border-radius: 12px;
  overflow: hidden;
}

/* Header section (title + toggle) */
.ysp-lc-nav-with-toc .pathway-header-section {
  padding: 16px 18px;
}

/* Abstract appears only inside expanded panel */
.ysp-lc-nav-with-toc .pathway-abstract {
  margin: 10px 0 14px 0;
  padding: 12px 14px;
  background: rgba(255,255,255,0.75);
  border-left: 4px solid rgba(41, 120, 136, 0.6);
  border-radius: 8px;
  line-height: 1.45;
  font-size: 0.95em;
}

/* Optional: content type badge inside TOC items */
.ysp-lc-nav-with-toc .toc-type-badge {
  margin-left: auto;
  padding: 4px 10px;
  background: #f5f5f5;
  color: #666;
  border-radius: 6px;
  font-size: 0.8em;
  font-weight: 600;
}

/* 1) Whole nav+TOC unit uses nav colour */
.ysp-lc-pathway-navigation-enhanced.ysp-lc-nav-with-toc {
  background: #2f5563;
  border-radius: 12px;
  overflow: hidden;
  color: #fff;
}

/* 2) Ensure header + TOC panel inherit the dark background */
.ysp-lc-pathway-navigation-enhanced.ysp-lc-nav-with-toc .pathway-header-section,
.ysp-lc-pathway-navigation-enhanced.ysp-lc-nav-with-toc .pathway-toc-list {
  background: transparent; /* inherits from wrapper */
  color: #fff;
}

/* 3) Make abstract readable on dark */
.ysp-lc-pathway-navigation-enhanced.ysp-lc-nav-with-toc .pathway-abstract {
  background: rgba(255,255,255,0.10);
  border-left: 4px solid rgba(255,255,255,0.35);
  border-radius: 10px;
  padding: 12px 14px;
  margin: 10px 0 14px;
  color: rgba(255,255,255,0.92);
}

/* 4) TOC rows stay light cards for contrast */
.ysp-lc-pathway-navigation-enhanced.ysp-lc-nav-with-toc .toc-item {
  background: rgba(255,255,255,0.95);
  color: #1b2a30;
  border-radius: 10px;
  margin: 10px 0;
  padding: 12px 14px;
}

/* Links inside rows */
.ysp-lc-pathway-navigation-enhanced.ysp-lc-nav-with-toc a.toc-title {
  color: #1b2a30;
  text-decoration: none;
}
.ysp-lc-pathway-navigation-enhanced.ysp-lc-nav-with-toc a.toc-title:hover {
  text-decoration: underline;
}

/* 5) Toggle button readable on dark */
.ysp-lc-pathway-navigation-enhanced.ysp-lc-nav-with-toc .toc-toggle-btn {
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.25);
  color: #fff;
}

/* Ensure pathway_id / pathway title is white in LC nav */
.ysp-lc-pathway-navigation-enhanced
.pathway-main-title {
    color: #ffffff !important;
}




/**
 * Tracked MCQ Quiz Styles
 * Add to frontend.css or create separate file
 */

/**
 * Tracked MCQ Quiz Styles — RESKINNED with Grammar Practice visuals
 * 
 * Same selectors as before (JS untouched), new look matching
 * the grammar-practice-container aesthetic.
 * 
 * Replaces the original tracked-mcq CSS block.
 */

/* ============================================
   TRACKED MCQ QUIZ BLOCK  (was: white box with grey border)
   NOW: grammar-practice-container style
   ============================================ */

.ysp-tracked-mcq-block {
    max-width: 900px;
    margin: 24px auto;
    padding: 20px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

/* ============================================
   QUIZ HEADER  (was: plain h3 + grey text)
   NOW: grammar-practice-header style — orange h2, meta row
   ============================================ */

.ysp-tracked-mcq-block .ysp-quiz-header {
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 2px solid #e0e0e0;
}

.ysp-tracked-mcq-block .ysp-quiz-header h3 {
    margin: 0 0 8px 0;
    font-size: 1.4em;
    color: #ff5722;              /* grammar-practice orange */
    font-weight: 700;
}

.ysp-tracked-mcq-block .ysp-quiz-instructions {
    margin: 8px 0 0 0;
    color: #666;
    font-size: 0.95em;
    font-style: italic;          /* matches .activity-instructions */
}

/* ============================================
   INDIVIDUAL QUESTIONS  (was: light grey card)
   NOW: grammar-gap-item style — white card, orange left border
   ============================================ */

.ysp-mcq-question {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-left: 4px solid #ff5722;   /* grammar-gap-item accent */
    border-radius: 0 8px 8px 0;
    padding: 16px;
    margin-bottom: 20px;
    transition: border-color 0.3s;
}

.ysp-mcq-question:last-child {
    margin-bottom: 0;
}

/* Answered-state border colours (same as grammar) */
.ysp-mcq-question.answered-correct {
    border-left-color: #4caf50;
    background: #f1f8e9;
}

.ysp-mcq-question.answered-incorrect {
    border-left-color: #f44336;
    background: #ffebee;
}

/* ============================================
   QUESTION TYPE BADGE  (was: rounded pill)
   NOW: grammar-point-badge style — blue rect tag
   ============================================ */

.ysp-mcq-badge {
    display: inline-block;
    background: #e3f2fd;
    color: #1565c0;
    font-size: 0.85em;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 4px;           /* rect, not pill */
    margin-bottom: 12px;
    text-transform: none;         /* drop uppercase */
    letter-spacing: normal;
}

/* Optional: keep per-type tints if you want them */
.ysp-mcq-question[data-question-type="grammar"] .ysp-mcq-badge,
.ysp-mcq-question[data-question-type="grammar_rule"] .ysp-mcq-badge {
    background: #fff3e0;
    color: #e65100;
}

.ysp-mcq-question[data-question-type="lexis"] .ysp-mcq-badge,
.ysp-mcq-question[data-question-type="definition"] .ysp-mcq-badge {
    background: #e3f2fd;
    color: #1565c0;
}

.ysp-mcq-question[data-question-type="usage"] .ysp-mcq-badge {
    background: #e8f5e9;
    color: #2e7d32;
}

.ysp-mcq-question[data-question-type="form"] .ysp-mcq-badge {
    background: #fce4ec;
    color: #c62828;
}

.ysp-mcq-question[data-question-type="collocation"] .ysp-mcq-badge {
    background: #ede7f6;
    color: #4a148c;
}

.ysp-mcq-question[data-question-type="distinction"] .ysp-mcq-badge {
    background: #fff8e1;
    color: #f57f17;
}

/* ============================================
   QUESTION TEXT
   ============================================ */

.ysp-mcq-question .ysp-question-text {
    font-size: 1.1em;
    line-height: 1.6;
    color: #333;
    margin-bottom: 12px;
}

/* ============================================
   ANSWER CHOICES  (was: full-width column buttons)
   NOW: grammar-option style — flex-wrap row, border highlights
   ============================================ */

.ysp-question-choices {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ysp-mcq-choice {
    display: block;
    width: 50%;
    text-align: left;
    padding: 10px 20px;
    background: #fff;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 1em;
    color: #333;
    cursor: pointer;
    transition: all 0.2s ease;
}

.ysp-mcq-choice:hover:not(.answered) {
    border-color: #ff5722;        /* orange hover, not blue */
    background: #fff3e0;
    transform: none;              /* drop the translateX slide */
}

.ysp-mcq-choice:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(255, 87, 34, 0.2);   /* orange focus ring */
}

/* Answered states — grammar-option colours */
.ysp-mcq-choice.answered {
    cursor: default;
    opacity: 0.85;
}

.ysp-mcq-choice.ysp-mcq-correct {
    background: #c8e6c9 !important;
    border-color: #4caf50 !important;
    color: #2e7d32 !important;
}

.ysp-mcq-choice.ysp-mcq-correct::before {
    content: '✓ ';
    font-weight: bold;
}

.ysp-mcq-choice.ysp-mcq-incorrect {
    background: #ffcdd2 !important;
    border-color: #f44336 !important;
    color: #c62828 !important;
}

.ysp-mcq-choice.ysp-mcq-incorrect::before {
    content: '✗ ';
    font-weight: bold;
}

/* ============================================
   FEEDBACK / RATIONALE  (was: grey box, blue left border)
   NOW: grammar .gap-explanation style — light blue box
   ============================================ */

.ysp-question-feedback {
    margin-top: 12px;
    padding: 12px 16px;
    background: #e3f2fd;
    border-left: 4px solid #2196f3;
    border-radius: 0 6px 6px 0;
}

.ysp-feedback-rationale {
    margin: 0;
    font-size: 0.95em;
    color: #333;
    line-height: 1.5;
}

/* ============================================
   QUIZ CONTROLS
   ============================================ */

.ysp-mcq-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 24px;
    padding-top: 16px;
    border-top: 2px solid #e0e0e0;
}

.ysp-mcq-progress {
    font-size: 0.9em;
    color: #666;
    font-weight: 500;
}

.ysp-mcq-reset {
    padding: 10px 20px;
    background: #ff5722;          /* orange, not grey */
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 0.95em;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
}

.ysp-mcq-reset:hover {
    background: #e64a19;
}

/* ============================================
   RESULTS DISPLAY  (same gradient approach,
   using grammar-practice colour palette)
   ============================================ */

.ysp-mcq-results {
    margin-top: 30px;
    padding: 24px;
    border-radius: 12px;
    text-align: center;
}

.ysp-mcq-results.excellent {
    background: linear-gradient(135deg, #c8e6c9, #a5d6a7);
    border: 2px solid #4caf50;
}

.ysp-mcq-results.good {
    background: linear-gradient(135deg, #fff3e0, #ffe0b2);
    border: 2px solid #ff9800;
}

.ysp-mcq-results.needs-practice {
    background: linear-gradient(135deg, #ffebee, #ffcdd2);
    border: 2px solid #f44336;
}

.ysp-score-display {
    margin-bottom: 16px;
}

.ysp-score-circle {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.ysp-score-number {
    font-size: 28px;
    font-weight: 700;
    color: #333;
}

.ysp-score-message {
    font-size: 1.2em;
    font-weight: 600;
    color: #333;
    margin: 0;
}

.ysp-recommendation {
    color: #666;
    font-size: 0.95em;
    margin: 12px 0 0 0;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (min-width: 1024px) {
    .ysp-mcq-question {
        padding: 24px;
    }
    
    .ysp-question-choices {
        gap: 12px;
    }
}

@media (max-width: 1023px) and (min-width: 768px) {
    .ysp-question-choices {
        gap: 10px;
    }
    
    .ysp-mcq-choice {
        font-size: 0.95em;
        padding: 10px 16px;
    }
}

@media (max-width: 767px) and (min-width: 600px) {
    .ysp-question-choices {
        gap: 8px;
    }
    
    .ysp-mcq-choice {
        font-size: 0.9em;
        padding: 10px 14px;
    }
    
    .ysp-mcq-question {
        padding: 20px 16px;
    }
}

@media (max-width: 599px) {
    .ysp-tracked-mcq-block {
        padding: 16px;
        margin: 16px auto;
    }
    
    .ysp-mcq-question {
        padding: 16px 12px;
    }
    
    .ysp-mcq-choice {
        padding: 10px 14px;
        font-size: 0.9em;
        width: 100%;               /* stack on small phones */
    }
    
    .ysp-mcq-controls {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }
}

/* ==========================================
   VOCABULARY RECAP - QC ENHANCED TOGGLES
   ========================================== */

/* Main vocab item container */
.ysp-lc-vocabulary-recap .vocab-item {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    margin-bottom: 12px;
    background: #fff;
    overflow: hidden;
}

.ysp-lc-vocabulary-recap .vocab-item.has-extras {
    border-left: 3px solid #0073aa;
}

/* Main row with term + definition */
.ysp-lc-vocabulary-recap .vocab-main {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    padding: 12px 15px;
    gap: 8px;
}

.ysp-lc-vocabulary-recap .vocab-main .term {
    flex-shrink: 0;
    font-weight: 600;
    color: #1d2327;
}

.ysp-lc-vocabulary-recap .vocab-main .definition {
    flex: 1;
    color: #50575e;
    min-width: 200px;
}

/* Toggle button */
.ysp-lc-vocabulary-recap .vocab-toggle {
    flex-shrink: 0;
    width: auto;
    height: auto;
    border: none;
    border-radius: 0;
    background: none;
    color: #005f73;
    font-size: 1em;
    font-weight: normal;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.2s ease;
    padding: 0 4px;
}


.ysp-lc-vocabulary-recap .vocab-toggle:hover {
    background: none;
    border-color: transparent;
    color: #005f73;
    opacity: 0.7;
}
 
.ysp-lc-vocabulary-recap .vocab-toggle[aria-expanded="true"] {
    background: none;
    border-color: transparent;
    color: #005f73;
}

/* Extras tray */
.ysp-lc-vocabulary-recap .vocab-extras {
    background: #f9fafb;
    border-top: 1px solid #e0e0e0;
    padding: 12px 15px;
}

.ysp-lc-vocabulary-recap .vocab-extras .extra-item {
    margin-bottom: 8px;
    font-size: 0.9em;
    line-height: 1.5;
}

.ysp-lc-vocabulary-recap .vocab-extras .extra-item:last-child {
    margin-bottom: 0;
}

.ysp-lc-vocabulary-recap .vocab-extras .extra-label {
    font-weight: 600;
    color: #1d2327;
}

.ysp-lc-vocabulary-recap .vocab-extras .extra-value {
    color: #50575e;
}

/* Specific styling for different extra types */
.ysp-lc-vocabulary-recap .extra-register .extra-value {
    display: inline-block;
    padding: 2px 8px;
    background: #e7f3ff;
    border-radius: 4px;
    font-size: 0.85em;
    color: #0073aa;
}

.ysp-lc-vocabulary-recap .extra-collocations .extra-value,
.ysp-lc-vocabulary-recap .extra-confusables .extra-value {
    font-style: italic;
}

.ysp-lc-vocabulary-recap .extra-example_sentence .extra-value {
    display: block;
    margin-top: 4px;
    padding: 8px 12px;
    background: #fff;
    border-left: 3px solid #0073aa;
    font-style: italic;
}

/* Mobile responsive */
@media (max-width: 600px) {
    .ysp-lc-vocabulary-recap .vocab-main {
        flex-direction: column;
    }
    
    .ysp-lc-vocabulary-recap .vocab-main .definition {
        min-width: 100%;
    }
    
    .ysp-lc-vocabulary-recap .vocab-toggle {
        align-self: flex-end;
        margin-top: -24px;
    }
}




/**
 * Lexical Practice Activities - Explanation Styles
 * 
 * Styles for:
 * - Gap fill items and option buttons
 * - Correct/incorrect states
 * - Explanation reveal boxes
 * - Collocation matching
 * - L1 (Italian) notes
 */

/* =========================================
   GAP FILL ITEMS
   ========================================= */

.gap-fill-item {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 16px;
    transition: border-color 0.3s ease;
}

.gap-fill-item.correct-answer {
    border-color: #4caf50;
    background: linear-gradient(to right, rgba(76, 175, 80, 0.05), transparent);
}

.gap-fill-item.wrong-answer {
    border-color: #f44336;
    background: linear-gradient(to right, rgba(244, 67, 54, 0.05), transparent);
}

.gap-text,
.formation-text {
    font-size: 1.1em;
    line-height: 1.6;
    color: #333;
    margin-bottom: 16px;
}

.gap-marker {
    background: #fff3cd;
    padding: 2px 8px;
    border-radius: 4px;
    border-bottom: 2px solid #ffc107;
}

/* =========================================
   OPTION BUTTONS
   ========================================= */

.gap-options {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 12px;
}

.option-btn {
    padding: 10px 20px;
    border: 2px solid #ddd;
    background: #fff;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1em;
    transition: all 0.2s ease;
    min-width: 100px;
    text-align: center;
}

.option-btn:hover:not(:disabled) {
    border-color: #2196f3;
    background: #e3f2fd;
}

.option-btn:disabled {
    cursor: default;
    opacity: 0.8;
}

.option-btn.correct {
    background: #4caf50 !important;
    color: #fff !important;
    border-color: #4caf50 !important;
}

.option-btn.incorrect {
    background: #f44336 !important;
    color: #fff !important;
    border-color: #f44336 !important;
}

.option-btn.show-correct {
    border-color: #4caf50 !important;
    background: #e8f5e9 !important;
    color: #2e7d32 !important;
    font-weight: 600;
}

/* =========================================
   EXPLANATION BOXES
   ========================================= */

.gap-explanation {
    background: #f8f9fa;
    border-left: 4px solid #2196f3;
    padding: 14px 18px;
    margin-top: 16px;
    border-radius: 0 8px 8px 0;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.gap-explanation p {
    margin: 0;
    line-height: 1.6;
    color: #333;
}

/* L1 Note (Italian speaker note) */
.l1-note {
    margin-top: 10px;
    padding: 10px 12px;
    background: linear-gradient(135deg, #e8f5e9 0%, #fff8e1 100%);
    border-radius: 6px;
    font-size: 0.95em;
    color: #555;
    border: 1px dashed #81c784;
}

/* =========================================
   COLLOCATION MATCHING
   ========================================= */

.collocation-matching {
    margin: 20px 0;
}

.matching-columns {
    display: flex;
    gap: 40px;
    justify-content: center;
    margin-bottom: 20px;
}

.left-column,
.right-column {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-width: 180px;
}

.match-item {
    padding: 12px 18px;
    border: 2px solid #ddd;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    font-size: 1em;
    background: #fff;
}

.match-item.left {
    background: #e3f2fd;
    border-color: #90caf9;
}

.match-item.right {
    background: #fff3e0;
    border-color: #ffcc80;
}

.match-item.left:hover:not(.matched) {
    background: #bbdefb;
    border-color: #42a5f5;
}

.match-item.right:hover:not(.matched) {
    background: #ffe0b2;
    border-color: #ffa726;
}

.match-item.selected {
    border-color: #1976d2 !important;
    box-shadow: 0 0 0 3px rgba(25, 118, 210, 0.3);
    transform: scale(1.02);
}

.match-item.matched.pending {
    opacity: 0.7;
    cursor: default;
}

.match-item.correct {
    background: #c8e6c9 !important;
    border-color: #4caf50 !important;
    cursor: default;
}

.match-item.incorrect {
    background: #ffcdd2 !important;
    border-color: #f44336 !important;
    cursor: default;
}

/* Check button */
.check-matching-btn {
    display: block;
    margin: 20px auto;
    padding: 12px 32px;
    background: #2196f3;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
}

.check-matching-btn:hover:not(:disabled) {
    background: #1976d2;
}

.check-matching-btn:disabled {
    background: #9e9e9e;
    cursor: default;
}

/* Matching score */
.matching-score {
    text-align: center;
    font-size: 1.2em;
    font-weight: 600;
    color: #1976d2;
    margin: 16px 0;
}

/* Matching explanations */
.matching-explanations {
    background: #fafafa;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    margin-top: 24px;
}

.matching-explanations h5 {
    margin: 0 0 16px 0;
    color: #1976d2;
    font-size: 1.1em;
}

.explanation-list {
    display: grid;
    gap: 12px;
}

.collocation-explanation {
    background: #fff;
    border-left: 3px solid #64b5f6;
    padding: 12px 16px;
    border-radius: 0 6px 6px 0;
}

.collocation-explanation strong {
    display: block;
    color: #1565c0;
    margin-bottom: 6px;
}

.collocation-explanation p {
    margin: 0;
    color: #555;
    line-height: 1.5;
}

/* =========================================
   INPUT FIELDS (for preposition activities)
   ========================================= */

.prep-input,
.word-family-input {
    padding: 10px 14px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 1em;
    width: 120px;
    transition: border-color 0.2s ease;
}

.prep-input:focus,
.word-family-input:focus {
    outline: none;
    border-color: #2196f3;
}

.prep-input.correct,
.word-family-input.correct {
    border-color: #4caf50 !important;
    background: #e8f5e9;
}

.prep-input.incorrect,
.word-family-input.incorrect {
    border-color: #f44336 !important;
    background: #ffebee;
}

.prep-input-container {
    display: flex;
    gap: 10px;
    align-items: center;
    margin: 12px 0;
}

.check-answer-btn {
    padding: 10px 20px;
    background: #2196f3;
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.2s ease;
}

.check-answer-btn:hover:not(:disabled) {
    background: #1976d2;
}

.check-answer-btn:disabled {
    background: #9e9e9e;
    cursor: default;
}

/* =========================================
   LEXICAL PRACTICE - RESPONSIVE
   ========================================= */

/* Default - PC/Desktop (no restrictions) */
.lexical-deep-dive,
.ysp-lexical-quiz-block {
    max-width: 100%;
    width: 100%;
}

/* Large Desktop - Optimal spacing */
@media (min-width: 1200px) {
    .gap-fill-item,
    .word-family-item,
    .error-correction-item {
        padding: 24px;
    }
    
    .matching-columns {
        gap: 40px;
    }
}

/* Desktop (1024px - 1199px) */
@media (max-width: 1199px) and (min-width: 1024px) {
    .matching-columns {
        gap: 30px;
    }
    
    .gap-options {
        gap: 10px;
    }
}

/* Tablet (768px - 1023px) */
@media (max-width: 1023px) and (min-width: 768px) {
    .gap-fill-item,
    .word-family-item,
    .error-correction-item {
        padding: 20px;
    }
    
    .option-btn {
        font-size: 0.95em;
        padding: 10px 16px;
    }
    
    .matching-columns {
        gap: 24px;
    }
    
    .match-item {
        font-size: 0.95em;
    }
}

/* Small Tablet / Phablet (600px - 767px) */
@media (max-width: 767px) and (min-width: 600px) {
    .gap-fill-item,
    .word-family-item,
    .error-correction-item {
        padding: 18px 16px;
    }
    
    .gap-options {
        gap: 8px;
    }
    
    .option-btn {
        font-size: 0.9em;
        padding: 10px 14px;
    }
    
    /* Keep columns side-by-side on small tablets */
    .matching-columns {
        gap: 16px;
    }
    
    .left-column,
    .right-column {
        min-width: 45%;
    }
}

/* Mobile Portrait (works well) */
@media (max-width: 599px) {
    .lexical-deep-dive,
    .ysp-lexical-quiz-block {
        padding: 16px 12px;
    }
    
    /* Stack matching columns on mobile */
    .matching-columns {
        flex-direction: column;
        gap: 20px;
    }
    
    .left-column,
    .right-column {
        min-width: unset;
        width: 100%;
    }
    
    .match-item {
        font-size: 0.95em;
        padding: 12px;
    }
    
    /* Stack gap-fill options */
    .gap-options {
        flex-direction: column;
        gap: 8px;
    }
    
    .option-btn {
        width: 100%;
        min-width: unset;
        text-align: center;
        font-size: 0.9em;
        padding: 12px;
    }
    
    /* Word family inputs */
    .word-family-gaps {
        gap: 12px;
    }
    
    .word-family-gap input {
        font-size: 0.95em;
    }
    
    /* Check buttons */
    .check-answer-btn,
    .check-word-family {
        width: 100%;
        text-align: center;
    }
    
    /* Gap fill items */
    .gap-fill-item,
    .word-family-item,
    .error-correction-item {
        padding: 16px 12px;
    }
    
    /* Priority tabs */
    .priority-tabs {
        gap: 6px;
    }
    
    .priority-tab {
        font-size: 0.85em;
        padding: 8px 12px;
    }
}

/* Very Small Mobile (320px - 400px) */
@media (max-width: 400px) {
    .option-btn {
        font-size: 0.85em;
        padding: 10px;
    }
    
    .match-item {
        font-size: 0.9em;
        padding: 10px;
    }
    
    .gap-fill-sentence {
        font-size: 0.95em;
        line-height: 1.6;
    }
    
    .priority-tab {
        font-size: 0.8em;
        padding: 6px 10px;
    }
}

/* Landscape Mobile - Compact but functional */
@media (max-height: 500px) and (orientation: landscape) {
    .lexical-deep-dive,
    .ysp-lexical-quiz-block {
        padding: 12px;
    }
    
    .gap-fill-item,
    .word-family-item,
    .error-correction-item {
        padding: 12px;
        margin-bottom: 12px;
    }
    
    .priority-tabs {
        margin-bottom: 12px;
    }
    
    /* Keep columns side-by-side in landscape if there's room */
    .matching-columns {
        flex-direction: row;
        gap: 16px;
    }
}

/* =========================================
   RESET BUTTON
   ========================================= */
.reset-activity-btn {
    display: inline-block;
    margin-top: 16px;
    padding: 8px 16px;
    background: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 4px;
    color: #666;
    cursor: pointer;
    font-size: 0.9em;
    transition: all 0.2s ease;
}

.reset-activity-btn:hover {
    background: #e0e0e0;
    color: #333;
}

/* Mobile reset button */
@media (max-width: 599px) {
    .reset-activity-btn {
        width: 100%;
        text-align: center;
        padding: 12px;
    }
}






/**
 * GRAMMAR PRACTICE FROM SCENARIOS 19 JAN - CSS STYLING
 * 
 */

/* Container */
.grammar-practice-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
}

.grammar-practice-header {
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 2px solid #e0e0e0;
}

.grammar-practice-header h2 {
    margin: 0 0 8px 0;
    color: #ff5722;
}

.grammar-practice-header h3 {
    margin: 0;
    color: #333;
    font-weight: 500;
}

.grammar-meta {
    margin-top: 12px;
    display: flex;
    gap: 12px;
    align-items: center;
}

.grammar-focus {
    color: #666;
    font-style: italic;
}

.level-badge {
    background: #ff5722;
    color: #fff;
    padding: 4px 12px;
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.85em;
}

/* Grammar Summary */
.grammar-summary-box {
    background: #fff3e0;
    border: 1px solid #ffcc80;
    border-radius: 8px;
    padding: 16px 20px;
    margin-bottom: 24px;
}

.grammar-summary-box h4 {
    margin: 0 0 12px 0;
    color: #e65100;
}

.grammar-summary-box p {
    margin: 8px 0;
}

.grammar-summary-box code {
    background: #fff;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 0.9em;
}

.grammar-summary-box ul {
    margin: 8px 0;
    padding-left: 20px;
}

/* Activity sections */
.grammar-practice-section {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.grammar-activity {
    background: #fafafa;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
}

.grammar-activity h4 {
    margin: 0 0 8px 0;
    color: #333;
}

.grammar-point-badge {
    display: inline-block;
    background: #e3f2fd;
    color: #1565c0;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.85em;
    margin-bottom: 12px;
}

.activity-instructions {
    color: #666;
    margin-bottom: 16px;
    font-style: italic;
}

/* Gap fill items */
.grammar-gap-fill-items {
    display: flex;
    flex-direction: column;
    gap: 20px;
}


/**
 * GRAMMAR gap fill - the single css below is actually for batched mcq answers
 * 
 */
.grammar-practice-container .gap-fill-item {
    max-width: 700px;
    margin: 0 auto 20px auto;
    text-align: center;
}

.grammar-gap-item {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-left: 4px solid #ff5722;
    border-radius: 0 8px 8px 0;
    padding: 16px;
    transition: border-color 0.3s;
}

.grammar-gap-item.correct {
    border-left-color: #4caf50;
    background: #f1f8e9;
}

.grammar-gap-item.incorrect {
    border-left-color: #f44336;
    background: #ffebee;
}

.grammar-text {
    font-size: 1.1em;
    margin-bottom: 12px;
    line-height: 1.6;
}

.grammar-gap {
    color: #ff5722;
    font-weight: 600;
}

/* Options */
.gap-options {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.grammar-option {
    padding: 10px 20px;
    border: 2px solid #ddd;
    border-radius: 6px;
    background: #fff;
    cursor: pointer;
    font-size: 1em;
    transition: all 0.2s;
}

.grammar-option:hover:not(:disabled) {
    border-color: #ff5722;
    background: #fff3e0;
}

.grammar-option.correct {
    background: #c8e6c9 !important;
    border-color: #4caf50 !important;
    color: #2e7d32;
}

.grammar-option.incorrect {
    background: #ffcdd2 !important;
    border-color: #f44336 !important;
    color: #c62828;
}

.grammar-option.show-correct {
    border-color: #4caf50 !important;
    border-width: 3px;
}

.grammar-option:disabled {
    cursor: default;
    opacity: 0.8;
}

/* Error correction */
.grammar-error-correction-items {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.error-correction-item {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 16px;
}

.error-correction-item.correct {
    background: #f1f8e9;
    border-color: #4caf50;
}

.error-correction-item.incorrect {
    background: #ffebee;
    border-color: #f44336;
}

.incorrect-sentence {
    font-size: 1.1em;
    margin-bottom: 12px;
    padding: 10px;
    background: #ffebee;
    border-radius: 4px;
}

.error-icon {
    margin-right: 8px;
}

.error-type-badge {
    display: inline-block;
    background: #fff3e0;
    color: #e65100;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.85em;
    margin-bottom: 12px;
}

.correction-input-container {
    display: flex;
    gap: 10px;
    margin-top: 12px;
}

.correction-input {
    flex: 1;
    padding: 10px 14px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 1em;
}

.correction-input:focus {
    outline: none;
    border-color: #ff5722;
}

.check-correction-btn {
    padding: 10px 20px;
    background: #ff5722;
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
}

.check-correction-btn:hover:not(:disabled) {
    background: #e64a19;
}

.check-correction-btn:disabled {
    background: #9e9e9e;
    cursor: default;
}

.correction-feedback {
    margin-top: 10px;
    font-weight: 500;
}

/* Explanations */
.gap-explanation {
    margin-top: 12px;
    padding: 12px 16px;
    background: #e3f2fd;
    border-left: 4px solid #2196f3;
    border-radius: 0 6px 6px 0;
}

.gap-explanation p {
    margin: 0 0 8px 0;
}

.gap-explanation p:last-child {
    margin-bottom: 0;
}

.l1-note {
    background: #fff8e1;
    padding: 8px 10px;
    border-radius: 4px;
    font-size: 0.9em;
    margin-top: 8px !important;
}

/* Results Display */
.grammar-practice-results {
    margin-top: 30px;
    padding: 24px;
    border-radius: 12px;
    text-align: center;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.4s ease;
}

.grammar-practice-results.show {
    opacity: 1;
    transform: translateY(0);
}

.grammar-practice-results.excellent {
    background: linear-gradient(135deg, #c8e6c9, #a5d6a7);
    border: 2px solid #4caf50;
}

.grammar-practice-results.good {
    background: linear-gradient(135deg, #fff3e0, #ffe0b2);
    border: 2px solid #ff9800;
}

.grammar-practice-results.needs-practice {
    background: linear-gradient(135deg, #ffebee, #ffcdd2);
    border: 2px solid #f44336;
}

.score-display {
    margin-bottom: 16px;
}

.score-circle {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.score-number {
    font-size: 28px;
    font-weight: 700;
    color: #333;
}

.score-message {
    font-size: 1.2em;
    font-weight: 600;
    color: #333;
    margin: 0;
}

.recommendation {
    color: #666;
    font-size: 0.95em;
    margin: 12px 0 0 0;
}

/* ===================================
   GRAMMAR PRACTICE - RESPONSIVE
   =================================== */

/* Default - PC/Desktop (no restrictions) */
.ysp-grammar-quiz-block,
.grammar-practice-container {
    max-width: 100%;
    width: 100%;
}

/* Large Tablet and Up - Optimal viewing */
@media (min-width: 1024px) {
    .grammar-gap-item,
    .error-correction-item {
        padding: 24px;
    }
    
    .gap-options {
        gap: 12px;
    }
}

/* Tablet (768px - 1023px) */
@media (max-width: 1023px) and (min-width: 768px) {
    .gap-options {
        gap: 10px;
    }
    
    .grammar-option {
        font-size: 0.95em;
        padding: 10px 16px;
    }
    
    .correction-input {
        font-size: 0.95em;
    }
}

/* Small Tablet / Large Phone (600px - 767px) */
@media (max-width: 767px) and (min-width: 600px) {
    .gap-options {
        gap: 8px;
    }
    
    .grammar-option {
        font-size: 0.9em;
        padding: 10px 14px;
    }
    
    .grammar-gap-item,
    .error-correction-item {
        padding: 20px 16px;
    }
}

/* Mobile Portrait (works well - single sentence gap fill) */
@media (max-width: 599px) {
    .ysp-grammar-quiz-block {
        padding: 16px 12px;
    }
    
    .gap-options {
        flex-direction: column;
        gap: 8px;
    }
    
    .grammar-option {
        width: 100%;
        text-align: center;
        font-size: 0.9em;
        padding: 12px;
    }
    
    .correction-input-container {
        flex-direction: column;
        gap: 10px;
    }
    
    .correction-input {
        width: 100%;
        font-size: 0.95em;
    }
    
    .check-correction-btn {
        width: 100%;
        text-align: center;
    }
    
    .grammar-gap-item,
    .error-correction-item {
        padding: 16px 12px;
    }
    
    /* Score display adjustments */
    .score-circle {
        width: 80px;
        height: 80px;
    }
    
    .score-number {
        font-size: 24px;
    }
    
    .score-message {
        font-size: 0.95em;
    }
}

/* Very Small Mobile (320px - 400px) */
@media (max-width: 400px) {
    .grammar-option {
        font-size: 0.85em;
        padding: 10px;
    }
    
    .gap-sentence {
        font-size: 0.95em;
        line-height: 1.6;
    }
    
    .score-circle {
        width: 70px;
        height: 70px;
    }
    
    .score-number {
        font-size: 20px;
    }
}

/* Landscape Mobile - Full functionality */
@media (max-height: 500px) and (orientation: landscape) {
    .ysp-grammar-quiz-block {
        padding: 12px;
    }
    
    .grammar-gap-item,
    .error-correction-item {
        padding: 16px;
        margin-bottom: 12px;
    }
    
    .score-circle {
        width: 60px;
        height: 60px;
    }
    
    .score-number {
        font-size: 18px;
    }
}







/**
 * TYPED CLOZE TEXT - CSS STYLING
 */

/* Container */
.typed-cloze-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px;
    background: #fafafa;
    border-radius: 12px;
    border: 1px solid #e0e0e0;
}

.typed-cloze-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.typed-cloze-header h3 {
    margin: 0;
    flex: 1;
}

.topic-label {
    color: #666;
    font-style: italic;
    margin: 0;
}

.level-badge {
    background: #2196f3;
    color: #fff;
    padding: 4px 12px;
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.85em;
}

/* Instructions */
.cloze-instructions {
    color: #555;
    margin-bottom: 16px;
    padding: 12px 16px;
    background: #e3f2fd;
    border-radius: 6px;
    border-left: 4px solid #2196f3;
}

/* Context intro */
.context-intro {
    margin-bottom: 20px;
    padding: 12px 16px;
    background: #fff8e1;
    border-radius: 6px;
    border-left: 4px solid #ffc107;
}

.context-intro p {
    margin: 0;
    color: #5d4037;
}

/* Word Bank */
.word-bank {
    margin-bottom: 24px;
    padding: 16px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
}

.word-bank h4 {
    margin: 0 0 12px 0;
    font-size: 1em;
    color: #333;
}

.word-bank-items {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.word-bank-item {
    display: inline-block;
    padding: 6px 14px;
    background: #e8f5e9;
    border: 1px solid #a5d6a7;
    border-radius: 20px;
    font-size: 0.95em;
    cursor: pointer;
    transition: all 0.2s;
}

.word-bank-item:hover {
    background: #c8e6c9;
    transform: translateY(-1px);
}

.word-bank-item.used {
    background: #f5f5f5;
    border-color: #bdbdbd;
    color: #9e9e9e;
    text-decoration: line-through;
}

/* Gapped Text */
.gapped-text-container {
    margin-bottom: 24px;
}

.gapped-text {
    line-height: 2.2;
    font-size: 1.05em;
    color: #333;
    background: #fff;
    padding: 20px 24px;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

/* Gap wrapper */
.gap-wrapper {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    position: relative;
    margin: 0 2px;
}

.gap-number {
    font-size: 0.75em;
    color: #9e9e9e;
    font-weight: 500;
}

/* Input fields */
.cloze-input {
    padding: 4px 8px;
    border: 2px solid #bdbdbd;
    border-radius: 4px;
    font-size: 1em;
    font-family: inherit;
    background: #fff;
    transition: all 0.2s;
    min-width: 80px;
}

.cloze-input:focus {
    outline: none;
    border-color: #2196f3;
    box-shadow: 0 0 0 3px rgba(33, 150, 243, 0.15);
}

.cloze-input.correct {
    border-color: #4caf50;
    background: #e8f5e9;
    color: #2e7d32;
}

.cloze-input.incorrect {
    border-color: #f44336;
    background: #ffebee;
    color: #c62828;
}

.cloze-input.empty {
    border-color: #ff9800;
    background: #fff3e0;
}

.cloze-input.revealed {
    border-color: #9c27b0;
    background: #f3e5f5;
    color: #6a1b9a;
}

.cloze-input:disabled {
    cursor: default;
}

/* Feedback icons */
.gap-feedback {
    display: inline-block;
    width: 20px;
    font-size: 0.9em;
    font-weight: bold;
    opacity: 0;
    transition: opacity 0.2s;
}

.gap-feedback.show {
    opacity: 1;
}

.gap-feedback.correct {
    color: #4caf50;
}

.gap-feedback.incorrect {
    color: #f44336;
}

/* Hint tooltips */
.hint-tooltip {
    display: none;
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #424242;
    color: #fff;
    padding: 6px 10px;
    border-radius: 4px;
    font-size: 0.8em;
    white-space: nowrap;
    z-index: 100;
    margin-bottom: 4px;
}

.hint-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: #424242;
}

.hint-tooltip.show {
    display: block;
}

/* Control buttons */
.cloze-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.cloze-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-size: 0.95em;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.check-all-btn {
    background: #4caf50;
    color: #fff;
}

.check-all-btn:hover:not(:disabled) {
    background: #43a047;
}

.show-hints-btn {
    background: #ff9800;
    color: #fff;
}

.show-hints-btn:hover:not(:disabled) {
    background: #f57c00;
}

.reveal-answers-btn {
    background: #9c27b0;
    color: #fff;
}

.reveal-answers-btn:hover:not(:disabled) {
    background: #7b1fa2;
}

.reset-btn {
    background: #757575;
    color: #fff;
}

.reset-btn:hover:not(:disabled) {
    background: #616161;
}

.cloze-btn:disabled {
    background: #bdbdbd;
    cursor: default;
}

/* Results */
.cloze-results {
    padding: 16px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.cloze-results.excellent {
    background: linear-gradient(135deg, #c8e6c9, #a5d6a7);
    border: 1px solid #4caf50;
}

.cloze-results.good {
    background: linear-gradient(135deg, #fff3e0, #ffe0b2);
    border: 1px solid #ff9800;
}

.cloze-results.needs-practice {
    background: linear-gradient(135deg, #ffebee, #ffcdd2);
    border: 1px solid #f44336;
}

.score-message {
    font-size: 1.1em;
    font-weight: 600;
    margin: 0 0 8px 0;
}

.recommendation {
    margin: 0;
    color: #555;
    font-size: 0.95em;
}

.results-revealed {
    text-align: center;
    color: #6a1b9a;
}

/* Full text reveal */
.full-text-reveal {
    margin-top: 20px;
    padding: 20px;
    background: #f3e5f5;
    border: 1px solid #ce93d8;
    border-radius: 8px;
}

.full-text-reveal h4 {
    margin: 0 0 12px 0;
    color: #6a1b9a;
}

.revealed-text {
    line-height: 1.8;
    color: #333;
}

.word-count {
    font-size: 0.85em;
    color: #666;
    font-weight: 600;
    margin-left: 4px;
    opacity: 0.8;
}

/* ===================================
   RESPONSIVE BREAKPOINTS
   =================================== */

/* Tablet Portrait and Below (but still usable) */
@media (max-width: 768px) {
    .typed-cloze-container {
        padding: 20px 16px;
    }
    
    .word-bank-items {
        gap: 8px;
    }
    
    .word-bank-item {
        font-size: 0.9em;
        padding: 6px 10px;
    }
    
    .gapped-text {
        line-height: 2.2;
        padding: 16px;
    }
    
    .cloze-input {
        min-width: 100px; /* Ensure readability */
    }
}

/* Small Mobile PORTRAIT ONLY (discouraged) */
@media (max-width: 480px) and (orientation: portrait) {
    .typed-cloze-container {
        padding: 12px;
    }
    
    /* Show a helpful message */
    .typed-cloze-container::before {
        content: "📱 For best experience, please rotate your device to landscape mode";
        display: block;
        background: #fff3cd;
        border: 1px solid #ffc107;
        border-radius: 4px;
        padding: 12px;
        margin-bottom: 16px;
        text-align: center;
        font-size: 0.85em;
        color: #856404;
    }
    
    .cloze-controls {
        flex-direction: column;
        gap: 8px;
    }
    
    .cloze-btn {
        width: 100%;
        text-align: center;
        font-size: 0.9em;
    }
    
    .gapped-text {
        padding: 12px;
        line-height: 2.6;
        font-size: 0.95em;
    }
    
    .cloze-input {
        max-width: 140px; /* Slightly bigger for longer phrases */
        font-size: 0.9em;
    }
    
    .word-bank-item {
        font-size: 0.85em;
        padding: 6px 8px;
    }
}

.word-bank-item {
    pointer-events: none !important;
    cursor: default !important;
}

/* Mobile LANDSCAPE (fully supported) */
@media (max-width: 812px) and (orientation: landscape) {
    .typed-cloze-container {
        padding: 16px;
    }
    
    .gapped-text {
        line-height: 2.0;
    }
    
    .cloze-input {
        min-width: 120px;
    }
    
    /* No warning message in landscape */
    .typed-cloze-container::before {
        display: none;
    }
}

/* =========================================
   YSP SECTION SIGNPOST BARS
   ========================================= */

.ysp-signpost {
  margin: 18px 0 16px;
  padding: 12px 16px;
  border-radius: 10px;
  background: #fff;
  border: 2px solid rgba(10, 106, 115, 0.25);
  box-shadow: 0 6px 16px rgba(0,0,0,0.06);
}

.ysp-signpost-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
}

.ysp-signpost-icon {
  font-size: 18px;
  line-height: 1;
}

.ysp-signpost-title {
  font-weight: 800;
  letter-spacing: 0.2px;
  color: #12343a;
}

.ysp-signpost-subtitle {
  font-weight: 600;
  color: rgba(18, 52, 58, 0.72);
}

/* Primary = “main event” */
.ysp-signpost.primary {
  border: 4px solid #0A6A73;
}

.ysp-signpost.primary .ysp-signpost-title {
  color: #0A6A73;
  text-transform: none;
}

.ysp-signpost-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  color: #0A6A73;
  background: rgba(10, 106, 115, 0.10);
}

/* Secondary = supportive practice */
.ysp-signpost.secondary {
  border: 2px dashed rgba(10, 106, 115, 0.35);
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.ysp-signpost.secondary .ysp-signpost-title {
  color: #12343a;
}

.ysp-signpost.primary {
  background: rgba(10, 106, 115, 0.04);
}

.ysp-signpost.secondary {
  opacity: 0.88;
}




@media (max-width: 560px) {
  .ysp-signpost { padding: 12px 14px; }
  .ysp-signpost-title { font-size: 16px; }
  .ysp-signpost-subtitle { font-size: 13px; }
}

/* =============================================
   VOCAB PROGRESS STRIP — At-a-Glance Overview
   Add to vocab-recap-game-single.css 18 Feb 26
   ============================================= */

.ysp-progress-strip {
    margin: 16px 0 24px;
    padding: 16px 20px;
    background: #f8fafb;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
}

/* ---- Mastery Bar ---- */
.progress-strip-bar {
    display: flex;
    height: 10px;
    border-radius: 5px;
    overflow: hidden;
    background: #e2e8f0;
    margin-bottom: 10px;
}

.strip-segment {
    transition: width 0.6s ease-out;
    min-width: 0;
}

.strip-segment:first-child {
    border-radius: 5px 0 0 5px;
}

.strip-segment:last-child {
    border-radius: 0 5px 5px 0;
}

/* ---- Compact Legend ---- */
.progress-strip-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 14px;
    margin-bottom: 10px;
    font-size: 0.82rem;
    color: #475569;
}

.strip-legend-item {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}

.strip-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.strip-legend-item strong {
    font-weight: 700;
    color: #1e293b;
}

/* ---- Engagement Stats Row ---- */
.progress-strip-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 20px;
    padding-top: 10px;
    border-top: 1px solid #e2e8f0;
}

.strip-stat {
    display: flex;
    align-items: baseline;
    gap: 4px;
}

.strip-stat-num {
    font-size: 1.05rem;
    font-weight: 700;
    color: #1c5f73;
}

.strip-stat-label {
    font-size: 0.78rem;
    color: #94a3b8;
    text-transform: lowercase;
}

/* ---- Mobile ---- */
@media (max-width: 600px) {
    .ysp-progress-strip {
        padding: 12px 14px;
    }
    
    .progress-strip-legend {
        gap: 4px 10px;
        font-size: 0.78rem;
    }
    
    .progress-strip-stats {
        gap: 4px 14px;
    }
    
    .strip-stat-num {
        font-size: 0.95rem;
    }
}



/* Dictionary promotion line in progress strip */
.progress-strip-dictionary {
    margin-top: 8px;
    padding: 6px 0 0;
    font-size: 0.85rem;
    color: #1c5f73;
}

.progress-strip-dictionary strong {
    font-weight: 700;
}

/* ---- Refresh animation ---- */
.ysp-progress-strip.refreshing {
    opacity: 0.5;
    transition: opacity 0.2s;
}




/* =====================================================================
 * YSP Completion Panel + Badges
 * Scenario page completion checklist and badge styles
 * Created: 19 Feb 2026 - code is in FE Display and astra child functions 
 * ===================================================================== */

/* ══ PANEL CONTAINER ══ */
.ysp-completion-panel {
    border-radius: 10px;
    margin-bottom: 20px;
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* ── COMPLETE STATE ── */
.panel-complete {
    border: 1px solid #eab308;
    background: linear-gradient(135deg, #fefce8 0%, #fef9c3 100%);
}

.panel-complete .completion-header-done {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    background: linear-gradient(135deg, #fef08a 0%, #fde047 100%);
    border-bottom: 1px solid #eab30840;
}

.completion-trophy-lg {
    font-size: 24px;
    flex-shrink: 0;
}

.completion-header-done .completion-header-text {
    flex: 1;
    color: #854d0e;
    font-size: 14px;
    line-height: 1.4;
}

.completion-header-done .completion-date {
    font-size: 12px;
    color: #a16207;
    opacity: 0.8;
    white-space: nowrap;
}

/* ── IN PROGRESS STATE ── */
.panel-progress {
    border: 1px solid #cbd5e1;
    background: #f8fafc;
}

.completion-header-todo {
    padding: 14px 18px;
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border-bottom: 1px solid #bae6fd;
}

.completion-header-todo .completion-header-text {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin-bottom: 8px;
}

.completion-header-todo .completion-header-text strong {
    font-size: 15px;
    color: #0c4a6e;
}

.completion-progress-count {
    font-size: 13px;
    color: #0369a1;
    font-weight: 500;
}

/* Progress bar in header */
.completion-header-bar {
    height: 6px;
    background: #e2e8f0;
    border-radius: 3px;
    overflow: hidden;
}

.completion-header-bar-fill {
    height: 100%;
    border-radius: 3px;
    background: linear-gradient(90deg, #38bdf8 0%, #0ea5e9 100%);
    transition: width 0.6s ease;
}

/* ══ CHECKLIST ══ */
.completion-checklist {
    padding: 10px 18px 14px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px 16px;
}

.checklist-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    padding: 5px 0;
    min-width: 200px;
    flex: 1 1 calc(50% - 16px);
}

.checklist-status {
    font-size: 14px;
    flex-shrink: 0;
    width: 20px;
    text-align: center;
}

.checklist-icon {
    font-size: 14px;
    flex-shrink: 0;
}

.checklist-label {
    font-weight: 600;
    color: #334155;
}

.checklist-target {
    font-size: 11px;
    color: #64748b;
    background: #f1f5f9;
    padding: 1px 6px;
    border-radius: 4px;
    white-space: nowrap;
}

.checklist-detail {
    font-size: 11px;
    color: #0369a1;
    font-weight: 500;
    margin-left: auto;
    white-space: nowrap;
}

/* Status-specific styling */
.checklist-passed .checklist-label {
    color: #166534;
}

.checklist-passed .checklist-target {
    background: #dcfce7;
    color: #166534;
}

.checklist-pending .checklist-label {
    color: #92400e;
}

.checklist-pending .checklist-target {
    background: #fef3c7;
    color: #92400e;
}

.checklist-not_started .checklist-label {
    color: #94a3b8;
}

.checklist-not_started .checklist-target {
    color: #94a3b8;
}

/* When complete, dim the checklist slightly */
.checklist-done {
    opacity: 0.75;
}

.checklist-done .checklist-item {
    opacity: 0.9;
}

/* ══ MOBILE ══ */
@media (max-width: 768px) {
    .checklist-item {
        flex: 1 1 100%;
        min-width: unset;
    }

    .completion-header-done {
        flex-wrap: wrap;
        gap: 8px;
    }

    .completion-header-done .completion-date {
        width: 100%;
        text-align: right;
    }

    .completion-header-todo .completion-header-text {
        flex-direction: column;
        gap: 4px;
    }
}

@media (max-width: 480px) {
    .ysp-completion-panel {
        margin-left: -12px;
        margin-right: -12px;
        border-radius: 0;
        border-left: none;
        border-right: none;
    }

    .completion-checklist {
        padding: 8px 14px 12px;
    }

    .checklist-detail {
        display: none;
    }
}


/* ══════════════════════════════════════════════════════════════
 * BADGE STYLES (for cards, stats browser, inline usage)
 * ══════════════════════════════════════════════════════════════ */

/* Base badge container */
.ysp-completion-badge {
    margin-top: 8px;
    border-radius: 8px;
    overflow: hidden;
}

.completion-badge-inner {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    font-size: 13px;
    line-height: 1.3;
}

.ysp-completion-complete .completion-badge-inner {
    background: linear-gradient(135deg, #fef9c3 0%, #fef08a 100%);
    border: 1px solid #eab308;
    color: #854d0e;
}

.completion-trophy {
    font-size: 20px;
    flex-shrink: 0;
}

.ysp-completion-complete .completion-label {
    font-weight: 700;
    font-size: 14px;
}

.completion-date {
    margin-left: auto;
    font-size: 11px;
    opacity: 0.7;
    white-space: nowrap;
}

.ysp-completion-in_progress .completion-badge-inner {
    background: #f0f9ff;
    border: 1px solid #bae6fd;
    color: #0c4a6e;
    flex-wrap: wrap;
}

.ysp-completion-in_progress .completion-label,
.ysp-completion-started .completion-label {
    font-size: 12px;
    opacity: 0.8;
}

.ysp-completion-started .completion-badge-inner {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    color: #64748b;
    flex-wrap: wrap;
}

/* Progress bar (badge version) */
.completion-progress-bar {
    flex: 1;
    min-width: 60px;
    height: 8px;
    background: #e2e8f0;
    border-radius: 4px;
    overflow: hidden;
}

.completion-progress-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.6s ease;
    background: linear-gradient(90deg, #38bdf8 0%, #0ea5e9 100%);
}

/* Compact mode for card grids */
.ysp-completion-badge.badge-compact .completion-badge-inner {
    padding: 4px 8px;
    font-size: 12px;
    gap: 6px;
}

.ysp-completion-badge.badge-compact .completion-trophy {
    font-size: 16px;
}

/* Trophy animation */
@keyframes trophyBounce {
    0%   { transform: scale(0.5); opacity: 0; }
    50%  { transform: scale(1.2); }
    100% { transform: scale(1); opacity: 1; }
}

.ysp-completion-complete.just-completed .completion-trophy {
    animation: trophyBounce 0.6s ease-out;
}


.ysp-module-code-badge {
    display: inline-block;
    background: #f0f4f8;
    color: #999;
    font-size: 11px;
    font-family: monospace;
    padding: 3px 8px;
    border-radius: 3px;
    border: 1px solid #dde;
    margin-bottom: 16px;
    opacity: 0.75;
}


/* ══════════════════════════════════════════════════════════════
 * TALKING POINTS HISTORY CSS
 * ══════════════════════════════════════════════════════════════ */


.ysp-tp-score-history {
    background: #f8f9fa;
    border-radius: 6px;
    padding: 12px 16px;
    margin-bottom: 12px;
}

.ysp-tp-score-history h4 {
    margin: 0 0 8px 0;
    font-size: 14px;
    color: #005f73;
}

.ysp-history-summary {
    margin-bottom: 10px;
    font-size: 14px;
    color: #444;
}

.ysp-history-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.ysp-history-table th,
.ysp-history-table td {
    padding: 6px 10px;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
}

.ysp-history-table th {
    color: #666;
    font-weight: 600;
}

.ysp-history-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    margin-right: 4px;
}

.ysp-history-badge.excellent {
    background: #d4edda;
    color: #155724;
}

.ysp-history-badge.good {
    background: #fff3cd;
    color: #856404;
}

.ysp-history-badge.needs-practice {
    background: #f8d7da;
    color: #721c24;
}







.ysp-sound-map .stress-word {
    font-weight: 700;
    color: #005f73;
    transition: transform 0.2s ease, opacity 0.2s ease, background-color 0.2s ease;
    padding: 0 2px;
    border-radius: 3px;
}

.ysp-audio-playing .ysp-sound-map .stress-word {
    animation: yspStressPulse 1.2s infinite ease-in-out;
}

.ysp-audio-playing .ysp-sound-map .stress-word:nth-of-type(1) { animation-delay: 0s; }
.ysp-audio-playing .ysp-sound-map .stress-word:nth-of-type(2) { animation-delay: 0.2s; }
.ysp-audio-playing .ysp-sound-map .stress-word:nth-of-type(3) { animation-delay: 0.4s; }
.ysp-audio-playing .ysp-sound-map .stress-word:nth-of-type(4) { animation-delay: 0.6s; }
.ysp-audio-playing .ysp-sound-map .stress-word:nth-of-type(5) { animation-delay: 0.8s; }
.ysp-audio-playing .ysp-sound-map .stress-word:nth-of-type(6) { animation-delay: 1s; }

@keyframes yspStressPulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
        background-color: transparent;
    }
    50% {
        opacity: 0.75;
        transform: scale(1.08);
        background-color: rgba(0, 95, 115, 0.12);
    }
}


/* ==========================================
   YSP Chain Correspondence Task
   Launch task formatter styles
   ========================================== */

.ysp-chain-task-block {
    background: #f8fbff;
    border: 1.5px solid #c7dceb;
    border-radius: 14px;
    padding: 22px 24px;
    margin: 28px 0;
    box-shadow: 0 6px 18px rgba(20, 60, 90, 0.06);
    color: #2f2f39;
    max-width: 920px;
}

.ysp-chain-task-header {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 14px;
    padding-bottom: 12px;
    border-bottom: 1px solid #d9e7f2;
}

.ysp-chain-task-icon {
    font-size: 1.1rem;
    line-height: 1;
}

.ysp-chain-task-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: #174d63;
}

.ysp-chain-focal-tag {
    display: inline-flex;
    align-items: center;
    padding: 5px 10px;
    border-radius: 999px;
    background: linear-gradient(135deg, #dff4f6, #eaf4ff);
    border: 1px solid #b8d9e6;
    font-size: 0.83rem;
    font-weight: 600;
    color: #1f6072;
    line-height: 1.3;
}

.ysp-chain-task-prompt {
    font-size: 1.06rem;
    line-height: 1.7;
    color: #2e3640;
    margin-bottom: 18px;
}

.ysp-chain-task-meta {
    background: #f3f7fb;
    border: 1px solid #d9e5ef;
    border-radius: 10px;
    padding: 14px 16px;
    margin-bottom: 18px;
}

.ysp-chain-meta-row + .ysp-chain-meta-row {
    margin-top: 8px;
}

.ysp-chain-meta-label {
    font-weight: 700;
    color: #234c5f;
}

.ysp-chain-meta-value {
    color: #3e4650;
}

.ysp-chain-opening-wrap {
    margin-bottom: 18px;
}

.ysp-chain-opening-label,
.ysp-chain-terms-label {
    display: inline-block;
    font-size: 0.9rem;
    font-weight: 700;
    color: #1d5d72;
    margin-bottom: 8px;
}

.ysp-chain-opening-stimulus {
    background: #ffffff;
    border: 1px solid #d5e1ea;
    border-left: 4px solid #2a7a8a;
    border-radius: 10px;
    padding: 16px 18px;
    line-height: 1.8;
    color: #313744;
    white-space: normal;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.7);
}

.ysp-chain-terms-wrap {
    margin-bottom: 20px;
}

.ysp-chain-terms-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.ysp-chain-term-chip {
    display: inline-flex;
    align-items: center;
    padding: 7px 11px;
    border-radius: 999px;
    background: #eef6fb;
    border: 1px solid #cbddea;
    color: #26495d;
    font-size: 0.9rem;
    line-height: 1.3;
    font-weight: 500;
}

.ysp-chain-task-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    padding-top: 14px;
    border-top: 1px solid #dbe7f0;
}

.ysp-chain-writing-btn {
    appearance: none;
    border: none;
    border-radius: 10px;
    background: linear-gradient(135deg, #1c5f73, #2a7a8a);
    color: #ffffff;
    font-size: 0.98rem;
    font-weight: 700;
    padding: 12px 18px;
    cursor: pointer;
    box-shadow: 0 6px 16px rgba(28, 95, 115, 0.22);
    transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
}

.ysp-chain-writing-btn:hover,
.ysp-chain-writing-btn:focus {
    transform: translateY(-1px);
    box-shadow: 0 8px 18px rgba(28, 95, 115, 0.28);
    outline: none;
}

.ysp-chain-writing-btn:active {
    transform: translateY(0);
}

.ysp-chain-token-badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 10px;
    border-radius: 999px;
    background: #fff6e8;
    border: 1px solid #f0d7a6;
    color: #8a5b00;
    font-size: 0.85rem;
    font-weight: 600;
    line-height: 1.3;
}

.ysp-chain-login-note {
    width: 100%;
    font-size: 0.88rem;
    color: #7a4b4b;
    margin-top: 2px;
}

/* Optional: tighten paragraphs inside stimulus if nl2br outputs breaks */
.ysp-chain-opening-stimulus br {
    content: "";
}

/* Mobile */
@media (max-width: 768px) {
    .ysp-chain-task-block {
        padding: 18px 16px;
        border-radius: 12px;
        margin: 20px 0;
    }

    .ysp-chain-task-title {
        font-size: 1.02rem;
    }

    .ysp-chain-task-prompt {
        font-size: 1rem;
        line-height: 1.65;
    }

    .ysp-chain-task-actions {
        align-items: stretch;
    }

    .ysp-chain-writing-btn {
        width: 100%;
        justify-content: center;
        text-align: center;
    }

    .ysp-chain-token-badge {
        width: 100%;
        justify-content: center;
        text-align: center;
    }
}

/* ==========================================
   YSP Practice Section Banner
   ========================================== */

.ysp-practice-section-banner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;

    background: linear-gradient(135deg, #1c5f73 0%, #2a7a8a 100%);
    border: 1px solid #174c59;
    border-radius: 12px;

    padding: 16px 20px;
    margin: 36px 0 26px;

    color: #ffffff;
    font-size: 1.05rem;
    font-weight: 600;
    letter-spacing: 0.3px;

    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
}

.ysp-ps-icon {
    font-size: 1.1rem;
    line-height: 1;
}

.ysp-ps-text {
    display: inline-block;
}


/* ==========================================
   YSP Multi Micro Learning Header
   ========================================== */

.ysp-mml-header {
    background: linear-gradient(135deg, #1c5f73 0%, #2a7a8a 100%);
    border-radius: 14px;
    padding: 26px 28px 22px;
    margin: 20px 0 30px;

    color: #ffffff;

    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.15);
    border: 1px solid #174c59;
}

/* Top label */
.ysp-mml-label {
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;

    opacity: 0.85;
    margin-bottom: 6px;
}

/* Main title */
.ysp-mml-title {
    font-size: 1.0rem;
    line-height: 1.3;
    margin: 0 0 8px 0;
    font-weight: 700;
    opacity: 0.9;
}

/* Meta line */
.ysp-mml-meta {
    font-size: 0.95rem;
    opacity: 0.9;
    font-weight: 500;
}

/* Mobile */
@media (max-width: 768px) {
    .ysp-mml-header {
        padding: 20px 18px;
    }

    .ysp-mml-title {
        font-size: 1.4rem;
    }

    .ysp-mml-meta {
        font-size: 0.9rem;
    }
}





/**
 * YSP Micro Learning — Modal Card Styles
 * Scoped to .ysp-ml-* classes
 * 
 * Rendered inside SweetAlert modal when learner clicks the help button.
 * Also used in admin preview (combined 3-level view).
 */


/* ═══════════════════════════════════════════════════════════
   CARD — the self-contained block per CEFR level
   ═══════════════════════════════════════════════════════════ */

.ysp-ml-card {
    font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    font-size: 14px;
    line-height: 1.6;
    color: #1a1a1a;
    max-width: 560px;
    margin: 0 auto;
}


/* ── Header: skill name + depth badge ──────────────────── */

.ysp-ml-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
    flex-wrap: wrap;
}

.ysp-ml-skill-name {
    font-weight: 700;
    font-size: 16px;
    color: #005f73;
}

.ysp-ml-depth-pill {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.3px;
    text-transform: uppercase;
}

.ysp-ml-depth--essential {
    background: #e0f2f1;
    color: #00695c;
}

.ysp-ml-depth--further {
    background: #e8eaf6;
    color: #283593;
}

.ysp-ml-depth--nuance {
    background: #fce4ec;
    color: #880e4f;
}


/* ── Mission ───────────────────────────────────────────── */

.ysp-ml-mission {
    background: #f0f9fa;
    border-left: 3px solid #005f73;
    padding: 10px 14px;
    margin-bottom: 16px;
    border-radius: 0 6px 6px 0;
    font-size: 14px;
    font-weight: 500;
    color: #1a3a3a;
}

.ysp-ml-mission-icon {
    margin-right: 4px;
}


/* ═══════════════════════════════════════════════════════════
   TOOLKIT — numbered discourse move groups
   ═══════════════════════════════════════════════════════════ */

.ysp-ml-toolkit {
    margin-bottom: 16px;
}

.ysp-ml-toolkit-group {
    margin-bottom: 14px;
    padding-bottom: 12px;
    border-bottom: 1px solid #eef2f5;
}

.ysp-ml-toolkit-group:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}


/* ── Step number + label ───────────────────────────────── */

.ysp-ml-toolkit-label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.ysp-ml-step-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #005f73;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    flex-shrink: 0;
}

.ysp-ml-step-text {
    font-weight: 600;
    font-size: 13px;
    color: #333;
}


/* ── Starters — the sentence-opening phrases ───────────── */

.ysp-ml-starters {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding-left: 30px;
}

.ysp-ml-starter {
    display: inline-block;
    background: #fff;
    border: 1px solid #c8dce4;
    border-radius: 6px;
    padding: 4px 10px;
    font-size: 13px;
    color: #005f73;
    font-weight: 500;
    line-height: 1.4;
}


/* ── L1 note (interference warning) ────────────────────── */

.ysp-ml-l1-note {
    padding-left: 30px;
    margin-top: 6px;
    font-size: 12px;
    color: #777;
    font-style: italic;
}

.ysp-ml-l1-flag {
    font-style: normal;
    margin-right: 2px;
}


/* ═══════════════════════════════════════════════════════════
   WATCH FOR — pitfall warning
   ═══════════════════════════════════════════════════════════ */

.ysp-ml-watch-for {
    background: #fff8f0;
    border-left: 3px solid #e6930a;
    border-radius: 0 6px 6px 0;
    padding: 8px 12px;
    margin-bottom: 16px;
    font-size: 13px;
    color: #7a5200;
}

.ysp-ml-watch-icon {
    margin-right: 4px;
}


/* ═══════════════════════════════════════════════════════════
   MODEL PARAGRAPH — "See it in action"
   ═══════════════════════════════════════════════════════════ */

.ysp-ml-model {
    background: #f8fbff;
    border: 1px solid #d0e0ef;
    border-radius: 8px;
    padding: 14px 16px;
    margin-bottom: 12px;
}

.ysp-ml-model-header {
    font-weight: 600;
    font-size: 13px;
    color: #1a3a5c;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.ysp-ml-model-icon {
    font-size: 15px;
}

.ysp-ml-model-topic {
    font-weight: 400;
    font-size: 12px;
    color: #888;
}

.ysp-ml-model-text {
    font-size: 13.5px;
    line-height: 1.65;
    color: #333;
}

/* Highlighted starters within the model (from **bold** conversion) */
.ysp-ml-starter-highlight {
    color: #005f73;
    font-weight: 600;
    background: #e6f5f7;
    padding: 1px 3px;
    border-radius: 3px;
}


/* ═══════════════════════════════════════════════════════════
   HELP BUTTON — inserted into TP writing task blocks
   ═══════════════════════════════════════════════════════════ */

.ysp-ml-help-row {
    margin-bottom: 12px;
}

.ysp-ml-help-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: none;
    border: 1.5px solid #005f73;
    border-radius: 6px;
    padding: 6px 14px;
    font-size: 13px;
    font-weight: 500;
    color: #005f73;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

.ysp-ml-help-btn:hover {
    background: #005f73;
    color: #fff;
}


/* ═══════════════════════════════════════════════════════════
   MODAL NAV — "See Next Tip" / "Back" buttons (inside modal)
   ═══════════════════════════════════════════════════════════ */

.ysp-ml-modal-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid #e8e8e8;
}

.ysp-ml-nav-btn {
    background: none;
    border: 1px solid #c0c0c0;
    border-radius: 5px;
    padding: 5px 12px;
    font-size: 12px;
    color: #555;
    cursor: pointer;
    transition: border-color 0.2s, color 0.2s;
}

.ysp-ml-nav-btn:hover {
    border-color: #005f73;
    color: #005f73;
}

.ysp-ml-nav-btn--next {
    margin-left: auto;
    border-color: #005f73;
    color: #005f73;
    font-weight: 600;
}

.ysp-ml-nav-btn--next:hover {
    background: #005f73;
    color: #fff;
}

.ysp-ml-depth-indicator {
    font-size: 11px;
    color: #999;
    text-align: center;
    flex: 1;
}


/* ═══════════════════════════════════════════════════════════
   ADMIN PREVIEW — combined 3-level view in scenario preview
   ═══════════════════════════════════════════════════════════ */

.ysp-ml-admin-preview {
    max-width: 800px;
}

.ysp-ml-admin-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.ysp-ml-admin-header h2 {
    margin: 0;
    font-size: 18px;
    color: #005f73;
}

.ysp-ml-tt-badge {
    display: inline-block;
    background: #005f73;
    color: #fff;
    border-radius: 4px;
    padding: 2px 8px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.ysp-ml-depth-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
}

.ysp-ml-admin-level {
    margin-bottom: 24px;
    padding: 16px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background: #fafafa;
}

.ysp-ml-admin-level-label {
    font-size: 14px;
    font-weight: 700;
    color: #666;
    margin: 0 0 12px 0;
    padding-bottom: 8px;
    border-bottom: 1px solid #e8e8e8;
    text-transform: uppercase;
    letter-spacing: 1px;
}


/* ═══════════════════════════════════════════════════════════
   MOBILE
   ═══════════════════════════════════════════════════════════ */

@media (max-width: 600px) {

    .ysp-ml-card {
        font-size: 13px;
    }

    .ysp-ml-starters {
        padding-left: 0;
    }

    .ysp-ml-starter {
        font-size: 12.5px;
    }

    .ysp-ml-model-text {
        font-size: 13px;
    }

    .ysp-ml-modal-nav {
        flex-wrap: wrap;
        gap: 8px;
    }

    .ysp-ml-depth-indicator {
        order: -1;
        width: 100%;
    }
}


