/* Lesson-plan content styling under `.lesson-plan`. Loaded by PDF
   chrome, admin read view, and the lexxy editor — same scope in all
   three so the editor is WYSIWYG. Styles only standard HTML lexxy
   preserves; semantic intent (speech, tip, alert) comes from an emoji
   prefix in <strong>, not from custom classes. */

/* ── Body prose ──────────────────────────────────────────────────── */
.lesson-plan p {
  font-size: 11pt;
  line-height: var(--line-loose);
  color: var(--color-ink);
  margin: 0 0 var(--space-4);
}
.lesson-plan strong {
  font-weight: 700;
  color: var(--color-ink);
}
.lesson-plan em {
  font-style: italic;
}
/* Drop the browser-default yellow bg so it doesn't fight the inline
   color lexxy applies when the user picks a highlight. */
.lesson-plan mark {
  background: transparent;
  font-weight: 600;
}

/* ── Headings ─────────────────────────────────────────────────────
   h2 = section (auto-numbered badge + dotted line)
   h3 = subsection / activity / leveled set header
   Phase pivots (Antes/Durante/Pós) render as `<div
   class="content-block-intro">` chrome — not h1.
   Counter scope = .lesson-plan so the badge restarts per document. */
.lesson-plan { counter-reset: section; }

.lesson-plan h2 {
  display: flex;
  align-items: baseline;
  gap: var(--space-3-5);
  /* Section break: the badge + rule already signal a new section, so a smaller
     top gap reads fine and reclaims ~a page across a 12-section plan. */
  margin: var(--space-7) 0 var(--space-3-5);
  font-size: 14.5pt;
  font-weight: 700;
  letter-spacing: var(--letter-snug);
  color: var(--color-ink);
  counter-increment: section;
  page-break-after: avoid;
  break-after: avoid;
}
.lesson-plan h2::before {
  content: counter(section, decimal-leading-zero);
  font-family: var(--font-mono);
  font-size: 9pt;
  font-weight: 700;
  color: var(--color-accent-ink);
  background: var(--color-accent-soft);
  padding: var(--space-1) var(--space-2-5);
  border-radius: var(--radius-pill);
  letter-spacing: var(--letter-wide);
  flex-shrink: 0;
  align-self: center;
}
.lesson-plan h2::after {
  content: '';
  flex: 1;
  border-bottom: var(--hairline) dotted var(--color-line-muted);
  margin-bottom: 0.35em;
}

/* h3 — subsection (lexxy "Medium Heading"). */
.lesson-plan h3 {
  font-size: 12pt;
  font-weight: 800;
  color: var(--color-ink);
  margin: var(--space-5) 0 var(--space-2);
  page-break-after: avoid;
  break-after: avoid;
}

/* h4 — sub-subsection (lexxy "Small Heading"). Uppercase eyebrow so the
   user can tell h3 from h4 at a glance. */
.lesson-plan h4 {
  font-size: var(--text-extra-small);
  font-weight: 800;
  color: var(--color-accent-ink);
  text-transform: uppercase;
  letter-spacing: var(--letter-wide);
  margin: var(--space-4) 0 var(--space-1);
  page-break-after: avoid;
  break-after: avoid;
}

/* ── Lists ─────────────────────────────────────────────────────────
   `<ol>` with nested `<ul>` = timeline/Q&A pattern; `:has(> ul)` gives
   the parent <li> a left rail and dot-prefixes the inner items. */
.lesson-plan ol,
.lesson-plan ul {
  margin: var(--space-3) 0 var(--space-4);
  padding-left: var(--space-5);
}
.lesson-plan li {
  margin-bottom: var(--space-2);
  font-size: 11pt;
  line-height: var(--line-readable);
  color: var(--color-ink);
}
.lesson-plan li > p {
  margin: 0 0 var(--space-1);
}

/* Timeline / structured-list pattern — block layout (overrides pdf.css
   `ol > li { display: flex }` so the inline-block <strong> title stays
   inline with the description, not stacked above it). */
.lesson-plan ol > li:has(> ul) {
  display: block;
  padding: var(--space-2) 0 var(--space-2) var(--space-3);
  border-left: 2pt solid var(--color-accent);
  margin-left: calc(-1 * var(--space-5));
  list-style-position: inside;
  page-break-inside: avoid;
  break-inside: avoid;
}
.lesson-plan ol > li:has(> ul) > strong:first-child {
  display: inline-block;
  color: var(--color-ink);
  font-size: 11.5pt;
  margin-right: var(--space-1);
}
.lesson-plan ol > li > ul {
  margin: var(--space-2) 0 0;
  padding-left: var(--space-4);
  list-style: none;
}
.lesson-plan ol > li > ul > li {
  position: relative;
  padding-left: var(--space-3);
  font-size: var(--text-medium);
  line-height: var(--line-readable);
  color: var(--color-ink-muted);
}
.lesson-plan ol > li > ul > li::before {
  content: '·';
  position: absolute;
  left: 0;
  color: var(--color-accent-ink);
  font-weight: 800;
}
/* The student handout reuses .lesson-plan, so an exercise <li> that wraps its
   answer options in a <ul> gets caught by the lesson-body "timeline" styling
   above (accent left-border, negative margin, "·" sub-bullets). On a worksheet
   the "( )" / "A)" is the marker, so reset to a plain choice list sitting under
   the exercise number. Placed after the timeline rules to win on source order. */
.student-handout__content ol > li:has(> ul) {
  border-left: none;
  margin-left: 0;
  padding: 0 0 0 var(--space-6);
}
.student-handout__content ol > li > ul { padding-left: 0; }
.student-handout__content ol > li > ul > li { padding-left: 0; }
.student-handout__content ol > li > ul > li::before { content: none; }
.lesson-plan ol > li > ul > li > strong {
  color: var(--color-accent-ink);
  text-transform: uppercase;
  font-size: var(--text-extra-small);
  letter-spacing: var(--letter-wide);
  font-weight: 700;
  margin-right: var(--space-1);
}

/* ── Blockquote — terracotta-railed callout ────────────────────────
   First <strong> renders as uppercase eyebrow; emoji prefix inside it
   conveys the callout type (no classes — lexxy strips them). */
.lesson-plan blockquote {
  margin: var(--space-4) 0;
  padding: 0 0 0 var(--space-4);
  border-left: 3pt solid var(--color-accent);
  page-break-inside: avoid;
  break-inside: avoid;
  color: var(--color-ink);
}
.lesson-plan blockquote > p {
  font-size: var(--text-medium);
  line-height: var(--line-readable);
  margin: 0 0 var(--space-1);
}
.lesson-plan blockquote > p:first-child > strong:first-child {
  display: block;
  font-size: var(--text-micro);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: var(--letter-widest);
  color: var(--color-accent-ink);
  margin: 0 0 var(--space-1);
}
.lesson-plan blockquote > p + p {
  margin-top: var(--space-2);
}
/* Purely italic body (quote / roteiro de fala) — promote to serif and set
   upright. A read-aloud script over several lines is hard to read in cursive
   serif italic; roman serif keeps the editorial voice and stays legible. */
.lesson-plan blockquote > p > em:only-child {
  font-family: var(--font-serif);
  font-style: normal;
  font-size: var(--text-base);
  color: var(--color-ink);
}

/* ── Pre/code — esquema de lousa / blocos de exemplo ─────────────── */
/* The "Esquema de Lousa" (and any aligned block) — framed as a warm board panel,
   not a code strip. The LLM keeps reaching for <pre> to hold the board's spatial
   layout; the tint + border + radius read as "what goes on the board", de-coding
   the monospace look. */
.lesson-plan pre {
  font-family: var(--font-mono);
  font-size: 10pt;
  line-height: var(--line-relaxed, var(--line-readable));
  color: var(--color-ink);
  /* Warm paper tint (not the neutral-gray surface) so the panel reads as a
     board sketch, pulling it further from a code/terminal block. */
  background: color-mix(in oklch, var(--color-accent) 5%, var(--color-surface));
  border: var(--hairline) solid var(--color-border);
  border-left: 3pt solid var(--color-accent);
  border-radius: var(--radius-card);
  padding: var(--space-3) var(--space-4);
  margin: var(--space-4) 0;
  white-space: pre-wrap;
  page-break-inside: avoid;
  break-inside: avoid;
}
.lesson-plan pre > code {
  background: transparent;
  border: none;
  padding: 0;
  font-family: inherit;
}
.lesson-plan code {
  font-family: var(--font-mono);
  font-size: 0.9em;
  background: color-mix(in oklch, var(--color-accent-soft) 50%, transparent);
  padding: 1pt 4pt;
  border-radius: 3pt;
}

/* ── Tables — variations / comparisons / rubrics ──────────────────── */
.lesson-plan table {
  width: 100%;
  border-collapse: collapse;
  margin: var(--space-4) 0;
  font-size: var(--text-medium);
  line-height: var(--line-readable);
  page-break-inside: avoid;
  break-inside: avoid;
}
/* Soft terracotta header band; left-aligned so multi-word cells read as
   text, not centered fragments. */
.lesson-plan table th {
  font-size: var(--text-extra-small);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: var(--letter-wide);
  color: var(--color-ink);
  text-align: left;
  padding: var(--space-2) var(--space-3);
  background: var(--color-accent-soft);
  border-bottom: 2pt solid var(--color-border-strong);
}
.lesson-plan table td {
  padding: var(--space-2-5) var(--space-3);
  text-align: left;
  vertical-align: top;
  color: var(--color-ink);
  border-bottom: var(--hairline) solid var(--color-border);
}
/* Prose tables only. A block that draws a GRID is a boxed figure, and this
   rule left it hanging open at the foot: a real cruzadinha reached a 1o ano
   with its bottom row unclosed. The exemption below used to be a hand-kept
   list of grids, and the crossword was never on it, so the scope moved to the
   rule itself. Every block table carries an `exercise-*` class (checked across
   all 44 renderers), so a grid added later is out of reach by construction
   rather than by remembering. */
.lesson-plan table:not([class*="exercise-"]) tr:last-child td {
  border-bottom: none;
}
/* First column anchors each row (criterion / level label in rubrics). */
.lesson-plan table tbody td:first-child {
  font-weight: 600;
}

/* ── Horizontal rule — section divider ──────────────────────────── */
.lesson-plan hr {
  border: none;
  text-align: center;
  margin: var(--space-7) 0;
  color: var(--color-line-muted);
  font-size: 10pt;
  letter-spacing: var(--letter-widest);
}
.lesson-plan hr::before {
  content: '• • •';
}

/* ── Links + images ─────────────────────────────────────────────── */
.lesson-plan a {
  color: var(--color-accent-ink);
  text-decoration: underline;
  text-decoration-thickness: 0.5pt;
  text-underline-offset: 2pt;
}
.lesson-plan figure,
.lesson-plan img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: var(--space-4) auto;
  border-radius: 6pt;
}

/* ── Phase intro chrome ─────────────────────────────────────────
   Rendered by `LessonPlan::Section#block_intro_html` for lesson
   plans (antes/durante/pós da aula) and injected by
   `Pdf::BlockIntroInjector` for council reports (olhar pra trás /
   frente). Lives here — not in pdf.css — so the admin curation
   view picks up the same styling that the PDF gets. */
.content-block-intro {
  margin: var(--space-10) 0 var(--space-3);
  page-break-after: avoid;
  break-after: avoid;
}
.content-block-intro:first-child {
  margin-top: 0;
}
.content-block-intro__label {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: var(--text-extra-small);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: var(--letter-widest);
  color: var(--color-accent-ink);
  padding-bottom: var(--space-1-5);
  border-bottom: 2pt solid var(--color-accent);
  line-height: 1;
}
/* --main marks a major phase pivot. Its visual weight (★, heavy rule, big
   label) carries it inline — no forced page break, which used to strand the
   bottom of the prior page half-empty. break-after:avoid (base rule) keeps the
   divider glued to its heading; break-inside:avoid keeps the divider whole. */
