/* Imported teaching archive: preserve historical HTML while adapting to MadTinker */
.teaching-article{max-width:1100px;margin-inline:auto}
.teaching-article .article-header{max-width:900px}
.teaching-content{font-size:1rem;line-height:1.7;overflow-wrap:anywhere}
.teaching-content img,.teaching-content video,.teaching-content svg{max-width:100%;height:auto}
.teaching-content iframe{max-width:100%;border:0}
.teaching-content figure{max-width:100%;margin:1.5rem auto}
.teaching-content figcaption{font-size:.85rem;opacity:.8}
.teaching-content pre,.teaching-content code{white-space:pre-wrap;overflow-wrap:anywhere}
.teaching-content pre{overflow-x:auto;white-space:pre}
.teaching-content table{display:block;overflow-x:auto;max-width:100%}
.teaching-content .aligncenter{display:block;margin-inline:auto}
.teaching-content .alignleft{float:left;margin:0 1.5rem 1rem 0}
.teaching-content .alignright{float:right;margin:0 0 1rem 1.5rem}
.teaching-content::after{content:"";display:block;clear:both}
.teaching-content .wp-block-embed__wrapper{position:relative;max-width:100%}
.teaching-content .wp-caption{max-width:100%}
.teaching-content .mt-assignment,.teaching-content .assignment,.teaching-content .assignment-box{border-left:4px solid #c5f25c;padding:1rem 1.25rem;background:rgba(197,242,92,.09);margin:1.5rem 0}
.teaching-content .mt-instructor,.teaching-content .instructor-note{border-left:4px solid #ff9955;padding:1rem 1.25rem;background:rgba(255,153,85,.09);margin:1.5rem 0}
.teaching-content .mt-callout{border-left:4px solid #80d7f2;padding:1rem 1.25rem;background:rgba(128,215,242,.09);margin:1.5rem 0}
@media(max-width:650px){.teaching-content .alignleft,.teaching-content .alignright{float:none;margin:1rem auto;display:block}.teaching-content{font-size:.96rem}}

/* Preserve readable lesson layouts when legacy WordPress images are missing. */
.mt-media-unavailable{display:inline-block;margin:.6rem 0;padding:.6rem .9rem;border:1px dashed #718096;border-radius:4px;color:#a9b8cb;font: .8rem/1.4 ui-monospace,SFMono-Regular,Consolas,monospace;background:#14253b}

/* Readable source examples on the dark MadTinker theme. */
.teaching-content pre,
.teaching-content div.highlighter-rouge,
.teaching-content figure.highlight {display:block;max-width:100%;margin:1.25rem 0;background:#0b1729!important;color:#e7f0fa!important;border:1px solid #38516d;border-radius:7px;overflow-x:auto}
.teaching-content pre {padding:1rem 1.2rem!important;white-space:pre!important;overflow-wrap:normal!important}
.teaching-content pre code,.teaching-content .highlight code{display:block;background:transparent!important;color:inherit!important;white-space:pre!important;overflow-wrap:normal!important;font: .88rem/1.65 ui-monospace,SFMono-Regular,Consolas,monospace!important}
.teaching-content :not(pre)>code{padding:.12rem .32rem;border-radius:3px;background:#1b3049;color:#b6f6d1;overflow-wrap:anywhere}
.teaching-content .highlight,.teaching-content .highlight pre{background:#0b1729!important;color:#e7f0fa!important}

/* Shared containment for original WordPress lesson components. */
.teaching-content { min-width: 0; }
.teaching-content > div,
.teaching-content > section,
.teaching-content > article { max-width: 100%; min-width: 0; }
.teaching-content .amde-grid-lesson {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: clip;
  background: #fff;
  color: #182033;
  padding: clamp(16px, 3vw, 32px);
  border-radius: 14px;
}
.teaching-content .amde-grid-lesson .ag-section,
.teaching-content .amde-grid-lesson .ag-card,
.teaching-content .amde-grid-lesson .ag-callout,
.teaching-content .amde-grid-lesson .ag-grid { min-width: 0; max-width: 100%; }
.teaching-content .amde-grid-lesson .ag-section { color: #182033; }
.teaching-content .amde-grid-lesson .ag-section h2,
.teaching-content .amde-grid-lesson .ag-section h3,
.teaching-content .amde-grid-lesson .ag-card h3 { color: #182033; }
.teaching-content .amde-grid-lesson pre.ag-code {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: auto !important;
  white-space: pre !important;
  overflow-wrap: normal !important;
}
.teaching-content .amde-grid-lesson pre.ag-code code {
  display: block;
  width: max-content;
  min-width: 100%;
  max-width: none;
  white-space: pre !important;
  overflow-wrap: normal !important;
}
