
.lesson-diagram{margin:1.5rem auto;max-width:440px}.lesson-diagram svg{display:block;width:100%;height:auto;max-height:360px}.lesson-diagram figcaption{font-size:.9rem;line-height:1.6;margin-top:.6rem;color:var(--muted,#475569)}.teaching-step{margin:1.25rem 0}.teaching-step p{line-height:1.85;max-width:75ch}.table-scroll table{width:100%;border-collapse:collapse}.table-scroll th,.table-scroll td{padding:.75rem;text-align:left;vertical-align:top}.table-scroll caption{text-align:left;font-weight:600;padding:.6rem 0}

.lab-control{display:block;margin:1rem 0}.lab-control input,.lab-control select{display:block;width:100%;margin-top:.4rem}.lab-control output{font-weight:700;float:right}.lab-steps li{margin:.6rem 0;line-height:1.7}.gas-vessel{height:150px;max-width:300px;border:2px solid #64748b;background:linear-gradient(to top,#bfdbfe var(--fill),#fff var(--fill));display:grid;place-items:center;border-radius:12px}.molecule-grid{display:flex;gap:8px;flex-wrap:wrap}.water-token{background:#dbeafe;color:#172554;padding:10px;border-radius:50%;font-weight:700}.dna-strands{font-family:monospace;overflow-wrap:anywhere;letter-spacing:.1em;color:var(--text,#172554)}

/* Complete school contents: wrap long titles at phone widths. */
.school-topic-list{list-style:none;padding:0;display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,300px),1fr));gap:.5rem}
.school-topic-list a{display:flex;align-items:flex-start;gap:.6rem;padding:.7rem;border:1px solid var(--line,#dbe5ef);border-radius:12px;text-decoration:none;min-height:44px;overflow-wrap:anywhere}
.school-topic-list a>span:first-child{flex:0 0 2rem;text-align:center;background:#edf4ff;color:#1d4ed8;border-radius:8px}
.source-topics{padding:1rem;border-left:4px solid #3b82f6;background:var(--surface,#f6f9ff);border-radius:12px;margin:1rem 0}
.source-topics h2{font-size:1.05rem}.source-topics li{margin:.4rem 0}
.school-topic-list [hidden]{display:none}.lesson-references{overflow-wrap:anywhere}

/* Content diagrams: each item remains readable at narrow mobile widths. */
.topic-flow{margin:1.25rem 0;padding:1rem;border:1px solid var(--line,#dbe5eb);border-radius:1rem;max-width:100%;}
.topic-flow ol{display:flex;flex-wrap:wrap;gap:.75rem;padding:0;list-style:none;counter-reset:flow;}
.topic-flow li{counter-increment:flow;flex:1 1 8rem;min-width:0;padding:.75rem;border:1px solid var(--line,#dbe5eb);border-radius:.75rem;overflow-wrap:anywhere;}
.topic-flow li::before{content:counter(flow) ". ";font-weight:700;}
.topic-flow figcaption{font-size:.9em;line-height:1.5;}

/* Source chapters and honest topic-depth indicators. */
.chapter-jumps{display:flex;flex-wrap:wrap;gap:.5rem;margin:1rem 0}.chapter-jumps a{padding:.45rem .8rem;border:1px solid var(--border,#cbd5e1);border-radius:.6rem;text-decoration:none}.chapter-section{scroll-margin-top:5rem;margin-block:1.5rem}.topic-depth{display:block;font-size:.8rem;font-weight:400;color:var(--muted,#526074);margin-top:.3rem}.school-topic-list a>span:last-child{flex:1;text-align:left;min-width:0;overflow-wrap:anywhere}

/* Keep short row labels readable on phones without splitting every word. */
@media(max-width:480px){.complete-lesson #observation .table-scroll th[scope="row"]{min-width:7rem;width:36%}.complete-lesson #observation .table-scroll th,.complete-lesson #observation .table-scroll td{padding:.6rem}}
