:root {
  --bg: #FBF8F1;
  --bg-elev: #FFFFFF;
  --ink: #1A1E2E;
  --ink-soft: #4B5263;
  --muted: #8A8F9C;
  --line: #E7E1D2;
  --line-strong: #D2C7AE;
  --navy: #0E2A5C;
  --navy-soft: #E7ECF5;
  --rouge: #B2182B;
  --rouge-soft: #FBE9EC;
  --or: #B8860B;
  --or-soft: #FBF1D8;
  --vert: #15803D;
  --vert-soft: #E6F4EA;
  --shadow: 0 1px 2px rgba(15,30,60,.05), 0 8px 24px rgba(15,30,60,.06);
  --radius: 14px;
  --radius-sm: 8px;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 78px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.15;
  margin: 0 0 .4em;
  color: var(--ink);
}
h1 { font-size: clamp(2rem, 5vw, 3.4rem); font-weight: 900; }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.2rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; }
a { color: var(--navy); text-decoration: none; }
a:hover { text-decoration: underline; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .9em; background: var(--bg); padding: 1px 6px; border-radius: 4px; border: 1px solid var(--line); }

.header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(251,248,241,0.85);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  max-width: 1200px; margin: 0 auto;
  padding: 14px 24px;
  display: flex; align-items: center; gap: 24px;
}
.brand {
  font-family: 'Playfair Display', serif;
  font-weight: 900; font-size: 1.15rem;
  display: flex; align-items: center; gap: 10px;
}
.brand .flag {
  display: inline-flex; height: 18px; width: 28px;
  border-radius: 3px; overflow: hidden;
  box-shadow: 0 0 0 1px rgba(0,0,0,.06);
}
.brand .flag span { flex: 1; }
.brand .flag .b { background: #002395; }
.brand .flag .w { background: #fff; }
.brand .flag .r { background: #ED2939; }
.nav-links {
  margin-left: auto;
  display: flex; gap: 4px; flex-wrap: wrap;
}
.nav-links a {
  font-size: .87rem; font-weight: 500;
  padding: 7px 11px; border-radius: 999px;
  color: var(--ink-soft); transition: all .15s;
}
.nav-links a:hover {
  background: var(--navy-soft); color: var(--navy);
  text-decoration: none;
}
.quiz-pill {
  font-size: .85rem; font-weight: 600;
  padding: 8px 14px; border-radius: 999px;
  background: var(--ink); color: var(--bg);
  border: none; cursor: pointer;
  transition: all .15s;
}
.quiz-pill:hover { background: var(--navy); }
.quiz-pill.active { background: var(--rouge); color: #fff; }
.mobile-menu-toggle { display: none; }

@media (max-width: 900px) {
  .nav-links { display: none; flex-basis: 100%; flex-direction: column; padding-top: 12px; gap: 2px; }
  .nav-links.open { display: flex; }
  .header-inner { flex-wrap: wrap; }
  .mobile-menu-toggle {
    display: inline-flex; margin-left: auto;
    padding: 7px 11px; border-radius: 8px;
    border: 1px solid var(--line-strong);
    background: transparent; cursor: pointer;
    font-size: .9rem;
  }
  .quiz-pill { order: 3; }
}

.hero {
  max-width: 1200px; margin: 0 auto;
  padding: 56px 24px 32px;
  text-align: center;
}
.hero .eyebrow {
  display: inline-block;
  font-size: .82rem; font-weight: 600;
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--rouge);
  padding: 6px 14px;
  border: 1px solid var(--rouge);
  border-radius: 999px;
  margin-bottom: 18px;
}
.hero h1 { margin-bottom: .25em; }
.hero .lede {
  max-width: 640px; margin: 0 auto 28px;
  color: var(--ink-soft); font-size: 1.1rem;
}
.hero-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 12px; max-width: 700px; margin: 0 auto;
}
.stat {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
}
.stat .num {
  font-family: 'Playfair Display', serif;
  font-weight: 800; font-size: 1.8rem;
  color: var(--navy);
}
.stat .label {
  font-size: .78rem; color: var(--muted);
  text-transform: uppercase; letter-spacing: .08em;
  font-weight: 600;
}

.toc {
  max-width: 1200px; margin: 32px auto 0;
  padding: 0 24px 24px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}
.toc-card {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  transition: all .18s;
  display: flex; flex-direction: column; gap: 6px;
}
.toc-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
  border-color: var(--line-strong);
  text-decoration: none;
}
.toc-card .ic {
  width: 36px; height: 36px; border-radius: 10px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--navy-soft); color: var(--navy);
  font-family: 'Playfair Display', serif; font-weight: 800;
  margin-bottom: 6px; font-size: .9rem;
  text-align: center; line-height: 1;
}
.toc-card.r .ic { background: var(--rouge-soft); color: var(--rouge); }
.toc-card.o .ic { background: var(--or-soft); color: var(--or); }
.toc-card.g .ic { background: var(--vert-soft); color: var(--vert); }
.toc-card h3 { margin: 0; font-family: 'Inter', sans-serif; font-size: 1rem; font-weight: 700; color: var(--ink); }
.toc-card p { margin: 0; font-size: .85rem; color: var(--ink-soft); }

