/* Printable teaching pages: light, ink-friendly, A4 first. The rest of the site is dark. */
* { box-sizing: border-box; }
body { margin: 0; padding: 24px; font-family: Arial, Helvetica, sans-serif; font-size: 15px; line-height: 1.5; color: #1a202c; background: #f7f8fa; }
.page { max-width: 900px; margin: 0 auto; }
a { color: #8a4a12; }
h1 { font-size: 26px; margin: 0 0 8px; }
h2 { font-size: 18px; margin: 28px 0 8px; }
p { margin: 0 0 12px; }
.crumb { font-size: 13px; color: #586373; margin-bottom: 14px; }
.crumb a { color: #586373; }
.lede { color: #3b4557; max-width: 70ch; }
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin: 16px 0; }
.btn { display: inline-block; background: #f4894a; color: #1a202c; border: none; border-radius: 6px; padding: 10px 18px; font: inherit; font-weight: bold; cursor: pointer; text-decoration: none; }
.btn.ghost { background: #fff; border: 1px solid #cbd5e0; }
.btn:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible { outline: 3px solid #f4894a; outline-offset: 2px; }
.opts { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; font-size: 14px; margin: 0 0 16px; }
.opts label { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.opts input[type="checkbox"] { width: 16px; height: 16px; }
select, input[type="text"], input[type="number"] { font: inherit; padding: 8px 10px; border: 1px solid #cbd5e0; border-radius: 6px; background: #fff; }
.card { background: #fff; border: 1px solid #e2e8f0; border-radius: 8px; padding: 18px; margin-bottom: 14px; }
.card h2 { margin-top: 0; }
.note { font-size: 13px; color: #586373; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

/* Flashcards: nine per A4 portrait page. */
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.fc { background: #fff; border: 1px solid #cbd5e0; border-radius: 8px; padding: 10px 10px 12px; text-align: center; min-height: 250px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; break-inside: avoid; }
.fc img { width: 110px; height: 110px; object-fit: contain; }
.fc .name { font-size: 20px; font-weight: bold; }
.fc .kind { font-size: 12px; color: #586373; }
.fc .fact { font-size: 12px; line-height: 1.35; color: #3b4557; }
.hide-name .fc .name, .hide-kind .fc .kind, .hide-fact .fc .fact { visibility: hidden; }
.hide-name .fc .name::after { content: ""; }

/* Worksheets and sheets. */
.sheet { background: #fff; border: 1px solid #e2e8f0; border-radius: 8px; padding: 22px 26px; }
.sheet-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; border-bottom: 2px solid #1a202c; padding-bottom: 6px; margin-bottom: 14px; }
.sheet-head h1 { font-size: 22px; margin: 0; }
.sheet-meta { font-size: 12px; color: #586373; }
.nameline { font-size: 13px; margin: 0 0 14px; }
.qs { list-style: none; padding: 0; margin: 0; counter-reset: q; }
.qs li { counter-increment: q; margin: 0 0 12px; padding-left: 30px; position: relative; break-inside: avoid; }
.qs li::before { content: counter(q) "."; position: absolute; left: 0; font-weight: bold; }
.qs .choices { display: flex; gap: 18px; flex-wrap: wrap; font-size: 14px; margin-top: 3px; }
.qs .choices span::before { content: "\25EF  "; }
.key { break-before: page; page-break-before: always; border-top: 2px dashed #cbd5e0; margin-top: 36px; padding-top: 12px; }
.key ol { columns: 2; column-gap: 30px; font-size: 14px; }
.lines { border-bottom: 1px solid #94a3b8; height: 26px; }

/* Body of the week sheet. */
.bs-top { display: grid; grid-template-columns: 170px 1fr; gap: 20px; align-items: center; }
.bs-top img { width: 170px; height: 170px; object-fit: contain; }
.bs-kicker { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: #586373; }
.bs-facts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px 18px; margin: 14px 0; font-size: 14px; }
.bs-facts div { border-bottom: 1px solid #e2e8f0; padding: 4px 0; }
.bs-facts b { display: block; font-size: 11px; color: #586373; text-transform: uppercase; letter-spacing: .06em; }

/* Poster: the journey in order. */
.poster { background: #fff; border: 1px solid #e2e8f0; border-radius: 8px; padding: 16px; }
.poster h1 { text-align: center; font-size: 24px; margin-bottom: 4px; }
.poster .sub { text-align: center; font-size: 12px; color: #586373; margin-bottom: 12px; }
.prow { display: grid; grid-template-columns: repeat(8, 1fr); gap: 8px; }
.pcell { text-align: center; font-size: 11px; line-height: 1.25; }
.pcell img { width: 100%; max-width: 88px; height: auto; aspect-ratio: 1; object-fit: contain; }
.pcell b { display: block; font-size: 12px; }
.pcell.small img { max-width: 56px; }
.pgroup { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: #586373; margin: 12px 0 4px; border-bottom: 1px solid #e2e8f0; }

/* Classroom games. */
.act { background: #fff; border: 1px solid #e2e8f0; border-radius: 8px; padding: 14px 18px; margin-bottom: 12px; break-inside: avoid; }
.act h2 { margin: 0 0 2px; font-size: 17px; }
.act .tag { font-size: 12px; color: #586373; margin-bottom: 6px; }
.act p { margin: 0 0 6px; }

/* Results table. */
.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: end; margin: 0 0 10px; }
.row label { display: flex; flex-direction: column; font-size: 12px; color: #586373; gap: 4px; }
table { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid #e2e8f0; font-size: 14px; }
th, td { padding: 8px 12px; border-bottom: 1px solid #e2e8f0; text-align: left; }
th { background: #f1f5f9; font-size: 12px; color: #586373; }
#rmsg { min-height: 20px; font-size: 13px; margin: 6px 0 14px; }

@page { size: A4 portrait; margin: 12mm; }
@media print {
  body { background: #fff; padding: 0; }
  .noprint { display: none !important; }
  .sheet, .poster, .card { border: none; padding: 0; }
  .grid { gap: 6px; }
  .fc { min-height: 82mm; }
  .fc:nth-child(9n) { page-break-after: always; }
}
@media (max-width: 640px) { .grid { grid-template-columns: repeat(2, 1fr); } .bs-top { grid-template-columns: 1fr; } .prow { grid-template-columns: repeat(4, 1fr); } }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
