.course-toolbar{display:flex;gap:12px;margin-bottom:24px}.course-toolbar .search{max-width:420px;flex:1}.course-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(290px,1fr));gap:24px}.course-card{text-align:left;border:1px solid var(--border,#e4e8f0);border-radius:20px;background:var(--surface,#fff);padding:0;overflow:hidden;cursor:pointer;color:inherit;transition:transform .18s,box-shadow .18s}.course-card:hover{transform:translateY(-3px);box-shadow:0 12px 30px #18274910}.course-cover{height:112px;background:#e9eafa;color:#343f91;display:flex;align-items:center;gap:16px;padding:24px;font-weight:700}.course-cover.history{background:#fff0e6;color:#a14c20}.course-cover.russian{background:#e4f2ed;color:#23694f}.course-cover .subject-icon{width:54px;height:54px;background:#ffffffa6}.course-card-body{padding:24px}.course-card h2{font-size:22px;line-height:1.3;margin:12px 0}.course-card p{color:var(--muted,#69758c);font-size:14px;line-height:1.6;min-height:44px}.course-card-meta{display:flex;align-items:center;justify-content:space-between;gap:12px;font-size:13px;margin-top:22px}.course-card progress{width:100%;height:6px;margin:20px 0 8px}.course-card small{color:var(--muted,#69758c)}.course-section{margin-bottom:20px;overflow:hidden}.lesson-row{width:100%;display:flex;align-items:center;gap:16px;text-align:left;background:none;color:inherit;border:0;border-bottom:1px solid var(--border,#e4e8f0);padding:20px 24px;cursor:pointer}.lesson-row:last-child{border-bottom:0}.lesson-row:hover{background:#6474aa08}.lesson-row:disabled{opacity:.6;cursor:default}.lesson-info{flex:1;display:flex;flex-direction:column;gap:5px;min-width:0}.lesson-info strong{font-size:16px}.lesson-info small,.lesson-info>span{font-size:13px;color:var(--muted,#69758c)}.lesson-action{display:flex}.section-empty{padding:0 24px 24px;color:var(--muted,#69758c)}.lesson-layout{display:grid;grid-template-columns:minmax(0,1fr) 280px;gap:24px;align-items:start}.lesson-content{overflow:hidden}.video-frame{position:relative;width:100%;aspect-ratio:16/9;background:#101827;border-radius:12px;overflow:hidden}.video-frame iframe{position:absolute;inset:0;border:0;width:100%;height:100%}.lesson-text{font-size:16px;line-height:1.8;padding:28px;overflow-wrap:anywhere}.lesson-materials{padding:24px}.material-row{display:flex;align-items:center;gap:14px;width:100%;padding:16px 0;border:0;border-bottom:1px solid var(--border,#e4e8f0);background:none;color:inherit;text-align:left;cursor:pointer}.material-row>span{flex:1;min-width:0;overflow-wrap:anywhere}.material-row strong,.material-row small{display:block}.material-row small{margin-top:4px;color:var(--muted,#69758c)}.lesson-aside{padding:24px;position:sticky;top:100px}.lesson-aside h2{font-size:18px;margin-bottom:16px}.lesson-aside .btn{width:100%;margin-top:14px;white-space:normal}.lesson-aside dl{margin:0}.lesson-aside dt{font-size:13px;color:var(--muted,#69758c);margin-top:16px}.lesson-aside dd{font-size:14px;margin:4px 0 0}.lesson-task{margin-top:24px;padding:24px}.lesson-task .lesson-row{padding:18px 0}.live-wait{text-align:center;padding:60px 24px}.live-wait>svg{width:40px;height:40px}.live-wait p{margin:16px}.editor-head{display:flex;align-items:center;gap:12px;margin-bottom:24px;position:sticky;top:0;z-index:5;background:var(--bg,#f4f6fa);padding:12px 0}.editor-head>span{margin-right:auto;font-size:13px;color:var(--muted,#69758c)}.course-editor{display:grid;grid-template-columns:270px minmax(0,1fr);gap:24px;align-items:start}.course-tree{padding:16px;position:sticky;top:85px;max-height:calc(100vh - 140px);overflow:auto}.tree-course,.tree-section-title,.tree-item{display:flex;align-items:center;gap:10px;background:none;border:0;text-align:left;width:100%;padding:12px;color:inherit;cursor:pointer;border-radius:10px}.tree-course{font-weight:600}.tree-caption{font-size:12px;text-transform:uppercase;letter-spacing:.08em;color:var(--muted,#69758c);margin:24px 12px 12px}.tree-section-title{font-weight:700;background:#6474aa08}.tree-item{font-size:14px;margin:4px 0}.tree-item small{display:block;font-size:12px;color:var(--muted,#69758c);margin-top:4px}.tree-item svg{flex:none;width:18px}.tree-item span{overflow-wrap:anywhere;min-width:0}.tree-item.active,.tree-course.active,.tree-section-title.active{background:#e9edff;color:#33479b}.tree-item.archived{opacity:.55}.tree-section{margin-bottom:20px}.tree-add{font-size:13px}.course-tree>#add-section{width:100%}.editor-panel{min-width:0;overflow:hidden}.editor-panel .panel-head{align-items:center;gap:14px;flex-wrap:wrap}.editor-order{display:flex;gap:6px}.editor-fields{padding:28px;display:flex;flex-direction:column;gap:18px}.editor-fields .field{margin:0}.editor-fields textarea{resize:vertical;min-height:120px}.editor-fields .field-grid{display:grid;grid-template-columns:1fr 1fr;gap:18px}.editor-subsection{border-top:1px solid var(--border,#e4e8f0);padding-top:24px;margin-top:8px;display:flex;flex-direction:column;gap:16px}.editor-subsection h3{margin:0}.editor-subsection p{line-height:1.6}.course-check{display:flex;align-items:center;gap:10px;font-size:14px;line-height:1.5}.course-check input{width:18px;height:18px;flex:none;accent-color:#4055b5}.audience-list{max-height:220px;overflow:auto;display:flex;flex-direction:column;gap:10px}.material-upload{position:relative;overflow:hidden;width:fit-content}.material-upload input{position:absolute;inset:0;opacity:0;cursor:pointer}.editor-fields .file-item>span{overflow-wrap:anywhere;flex:1}.course-preview-banner{padding:14px 20px;background:#fff5d9;border-radius:12px;color:#715a22;font-size:14px;margin-bottom:20px}.add-element-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin:24px 0}.assignment-context{padding:18px 22px;margin-bottom:24px;border:1px solid #cbd3f0;background:#eef1ff;border-radius:14px;line-height:1.6}.assignment-context strong{display:block}.assignment-context small{color:#5a6581}
[data-theme=dark] .course-card{background:#1b263c;border-color:#303c54}[data-theme=dark] .course-cover{background:#30355a;color:#d8dcff}[data-theme=dark] .course-cover.history{background:#4a352e;color:#ffcfb4}[data-theme=dark] .course-cover.russian{background:#23483e;color:#b9eedc}[data-theme=dark] .course-cover .subject-icon{background:#ffffff16}[data-theme=dark] .editor-head{background:#121a2b}[data-theme=dark] .tree-item.active,[data-theme=dark] .tree-course.active,[data-theme=dark] .tree-section-title.active{background:#303c64;color:#dde5ff}[data-theme=dark] .assignment-context{background:#26345a;color:#e5ebff;border-color:#465a87}
@media(max-width:1050px){.course-editor{grid-template-columns:220px minmax(0,1fr);gap:16px}.lesson-layout{grid-template-columns:minmax(0,1fr)}.lesson-aside{position:static}.editor-fields{padding:20px}}
@media(max-width:700px){.course-grid{grid-template-columns:1fr;gap:16px}.course-cover{height:88px}.course-card-body{padding:20px}.course-editor{display:flex;flex-direction:column}.course-tree{position:static;width:100%;max-height:280px}.editor-panel{width:100%}.editor-head{flex-wrap:wrap;top:0;gap:8px}.editor-head .btn{font-size:13px;padding:10px}.editor-head>span{font-size:12px}.editor-fields .field-grid{grid-template-columns:1fr}.lesson-row{padding:18px 16px;gap:12px}.lesson-info strong{font-size:15px}.lesson-info small,.lesson-info>span{font-size:13px}.lesson-text,.lesson-materials{padding:20px}.lesson-task{padding:20px}.course-toolbar{flex-wrap:wrap}.editor-order{flex-wrap:wrap}.course-preview-banner{font-size:13px}.add-element-grid{grid-template-columns:1fr}.bottom-nav{overflow-x:auto;justify-content:flex-start}.bottom-nav button{min-width:62px;flex:1;font-size:12px}}

.broadcast-panel{padding:22px;border:1px solid var(--border,#dbe2ef);border-radius:18px;background:var(--bg,#f5f7fc)}.broadcast-panel h3{margin:4px 0 12px}.broadcast-copy{display:flex;gap:8px;align-items:center}.broadcast-copy input{min-width:0;flex:1;font-family:monospace}.broadcast-panel .field{margin-top:14px}@media(max-width:600px){.broadcast-copy{flex-wrap:wrap}.broadcast-copy input{flex-basis:100%}.broadcast-panel{padding:16px}}
/* Course identity, independent from its learning programme. */
.course-profile{padding:28px;margin-bottom:28px;overflow:hidden}.course-profile-top{display:flex;align-items:flex-start;gap:24px}.course-avatar{width:112px;height:112px;object-fit:cover;border-radius:24px;flex-shrink:0;border:1px solid var(--line,#e4e8f0)}.avatar-fallback{display:grid;place-items:center;background:linear-gradient(140deg,#ebedff,#d9dcf3);color:#4055b5;font-size:44px;font-weight:700}.course-profile-title{flex:1;min-width:0}.course-profile h1{font-size:30px;line-height:1.2;margin:12px 0;overflow-wrap:anywhere}.course-profile .subline{line-height:1.65;white-space:pre-line}.course-tags{display:flex;gap:6px;flex-wrap:wrap}.course-tags span{padding:5px 9px;border-radius:7px;background:var(--bg,#f4f6fa);color:var(--muted,#69758c);font-size:12px}.course-facts{display:grid;grid-template-columns:1fr .8fr 1.4fr;gap:12px;margin-top:24px}.course-facts>div{border-radius:12px;background:var(--bg,#f4f6fa);padding:16px;min-width:0}.course-facts small{display:block;color:var(--muted,#69758c);font-size:12px;margin-bottom:6px}.course-facts strong{font-size:14px;line-height:1.5;overflow-wrap:anywhere}.course-dates{display:flex;gap:20px;flex-wrap:wrap;padding-top:18px;font-size:13px;color:var(--muted,#69758c)}.course-links{display:flex;gap:10px;flex-wrap:wrap;margin-top:22px;padding-top:22px;border-top:1px solid var(--line,#e4e8f0)}.course-links a,.link-swatch{display:inline-flex;align-items:center;gap:24px;color:#fff;text-decoration:none;border-radius:10px;padding:11px 16px;font-size:14px;font-weight:600;overflow-wrap:anywhere}.course-links a:hover{filter:brightness(1.1)}.course-links a:focus-visible{outline:3px solid #99aaff;outline-offset:3px}.course-banner{display:flex;align-items:center;gap:24px;padding:28px 32px;background:var(--banner-color,#4055b5);color:white;border-radius:20px;margin-bottom:20px;overflow:hidden}.course-banner>div{flex:1;min-width:0}.course-banner .eyebrow{color:#ffffffc9}.course-banner h2{font-size:25px;line-height:1.25;margin:12px 0;overflow-wrap:anywhere}.course-banner p{line-height:1.6;white-space:pre-line}.course-banner .btn{margin-top:16px;background:white;color:#23304d;text-decoration:none}.course-banner img{width:30%;max-height:220px;object-fit:contain;border-radius:12px}.course-card .course-avatar{width:60px;height:60px;border-radius:15px;font-size:28px}.course-image-setting{display:flex;gap:20px;align-items:center}.course-image-setting .course-avatar{width:88px;height:88px;border-radius:20px}.course-link-editor{padding:18px;background:var(--bg,#f4f6fa);border-radius:12px}.course-link-tools{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-top:14px}.link-swatch{margin-right:auto}.banner-editor-image{max-width:100%;max-height:180px;object-fit:contain;border-radius:12px;align-self:flex-start}.course-profile-action{flex-shrink:0}
@media(max-width:1050px){.course-profile-top{flex-wrap:wrap}.course-profile-action{width:100%}.course-profile-title{flex-basis:calc(100% - 140px)}.course-facts{grid-template-columns:1fr 1fr}.course-facts>div:last-child{grid-column:1/-1}}
@media(max-width:600px){.course-profile{padding:20px}.course-profile-top{gap:16px}.course-avatar{width:72px;height:72px;border-radius:18px;font-size:32px}.course-profile-title{flex-basis:calc(100% - 88px)}.course-profile h1{font-size:23px}.course-profile .subline{font-size:14px}.course-facts{gap:8px}.course-facts>div{padding:12px}.course-banner{padding:22px;gap:12px}.course-banner h2{font-size:21px}.course-banner img{width:25%;max-height:140px}.course-links a{flex-grow:1;justify-content:space-between}.course-image-setting{align-items:flex-start;flex-wrap:wrap}.course-link-editor{padding:14px}.course-profile-action .btn{width:100%}}
/* Wide course catalogue: a square illustration, programme summary and clear entry action. */
.course-grid{display:flex;flex-direction:column;gap:24px}.course-card.course-list-card{display:grid;grid-template-columns:clamp(180px,22vw,280px) minmax(0,1fr) minmax(210px,27%);gap:28px;padding:24px;align-items:center;cursor:default}.course-card.course-list-card:hover{transform:none;box-shadow:0 8px 28px #18274909}.course-list-image{aspect-ratio:1;width:100%;overflow:hidden;border-radius:18px;background:#edeefe}.course-card.course-list-card .course-list-image .course-avatar{display:flex;align-items:center;justify-content:center;width:100%;height:100%;aspect-ratio:1;object-fit:contain;border:0;border-radius:0;font-size:80px}.course-list-image.history .avatar-fallback{background:linear-gradient(140deg,#fff0e6,#f6d9c5);color:#a14c20}.course-list-image.russian .avatar-fallback{background:linear-gradient(140deg,#e4f2ed,#c5e6d7);color:#23694f}.course-list-main{min-width:0}.course-card.course-list-card h2{font-size:clamp(22px,2.2vw,30px);margin:18px 0 12px;overflow-wrap:anywhere}.course-card.course-list-card p{margin:0;min-height:0}.course-card.course-list-card .course-card-meta{margin-top:18px;flex-wrap:wrap;gap:8px}.course-list-side{display:flex;flex-direction:column;gap:24px;align-self:stretch;justify-content:space-between;padding:4px 0}.course-list-facts{display:grid;gap:10px}.course-list-facts>div{border-radius:14px;background:var(--bg,#f4f6fa);padding:16px}.course-list-facts .course-list-access{background:#fff3c5;color:#665014}.course-list-facts small{display:block;margin-bottom:8px;color:inherit;font-size:12px}.course-list-facts strong{font-size:14px;line-height:1.5;display:block;overflow-wrap:anywhere}.course-list-go{width:100%;justify-content:space-between;min-height:48px}.course-card.course-list-card .course-tags span{border:1px solid var(--line,#e4e8f0);background:transparent}.course-card.course-list-card:focus-within{border-color:#7b88c6}
@media(max-width:1150px){.course-card.course-list-card{grid-template-columns:180px minmax(0,1fr);gap:22px}.course-list-side{grid-column:1/-1;flex-direction:row;align-items:center;gap:18px;padding:0}.course-list-facts{display:grid;grid-template-columns:1fr 1fr;flex:1}.course-list-go{width:180px}.course-card.course-list-card h2{font-size:24px}}
@media(max-width:600px){.course-card.course-list-card{display:flex;flex-direction:column;align-items:stretch;padding:18px;gap:18px}.course-list-image{width:100%;max-width:320px;align-self:center}.course-card.course-list-card h2{font-size:24px;margin-top:14px}.course-list-side{flex-direction:column;align-items:stretch;gap:16px}.course-list-facts{width:100%;grid-template-columns:1fr 1fr}.course-list-facts>div{padding:13px}.course-list-go{width:100%}.course-card.course-list-card .course-card-meta{font-size:12px}.course-card.course-list-card .course-list-image .course-avatar{font-size:84px}}
/* Compact catalogue on phones: identify, check access, enter — without a screen-sized cover. */
@media(max-width:600px){
.course-grid{gap:14px}
.course-card.course-list-card{display:grid;grid-template-columns:88px minmax(0,1fr);align-items:start;gap:16px;padding:16px;border-radius:18px}
.course-list-image{width:88px;height:88px;max-width:none;border-radius:14px;align-self:start}
.course-card.course-list-card .course-list-image .course-avatar{font-size:36px}
.course-list-main{min-width:0}
.course-card.course-list-card h2{font-size:18px;line-height:1.35;margin:8px 0 0;text-wrap:initial}
.course-card.course-list-card .course-tags{gap:4px}
.course-card.course-list-card .course-tags span{font-size:10px;padding:3px 5px;border:0;background:var(--bg,#f4f6fa)}
.course-card.course-list-card .course-tags span:nth-child(n+3){display:none}
.course-card.course-list-card .course-list-main>p{display:none}
.course-card.course-list-card .course-card-meta{border:0;padding:0;margin-top:10px;font-size:11px;line-height:1.4}
.course-card.course-list-card .course-card-meta .badge{font-size:10px}
.course-list-side{grid-column:1/-1;display:flex;flex-direction:column;gap:12px;padding-top:12px;border-top:1px solid var(--line,#e4e8f0)}
.course-list-facts{grid-template-columns:1fr 1fr;gap:10px;width:100%}
.course-list-facts>div,.course-list-facts .course-list-access{padding:0;background:none;color:var(--text,#18233c);border-radius:0}
.course-list-facts small{font-size:11px;color:var(--muted,#69758c);margin-bottom:4px}
.course-list-facts strong{font-size:12px;line-height:1.45}
.course-list-go{min-height:46px;width:100%;border-radius:11px;font-size:14px}
.course-card.course-list-card progress{margin:10px 0 4px;height:5px}
.course-card.course-list-card .course-list-main>small{font-size:11px}
.course-toolbar .search{max-width:none}
}
@media(max-width:360px){.course-card.course-list-card{grid-template-columns:72px minmax(0,1fr);gap:12px;padding:14px}.course-list-image{width:72px;height:72px}.course-card.course-list-card h2{font-size:17px}}

/* Keep the edited form in reach on a phone; the programme opens on demand. */
.course-program-toggle{display:none}
@media(max-width:760px){
 .course-program-toggle{display:flex;width:100%;justify-content:flex-start;margin:0 0 14px}
 .course-editor:not(.program-open)>.course-tree{display:none}
 .course-editor.program-open>.course-tree{max-height:50dvh;overflow-y:auto}
 .editor-head{display:grid;grid-template-columns:1fr 1fr;gap:8px;position:sticky;top:0;z-index:12;background:var(--bg);padding:10px 0;margin-bottom:12px}
 .editor-head #editor-exit{justify-content:flex-start}
 .editor-head #course-save-status{justify-self:end;font-size:12px}
 .editor-head>.btn{min-width:0;min-height:44px}
 .editor-order{flex-wrap:wrap;gap:6px}
 .editor-panel{min-width:0}
 .editor-panel .field input,.editor-panel .field select,.editor-panel .field textarea{min-width:0;width:100%}
}
.course-delete-notice{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:14px 18px;margin:16px 0;background:var(--surface,#fff);border:1px solid var(--border,#e4e8f0);border-radius:12px;font-size:14px}.course-delete-notice .btn{flex-shrink:0}@media(max-width:700px){.course-delete-notice{align-items:flex-start;flex-direction:column}.editor-panel>.panel-head{flex-wrap:wrap;gap:12px}}
