:root {
  color-scheme: light;
  --paper: #f5f4ef;
  --surface: #fffefa;
  --ink: #273438;
  --muted: #52666a;
  --teal: #087f91;
  --teal-dark: #075d6c;
  --teal-wash: #e7f0ef;
  --rule: #cbd8d5;
  --warm-wash: #f7efdd;
  --warm-ink: #76571d;
  --reading-font:
    'Iowan Old Style', 'Palatino Linotype', 'Book Antiqua', Georgia, serif;
  --interface-font:
    -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
  --radius: 0.75rem;
}

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

html {
  font-size: 100%;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  background: var(--paper);
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--reading-font);
  font-size: 1.125rem;
  line-height: 1.8;
  overflow-wrap: break-word;
}

[hidden] {
  display: none !important;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: var(--teal-dark);
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.2em;
}

a:hover {
  text-decoration-thickness: 0.13em;
}

a,
button,
input,
textarea,
summary {
  -webkit-tap-highlight-color: #087f9120;
}

:where(a, button, input, textarea, select, summary, [tabindex]):focus-visible {
  outline: 3px solid var(--teal);
  outline-offset: 4px;
}

::selection {
  color: #123b42;
  background: #c0e1e3;
}

h1,
h2,
h3,
p,
figure,
blockquote {
  margin-top: 0;
}

h1,
h2,
h3 {
  color: var(--ink);
  font-weight: 500;
  line-height: 1.2;
  text-wrap: balance;
}

p {
  margin-bottom: 1.25rem;
}

ul,
ol {
  padding-left: 1.4em;
}

li + li {
  margin-top: 0.5rem;
}

strong {
  font-weight: 700;
}

small {
  font-size: 0.875rem;
}

.book-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.75rem;
  max-width: 94rem;
  margin: 0 auto;
  padding: 1.5rem clamp(1.25rem, 4vw, 4rem);
  border-bottom: 1px solid var(--rule);
  font-family: var(--interface-font);
  font-size: 0.9375rem;
  line-height: 1.5;
}

.book-header .brand {
  color: var(--ink);
  font-size: 1.0625rem;
  font-weight: 750;
  letter-spacing: 0.015em;
  text-decoration: none;
}

.book-header .brand span {
  color: var(--teal);
}

.draft-label {
  display: inline-flex;
  align-items: center;
  padding: 0.375rem 0.75rem;
  border: 1px solid #d7c59d;
  border-radius: 0.3125rem;
  color: var(--warm-ink);
  background: var(--warm-wash);
  font-size: 0.875rem;
  font-weight: 550;
  line-height: 1.5;
}

.book-header nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1.5rem;
  margin-left: auto;
}

.book-header nav a {
  padding: 0.35rem 0;
}

.book-layout {
  display: grid;
  grid-template-columns: 14rem minmax(0, 1fr);
  gap: clamp(2rem, 4.5vw, 4.5rem);
  align-items: start;
  max-width: 94rem;
  margin: 0 auto;
  padding: 2.75rem clamp(1.25rem, 4vw, 4rem) 4rem;
}

.contents {
  position: sticky;
  top: 1.5rem;
  max-height: calc(100vh - 3rem);
  max-height: calc(100dvh - 3rem);
  overflow-y: auto;
  padding: 0.75rem 0.625rem 1.25rem 0;
  scrollbar-width: thin;
  scrollbar-color: #99b8b9 transparent;
  font-family: var(--interface-font);
  font-size: 0.9375rem;
  line-height: 1.6;
}

.contents h2,
.contents h3,
.contents > strong {
  display: block;
  margin: 0 0 1.25rem;
  font-family: var(--interface-font);
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1.5;
  text-transform: uppercase;
}

.contents nav,
.contents nav > ol,
.contents nav > ul {
  display: grid;
  gap: 0.3125rem;
}

.contents nav > ol,
.contents nav > ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.contents nav li {
  margin: 0;
}

.contents nav a {
  display: block;
  padding: 0.7rem 0.75rem;
  border-left: 2px solid var(--rule);
  border-radius: 0 0.3125rem 0.3125rem 0;
  color: var(--muted);
  text-decoration: none;
}

.contents nav a:hover,
.contents nav a[aria-current],
.contents nav a.active {
  border-left-color: var(--teal);
  color: var(--teal-dark);
  background: var(--teal-wash);
}

.contents p,
.contents small {
  display: block;
  color: var(--muted);
  font-size: 0.875rem;
  line-height: 1.7;
}

