/* Native math workbench. Styles, variables and icon symbols are isolated from the host page. */
.math-case-section{padding-block:var(--section-padding)}.math-case-section>.container>.section-heading{display:block;margin-bottom:24px}
#math-demo{container:math-layout / inline-size;--ink:#20334f;--blue:#365f97;--muted:#617995;--line:#dce5f1;--green:#3f8576;--surface:#fff;--window-height:340px;--workspace-height:380px;--e1:#4778b6;--e2:#b48036;--e3:#8271b0;color:var(--ink);font-family:var(--sans);min-width:0}
#math-demo .math-case-heading h3{margin:0;color:#000;font-size:clamp(1.25rem,2vw,1.5rem);line-height:1.5;font-weight:550;letter-spacing:-.035em}
#math-demo .math-case-background{margin:12px 0 22px;color:#000;font-size:1.0625rem;line-height:1.9}
#math-demo .math-case-background a{text-decoration:underline;text-decoration-color:#bdcfe7;text-underline-offset:4px}
#math-demo .math-noscript{padding:12px 0;color:#617997}
@media(max-width:600px){#math-demo .math-case-background{font-size:1rem;margin-bottom:18px}.math-case-section>.container>.section-heading{margin-bottom:20px}}
#math-demo *{box-sizing:border-box}
#math-demo h1,#math-demo h2,#math-demo h3,#math-demo h4,#math-demo h5,#math-demo p{margin:0}
#math-demo button{font:inherit;cursor:pointer}
#math-demo a{color:var(--blue)}
#math-demo button:focus-visible,#math-demo summary:focus-visible,#math-demo a:focus-visible,#math-demo [tabindex]:focus-visible{outline:2px solid #779bc9;outline-offset:3px}
#math-demo button,#math-demo summary{touch-action:manipulation}
#math-demo [hidden]{display:none!important}
#math-demo .icon{width:20px;height:20px;display:block;flex-shrink:0;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}
#math-demo .icon-library{position:absolute;width:0;height:0;overflow:hidden}
#math-demo .sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
#math-demo h4{font-size:1rem;line-height:1.6;font-weight:550;color:#355b8c}
#math-demo .section-label{font-size:.875rem;line-height:1.6;font-weight:400;color:#657d9b;letter-spacing:.04em}
#math-demo .problem,#math-demo .answer{position:relative;border:1px solid var(--line);border-radius:9px;background:var(--surface);padding:15px 19px}
#math-demo .problem{display:grid;grid-template-columns:auto minmax(0,1fr);align-items:center;gap:0 14px}
#math-demo .problem h4{font-size:1rem;font-weight:550;line-height:1.6}
#math-demo .problem>.problem-details{grid-column:1/-1}
#math-demo .disclosure>summary{position:absolute;right:15px;top:11px;min-height:32px;padding:5px 8px;display:flex;align-items:center;gap:4px;list-style:none;font-size:.875rem;line-height:1.5;color:#597da9;border:1px solid #dce6f2;border-radius:5px;background:#f8fbff;cursor:pointer}
#math-demo .disclosure>summary::-webkit-details-marker{display:none}
#math-demo .disclosure>summary:hover{background:#edf3fb}
#math-demo .disclosure>summary>.icon{width:16px;height:16px}
#math-demo .disclosure[open]>summary>.icon{transform:rotate(180deg)}
#math-demo .when-open,#math-demo .disclosure[open] .when-closed{display:none}
#math-demo .disclosure[open] .when-open{display:inline}
#math-demo .disclosure-content{padding-top:14px;color:#5d7594;font-size:1rem;line-height:1.85}
#math-demo .disclosure-content p+p{margin-top:12px}
#math-demo [data-task-target]{border-bottom:2px solid #c5d9f0}
#math-demo .answer{margin-top:16px}
#math-demo .answer .section-label{margin-bottom:7px;min-height:24px;padding-right:110px}
#math-demo .answer-summary{font-size:1rem;line-height:1.75;font-weight:500;color:#3d6393}
#math-demo .proof{padding-top:16px}
#math-demo .page-footer{padding:13px 0 0;font-size:.875rem;line-height:1.7;color:#7c90aa}
#math-demo .trace-details{max-width:900px}
#math-demo .trace-details>summary{list-style:none;cursor:pointer;color:#6d88ad;display:inline-block}
#math-demo .trace-details>summary::-webkit-details-marker{display:none}
#math-demo .trace-details>summary:hover{text-decoration:underline;text-underline-offset:3px}
#math-demo .trace-content{padding-top:10px;font-size:.875rem;line-height:1.8;color:#637e9f}
#math-demo .trace-content ol{padding-left:20px;margin:8px 0}
#math-demo .trace-content a{text-underline-offset:3px}
#math-demo .trace-content code{font-size:.875rem;overflow-wrap:anywhere}
#math-demo .learning-case{margin-top:14px;padding:0;border:1px solid #d8e3f0;border-radius:10px;background:#f5f8fd;overflow:hidden}
#math-demo .player-toolbar{position:relative;display:flex;align-items:stretch;justify-content:space-between;gap:12px;padding:0 14px;background:#fff;border-bottom:1px solid #e0e8f2}
#math-demo .player-tabs{display:grid;grid-template-columns:repeat(5,1fr);flex:1;max-width:490px}
#math-demo .player-tabs>button{position:relative;min-width:0;min-height:47px;border:0;background:transparent;padding:10px 7px;color:#7a8da6;font-size:.875rem}
#math-demo .player-tabs>button:after{content:"";position:absolute;height:2px;bottom:-1px;left:10px;right:10px;background:#4777b1;transform:scaleX(0);transition:transform .25s}
#math-demo .player-tabs>button:hover{color:#2c5596;background:#f5f8fd}
#math-demo .player-tabs>button[aria-selected=true]{color:#2c5596;font-weight:600}
#math-demo .player-tabs>button[aria-selected=true]:after{transform:scaleX(1)}
#math-demo .player-controls{display:flex;gap:5px;align-items:center}
#math-demo .player-controls button{display:flex;align-items:center;justify-content:center;gap:6px;border:0;border-radius:5px;padding:6px 9px;color:#55779f;background:transparent;font-size:.875rem;min-height:36px}
#math-demo .player-controls [data-play]{background:#f2f6fc;min-width:76px}
#math-demo .player-controls button:hover{background:#e9f0fa}
#math-demo .player-controls svg{width:14px;height:14px;fill:currentColor}
#math-demo .player-meter{position:absolute;bottom:-1px;height:2px;left:0;right:0;pointer-events:none;background:#e9eff7}
#math-demo .player-meter i{display:block;width:calc(var(--player-progress,0) * 100%);height:100%;background:linear-gradient(90deg,#668cbd,#9b8dc7)}
#math-demo #math-player-panel{padding:13px 17px 17px}
#math-demo .model-analysis{min-height:99px;margin:0 3px 12px;padding:0 0 0 13px;border-left:2px solid #6b8db7;display:grid;grid-template-columns:minmax(0,1fr) auto;gap:5px 14px;align-content:center}
#math-demo .analysis-heading{grid-column:1/-1;display:flex;flex-wrap:wrap;align-items:center;gap:7px 10px;min-width:0}
#math-demo .analysis-heading>span{font-size:.8125rem;color:#70839d;white-space:nowrap}
#math-demo .analysis-heading h3{font-size:.9375rem;line-height:1.5;font-weight:550;color:#355678}
#math-demo .model-analysis>p{font-size:1rem;line-height:1.65;color:#526e91;min-width:0}
#math-demo .analysis-sources{display:flex;align-items:center;gap:5px;align-self:center}
#math-demo .source-chip{display:inline-flex;align-items:center;justify-content:center;min-width:29px;min-height:25px;margin-left:3px;padding:2px 6px;border:1px solid currentColor;border-radius:4px;background:#fff;font-size:.8125rem;font-weight:550;line-height:1.4;vertical-align:middle}
#math-demo .source-E1{color:var(--e1)}
#math-demo .source-E2{color:var(--e2)}
#math-demo .source-E3{color:var(--e3)}
#math-demo .source-chip:hover,#math-demo .source-chip[aria-pressed=true]{box-shadow:0 0 0 2px #ffffffb3;background:#eef3fc}
#math-demo .textbook-workspace{display:grid;grid-template-columns:188px minmax(0,1fr);gap:10px;align-items:stretch;height:var(--workspace-height)}
#math-demo .textbook-pane,#math-demo .source-reader,#math-demo .canvas-column{min-width:0;border:1px solid #d5e0ef;border-radius:7px;background:#fff;overflow:hidden}
#math-demo .textbook-pane{display:flex;flex-direction:column;background:#f8fbff}
#math-demo .pane-heading{display:flex;gap:8px;align-items:center;padding:10px 12px;min-height:40px;border-bottom:1px solid #e1e9f4;color:#55769f}
#math-demo .pane-heading .icon{width:18px;height:18px}
#math-demo .pane-heading h3{font-size:.9375rem;font-weight:550;line-height:1.4}
#math-demo .textbook-tree{padding:7px 6px;min-height:0;flex:1;overflow:auto;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:#b6c9e2 transparent}
#math-demo .toc-level{list-style:none;margin:0;padding:0}
#math-demo .toc-level .toc-level{padding-left:10px;border-left:1px solid #dce7f5;margin-left:5px}
#math-demo .toc-branch>summary{position:relative;list-style:none;display:flex;gap:6px;align-items:center;cursor:pointer;padding:9px 4px 9px 15px;font-size:.875rem;color:#5c7391;line-height:1.5}
#math-demo .toc-branch>summary::-webkit-details-marker{display:none}
#math-demo .toc-branch>summary:before{content:"";position:absolute;left:3px;top:16px;width:5px;height:5px;border-right:1px solid #7993b6;border-bottom:1px solid #7993b6;transform:rotate(-45deg)}
#math-demo .toc-branch[open]>summary:before{transform:rotate(45deg);top:14px}
#math-demo .toc-book>summary{font-weight:550;color:#365b8d;padding-top:10px;padding-bottom:10px}
#math-demo .book-volume{font-size:.75rem;white-space:nowrap;padding:2px 4px;color:#537aa9;background:#e8f0fc;border-radius:3px}
#math-demo .toc-leaf{width:100%;display:flex;align-items:center;gap:4px;min-height:35px;padding:7px 5px;text-align:left;line-height:1.5;font-size:.875rem;border:1px solid transparent;border-radius:4px;background:transparent;color:#6b809b}
#math-demo .toc-leaf>span:first-child{flex:1;min-width:0}
#math-demo .toc-leaf:hover{background:#edf3fc;color:#365f97}
#math-demo .toc-citation{font-size:.75rem;color:#8192ab}
#math-demo .toc-leaf.is-focused{color:#315d96;background:#e8f0fc;border-color:#c5d8f1}
#math-demo .toc-leaf.is-read .toc-citation{color:#3d8475}
#math-demo .toc-leaf.is-read .toc-citation:before{content:"✓ ";font-size:.6875rem}
#math-demo .toc-leaf.is-previewed{box-shadow:inset 2px 0 #7b9bc6}
#math-demo .canvas-column{background:#f8fbff;display:flex;flex-direction:column}
#math-demo .tool-action{display:flex;gap:7px;align-items:center;min-height:39px;padding:8px 11px;border-bottom:1px solid #dee8f4;color:#6681a3;font-size:.875rem;line-height:1.5}
#math-demo .tool-action .icon{width:17px;height:17px}
#math-demo .tool-action>span{white-space:nowrap}
#math-demo .tool-action code{margin-left:auto;font-size:.8125rem;color:#3e6699;overflow-wrap:anywhere;line-height:1.5;text-align:right}
#math-demo .learning-scroll{height:var(--window-height);overflow-x:hidden;overflow-y:auto;overscroll-behavior-y:contain;scrollbar-width:thin;scrollbar-color:#adc4e2 #edf3fb;scrollbar-gutter:stable;position:relative;touch-action:pan-y}
#math-demo .learning-scroll:focus-visible{outline-offset:-2px}
#math-demo .learning-scroll::-webkit-scrollbar{width:5px}
#math-demo .learning-scroll::-webkit-scrollbar-track{background:#edf3fb}
#math-demo .learning-scroll::-webkit-scrollbar-thumb{border-radius:6px;background:#adc4e2}
#math-demo .scroll-space{height:2800px;position:relative}
#math-demo .stage-window{position:sticky;top:0;height:var(--window-height);overflow:hidden}
#math-demo .math-scene{height:100%;padding:15px 15px 14px;--scene-reveal:0}
#math-demo .math-scene>section{height:100%;min-width:0}
#math-demo h4{font-size:1rem;line-height:1.6;font-weight:550;color:#355b8c}
#math-demo .scene-caption{font-size:.875rem;line-height:1.7;color:#7891ad}
#math-demo .formula{display:flex;align-items:center;justify-content:center;gap:5px;min-height:47px;color:#3c6397;font-size:1.125rem}
#math-demo math{font-family:"STIX Two Math","Cambria Math",serif;font-size:1.2em;max-width:100%}
#math-demo .source-reader{flex:1;min-height:0;border:0;border-radius:0;overflow-y:auto;padding:13px 15px;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:#b6c9e2 transparent;background:#fcfdff}
#math-demo .reader-heading{display:flex;align-items:center;gap:7px;font-size:.875rem;color:#587fae;margin-bottom:11px}
#math-demo .reader-heading .icon{width:17px;height:17px}
#math-demo .source-reader h3{font-size:1rem;line-height:1.6;font-weight:550;color:#375d8b;margin-bottom:12px}
#math-demo .reader-goal{padding:11px 12px;border-left:2px solid #7e9fc7;background:#f1f6fd;margin-top:10px}
#math-demo .reader-goal b{font-size:.875rem;color:#4c709e}
#math-demo .reader-goal p{font-size:1rem;line-height:1.65;margin-top:3px;color:#54708e}
#math-demo .source-reader blockquote{font-size:1rem;line-height:1.85;margin:0;padding:11px 12px;border-left:2px solid #88a9cf;background:#f1f5fc;color:#425e7e;overflow-wrap:anywhere}
#math-demo .source-reader blockquote[lang=en]{font-family:Georgia,serif}
#math-demo .source-reader mark,#math-demo .paper-card mark{color:inherit;background:linear-gradient(#cfe1fb,#cfe1fb) left 94%/calc(100% * var(--evidence-ink,0)) 55% no-repeat;padding:2px 0}
#math-demo .source-reader[data-source=E2] blockquote{border-left-color:#c1a16e;background:#faf7f0}
#math-demo .source-reader[data-source=E2] mark{background-image:linear-gradient(#eedfbd,#eedfbd)}
#math-demo .source-reader[data-source=E3] blockquote{border-left-color:#a296c8;background:#f4f1fa}
#math-demo .source-reader[data-source=E3] mark{background-image:linear-gradient(#e1d9f4,#e1d9f4)}
#math-demo .reader-formula-label{font-size:.8125rem;line-height:1.6;color:#7387a0;margin-top:12px}
#math-demo .reader-formula{padding:8px 0 13px;text-align:center;color:#3e6393;font-size:1.125rem;border-bottom:1px solid #e2eaf4;overflow-x:auto}
#math-demo .reader-application{font-size:1rem;line-height:1.8;color:#617997;margin-top:13px}
#math-demo .reader-context{font-size:.9375rem;line-height:1.75;color:#617997;margin-bottom:7px}
#math-demo .reader-derived{padding:12px 0 0;color:#3f6597;text-align:center}
#math-demo .original-page{display:inline-block;margin-top:12px;font-size:.875rem;line-height:1.6;text-underline-offset:3px}
#math-demo .read-scene{display:grid;grid-template-columns:minmax(0,.85fr) minmax(0,1fr);align-items:center;gap:13px}
#math-demo .read-lattice{padding:8px 0;background:#edf4fd;border-radius:50%;border:1px solid #deebfa}
#math-demo .lattice{width:100%;height:auto;display:block;overflow:visible}
#math-demo .lattice-node.is-even{fill:#88a8d0}
#math-demo .lattice-node.is-odd{fill:#c8d6e8}
#math-demo .lattice-path{fill:none;stroke:#557daf;stroke-width:2;stroke-dasharray:1;stroke-dashoffset:calc(1 - var(--scene-reveal));opacity:.6}
#math-demo .lattice-origin{fill:#f8fbff;stroke:#527eb7;stroke-width:1.5}
#math-demo .lattice-walker{fill:#4778b6;stroke:#f8fbff;stroke-width:2;transition:cx .2s,cy .2s}
#math-demo .lattice text{font-size:14px;fill:#5e7da3}
#math-demo .task-goals h4{margin:4px 0 15px}
#math-demo .task-goal{padding:10px 11px;margin-top:10px;border:1px solid #ccdef2;border-radius:5px;background:#f0f6fe}
#math-demo .task-goal b{display:block;color:#547baa;font-size:.875rem;line-height:1.6;font-weight:500}
#math-demo .task-goal strong{display:block;color:#355e92;font-size:1rem;line-height:1.6;font-weight:550}
#math-demo .goal-finite{border-color:#d9d2e9;background:#f5f2fa}
#math-demo .goal-finite b,#math-demo .goal-finite strong{color:#76638f}
#math-demo .route-scene{display:flex;flex-direction:column;justify-content:center;gap:24px}
#math-demo .book-selection{display:flex;gap:14px;align-items:center}
#math-demo .book-cover{width:67px;height:81px;flex-shrink:0;background:#e0ebfa;border:1px solid #b9cde9;border-left:5px solid #7197c7;border-radius:3px 6px 6px 3px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;color:#416d9f;box-shadow:3px 4px 0 #e8eef7}
#math-demo .book-cover .icon{width:25px;height:25px}
#math-demo .book-cover b{font-size:.8125rem;font-weight:550}
#math-demo .book-selection p{color:#7389a4;font-size:.9375rem;line-height:1.7;margin-top:5px}
#math-demo .chapter-route{display:flex;flex-direction:column;gap:12px;padding-left:20px;position:relative}
#math-demo .chapter-route:before{content:"";position:absolute;left:7px;top:20px;bottom:20px;border-left:1px solid #b9cce6}
#math-demo .route-node{position:relative;padding:10px 13px;border:1px solid #d8e4f3;border-radius:5px;color:#7188a4;background:#fff;font-size:1rem;line-height:1.5}
#math-demo .route-node:before{content:"";position:absolute;left:-17px;top:17px;width:6px;height:6px;border-radius:50%;background:#bacde5;box-shadow:0 0 0 4px #f8fbff}
#math-demo .route-scan{color:#899bb1;background:#f5f8fc}
#math-demo .route-current{color:#537baa}
#math-demo .route-target{transition:background .25s,border-color .25s}
#math-demo .route-target.is-located{background:#e9f1fc;color:#335d92;border-color:#93b2db}
#math-demo .route-target.is-located:before{background:#4778b6}
#math-demo .criterion-scene,#math-demo .theorem-scene{display:flex;flex-direction:column;justify-content:center;gap:16px}
#math-demo .paper-card{border:1px solid #d3e0f0;border-radius:7px;background:#fff;padding:15px;box-shadow:0 5px 15px -12px #416d9f66}
#math-demo .paper-heading{display:flex;justify-content:space-between;align-items:center;gap:10px;margin-bottom:12px}
#math-demo .paper-card>p{font-size:1rem;line-height:1.85;color:#5f7897}
#math-demo .paper-card .formula{margin-top:15px;background:#f3f7fd;border-radius:5px;padding:11px 4px}
#math-demo .criterion-paper>p,#math-demo .criterion-paper>.formula{opacity:.2;transition:opacity .4s}
#math-demo .criterion-paper.has-returned>p,#math-demo .criterion-paper.has-returned>.formula{opacity:1}
#math-demo .knowledge-gap{display:flex;align-items:center;gap:12px;border:1px dashed #c7aa73;border-radius:6px;padding:12px 14px;background:#fbf8f0;color:#a47b39;opacity:.18;transform:translateY(7px);transition:opacity .35s,transform .35s}
#math-demo .knowledge-gap.is-visible{opacity:1;transform:none}
#math-demo .knowledge-gap .icon{width:27px;height:27px}
#math-demo .knowledge-gap span{display:block;font-size:.8125rem;line-height:1.5;color:#9c8258}
#math-demo .knowledge-gap strong{font-size:1rem;line-height:1.6;font-weight:500}
#math-demo .search-scene{display:flex;flex-direction:column;gap:10px}
#math-demo .search-query{min-height:37px;display:flex;align-items:center;gap:9px;padding:7px 11px;border:1px solid #bbcee8;border-radius:5px;background:#fff;color:#5c7eaa}
#math-demo .search-query code{font-size:1rem;letter-spacing:.02em}
#math-demo .search-query code:after{content:"";display:inline-block;height:16px;border-left:1px solid #7896be;margin-left:3px;vertical-align:middle}
#math-demo .parity-explainer{display:grid;grid-template-columns:145px 1fr;align-items:center;gap:7px;min-height:96px}
#math-demo .parity-explainer .lattice{max-height:104px}
#math-demo .parity-explainer strong{display:block;font-size:.9375rem;line-height:1.7;color:#527baa}
#math-demo .parity-explainer span{display:block;font-size:.875rem;line-height:1.7;color:#6b829e}
#math-demo .search-hits{display:grid;gap:8px}
#math-demo .search-hit{display:flex;gap:6px;align-items:center;justify-content:space-between;padding:10px 11px;border:1px solid #d8e3f2;border-radius:5px;background:#fff}
#math-demo .search-hit b{font-size:.875rem;font-weight:550;line-height:1.5;color:#5d7da4}
#math-demo .search-hit p{font-size:.875rem;line-height:1.6;color:#6d829d;margin-top:3px}
#math-demo .search-hit.is-relevant{border-color:#b5a7d5;background:#f4f1fa}
#math-demo .search-hit.is-relevant b{color:#746195}
#math-demo .theorem-paper{padding:13px 14px}
#math-demo .theorem-paper .paper-heading{margin-bottom:8px}
#math-demo .theorem-paper>p{font-size:.9375rem}
#math-demo .theorem-paper>.adjacent-formula{font-family:Georgia,serif;font-size:1.125rem;flex-wrap:wrap;gap:3px;line-height:1.7;margin-top:10px;opacity:.15;transition:opacity .35s}
#math-demo .theorem-paper.has-returned>.adjacent-formula{opacity:1}
#math-demo .adjacent-pair{border-radius:3px;background:#e2daf2;padding:1px 4px}
#math-demo .theorem-checks{display:flex;flex-wrap:wrap;gap:8px 13px;margin-top:14px}
#math-demo .theorem-checks>span{display:flex;align-items:center;gap:4px;color:#8495ab;font-size:.8125rem;line-height:1.6}
#math-demo .theorem-checks .icon{width:15px;height:15px;opacity:.15}
#math-demo .theorem-checks>span.is-checked{color:#478174}
#math-demo .theorem-checks>span.is-checked .icon{opacity:1}
#math-demo .applied-estimate{padding:10px 12px;border:1px solid #d2e3dd;background:#f0f7f4;border-radius:6px;opacity:.2;transition:opacity .35s}
#math-demo .applied-estimate.is-visible{opacity:1}
#math-demo .applied-estimate>span{font-size:.875rem;color:#63877c;line-height:1.7}
#math-demo .applied-estimate .formula{color:#3d7d6e;min-height:37px}
#math-demo .proof-scene{position:relative;display:grid;grid-template-columns:87px minmax(0,1fr);gap:36px;align-items:center}
#math-demo .proof-origins{display:flex;flex-direction:column;gap:25px;z-index:1}
#math-demo .proof-origin{padding:8px 5px;border:1px solid currentColor;background:#fff;border-radius:6px;min-height:61px;display:flex;flex-direction:column;align-items:center;gap:5px}
#math-demo .proof-origin b{font-size:.875rem;line-height:1.4}
#math-demo .proof-origin span{font-size:.8125rem;line-height:1.4}
#math-demo .proof-lines{position:absolute;inset:0;width:100%;height:100%;overflow:visible;pointer-events:none}
#math-demo .proof-edge{fill:none;stroke-width:1.5;stroke-dasharray:1;opacity:.7}
#math-demo .edge-E1{stroke:var(--e1)}
#math-demo .edge-E2{stroke:var(--e2)}
#math-demo .edge-E3{stroke:var(--e3)}
#math-demo .proof-steps{position:relative;display:flex;flex-direction:column;gap:9px}
#math-demo .proof-step{padding:9px 10px;background:#fff;border:1px solid #d4e1f2;border-radius:6px;opacity:0;transform:translateY(7px);transition:opacity .25s,transform .25s;min-width:0}
#math-demo .proof-step.is-visible{opacity:1;transform:none}
#math-demo .proof-step h4{display:flex;align-items:center;gap:1px;font-size:.875rem;line-height:1.5;flex-wrap:wrap}
#math-demo .proof-step h4 .source-chip:first-of-type{margin-left:auto}
#math-demo .proof-step .source-chip{font-size:.75rem;min-height:21px;min-width:24px;padding:1px 4px}
#math-demo .proof-step .formula{min-height:33px;font-size:.9375rem}
#math-demo .cancellation{color:#5b7494;font-family:Georgia,serif;font-size:1.0625rem;text-align:center;padding:8px 0 2px}
#math-demo .odd-term{display:inline-block;position:relative;transition:color .25s}
#math-demo .odd-term i{position:absolute;font-style:normal;font-size:.8125rem;top:-11px;left:45%;color:#9e7c40;opacity:0}
#math-demo .odd-term.is-cancelled{color:#9ba7b8}
#math-demo .odd-term.is-cancelled:after{content:"";position:absolute;height:1px;background:#a98d57;left:-1px;right:-2px;top:52%;transform:rotate(-8deg)}
#math-demo .odd-term.is-cancelled i{opacity:1}
#math-demo .compact-estimate{color:#416d9f;text-align:center;font-size:.9375rem;opacity:0;max-height:0;overflow:hidden;transition:opacity .3s,max-height .3s}
#math-demo .compact-estimate.is-visible{max-height:34px;opacity:1;padding-top:3px}
#math-demo .answer-scene{display:flex;flex-direction:column;justify-content:center;gap:20px}
#math-demo .answer-scene>h4{text-align:center;font-size:1.0625rem}
#math-demo .dimension-cards{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px}
#math-demo .dimension-card{padding:15px 6px;border:1px solid #c8dddb;border-radius:7px;background:#f0f7f5;text-align:center;opacity:0;transform:translateY(9px);transition:opacity .3s,transform .3s}
#math-demo .dimension-card.is-visible{opacity:1;transform:none}
#math-demo .dimension-card h5{font-size:.9375rem;line-height:1.6;font-weight:500;color:#4d7f76}
#math-demo .dimension-formula{min-height:72px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px;color:#3c756a;font-size:1.25rem}
#math-demo .dimension-formula small{font-size:.8125rem}
#math-demo .series-state{font-size:.875rem;line-height:1.5;color:#5b8b81;border-bottom:1px solid #d3e4de;display:block;padding-bottom:10px;margin-bottom:10px}
#math-demo .dimension-card strong{display:block;font-size:.875rem;font-weight:550;line-height:1.6;color:#497a70}
#math-demo .dimension-many{border-color:#d3cbe5;background:#f4f1f9}
#math-demo .dimension-many h5,#math-demo .dimension-many .dimension-formula,#math-demo .dimension-many strong,#math-demo .dimension-many .series-state{color:#7b6799}
#math-demo .dimension-many .series-state{border-bottom-color:#e0d8ed}
#math-demo .answer-qualification{font-size:.875rem;line-height:1.8;color:#6d839e;text-align:center}
#math-demo .math-scene section{animation:math-case-scene-in .22s ease-out}
@keyframes math-case-scene-in{from{opacity:.45;transform:translateY(4px)}to{opacity:1;transform:none}}
#math-demo .reader-toggle{display:inline-flex;align-items:center;justify-content:center;gap:5px;flex-shrink:0;margin-left:auto;padding:5px 9px;min-height:31px;border:1px solid #c9d9ee;border-radius:5px;background:#f4f8fe;color:#5277a4;font-size:.875rem;line-height:1.5;white-space:nowrap}
#math-demo .reader-toggle:hover{background:#e8f0fc}
#math-demo .reader-toggle .icon{width:15px;height:15px}
#math-demo .reader-toggle[aria-expanded=true] .icon{transform:rotate(180deg)}
#math-demo .learning-case.is-reader-open .textbook-workspace{grid-template-columns:188px minmax(0,1fr) 280px}
#math-demo .reader-pane{height:var(--workspace-height);min-width:0;min-height:0;display:flex;flex-direction:column;border:1px solid #d5e0ef;border-radius:7px;background:#fcfdff;overflow:hidden;animation:math-reader-enter .18s ease-out}
#math-demo .reader-pane-heading{min-height:39px;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:7px 12px;border-bottom:1px solid #e1e9f4;background:#f8fbff}
#math-demo .reader-pane-heading h3{font-size:.875rem;line-height:1.6;font-weight:550;color:#55769f}
#math-demo .reader-pane-heading button{padding:3px 7px;border:0;border-radius:4px;background:transparent;color:#6382a7;font-size:.875rem;line-height:1.6}
#math-demo .reader-pane-heading button:hover{background:#e8f0fc}
@keyframes math-reader-enter{from{opacity:0;transform:translateX(6px)}to{opacity:1;transform:none}}
@container math-layout (max-width:800px){#math-demo .learning-case{--workspace-height:auto}
#math-demo .textbook-workspace,#math-demo .learning-case.is-reader-open .textbook-workspace{grid-template-columns:175px minmax(0,1fr);height:auto}
#math-demo .reader-pane{grid-column:1/-1;height:300px}
#math-demo .textbook-pane,#math-demo .canvas-column{height:380px}
}
@container math-layout (max-width:590px){#math-demo .problem{grid-template-columns:minmax(0,1fr);padding:12px 15px;gap:6px}
#math-demo .problem h4{font-size:1rem}
#math-demo .disclosure>summary{right:11px;top:8px}
#math-demo .learning-case{--window-height:324px}
#math-demo #math-player-panel{padding:12px 10px 10px}
#math-demo .model-analysis{padding-left:10px;min-height:116px;display:block}
#math-demo .analysis-heading{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:6px 8px}
#math-demo .analysis-heading>span{grid-column:1;grid-row:1}
#math-demo .analysis-heading h3{grid-column:1/-1;grid-row:2}
#math-demo .reader-toggle{grid-column:2;grid-row:1;font-size:.8125rem;padding-inline:6px}
#math-demo .analysis-heading>span{font-size:.8125rem}
#math-demo .analysis-heading h3{font-size:.9375rem;margin-top:3px}
#math-demo .model-analysis>p{margin-top:5px;line-height:1.75}
#math-demo .analysis-sources{display:inline-flex;margin-top:6px;gap:5px}
#math-demo .analysis-sources:empty{display:none}
#math-demo .textbook-workspace,#math-demo .learning-case.is-reader-open .textbook-workspace{grid-template-columns:minmax(0,1fr);height:auto;gap:10px}
#math-demo .reader-pane{height:280px}
#math-demo .textbook-pane{height:149px}
#math-demo .pane-heading{min-height:35px;padding:7px 11px}
#math-demo .textbook-tree{padding-top:3px}
#math-demo .toc-branch>summary{padding-block:6px}
#math-demo .toc-branch>summary:before{top:12px}
#math-demo .toc-branch[open]>summary:before{top:10px}
#math-demo .toc-leaf{min-height:32px;padding-block:5px}
#math-demo .canvas-column{height:364px}
#math-demo .math-scene{padding:14px 12px}
#math-demo .tool-action{padding-inline:10px;min-height:39px}
#math-demo .source-reader{padding:12px 14px}
#math-demo .source-reader h3{margin-bottom:10px}
#math-demo .reader-application{margin-top:13px;line-height:1.75}
#math-demo .reader-goal{padding:8px 11px;margin-top:8px}
#math-demo .reader-heading{margin-bottom:8px}
#math-demo .answer{padding:12px 15px}
#math-demo .answer-summary{font-size:1rem;line-height:1.75}
#math-demo .read-scene{gap:10px}
#math-demo .task-goals h4{margin-bottom:9px}
#math-demo .task-goal{padding:9px 10px;margin-top:8px}
#math-demo .parity-explainer{grid-template-columns:125px 1fr;gap:9px}
#math-demo .search-hit{padding:8px 9px}
#math-demo .theorem-checks{gap:6px 10px}
#math-demo .proof-scene{grid-template-columns:79px minmax(0,1fr);gap:28px}
#math-demo .proof-step{padding:9px 8px}
#math-demo .proof-step h4{font-size:.8125rem}
#math-demo .proof-origin{min-height:60px}
#math-demo .proof-origin span{font-size:.75rem}
#math-demo .dimension-cards{gap:7px}
#math-demo .dimension-card{padding:15px 5px}
#math-demo .dimension-card h5{font-size:.875rem}
#math-demo .dimension-card strong{font-size:.8125rem}
#math-demo .page-footer{padding-top:12px}
#math-demo .reader-context{margin-bottom:7px}
#math-demo .reader-formula-label{margin-top:12px}
#math-demo .reader-formula{padding:8px 0 13px}
#math-demo .reader-derived{display:block;padding:12px 0 0}
#math-demo .original-page{margin-top:12px}
}
@media(max-width:480px){
#math-demo .player-toolbar{flex-wrap:wrap;gap:0;padding:0 8px}
#math-demo .player-tabs{flex-basis:100%;max-width:none}
#math-demo .player-tabs>button{min-height:44px}
#math-demo .player-controls{justify-content:flex-end;width:100%;padding:7px 0;border-top:1px solid #edf1f7}
}
@container math-layout (max-width:350px){
#math-demo .read-scene{grid-template-columns:minmax(0,.7fr) minmax(0,1fr)}
#math-demo .task-goals h4{font-size:.9375rem}
#math-demo .proof-scene{grid-template-columns:67px minmax(0,1fr);gap:23px}
#math-demo .proof-origin span{font-size:.75rem}
#math-demo .math-scene{padding-inline:10px}
#math-demo .proof-step .formula{font-size:.875rem}
#math-demo .parity-explainer{grid-template-columns:110px 1fr}
#math-demo .search-hit p{font-size:.8125rem}
#math-demo .tool-action{font-size:.8125rem}
#math-demo .tool-action code{font-size:.75rem}
}
@media(prefers-reduced-motion:reduce){#math-demo *,#math-demo *:before,#math-demo *:after{scroll-behavior:auto!important;animation:none!important;transition:none!important}
#math-demo .proof-step,#math-demo .dimension-card{transform:none}
#math-demo .lattice-path{stroke-dashoffset:0}
#math-demo .source-reader mark,#math-demo .paper-card mark{background-size:100% 55%}
}
#math-demo .reader-task{font-size:1rem;line-height:1.8;color:#617997;margin-bottom:12px}
#math-demo .lattice[data-parity="1"] .lattice-walker{fill:#b18a48}
#math-demo .toc-book>summary{min-height:52px}
#math-demo .toc-book>summary:before{top:23px}
#math-demo .toc-book[open]>summary:before{top:21px}
@container math-layout (max-width:590px){#math-demo .toc-book>summary{min-height:42px}
#math-demo .toc-book>summary:before{top:18px}
#math-demo .toc-book[open]>summary:before{top:16px}
}

@container math-layout (max-width:310px){
#math-demo .analysis-heading{grid-template-columns:minmax(0,1fr)}
#math-demo .reader-toggle{grid-column:1;grid-row:2;justify-self:start;margin-left:0}
#math-demo .analysis-heading h3{grid-row:3}
}

#math-demo .toc-scope{margin-left:auto;flex-shrink:0;font-size:.75rem;line-height:1.5;color:#7b8fa8}
#math-demo .book-chapter-count{margin-left:auto;flex-shrink:0;font-size:.8125rem;line-height:1.5;font-weight:400;color:#7b91ac;white-space:nowrap}
