/* CCN Casual Games · Learn · the donut and the bacterium. © Computational Classnotes · CC BY-NC-SA 4.0 */
.learn { max-width: 980px; }
.learn .lede { font-size: 1.05rem; }
.levels { display: flex; flex-wrap: wrap; gap: 6px; }
.lv { display: inline-block; padding: 2px 10px; border-radius: 12px; font: 700 0.8rem var(--head, sans-serif); color: #fff; vertical-align: middle; }
.lv1 { background: #00b8a3; } .lv2 { background: #1f6bff; } .lv3 { background: #7a2cff; } .lv4 { background: #ff2e7a; } .lvc { background: #ff7a00; }
.level h2 { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 1.6em; }
.level li { margin-bottom: 0.7em; line-height: 1.55; }
.m { font-family: 'Cambria Math', 'STIX Two Math', 'Times New Roman', serif; font-size: 1.08em; white-space: nowrap; }
.m.block { display: block; margin: 0.5em 0 0.5em 1em; white-space: normal; }
.window { padding: 10px; }
.win { display: grid; grid-template-columns: 1fr 240px; gap: 12px; align-items: start; }
#torus3d, #bug3d { width: 100%; display: block; border-radius: 10px; cursor: grab; }
#flat { width: 100%; max-width: 240px; height: auto; touch-action: none; cursor: crosshair; }
.controls { display: grid; gap: 6px; margin-top: 8px; }
.controls label { display: grid; grid-template-columns: 11em 1fr 3.5em; align-items: center; gap: 8px; }
.controls label.chk { display: inline-flex; gap: 6px; grid-template-columns: none; margin-right: 12px; }
.controls .row { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.readout { display: grid; grid-template-columns: max-content 1fr; gap: 2px 12px; margin: 6px 0 0; font-size: 0.92rem; }
.readout dt { font-weight: 700; } .readout dd { margin: 0; }
.learn pre { overflow-x: auto; background: #17202b; color: #f4f1ea; padding: 10px 12px; border-radius: 8px; font-size: 0.82rem; line-height: 1.45; }
.learn table { border-collapse: collapse; margin: 6px 0; }
.learn td, .learn th { border: 1px solid rgba(23, 32, 43, 0.2); padding: 3px 8px; font-family: monospace; }
.refs { margin-top: 2em; }
@media (max-width: 700px) {
  .win { grid-template-columns: 1fr; }
  .flat { display: flex; gap: 10px; align-items: center; }
  #flat { max-width: 160px; }
  .controls label { grid-template-columns: 1fr; }
}