.contents p:last-child {
  margin-top: 1.5rem;
}

main#conteudo {
  min-width: 0;
}

main#conteudo > :first-child {
  margin-top: 0;
}

:where(
  .lesson-section,
  .unit-hero,
  .lesson-footer,
  main#conteudo > section
)[id] {
  scroll-margin-top: 2rem;
}

.unit-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.13fr) minmax(15rem, 0.87fr);
  gap: clamp(1.5rem, 3vw, 3rem);
  align-items: center;
  padding: 0.5rem 0 2rem;
}

.eyebrow {
  display: block;
  margin-bottom: 1rem;
  color: var(--teal-dark);
  font-family: var(--interface-font);
  font-size: 0.875rem;
  font-weight: 650;
  letter-spacing: 0.1em;
  line-height: 1.6;
  text-transform: uppercase;
}

.unit-hero h1 {
  margin-bottom: 1.5rem;
  font-size: clamp(2.5rem, 4.7vw, 4.5rem);
  font-weight: 400;
  letter-spacing: -0.04em;
  line-height: 1.04;
}

.unit-hero h1 em {
  color: var(--teal);
  font-weight: 400;
}

.lead {
  max-width: 46ch;
  color: var(--muted);
  font-size: clamp(1.125rem, 1.4vw, 1.3125rem);
  line-height: 1.75;
}

.unit-hero .hero-art {
  width: 100%;
  max-width: 28rem;
  margin: 0 auto;
}

.hero-art img {
  width: 100%;
  height: auto;
  border: 1px solid #d1dcd6;
  border-radius: var(--radius);
  background: #edece4;
  box-shadow: 0 0.75rem 2.25rem #263d3b0a;
}

figcaption {
  max-width: 74ch;
  margin: 0.8rem auto 0;
  color: var(--muted);
  font-family: var(--interface-font);
  font-size: 0.875rem;
  line-height: 1.7;
}

.lesson-section {
  margin-top: 3.75rem;
  padding-top: 2.5rem;
  border-top: 1px solid var(--rule);
}

.section-heading {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  margin-bottom: 1.625rem;
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(1.8rem, 2.8vw, 2.375rem);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.activity-icon {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border-radius: 0.75rem;
  background: var(--teal-wash);
}

.activity-icon img {
  width: 2rem;
  height: 2rem;
  object-fit: contain;
}

.section-heading > img.activity-icon {
  width: 2rem;
  height: 2rem;
  margin-top: 0.15rem;
  border-radius: 0;
  background: transparent;
  object-fit: contain;
}

.lesson-section > p,
.lesson-section > ul,
.lesson-section > ol,
.lesson-section > h3,
.objectives,
.dialogue,
.writing-area,
.review-checklist {
  max-width: 76ch;
}

.lesson-section > h3 {
  margin-top: 2rem;
  margin-bottom: 1rem;
  font-size: 1.5rem;
}

.lesson-section blockquote {
  max-width: 76ch;
  margin: 1.75rem 0;
  padding: 1.125rem 1.5rem;
  border-left: 3px solid var(--teal);
  border-radius: 0 0.5rem 0.5rem 0;
  background: var(--teal-wash);
  color: #34575b;
  font-size: 1.125rem;
  line-height: 1.8;
}

.lesson-section blockquote > :last-child {
  margin-bottom: 0;
}

.lesson-section table {
  display: block;
  width: 100%;
  max-width: 100%;
  margin: 1.75rem 0;
  overflow-x: auto;
  border: 1px solid #c2d4d0;
  border-radius: 0.5rem;
  border-collapse: collapse;
  background: var(--surface);
  font-family: var(--interface-font);
  font-size: 1rem;
  line-height: 1.7;
  scrollbar-width: thin;
  scrollbar-color: #8cafb2 #edf2ec;
}

.lesson-section caption {
  padding: 0 0 0.75rem;
  color: var(--muted);
  font-size: 0.9375rem;
  font-weight: 550;
  line-height: 1.65;
  text-align: left;
}

.lesson-section th,
.lesson-section td {
  min-width: 10rem;
  padding: 0.9rem 1.125rem;
  border-bottom: 1px solid #d4e0db;
  text-align: left;
  vertical-align: top;
}

.lesson-section th {
  color: #23565c;
  background: #e3efeb;
  font-size: 0.9375rem;
  font-weight: 650;
}

.lesson-section tbody tr:nth-child(even) {
  background: #f2f6ef;
}

.lesson-section tbody tr:last-child td {
  border-bottom: 0;
}

.objectives {
  padding: 1.5rem 1.75rem;
  border: 1px solid #c7dbd6;
  border-radius: var(--radius);
  background: #eaf2ed;
}

.objectives h2,
.objectives h3 {
  margin: 0 0 1rem;
  font-family: var(--interface-font);
  font-size: 1rem;
  font-weight: 650;
  line-height: 1.5;
}

.objectives ul {
  margin: 0;
  padding-left: 1.25rem;
}

.objectives li::marker {
  color: var(--teal);
}

figure.scene {
  margin: 2rem 0;
}

.scene img {
  width: 100%;
  height: auto;
  border: 1px solid #ccd9d4;
  border-radius: var(--radius);
  background: #eeeee6;
}

.callout {
  max-width: 76ch;
  margin: 1.75rem 0;
  padding: 1.25rem 1.5rem;
  border: 1px solid #c8dcd9;
  border-left: 4px solid var(--teal);
  border-radius: 0.25rem var(--radius) var(--radius) 0.25rem;
  background: var(--teal-wash);
}

.callout.note {
  background: #eaf1ef;
}

.callout.warning {
  border-color: #decfa9;
  border-left-color: #a47b2d;
  color: #574926;
  background: var(--warm-wash);
}

.callout > :last-child {
  margin-bottom: 0;
}

.callout h3,
.callout > strong:first-child {
  display: block;
  margin: 0 0 0.5rem;
  font-family: var(--interface-font);
  font-size: 1rem;
  font-weight: 650;
  line-height: 1.5;
}

.dialogue {
  margin: 1.75rem 0;
  padding: 0.5rem 1.75rem;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background: var(--surface);
}

.dialogue > p {
  margin: 0;
  padding: 1.1rem 0;
}

.dialogue > p + p {
  border-top: 1px solid #dde5df;
}

.dialogue p > strong {
  display: block;
  color: var(--ink);
  font-family: var(--interface-font);
  font-size: 1.0625rem;
  font-weight: 600;
  line-height: 1.65;
}

.dialogue p > small {
  display: block;
  margin-top: 0.4rem;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.65;
}

.phrase-grid,
.vocabulary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin: 1.75rem 0;
}

