/* Reading layout: leave exam cards, media and tables at their existing width. */
#ot-article-body > p, #ot-article-body > ul, #ot-article-body > ol, #ot-article-body > blockquote {max-width:100%;margin:0 auto 1.15em;line-height:1.9;font-size:16px;box-sizing:border-box;text-indent:0;word-break:normal;overflow-wrap:break-word;}
#ot-article-body > h2:not(.ot-card-title), #ot-article-body > h3 {max-width:100%;margin:2em auto .85em;color:#0057b7;background:transparent;border:0;border-bottom:2px solid #dce7f4;padding:0 0 .45em;line-height:1.45;box-sizing:border-box;}
#ot-article-body > h2 {font-size:clamp(22px,2.4vw,30px)}
#ot-article-body > h3 {font-size:20px}
#ot-article-body > p.ot-learning-display {background:#f1f6fc;border:1px solid #dce7f4;border-radius:10px;padding:12px 16px;overflow-x:auto;}
.ot-learning-block {box-sizing:border-box;max-width:100%;margin:20px auto;padding:16px 20px;border:1px solid #dce7f4;border-radius:10px;background:#f4f8fd;color:#173451;line-height:1.85;overflow-wrap:break-word;}
.ot-learning-block > .ot-learning-label {font-size:13px;font-weight:800;letter-spacing:.06em;color:#0057b7;margin:0 0 8px;line-height:1.5;}
.ot-learning-block > :last-child {margin-bottom:0;}
.ot-learning-block p {margin:.5em 0;}
.ot-learning-point {background:#fff7cf;border-color:#f1d34d;border-left:4px solid #ffd500;}
.ot-learning-formula {background:#f0f6ff;text-align:center;overflow-x:auto;}
.ot-learning-formula > .ot-learning-label {text-align:left;}
.ot-learning-formula mjx-container[display=true] {font-size:115%!important;}
.ot-learning-note {background:#f7f9fc;border-left:4px solid #a7bed7;}
.ot-learning-term {background:#fff;border-left:4px solid #0057b7;}
.ot-toolbar .ot-learning-button {color:#0057b7;background:#fff;border-color:#b7cce5;}
.ot-toolbar .ot-learning-button[data-learning="point"] {background:#fff7cf;border-color:#e8ca43;}
@media(max-width:640px){.ot-learning-block{padding:12px 14px;margin:14px auto}#ot-article-body > p{font-size:16px;line-height:1.85}}

/* Align standalone article illustrations with the reading column. */
#ot-article-body > figure,
#ot-article-body > .wp-block-image {
  width:100% !important; max-width:100% !important; box-sizing:border-box;
  margin:24px auto !important; padding:0;
}
#ot-article-body > figure img,
#ot-article-body > .wp-block-image img,
#ot-article-body > p > img,
#ot-article-body > p > a > img {
  max-width:100% !important; height:auto !important;
  display:block; margin:0 auto !important;
}
#ot-article-body > img {
  max-width:100% !important; height:auto !important;
  margin:24px auto !important;
}
#ot-article-body > figure figcaption {margin:8px 0 0;text-align:center;font-size:14px;}

/* Keep standalone figures inside the same article column. */
#ot-article-body > figure, #ot-article-body > .wp-block-image { margin-inline:0 !important; }
#ot-article-body > figure img, #ot-article-body > .wp-block-image img { width:auto !important; max-width:100% !important; }

/* Standalone illustration cards; exclude exam cards and embedded media. */
#ot-article-body > figure:has(img):not(:has(iframe,video)),
#ot-article-body > .wp-block-image:has(img):not(:has(figure,iframe,video)) {
  position:relative; border:1px solid #b9cee6; border-bottom:4px solid #ffd400;
  border-radius:10px; background:#fff; overflow:hidden;
  padding:0 12px 12px !important; margin:22px 0 !important;
}
#ot-article-body > figure:has(img):not(:has(iframe,video))::before,
#ot-article-body > .wp-block-image:has(img):not(:has(figure,iframe,video))::before {
  content:''; display:block; background:#0956a5; height:5px; margin:0 -12px 12px;
}
#ot-article-body > .wp-block-image > figure:has(img) {margin:0; border:1px solid #b9cee6; border-bottom:4px solid #ffd400; border-radius:10px; overflow:hidden; padding:0 12px 12px; background:#fff;}
#ot-article-body > .wp-block-image > figure:has(img)::before {content:''; display:block; background:#0956a5; height:5px; margin:0 -12px 12px;
}