.content-block-intro--main {
  break-inside: avoid;
  page-break-inside: avoid;
}
.content-block-intro--main .content-block-intro__label {
  font-size: var(--text-medium);
  font-weight: 900;
  letter-spacing: var(--letter-hero);
  padding-right: var(--space-3);
  padding-bottom: var(--space-2);
  border-bottom-width: 4pt;
}
.content-block-intro--main .content-block-intro__label::before {
  content: '★ ';
  color: var(--color-accent-ink);
  margin-right: 2pt;
}
/* Editor-only adjustments: kill print-only chrome in the lexxy scope. */
/* Printable exercises (connect-the-pairs, word search, memory game) —
   server-rendered from <div class="exercise-*" data-spec="..."> markers
   by Material::BlockRegistry. */

.lesson-plan .exercise {
  margin: 1.4em 0;
}

/* Keeping a WHOLE block on one page is right for a grid or a set of cards, and
   wrong for a list of questions: a six-item multiple-choice that no longer fits
   jumped entire to the next page and left the rest of this one blank. A real
   sheet did it on four pages out of six, one of them 70% empty, which a teacher
   prints 40 times.
   So the atom is the QUESTION, not the block: an item never splits across the
   fold, and the block flows. The grid-shaped blocks below still travel whole,
   because a half-drawn line channel or half a set of cut-out cards is unusable. */
.lesson-plan .exercise > ol > li,
.lesson-plan .exercise__title {
  break-inside: avoid;
}

.lesson-plan .exercise-link,
.lesson-plan .exercise-memory,
.lesson-plan .exercise-wordsearch,
.lesson-plan .exercise-cluesearch,
.lesson-plan .exercise-cross,
.lesson-plan .exercise-compare,
.lesson-plan .exercise-armed {
  break-inside: avoid;
  page-break-inside: avoid;
}

.lesson-plan .exercise__title {
  /* Never the last thing on a page: a title orphaned from its own exercise
     sends the student to the next sheet to find out what she is answering. */
  break-after: avoid;
  page-break-after: avoid;
  font-weight: 600;
  font-size: 11pt;
  margin: 0 0 0.6em;
  color: var(--color-ink);
}

/* exercise-link — two columns with empty space the student draws lines across */
.lesson-plan .exercise-link__grid {
  display: grid;
  /* Two columns with a wide gap between them — the channel the child draws the
     lines across. (The renderer emits exactly two <ul>s, so a 3-column
     "1fr spacer 1fr" left the spacer unused and the dots adjacent.) */
  grid-template-columns: 1fr 1fr;
  column-gap: 4.5cm;
  align-items: start;
  margin-top: 0.6em;
}

.lesson-plan .exercise-link__col {
  list-style: none;
  margin: 0;
  padding: 0;
}

.lesson-plan .exercise-link__col li {
  display: flex;
  align-items: center;
  /* Enough air to draw a line into, no more: at 1.7em, three pairs owned half
     a page and a real sheet shipped a page that was mostly channel. */
  padding: 0.65em 0;
  font-size: 10pt;
}

.lesson-plan .exercise-link__col--left li {
  justify-content: flex-end;
  text-align: right;
}

.lesson-plan .exercise-link__col--right li {
  justify-content: flex-start;
  text-align: left;
}

.lesson-plan .exercise-link__dot {
  width: 0.42em;
  height: 0.42em;
  border: 1pt solid var(--color-ink);
  border-radius: 50%;
  display: inline-block;
  margin: 0 0.6em;
  flex-shrink: 0;
}

/* exercise-grid — the fixed-width monospace letter grid, shared by the
   caça-palavras and the caça-definições (the reason Material::LetterGrid
   exists). The figure around it carries the block's own class. */
.lesson-plan .exercise-grid {
  border-collapse: collapse;
  margin: 0.5em auto;
  font-family: var(--font-mono, "JetBrains Mono", monospace);
}

.lesson-plan .exercise-grid td {
  border: 0.5pt solid oklch(70% 0.02 70);
  width: 0.65cm;
  height: 0.65cm;
  text-align: center;
  font-size: 10pt;
  font-weight: 600;
  letter-spacing: 0;
  padding: 0;
}

.lesson-plan .exercise-wordsearch__words {
  columns: 3;
  column-gap: 1.2em;
  list-style: none;
  padding: 0;
  margin: 0.8em 0 0;
  font-family: var(--font-mono, "JetBrains Mono", monospace);
}

.lesson-plan .exercise-wordsearch__words li {
  padding: 0.18em 0;
  font-size: 9pt;
  font-weight: 600;
  letter-spacing: 0.02em;
}

/* exercise-memory — 4-column grid of dashed-border cards meant to be cut
   apart and used as a matching game. Aspect-ratio: 1 keeps cards square
   regardless of label length. Break-before: avoid keeps the whole grid
   together on one page so the dashed cut lines align. */
.lesson-plan .exercise-memory {
  break-inside: avoid;
}

.lesson-plan .exercise-memory__instructions {
  font-style: italic;
  font-size: 9.5pt;
  color: oklch(45% 0.018 70);
  margin: 0 0 0.8em;
}

.lesson-plan .exercise-memory__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4mm;
  margin: 0.8em 0;
}

.lesson-plan .exercise-memory__card {
  border: 1pt dashed oklch(55% 0.02 70);
  aspect-ratio: 1;
  padding: 0.5cm;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 10pt;
  font-weight: 500;
  line-height: 1.25;
  break-inside: avoid;
  hyphens: auto;
}

/* exercise-choice — lettered options under each numbered question */
.lesson-plan .exercise-choice__options { list-style: none; margin: 0.3em 0 0; padding-left: 1em; }
.lesson-plan .exercise-choice__options li { padding: 0.12em 0; }

/* exercise-fill / exercise-bank — inline gap the student writes in */
.lesson-plan .exercise-fill__list,
.lesson-plan .exercise-bank__list { line-height: 2.2; }
.lesson-plan .exercise-fill__gap,
.lesson-plan .exercise-bank__gap {
  display: inline-block;
  min-width: 3.5cm;
  border-bottom: 1px solid var(--color-ink);
  vertical-align: bottom;
}

/* A gap cut into the middle of a word holds ONE letter: at word width the
   child cannot read CASA across it, and reading the word IS the task. */
.lesson-plan .exercise-fill__gap--tight,
.lesson-plan .exercise-bank__gap--tight { min-width: 1.2cm; }

/* exercise-bank — word chips above the sentences */
.lesson-plan .exercise-bank__bank { display: flex; flex-wrap: wrap; gap: 0.5em; margin: 0.4em 0 1em; }
.lesson-plan .exercise-bank__chip {
  border: 1pt solid var(--color-ink);
  border-radius: 16px;
  padding: 0.2em 0.8em;
  font-weight: 600;
}

/* exercise-open — ruled writing lines */
.lesson-plan .exercise-open__lines { margin: 0.4em 0 0.8em; }
.lesson-plan .exercise-open__lines span {
  display: block;
  border-bottom: 1px solid oklch(70% 0.02 70);
  height: 1.5em;
}

/* exercise-reading — framed base text (poem, excerpt, primary source) the
   questions refer to. Verse survives (one <p> per line), the credit prints
   under the text textbook-style, and the margin numbers land every 5th line
   so a question can say "linha 10". */
.lesson-plan .exercise-reading__box {
  border: 1pt solid var(--color-ink);
  border-radius: 4pt;
  padding: 0.9em 1.1em 0.7em 2.6em;
  margin-top: 0.4em;
  /* The framed text travels WHOLE to the next page instead of leaving one
     orphan verse in a box at the page's foot — a student reads a poem, not
     two halves of one. Best-effort by spec: a text taller than a full page
     still breaks rather than clipping. */
  break-inside: avoid;
  page-break-inside: avoid;
}
.lesson-plan .exercise-reading__line {
  position: relative;
  margin: 0;
  line-height: 1.65;
  font-size: 10.5pt;
}
.lesson-plan .exercise-reading__line--blank { line-height: 1; }
.lesson-plan .exercise-reading__num {
  position: absolute;
  left: -1.9em;
  font-size: 8pt;
  font-family: var(--font-mono, monospace);
  color: oklch(55% 0.015 70);
  line-height: 2.2;
}
.lesson-plan .exercise-reading__credit {
  margin: 0.7em 0 0;
  text-align: right;
  font-size: 8.5pt;
  font-style: italic;
  color: oklch(45% 0.018 70);
}

/* exercise-numberline — full-width SVG line; the boxes above the missing
   ticks are the answer slots. */
.lesson-plan .exercise-numberline { break-inside: avoid; }
.lesson-plan .exercise-numberline__svg { width: 100%; height: auto; margin-top: 0.4em; }

/* exercise-clock — analog faces in a row, each with a write-in line (read)
   or the target time printed (draw). */
.lesson-plan .exercise-clock { break-inside: avoid; }
.lesson-plan .exercise-clock__grid { display: flex; flex-wrap: wrap; gap: 0.9cm; margin-top: 0.5em; }
.lesson-plan .exercise-clock__cell { display: flex; flex-direction: column; align-items: center; gap: 0.4em; }
.lesson-plan .exercise-clock__face { width: 3.4cm; height: 3.4cm; }
.lesson-plan .exercise-clock__line { display: inline-block; min-width: 2.6cm; border-bottom: 1px solid var(--color-ink); height: 1.2em; }
.lesson-plan .exercise-clock__label { font-weight: 600; font-size: 11pt; }

/* exercise-money — notes and coins per set, total line to fill. */
.lesson-plan .exercise-money { break-inside: avoid; }
.lesson-plan .exercise-money__set {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.35cm;
  padding: 0.45em 0;
  border-bottom: 0.5pt solid oklch(85% 0.01 70);
}
.lesson-plan .exercise-money__set:last-of-type { border-bottom: none; }
.lesson-plan .exercise-money__note { width: 2.4cm; height: auto; }
.lesson-plan .exercise-money__coin { width: 1.3cm; height: auto; }
.lesson-plan .exercise-money__total { margin-left: auto; font-weight: 600; white-space: nowrap; }
.lesson-plan .exercise-money__line { display: inline-block; min-width: 2.2cm; border-bottom: 1px solid var(--color-ink); }

/* exercise-sudoku — self-drawn grid; box borders heavier than cell borders
   so the regions read at a glance on the photocopy. */
.lesson-plan .exercise-sudoku { break-inside: avoid; }
.lesson-plan .exercise-sudoku__grid {
  border-collapse: collapse;
  margin: 0.5em auto;
  border: 1.4pt solid oklch(35% 0.02 70);
  /* The global .lesson-plan table rule stretches to 100%; a sudoku must
     stay a square of fixed cells or the boxes stop reading as boxes. */
  width: auto;
}
.lesson-plan .exercise-sudoku__grid td {
  border: 0.5pt solid oklch(70% 0.02 70);
  width: 0.8cm;
  height: 0.8cm;
  text-align: center;
  font-size: 12pt;
  font-weight: 600;
  padding: 0;
}
.lesson-plan .exercise-sudoku__grid td.box-r { border-right: 1.2pt solid oklch(35% 0.02 70); }
.lesson-plan .exercise-sudoku__grid td.box-b { border-bottom: 1.2pt solid oklch(35% 0.02 70); }
/* The 4x4 is the youngest players' board: cells sized for digits written
   by a 7-year-old hand. */