.phrase-grid article,
.vocabulary-grid article {
  min-width: 0;
  padding: 1.5rem;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background: var(--surface);
}

.phrase-grid h3 {
  margin: 0 0 0.75rem;
  font-size: 1.375rem;
}

.phrase-grid article > strong,
.vocabulary-grid article > strong {
  display: block;
  color: var(--teal-dark);
  font-family: var(--interface-font);
  font-size: 1.125rem;
  font-weight: 600;
  line-height: 1.6;
}

.phrase-grid p,
.vocabulary-grid p {
  margin: 0.625rem 0 0;
  font-size: 1.0625rem;
  line-height: 1.75;
}

.vocabulary-grid article > span,
.vocabulary-grid article > small {
  display: block;
  margin-top: 0.5rem;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.65;
}

fieldset.exercise {
  min-width: 0;
  margin: 1.75rem 0;
  padding: 1.5rem;
  border: 1px solid #c6d8d4;
  border-radius: var(--radius);
  background: var(--surface);
}

.exercise legend {
  max-width: 100%;
  padding: 0 0.5rem;
  color: var(--ink);
  font-family: var(--interface-font);
  font-size: 1rem;
  font-weight: 650;
  line-height: 1.65;
}

.exercise > p {
  margin-bottom: 1rem;
}

.options {
  display: grid;
  gap: 0.75rem;
}

.options label {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.9rem 1rem;
  border: 1px solid #d1ddda;
  border-radius: 0.375rem;
  background: #fafbf7;
  font-family: var(--interface-font);
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.65;
  cursor: pointer;
}

.options label:hover {
  border-color: #83afb3;
}

.options label:has(input:checked) {
  border-color: var(--teal);
  color: var(--teal-dark);
  background: var(--teal-wash);
}

.options input,
.review-checklist input[type='checkbox'] {
  flex: 0 0 auto;
  width: 1.125rem;
  height: 1.125rem;
  margin: 0.24rem 0 0;
  accent-color: var(--teal);
  cursor: pointer;
}

