* { box-sizing: border-box; }
body { margin: 0; color: #252b2b; background: #fff; font: 16px/1.6 system-ui, sans-serif; }
[hidden] { display: none !important; }
header { display: flex; align-items: center; gap: 12px; padding: 16px 28px; border-bottom: 1px solid #ccd5cf; background: #edf4ef; flex-wrap: wrap; }
header img, .material img { image-rendering: pixelated; }
header nav { display: flex; gap: 20px; margin-left: auto; flex-wrap: wrap; }
a { color: #146947; text-underline-offset: 3px; }
a[aria-current] { font-weight: 700; }
main { max-width: 1180px; margin: auto; padding: 28px; }
h1 { font-size: 30px; line-height: 1.2; margin: 0 0 16px; }
h2 { font-size: 22px; line-height: 1.35; margin: 8px 0 16px; }
h3 { font-size: 16px; margin: 20px 0 4px; }
p { margin: 8px 0 16px; }
button, input, select { font: inherit; }
button { border: 1px solid #a5b6ad; border-radius: 4px; background: #f2f6f3; color: #17482d; padding: 5px 10px; cursor: pointer; }
button:hover { background: #e1ece4; }
button:focus-visible, a:focus-visible, summary:focus-visible { outline: 3px solid #327dcc; outline-offset: 3px; }
.study-layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 36px; margin-top: 28px; align-items: start; }
aside { position: sticky; top: 16px; max-height: calc(100vh - 32px); overflow-y: auto; padding-right: 12px; }
aside label { display: block; font-size: 14px; font-weight: 600; margin: 8px 0; }
input, select { width: 100%; min-width: 0; padding: 8px; border: 1px solid #a5b6ad; border-radius: 4px; background: white; }
#contents { display: flex; flex-direction: column; margin-top: 16px; gap: 4px; }
#contents a { font-size: 14px; text-decoration: none; padding: 5px 0; overflow-wrap: anywhere; }
article { padding: 12px 0 32px; border-bottom: 1px solid #d7ded9; margin-bottom: 24px; scroll-margin-top: 20px; min-width: 0; }
.eyebrow { color: #59675f; font-size: 13px; font-weight: 600; }
.concepts { display: flex; flex-wrap: wrap; gap: 6px 14px; font-family: monospace; font-size: 14px; }
details { margin: 16px 0; }
summary { cursor: pointer; color: #146947; font-weight: 600; padding: 4px 0; }
.preparation, .limits { border-block: 1px solid #ccd5cf; padding: 16px 0; }
.code-example { position: relative; margin: 12px 0; min-width: 0; }
.code-actions { display: flex; gap: 8px; justify-content: flex-end; margin-bottom: 4px; }
.code-actions button { font-size: 13px; }
pre { margin: 0; padding: 16px; background: #f1f3f5; border-left: 3px solid #377b57; overflow: auto; font: 14px/1.6 Consolas, monospace; tab-size: 2; }
.note { color: #526056; border-left: 3px solid #d1a743; padding-left: 12px; }
.materials { border-bottom: 1px solid #d7ded9; padding: 12px 0 20px; }
#materials { display: flex; flex-wrap: wrap; gap: 12px 20px; }
.material { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.copy-status { font-size: 13px; min-height: 20px; }
.lesson-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 28px; margin-top: 24px; }
.lesson-card { display: flex; flex-direction: column; align-items: flex-start; }
.lesson-card .concepts { color: #526056; }
.lesson-card details { margin-top: auto; }
.open-lesson { display: inline-block; padding: 8px 12px; background: #196d48; color: white; border-radius: 4px; text-decoration: none; }
.open-lesson:hover { background: #105437; }
@media (max-width: 700px) {
  header, main { padding: 16px; }
  header nav { margin-left: 0; width: 100%; }
  h1 { font-size: 26px; }
  .study-layout { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .lesson-grid { grid-template-columns: minmax(0, 1fr); }
  aside { position: static; max-height: 280px; padding-right: 0; border-bottom: 1px solid #ccd5cf; padding-bottom: 16px; }
  pre { font-size: 13px; }
}
@media print {
  header, aside, .code-actions, .copy-status, #print-page { display: none; }
  main { max-width: none; padding: 0; }
  .study-layout { display: block; }
  pre { white-space: pre-wrap; overflow-wrap: anywhere; }
  article { break-inside: auto; }
  h2, h3, summary { break-after: avoid; }
}