.section {
  max-width: 1200px; margin: 0 auto;
  padding: 48px 24px;
  scroll-margin-top: 80px;
}
.section-head {
  display: flex; align-items: end; justify-content: space-between;
  gap: 18px; margin-bottom: 28px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 14px;
}
.section-head h2 { margin: 0; }
.section-head .meta { font-size: .85rem; color: var(--muted); font-weight: 500; }
.section-tip {
  background: var(--or-soft);
  border: 1px solid #E8D69C;
  border-left: 4px solid var(--or);
  padding: 14px 18px; border-radius: var(--radius-sm);
  margin-bottom: 24px;
  font-size: .95rem;
  line-height: 1.7;
}
.section-tip strong { color: #7A5C00; }

.controls {
  display: flex; flex-wrap: wrap; gap: 10px;
  margin-bottom: 22px;
}
.btn {
  font: inherit; font-size: .87rem; font-weight: 600;
  padding: 8px 14px; border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: var(--bg-elev); color: var(--ink);
  cursor: pointer; transition: all .15s;
}
.btn:hover { border-color: var(--ink); }
.btn.primary {
  background: var(--navy); color: #fff;
  border-color: var(--navy);
}
.btn.primary:hover { background: #08234E; }
.btn.ghost { border-color: var(--line); }

.card {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  margin-bottom: 14px;
}

.verb-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 14px;
}
.verb-card {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  display: flex; flex-direction: column;
}
.verb-card .verb-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 10px; margin-bottom: 4px;
}
.verb-card .verb-fr {
  font-family: 'Playfair Display', serif;
  font-size: 1.45rem; font-weight: 800; color: var(--navy);
}
.verb-card .verb-en {
  font-size: .85rem; color: var(--muted);
  font-style: italic;
}
.verb-card .verb-cat {
  font-size: .68rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .08em;
  padding: 3px 8px; border-radius: 6px;
  background: var(--rouge-soft); color: var(--rouge);
  display: inline-block;
  white-space: nowrap;
}
.verb-card .verb-cat.reg { background: var(--vert-soft); color: var(--vert); }
.verb-card .verb-cat.refl { background: var(--or-soft); color: #7A5C00; }
.tense-tabs {
  display: flex; flex-wrap: wrap; gap: 4px;
  margin-top: 14px; margin-bottom: 8px;
  border-bottom: 1px solid var(--line);
}
.tense-tab {
  font-size: .76rem; font-weight: 600;
  padding: 6px 9px;
  background: transparent; border: none;
  color: var(--ink-soft); cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: all .12s;
  font-family: inherit;
}
.tense-tab:hover { color: var(--ink); }
.tense-tab.active {
  color: var(--navy); border-bottom-color: var(--navy);
}
.tense-pane {
  display: none;
  font-size: .92rem;
  padding-top: 8px;
}
.tense-pane.active { display: block; }
.tense-pane ul {
  list-style: none; padding: 0; margin: 0;
  display: grid; grid-template-columns: 1fr; gap: 2px;
}
.tense-pane li {
  display: flex; gap: 8px;
  padding: 4px 0;
  border-bottom: 1px dashed var(--line);
}
.tense-pane li:last-child { border-bottom: none; }
.tense-pane .pn {
  color: var(--muted); font-size: .78rem;
  min-width: 68px; font-weight: 600;
  text-transform: lowercase;
}
.tense-pane .fm {
  font-family: 'Playfair Display', serif;
  font-size: 1rem; color: var(--ink);
}

.qa {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  margin-bottom: 10px;
  transition: border-color .15s;
}
.qa:hover { border-color: var(--line-strong); }
.qa.answered { border-color: var(--vert); background: #F6FBF7; }
.qa.wrong { border-color: var(--rouge); background: #FCF3F4; }
.qa .qnum {
  display: inline-block; font-weight: 700;
  color: var(--rouge); margin-right: 6px;
  font-family: 'Playfair Display', serif;
}
.qa .qtext {
  font-size: 1rem; margin-bottom: 10px;
  line-height: 1.55;
}
.qa .qtext .blank {
  display: inline-block; min-width: 80px;
  border-bottom: 2px solid var(--line-strong);
  margin: 0 2px;
  vertical-align: middle;
  height: 1em;
}
.qa .qtext .bracket {
  background: var(--or-soft);
  padding: 1px 6px; border-radius: 4px;
  font-weight: 600; color: #7A5C00;
}
.qa .choices {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 6px;
  margin-top: 6px;
}
.choice {
  text-align: left;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  font: inherit; font-size: .92rem;
  cursor: pointer; transition: all .12s;
  display: flex; align-items: center; gap: 8px;
}
.choice:hover { border-color: var(--ink-soft); }
.choice .letter {
  font-weight: 700; color: var(--muted);
  min-width: 16px;
}
.choice.correct {
  background: var(--vert-soft);
  border-color: var(--vert);
  color: var(--vert);
  font-weight: 600;
}
.choice.correct .letter { color: var(--vert); }
.choice.incorrect {
  background: var(--rouge-soft);
  border-color: var(--rouge);
  color: var(--rouge);
}
.choice.incorrect .letter { color: var(--rouge); }
.choice.revealed.correct::after {
  content: " ✓"; margin-left: auto; font-weight: 800;
}
.qa .explanation {
  display: none;
  margin-top: 10px; padding: 10px 12px;
  background: var(--navy-soft);
  border-left: 3px solid var(--navy);
  border-radius: 6px;
  font-size: .88rem; color: var(--ink-soft);
}
.qa.show-answer .explanation { display: block; }

.reveal-btn {
  margin-top: 10px;
  font-size: .8rem; font-weight: 600;
  padding: 4px 10px; border-radius: 6px;
  background: transparent;
  border: 1px solid var(--line-strong);
  color: var(--ink-soft); cursor: pointer;
  font-family: inherit;
}
.reveal-btn:hover { border-color: var(--ink); color: var(--ink); }

.reading-passage {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 20px;
  font-size: 1rem; line-height: 1.75;
}
.reading-passage h3 {
  font-family: 'Playfair Display', serif;
  margin-top: 0;
  color: var(--navy);
}
.reading-passage .quote {
  font-style: italic;
  border-left: 3px solid var(--rouge);
  padding-left: 14px;
  color: var(--ink-soft);
  margin-bottom: 14px;
}
.reading-q {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  margin-bottom: 10px;
}
.reading-q .q { font-weight: 600; margin-bottom: 6px; }
.reading-q .sample {
  display: none;
  padding: 12px;
  margin-top: 8px;
  background: var(--vert-soft);
  border-left: 3px solid var(--vert);
  border-radius: 6px;
  font-size: .95rem;
}
.reading-q.show .sample { display: block; }

.comp-block {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 16px;
}
.comp-block .prompt {
  font-style: italic;
  padding: 14px;
  background: var(--or-soft);
  border-left: 3px solid var(--or);
  border-radius: 6px;
  margin-bottom: 14px;
}
.comp-block details { margin-top: 12px; }
.comp-block details > summary {
  cursor: pointer; font-weight: 600; color: var(--navy);
  padding: 8px 0;
  list-style: none;
}
.comp-block details > summary::before {
  content: '▸ ';
  color: var(--navy);
}
.comp-block details[open] > summary::before {
  content: '▾ ';
  color: var(--rouge);
}
.comp-block details[open] > summary { color: var(--rouge); }
.comp-block .sample-comp {
  padding: 14px;
  background: var(--vert-soft);
  border-radius: 8px;
  margin-top: 10px;
  font-size: .95rem;
  line-height: 1.7;
}
.comp-block .sample-comp p { margin: 0 0 .7em; }
.comp-block .sample-comp p:last-child { margin: 0; }

.tip-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin-top: 14px;
  margin-bottom: 6px;
}
.tip {
  padding: 12px 14px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: .9rem;
  line-height: 1.5;
}
.tip strong {
  display: block;
  color: var(--rouge);
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  margin-bottom: 4px;
}

body.quiz-mode .qa .explanation { display: none !important; }
body.quiz-mode .qa.show-answer .explanation { display: block !important; }
body.quiz-mode .reveal-btn { display: none; }

.progress-bar {
  position: sticky; top: 60px; z-index: 5;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: 999px;
  margin-bottom: 16px;
  padding: 8px 14px;
  font-size: .82rem;
  display: flex; align-items: center; gap: 12px;
}
.progress-bar .track {
  flex: 1;
  height: 6px;
  background: var(--line);
  border-radius: 999px;
  overflow: hidden;
}
.progress-bar .fill {
  height: 100%;
  background: var(--vert);
  transition: width .3s;
}
.progress-bar .count { font-weight: 600; color: var(--ink-soft); }
.progress-bar .score { color: var(--vert); font-weight: 700; }

.footer {
  text-align: center;
  padding: 60px 24px 40px;
  color: var(--muted);
  font-size: .9rem;
  border-top: 1px solid var(--line);
  margin-top: 60px;
}
.footer .bonne {
  font-family: 'Playfair Display', serif;
  font-size: 1.6rem; font-weight: 700;
  color: var(--rouge);
  margin-bottom: 8px;
}

.btt {
  position: fixed; bottom: 24px; right: 24px;
  width: 44px; height: 44px;
  border-radius: 50%;
  border: none; background: var(--ink); color: #fff;
  font-size: 1.2rem;
  cursor: pointer;
  box-shadow: var(--shadow);
  opacity: 0; pointer-events: none;
  transition: opacity .2s, transform .2s;
  z-index: 60;
}
.btt.show { opacity: 1; pointer-events: auto; }
.btt:hover { transform: translateY(-2px); background: var(--navy); }

/* Nav separator */
.nav-sep {
  width: 1px; height: 18px;
  background: var(--line-strong);
  margin: 0 4px;
  align-self: center;
}
@media (max-width: 900px) { .nav-sep { display: none; } }

/* TOC section title */
.toc-section-title {
  max-width: 1200px; margin: 24px auto 8px;
  padding: 0 24px;
  font-family: 'Playfair Display', serif;
  font-size: .82rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .14em;
  color: var(--muted);
}

/* Lesson tabs */
.lesson-tabs {
  display: flex; flex-wrap: wrap; gap: 6px;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 12px;
}
.lesson-tab {
  font: inherit; font-size: .9rem; font-weight: 600;
  padding: 8px 16px; border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: var(--bg-elev); color: var(--ink-soft);
  cursor: pointer; transition: all .15s;
}
.lesson-tab:hover { color: var(--ink); border-color: var(--ink-soft); }
.lesson-tab.active {
  background: var(--navy); color: #fff; border-color: var(--navy);
}

/* Lesson content */
.lesson-content { display: none; }
.lesson-content.active { display: block; }
.lesson-content .lesson-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.4rem; font-weight: 800;
  color: var(--navy); margin-bottom: 4px;
}
.lesson-content .lesson-subtitle {
  color: var(--muted); font-size: .95rem; margin-bottom: 20px;
}
.lesson-content .group-heading {
  font-family: 'Playfair Display', serif;
  font-size: 1.1rem; font-weight: 700;
  color: var(--rouge); margin: 26px 0 10px;
  padding-bottom: 4px; border-bottom: 1px dashed var(--line-strong);
}

/* Flip cards */
.flip-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px;
}
.flip {
  perspective: 800px;
  height: 90px;
  cursor: pointer;
}
.flip-inner {
  position: relative; width: 100%; height: 100%;
  transform-style: preserve-3d;
  transition: transform .5s;
  border-radius: var(--radius-sm);
}
.flip.flipped .flip-inner { transform: rotateY(180deg); }
.flip-face {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  padding: 10px 14px; text-align: center;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--bg-elev);
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}
.flip-face.front {
  font-family: 'Playfair Display', serif;
  font-size: 1.05rem; font-weight: 700; color: var(--navy);
}
.flip-face.back {
  background: var(--vert-soft);
  color: var(--vert);
  font-size: .9rem;
  font-weight: 500;
  transform: rotateY(180deg);
  border-color: var(--vert);
}

