/* One non-executing textbook prose surface for the runtime reader and CMS preview. */
.textbook-prose{
  box-sizing:border-box;max-width:850px;min-width:0;width:100%;
  color:var(--ink,var(--text,#26362f));
  font:400 1.0625rem/1.78 -apple-system,BlinkMacSystemFont,"Segoe UI","Noto Sans KR",sans-serif;
  word-break:keep-all;overflow-wrap:anywhere
}
.textbook-prose :is(h2,h3,h4,h5,h6){line-height:1.44;margin:1.55em 0 .65em;font-weight:750;letter-spacing:-.015em}
.textbook-prose h2{font-size:1.43rem}
.textbook-prose h3{font-size:1.2rem}
.textbook-prose :is(h4,h5,h6){font-size:1.06rem}
.textbook-prose :is(p,ul,ol,blockquote){margin:0 0 1.05em}
.textbook-prose :is(ul,ol){padding-inline-start:1.65em}
.textbook-prose li{margin-block:.36em}
.textbook-prose :is(a,code){overflow-wrap:anywhere}
.textbook-prose :not(pre)>code{padding:.08em .28em;border:1px solid #c8d2c6;border-radius:4px;background:#eaf0e8;color:#294a37;font:inherit;font-family:ui-monospace,Menlo,Consolas,monospace;font-size:.88em}
.textbook-prose pre{
  box-sizing:border-box;width:100%;max-width:100%;min-width:0;
  padding:1rem;margin:1.2em 0;background:#f4f6f3;color:#283b32;border:1px solid #c9d2cb;
  border-radius:9px;overflow:auto;white-space:pre;overflow-wrap:normal;word-break:normal;tab-size:4;
  font:.9rem/1.65 ui-monospace,Menlo,Consolas,monospace
}
.textbook-prose pre code{font:inherit;white-space:pre;overflow-wrap:normal;word-break:normal}
.textbook-prose .table-wrap{max-width:100%;margin:1.2em 0;overflow-x:auto;overscroll-behavior-inline:contain}
.textbook-prose table{width:max-content;min-width:100%;max-width:none;border-collapse:collapse}
.textbook-prose :is(td,th){padding:.5rem .75rem;text-align:left;border:1px solid #c9d2cb;min-width:6rem;max-width:25rem;word-break:normal;overflow-wrap:anywhere}
.textbook-prose th{background:#eef1ee;font-weight:700}
.textbook-prose blockquote{margin:1.1rem 0;padding:.45rem 1rem;border-inline-start:3px solid #90a898;background:#f5f7f3}
.textbook-prose .runtime-rich-embed iframe{max-width:100%}
.textbook-prose .textbook-image{display:inline-block;box-sizing:border-box;max-width:100%;height:auto;vertical-align:middle}
.textbook-prose p>.textbook-image:only-child{display:block;margin:1.2em 0}
@media(forced-colors:active){.textbook-prose pre,.textbook-prose blockquote{border-color:CanvasText;background:Canvas;color:CanvasText}}
@media print{.textbook-prose pre{background:#fff;color:#000}}

/* Optional rich Markdown elements. Textbook content stays in Markdown. */
.textbook-prose .runtime-rich-math-block{max-width:100%;overflow-x:auto;padding:10px 4px;text-align:center}
.textbook-prose .runtime-rich-math-inline{white-space:nowrap}
.textbook-prose .runtime-rich-mermaid{max-width:100%;overflow-x:auto;margin:22px 0}
.textbook-prose .runtime-rich-mermaid svg{display:block;max-width:100%;height:auto;margin:auto}
.textbook-prose .runtime-rich-embed{max-width:100%;margin:24px 0;border:1px solid var(--line,#c9d2cb);border-radius:12px;overflow:hidden}
.textbook-prose .runtime-rich-embed figcaption{padding:8px 14px;background:#f8fafc}
.textbook-prose .runtime-rich-embed iframe{display:block;width:100%;height:490px;border:0;background:#fff}
.textbook-prose .runtime-rich-warning{padding:8px 14px;background:#fff8e8;border-left:3px solid #d7a441;color:#594319;font-size:.85rem}
@media(max-width:680px){.textbook-prose .runtime-rich-embed iframe{height:380px}}
