/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   Teacher and Me — the sample exam paths (static pages, generated by
   scripts/sample-paths/plugin.ts), loaded after placement.css and
   generators.css (the student view, .sv-*, and the worksheet, .ws-*, are
   theirs). Here: the path page (.sp-*), the hub's cards, the player's stage,
   and the print view, on screen and on A4.
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

.sp-kicker { color: var(--color-primary-dark); font-weight: 700; font-size: 0.95rem; margin: 0 0 var(--space-2); letter-spacing: 0.01em; }
.sp-meta { color: var(--color-text-secondary); margin-top: 0; }
.sp-review { font-size: 0.9rem; color: var(--color-text-secondary); background: var(--color-accent-sky); border-radius: var(--radius-md, 8px); padding: var(--space-2) var(--space-3); display: inline-block; }

/* ─── The exam's papers ────────────────────────────────────────────────── */
.sp-sections th[scope="row"] { font-family: var(--font-heading); white-space: normal; }
.sp-badge { display: inline-block; font-size: 0.8rem; font-weight: 700; padding: 0.15rem 0.6rem; border-radius: 999px; background: var(--color-cloud); color: var(--color-text-secondary); white-space: nowrap; }
.sp-badge.is-trained { background: #e6f6f1; color: #0a5c45; }
.sp-official { margin-top: var(--space-2); }

/* ─── The player ───────────────────────────────────────────────────────── */
.sp-player { margin: var(--space-10) 0; }
.sp-stage { min-height: 10rem; }
.sp-progress { font-weight: 700; color: var(--color-text-secondary); margin: 0 0 var(--space-1); }
.sp-lesson-line { font-family: var(--font-heading); font-weight: 800; margin: 0 0 var(--space-3); }
.sp-play .sv { max-width: 560px; margin-inline: 0; }
.sp-play .sv-banner { display: none; }
.sp-end { background: var(--color-surface); border-radius: var(--radius-lg, 12px); box-shadow: var(--shadow-card); padding: var(--space-5); max-width: 560px; }
.sp-end .sv-verdict { font-family: var(--font-heading); font-weight: 800; font-size: 1.3rem; margin: 0 0 var(--space-2); }

/* ─── The exercises, listed ────────────────────────────────────────────── */
.sp-lesson { margin-top: var(--space-8); }
.sp-lesson h3 { font-size: 1.25rem; margin-bottom: var(--space-1); }
.sp-lesson-desc { color: var(--color-text-secondary); margin-top: 0; }
.sp-exercises { list-style: none; margin: var(--space-4) 0 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-4); }
.sp-exercise {
  background: var(--color-surface); border: 1px solid var(--color-border);
  border-radius: var(--radius-md, 8px); padding: var(--space-5);
  /* A long word or link must wrap, not push the page wider than a 320px phone. */
  min-width: 0; overflow-wrap: anywhere;
}
.sp-sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.sp-exercise h3 { font-size: 1.1rem; margin: 0 0 var(--space-1); }
.sp-n { color: var(--color-primary-dark); }
.sp-section-tag { font-size: 0.8rem; font-weight: 700; color: var(--color-text-secondary); text-transform: uppercase; letter-spacing: 0.04em; margin: 0 0 var(--space-3); }
.sp-consigne { font-style: italic; color: var(--color-text-secondary); margin: 0 0 var(--space-2); }
.sp-exercise p { margin: 0 0 var(--space-2); white-space: pre-line; }
.sp-choices { margin: var(--space-2) 0; padding-left: 0; list-style: none; }
.sp-choices li { padding: 0.25rem 0; }
.sp-tiles { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.sp-tile { border: 1px solid var(--color-border); border-radius: var(--radius-md, 8px); padding: 0.2rem 0.6rem; background: var(--color-cloud); }
.sp-pairs { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-4); }
.sp-pairs ol { margin: 0; padding-left: 1.4rem; }
.sp-corrige { margin-top: var(--space-3); border-top: 1px dashed var(--color-border); padding-top: var(--space-2); }
.sp-corrige summary { cursor: pointer; font-weight: 700; color: var(--color-primary-dark); }
.sp-corrige p { margin: var(--space-2) 0 0; }

/* ─── Guide, licence, siblings ─────────────────────────────────────────── */
.sp-guide { margin-top: var(--space-10); }
.sp-license { margin-top: var(--space-8); font-size: 0.95rem; }

/* ─── The hub ──────────────────────────────────────────────────────────── */
.sp-card .sp-kicker { margin-bottom: var(--space-1); }
.sp-uses { padding-left: 1.4rem; }
.sp-uses li { margin-bottom: var(--space-2); }

/* ─── The print view, on screen ────────────────────────────────────────── */
.sp-print-page .ws { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-md, 8px); padding: var(--space-5); margin-bottom: var(--space-4); }
.sp-print-page .ws-cover { margin-bottom: var(--space-6); }
.sp-print-page .ws-cover h1 { margin-bottom: var(--space-2); }
.sp-print-page .ws-lesson-title { margin: var(--space-8) 0 var(--space-3); }
.sp-print-page .ws-answers { margin-top: var(--space-8); border-top: 2px solid var(--color-border); padding-top: var(--space-4); }
.sp-print-page .ws-answers-list li { margin-bottom: var(--space-2); }
.sp-print-page .ws-head { display: flex; justify-content: space-between; gap: 1rem; margin-bottom: var(--space-2); }
.sp-print-page .ws-title { font-size: 1.1rem; margin: 0; }
/* The writing lines are one unbroken run of underscores, sized for A4: on a
   narrow screen they are cut at the card's edge instead of widening the page. */
.sp-print-page .ws-lines { color: var(--color-text-secondary); letter-spacing: 0.1em; overflow: hidden; }
.sp-print-page .ws-choices { list-style: none; padding: 0; }
.sp-print-page .ws-tiles .ws-tile { display: inline-block; border: 1px solid var(--color-border); border-radius: 6px; padding: 0.1rem 0.5rem; margin: 0.1rem; }
/* placement.css gives every table `min-width: 560px` (for the data tables that
   scroll in a wrapper); the matching worksheet has no wrapper and its cells
   wrap, so it keeps to the page instead of scrolling it sideways on a phone. */
.sp-print-page .ws-pairs { min-width: 0; }
.sp-print-page .ws-pairs td { padding: 0.25rem 1rem 0.25rem 0; }
.sp-print-page .ws-instruction { font-style: italic; color: var(--color-text-secondary); }
.btn-header[data-action="print"] { font: inherit; cursor: pointer; border: 0; }

/* ─── On paper: A4, an exercise never cut, the answer key on the last page ─ */
@media print {
  @page { size: A4; margin: 15mm 14mm; }
  .sp-print-page { background: #fff; color: #000; }
  .sp-print-page .sp-print-chrome, .sp-print-page .site-header { display: none !important; }
  .sp-print-page main.container { max-width: none; padding: 0; }
  .sp-print-page .ws { border: 0; padding: 0 0 4mm; margin: 0 0 5mm; border-bottom: 1px solid #bbb; break-inside: avoid; page-break-inside: avoid; }
  .sp-print-page .ws-lesson-title { break-after: avoid; font-size: 14pt; margin: 8mm 0 3mm; }
  .sp-print-page .ws-cover { break-after: avoid; }
  .sp-print-page .ws-cover h1 { font-size: 18pt; }
  .sp-print-page .ws-answers { break-before: page; page-break-before: always; border: 0; }
  .sp-print-page .ws-lines { color: #000; }
  .sp-print-page .ws-tiles .ws-tile { border-color: #000; }
  .sp-print-page a { color: #000; text-decoration: none; }
}
