/* ============================================================
   FRENCH REVISION — Year 8 CE  |  Vibrant Tiles Design v2
   Font: Dosis (Google Fonts)
   ============================================================ */

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

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

/* ─── DESIGN TOKENS ─── */
:root {
  --bg:         #f4f2ef;
  --white:      #ffffff;
  --text:       #18181b;
  --text-mid:   #3f3f46;
  --text-muted: #71717a;
  --border:     #e4e4e7;

  /* Topic palette — 10 topics */
  --t1-bg: #fef3c7; --t1-accent: #d97706; --t1-dark: #92400e;
  --t2-bg: #dbeafe; --t2-accent: #2563eb; --t2-dark: #1e3a8a;
  --t3-bg: #dcfce7; --t3-accent: #16a34a; --t3-dark: #14532d;
  --t4-bg: #fce7f3; --t4-accent: #db2777; --t4-dark: #831843;
  --t5-bg: #ede9fe; --t5-accent: #7c3aed; --t5-dark: #4c1d95;
  --t6-bg: #ffedd5; --t6-accent: #ea580c; --t6-dark: #7c2d12;
  --t7-bg: #cffafe; --t7-accent: #0891b2; --t7-dark: #164e63;
  --t8-bg: #fef9c3; --t8-accent: #ca8a04; --t8-dark: #713f12;
  --t9-bg: #f0fdf4; --t9-accent: #15803d; --t9-dark: #052e16;
  --t10-bg:#fdf2f8; --t10-accent:#a21caf; --t10-dark:#581c87;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Dosis', sans-serif;
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
  line-height: 1.65;
}

/* ─── HEADER ─── */
header {
  background: var(--white);
  border-bottom: 3px solid var(--text);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
}

.brand-icon {
  width: 36px;
  height: 36px;
  background: var(--text);
  color: var(--white);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 900;
  letter-spacing: -0.05em;
  flex-shrink: 0;
}

.brand-name { font-size: 16px; font-weight: 800; line-height: 1.2; }
.brand-sub  { font-size: 11px; color: var(--text-muted); font-weight: 600; letter-spacing: 0.04em; }

.header-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.hn-link {
  padding: 6px 14px;
  border-radius: 99px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-mid);
  text-decoration: none;
  transition: all 0.15s;
}
.hn-link:hover { background: var(--bg); color: var(--text); }
.hn-link.active {
  background: var(--text);
  color: var(--white);
}

/* ─── HERO / PAGE BANNER ─── */
.hero {
  background: var(--white);
  border-bottom: 2px solid var(--border);
}

