:root { color-scheme: light; font: 16px/1.75 system-ui, sans-serif; color: #182a3b; background: #e9eff4; }
* { box-sizing: border-box; }
body { max-width: 980px; margin: 0 auto; }
a { color: #14548b; overflow-wrap: anywhere; }
a:focus-visible, button:focus-visible { outline: 3px solid #14548b; outline-offset: 4px; }
.book-actions { display: flex; justify-content: space-between; gap: 20px; padding: 22px; position: sticky; top: 0; background: #e9eff4; border-bottom: 1px solid #a6b7c5; }
button { font: inherit; cursor: pointer; padding: 6px 16px; border: 1px solid #45677e; border-radius: 6px; background: white; color: #182a3b; }
.book-cover, .book-contents, .book-lesson, .book-project { background: white; border: 1px solid #cbd6df; padding: clamp(24px, 5vw, 60px); margin: 24px 0; }
h1 { font-size: clamp(2rem, 5vw, 3rem); line-height: 1.2; }
h2 { font-size: 1.75rem; line-height: 1.35; }
h3 { font-size: 1rem; margin: 24px 0 8px; }
p { margin: 10px 0; }
pre { white-space: pre-wrap; overflow-wrap: anywhere; background: #f1f5f8; border-left: 3px solid #2a648b; padding: 16px; font: .85rem/1.65 ui-monospace, monospace; }
.book-kicker, .book-source { font-size: .8rem; color: #465f73; }
.book-answer { border-left: 3px solid #27805f; padding-left: 14px; }
.course-topic { margin-top: 28px; }
.course-pitfall { background: #f3f6f8; border-left: 3px solid #8a6e30; padding: 8px 14px; margin: 14px 0; }
@page { size: A4; margin: 13mm 15mm; }
@media print {
  :root { font-size: 9pt; line-height: 1.42; background: white; color: #182a3b; }
  body { max-width: none; margin: 0; }
  .book-actions { display: none; }
  .book-cover, .book-contents, .book-lesson, .book-project { border: 0; margin: 0; padding: 0; }
  .book-cover, .book-contents { break-after: page; }
  .book-lesson { break-before: page; }
  .book-project { break-before: page; }
  h1 { font-size: 28pt; } h2 { font-size: 19pt; margin: 10px 0; } h3 { margin: 12px 0 5px; font-size: 10pt; }
  pre { font-size: 8pt; line-height: 1.35; padding: 10px; break-inside: avoid; }
  a { color: inherit; }
  .book-source { font-size: 7pt; }
  h2, h3 { break-after: avoid; }
  .course-pitfall { break-inside: avoid; }
}