.lesson-plan .exercise-sudoku__grid--mini td { width: 1.1cm; height: 1.1cm; font-size: 14pt; }
/* Multiple boards ("count") flow two per row, each labeled Jogo N. */
.lesson-plan .exercise-sudoku__boards {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.8em 1.6em;
  margin-top: 0.4em;
}
.lesson-plan .exercise-sudoku__board { break-inside: avoid; text-align: center; }
.lesson-plan .exercise-sudoku__label {
  display: block;
  margin-bottom: 0.15em;
  font-size: 7.5pt;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: oklch(45% 0.02 70);
}
.lesson-plan .exercise-sudoku__key td { width: 0.45cm; height: 0.45cm; font-size: 8.5pt; font-weight: 500; }
.lesson-plan .exercise-sudoku__rule,
.lesson-plan .exercise-bingo__rule,
.lesson-plan .exercise-maze__rule,
.lesson-plan .exercise-domino__rule,
.lesson-plan .exercise-board__rule,
.lesson-plan .exercise-tictactoe__rule,
.lesson-plan .exercise-fraction__rule,
.lesson-plan .exercise-place__rule,
.lesson-plan .exercise-times__rule,
.lesson-plan .exercise-chart__rule,
.lesson-plan .exercise-timeline__rule,
.lesson-plan .exercise-cutout__rule,
.lesson-plan .exercise-colorcode__rule,
.lesson-plan .exercise-symmetry__rule,
.lesson-plan .exercise-errorhunt__rule,
.lesson-plan .exercise-roulette__rule,
.lesson-plan .exercise-matchcards__rule,
.lesson-plan .exercise-mathtrail__rule,
.lesson-plan .exercise-cluesearch__rule,
.lesson-plan .exercise-cartesian__rule,
.lesson-plan .exercise-venn__rule,
.lesson-plan .exercise-conceptmap__rule,
.lesson-plan .exercise-mathfix__rule,
.lesson-plan .exercise-rubric__rule,
.lesson-plan .exercise-exitticket__rule,
.lesson-plan .exercise-argumentmap__rule,
.lesson-plan .exercise-rolecards__rule,
.lesson-plan .exercise-codequest__rule,
.lesson-plan .exercise-crypto__rule {
  margin: 0.15em 0 0;
  font-size: 8.5pt;
  color: oklch(45% 0.02 70);
}

/* exercise-bingo — cut-out cards on dashed borders, two per row. */
.lesson-plan .exercise-bingo__cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.7em;
  margin-top: 0.5em;
}
.lesson-plan .exercise-bingo__card {
  border: 1pt dashed oklch(55% 0.02 70);
  padding: 0.4em;
  text-align: center;
  break-inside: avoid;
}
.lesson-plan .exercise-bingo__label {
  display: block;
  margin-bottom: 0.25em;
  font-size: 7.5pt;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: oklch(45% 0.02 70);
}
.lesson-plan .exercise-bingo__grid { border-collapse: collapse; width: 100%; }
.lesson-plan .exercise-bingo__grid td {
  border: 0.5pt solid oklch(70% 0.02 70);
  height: 1cm;
  text-align: center;
  font-size: 9.5pt;
  font-weight: 600;
  padding: 0.1em 0.2em;
}

/* Every block that draws a GRID is a boxed table, not prose: the global
   `.lesson-plan table tr:last-child td { border-bottom: none }` rule is right
   for a comparison of paragraphs and wrong here, and it left the word search,
   the comparison table and every other grid hanging open at the foot. One
   rule for the class, so a block added later inherits the closed border. */
.lesson-plan .exercise-grid tr:last-child td,
.lesson-plan .exercise-bingo__grid tr:last-child td,
.lesson-plan .exercise-crypto__legend tr:last-child td,
.lesson-plan .exercise-chart__data tr:last-child td,
.lesson-plan .exercise-place__table tr:last-child td,
.lesson-plan .exercise-place__table tr:last-child th,
.lesson-plan .exercise-record__table tr:last-child td,
.lesson-plan .exercise-record__table tr:last-child th,
.lesson-plan .exercise-compare__table tr:last-child td,
.lesson-plan .exercise-compare__table tr:last-child th {
  border-bottom: 0.5pt solid oklch(70% 0.02 70);
}

/* exercise-essay — the lined page an essay is written on. */
.lesson-plan .exercise-essay__sheet { margin-top: 0.5em; }
.lesson-plan .exercise-essay__line {
  display: flex;
  align-items: flex-end;
  gap: 0.3em;
  height: 0.95cm;
  break-inside: avoid;
}
.lesson-plan .exercise-essay__num {
  width: 0.7cm;
  text-align: right;
  font-size: 7.5pt;
  color: oklch(55% 0.02 70);
  padding-bottom: 0.08cm;
}
.lesson-plan .exercise-essay__rule {
  flex: 1;
  border-bottom: 0.6pt solid oklch(72% 0.02 70);
}

/* exercise-fraction — figures divided into equal parts, painted or blank. */
.lesson-plan .exercise-fraction { break-inside: avoid; }
/* Bottom-aligned: a wide ten-part bar is twice the height of a four-part one,
   and top alignment left each "Pinte 3/4" at its own height down the row. The
   captions are the line the eye follows, so they are what must line up. */
.lesson-plan .exercise-fraction__items {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.8em 1.4em;
  margin-top: 0.5em;
}
.lesson-plan .exercise-fraction__item {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  text-align: center;
  break-inside: avoid;
}
.lesson-plan .exercise-fraction__label { display: block; font-size: 9pt; font-weight: 700; margin-bottom: 0.15em; }
.lesson-plan .exercise-fraction__svg { width: 2.6cm; height: auto; display: block; }
/* A bar in many parts prints wider, so each part stays paintable. */
.lesson-plan .exercise-fraction__svg--wide { width: 5.2cm; }
.lesson-plan .exercise-fraction__caption { display: block; font-size: 8.5pt; margin-top: 0.25em; }
.lesson-plan .exercise-fraction__write {
  display: inline-block;
  min-width: 1.6cm;
  border-bottom: 0.8pt solid var(--color-ink);
}

/* exercise-place — the place-value chart: number on the left, one empty cell
   per place. */
.lesson-plan .exercise-place__table {
  border-collapse: collapse;
  margin: 0.4em 0;
  width: auto;
}
.lesson-plan .exercise-place__table th,
.lesson-plan .exercise-place__table td {
  border: 0.5pt solid oklch(70% 0.02 70);
  padding: 0.3em 0.7em;
  font-size: 9.5pt;
  text-align: center;
  background: none;
  text-transform: none;
  letter-spacing: normal;
  min-width: 1.8cm;
  height: 0.9cm;
}

/* exercise-times — one column per table, gaps to fill. */
.lesson-plan .exercise-times__columns { display: flex; flex-wrap: wrap; gap: 0.6em 1.6em; margin-top: 0.4em; }
.lesson-plan .exercise-times__column { break-inside: avoid; }
.lesson-plan .exercise-times__head { display: block; font-size: 8.5pt; font-weight: 700; margin-bottom: 0.2em; }
.lesson-plan .exercise-times__column ul { list-style: none; margin: 0; padding: 0; }
.lesson-plan .exercise-times__column li { font-size: 10pt; margin-bottom: 0.28em; }
.lesson-plan .exercise-times__gap {
  display: inline-block;
  min-width: 1.2cm;
  border-bottom: 0.8pt solid var(--color-ink);
}

/* exercise-record — an empty log to fill in while observing. */
.lesson-plan .exercise-record__table { border-collapse: collapse; width: 100%; margin: 0.4em 0; }
.lesson-plan .exercise-record__table th,
.lesson-plan .exercise-record__table td {
  border: 0.5pt solid oklch(70% 0.02 70);
  padding: 0.3em 0.5em;
  font-size: 9.5pt;
  text-align: left;
  background: none;
  text-transform: none;
  letter-spacing: normal;
  height: 1cm;
}

/* exercise-chart — the bar chart: data table (draw mode) plus the plotted
   grid. The SVG holds a constant printed width like the maze. */
.lesson-plan .exercise-chart { break-inside: avoid; }
.lesson-plan .exercise-chart__data {
  width: auto;
  margin: 0.4em 0;
  border-collapse: collapse;
}
.lesson-plan .exercise-chart__data th,
.lesson-plan .exercise-chart__data td {
  border: 0.5pt solid oklch(70% 0.02 70);
  padding: 0.2em 0.7em;
  font-size: 9.5pt;
  text-align: left;
  background: none;
  text-transform: none;
  letter-spacing: normal;
}
.lesson-plan .exercise-chart__data th { font-weight: 700; }
.lesson-plan .exercise-chart__svg { width: 12cm; max-width: 100%; height: auto; display: block; margin: 0.3em auto; }
.lesson-plan .exercise-chart__questions { margin: 0.3em 0 0; padding-left: 1.2em; }
.lesson-plan .exercise-chart__questions li { font-size: 9.5pt; margin-bottom: 0.2em; }

/* exercise-timeline — bank of events on top, dated slots to write into below,
   sitting on a single horizontal rule. */
.lesson-plan .exercise-timeline { break-inside: avoid; }
.lesson-plan .exercise-timeline__bank {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35em 0.5em;
  padding: 0.5em;
  border: 1pt dashed oklch(60% 0.02 70);
  margin: 0.4em 0 0.8em;
}
.lesson-plan .exercise-timeline__bank span {
  font-size: 9pt;
  font-weight: 600;
  padding: 0.15em 0.45em;
  border: 0.5pt solid oklch(75% 0.02 70);
  border-radius: 2pt;
}
.lesson-plan .exercise-timeline__line {
  display: flex;
  align-items: flex-start;
  gap: 0.3em;
  border-top: 1.2pt solid oklch(45% 0.02 70);
  padding-top: 0.1em;
  margin-top: 1.1em;
}
.lesson-plan .exercise-timeline__slot { flex: 1; text-align: center; position: relative; }
.lesson-plan .exercise-timeline__dot {
  display: block;
  width: 0.22cm;
  height: 0.22cm;
  margin: -0.22cm auto 0.35em;
  border-radius: 50%;
  background: oklch(45% 0.02 70);
}
.lesson-plan .exercise-timeline__date { display: block; font-size: 8.5pt; font-weight: 700; margin-bottom: 0.1em; }
.lesson-plan .exercise-timeline__write {
  display: block;
  height: 1.6cm;
  border: 0.5pt solid oklch(78% 0.02 70);
  border-radius: 2pt;
}

/* exercise-tictactoe — nine question squares; the heavy inner rules read as a
   tic-tac-toe grid rather than a table. */
.lesson-plan .exercise-tictactoe { break-inside: avoid; }
.lesson-plan .exercise-tictactoe__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin: 0.5em auto 0;
  max-width: 15cm;
  border: 1.4pt solid oklch(40% 0.02 70);
}
.lesson-plan .exercise-tictactoe__square {
  position: relative;
  min-height: 2.6cm;
  border: 0.8pt solid oklch(60% 0.02 70);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.7em 0.4em 0.4em;
  text-align: center;
  break-inside: avoid;
}
.lesson-plan .exercise-tictactoe__num {
  position: absolute;
  top: 0.15em;
  left: 0.3em;
  font-size: 7pt;
  font-weight: 700;
  color: oklch(50% 0.02 70);
}
.lesson-plan .exercise-tictactoe__q { font-size: 9pt; line-height: 1.25; }

/* exercise-board — the trail: a snaking grid of squares plus the question
   list. Squares are square-ish so a bottle cap fits as a game piece. */
