#course-tutor{--tutor-blue:#0d4a97;--tutor-line:#dce5ef}
#course-tutor [hidden]{display:none!important}
.tutor-workspace{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:24px;align-items:start}
.tutor-composer{padding:22px!important}
.tutor-composer textarea{width:100%;resize:vertical;min-height:115px;font:inherit;line-height:1.8;margin:12px 0;border:1px solid var(--tutor-line);border-radius:8px;padding:12px;box-sizing:border-box}
.tutor-composer-foot{display:flex;align-items:center;justify-content:space-between;gap:12px}
#tutor-status{color:#66758a;font-size:12px}
.tutor-examples{display:flex;flex-wrap:wrap;gap:8px;margin:14px 0 20px}
.tutor-examples button{border:1px solid var(--tutor-line);border-radius:8px;padding:8px 10px;background:#fff;color:#465e7a;font:inherit;font-size:12px;text-align:left;cursor:pointer;line-height:1.6}
#course-tutor button:disabled{opacity:.6;cursor:wait}
.tutor-answer{padding:24px!important;min-height:230px;overflow-wrap:anywhere}
.tutor-answer h3{font-size:20px;line-height:1.5;margin:6px 0 16px}
.tutor-answer p{font-size:14px;line-height:1.9;white-space:pre-wrap}
.tutor-answer-section{border-top:1px solid var(--tutor-line);margin-top:22px;padding-top:18px}
.tutor-answer-section h4{font-size:16px;margin:0 0 10px}
.tutor-formula{background:#f3f6fb;border-radius:8px;padding:12px;margin:12px 0;overflow:auto;max-width:100%}
.tutor-formula small{display:block;color:#65758a;font-size:12px;line-height:1.7}
#course-tutor .katex-display{overflow-x:auto;overflow-y:hidden;padding:4px}
.tutor-source{background:#e9f1fc;border:0;color:var(--tutor-blue);border-radius:6px;padding:6px 9px;margin:4px 5px 0 0;font-size:12px;cursor:pointer;text-align:left}
.tutor-notes{color:#65758a;margin-top:8px}
.tutor-notes p{font-size:12px;margin:4px 0}
#tutor-new{margin-top:14px;font-size:12px}
.tutor-reader{padding:0!important;overflow:hidden;position:sticky;top:18px}
.tutor-reader-head{padding:20px;display:flex;align-items:center;justify-content:space-between;gap:12px}
.tutor-reader-head h3{font-size:16px;margin:0}
.tutor-eyebrow{color:#667d99;font-size:11px!important;letter-spacing:1px;margin:0 0 8px}
.tutor-reader-controls{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:0 16px 16px;overflow-x:auto}
.tutor-pages{display:flex;align-items:center;gap:2px;flex-shrink:0}
.tutor-tabs{display:inline-flex;align-items:center;gap:2px;padding:2px;background:#f3f6fa;border-radius:8px;flex-shrink:0}
.tutor-reader-controls button{display:inline-flex;align-items:center;justify-content:center;height:36px;margin:0;font:inherit;font-size:12px;line-height:1;padding:0 5px;border:0;border-radius:6px;background:transparent;color:#576b85;white-space:nowrap;cursor:pointer}
.tutor-tabs button{height:32px;padding:0 8px}
.tutor-tabs button.active{color:var(--tutor-blue);background:white;box-shadow:0 1px 3px #1e3a5f14}
#tutor-reader-body{border-top:1px solid var(--tutor-line);max-height:660px;min-height:380px;overflow:auto;background:#f6f7f9}
#tutor-image{width:100%;height:auto;display:block}
#tutor-text{padding:24px;background:white;font-size:14px;line-height:1.9;overflow-wrap:anywhere}
#tutor-text p{white-space:pre-wrap}
#tutor-text h3{font-size:17px}
.tutor-figure{padding:10px;background:#f0f5fc;color:#526986}
#tutor-error{padding:12px;background:#fff1ed;border-radius:8px}
@media(max-width:850px){.tutor-workspace{grid-template-columns:1fr}.tutor-reader{position:static}.tutor-composer,.tutor-answer{padding:18px!important}.tutor-composer-foot{align-items:flex-start}.tutor-composer-foot .btn{flex-shrink:0}}

.tutor-answer .tutor-source-scope{color:#73839a;font-size:12px;border-top:1px solid var(--tutor-line);padding-top:14px;margin-top:22px}

.tutor-turn{margin-bottom:24px;scroll-margin-top:20px}
.tutor-user-question{font-size:15px;font-weight:600;line-height:1.8;white-space:pre-wrap;overflow-wrap:anywhere;background:#e9f1fc;border-radius:10px;padding:14px 18px;margin:0 0 12px;color:#224b7b}

.tutor-section-jump{display:flex;align-items:center;gap:12px;padding:0 20px 14px;font-size:12px;color:#576b85}
.tutor-section-jump label{margin:0;flex-shrink:0;line-height:1;font-size:12px}
.tutor-section-jump select{min-width:0;flex:1;width:100%;height:36px;margin:0;padding:0 10px;border:1px solid var(--tutor-line);border-radius:6px;background:white;color:#334e6e;font:inherit}
.tutor-page-entry{display:flex;align-items:center;gap:4px;height:36px;margin:0;font-size:12px;line-height:1;font-weight:400;white-space:nowrap;color:#576b85}
#tutor-page-number{width:44px;height:36px;margin:0;padding:0 4px;text-align:center;border:1px solid var(--tutor-line);border-radius:6px;background:white;color:#224b7b;font:inherit;box-sizing:border-box}
#course-tutor .tutor-pages button:disabled{cursor:default;opacity:.35}

.tutor-reader-head>div{min-width:0;flex:1}
.tutor-book-select{display:block;max-width:100%;width:100%;height:34px;border:1px solid var(--tutor-line);border-radius:6px;padding:0 8px;background:white;color:#334e6e;font:inherit;font-size:14px}

.tutor-reader-tools{display:flex;align-items:center;gap:6px;flex-shrink:0}
.tutor-zoom{display:inline-flex;align-items:center;justify-content:center;width:32px;height:32px;border:1px solid var(--tutor-line);border-radius:6px;color:#576b85;background:#fff;flex-shrink:0}
.tutor-zoom svg{width:16px;height:16px}
.tutor-zoom:hover{background:#eaf2ff;color:var(--tutor-blue);border-color:#9cbae2}
.tutor-zoom:focus-visible{outline:2px solid var(--tutor-blue);outline-offset:2px}

.tutor-examples .tutor-practice-chip{background:#e9f1fc;border-color:#b8cfea;color:var(--tutor-blue);font-weight:600}
.tutor-practice{margin-top:12px;padding:22px!important;border-left:3px solid #8bb3e3;overflow-wrap:anywhere}
.tutor-practice h3{font-size:16px;line-height:1.6;margin:0 0 6px}
.tutor-practice p{font-size:14px;line-height:1.9;white-space:pre-wrap}
.tutor-practice .tutor-practice-basis{font-size:12px;color:#73839a;margin:0 0 14px}
.tutor-practice details{border-top:1px solid var(--tutor-line);padding-top:14px;margin-top:18px}
.tutor-practice summary{width:fit-content;cursor:pointer;color:var(--tutor-blue);font-size:13px;font-weight:600;line-height:1.8}
.tutor-practice summary:focus-visible{outline:2px solid var(--tutor-blue);outline-offset:4px;border-radius:2px}
.tutor-practice-answer{padding-top:4px}