.exercise .explanation {
  margin: 1.1rem 0 0;
  padding: 1rem 1.125rem;
  border-left: 3px solid var(--teal);
  color: #264e4f;
  background: #e8f1ea;
  font-size: 1rem;
  line-height: 1.75;
}

.quiz-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.875rem;
  margin: 1.75rem 0;
}

button {
  min-height: 2.875rem;
  padding: 0.75rem 1.125rem;
  border: 1px solid #abc7c5;
  border-radius: 0.375rem;
  color: var(--teal-dark);
  background: var(--surface);
  font-family: var(--interface-font);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.5;
  cursor: pointer;
}

button.primary {
  border-color: var(--teal);
  color: #fff;
  background: var(--teal);
}

button.primary:hover:not(:disabled) {
  border-color: var(--teal-dark);
  background: var(--teal-dark);
}

button.secondary:hover:not(:disabled) {
  background: var(--teal-wash);
}

button:disabled {
  border-color: #c8d3cf;
  color: #52676a;
  background: #e1e7e4;
  cursor: not-allowed;
}

output#quiz-summary {
  display: block;
  margin: 1.25rem 0;
  padding: 1.25rem 1.5rem;
  border: 1px solid #abcac5;
  border-radius: var(--radius);
  color: #245357;
  background: #e4efeb;
  font-family: var(--interface-font);
  font-size: 1rem;
  line-height: 1.75;
}

output#quiz-summary:empty {
  display: none;
}

.writing-area {
  margin: 1.75rem 0;
}

.writing-area label,
.plan-grid label {
  display: block;
  color: var(--ink);
  font-family: var(--interface-font);
  font-size: 1rem;
  font-weight: 550;
  line-height: 1.65;
}

input[type='text'],
textarea {
  display: block;
  width: 100%;
  min-width: 0;
  margin-top: 0.7rem;
  padding: 0.9rem 1rem;
  border: 1px solid #afc7c4;
  border-radius: 0.375rem;
  color: var(--ink);
  background: var(--surface);
  font-family: var(--interface-font);
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.75;
}

input[type='text'] {
  min-height: 3rem;
}

textarea {
  min-height: 10.5rem;
  resize: vertical;
}

input::placeholder,
textarea::placeholder {
  color: #63787b;
  opacity: 1;
}

.writing-area > small,
.plan-grid small {
  display: block;
  margin-top: 0.6rem;
  color: var(--muted);
  font-family: var(--interface-font);
  font-size: 0.875rem;
  line-height: 1.65;
}

.plan-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem 1.5rem;
  margin: 1.75rem 0;
}

.plan-grid > textarea,
.plan-grid > label:has(textarea),
.plan-grid > .writing-area {
  grid-column: 1 / -1;
}

.plan-grid > .writing-area {
  margin: 0;
}

.review-checklist {
  display: grid;
  gap: 0.875rem;
  margin: 1.75rem 0;
  padding: 1.5rem;
  border: 1px solid #cadbd4;
  border-radius: var(--radius);
  background: #edf2e9;
}

.review-checklist label {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  font-family: var(--interface-font);
  font-size: 1rem;
  line-height: 1.65;
  cursor: pointer;
}

details.answer-key {
  margin: 2rem 0;
  padding: 0 1.5rem;
  border: 1px solid #c8d7d3;
  border-radius: var(--radius);
  background: var(--surface);
}

.answer-key summary {
  padding: 1.125rem 0;
  color: var(--teal-dark);
  font-family: var(--interface-font);
  font-size: 1rem;
  font-weight: 650;
  line-height: 1.65;
  cursor: pointer;
}

.answer-key[open] summary {
  margin-bottom: 1.25rem;
  border-bottom: 1px solid var(--rule);
}

.answer-key > :last-child:not(summary) {
  margin-bottom: 1.5rem;
}

.lesson-footer {
  margin-top: 3.5rem;
  padding: 2rem 0 0;
  border-top: 1px solid var(--rule);
  color: var(--muted);
  font-family: var(--interface-font);
  font-size: 0.9375rem;
  line-height: 1.8;
}

.lesson-footer > :last-child {
  margin-bottom: 0;
}

@media (min-width: 90rem) {
  .vocabulary-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 70rem) {
  .book-layout {
    grid-template-columns: 12rem minmax(0, 1fr);
    gap: 2rem;
  }

  .unit-hero {
    grid-template-columns: minmax(0, 1fr) minmax(12rem, 0.82fr);
    gap: 1.5rem;
  }

  .unit-hero h1 {
    font-size: clamp(2.25rem, 4.4vw, 3.5rem);
  }

  .contents {
    font-size: 0.875rem;
  }
}