.lesson-plan .exercise-board { break-inside: avoid; }
.lesson-plan .exercise-board__grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.15em;
  margin: 0.5em 0;
}
.lesson-plan .exercise-board__square {
  position: relative;
  min-height: 1.7cm;
  border: 0.8pt solid oklch(55% 0.02 70);
  border-radius: 2pt;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.55em 0.2em 0.2em;
  text-align: center;
  break-inside: avoid;
}
.lesson-plan .exercise-board__num {
  position: absolute;
  top: 0.12em;
  left: 0.25em;
  font-size: 6.5pt;
  font-weight: 700;
  color: oklch(50% 0.02 70);
}
.lesson-plan .exercise-board__body { font-size: 8pt; font-weight: 600; line-height: 1.15; }
.lesson-plan .exercise-board__square--question .exercise-board__body { font-size: 16pt; }
.lesson-plan .exercise-board__square--start,
.lesson-plan .exercise-board__square--finish {
  border-width: 1.6pt;
  background: oklch(95% 0.01 70);
}
.lesson-plan .exercise-board__square--start .exercise-board__body,
.lesson-plan .exercise-board__square--finish .exercise-board__body { font-size: 7pt; letter-spacing: 0.04em; }
.lesson-plan .exercise-board__square--special { border-style: dashed; }
/* Padding cell on a short last row: holds the column so the snake lands
   where the numbering says it does. */
.lesson-plan .exercise-board__square--empty { border: none; min-height: 0; }
.lesson-plan .exercise-board__questions {
  margin: 0.4em 0 0;
  padding-left: 1.2em;
  columns: 2;
  column-gap: 1.2em;
}
.lesson-plan .exercise-board__questions li { font-size: 9.5pt; margin-bottom: 0.25em; break-inside: avoid; }

/* exercise-domino — cut-out tiles, two halves split by a solid rule. Dashed
   outer border is the cut line, like the bingo cards. */
.lesson-plan .exercise-domino__tiles {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5em 0.8em;
  margin-top: 0.5em;
}
.lesson-plan .exercise-domino__tile {
  display: flex;
  align-items: stretch;
  border: 1pt dashed oklch(55% 0.02 70);
  min-height: 1.5cm;
  break-inside: avoid;
}
.lesson-plan .exercise-domino__half {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.3em 0.4em;
  text-align: center;
  font-size: 9.5pt;
  line-height: 1.25;
}
/* The spine: the line a player reads across, so it is heavier than the cut. */
.lesson-plan .exercise-domino__half--answer {
  border-right: 1.2pt solid oklch(45% 0.02 70);
  font-weight: 700;
}
.lesson-plan .exercise-domino__half--question { font-weight: 500; }

/* exercise-maze — constant printed width, so a small grid gets fat corridors
   for a small hand and a large one stays inside the text column. */
.lesson-plan .exercise-maze { break-inside: avoid; }
.lesson-plan .exercise-maze__boards {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.6em 1.2em;
  margin-top: 0.4em;
}
.lesson-plan .exercise-maze__board { break-inside: avoid; text-align: center; }
.lesson-plan .exercise-maze__svg { width: 8.6cm; height: auto; display: block; }
.lesson-plan .exercise-maze__boards:has(.exercise-maze__board + .exercise-maze__board) .exercise-maze__svg { width: 7cm; }
.lesson-plan .exercise-maze__label {
  display: block;
  margin-bottom: 0.15em;
  font-size: 7.5pt;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: oklch(45% 0.02 70);
}

/* exercise-crypto — legend table + the coded message as writable boxes. */
.lesson-plan .exercise-crypto { break-inside: avoid; }
.lesson-plan .exercise-crypto__legend {
  width: auto;
  border-collapse: collapse;
  margin: 0.4em auto;
}
.lesson-plan .exercise-crypto__legend td {
  border: 0.5pt solid oklch(70% 0.02 70);
  padding: 0.12em 0.1em;
  text-align: center;
  width: 0.72cm;
}
.lesson-plan .exercise-crypto__letter {
  display: block;
  font-size: 9.5pt;
  font-weight: 700;
}
.lesson-plan .exercise-crypto__num {
  display: block;
  font-size: 7.5pt;
  color: oklch(45% 0.02 70);
}
/* Left-aligned, not centered: a word that wraps has to continue under the
   line it belongs to, or it reads as a separate item. */
.lesson-plan .exercise-crypto__message { margin-top: 0.6em; }
/* A word never splits across lines: the boxes only decode as a group. The gap
   between words has to READ as a gap (a child decoding needs to see where a
   word ends), so it is wider than a box. */
.lesson-plan .exercise-crypto__word {
  display: inline-block;
  white-space: nowrap;
  margin: 0 1.1cm 0.5em 0;
}
.lesson-plan .exercise-crypto__word:last-child { margin-right: 0; }
.lesson-plan .exercise-crypto__label {
  display: inline-block;
  width: 0.8cm;
  font-size: 10pt;
  font-weight: 700;
  vertical-align: top;
  line-height: 0.8cm;
}
.lesson-plan .exercise-crypto__cell {
  display: inline-block;
  width: 0.8cm;
  vertical-align: top;
}
.lesson-plan .exercise-crypto__slot {
  display: block;
  height: 0.8cm;
  border: 0.5pt solid oklch(70% 0.02 70);
  font-size: 12pt;
  font-weight: 600;
  line-height: 0.8cm;
  text-align: center;
}
.lesson-plan .exercise-crypto__cell .exercise-crypto__num { margin-top: 0.1em; }
.lesson-plan .exercise-crypto__plain {
  display: inline-block;
  width: 0.4cm;
  font-size: 12pt;
  font-weight: 600;
  line-height: 0.8cm;
  vertical-align: top;
  text-align: center;
}

/* exercise-trace — calligraphy rows: solid model + dashed outlines on guide
   lines. The SVG spans the text column like the number line does. */
.lesson-plan .exercise-trace__row { width: 100%; height: auto; display: block; margin-top: 0.45em; }

/* exercise-calc — squared solving space, the math notebook's own paper.
   Background grid, no ink cost, prints crisp at any copier setting. */
.lesson-plan .exercise-calc__list { list-style: decimal; padding-left: 1.2em; }
.lesson-plan .exercise-calc__list > li { break-inside: avoid; margin-bottom: 0.9em; }
.lesson-plan .exercise-calc__grid {
  margin-top: 0.45em;
  border: 0.75pt solid oklch(75% 0.015 70);
  /* The classic squared-paper recipe: a 1px line at the start of each tile,
     tiled by background-size. (repeating-linear-gradient with calc() stops
     mis-resolved in headless Chrome and drew stripes instead of squares.) */
  background-image:
    linear-gradient(to right, oklch(85% 0.01 70) 1px, transparent 1px),
    linear-gradient(to bottom, oklch(85% 0.01 70) 1px, transparent 1px);
  background-size: 0.6cm 0.6cm;
}

/* Per-item point value on graded sheets — printed by the renderer from the
   `points` data, never by the model, so item values and the caption's total
   can't disagree. */
.lesson-plan .exercise__points { font-size: 8.5pt; font-weight: 600; color: oklch(45% 0.018 70); white-space: nowrap; }

/* exercise-truefalse — parenthesis to mark V/F */
.lesson-plan .exercise-truefalse__list { line-height: 2; }
.lesson-plan .exercise-truefalse__mark { font-family: var(--font-mono, monospace); margin-right: 0.4em; }

/* exercise-scramble — scrambled letters + an answer line */
.lesson-plan .exercise-scramble__list { line-height: 2.4; }
.lesson-plan .exercise-scramble__letters { font-family: var(--font-mono, monospace); letter-spacing: 0.15em; font-weight: 600; }
.lesson-plan .exercise-scramble__answer {
  display: inline-block;
  min-width: 3.5cm;
  border-bottom: 1px solid var(--color-ink);
  margin-left: 1em;
}

/* exercise-order — a box to write the sequence number before each item */
.lesson-plan .exercise-order__list { list-style: none; margin: 0.4em 0 0; padding: 0; line-height: 2.2; }
.lesson-plan .exercise-order__list li { display: flex; align-items: center; }
.lesson-plan .exercise-order__box {
  width: 1em;
  height: 1em;
  border: 1pt solid var(--color-ink);
  display: inline-block;
  margin-right: 0.7em;
  flex-shrink: 0;
}

/* exercise-armed — vertical "conta armada" sums, monospace and right-aligned,
   with a rule and blank space below for the student to solve */
.lesson-plan .exercise-armed__grid { display: flex; flex-wrap: wrap; gap: 0.6cm 1.5cm; margin-top: 0.6em; }
.lesson-plan .exercise-armed__sum {
  font-family: var(--font-mono, "JetBrains Mono", monospace);
  font-size: 13pt;
  text-align: right;
  min-width: 2.6cm;
  padding-bottom: 1.1cm;
  letter-spacing: 0.12em;
}
.lesson-plan .exercise-armed__a,
.lesson-plan .exercise-armed__b { display: block; }
.lesson-plan .exercise-armed__op { float: left; font-weight: 600; }
.lesson-plan .exercise-armed__rule { display: block; border-top: 1.5pt solid var(--color-ink); margin-top: 3px; }

/* exercise-compare — bordered comparison table (study aid, no answer key).
   Overrides the generic .lesson-plan table styling, esp. the emphasized
   first-body-row lead style, so every row reads at the same weight. */
.lesson-plan .exercise-compare__table { border-collapse: collapse; width: 100%; margin-top: 0.4em; }
.lesson-plan .exercise-compare__table th,
.lesson-plan .exercise-compare__table td {
  border: 0.75pt solid oklch(70% 0.02 70);
  padding: 0.4em 0.6em;
  text-align: left;
  vertical-align: top;
  font-size: 10pt;
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  color: var(--color-ink);
}
.lesson-plan .exercise-compare__table thead th { background: oklch(95% 0.01 70); font-weight: 600; }
.lesson-plan .exercise-compare__table tbody th { background: oklch(97% 0.008 70); font-weight: 600; }
.lesson-plan .exercise-compare__table tbody tr:first-child td { font-size: 10pt; font-weight: 400; color: var(--color-ink); }


/* exercise-cross — interlocking crossword grid + two-column clue list. width:
   auto + box-sizing override the inherited .lesson-plan table 100% width so the
   cells stay square instead of stretching across the page. */
.lesson-plan .exercise-cross__grid { border-collapse: collapse; width: auto; margin: 0.5em 0; }
.lesson-plan .exercise-cross__cell,
.lesson-plan .exercise-cross__block { box-sizing: border-box; width: 0.7cm; min-width: 0.7cm; max-width: 0.7cm; height: 0.7cm; padding: 0; }
.lesson-plan .exercise-cross__cell { position: relative; border: 0.75pt solid var(--color-ink); background: var(--color-surface); }
.lesson-plan .exercise-cross__block { border: 0; background: transparent; }
.lesson-plan .exercise-cross__num {
  position: absolute;
  top: 0;
  left: 1pt;
  font-size: 5.5pt;
  line-height: 1;
  font-family: var(--font-mono, monospace);
  color: oklch(45% 0.018 70);
}
.lesson-plan .exercise-cross__clue-cols { display: flex; gap: 1.6em; margin-top: 0.7em; break-inside: avoid; }
.lesson-plan .exercise-cross__clues { flex: 1; }
.lesson-plan .exercise-cross__clues h4 { font-size: 9.5pt; margin: 0 0 0.3em; text-transform: uppercase; letter-spacing: 0.04em; }
.lesson-plan .exercise-cross__clues ul { list-style: none; margin: 0; padding: 0; }
.lesson-plan .exercise-cross__clues li { padding: 0.12em 0; margin: 0; font-size: 9.5pt; line-height: 1.5; }