/* Comparatif / superlatif tables */
.cs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 14px; margin-bottom: 24px;
}
.cs-card {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
}
.cs-card h3 {
  font-family: 'Playfair Display', serif;
  color: var(--navy);
  margin-top: 0;
}
.cs-table {
  width: 100%; border-collapse: collapse;
  font-size: .88rem;
}
.cs-table th, .cs-table td {
  text-align: left;
  padding: 7px 8px;
  border-bottom: 1px solid var(--line);
}
.cs-table th {
  color: var(--ink-soft);
  font-weight: 600;
}
.cs-table thead th {
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--rouge);
}
.cs-note {
  margin: 12px 0 0;
  font-size: .85rem;
  color: var(--ink-soft);
  padding: 8px 12px;
  background: var(--or-soft);
  border-left: 3px solid var(--or);
  border-radius: 6px;
}

/* Exercise list (sentence transformation, fill-in, unscramble) */
.exo-title {
  font-family: 'Playfair Display', serif;
  margin-top: 32px;
  margin-bottom: 4px;
  color: var(--ink);
  font-size: 1.2rem;
}
.exo-sub {
  color: var(--muted); font-size: .9rem; margin-bottom: 14px;
}
.exo-list .exo {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  margin-bottom: 8px;
}
.exo .prompt-line {
  font-size: .95rem;
  color: var(--ink-soft);
}
.exo .prompt-line .num {
  font-family: 'Playfair Display', serif;
  font-weight: 700; color: var(--rouge);
  margin-right: 6px;
}
.exo .verb-tag {
  display: inline-block;
  background: var(--navy-soft); color: var(--navy);
  font-size: .8rem; font-weight: 600;
  padding: 1px 8px; border-radius: 6px;
  margin: 0 4px;
}
.exo .reveal-btn { margin-top: 8px; }
.exo .answer {
  display: none;
  margin-top: 10px;
  padding: 10px 12px;
  background: var(--vert-soft);
  border-left: 3px solid var(--vert);
  border-radius: 6px;
  font-size: .95rem;
  font-family: 'Playfair Display', serif;
}
.exo .answer .ans-en {
  font-family: 'Inter', sans-serif;
  font-size: .82rem;
  color: var(--ink-soft);
  font-style: italic;
  display: block;
  margin-top: 4px;
}
.exo.show .answer { display: block; }