@media (max-width: 56rem) {
  .book-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 2.25rem;
    max-width: 54rem;
    padding-top: 1.75rem;
  }

  .contents {
    position: static;
    max-height: none;
    overflow: visible;
    padding: 1.25rem;
    border: 1px solid var(--rule);
    border-radius: var(--radius);
    background: #eef1e9;
  }

  .contents h2,
  .contents h3,
  .contents > strong {
    margin-bottom: 0.875rem;
  }

  .contents nav,
  .contents nav > ol,
  .contents nav > ul {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.375rem 1rem;
  }

  .contents nav > ol,
  .contents nav > ul {
    grid-column: 1 / -1;
  }

  .contents nav a {
    padding-top: 0.6rem;
    padding-bottom: 0.6rem;
  }

  .unit-hero {
    padding-top: 0;
  }
}

@media (max-width: 38rem) {
  .book-header {
    gap: 0.875rem 1rem;
    padding-top: 1.25rem;
    padding-bottom: 1.25rem;
  }

  .book-header nav {
    width: 100%;
    margin-left: 0;
    gap: 0.5rem 1.25rem;
  }

  .book-header .brand {
    font-size: 1rem;
  }

  .draft-label {
    font-size: 0.875rem;
  }

  .book-layout {
    padding-right: 1.125rem;
    padding-left: 1.125rem;
  }

  .contents {
    padding: 1.125rem;
  }

  .contents nav,
  .contents nav > ol,
  .contents nav > ul {
    grid-template-columns: minmax(0, 1fr);
  }

  .unit-hero {
    grid-template-columns: minmax(0, 1fr);
    gap: 1.25rem;
    padding-bottom: 0.75rem;
  }

  .unit-hero h1 {
    max-width: 13ch;
    font-size: clamp(2.5rem, 10vw, 3.5rem);
  }

  .unit-hero .hero-art {
    max-width: 25rem;
  }

  .lead {
    font-size: 1.1875rem;
  }

  .lesson-section {
    margin-top: 2.5rem;
    padding-top: 2rem;
  }

  .section-heading {
    gap: 0.75rem;
    align-items: flex-start;
  }

  .section-heading h2 {
    font-size: 1.875rem;
    padding-top: 0.3rem;
  }

  .phrase-grid,
  .vocabulary-grid,
  .plan-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .phrase-grid article,
  .vocabulary-grid article,
  .objectives,
  .callout,
  .review-checklist {
    padding: 1.25rem;
  }

  .dialogue {
    padding-right: 1.25rem;
    padding-left: 1.25rem;
  }

  fieldset.exercise {
    padding: 1.125rem;
  }

  .options label {
    padding: 0.8rem;
  }

  .quiz-actions button {
    flex: 1 1 12rem;
  }

  .answer-key,
  details.answer-key {
    padding-right: 1.125rem;
    padding-left: 1.125rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

@page {
  size: A4;
  margin: 16mm 15mm 18mm;
}

@media print {
  :root {
    --paper: #fff;
    --surface: #fff;
    --ink: #1d292b;
    --muted: #435457;
    --rule: #b5c6c2;
  }

  html,
  body {
    background: #fff;
  }

  body {
    font-size: 11.5pt;
    line-height: 1.6;
  }

  .book-header {
    max-width: none;
    padding: 0 0 5mm;
    gap: 4mm;
    font-size: 9pt;
  }

  .book-header .brand {
    font-size: 11pt;
  }

  .book-header nav,
  .contents,
  .quiz-actions {
    display: none;
  }

  .draft-label {
    padding: 1.5mm 2.5mm;
    font-size: 9pt;
  }

  .book-layout {
    display: block;
    max-width: none;
    padding: 7mm 0 0;
  }

  .unit-hero {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
    gap: 8mm;
    padding: 0 0 5mm;
    break-inside: avoid;
  }

  .unit-hero h1 {
    max-width: none;
    margin-bottom: 4mm;
    font-size: 30pt;
    line-height: 1.08;
  }

  .lead {
    font-size: 12pt;
    line-height: 1.65;
  }

  .eyebrow {
    margin-bottom: 3mm;
    font-size: 8.5pt;
  }

  .hero-art img {
    max-height: 90mm;
    object-fit: contain;
    box-shadow: none;
  }

  .lesson-section {
    margin-top: 9mm;
    padding-top: 7mm;
    break-inside: auto;
  }

  .section-heading {
    margin-bottom: 5mm;
    gap: 3mm;
    break-after: avoid;
  }

  .section-heading h2 {
    padding: 0;
    font-size: 21pt;
  }

  h2,
  h3,
  legend,
  summary {
    break-after: avoid;
  }

  p,
  li {
    orphans: 3;
    widows: 3;
  }

  p {
    margin-bottom: 4mm;
  }

  .activity-icon {
    width: 10mm;
    height: 10mm;
  }

  .activity-icon img {
    width: 8mm;
    height: 8mm;
  }

  .section-heading > img.activity-icon {
    width: 8mm;
    height: 8mm;
    margin-top: 0;
  }

  .lesson-section blockquote {
    margin: 5mm 0;
    padding: 4mm 5mm;
    font-size: 11pt;
    break-inside: avoid;
  }

  .lesson-section table {
    display: table;
    width: 100%;
    max-width: 100%;
    margin: 5mm 0;
    overflow: visible;
    border-radius: 0;
    table-layout: auto;
    font-size: 10pt;
    break-inside: auto;
  }

  .lesson-section thead {
    display: table-header-group;
  }

  .lesson-section tr {
    break-inside: avoid;
  }

  .lesson-section th,
  .lesson-section td {
    min-width: 0;
    padding: 3mm;
    overflow-wrap: anywhere;
  }

  .lesson-section th,
  .lesson-section caption {
    font-size: 9.5pt;
  }

  figure.scene {
    margin: 6mm 0;
    break-inside: avoid;
  }

  .scene img {
    max-height: 115mm;
    object-fit: contain;
  }

  figcaption,
  small,
  .writing-area > small,
  .plan-grid small {
    font-size: 9pt;
    line-height: 1.6;
  }

  .callout,
  .objectives,
  .phrase-grid article,
  .vocabulary-grid article,
  fieldset.exercise,
  .review-checklist {
    padding: 5mm;
    break-inside: avoid;
  }

  .callout,
  fieldset.exercise,
  .review-checklist {
    margin: 6mm 0;
  }

  .dialogue {
    margin: 6mm 0;
    padding: 1mm 5mm;
  }

  .dialogue > p {
    padding: 3mm 0;
    break-inside: avoid;
  }

  .dialogue p > strong,
  .phrase-grid article > strong,
  .vocabulary-grid article > strong {
    font-size: 11pt;
  }

  .dialogue p > small,
  .vocabulary-grid article > span,
  .vocabulary-grid article > small,
  .exercise legend,
  .options label,
  .exercise .explanation,
  .writing-area label,
  .plan-grid label,
  .review-checklist label,
  .answer-key summary,
  output#quiz-summary {
    font-size: 10pt;
  }

  .phrase-grid,
  .vocabulary-grid,
  .plan-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4mm;
    margin: 6mm 0;
  }

  .phrase-grid h3 {
    font-size: 13pt;
  }

  .phrase-grid p,
  .vocabulary-grid p {
    font-size: 11pt;
  }

  .options {
    gap: 2mm;
  }

  .options label {
    padding: 3mm;
  }

  .options input,
  .review-checklist input[type='checkbox'] {
    width: 3.5mm;
    height: 3.5mm;
    margin-top: 0.8mm;
  }

  .writing-area,
  .plan-grid label {
    break-inside: avoid;
  }

  input[type='text'],
  textarea {
    margin-top: 2mm;
    padding: 3mm;
    color: #1d292b;
    background: #fff;
    border-color: #8fa7a5;
    font-size: 10pt;
    line-height: 1.6;
    box-shadow: none;
  }

  input[type='text'] {
    min-height: 10mm;
  }

  textarea {
    min-height: 40mm;
    resize: none;
  }

  /* Answer visibility stays controlled by HTML/JS: printing never reveals
     a hidden explanation or silently opens a closed answer key. */
  details.answer-key {
    margin: 6mm 0;
    padding: 0 5mm;
    break-inside: auto;
  }

  .answer-key summary {
    padding: 4mm 0;
  }

  .answer-key[open] summary {
    margin-bottom: 4mm;
  }

  .lesson-footer {
    margin-top: 8mm;
    padding-top: 5mm;
    font-size: 9pt;
    break-inside: avoid;
  }

  a {
    color: inherit;
  }

  .hero-art,
  .scene,
  .activity-icon,
  .draft-label {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
}