/* exercise-icon — a curated line icon marking a section (Dica/Desafio/Observe) */
.lesson-plan .exercise-icon { display: flex; align-items: center; gap: 0.5em; margin: 1.2em 0 0.4em; color: var(--color-terra, #C16850); }
.lesson-plan .exercise-icon__svg { width: 1.6em; height: 1.6em; flex-shrink: 0; }
.lesson-plan .exercise-icon__caption { font-size: 11pt; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--color-terra, #C16850); margin: 0; }

/* Material worksheet chrome — Nome/Turma/Data header, title, answer key.
   The look is "ficha de escola bem diagramada": small-caps gray labels,
   dotted fill-in lines, one hairline rule, a terracotta eyebrow naming the
   material type, and the sheet's own title in the Newsreader serif. Every
   tint here survives a B&W photocopy — no fills, no light grays under 55%. */
.worksheet-header { display: flex; justify-content: space-between; align-items: flex-end; gap: var(--space-4); border-bottom: 1pt solid var(--color-ink); padding-bottom: 12px; }
/* The fields win the space they need and the brand gives it up: a long
   subject + série ("Linguagens e Culturas · 2o ano do Ensino Médio") grew the
   right column until "Data:" and its blank fell to a line of their own, hanging
   under the rule. The fill-in row is one line by definition. */
.worksheet-header__fields { flex: 1 1 auto; min-width: 0; font-size: 10.5pt; line-height: 2.35; }
.worksheet-header__fields p { margin: 0; white-space: nowrap; display: flex; align-items: baseline; gap: 0.5em; }
.worksheet-header__fields strong { font-size: 7.5pt; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: oklch(45% 0.018 70); }
/* Dotted, not solid: the fill-in line reads as "write here" without the ink
   weight of a rule — and the student's pen sits on the dots, like a school
   agenda. flex: 1 lets Nome take the row; Turma/Data split the second one. */
.worksheet-header__line { display: inline-block; flex: 1 1 auto; min-width: 3.4cm; border-bottom: 1.2px dotted oklch(50% 0.02 70); height: 1.05em; }
/* Turma and Data split the second row evenly, so both rows close on the same
   right edge instead of Data's dots dying mid-page. */
.worksheet-header__line--sm { min-width: 2.6cm; }
.worksheet-header__score { display: inline-block; min-width: 2.2cm; height: 1.2em; border: 1pt solid var(--color-ink); vertical-align: middle; }
/* The hand mark alone, left of the fields — sized to the two fill-in rows.
   overflow: visible because the finger strokes bleed past the symbol box. */
.worksheet-header__mark { flex: 0 0 auto; align-self: center; width: 38px; height: auto; overflow: visible; }
/* The teacher's printed name — its own quiet row, smaller than the fill-in
   fields the student writes on. */
.worksheet-header__teacher { font-size: 8.5pt; color: oklch(38% 0.02 70); }
/* The identity header (teacher-facing docs) is prose, not a fill-in row: a
   turma named after its whole project ran into the margin, because nowrap has
   nothing to give. It wraps, keeps its natural case, and stops shouting. */
.worksheet-header__fields--identity { line-height: 1.5; }
.worksheet-header__fields--identity p { white-space: normal; display: block; }
.worksheet-header__fields--identity strong { font-size: 10.5pt; letter-spacing: 0; text-transform: none; color: var(--color-ink); font-weight: 500; }
/* The type label is an eyebrow, not a second title: the sheet's real title is
   the content's own h1 right under it. */
.worksheet-title { text-align: left; font-size: 8.5pt; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase; color: var(--color-terra, #C16850); margin: 16px 0 4px; }
.worksheet-body h1 { font-family: var(--font-serif); font-weight: 600; font-size: 21pt; line-height: 1.12; letter-spacing: -0.01em; text-wrap: balance; margin: 0 0 10px; }
/* The worksheet reuses .lesson-plan content styling but is not a numbered
   lesson plan — drop the section-counter badge on its headings, and give the
   arc headings (Para começar, Exercícios, Desafio) a trailing hairline that
   carries the eye across the page without a heavy band. */
.worksheet-body h2::before { content: none; }
.worksheet-body h2 { font-family: var(--font-sans); font-size: 11.5pt; font-weight: 700; letter-spacing: 0.01em; display: flex; align-items: center; gap: 0.6em; margin: 1.7em 0 0.8em; }
.worksheet-body h2::after { content: ""; flex: 1; border-top: 0.6pt solid oklch(78% 0.015 70); }
.worksheet-footer { margin-top: 32px; border-top: 1px solid oklch(85% 0.01 70); padding-top: 6px; font-size: 8pt; color: oklch(55% 0.015 70); text-align: center; }

/* Self-assessment strip — three checkboxes the student ticks when handing
   the sheet back; a formative signal, not a grade. */
.worksheet-self-check { display: flex; align-items: center; justify-content: center; gap: 1.5em; margin-top: 26px; padding: 8px 12px; border: 0.6pt solid oklch(62% 0.02 70); border-radius: 6pt; break-inside: avoid; font-size: 10pt; }
.worksheet-self-check__title { font-weight: 700; }
.worksheet-self-check__option { display: inline-flex; align-items: center; gap: 0.45em; }
.worksheet-self-check__box { display: inline-block; width: 1em; height: 1em; border: 1pt solid var(--color-ink); border-radius: 2pt; }

/* Drawing sheet — a notebook cover or a page to colour, one product with two
   titles. The drawing IS the page, so the figure takes the height the exercises
   would have used and the title is set to be read across a desk rather than to
   head a worksheet. No border on the art: a frame around a coloring outline
   reads as a box to stay inside. */
/* The title is free text she dictated, and .worksheet--bastao uppercases it on
   the 1o-2o sheets this type is mostly for, so it has to be budgeted at two or
   three lines, not one. Own line-height because .worksheet--scale-lg lands on
   the same element at that stage. */
.worksheet-body.worksheet--artwork h1 {
  font-size: 26pt;
  line-height: 1.1;
  text-align: center;
  text-wrap: balance;
  margin: 8px 0 18px;
}
.worksheet-body.worksheet--artwork figure.content-image { margin: 0 auto; }
.worksheet-body.worksheet--artwork figure.content-image img {
  /* Two ceilings and no forced size, so the drawing keeps its proportions.
     `width: 100%` alongside max-height was squashing it: the box became the
     full column by 530pt whatever the picture's shape, and a tall drawing
     printed flattened. The generated art is 1024px and up, so max-width alone
     already fills the column.

     The height ceiling is measured, not chosen: the A4 box is 717.4pt after
     the 2cm/2.4cm margins, and the header plus a one-line title takes 108pt.
     540pt leaves room for the title to run to three lines (~29pt each) and
     still clear the box. At 590 with a one-line title the sheet already
     printed a second, blank page.

     `block` for the same reason: as an inline-block the image sits on a text
     baseline, and the descender space under it added 30pt of nothing that
     counted against the page. */
  display: block;
  margin: 0 auto;
  max-width: 100%;
  max-height: 540pt;
  width: auto;
  height: auto;
  border: none;
  border-radius: 0;
}

/* Adapted (accessibility) variant — larger type, looser spacing, more room to
   write. Same blocks as the standard sheet, re-rendered for readability. */
.worksheet-adapted-note { text-align: left; font-size: 8.5pt; letter-spacing: 0.1em; text-transform: uppercase; color: oklch(45% 0.018 70); margin: -4px 0 14px; }
.worksheet--adapted { font-size: 13pt; line-height: 1.9; }
.worksheet--adapted .exercise { margin: 1.8em 0; }
.worksheet--adapted .exercise__title { font-size: 13pt; }
.worksheet--adapted .exercise-choice__options li,
.worksheet--adapted .exercise-truefalse__list li,
.worksheet--adapted .exercise-fill__list li { padding: 0.4em 0; }

/* Young writers (Educação Infantil + 1º-2º ano) — a 6-year-old's handwriting
   is twice the x-height of the default rule; two tight lines fit half a
   sentence. Taller ruled lines and wider fill gaps, same blocks. */
.worksheet--young .exercise-open__lines span { height: 2.3em; }
.worksheet--young .exercise-fill__gap,
.worksheet--young .exercise-bank__gap { min-width: 4.5cm; }
.worksheet--young .exercise-fill__gap--tight,
.worksheet--young .exercise-bank__gap--tight { min-width: 1.6cm; }
.worksheet--young .exercise-clock__face { width: 4cm; height: 4cm; }

/* Letra bastão — the whole student sheet in capitals for 1º-2º ano, because
   that is the letterform a child decodes while she is learning to read. On the
   CONTAINER, so it covers the prose, the block titles and the items alike and
   cannot depend on the writer remembering; the answer key sits outside
   .worksheet-body and keeps its normal case for the teacher. */
.worksheet--bastao { text-transform: uppercase; }

/* Except where the letterform IS the content. Tracing practice prints the shape
   the child is learning to draw, so capitalising it replaces the exercise with a
   different one: "casa" came out CASACASACASACASA on a sheet whose whole task
   was that word's lowercase form. */
.worksheet--bastao .exercise-trace { text-transform: none; }

/* The emoji IS the figure on a young sheet: what the child counts, matches or
   names. At body size it photocopies to a grey smudge — measured in greyscale,
   three bees at 14pt are three indistinguishable dots, and the same three at
   2.2em stay countable. Only on the young sheet: further up the grades an emoji
   is punctuation, not the question. */
.worksheet--young .pictogram {
  font-size: 2.2em;
  line-height: 1;
  /* `middle`, never a negative offset: the fill gap and the bank gap align to
     the BOTTOM of the line box, so a pictogram hanging below the baseline drags
     the ruled line the child writes on down with it, off the sentence. */
  vertical-align: middle;
  letter-spacing: 0.06em;
}

/* The channel the child draws across, sized for her hand. 4.5cm is a long
   straight line to hold at six years old, and the two columns had drifted to
   opposite edges of the page around it. */
.worksheet--young .exercise-link__grid { column-gap: 2cm; max-width: 12cm; }

.lexxy-content .content-block-intro--main {
  break-before: auto;
  page-break-before: auto;
}

/* ── BNCC skills — deterministic code + official description. Front-matter
   card (outside .lesson-plan), so the teacher reads what each code means. */
.bncc-skills {
  margin: var(--space-6) 0;
  padding: var(--space-3) var(--space-4);
  border: var(--hairline) solid var(--color-border);
  border-left: 3pt solid var(--color-accent);
  border-radius: var(--radius-medium);
  break-inside: avoid;
  page-break-inside: avoid;
}
.bncc-skills__title {
  /* Front-matter card, not a lesson section — keep it out of the PDF
     running-header (the global `h2 { string-set: running-section }`). */
  string-set: none;
  font-size: var(--text-extra-small);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: var(--letter-widest);
  color: var(--color-accent-ink);
  margin: 0 0 var(--space-3);
}
.bncc-skills__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: var(--space-2-5);
}
.bncc-skills__item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--space-3);
  align-items: baseline;
  line-height: var(--line-readable);
}
.bncc-skills__code {
  font-family: var(--font-mono);
  font-size: var(--text-small);
  font-weight: 700;
  color: var(--color-accent-ink);
  white-space: nowrap;
}
.bncc-skills__desc {
  font-size: var(--text-medium);
  color: var(--color-ink-muted);
}

/* ── Worksheet numbering. The LLM writes each exercise instruction as its own
   single-item list ("1) Marque…", "1) Complete…"), so both native <ol> numbering
   and the pdf.css per-<ol> counter restart at 1 for every exercise and the whole
   sheet printed "1.". A worksheet-scoped counter that increments across list
   boundaries (never reset per <ol>) runs them 1,2,3…, independent of the digit
   the model actually typed. A block's sub-questions stay lettered so the two
   numbers don't collide. */
.worksheet-body { counter-reset: worksheet-item; }
.worksheet-body > ol {
  list-style: none;
  padding-left: var(--space-6);
  margin: var(--space-3) 0;
}
.worksheet-body > ol > li {
  counter-increment: worksheet-item;
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  margin-bottom: var(--space-2);
}
.worksheet-body > ol > li::before {
  content: counter(worksheet-item) ".";
  font-weight: 700;
  color: var(--color-ink-muted);
  min-width: 18px;
  flex-shrink: 0;
}

.worksheet-body .exercise ol {
  list-style: lower-alpha;
  padding-left: var(--space-5);
}
.worksheet-body .exercise ol > li {
  display: list-item;
  list-style-position: outside;
  border-left: none;
  margin-left: 0;
  padding: var(--space-1) 0;
}
.worksheet-body .exercise ol > li::before { content: none; }
/* Choice options are already labelled A) B) C) in text — drop the inherited
   `·` marker from `.lesson-plan ol > li > ul > li::before`. */
.worksheet-body .exercise-choice__options > li::before { content: none; }

/* Blocks the student CUTS UP get a sheet to themselves (Material::BlockRegistry
   CUT_KINDS wraps them in this class at swap time). Scissors do not just mark a
   page, they remove it and whatever is printed on its back, so a written
   question sharing the sheet is lost the moment she uses the block as intended.
   The break is on the WRAPPER and the class comes from the registry, so adding
   a cut block is a `cut: true` flag and nothing here. Painting is not in the
   set on purpose: a crayon fills the page, it does not take it away. */
.lesson-plan .exercise-cut-sheet {
  break-before: page;
  page-break-before: always;
  break-inside: avoid;
  page-break-inside: avoid;
}

/* And a break AFTER, or "a sheet of its own" is only half true: break-before
   pushes the block onto a fresh page but lets the next question share it, which
   is the question the scissors take.
   Never on the LAST one, though: the prompt sends cut blocks to the end of the
   sheet, so the final block closing <main> with a forced break pushed the
   self-check strip — the four words the child ticks — onto a page of its own. */
.lesson-plan .exercise-cut-sheet:not(:last-child) {
  break-after: page;
  page-break-after: always;
  break-inside: avoid;
  page-break-inside: avoid;
}

/* exercise-cutout — the glue boxes on top, the cut strip below. The dashed
   border is the cut line (same language as the bingo cards and the domino);
   the target box is solid, because it stays on the sheet. */
.lesson-plan .exercise-cutout { break-inside: avoid; }
.lesson-plan .exercise-cutout__targets {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(3.4cm, 1fr));
  gap: 0.5em;
  margin-top: 0.5em;
}
.lesson-plan .exercise-cutout__target { display: flex; flex-direction: column; break-inside: avoid; }
.lesson-plan .exercise-cutout__target-label {
  font-size: 9.5pt;
  font-weight: 700;
  text-align: center;
  padding: 0.2em 0.3em;
  border: 1pt solid oklch(45% 0.02 70);
  border-bottom: none;
}
/* Tall enough that a cut piece actually fits inside it. */
.lesson-plan .exercise-cutout__target-area {
  border: 1pt solid oklch(45% 0.02 70);
  min-height: 2.6cm;
}
.lesson-plan .exercise-cutout__cutline {
  margin: 0.7em 0 0.35em;
  font-size: 8.5pt;
  letter-spacing: 0.04em;
  border-top: 1pt dashed oklch(55% 0.02 70);
  padding-top: 0.25em;
}
.lesson-plan .exercise-cutout__pieces {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4em 0.5em;
}
.lesson-plan .exercise-cutout__piece {
  border: 1pt dashed oklch(55% 0.02 70);
  padding: 0.35em 0.6em;
  font-size: 9.5pt;
  min-width: 2.2cm;
  text-align: center;
  break-inside: avoid;
}

/* exercise-colorcode — legend chips, then a grid whose cells keep white space
   BELOW the question: that blank is where the crayon goes. */
.lesson-plan .exercise-colorcode { break-inside: avoid; }
.lesson-plan .exercise-colorcode__legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3em 0.9em;
  margin: 0.4em 0 0.55em;
  font-size: 9pt;
}
.lesson-plan .exercise-colorcode__key { display: inline-flex; align-items: center; gap: 0.3em; }
/* An empty swatch, not a coloured one: the sheet prints in black and white and
   the colour is the word next to it. */