/* Conditionnel chart */
.cond-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 10px; margin-bottom: 24px;
}
.cond-card {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 14px;
}
.cond-card .ch {
  display: flex; justify-content: space-between; align-items: baseline;
  margin-bottom: 6px;
}
.cond-card .ch-fr {
  font-family: 'Playfair Display', serif;
  font-size: 1.1rem; font-weight: 700; color: var(--navy);
}
.cond-card .ch-en {
  font-size: .78rem; font-style: italic; color: var(--muted);
}
.cond-card ul {
  list-style: none; padding: 0; margin: 0;
  font-size: .9rem;
}
.cond-card li {
  display: flex; gap: 8px;
  padding: 3px 0;
  border-bottom: 1px dashed var(--line);
}
.cond-card li:last-child { border-bottom: none; }
.cond-card .pn {
  color: var(--muted); font-size: .78rem;
  min-width: 50px; font-weight: 600;
}
.cond-card .fm {
  font-family: 'Playfair Display', serif;
}

/* Matching grid */
.match-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 10px;
}
.match {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: .9rem;
}
.match .term {
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 4px;
}
.match .def {
  color: var(--ink-soft);
}

/* Help cards (collapsible explanations) */
.help-card {
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  margin-bottom: 10px;
  background: var(--navy-soft);
  overflow: hidden;
}
.help-toggle {
  display: flex; align-items: center; gap: 10px;
  width: 100%;
  padding: 10px 14px;
  background: transparent; border: none;
  font: inherit; font-size: .92rem; font-weight: 600;
  color: var(--navy);
  cursor: pointer;
  text-align: left;
}
.help-icon {
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--navy); color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font-family: 'Playfair Display', serif;
  font-size: .85rem; font-weight: 800;
  flex-shrink: 0;
}
.help-label { flex: 1; }
.help-chev { color: var(--navy); }
.help-body {
  display: none;
  padding: 0 16px 14px;
  border-top: 1px solid var(--line);
  background: var(--bg-elev);
}
.help-card.open .help-body { display: block; }
.help-tldr {
  margin: 14px 0 12px;
  padding: 10px 12px;
  background: var(--or-soft);
  border-left: 3px solid var(--or);
  border-radius: 6px;
  font-size: .95rem;
  font-style: italic;
}
.help-sec {
  margin-bottom: 12px;
}
.help-sec-h {
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  color: var(--rouge);
  font-size: .9rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: 4px;
}
.help-sec-b { font-size: .92rem; color: var(--ink-soft); line-height: 1.6; }
.help-examples { margin: 14px 0; }
.help-ex {
  display: flex; flex-direction: column; gap: 2px;
  padding: 6px 10px;
  background: var(--vert-soft);
  border-left: 3px solid var(--vert);
  border-radius: 4px;
  margin-bottom: 4px;
}
.help-ex-fr {
  font-family: 'Playfair Display', serif;
  font-size: .95rem; color: var(--ink);
}
.help-ex-en { font-size: .82rem; color: var(--ink-soft); font-style: italic; }
.help-gotchas ul { padding-left: 18px; margin: 6px 0; }
.help-gotchas li { font-size: .9rem; color: var(--ink-soft); margin-bottom: 3px; }

