:root{color-scheme:light;--bg:#f6f7f9;--card:#fff;--text:#1b2938;--muted:#576779;--line:#dce2ea;--primary:#17365d;--on:#fff;--soft:#edf3f9;--error:#8d2430;--success:#1e6445}html[data-theme=dark]{color-scheme:dark;--bg:#111b27;--card:#1c2b3b;--text:#f4f6f9;--muted:#bdc8d7;--line:#3a4c5e;--primary:#a7cff4;--on:#102338;--soft:#243b52;--error:#ffc5cc;--success:#98e0bc}*{box-sizing:border-box}html{font-family:system-ui,-apple-system,'Segoe UI',sans-serif;font-size:16px}body{margin:0;background:var(--bg);color:var(--text);line-height:1.6}a{color:var(--primary)}button,input,select{font:inherit}button{cursor:pointer}button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible{outline:3px solid #c39236;outline-offset:2px}.shell{max-width:1500px;margin:auto}.top{min-height:76px;display:flex;align-items:center;gap:16px;padding:12px clamp(16px,3vw,36px);background:var(--card);border-bottom:1px solid var(--line);flex-wrap:wrap}.brand{text-decoration:none;white-space:nowrap;color:var(--primary);font-size:18px;letter-spacing:.06em}.tag{border:1px solid var(--line);border-radius:100px;padding:3px 12px;color:var(--muted);font-size:12px}.theme-btn{margin-left:auto;border:1px solid var(--line);padding:9px 15px;background:var(--card);color:var(--text);border-radius:10px}.layout{display:grid;grid-template-columns:245px minmax(0,1fr);min-height:660px}.sidebar{border-right:1px solid var(--line);background:var(--card);padding:32px 18px}.eyebrow{font-size:12px;letter-spacing:.12em;font-weight:750;color:var(--muted)}.school-label{font-size:18px;font-weight:750;margin-bottom:25px}.sidebar nav{display:grid;gap:5px}.sidebar nav a{padding:13px 14px;border-radius:10px;text-decoration:none;color:var(--text)}.sidebar nav a:hover,.sidebar nav a.selected{background:var(--soft);color:var(--primary);font-weight:650}.sidebar-note{font-size:13px;color:var(--muted);border-top:1px solid var(--line);padding-top:24px;margin-top:30px}.content{min-width:0;padding:clamp(18px,3vw,42px)}h1{font-size:clamp(26px,3vw,34px);letter-spacing:-.04em;line-height:1.2;margin:10px 0 25px}h2{font-size:19px;line-height:1.3;margin:0 0 16px}.lead{font-size:18px;margin-top:-8px;margin-bottom:25px}.muted{color:var(--muted)}.cards{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:15px;margin-bottom:20px}.panel{border:1px solid var(--line);border-radius:16px;background:var(--card);padding:24px;min-width:0;margin-bottom:18px}.stat span{color:var(--muted);display:block;font-size:14px}.stat strong{display:block;font-size:21px;margin-top:10px;overflow-wrap:anywhere}.actions{display:flex;gap:12px;flex-wrap:wrap;margin-top:22px}.btn{display:inline-flex;align-items:center;justify-content:center;min-height:44px;padding:10px 17px;border:1px solid var(--line);border-radius:10px;color:var(--text);background:var(--card);text-decoration:none;font-weight:600}.btn.primary{background:var(--primary);border-color:var(--primary);color:var(--on)}.btn.quiet{background:transparent}.btn.wide{width:100%}.inline{display:inline}.columns{display:grid;grid-template-columns:minmax(0,1.35fr) minmax(260px,1fr);gap:20px}.columns .panel{align-self:start}label{display:grid;gap:6px;font-weight:650;font-size:14px;margin-bottom:16px}input,select{min-width:0;width:100%;border:1px solid var(--line);border-radius:9px;padding:11px 12px;min-height:44px;background:var(--card);color:var(--text)}form .btn{margin-top:5px}table{border-collapse:collapse;width:100%;font-size:14px}th,td{text-align:left;padding:12px 9px;border-bottom:1px solid var(--line);overflow-wrap:anywhere}th{color:var(--muted);font-weight:650}.scroll{overflow-x:auto;max-width:100%}.list-item{display:flex;align-items:center;justify-content:space-between;gap:12px;border-bottom:1px solid var(--line);padding:12px 0;flex-wrap:wrap}.list-item:last-child{border:0}.list-item small{color:var(--muted)}.notice,.alert{padding:14px;border-radius:10px;margin:0 0 18px;border:1px solid var(--line)}.notice{color:var(--success);background:var(--soft)}.alert{color:var(--error);background:var(--soft)}.auth{max-width:500px;margin:60px auto;padding:0 18px}.auth-panel{padding:32px}.auth-links{margin-top:16px}.school-switch{display:flex;align-items:end;gap:12px;margin-bottom:18px;flex-wrap:wrap}.school-switch label{margin:0;min-width:min(260px,100%)}.details{display:grid;grid-template-columns:180px 1fr;gap:14px}.details dt{color:var(--muted)}.details dd{margin:0;font-weight:650;overflow-wrap:anywhere}.subheading{margin-top:30px;padding-top:24px;border-top:1px solid var(--line)}footer{padding:25px;text-align:center;color:var(--muted);font-size:13px;border-top:1px solid var(--line)}@media(max-width:850px){.layout{grid-template-columns:1fr}.sidebar{padding:12px 16px;border-right:0;border-bottom:1px solid var(--line)}.sidebar .eyebrow,.sidebar .school-label,.sidebar-note{display:none}.sidebar nav{display:flex;gap:6px;overflow-x:auto;scrollbar-width:thin}.sidebar nav a{padding:10px 12px;white-space:nowrap}.columns{grid-template-columns:1fr}.cards{grid-template-columns:1fr 1fr}}@media(max-width:490px){.top{gap:8px;padding:12px}.brand{font-size:14px;letter-spacing:0}.tag{display:none}.theme-btn{padding:7px 10px;font-size:13px}.content{padding:17px 14px}.panel{padding:18px}.cards{grid-template-columns:1fr}.stat strong{margin-top:2px}.auth{margin:25px auto}.auth-panel{padding:22px}.details{grid-template-columns:1fr;gap:2px}.details dd{margin-bottom:15px}}@media(prefers-reduced-motion:no-preference){.btn,.sidebar nav a{transition:background-color .15s,color .15s}}

.role-list{display:flex;flex-wrap:wrap;gap:5px}.role-form{display:inline-flex;align-items:center;gap:3px;padding:2px 4px 2px 10px;border:1px solid var(--line);border-radius:9px;background:var(--soft);font-size:13px;white-space:nowrap}.role-remove{font:inherit;font-size:20px;min-width:32px;min-height:36px;cursor:pointer;color:var(--text);border:0;background:transparent}.role-remove:hover{color:var(--error)}

.outline-list{padding-left:1.4rem;line-height:1.9}
.outline-list li{padding:0.2rem 0}
.reading-text{font-family:Georgia,"Times New Roman",serif;white-space:normal;line-height:1.68;font-size:1.07rem;overflow-wrap:anywhere;max-width:75ch}
.reading-text br{display:block;content:"";margin:0}
@media(max-width:600px){.reading-text{font-size:1rem;line-height:1.65}}

.source-table td{vertical-align:top;white-space:normal;min-width:7.5rem;padding:.65rem .7rem}

/* M2 mobile readability & layout pass — 2026-10-14 */
html{min-width:0;overflow-x:clip}
body{min-width:0;overflow-x:clip}
.shell,.layout,.content,.sidebar,.panel,.cards,.columns{min-width:0;max-width:100%}
.content,.panel,.list-item,td,dd,li{overflow-wrap:anywhere;word-break:normal}
img,svg,video,iframe{max-width:100%;height:auto}
table{table-layout:auto}
.scroll{width:100%;max-width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch;overscroll-behavior-inline:contain;border-radius:8px}
.scroll table{width:max-content;min-width:100%;max-width:none}
.source-table td{min-width:8rem}
textarea{display:block;max-width:100%;width:100%;min-height:110px;font:inherit;border:1px solid var(--line);border-radius:10px;padding:12px;background:var(--card);color:var(--text)}
.top form.inline{margin:0}
a,button,summary{touch-action:manipulation}
.reading-text{line-height:1.8;white-space:normal;font-size:clamp(1rem,1vw + .92rem,1.16rem);max-width:75ch}
.reading-text br{line-height:1.4}
.school-switch select{max-width:100%}
.role-form{white-space:normal;max-width:100%;min-width:0}
.role-list{align-items:flex-start}
.role-remove{min-width:44px;min-height:44px}
@media(max-width:1023px){
 .layout{grid-template-columns:minmax(0,1fr);min-height:0}
 .sidebar{padding:12px 16px;border-right:0;border-bottom:1px solid var(--line)}
 .sidebar .eyebrow,.sidebar-note{display:none}
 .sidebar .school-label{display:block;margin:0 0 10px;font-size:14px;line-height:1.3;overflow-wrap:anywhere}
 .sidebar nav{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px;overflow:visible}
 .sidebar nav a{display:flex;justify-content:center;align-items:center;min-width:0;min-height:46px;padding:8px;border:1px solid var(--line);border-radius:10px;text-align:center;font-size:13px;line-height:1.3;white-space:normal;overflow-wrap:anywhere}
 .sidebar nav a.selected{border-color:var(--primary)}
 .columns{grid-template-columns:minmax(0,1fr)}
 .cards{grid-template-columns:repeat(2,minmax(0,1fr))}
 .top{min-height:0}
}
@media(max-width:599px){
 body{line-height:1.5}
 .top{display:grid;grid-template-columns:minmax(0,1fr) auto auto;align-items:center;gap:7px;padding:10px 12px}
 .top .brand{min-width:0;font-size:clamp(12px,3.6vw,17px);white-space:normal;line-height:1.2;letter-spacing:0;overflow-wrap:anywhere}
 .top .tag{display:none}
 .top .theme-btn{min-width:44px;min-height:44px;margin-left:0;padding:7px 10px;font-size:13px;line-height:1.2}
 .top .inline .btn{min-width:44px;min-height:44px;padding:8px 10px;font-size:13px;white-space:nowrap}
 .sidebar{padding:10px 12px}
 .sidebar .school-label{font-size:14px;margin-bottom:9px}
 .sidebar nav{grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}
 .sidebar nav a{min-height:46px;font-size:13px}
 .content{padding:16px 12px 32px}
 .content h1{font-size:clamp(23px,6vw,29px);line-height:1.22;margin:4px 0 19px;letter-spacing:-.025em}
 .content h2{font-size:18px}
 .lead{font-size:16px;line-height:1.5;margin:0 0 17px}
 .panel{padding:16px;border-radius:13px;margin-bottom:13px}
 .cards,.columns{grid-template-columns:minmax(0,1fr);gap:10px}
 .cards{margin-bottom:13px}
 .stat strong{font-size:18px;margin-top:5px}
 .actions,.school-switch{display:grid;grid-template-columns:minmax(0,1fr);gap:9px}
 .actions .btn,.school-switch .btn{width:100%}
 .school-switch label{min-width:0}
 .details{grid-template-columns:minmax(0,1fr);gap:3px}
 .details dd{margin:0 0 12px}
 .list-item{align-items:flex-start;flex-direction:column;gap:3px}
 .list-item strong,.list-item small{max-width:100%}
 .role-list{gap:6px}
 .auth{margin:14px auto 24px;padding:0 12px;max-width:100%}
 .auth-panel{padding:20px 16px}
 .auth-panel h1{font-size:25px}
 .outline-list{padding-left:1.25rem}
 .outline-list li{line-height:1.5;padding:6px 0}
 .reading-text{font-size:17px;line-height:1.77;max-width:100%}
 .scroll{margin:0 -2px;width:calc(100% + 4px)}
 .scroll th,.scroll td{padding:11px 10px;vertical-align:top}
 .scroll:not(:empty)::after{content:'Таблицу можно прокрутить в сторону →';display:block;font-size:12px;color:var(--muted);padding:5px 4px}
 input,select,textarea{font-size:16px;min-height:46px}
 .btn{min-height:46px;padding:10px 14px}
 footer{padding:17px 12px;font-size:12px}
}
@media(max-width:359px){
 .top{grid-template-columns:minmax(0,1fr) auto}
 .top .theme-btn{grid-column:2;grid-row:1}
 .top .inline{grid-column:1/-1;justify-self:stretch}
 .top .inline .btn{width:100%}
 .sidebar nav{grid-template-columns:repeat(2,minmax(0,1fr))}
 .sidebar nav a{font-size:12px;padding:8px 5px}
 .content{padding:13px 10px 26px}
 .panel{padding:14px}
}

/* Illustrations from source DOCX, responsive in light and dark themes */
.lesson-figure{margin:18px 0 20px;padding:12px;border:1px solid var(--line);border-radius:12px;background:var(--soft);max-width:100%}
.lesson-figure img{display:block;max-width:100%;width:auto;height:auto;max-height:530px;margin:0 auto;border:1px solid var(--line);border-radius:6px;background:#fff}
.lesson-figure a{display:block;overflow:hidden;max-width:100%}
.lesson-figure figcaption{margin-top:10px;font-size:14px;line-height:1.5;overflow-wrap:anywhere}
.media-review{margin:12px 0 26px;padding:14px;background:var(--card);border:1px solid var(--line);border-radius:12px}
@media(max-width:600px){.lesson-figure{margin:12px 0;padding:9px}.media-review{padding:10px}.lesson-figure figcaption{font-size:13px}}


/* M2 study typography: comfortable measure, clear paragraphs and accessibility */
.reading-container{width:100%;max-width:1040px;margin-inline:auto}
.reading-panel{padding:clamp(18px,3.5vw,40px)}
.reading-panel>h2{margin-bottom:1rem}
.lesson-reading{max-width:72ch;margin-inline:auto;font-family:Georgia,"Noto Serif","Times New Roman",serif;font-size:var(--reader-font-size,19px);line-height:1.86;letter-spacing:.006em;color:var(--text);text-align:start;hyphens:manual;overflow-wrap:break-word}
.lesson-reading p{margin:0 0 1.1em;max-width:100%;font-size:inherit;line-height:inherit;orphans:2;widows:2}
.lesson-reading p:last-child{margin-bottom:0}
.lesson-reading .reader-section{margin:1.65em 0 .7em;font-size:1.07em;line-height:1.42;letter-spacing:0;font-weight:750;color:var(--text)}
.lesson-reading .reader-section:first-child{margin-top:0}
.lesson-reading .reader-item{padding-left:1.55em;text-indent:-1.3em;margin:.45em 0 .75em;line-height:1.76}
.reader-controls{display:flex;align-items:center;justify-content:flex-end;flex-wrap:wrap;gap:9px;max-width:72ch;margin:0 auto 24px;padding:0 0 15px;border-bottom:1px solid var(--line);font-family:system-ui,-apple-system,"Segoe UI",sans-serif;color:var(--muted);font-size:14px}
.reader-controls button{font:inherit;font-weight:650;background:var(--card);color:var(--text);border:1px solid var(--line);border-radius:9px;min-width:44px;min-height:44px;padding:8px 12px}
.reader-controls button:hover{background:var(--soft)}
.reader-controls button:disabled{opacity:.4;cursor:not-allowed}
.reader-controls button:focus-visible{outline:3px solid #c39236;outline-offset:2px}
.source-supplement-list{padding-left:1.25rem;line-height:1.7}
.source-supplement-list li{margin-bottom:12px}
.source-supplement-list small{display:inline-block}
@media(max-width:599px){
 .reading-container{max-width:100%}
 .reading-panel{padding:19px 17px}
 .lesson-reading{font-size:var(--reader-font-size,19px);line-height:1.8;max-width:100%;letter-spacing:0}
 .lesson-reading p{margin-bottom:1.16em}
 .reader-controls{justify-content:flex-start;margin-bottom:19px;gap:6px}
 .reader-controls span{width:100%}
 .reader-controls button{min-width:48px}
 .lesson-reading .reader-item{padding-left:1.3em;text-indent:-1.1em}
}
@media(prefers-reduced-motion:reduce){.lesson-reading{scroll-behavior:auto}}
@media print{.reader-controls{display:none!important}.lesson-reading{font-size:11pt;line-height:1.5;color:#000}.reading-panel{border:0;box-shadow:none}}

/* Verbatim Word paragraph reader: semantics come from DOCX paragraph styles. */
.word-source-reading{margin:0 auto;max-width:72ch;font-size:var(--reader-font-size,19px);line-height:1.82}
.word-source-body>p{margin:0 0 1.03em;line-height:inherit;overflow-wrap:break-word;hyphens:manual}
.word-source-body>.docx-section-heading{font-family:system-ui,-apple-system,'Segoe UI',sans-serif;font-size:1.06em;line-height:1.4;letter-spacing:0;font-weight:720;margin:1.7em 0 .72em;color:var(--text);overflow-wrap:anywhere}
.word-source-body>.docx-section-heading:first-child{margin-top:.1em}
.word-source-body>h2.docx-section-heading{font-size:1.2em}
.word-source-body>.docx-list-entry{padding-left:1.1em;text-indent:-.4em}
.word-source-table{margin:1.15em 0 1.6em;max-width:100%;overflow:auto;border:1px solid var(--line);border-radius:9px}
.word-source-table td{min-width:120px;max-width:420px;line-height:1.5;font-family:system-ui,-apple-system,'Segoe UI',sans-serif;font-size:14px}
@media(max-width:599px){
 .word-source-reading{max-width:100%;line-height:1.78}
 .word-source-body>p{margin-bottom:1.13em}
 .word-source-body>.docx-section-heading{font-size:1.03em;margin-top:1.35em}
 .word-source-table td{min-width:130px}
}

/* Original Word footnotes, fully separate from student comments or OCR transcription. */
.docx-footnote-mark{margin-inline-start:.12em;font-family:system-ui,sans-serif;font-size:.65em;line-height:0;vertical-align:super}
.docx-footnotes{margin:2.4em 0 0;padding:20px 0 4px;border-top:1px solid var(--line);font-size:.78em;line-height:1.62}
.docx-footnotes h3{font-size:1.2em;font-family:system-ui,sans-serif}
.docx-footnotes ol{padding-left:1.6em}
.docx-footnotes li{padding:0 0 1em;scroll-margin-top:20px;overflow-wrap:anywhere}
.docx-footnotes li:target{background:var(--soft)}

/* Lists from original Word numbering.xml: markers are separate presentation metadata. */
.word-source-body .docx-list-line{position:relative;margin-inline-start:0;padding-inline-start:2.1em;text-indent:0;overflow-wrap:anywhere}
.word-list-marker{position:absolute;inset-inline-start:0;top:0;display:inline-block;width:1.85em;font-family:system-ui,-apple-system,'Segoe UI',sans-serif;font-size:.9em;line-height:inherit;font-weight:650;color:var(--text);white-space:nowrap;text-align:end}
.word-source-body .docx-list-depth-1{padding-inline-start:3.2em}
.word-source-body .docx-list-depth-1 .word-list-marker{inset-inline-start:1.1em}
.word-source-body .docx-list-depth-2{padding-inline-start:4.25em}
.word-source-body .docx-list-depth-2 .word-list-marker{inset-inline-start:2.1em}
.word-source-body .docx-list-depth-3{padding-inline-start:5.2em}
.word-source-body .docx-list-depth-3 .word-list-marker{inset-inline-start:3.1em}
.word-source-body .docx-list-depth-4,.word-source-body .docx-list-depth-5,
.word-source-body .docx-list-depth-6,.word-source-body .docx-list-depth-7,
.word-source-body .docx-list-depth-8{padding-inline-start:5.4em}
@media(max-width:599px){
 .word-source-body .docx-list-line{padding-inline-start:1.75em}
 .word-list-marker{width:1.65em}
 .word-source-body .docx-list-depth-1{padding-inline-start:2.6em}
 .word-source-body .docx-list-depth-1 .word-list-marker{inset-inline-start:.9em}
 .word-source-body .docx-list-depth-2{padding-inline-start:3.45em}
 .word-source-body .docx-list-depth-2 .word-list-marker{inset-inline-start:1.75em}
 .word-source-body .docx-list-depth-3,.word-source-body .docx-list-depth-4,
 .word-source-body .docx-list-depth-5{padding-inline-start:3.75em}
}

/* Written practice from original textbook: responsive and compatible with light/dark */
.practice-panel{margin-top:22px}
.practice-section{padding:0;margin:17px 0 22px;border:1px solid var(--line);border-radius:12px;background:var(--card)}
.practice-section>summary{padding:14px 17px;cursor:pointer;min-height:48px;line-height:1.5}
.practice-section>summary:focus-visible{outline:3px solid var(--primary);outline-offset:2px}
.practice-section>.practice-prompts,.practice-section>form,.practice-section>.notice{margin:12px 17px 20px}
.practice-prompts{font-size:var(--reader-font-size,19px);line-height:1.76;max-width:72ch}
.practice-prompts p{margin:.55em 0 1em;white-space:normal;overflow-wrap:break-word}
.practice-panel textarea,.practice-review-card textarea{display:block;width:100%;max-width:100%;min-height:150px;line-height:1.6}
.practice-answer{white-space:pre-wrap;overflow-wrap:anywhere;border:1px solid var(--line);border-radius:10px;padding:14px;margin:14px 0 20px;background:var(--soft)}
.practice-source{border:1px solid var(--line);border-radius:10px;margin:14px 0;padding:10px 16px}
.practice-source>summary{cursor:pointer}
.practice-source>.practice-prompts{margin:15px 0}
@media(max-width:599px){
 .practice-section>summary{padding:14px 12px}
 .practice-section>.practice-prompts,.practice-section>form,.practice-section>.notice{margin:10px 12px 19px}
 .practice-panel .actions,.practice-review-card .actions{display:flex;flex-wrap:wrap;gap:10px}
 .practice-panel .actions button,.practice-review-card .actions button{min-height:48px;flex:1 1 190px}
}

/* Human-approved tests: comfortable touch-sized choices and mobile contrast. */
.quiz-attempt{max-width:920px;margin-inline:auto}
.quiz-question{border:1px solid var(--line);border-radius:12px;margin:23px 0;padding:15px 18px;background:var(--card);min-width:0}
.quiz-question legend{font-size:1.02rem;font-weight:650;line-height:1.55;padding:0 7px;max-width:100%}
.quiz-option{display:flex;align-items:center;gap:11px;border:1px solid var(--line);border-radius:9px;padding:11px 13px;margin:9px 0;min-height:48px;cursor:pointer;line-height:1.5}
.quiz-option:hover{background:var(--soft)}
.quiz-option input{width:20px;height:20px;flex:0 0 20px;accent-color:var(--primary)}
.quiz-option:has(input:checked){border-width:2px;background:var(--soft)}
.quiz-option:has(input:disabled){cursor:default}
.quiz-option>span{min-width:0;overflow-wrap:anywhere}
@media(max-width:599px){
 .quiz-question{margin:17px 0;padding:12px}
 .quiz-question legend{font-size:1rem}
 .quiz-option{padding:12px 9px}
 .quiz-attempt>.btn,.quiz-attempt form>.btn{width:100%;min-height:48px}
}

/* School request inbox and profile cards, responsive with existing light/dark tokens. */
.registry-request,.registry-group{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:12px;border-bottom:1px solid var(--line);padding:14px 0}
.registry-request .registry-approve{display:flex;align-items:end;flex-wrap:wrap;gap:12px}
.registry-request .registry-approve label{min-width:180px}
.registry-request .registry-approve .actions{display:flex;gap:8px;flex-wrap:wrap}
.student-course{border-top:1px solid var(--line);padding:16px 0}
.student-course details{border:1px solid var(--line);border-radius:9px;padding:10px 13px;margin:10px 0}
.student-course details summary{cursor:pointer;min-height:36px}
.student-course details p{overflow-wrap:anywhere;white-space:pre-wrap}
.registry-group .btn{min-height:44px}
@media(max-width:599px){
 .registry-request,.registry-request .registry-approve,.registry-request .registry-approve label{width:100%}
 .registry-request .registry-approve .actions{width:100%}
 .registry-request .registry-approve .actions button{min-height:48px;flex:1}
 .registry-group{align-items:start}
}

/* School and teacher group detail pages; mobile friendly. */
.group-portal-line{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:12px;padding:13px 0;border-bottom:1px solid var(--line)}
.group-portal-line>.btn,.group-portal-line form .btn{min-height:44px}
.group-portal-line p{margin:5px 0;overflow-wrap:anywhere}
@media(max-width:599px){
 .group-portal-line{align-items:flex-start}
 .group-portal-line>.btn,.group-portal-line form{flex:1 0 100%}
 .group-portal-line form .btn{width:100%}
}

/* External learning media: responsive player and touch-friendly controls. */
.external-media-item{padding:16px 0;border-bottom:1px solid var(--line)}
.external-media-item h3{margin:0 0 8px}
.external-media-item p{overflow-wrap:anywhere}
.external-media-video{aspect-ratio:16 / 9;width:100%;max-width:850px;overflow:hidden;border-radius:12px;background:#0c1624}
.external-media-video iframe{display:block;width:100%;height:100%;border:0}
.lesson-external-media audio{display:block;width:100%;max-width:690px}
.external-media-lesson-list li{padding:6px 0}
.external-media-row{display:flex;gap:12px;align-items:center;flex-wrap:wrap;padding:9px 0;border-bottom:1px solid var(--line)}
.external-media-row span{flex:1;overflow-wrap:anywhere}
.external-media-row button,.external-media-row .btn{min-height:44px}
@media(max-width:599px){.external-media-row{align-items:stretch}.external-media-row span{flex:1 0 100%}.external-media-row form,.external-media-row form button{flex:1}}

/* M6: independent brand and mobile-first school navigation */
.tenant-header-logo{display:inline-block;width:38px;height:38px;object-fit:contain;vertical-align:middle;margin-right:7px;border-radius:7px}
.top .brand{display:inline-flex;align-items:center;gap:4px;white-space:normal;overflow-wrap:anywhere}
@media(max-width:599px){.tenant-header-logo{width:30px;height:30px}.top .brand{max-width:100%}}

.tenant-brand-preview{display:block;max-width:120px;max-height:120px;object-fit:contain}