.lesson-plan .exercise-colorcode__swatch {
  width: 0.5cm;
  height: 0.5cm;
  border: 1pt solid oklch(45% 0.02 70);
  display: inline-block;
}
.lesson-plan .exercise-colorcode__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(2.4cm, 1fr));
  gap: 0.3em;
}
.lesson-plan .exercise-colorcode__cell {
  border: 1pt solid oklch(45% 0.02 70);
  min-height: 1.7cm;
  padding: 0.25em;
  font-size: 9.5pt;
  text-align: center;
  break-inside: avoid;
}

/* exercise-symmetry — grid figures side by side, printed wide enough that one
   square takes a pencil stroke. */
.lesson-plan .exercise-symmetry { break-inside: avoid; }
.lesson-plan .exercise-symmetry__items {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8em 1.2em;
  margin-top: 0.4em;
}
.lesson-plan .exercise-symmetry__svg { width: 7cm; height: auto; break-inside: avoid; }

/* exercise-errorhunt — numbered passage, then one ruled slot per error. */
.lesson-plan .exercise-errorhunt { break-inside: avoid; }
.lesson-plan .exercise-errorhunt__text {
  border: 1pt solid oklch(45% 0.02 70);
  padding: 0.5em 0.6em 0.5em 2em;
  margin: 0.4em 0 0.6em;
  font-size: 10pt;
  line-height: 1.7;
}
.lesson-plan .exercise-errorhunt__line { break-inside: avoid; }
/* Lists whose GABARITO numbers them. The sheet-wide lower-alpha would print
   a., b., c. under a key that says 1., 2., 3. — the sheet and the answer key
   disagreeing about the same item, which is the one thing a gabarito may never
   do. The error hunt speaks line numbers ("2. maça devia ser maçãs"); the Venn
   asks her in so many words to write the NÚMERO inside a region; the
   caça-definições numbers its clue→word pairs. */
.worksheet-body .exercise .exercise-errorhunt__text,
.worksheet-body .exercise .exercise-errorhunt__answers,
.worksheet-body .exercise .exercise-venn__bank,
.worksheet-body .exercise .exercise-cluesearch__clues,
/* A procedure is walked in order, so it is numbered — a., b., c. reads as a
   menu of options rather than the sequence the bench actually follows. */
.worksheet-body .exercise .exercise-labreport__steps { list-style: decimal; }

/* Lists that print their OWN ordinal. Inheriting the sheet's marker gave them
   two ("a. 1Planeta mais próximo do Sol"), and `ol > li { display: list-item }`
   also outranked the row's flex, which is what collapsed the gap between the
   number and the question and shrank the answer line to a stub. Declared at
   the worksheet's depth so they win, not at the block's, where they lost. */
.worksheet-body .exercise .exercise-mathfix__steps,
.worksheet-body .exercise .exercise-codequest__stages { list-style: none; padding-left: 0; }

.worksheet-body .exercise .exercise-mathfix__step,
.worksheet-body .exercise .exercise-codequest__stage {
  display: flex;
  align-items: baseline;
  gap: 0.5em;
}

/* The frame's inner padding, at the worksheet's depth for the same reason as
   its neighbours above: `.worksheet-body .exercise ol > li` sets
   `padding: var(--space-1) 0` and outranks the block's own rule, so the
   equations sat flush on the left border with nothing between the ink and
   the line. Vertical stays the worksheet's; only the sides are restored. */
.worksheet-body .exercise .exercise-mathfix__step {
  padding-left: 0.6em;
  padding-right: 0.6em;
}
.lesson-plan .exercise-errorhunt__answers { padding-left: 1.6em; margin: 0; }
/* The writing slot: a ruled line the student writes the correction on. */
.lesson-plan .exercise-errorhunt__slot {
  border-bottom: 0.6pt solid oklch(45% 0.02 70);
  height: 1.05em;
  margin-bottom: 0.45em;
  break-inside: avoid;
}

/* exercise-sources — the numbered dossier. Each frame is a source the items
   below cite by number, so the label has to read at a glance. */
.lesson-plan .exercise-sources__set { display: flex; flex-direction: column; gap: 0.6em; margin-top: 0.4em; }
.lesson-plan .exercise-sources__source {
  border: 1pt solid oklch(45% 0.02 70);
  border-left: 3pt solid oklch(45% 0.02 70);
  padding: 0.45em 0.65em;
  margin: 0;
  break-inside: avoid;
}
.lesson-plan .exercise-sources__label {
  font-size: 9pt;
  font-weight: 700;
  letter-spacing: 0.03em;
  margin-bottom: 0.25em;
}
.lesson-plan .exercise-sources__body p { font-size: 9.5pt; line-height: 1.45; margin: 0 0 0.3em; }
.lesson-plan .exercise-sources__credit { font-size: 8.5pt; font-style: italic; text-align: right; }

/* exercise-counting — rows of outline shapes to count, a write box per row.
   Outlines photocopy clean and double as painting material. */
.lesson-plan .exercise-counting { break-inside: avoid; }
.lesson-plan .exercise-counting__row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.28em;
  margin: 0.55em 0;
  break-inside: avoid;
}
.lesson-plan .exercise-counting__label { font-weight: 700; margin-right: 0.3em; }
.lesson-plan .exercise-counting__shapes { display: inline-flex; flex-wrap: wrap; gap: 0.28em; align-items: center; }
.lesson-plan .exercise-counting__shape { width: 0.95cm; height: 0.95cm; }
/* The box the number lands in — square, generous, at the row's end. */
.lesson-plan .exercise-counting__answer {
  display: inline-block;
  width: 1.5cm;
  height: 1.2cm;
  border: 1.2pt solid var(--color-ink);
  margin-left: 0.7em;
}

/* exercise-circlechoice — options side by side for the crayon to circle.
   Borderless on purpose: a printed border is where the circle wants to go. */
.lesson-plan .exercise-circlechoice { break-inside: avoid; }
.lesson-plan .exercise-circlechoice__row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.4em 2.2em;
  margin: 0.75em 0;
  break-inside: avoid;
}
.lesson-plan .exercise-circlechoice__label { font-weight: 700; }
.lesson-plan .exercise-circlechoice__option { font-size: 12.5pt; padding: 0.3em 0.2em; }

/* exercise-drawframe — the drawing area, then ruled lines for the caption. */
.lesson-plan .exercise-drawframe { break-inside: avoid; }
.lesson-plan .exercise-drawframe__area {
  height: 6cm;
  border: 1pt solid var(--color-ink);
  border-radius: 3pt;
  margin-top: 0.4em;
}
.lesson-plan .exercise-drawframe__lines { display: flex; flex-direction: column; margin-top: 0.5em; }
.lesson-plan .exercise-drawframe__lines span {
  border-bottom: 0.6pt solid oklch(45% 0.02 70);
  height: 1.6em;
}

/* exercise-syllables — the whole word, then one box per syllable to rewrite
   it split. The box count is the scaffold: how many pieces to listen for. */