/* Idiom cards */
.idiom-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 10px;
}
.idiom-card {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 14px;
  cursor: pointer;
  transition: all .15s;
}
.idiom-card:hover { border-color: var(--line-strong); }
.idiom-card.open { background: var(--vert-soft); border-color: var(--vert); }
.idiom-fr {
  font-family: 'Playfair Display', serif;
  font-size: 1.05rem; font-weight: 700;
  color: var(--navy);
  margin-bottom: 4px;
}
.idiom-card.open .idiom-fr { color: var(--vert); }
.idiom-en { font-size: .85rem; color: var(--ink-soft); }
.idiom-details {
  display: none;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--line-strong);
}
.idiom-card.open .idiom-details { display: block; }
.idiom-example {
  font-family: 'Playfair Display', serif;
  font-size: .92rem;
  color: var(--ink);
  font-style: italic;
  margin-bottom: 4px;
}
.idiom-literal {
  font-size: .8rem;
  color: var(--muted);
}

/* Tips */
.tips-tabs {
  display: flex; flex-wrap: wrap; gap: 6px;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 12px;
}
.tips-pane { display: none; }
.tips-pane.active { display: block; }
.tip-row {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  margin-bottom: 8px;
}
.tip-h {
  font-family: 'Playfair Display', serif;
  font-weight: 700; color: var(--navy);
  font-size: 1.05rem; margin-bottom: 4px;
}
.tip-b { font-size: .92rem; color: var(--ink-soft); line-height: 1.55; }