.hero-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 52px 28px 48px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 40px;
  align-items: center;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #fef3c7;
  color: #92400e;
  border: 1.5px solid #fde68a;
  border-radius: 99px;
  padding: 4px 14px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 16px;
}
.kicker-dot { width: 6px; height: 6px; background: #d97706; border-radius: 50%; }

/* Topic / grammar page kicker colours */
.kicker-blue   { background: #dbeafe; color: #1e3a8a; border-color: #93c5fd; }
.kicker-blue   .kicker-dot { background: #2563eb; }
.kicker-purple { background: #ede9fe; color: #4c1d95; border-color: #c4b5fd; }
.kicker-purple .kicker-dot { background: #7c3aed; }
.kicker-green  { background: #dcfce7; color: #14532d; border-color: #86efac; }
.kicker-green  .kicker-dot { background: #16a34a; }
.kicker-pink   { background: #fce7f3; color: #831843; border-color: #f9a8d4; }
.kicker-pink   .kicker-dot { background: #db2777; }
.kicker-orange { background: #ffedd5; color: #7c2d12; border-color: #fdba74; }
.kicker-orange .kicker-dot { background: #ea580c; }
.kicker-cyan   { background: #cffafe; color: #164e63; border-color: #67e8f9; }
.kicker-cyan   .kicker-dot { background: #0891b2; }

.hero-title {
  font-size: clamp(26px, 4vw, 46px);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}

.hero-desc {
  font-size: 16px;
  color: var(--text-mid);
  max-width: 500px;
  line-height: 1.65;
  margin-bottom: 24px;
}

.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* Level pills */
.hero-levels {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 220px;
}

.level-pill {
  border-radius: 12px;
  padding: 14px 16px;
  border: 2px solid transparent;
}
.lp-l1   { background: #dbeafe; border-color: #93c5fd; }
.lp-l2   { background: #ede9fe; border-color: #c4b5fd; }
.lp-both { background: #fef3c7; border-color: #fde68a; }

.lp-tag  { font-size: 10px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 3px; }
.lp-l1   .lp-tag { color: #1d4ed8; }
.lp-l2   .lp-tag { color: #6d28d9; }
.lp-both .lp-tag { color: #b45309; }
.lp-name { font-size: 14px; font-weight: 700; }
.lp-desc { font-size: 12px; color: var(--text-mid); margin-top: 2px; }

/* Page banner (used on inner pages instead of full hero) */
.page-banner {
  background: var(--white);
  border-bottom: 2px solid var(--border);
}
.page-banner-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 28px 36px;
}

/* ─── BUTTONS ─── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 22px;
  border-radius: 10px;
  font-family: 'Dosis', sans-serif;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.15s;
  cursor: pointer;
  border: 2px solid transparent;
}
.btn-primary { background: var(--text); color: var(--white); border-color: var(--text); }
.btn-primary:hover { background: #3f3f46; border-color: #3f3f46; }
.btn-outline { background: transparent; color: var(--text); border-color: var(--border); }
.btn-outline:hover { border-color: var(--text); }
.btn-ghost   { background: transparent; color: var(--text-mid); border-color: transparent; }
.btn-ghost:hover { background: var(--bg); color: var(--text); }

/* Legacy button class — keeps existing links working */
.button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 10px;
  font-family: 'Dosis', sans-serif;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.15s;
  cursor: pointer;
  background: var(--text);
  color: var(--white);
  border: 2px solid var(--text);
  margin: 6px 6px 6px 0;
}
.button:hover { background: #3f3f46; border-color: #3f3f46; }
.button.resource-link {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}
.button.resource-link:hover { border-color: var(--text); background: var(--bg); }

/* ─── MAIN LAYOUT ─── */
.page-wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 48px 28px 80px;
}

/* ─── SECTION HEADER ─── */
.sh {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}
.sh-left { display: flex; align-items: baseline; gap: 10px; }
.sh-title { font-size: 22px; font-weight: 800; letter-spacing: -0.01em; }
.sh-count { font-size: 13px; font-weight: 700; color: var(--text-muted); }
.sh-all {
  font-size: 13px; font-weight: 700; color: var(--text-mid);
  text-decoration: none; display: flex; align-items: center; gap: 4px;
}
.sh-all:hover { color: var(--text); }

/* ─── TOPIC TILES ─── */
.topic-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 14px;
  margin-bottom: 52px;
}

.topic-tile {
  border-radius: 16px;
  padding: 22px 20px 20px;
  text-decoration: none;
  color: var(--text);
  display: flex;
  flex-direction: column;
  gap: 10px;
  border: 2px solid transparent;
  transition: all 0.2s cubic-bezier(0.4,0,0.2,1);
  position: relative;
  overflow: hidden;
  min-height: 155px;
}
.topic-tile:hover {
  transform: translateY(-4px) scale(1.01);
  box-shadow: 0 16px 40px rgba(0,0,0,0.10);
}

.tt-1  { background: var(--t1-bg);  border-color: var(--t1-accent); }
.tt-2  { background: var(--t2-bg);  border-color: var(--t2-accent); }
.tt-3  { background: var(--t3-bg);  border-color: var(--t3-accent); }
.tt-4  { background: var(--t4-bg);  border-color: var(--t4-accent); }
.tt-5  { background: var(--t5-bg);  border-color: var(--t5-accent); }
.tt-6  { background: var(--t6-bg);  border-color: var(--t6-accent); }
.tt-7  { background: var(--t7-bg);  border-color: var(--t7-accent); }
.tt-8  { background: var(--t8-bg);  border-color: var(--t8-accent); }
.tt-9  { background: var(--t9-bg);  border-color: var(--t9-accent); }
.tt-10 { background: var(--t10-bg); border-color: var(--t10-accent); }

.tt-num   { font-size: 10px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; opacity: 0.6; }
.tt-emoji { font-size: 36px; line-height: 1; }
.tt-title { font-size: 15px; font-weight: 800; line-height: 1.3; flex: 1; }
.tt-desc  { font-size: 12px; opacity: 0.65; line-height: 1.4; }

.tt-chip {
  display: inline-flex;
  align-items: center;
  border-radius: 99px;
  padding: 3px 10px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  align-self: flex-start;
  color: white;
}
.tt-1  .tt-chip { background: var(--t1-accent);  }
.tt-2  .tt-chip { background: var(--t2-accent);  }
.tt-3  .tt-chip { background: var(--t3-accent);  }
.tt-4  .tt-chip { background: var(--t4-accent);  }
.tt-5  .tt-chip { background: var(--t5-accent);  }
.tt-6  .tt-chip { background: var(--t6-accent);  }
.tt-7  .tt-chip { background: var(--t7-accent);  }
.tt-8  .tt-chip { background: var(--t8-accent);  }
.tt-9  .tt-chip { background: var(--t9-accent);  }
.tt-10 .tt-chip { background: var(--t10-accent); }

/* ─── GRAMMAR CARD GRID (homepage + grammar hub) ─── */
.grammar-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.grammar-card {
  background: var(--bg);
  border: 2px solid var(--border);
  border-radius: 12px;
  padding: 14px 14px 12px;
  text-decoration: none;
  color: inherit;
  transition: all 0.18s;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.grammar-card:hover {
  border-color: var(--text);
  background: var(--white);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.07);
}
.gc-icon  { font-size: 20px; margin-bottom: 4px; }
.gc-title { font-size: 13px; font-weight: 800; }
.gc-sub   { font-size: 11px; color: var(--text-muted); }

/* ─── TWO-COL SECTION (homepage grammar + quick-access) ─── */
.two-col {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 24px;
  margin-bottom: 52px;
  align-items: start;
}

/* ─── GRAMMAR BOARD (white card wrapping grammar cards) ─── */
.grammar-board {
  background: var(--white);
  border: 2px solid var(--border);
  border-radius: 16px;
  padding: 28px;
}

.gb-section-title {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 12px;
  margin-top: 20px;
}
.gb-section-title:first-child { margin-top: 0; }

/* ─── QUICK ACCESS CARDS ─── */
.quick-col {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.qa-card {
  background: var(--white);
  border: 2px solid var(--border);
  border-radius: 14px;
  padding: 18px 16px;
  text-decoration: none;
  color: inherit;
  display: flex;
  align-items: center;
  gap: 14px;
  transition: all 0.18s;
}
.qa-card:hover {
  border-color: var(--text);
  box-shadow: 0 4px 16px rgba(0,0,0,0.07);
  transform: translateX(2px);
}

.qa-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}
.qa-checklist { background: #dcfce7; }
.qa-papers    { background: #fef3c7; }
.qa-builders  { background: #ede9fe; }

.qa-title { font-size: 15px; font-weight: 800; margin-bottom: 2px; }
.qa-desc  { font-size: 12px; color: var(--text-muted); line-height: 1.4; }

/* ─── SKILLS BAR ─── */
.skills-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 52px;
}

.skill-card {
  background: var(--white);
  border: 2px solid var(--border);
  border-radius: 14px;
  padding: 20px 18px;
  text-align: center;
  transition: all 0.18s;
}
.skill-card:hover { border-color: var(--text); transform: translateY(-2px); }
.sc-icon  { font-size: 28px; margin-bottom: 8px; }
.sc-title { font-size: 14px; font-weight: 800; margin-bottom: 4px; }
.sc-desc  { font-size: 12px; color: var(--text-muted); }

/* ─── TIPS / DARK BAND ─── */
.tips-band {
  background: var(--text);
  color: var(--white);
  border-radius: 16px;
  padding: 28px 32px;
  margin-bottom: 52px;
}
.tips-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
}
.tips-icon {
  width: 36px; height: 36px;
  background: #fef3c7; color: #d97706;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; flex-shrink: 0;
}
.tips-heading { font-size: 17px; font-weight: 800; }

.tips-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
  list-style: none;
}
.tips-list li {
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 13px;
  line-height: 1.5;
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
.tip-emoji { font-size: 16px; flex-shrink: 0; margin-top: 1px; }

/* ─── CONTENT SECTIONS (inner pages) ─── */
.content-wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 48px 28px 80px;
}

/* ─── INFO BANNER ─── */
.info-banner {
  background: var(--white);
  border: 2px solid var(--border);
  border-radius: 14px;
  padding: 20px 22px;
  margin-bottom: 32px;
  display: flex;
  align-items: flex-start;
  gap: 14px;
}
.info-banner-icon {
  font-size: 22px;
  flex-shrink: 0;
  margin-top: 2px;
}
.info-banner-body { flex: 1; }
.info-banner-body p { font-size: 14px; color: var(--text-mid); line-height: 1.6; }
.info-banner-body p + p { margin-top: 6px; }
.info-banner-body strong { color: var(--text); }

/* ─── SENTENCE BUILDER LINKS STRIP ─── */
.sb-strip {
  background: var(--white);
  border: 2px solid var(--border);
  border-radius: 14px;
  padding: 22px 24px;
  margin-bottom: 32px;
}
.sb-strip-title {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 14px;
}
.sb-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.sb-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  background: var(--bg);
  border: 2px solid var(--border);
  color: var(--text);
  transition: all 0.15s;
}
.sb-link:hover { border-color: var(--text); background: var(--white); }

/* ─── VOCAB TABLE ─── */
.vocab-table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0 24px;
  background: var(--white);
  border: 2px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  font-size: 14px;
}
.vocab-table th {
  background: var(--text);
  color: var(--white);
  padding: 12px 16px;
  text-align: left;
  font-weight: 800;
  font-size: 12px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.vocab-table td {
  padding: 11px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
}
.vocab-table tr:last-child td { border-bottom: none; }
.vocab-table tbody tr:hover { background: var(--bg); }

/* ─── CONTENT CARD ─── */
.content-card {
  background: var(--white);
  border: 2px solid var(--border);
  border-radius: 16px;
  padding: 28px;
  margin-bottom: 24px;
}
.content-card h2 {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.01em;
  margin-bottom: 16px;
  color: var(--text);
}
.content-card h3 {
  font-size: 16px;
  font-weight: 800;
  margin: 20px 0 10px;
  color: var(--text);
}
.content-card h3:first-child { margin-top: 0; }
.content-card p  { font-size: 14px; color: var(--text-mid); line-height: 1.65; margin-bottom: 10px; }
.content-card ul,
.content-card ol { padding-left: 20px; margin-bottom: 10px; }
.content-card li { font-size: 14px; color: var(--text-mid); line-height: 1.65; margin-bottom: 4px; }
.content-card strong { color: var(--text); }

/* Section sub-label inside content card */
.card-section-label {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 20px 0 8px;
}
.card-section-label:first-child { margin-top: 0; }

/* ─── GRAMMAR POINT (green-accent box) ─── */
.grammar-point {
  background: var(--white);
  border: 2px solid var(--border);
  border-radius: 12px;
  padding: 20px 22px;
  margin: 14px 0;
}
.grammar-point h3 {
  font-size: 15px;
  font-weight: 800;
  margin: 0 0 10px;
  color: var(--text);
}
.grammar-point p,
.grammar-point li { font-size: 14px; color: var(--text-mid); line-height: 1.65; }
.grammar-point strong { color: var(--text); }
.grammar-point ul,
.grammar-point ol { padding-left: 18px; margin-top: 6px; }
.grammar-point li { margin-bottom: 4px; }

/* ─── EXAMPLE BOX ─── */
.example {
  background: var(--bg);
  border-left: 4px solid var(--text);
  border-radius: 0 10px 10px 0;
  padding: 14px 16px;
  margin: 10px 0;
  font-size: 14px;
  color: var(--text-mid);
  line-height: 1.65;
}
.example strong { color: var(--text); }
.example em { opacity: 0.8; }

/* ─── SECTION BOX (tip/info/spaced practice) ─── */
.section-box {
  background: var(--white);
  border: 2px solid var(--border);
  border-radius: 14px;
  padding: 22px 24px;
  margin: 20px 0;
}
.section-box h3 {
  font-size: 16px;
  font-weight: 800;
  color: var(--text);
  margin: 0 0 10px;
}
.section-box p { font-size: 14px; color: var(--text-mid); line-height: 1.65; margin-bottom: 8px; }
.section-box ul,
.section-box ol { padding-left: 18px; margin-bottom: 8px; }
.section-box li { font-size: 14px; color: var(--text-mid); line-height: 1.65; margin-bottom: 4px; }
.section-box strong { color: var(--text); }

/* ─── LEVEL BADGES ─── */
.level-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 99px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  margin-left: 6px;
  vertical-align: middle;
}
.level-1    { background: #dbeafe; color: #1d4ed8; border: 1.5px solid #93c5fd; }
.level-2    { background: #ede9fe; color: #6d28d9; border: 1.5px solid #c4b5fd; }
.level-both { background: #fef3c7; color: #b45309; border: 1.5px solid #fde68a; }

/* ─── PAGE BREADCRUMB ─── */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 14px;
}
.breadcrumb a { color: var(--text-muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--text); }
.breadcrumb-sep { opacity: 0.4; }

/* ─── CHECKLIST ITEMS ─── */
.checklist {
  list-style: none;
  margin: 16px 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.checklist li {
  background: var(--white);
  border: 2px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px 12px 46px;
  position: relative;
  font-size: 14px;
  color: var(--text-mid);
  line-height: 1.5;
  transition: border-color 0.15s, background 0.15s;
  cursor: pointer;
}
.checklist li:hover { border-color: var(--text-mid); }
.checklist li::before {
  content: '';
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  border: 2px solid var(--border);
  border-radius: 6px;
  background: var(--white);
  transition: all 0.15s;
}
.checklist li.checked { background: #f0fdf4; border-color: #86efac; }
.checklist li.checked::before {
  background: #16a34a;
  border-color: #16a34a;
  content: '✓';
  color: white;
  font-size: 13px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Checklist section heading card */
.checklist-section {
  background: var(--white);
  border: 2px solid var(--border);
  border-radius: 14px;
  padding: 22px 24px;
  margin-bottom: 20px;
}
.checklist-section h3 {
  font-size: 16px;
  font-weight: 800;
  color: var(--text);
  margin: 0 0 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.checklist-section h2 {
  font-size: 20px;
  font-weight: 800;
  color: var(--text);
  margin: 0 0 16px;
}

/* Progress summary bar */
.checklist-progress {
  background: var(--white);
  border: 2px solid var(--border);
  border-radius: 14px;
  padding: 20px 22px;
  margin-bottom: 32px;
  display: flex;
  align-items: center;
  gap: 16px;
}
.cp-label { font-size: 13px; font-weight: 700; color: var(--text-mid); flex-shrink: 0; }
.cp-bar-wrap { flex: 1; background: var(--bg); border-radius: 99px; height: 10px; overflow: hidden; }
.cp-bar { height: 100%; background: #16a34a; border-radius: 99px; transition: width 0.4s ease; }
.cp-count { font-size: 13px; font-weight: 800; color: var(--text); flex-shrink: 0; }

/* ─── PAST PAPERS ─── */
.papers-section {
  background: var(--white);
  border: 2px solid var(--border);
  border-radius: 16px;
  padding: 24px;
  margin-bottom: 24px;
}
.papers-section h3 {
  font-size: 16px;
  font-weight: 800;
  color: var(--text);
  margin: 0 0 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--border);
  display: flex;
  align-items: center;
  gap: 8px;
}
.paper-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
}
.paper-link {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 16px;
  border: 2px solid var(--border);
  border-radius: 12px;
  text-decoration: none;
  color: var(--text);
  background: var(--bg);
  transition: all 0.18s;
}
.paper-link:hover {
  border-color: var(--text);
  background: var(--white);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.07);
}
.paper-link.audio-link { background: #dbeafe; border-color: #93c5fd; }
.paper-link.audio-link:hover { background: #bfdbfe; border-color: #2563eb; }
.paper-title { font-size: 14px; font-weight: 800; }
.paper-type  { font-size: 12px; color: var(--text-muted); }

.level-section-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 36px 0 18px;
}
.level-section-header h2 {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.01em;
}

/* ─── PRACTICE GENERATOR ─── */
.practice-generator {
  background: var(--white);
  border: 2px solid var(--border);
  border-radius: 16px;
  padding: 28px;
  margin: 32px 0;
}
.practice-generator h3 {
  font-size: 18px;
  font-weight: 800;
  color: var(--text);
  margin: 0 0 6px;
}
.practice-generator > p {
  font-size: 14px;
  color: var(--text-mid);
  margin-bottom: 20px;
}

.builder-select,
.timer-settings { margin: 16px 0; }

.builder-select label,
.timer-settings label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-mid);
  margin-bottom: 8px;
}

.builder-select select,
.timer-settings select {
  padding: 10px 12px;
  background: var(--white);
  color: var(--text);
  border: 2px solid var(--border);
  border-radius: 10px;
  font-family: 'Dosis', sans-serif;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  width: 100%;
  max-width: 360px;
  transition: border-color 0.15s;
}
.builder-select select:hover,
.timer-settings select:hover { border-color: var(--text); }

.difficulty-select {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 16px 0;
}

.difficulty-btn {
  padding: 10px 20px;
  background: var(--bg);
  color: var(--text);
  border: 2px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  font-family: 'Dosis', sans-serif;
  font-size: 13px;
  font-weight: 700;
  transition: all 0.15s;
}
.difficulty-btn:hover   { border-color: var(--text); background: var(--white); }
.difficulty-btn.active  { background: var(--text); color: var(--white); border-color: var(--text); }

.sentence-display { margin-top: 24px; }
.sentence-display.hidden { display: none; }

.english-sentence {
  font-size: 1.6em;
  font-weight: 700;
  color: var(--text);
  text-align: center;
  padding: 28px;
  background: var(--bg);
  border: 2px solid var(--border);
  border-radius: 12px;
  margin-bottom: 20px;
  line-height: 1.5;
}

.countdown-container { margin: 24px 0; }

.countdown-number {
  font-size: 3em;
  font-weight: 800;
  color: var(--text);
  text-align: center;
  margin-bottom: 16px;
}

.progress-bar-container {
  width: 100%;
  height: 12px;
  background: var(--bg);
  border-radius: 99px;
  overflow: hidden;
  border: 2px solid var(--border);
}
.progress-bar {
  height: 100%;
  width: 100%;
  background: var(--text);
  transition: width 0.3s linear, background 0.3s ease;
  border-radius: 99px;
}
.progress-bar.warning { background: #ea580c; }
.progress-bar.danger  { background: #dc2626; }

.french-answer {
  font-size: 1.4em;
  color: var(--white);
  text-align: center;
  padding: 22px;
  background: var(--text);
  border-radius: 12px;
  margin-top: 16px;
  line-height: 1.5;
}
.french-answer strong {
  display: block;
  font-size: 0.7em;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  opacity: 0.6;
  margin-bottom: 8px;
}

.hidden { display: none; }

#nextBtn {
  margin-top: 16px;
  display: block;
  margin-left: auto;
  margin-right: auto;
  max-width: 260px;
  width: 100%;
}

/* ─── GRAMMAR HUB CARD GRID ─── */
.grammar-hub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
  margin-bottom: 32px;
}

.grammar-hub-card {
  background: var(--white);
  border: 2px solid var(--border);
  border-radius: 14px;
  padding: 22px 20px;
  text-decoration: none;
  color: var(--text);
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: all 0.2s cubic-bezier(0.4,0,0.2,1);
}
.grammar-hub-card:hover {
  border-color: var(--text);
  transform: translateY(-3px);
  box-shadow: 0 12px 30px rgba(0,0,0,0.08);
}
.ghc-icon  { font-size: 32px; line-height: 1; }
.ghc-title { font-size: 16px; font-weight: 800; }
.ghc-sub   { font-size: 13px; color: var(--text-muted); line-height: 1.4; }

/* ─── FOOTER ─── */
footer {
  background: var(--white);
  border-top: 2px solid var(--border);
  padding: 20px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  color: var(--text-muted);
}
.footer-brand { font-weight: 800; color: var(--text); }
footer a { color: var(--text-mid); text-decoration: none; font-weight: 600; }
footer a:hover { color: var(--text); }

/* school-name / report-problem — legacy selectors pointing to footer */
footer .school-name { font-weight: 800; color: var(--text); }
footer .report-problem { font-size: 13px; color: var(--text-muted); }
footer .report-problem a { color: var(--text-mid); text-decoration: none; font-weight: 600; }
footer .report-problem a:hover { color: var(--text); }

/* ─── RESPONSIVE ─── */
@media (max-width: 960px) {
  .two-col      { grid-template-columns: 1fr; }
  .hero-inner   { grid-template-columns: 1fr; }
  .hero-levels  { flex-direction: row; flex-wrap: wrap; }
  .level-pill   { flex: 1; min-width: 150px; }
  .skills-bar   { grid-template-columns: repeat(2, 1fr); }
}

/* ─── HAMBURGER BUTTON ─── */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  flex-shrink: 0;
}
.nav-toggle span {
  display: block;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all 0.2s;
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 600px) {
  .nav-toggle  { display: flex; }
  .header-inner  { padding: 0 16px; }
  .header-nav {
    display: none;
    position: absolute;
    top: 63px;
    left: 0;
    right: 0;
    background: var(--white);
    border-bottom: 3px solid var(--text);
    flex-direction: column;
    align-items: stretch;
    padding: 8px 16px 16px;
    gap: 2px;
    z-index: 99;
    box-shadow: 0 8px 24px rgba(0,0,0,0.1);
  }
  .header-nav.open { display: flex; }
  .hn-link { border-radius: 8px; padding: 12px 16px; font-size: 15px; }
  .hero-inner    { padding: 32px 16px; }
  .page-wrap,
  .content-wrap  { padding: 32px 16px 60px; }
  .page-banner-inner { padding: 28px 16px; }
  .skills-bar    { grid-template-columns: repeat(2, 1fr); }
  .tips-list     { grid-template-columns: 1fr; }
  .grammar-hub-grid  { grid-template-columns: repeat(2, 1fr); }
  .grammar-card-grid { grid-template-columns: repeat(2, 1fr); }
  footer { flex-direction: column; gap: 6px; text-align: center; }
  .english-sentence  { font-size: 1.3em; padding: 20px; }
  .countdown-number  { font-size: 2.2em; }
  .french-answer     { font-size: 1.2em; }
  .difficulty-btn    { flex: 1 1 calc(50% - 8px); }
  .paper-grid        { grid-template-columns: 1fr; }
}

@media print {
  body   { background: white; color: black; font-family: serif; }
  header, footer, .practice-generator { display: none; }
  .content-wrap, .page-wrap { padding: 0; }
  .vocab-table th { background: #333; }
  .vocab-table td { color: black; }
  .checklist li   { border: 1px solid #ccc; }
}

/* Disable decorative motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
  .topic-tile,
  .grammar-hub-card,
  .skill-card,
  .sp-topic-card,
  .rag-btn,
  .btn,
  .cp-bar {
    transition: none !important;
    transform: none !important;
    animation: none !important;
  }
}

/* ─── VOCAB QUIZ ─── */
.vq-table-wrap { position: relative; }

.vocab-table.quiz-active {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}

.vq-table-overlay {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: var(--white);
  border: 2px dashed var(--border);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}
.vq-overlay-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}

.vq-btn {
  display: block;
  width: 100%;
  margin-top: 8px;
  padding: 10px 16px;
  background: transparent;
  border: 2px dashed var(--border);
  border-radius: 8px;
  font-family: 'Dosis', sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-mid);
  cursor: pointer;
  text-align: center;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}
.vq-btn:hover {
  border-color: var(--text);
  color: var(--text);
  background: var(--white);
}

.vq-panel {
  background: var(--white);
  border: 2px solid var(--text);
  border-radius: 12px;
  overflow: hidden;
  margin: 8px 0 20px;
}

.vq-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  border-bottom: 2px solid var(--border);
  background: var(--bg);
}
.vq-title   { font-size: 14px; font-weight: 700; color: var(--text); }
.vq-counter { font-size: 12px; font-weight: 600; color: var(--text-muted); }

.vq-card { padding: 20px; }

.vq-lang {
  display: block;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 8px;
}
.vq-word {
  font-size: 1.5em;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 16px;
  line-height: 1.3;
}
.vq-mono { font-family: 'Courier New', monospace; letter-spacing: 0.03em; }
.vq-hint { font-size: 13px; color: var(--text-muted); font-style: italic; margin-bottom: 14px; }

.vq-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 4px;
}
.vq-option {
  padding: 12px 14px;
  background: var(--white);
  border: 2px solid var(--border);
  border-radius: 8px;
  font-family: 'Dosis', sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  text-align: center;
  line-height: 1.3;
  transition: border-color 0.12s, background 0.12s;
}
.vq-option:hover:not(:disabled) { border-color: var(--text); background: var(--bg); }
.vq-option.correct { background: #dcfce7; border-color: #16a34a; color: #14532d; }
.vq-option.wrong   { background: #fee2e2; border-color: #dc2626; color: #7f1d1d; }
.vq-option:disabled { cursor: default; }

.vq-input-wrap { margin-bottom: 10px; }
.vq-input {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid var(--border);
  border-radius: 8px;
  font-family: 'Dosis', sans-serif;
  font-size: 16px;
  font-weight: 500;
  color: var(--text);
  background: var(--white);
  outline: none;
  transition: border-color 0.15s;
}
.vq-input:focus   { border-color: var(--text); }
.vq-input:disabled { background: var(--bg); }

.vq-accents { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.vq-accent-btn {
  padding: 4px 9px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 5px;
  font-family: 'Dosis', sans-serif;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.1s, border-color 0.1s;
}
.vq-accent-btn:hover { background: var(--white); border-color: var(--text); }

.vq-check-btn {
  width: 100%;
  padding: 11px 16px;
  background: var(--text);
  border: 2px solid var(--text);
  border-radius: 8px;
  font-family: 'Dosis', sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: var(--white);
  cursor: pointer;
  margin-top: 4px;
  transition: background 0.15s;
}
.vq-check-btn:hover:not(:disabled) { background: #3f3f46; }
.vq-check-btn:disabled { opacity: 0.5; cursor: default; }

.vq-feedback {
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  margin-top: 14px;
  line-height: 1.4;
}
.vq-fb-exact { background: #dcfce7; color: #14532d; border: 1px solid #86efac; }
.vq-fb-near  { background: #fef3c7; color: #78350f; border: 1px solid #fcd34d; }
.vq-fb-wrong { background: #fee2e2; color: #7f1d1d; border: 1px solid #fca5a5; }

.vq-confidence {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
}
.vq-conf-btn {
  flex: 1 1 auto;
  padding: 9px 10px;
  border: 2px solid var(--border);
  border-radius: 8px;
  background: var(--white);
  font-family: 'Dosis', sans-serif;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  transition: border-color 0.12s, background 0.12s;
}
.vq-conf-btn:hover:not(:disabled) { border-color: var(--text); }
.vq-conf-got.selected   { background: #dcfce7; border-color: #16a34a; color: #14532d; }
.vq-conf-mid.selected   { background: #fef3c7; border-color: #d97706; color: #78350f; }
.vq-conf-needs.selected { background: #fee2e2; border-color: #dc2626; color: #7f1d1d; }
.vq-conf-btn:disabled { cursor: default; }

.vq-results  { text-align: center; padding: 8px 0; }
.vq-score    { font-size: 2.8em; font-weight: 800; color: var(--text); line-height: 1.1; }
.vq-score-sub { font-size: 15px; color: var(--text-muted); margin: 4px 0 16px; }
.vq-breakdown {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 13px;
  font-weight: 600;
  margin: 12px 0;
}
.vq-review-title {
  font-size: 14px;
  font-weight: 700;
  margin: 16px 0 8px;
  text-align: left;
}
.vq-review-list { list-style: none; padding: 0; margin-bottom: 16px; text-align: left; }
.vq-review-list li {
  padding: 7px 12px;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}
.vq-review-list li:last-child { border-bottom: none; }

.vq-finish-btn {
  display: block;
  width: 100%;
  padding: 12px 16px;
  background: var(--text);
  border: 2px solid var(--text);
  border-radius: 8px;
  font-family: 'Dosis', sans-serif;
  font-size: 15px;
  font-weight: 700;
  color: var(--white);
  cursor: pointer;
  margin-top: 16px;
  transition: background 0.15s;
}
.vq-finish-btn:hover { background: #3f3f46; }

@media (max-width: 480px) {
  .vq-options    { grid-template-columns: 1fr; }
  .vq-confidence { flex-direction: column; }
  .vq-conf-btn   { flex: none; }
  .vq-score      { font-size: 2.2em; }
}
@media print {
  .vq-panel, .vq-btn { display: none; }
}