.lesson-plan .exercise-syllables { break-inside: avoid; }
.lesson-plan .exercise-syllables__row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5em;
  margin: 0.6em 0;
  break-inside: avoid;
}
.lesson-plan .exercise-syllables__label { font-weight: 700; }
.lesson-plan .exercise-syllables__word { font-size: 12.5pt; font-weight: 600; min-width: 3.2cm; }
.lesson-plan .exercise-syllables__boxes { display: inline-flex; gap: 0.3em; }
.lesson-plan .exercise-syllables__box {
  display: inline-block;
  width: 1.6cm;
  height: 1cm;
  border: 1pt solid var(--color-ink);
}

/* Per-band type scale (the owner's grade docs set sizes per série; her call
   2026-08-11 approximates them in three bands). The wrapper font-size carries
   every inheriting text (statements, options, fill sentences); graphical
   blocks pin their own geometry and are left alone. Declared after
   .worksheet--adapted so an adapted early-grades sheet takes the larger of
   the two. */
.worksheet--scale-lg { font-size: 14pt; line-height: 1.85; }
.worksheet--scale-lg .exercise__title { font-size: 15.5pt; }
.worksheet--scale-lg h2 { font-size: 14pt; }
.worksheet--scale-md { font-size: 11.5pt; line-height: 1.7; }
.worksheet--scale-md .exercise__title { font-size: 12.5pt; }

/* V/F fix mode — the ruled line a false statement is rewritten on. */
.lesson-plan .exercise-truefalse__fix {
  display: block;
  border-bottom: 0.6pt solid oklch(45% 0.02 70);
  height: 1.3em;
  margin: 0.3em 0 0.2em 1.8em;
}

/* exercise-foldable — one sheet, a cover and up to four flaps. The dashed line
   is where she folds, so the answer sits UNDER the question once folded; on a
   flat page it just reads as the next line, which is the honest fallback when
   she does not fold it. */
.lesson-plan .exercise-foldable { break-inside: avoid; }

.lesson-plan .exercise-foldable__rule {
  font-size: 0.9em;
  margin: 0 0 0.6em;
}

.lesson-plan .exercise-foldable__sheet {
  border: 1px solid currentColor;
}

.lesson-plan .exercise-foldable__cover {
  border-bottom: 2px solid currentColor;
  padding: 0.9em 0.6em;
  text-align: center;
}

.lesson-plan .exercise-foldable__cover-label {
  font-weight: 700;
  font-size: 1.1em;
}

.lesson-plan .exercise-foldable__panel {
  border-bottom: 1px solid currentColor;
  display: block;
  padding: 0.7em 0.6em;
}

.lesson-plan .exercise-foldable__panel:last-child { border-bottom: 0; }

.lesson-plan .exercise-foldable__question {
  display: block;
  font-weight: 600;
  margin-bottom: 0.5em;
}

/* Letter-spaced dashes rather than a border: the child has to SEE where to
   fold on a photocopy, and a hairline border does not survive one. */
.lesson-plan .exercise-foldable__fold {
  display: block;
  font-size: 0.8em;
  letter-spacing: 0.1em;
  margin-bottom: 0.5em;
  text-align: center;
}

.lesson-plan .exercise-foldable__answer {
  display: block;
  padding-left: 1em;
}

/* exercise-cluesearch — the grid itself is the wordsearch's, declared with it.
   What differs is below it: the definitions, numbered and one per line, because
   a definition is a sentence and the word list's three columns would break it
   mid-phrase. */
.lesson-plan .exercise-cluesearch__clues {
  margin: 0.7em 0 0;
  padding-left: 1.4em;
}

.lesson-plan .exercise-cluesearch__clues li {
  font-size: 9.5pt;
  line-height: 1.3;
  margin-bottom: 0.3em;
  break-inside: avoid;
}

/* exercise-roulette — the wheel and its arrow, side by side on the sheet she
   cuts them off. Printed width is fixed rather than fluid: the sectors have to
   stay writable at photocopy size whatever the container does. */
.lesson-plan .exercise-roulette { break-inside: avoid; }

.lesson-plan .exercise-roulette__pieces {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.2cm;
  margin: 0.6em 0;
}

.lesson-plan .exercise-roulette__wheel {
  width: 10.5cm;
  height: 10.5cm;
  flex: none;
}

/* The wheel is 10.5cm across and its rim sits at 92 of a 100-unit radius, so
   the sector edge is 4.83cm from the pin. Tip to hole is 108 of this arrow's
   130-unit box, and 6.2cm of height puts that span at 5.15cm: the arrow clears
   the rim instead of stopping between two sectors and settling nothing. */
.lesson-plan .exercise-roulette__pointer {
  width: 2.9cm;
  height: 6.2cm;
  flex: none;
}

/* exercise-matchcards — two decks to cut, prompts above and answers below.
   Dashed borders are the cut line, like the memory game and the dominó; the
   tint is what tells the two decks apart once they are loose on the table. */
.lesson-plan .exercise-matchcards { break-inside: avoid; }

.lesson-plan .exercise-matchcards__deck {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4mm;
  margin: 0.6em 0;
}

.lesson-plan .exercise-matchcards__card {
  border: 1pt dashed oklch(55% 0.02 70);
  min-height: 1.5cm;
  padding: 0.35em 0.4em;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 9.5pt;
  line-height: 1.25;
  break-inside: avoid;
  hyphens: auto;
}

/* Two signals, not one. The tint is close to paper white after a black-and-white
   photocopy, and the rule asks the pair to sort the cut cards into two montes
   with no page left to compare against — so the answer deck is also italic,
   which a photocopier cannot flatten. */
.lesson-plan .exercise-matchcards__card--prompt { font-weight: 600; }

.lesson-plan .exercise-matchcards__card--answer {
  background: oklch(95% 0.01 70);
  font-style: italic;
}

/* exercise-mathtrail — the snaking chain of operations. Same square geometry
   as the trilha, because it is read the same way: left to right, then back. */
.lesson-plan .exercise-mathtrail { break-inside: avoid; }

.lesson-plan .exercise-mathtrail__grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.15em;
  margin: 0.5em 0;
}

.lesson-plan .exercise-mathtrail__square {
  position: relative;
  min-height: 1.9cm;
  border: 0.8pt solid oklch(55% 0.02 70);
  border-radius: 2pt;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.25em;
  padding: 0.3em 0.2em;
  text-align: center;
  break-inside: avoid;
}

/* The square's ordinal. The trail snakes, so a reversed row read left to right
   walks it backwards: the number is what makes the order readable, exactly as
   on the trilha. */
.lesson-plan .exercise-mathtrail__num {
  position: absolute;
  top: 0.12em;
  left: 0.25em;
  font-size: 6.5pt;
  font-weight: 700;
  color: oklch(50% 0.02 70);
}

.lesson-plan .exercise-mathtrail__op { font-size: 13pt; font-weight: 700; }

/* Where the running result is written. Ruled on all four sides, because a
   single baseline under a two-digit answer reads as part of the operation. */
.lesson-plan .exercise-mathtrail__box {
  border: 0.6pt solid oklch(60% 0.02 70);
  width: 1.1cm;
  height: 0.62cm;
}

.lesson-plan .exercise-mathtrail__square--start,
.lesson-plan .exercise-mathtrail__square--finish {
  border-width: 1.6pt;
  background: oklch(95% 0.01 70);
}

.lesson-plan .exercise-mathtrail__tag { font-size: 7pt; font-weight: 700; letter-spacing: 0.04em; }
.lesson-plan .exercise-mathtrail__value { font-size: 15pt; font-weight: 700; }
/* Padding cell on a short last row: holds the column so the snake lands where
   the trail says it does. */
.lesson-plan .exercise-mathtrail__square--empty { border: none; min-height: 0; }

/* ---- Wave six: anos finais and Médio ---------------------------------- */

/* A ruled writing gap, shared by the blocks of this wave that ask for a line
   rather than a box. Declared once so a new frame inherits the same rule
   weight instead of inventing its own. */
.lesson-plan .exercise-cartesian__gap,
.lesson-plan .exercise-mathfix__gap,
.lesson-plan .exercise-exitticket__gap,
.lesson-plan .exercise-codequest__gap {
  display: inline-block;
  border-bottom: 0.6pt solid oklch(45% 0.02 70);
  flex: 1;
  min-width: 2.5cm;
  height: 1.1em;
  vertical-align: bottom;
}

/* exercise-cartesian — the plane is a fixed printed width, like the roleta:
   the squares have to stay markable with a pencil whatever the container
   does. */
.lesson-plan .exercise-cartesian { break-inside: avoid; }

.lesson-plan .exercise-cartesian__plane {
  display: block;
  width: 9.5cm;
  height: 9.5cm;
  margin: 0.5em auto;
}

/* Four quadrants draw twice the columns, so the plane is widened to keep the
   printed cell at ~6.5mm and the tick numerals near 7pt — the calibration the
   one-quadrant plane was sized for. The renderer caps the range too; between
   the two, no combination prints a square a pencil cannot land in. */
.lesson-plan .exercise-cartesian__plane--q4 { width: 12cm; height: 12cm; }

.lesson-plan .exercise-cartesian__answers,
.lesson-plan .exercise-cartesian__list {
  list-style: none;
  padding: 0;
  margin: 0.6em 0 0;
  columns: 2;
  column-gap: 1.2em;
}

.lesson-plan .exercise-cartesian__answers li {
  display: flex;
  align-items: baseline;
  gap: 0.4em;
  margin-bottom: 0.5em;
  break-inside: avoid;
}

.lesson-plan .exercise-cartesian__label { font-weight: 700; }
.lesson-plan .exercise-cartesian__list li { font-size: 9.5pt; margin-bottom: 0.25em; }

/* exercise-venn — a numbered bank above, the circles below. The child writes
   the NUMBER inside a region, so the circles need empty middles and the bank
   needs to read as a list of labelled numbers. */
.lesson-plan .exercise-venn { break-inside: avoid; }

.lesson-plan .exercise-venn__bank {
  columns: 3;
  column-gap: 1.2em;
  margin: 0.5em 0 0.6em;
  padding-left: 1.4em;
}

.lesson-plan .exercise-venn__bank li {
  font-size: 9.5pt;
  margin-bottom: 0.2em;
  break-inside: avoid;
}

/* Sized so the set names land near body size: at 11cm the 230-unit viewBox
   printed them at 15pt, twice the bank they label. */
.lesson-plan .exercise-venn__figure {
  display: block;
  width: 9.5cm;
  margin: 0 auto;
}

/* exercise-conceptmap — root on top, branches as columns under it. The blank
   box is the exercise, so it is the same size as a filled one: a smaller hole
   tells the child how short the answer is. */
.lesson-plan .exercise-conceptmap { break-inside: avoid; }

.lesson-plan .exercise-conceptmap__root {
  position: relative;
  border: 1.4pt solid currentColor;
  border-radius: 3pt;
  padding: 0.5em;
  text-align: center;
  font-weight: 700;
  margin: 0.5em auto 0;
  max-width: 60%;
}

/* The stem down from the root to the bus bar. Without the connectors the map
   printed as three columns of boxes, which is a table, not a mapa conceitual. */
.lesson-plan .exercise-conceptmap__root::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -0.5em;
  height: 0.5em;
  border-left: 0.8pt solid oklch(55% 0.02 70);
}

.lesson-plan .exercise-conceptmap__branches {
  display: flex;
  align-items: flex-start;
  gap: 0.5em;
  border-top: 0.8pt solid oklch(55% 0.02 70);
  margin-top: 0.5em;
  padding-top: 0.5em;
}

.lesson-plan .exercise-conceptmap__branch { position: relative; flex: 1; }

.lesson-plan .exercise-conceptmap__branch::before {
  content: "";
  position: absolute;
  left: 50%;
  top: -0.5em;
  height: 0.5em;
  border-left: 0.8pt solid oklch(55% 0.02 70);
}