.mistakes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 10px;
}
.mistake-card {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-left: 3px solid var(--rouge);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
}
.mistake-cat {
  font-size: .72rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .1em;
  color: var(--rouge);
  margin-bottom: 6px;
}
.mistake-x {
  font-size: .9rem; color: #7C1F2C;
  background: var(--rouge-soft);
  padding: 6px 10px;
  border-radius: 4px;
  margin-bottom: 6px;
  font-family: 'Playfair Display', serif;
}
.mistake-fix {
  font-size: .88rem; color: var(--vert);
  background: var(--vert-soft);
  padding: 6px 10px;
  border-radius: 4px;
}

/* Cheat sheet */
.cs-block {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-bottom: 12px;
}
.cs-block > summary {
  cursor: pointer;
  padding: 14px 18px;
  display: flex; align-items: center; gap: 14px;
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  list-style: none;
}
.cs-block > summary::-webkit-details-marker { display: none; }
.cs-block > summary::before {
  content: '▸';
  color: var(--navy);
  transition: transform .15s;
  display: inline-block;
}
.cs-block[open] > summary::before { content: '▾'; }
.cs-num {
  font-family: 'Playfair Display', serif;
  font-weight: 900;
  color: var(--rouge);
  font-size: 1rem;
}
.cs-title { font-size: 1.15rem; color: var(--ink); }
.cs-table-grid {
  width: 100%;
  border-collapse: collapse;
  border-top: 1px solid var(--line);
}
.cs-table-grid th, .cs-table-grid td {
  text-align: left;
  padding: 10px 18px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.cs-table-grid th {
  width: 32%;
  background: var(--bg);
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  color: var(--navy);
  font-size: .9rem;
}
.cs-row-content { font-size: .9rem; color: var(--ink); }
.cs-row-example {
  margin-top: 4px;
  font-size: .82rem;
  color: var(--vert);
  font-style: italic;
  font-family: 'Playfair Display', serif;
}

/* Reading subtitle */
.reading-subtitle {
  color: var(--muted);
  font-size: .9rem;
  margin-top: -6px;
}

@media print {
  .header, .btt, .controls, .reveal-btn, .quiz-pill, .mobile-menu-toggle, .progress-bar, .tense-tabs, .help-toggle { display: none !important; }
  .help-body, .cs-block .cs-table-grid, details > * { display: block !important; }
  .cs-block { page-break-inside: avoid; }
  body { background: #fff; font-size: 11pt; }
  .section { padding: 12px 0; page-break-inside: avoid; }
  .qa, .verb-card, .reading-q, .comp-block { break-inside: avoid; border: 1px solid #aaa; }
  .qa .explanation, .reading-q .sample, .qa .choice.correct { display: block !important; }
  .tense-pane { display: block !important; }
  .tense-pane::before {
    content: attr(data-tense-full);
    display: block; font-weight: 700; font-size: 9pt;
    color: #666; margin-top: 6px; text-transform: uppercase;
  }
  details { open: true; }
  details > * { display: block !important; }
}
