:root{--terver-green:#198754;--terver-dark:#146c43;--terver-soft:#f2fbf6;--terver-line:#d8eee1}
.terver-page .brand{letter-spacing:-.035em}
.terver-page .topic-card{min-height:252px}
.terver-page .topic-art svg{stroke:#153c2a;stroke-width:1.7;fill:none;stroke-linecap:round;stroke-linejoin:round}
.terver-page .topic-art svg .accent{stroke:var(--terver-green);stroke-width:2.8}
.terver-page .topic-art svg .fill{fill:var(--terver-soft);stroke:var(--terver-green)}
.terver-page .topic-art svg .dot{fill:var(--terver-green);stroke:none}
.terver-page .topic-art svg .muted{stroke:#a9c5b3;stroke-dasharray:4 4}
.terver-page .topic-art svg text{fill:#153c2a;stroke:none;font:700 12px Inter,Arial,sans-serif}
.terver-page .topic-card .card-foot span{white-space:nowrap}
.topic-actions{display:flex;gap:12px;flex-wrap:wrap;margin:24px 0 30px}
.topic-summary{padding:20px;border:1px solid #e5e7eb;border-radius:6px;background:#fff;margin:16px 0}
.topic-summary h2{margin-bottom:8px}
.topic-summary p{color:#667085;margin-bottom:12px}
.topic-summary .btn{display:inline-block}
.lesson-body{max-width:850px;overflow-wrap:anywhere}
.lesson-body h1{font-size:1.7rem}.lesson-body h4{font-size:1.22rem;margin:29px 0 13px}.lesson-body h5{font-size:1.02rem;margin:22px 0 10px;color:#185d39}
.lesson-body p,.lesson-body li{line-height:1.68}
.lesson-body ul,.lesson-body ol{padding-left:24px}
.lesson-body .freq{color:#667085;font-size:.86rem}
.lesson-body .box{border:1px solid #d8e6db;border-radius:7px;background:#f8fbf8;padding:16px 19px;margin:17px 0;overflow-x:auto}
.lesson-body .box .tag{display:inline-block;padding:3px 9px;margin-bottom:8px;border-radius:20px;background:#e9f7ef;color:#146c43;font-weight:700;font-size:.7rem;text-transform:uppercase;letter-spacing:.06em}
.lesson-body .box.thm{background:#fffbef;border-color:#f0e2bd}.lesson-body .box.thm .tag{background:#fff0c8;color:#8d670a}
.lesson-body .box.fml{background:#f8f6fc;border-color:#e6dcf6}.lesson-body .box.fml .tag{background:#ede7fa;color:#61468c}
.lesson-body .box.err{background:#fff6f4;border-color:#f1d6d0}.lesson-body .box.err .tag{background:#fce7e3;color:#af3d32}
.lesson-body table{border-collapse:collapse;width:100%;display:block;overflow-x:auto;margin:18px 0;font-size:.88rem}
.lesson-body th,.lesson-body td{border:1px solid #dbe7df;padding:9px 11px;text-align:left;vertical-align:top;min-width:80px}
.lesson-body th{background:var(--terver-soft)}
.lesson-body figure{margin:22px 0;max-width:100%;overflow-x:auto}.lesson-body figure svg{display:block;max-width:100%;height:auto}.lesson-body figcaption{color:#667085;font-size:.82rem;margin-top:8px}
.lesson-body .memorize{background:#fff9e8;padding:4px 9px;border-radius:5px;color:#80600f}
.lesson-body .closing-note{color:#667085}
.lesson-body mjx-container[display="true"],.problem mjx-container[display="true"]{overflow-x:auto;overflow-y:hidden;max-width:100%;padding:4px 0}
.problem{border:1px solid #e5e7eb;border-radius:7px;margin:16px 0 22px;background:#fff;overflow:hidden}
.problem .phead{display:flex;align-items:flex-start;gap:12px;flex-wrap:wrap;padding:15px 18px;background:#f8fbf9;border-bottom:1px solid #e5e7eb}
.problem .pnum{font-weight:700;color:#111827}.problem .psrc{font-size:.82rem;color:#667085;margin-left:auto}
.problem .pbody{padding:18px}.problem .cond{font-size:1.04rem;line-height:1.65;margin-bottom:17px;overflow-x:auto}
.problem .answer-checker{padding:15px 17px;background:var(--terver-soft);border:1px solid var(--terver-line);border-radius:6px;margin:14px 0}
.problem .checker-top{display:flex;justify-content:space-between;gap:12px;margin-bottom:11px}.problem .checker-label{display:block;font-weight:700;font-size:.86rem}.problem .checker-hint{display:block;color:#667085;font-size:.77rem}.problem .checker-badge{color:#667085;font-size:.78rem}
.problem .checker-row{display:flex;gap:9px}.problem .answer-input{margin:0;flex:1;min-width:0}.problem .check-btn{border:1px solid var(--terver-green);border-radius:6px;background:var(--terver-green);color:#fff;padding:9px 15px;font-weight:700;min-height:44px;white-space:nowrap}
.problem .check-btn:hover{background:var(--terver-dark)}.problem .checker-status{display:none;margin-top:11px;font-size:.86rem}.problem .checker-status.visible{display:block}.problem .checker-status.good{color:#146c43}.problem .checker-status.bad{color:#bf3030}.problem .checker-status.neutral{color:#667085}
.problem .answer-checker.correct{background:#effaf3;border-color:#8dd3a9}.problem .answer-checker.wrong{background:#fff5f5;border-color:#e9aaaa}
.problem details.sol{border-top:1px solid #e5e7eb;margin-top:17px;padding-top:14px}.problem details.sol summary{cursor:pointer;font-weight:700;color:var(--terver-green);width:max-content;max-width:100%;padding:7px 0}.problem details.sol[open] summary{margin-bottom:14px}
.problem:not(.wrong):not(.manual) details.sol{display:none}.solution-note{font-size:.8rem;color:#667085;margin-top:8px}.problem.wrong .solution-note,.problem.manual .solution-note{display:none}
.problem .dano{display:grid;grid-template-columns:auto minmax(0,1fr);gap:5px 10px;padding:13px 15px;background:var(--terver-soft);border-radius:6px;margin:11px 0}.problem .step{margin:13px 0;line-height:1.6;overflow-x:auto}.problem .step .lbl{font-weight:700;color:#185d39}.problem .answer{padding:13px 15px;border-left:3px solid var(--terver-green);background:var(--terver-soft);border-radius:0 6px 6px 0;margin:16px 0;font-weight:600}.problem .box{padding:13px 15px;background:#f8fbf8;border:1px solid var(--terver-line);border-radius:6px;margin:14px 0}
.problem .box .tag{font-size:.72rem;font-weight:700;color:var(--terver-green);display:block;margin-bottom:7px;text-transform:uppercase}
.problem table{display:block;width:100%;overflow-x:auto;border-collapse:collapse}.problem th,.problem td{border:1px solid #dbe7df;padding:8px 10px;text-align:left}.problem th{background:var(--terver-soft)}
.problem figure{max-width:100%;overflow-x:auto;margin:18px 0}.problem figure svg{max-width:100%;height:auto}.problem figcaption{font-size:.82rem;color:#667085}
.problem-foot{display:flex;align-items:center;gap:11px;flex-wrap:wrap;margin-top:11px}.problem-foot .btn{font-size:.78rem;padding:8px 12px;min-height:38px}.problem-status{font-size:.8rem;color:#667085}
.practice-controls{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;margin:24px 0}.practice-controls select{width:100%}
.topic-progress{display:flex;align-items:center;gap:12px}.topic-progress .progress-track{flex:1;margin:0}.topic-progress small{min-width:68px;text-align:right;color:#667085}
.progress-list{display:grid;gap:15px}.progress-item{border:1px solid #e5e7eb;border-radius:7px;padding:16px 18px}.progress-item strong{display:block;margin-bottom:4px}.progress-item .small{color:#667085}
.empty-problems{padding:24px;border:1px dashed #cbd5e1;border-radius:6px;color:#667085}
@media(max-width:850px){.problem .phead{display:block}.problem .psrc{display:block;margin:3px 0 0}}
@media(max-width:600px){.practice-controls{grid-template-columns:1fr}.problem .pbody{padding:14px}.problem .checker-row{display:grid}.problem .check-btn{width:100%}.problem .dano{grid-template-columns:1fr}.lesson-body{font-size:.95rem}.topic-summary{padding:16px}}
.terver-page .topic-art svg{stroke:var(--terver-green);stroke-width:2.2;fill:none}
.terver-page .topic-art svg circle{fill:var(--terver-soft)}
.terver-page .topic-art svg text{fill:var(--terver-green);stroke:none}
.course-lesson,.course-method{max-width:820px;line-height:1.72;overflow-wrap:anywhere}
.course-lesson p,.course-method p{margin:18px 0}
.course-lesson .formula-block,.course-formula-card .formula-block{padding:17px 20px;border:1px solid var(--terver-line);border-radius:7px;background:var(--terver-soft);overflow-x:auto}
.course-lesson .inline-math,.course-method .inline-math,.course-formula-card .inline-math{display:inline-block;max-width:100%;overflow-x:auto;vertical-align:middle}
.course-method{padding:22px;border:1px solid var(--terver-line);background:#f9fcfa;border-radius:7px;margin:26px 0}
.course-method ol{padding-left:25px}.course-method li{margin:9px 0}
.course-task .cond{white-space:pre-wrap;overflow-wrap:anywhere}
.course-task .checker-hint{display:block;margin:5px 0 10px}
.problem.course-task details.sol:not([hidden]){display:block}
.course-task .course-hint{padding:13px 15px;background:#fff9e8;border-left:3px solid #d9a530;border-radius:0 5px 5px 0;margin-top:15px}
.course-task .solution-note{margin:10px 0 0}
.course-task .sol li{line-height:1.65;margin:9px 0}
.course-filters{grid-template-columns:repeat(3,minmax(0,1fr))}
.course-modes{display:flex;flex-wrap:wrap;gap:10px;margin:15px 0}
.course-count,.course-links,.course-archive-link{color:#667085;font-size:.9rem}
.course-archive-link{margin-top:36px}.course-archive-link a,.course-links a{color:var(--terver-green);font-weight:600}
.course-formula-intro{padding:17px 20px;background:var(--terver-soft);border:1px solid var(--terver-line);border-radius:7px;max-width:850px;margin-bottom:24px}
.course-formula-search{display:block;max-width:600px;font-weight:600;margin:20px 0}
.course-formula-search input{display:block;width:100%;padding:11px 13px;border:1px solid #cbd5e1;border-radius:6px;margin-top:8px}
.course-formula-card{border:1px solid #e5e7eb;border-radius:7px;padding:19px 22px;margin:16px 0;max-width:900px}
.course-formula-card h2{font-size:1.08rem}.course-formula-card h2 a{color:var(--terver-green)}
.course-reset{margin-top:30px}.terver-page .stat-card{border:1px solid #e5e7eb;border-radius:6px;padding:19px}
.terver-page .stat-card strong{display:block;font-size:1.8rem}.terver-page .stat-card span{font-size:.84rem;color:#667085}
.terver-page .progress-item .progress-track{display:block;width:100%}.terver-page .progress-track span{display:block;height:100%;background:var(--terver-green)}
.terver-page .list-row .num{width:auto;min-width:75px;border-radius:6px;padding:0 7px;white-space:nowrap}
@media(max-width:850px){.course-filters{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:600px){.course-filters{grid-template-columns:1fr}.terver-page .topnav{overflow-x:auto;justify-content:space-between;gap:8px}.terver-page .topnav a{font-size:.72rem}.terver-page .list-row .num{min-width:50px;font-size:.7rem}.terver-page .list-row .pill{display:none}}
.course-open-task{margin-left:auto;font-size:.82rem}.course-practice-list{max-width:920px}.terver-page .practice-more{display:flex;justify-content:center;margin:24px 0}
@media(max-width:600px){.course-open-task{margin-left:0;width:100%}}
.course-lesson .formula-block,.course-formula-card .formula-block{border-left:4px solid var(--terver-green);background:linear-gradient(110deg,#f2faf5,#fbfdfb);font-size:1.04rem;line-height:2;padding:19px 22px}
.course-lesson .formula-heading,.course-formula-card .formula-heading{display:block;color:#17683f;font-size:.86rem;letter-spacing:.015em;margin-bottom:4px}
.course-lesson .formula-row,.course-formula-card .formula-row{padding:8px 0;border-top:1px solid #dceee2;line-height:1.9}
.course-lesson .formula-row:first-of-type,.course-formula-card .formula-row:first-of-type{border-top:0}
.course-formula-card{border-radius:11px;box-shadow:0 8px 24px rgba(15,77,45,.04)}
.course-task .task-math{display:inline-block;max-width:100%;overflow-x:auto;vertical-align:middle;margin:0 2px}
.course-task .cond{line-height:1.9}
.course-task .sol li,.course-task .answer{line-height:1.85}
.course-task mjx-container{max-width:100%}
@media(max-width:600px){.course-lesson .formula-block,.course-formula-card .formula-block{padding:15px 16px;font-size:.97rem}}