.lesson-plan .exercise-conceptmap__node,
.lesson-plan .exercise-conceptmap__child {
  border: 0.8pt solid oklch(55% 0.02 70);
  border-radius: 2pt;
  padding: 0.4em 0.35em;
  margin-bottom: 0.4em;
  text-align: center;
  font-size: 9pt;
  line-height: 1.2;
  min-height: 1.15cm;
  display: flex;
  align-items: center;
  justify-content: center;
  hyphens: auto;
}

.lesson-plan .exercise-conceptmap__node { font-weight: 700; background: oklch(95% 0.01 70); }
/* The blank is dashed, so a photocopy still says "write here" and not
   "this box is empty because the map is short". */
.lesson-plan .exercise-conceptmap__node--blank,
.lesson-plan .exercise-conceptmap__child--blank { border-style: dashed; background: none; }

/* The hole's ordinal, so the gabarito can point at it. Faint and small: it
   marks the box, it is not the answer. */
.lesson-plan .exercise-conceptmap__num {
  font-size: 7.5pt;
  font-weight: 700;
  color: oklch(55% 0.02 70);
}

/* exercise-mathfix — the steps are the object of study, so they read as a
   solution someone wrote, with the line numbers in the margin OUTSIDE the
   frame. Inside, they sat hard against the left border and read as part of
   the arithmetic — at a glance "1 3x + 5 = 20" starts with two numbers, and
   the one the student is asked to name is the one that is not part of the
   equation. Out in the margin they label the frame instead of competing with
   it, the way a line number labels a line of verse. */
.lesson-plan .exercise-mathfix { break-inside: avoid; }

.lesson-plan .exercise-mathfix__problem { font-weight: 700; margin: 0.3em 0; }

.lesson-plan .exercise-mathfix__steps {
  list-style: none;
  padding: 0;
  /* The left margin IS the number gutter. `padding-left` cannot do this job:
     the worksheet context zeroes it at a specificity this rule does not
     reach, and padding would keep the numbers inside the border anyway. */
  margin: 0.5em 0 0.5em 1.5em;
  border: 0.8pt solid oklch(55% 0.02 70);
  border-radius: 2pt;
}

.lesson-plan .exercise-mathfix__step {
  /* The containing block for the number sitting outside this row. */
  position: relative;
  display: flex;
  align-items: baseline;
  gap: 0.6em;
  padding: 0.35em 0.6em;
  border-bottom: 0.4pt solid oklch(80% 0.01 70);
}

.lesson-plan .exercise-mathfix__step:last-child { border-bottom: 0; }

/* `right: 100%` puts the number's right edge on the frame's inner left edge,
   and the margin walks it back out past the border. Out of flow, so the
   equations start at the same place on every row whether or not a number is
   beside them — and a step that wraps to a second line keeps its number
   against the first, which is the line being numbered. */
.lesson-plan .exercise-mathfix__num {
  position: absolute;
  right: 100%;
  /* `top` stays auto so the number keeps the row's static position; the top
     margin then nudges it off that line. Measured: the number's baseline
     lands 0.31em (of its own size) above the equation's, because the two
     sizes differ and both line boxes start level. */
  margin: 0.31em 0.5em 0 0;
  /* Relative and not the 8pt it was: `worksheet--scale-lg` takes the body to
     14pt for a student who needs bigger type, and a number pinned to 8pt got
     smaller relative to everything around it on exactly the sheet printed to
     be easier to read. At the 11pt default this is the same 8pt as before. */
  font-size: 0.72em;
  font-weight: 700;
}
.lesson-plan .exercise-mathfix__body { font-family: var(--font-mono, "JetBrains Mono", monospace); }
.lesson-plan .exercise-mathfix__answer { display: flex; align-items: center; gap: 0.4em; margin: 0.5em 0 0; }

.lesson-plan .exercise-mathfix__box {
  display: inline-block;
  border: 0.6pt solid oklch(45% 0.02 70);
  width: 1.1cm;
  height: 0.62cm;
}

/* exercise-rubric — criteria down the rows, levels across. The box comes
   BEFORE the descriptor in each cell, so a photocopy read in a hurry still
   shows where to mark. */
.lesson-plan .exercise-rubric { break-inside: avoid; }

.lesson-plan .exercise-rubric__table {
  width: 100%;
  border-collapse: collapse;
  margin: 0.5em 0;
  font-size: 9pt;
}

.lesson-plan .exercise-rubric__table th,
.lesson-plan .exercise-rubric__table td {
  border: 0.6pt solid oklch(60% 0.02 70);
  padding: 0.35em 0.4em;
  vertical-align: top;
  line-height: 1.2;
}

.lesson-plan .exercise-rubric__table thead th { background: oklch(95% 0.01 70); text-align: center; }
.lesson-plan .exercise-rubric__table tbody th { text-align: left; font-weight: 700; width: 28%; }
.lesson-plan .exercise-rubric__corner { width: 28%; }

.lesson-plan .exercise-rubric__box {
  display: block;
  border: 0.6pt solid oklch(45% 0.02 70);
  width: 0.42cm;
  height: 0.42cm;
  margin: 0 auto 0.25em;
}

.lesson-plan .exercise-rubric__descriptor { display: block; font-size: 8.5pt; }

/* exercise-exitticket — the same strip repeated, with a cut line between. The
   dashes are letter-spaced rather than a border for the foldable's reason: a
   hairline does not survive a photocopy, and this page is only ever
   photocopied. */
.lesson-plan .exercise-exitticket__strips { margin: 0.5em 0; }

.lesson-plan .exercise-exitticket__strip {
  border-bottom: 1pt dashed oklch(55% 0.02 70);
  padding: 0.5em 0.2em 0.7em;
  break-inside: avoid;
}

/* No `:last-child` exception here, unlike the foldable: every strip leaves
   with a different student, so the last one is cut off as well. Without that
   line the sheet's own autoavaliação goes home on the last child's ticket. */

.lesson-plan .exercise-exitticket__name,
.lesson-plan .exercise-exitticket__q {
  display: flex;
  align-items: baseline;
  gap: 0.4em;
  margin: 0 0 0.3em;
  font-size: 9.5pt;
}

.lesson-plan .exercise-exitticket__name { font-size: 8.5pt; }
.lesson-plan .exercise-exitticket__scale { margin: 0.2em 0 0; font-size: 9pt; }

.lesson-plan .exercise-exitticket__level {
  display: inline-block;
  border: 0.6pt solid oklch(45% 0.02 70);
  border-radius: 50%;
  width: 0.55cm;
  height: 0.55cm;
  line-height: 0.5cm;
  text-align: center;
  font-size: 8pt;
  margin-left: 0.15em;
}

/* exercise-argumentmap — one box per part of the text, each with its own
   ruled lines. Two columns would break the order the text is written in. */
.lesson-plan .exercise-argumentmap { break-inside: avoid; }
.lesson-plan .exercise-argumentmap__prompt { font-style: italic; margin: 0.3em 0 0.5em; }

.lesson-plan .exercise-argumentmap__slot {
  border: 0.8pt solid oklch(55% 0.02 70);
  border-radius: 2pt;
  padding: 0.4em 0.55em 0.6em;
  margin-bottom: 0.5em;
  break-inside: avoid;
}

.lesson-plan .exercise-argumentmap__label { display: block; font-weight: 700; font-size: 9.5pt; }

.lesson-plan .exercise-argumentmap__hint {
  display: block;
  font-size: 8.5pt;
  color: oklch(45% 0.02 70);
  margin-bottom: 0.25em;
}

.lesson-plan .exercise-argumentmap__line,
.lesson-plan .exercise-labreport__line {
  display: block;
  border-bottom: 0.6pt solid oklch(60% 0.02 70);
  height: 1.25em;
}

/* exercise-labreport — the experiment in the order it happens, each stage
   labelled so the student can find where she is mid-bench. */
.lesson-plan .exercise-labreport {
  break-inside: avoid;
  border: 0.8pt solid oklch(60% 0.02 70);
  border-radius: 2pt;
  padding: 0.5em 0.7em 0.7em;
}

.lesson-plan .exercise-labreport__section { margin-top: 0.55em; }

.lesson-plan .exercise-labreport__label {
  display: block;
  font-size: 8pt;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: oklch(45% 0.02 70);
  margin-bottom: 0.2em;
}

.lesson-plan .exercise-labreport__question { font-weight: 700; margin: 0; }
.lesson-plan .exercise-labreport__materials,
.lesson-plan .exercise-labreport__steps { margin: 0; padding-left: 1.3em; font-size: 9.5pt; }
.lesson-plan .exercise-labreport__materials li,
.lesson-plan .exercise-labreport__steps li { margin-bottom: 0.15em; }

.lesson-plan .exercise-labreport__record {
  width: 100%;
  border-collapse: collapse;
  font-size: 9pt;
}

.lesson-plan .exercise-labreport__record th,
.lesson-plan .exercise-labreport__record td {
  border: 0.6pt solid oklch(60% 0.02 70);
  padding: 0.3em;
  height: 0.75cm;
}

.lesson-plan .exercise-labreport__record th { background: oklch(95% 0.01 70); }

/* exercise-rolecards — one card per role, cut and handed out. Dashed like
   every other cut edge in the sheet. */
.lesson-plan .exercise-rolecards__cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5em 0.7em;
  margin-top: 0.5em;
}

.lesson-plan .exercise-rolecards__situation { font-style: italic; margin: 0.3em 0; }

.lesson-plan .exercise-rolecards__card {
  border: 1pt dashed oklch(55% 0.02 70);
  border-radius: 2pt;
  padding: 0.5em 0.55em 0.7em;
  min-height: 4cm;
  break-inside: avoid;
}

.lesson-plan .exercise-rolecards__name { display: block; font-weight: 700; font-size: 10.5pt; }
.lesson-plan .exercise-rolecards__goal { display: block; font-size: 9pt; margin: 0.2em 0 0.3em; }
.lesson-plan .exercise-rolecards__prepare { margin: 0; padding-left: 1.1em; font-size: 8.5pt; }

.lesson-plan .exercise-rolecards__notes {
  display: block;
  margin-top: 0.5em;
  font-size: 8pt;
  color: oklch(45% 0.02 70);
  border-top: 0.4pt solid oklch(75% 0.01 70);
  padding-top: 0.3em;
}

/* exercise-codequest — the stages, then the boxes the initials go in. The
   boxes are the whole mechanism, so they print heavier than the answer
   lines. */
.lesson-plan .exercise-codequest { break-inside: avoid; }

/* The ordinal is printed, not left to the list marker: a flex `li` loses its
   marker in Chrome, and the rule tells the class to use the answers "na
   ordem". */
.lesson-plan .exercise-codequest__stages { list-style: none; margin: 0.5em 0; padding: 0; }
.lesson-plan .exercise-codequest__num { font-size: 8pt; font-weight: 700; min-width: 1.1em; }

.lesson-plan .exercise-codequest__stage {
  display: flex;
  align-items: baseline;
  gap: 0.4em;
  margin-bottom: 0.45em;
  break-inside: avoid;
}

.lesson-plan .exercise-codequest__q { flex: none; }

.lesson-plan .exercise-codequest__lock {
  display: flex;
  align-items: center;
  gap: 0.25em;
  margin: 0.6em 0 0;
}

.lesson-plan .exercise-codequest__lock-label {
  font-weight: 700;
  font-size: 9pt;
  letter-spacing: 0.04em;
  margin-right: 0.3em;
}

.lesson-plan .exercise-codequest__box {
  display: inline-block;
  border: 1pt solid oklch(45% 0.02 70);
  width: 0.72cm;
  height: 0.82cm;
}
