:root{--ink:#171925;--accent:#5039ed;--muted:#575c70;--line:#d8d9e5;color:var(--ink);font-family:Inter,"Segoe UI",Arial,sans-serif;background:#f3f3f8;scroll-behavior:smooth}*{box-sizing:border-box}body{margin:0}header,main,footer{width:min(1280px,92%);margin:auto}header,footer,.head,.bar,.filters,.tools{display:flex;align-items:center;justify-content:space-between;gap:16px}header{min-height:90px}.brand{display:flex;align-items:center;gap:12px}.brand b{font-size:32px;letter-spacing:-2px}.brand i{font-size:36px;color:var(--accent);font-weight:300}.brand span{font-size:13px;font-weight:650;line-height:1.2}a{color:inherit;text-decoration:none}nav{display:flex;gap:28px;font-size:14px}nav a:hover{color:var(--accent)}button,input,select{font:inherit}button{cursor:pointer;border:0}.hero{position:relative;isolation:isolate;overflow:hidden;background:#171725;border-radius:30px;color:white;min-height:424px;display:flex;align-items:center}.photo{position:absolute;inset:0 0 0 45%;z-index:-2;background:url("campus.jpg") right center/auto 135% no-repeat}.hero:after{content:"";position:absolute;inset:0;z-index:-1;background:linear-gradient(95deg,#151523 30%,#191829f7 46%,#1a15243d 75%,#110e1d14)}.lead{padding:50px 6%;max-width:580px}.over,.type,kbd{font:600 11px/1.5 Consolas,monospace;letter-spacing:.13em}.lead .over{color:#c5bcff}h1,h2,h3,p{margin:0}h1{font-size:clamp(60px,6vw,94px);line-height:.94;letter-spacing:-.067em;margin:19px 0}h1 span{color:#ab9eff}.lead p{line-height:1.55;color:#d2d1de;max-width:420px}.lead button,.primary{background:var(--accent);color:white;padding:14px 22px;border-radius:12px;font-weight:650}.lead button{margin-top:24px;background:#ddd7ff;color:#26184d}#catalog{padding:52px 0 36px}.head .over,.type{color:#61539a}h2{font-size:clamp(28px,3vw,43px);line-height:1.15;letter-spacing:-.055em;margin-top:5px}.search{display:flex;align-items:center;gap:12px;background:white;padding:13px 16px;border:1px solid var(--line);border-radius:15px;min-width:min(100%,340px);transition:box-shadow .2s}.lens{width:16px;height:16px;border:2px solid #73758c;border-radius:50%;position:relative}.lens:after{content:"";position:absolute;background:#73758c;width:7px;height:2px;transform:rotate(45deg);bottom:-3px;right:-5px}.search input{flex:1;width:0;border:0;outline:none;color:var(--ink);background:transparent}kbd{border:1px solid var(--line);border-radius:4px;padding:0 5px;color:var(--muted)}.filters{justify-content:flex-start;flex-wrap:wrap;margin:26px 0 14px;gap:7px}.filters button,.tools button,.bar button,.tools select,.source{background:white;border:1px solid var(--line);border-radius:10px;padding:9px 14px;color:var(--ink)}.filters button[aria-pressed=true]{background:var(--ink);color:white}.filters button:hover,.tools button:hover{border-color:var(--accent)}#count{color:var(--muted);font-size:13px;margin-bottom:12px}#grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}.card{display:flex;flex-direction:column;text-align:left;background:white;border:1px solid #e3e3ed;border-radius:19px;overflow:hidden;color:inherit;padding:0;transition:transform .2s,box-shadow .2s;animation:appear .25s both}.card:hover{transform:translateY(-3px);box-shadow:0 8px 24px #20163d11}.card img{width:100%;aspect-ratio:16/9;object-fit:cover}.card .copy{padding:20px;display:grid;gap:8px}.card h3{font-size:23px;line-height:1.13;letter-spacing:-.045em}.card p,.reading p{color:var(--muted);line-height:1.55}.card .type{font-size:10px}.type{display:block}.empty{grid-column:1/-1;padding:24px}.bar{position:sticky;top:0;background:#fff;z-index:2;padding:16px 22px;border-bottom:1px solid var(--line)}.bar h2{font-size:24px}.bar button{font-size:13px}.tools{justify-content:center;flex-wrap:wrap;padding:12px}.tools button:disabled{opacity:.35}.tools select{max-width:150px}.page{display:block;width:100%;height:auto;max-height:66vh;object-fit:contain;background:#11131a}.reading{padding:26px;max-width:800px;margin:auto}.reading article+article{margin-top:20px}.reading h3{margin-bottom:5px}.source{display:inline-block;margin:6px}.frame{border:0;width:100%;height:72vh}.sources{padding:16px}dialog{padding:0;border:0;border-radius:20px;width:min(1000px,96vw);max-width:96vw;max-height:94dvh;color:var(--ink)}dialog[open]{animation:appear .2s}dialog::backdrop{background:#111121bf}body:has(dialog[open]){overflow:hidden}footer{border-top:1px solid var(--line);padding:23px 0 32px;color:var(--muted);font-size:13px}:focus-visible{outline:3px solid #806bff;outline-offset:3px}@keyframes appear{from{opacity:0;translate:0 5px}to{opacity:1;translate:0 0}}@media(max-width:850px){#grid{grid-template-columns:repeat(2,minmax(0,1fr))}.head{align-items:stretch;flex-direction:column}.photo{inset-inline-start:35%}.lead{max-width:490px}}@media(max-width:570px){.brand b{font-size:23px}.brand{gap:6px}.brand span{font-size:10px}nav{gap:10px;font-size:12px}header{min-height:70px}.lead{padding:32px 22px}.hero{min-height:385px}.hero:after{background:linear-gradient(90deg,#151523f5,#151523b5)}.photo{inset:0;background-size:auto 110%}#grid{grid-template-columns:1fr}#catalog{padding-top:32px}footer{flex-wrap:wrap}.tools{gap:5px}.tools button,.tools select{font-size:13px;padding:8px}.bar{padding:12px}.bar h2{font-size:20px}}@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation:none!important;transition:none!important;scroll-behavior:auto!important}}
fieldset{margin:18px 0;border:1px solid var(--line);border-radius:14px;padding:14px}fieldset label{display:block;padding:7px 2px;cursor:pointer}fieldset input{margin-right:10px;accent-color:var(--accent)}legend{font-weight:650}summary{cursor:pointer}.reading details p,details p{white-space:pre-line}.reading .feedback{font-weight:bold;color:var(--accent)}.reading [role=status]{margin-top:10px}.card:has(img){position:relative}.card:has(img) .copy{position:relative;margin:-12px 8px 8px;border:1px solid #ffffffbd;border-radius:15px;background:#ffffffde;backdrop-filter:blur(16px)}footer{flex-wrap:wrap;overflow:hidden}footer:after{content:"АУВД";flex-basis:100%;font-size:clamp(80px,16vw,202px);color:transparent;line-height:.94;letter-spacing:-.075em;font-weight:900;background:radial-gradient(#6255aa 1px,transparent 1.5px) 0 0/4px 4px;background-clip:text}
#grid{display:block}.resource-row{display:flex;justify-content:space-between;align-items:center;gap:12px;width:100%;text-align:left;border-radius:0;border-bottom:1px solid var(--line);background:transparent;padding:17px 8px;font-size:17px;color:var(--ink)}.resource-row span{font-size:13px;color:var(--accent)}.resource-row:hover{background:#eae8f7}.video-info{padding:20px;display:flex;align-items:center;justify-content:space-between;gap:15px}.video-info p{margin-top:4px;color:var(--muted)}#cinema{border-radius:19px;background:white;overflow:hidden}#player{background:#151523;width:100%;display:block;aspect-ratio:16/9;max-height:62vh}.video-info button{white-space:nowrap}#count:empty{display:none}@media(max-width:600px){.video-info{align-items:flex-start;flex-direction:column}}

.player-box{background:#101018;color:white;width:100%;position:relative}.player-box:fullscreen{display:flex;flex-direction:column;justify-content:center}.player-box:fullscreen #player{height:calc(100dvh - 88px)}#player{width:100%;height:auto;aspect-ratio:16/9;max-height:62vh;object-fit:fill}.player-box:fullscreen #player{max-height:none;height:calc(100dvh - 88px)}.movie-controls{padding:10px clamp(12px,3vw,48px);background:#1c1c29;color:white}.seek,.movie-bar{display:flex;align-items:center;gap:12px}.seek{font:13px Consolas,monospace}.seek input{flex:1}.movie-bar{margin-top:6px}.movie-bar button,.movie-bar select{border:0;display:grid;place-items:center;border-radius:6px;padding:7px;background:#ffffff15;color:white;cursor:pointer}.movie-bar select{margin-left:auto;background:#332e42}.movie-bar svg{width:17px;height:17px}.movie-bar input{width:80px}.movie-controls input{accent-color:#ada0ff}.video-info{padding-inline:clamp(14px,3vw,56px)}#academy-mark,#academy-mark .reveal{display:block;width:50px;height:50px;position:relative;background:#ededf1 url('auvd.svg') center/70% no-repeat;border-radius:12px;overflow:hidden}#academy-mark img{width:100%;height:100%;object-fit:contain}#academy-mark canvas{max-width:100%;max-height:100%}@media(max-width:520px){#academy-mark,#academy-mark .reveal{width:32px;height:32px}}

.academy-footer{width:100%;max-width:none;position:relative;isolation:isolate;border:0;margin-top:12px;padding:50px max(4%,calc((100% - 1280px)/2)) 34px;background:linear-gradient(180deg,#f3f3f8,#e9e8f2);color:#373648;overflow:visible}.academy-footer:after{display:none}.foot-brand{display:flex;align-items:center;gap:12px}.foot-brand strong{font-size:17px}.foot-brand p{margin:3px 0 0;color:#55576a}.academy-footer nav{display:flex;flex-wrap:wrap;gap:22px}.academy-footer nav a{padding-block:8px}.resource-row{transition:background .24s ease,color .24s ease}.video-enter{animation:video-in .45s ease-out}@keyframes video-in{from{opacity:.3}to{opacity:1}}@media(max-width:570px){.academy-footer{align-items:flex-start;gap:12px;padding-block:32px}}
:root{--scroll-track:#e8e7f0;--scroll-grip:#8072b4;--scroll-hover:#605093;scrollbar-gutter:stable}
@supports selector(::-webkit-scrollbar){
 ::-webkit-scrollbar{width:11px;height:11px}::-webkit-scrollbar-track{background:var(--scroll-track);border-radius:99px}
 ::-webkit-scrollbar-thumb{background:var(--scroll-grip);border:3px solid var(--scroll-track);border-radius:99px;min-height:30px}
 ::-webkit-scrollbar-thumb:hover{background:var(--scroll-hover);border-width:2px}::-webkit-scrollbar-thumb:active{background:#5039ed}
 ::-webkit-scrollbar-button{display:none;width:0;height:0}::-webkit-scrollbar-corner{background:var(--scroll-track)}
}
@supports not selector(::-webkit-scrollbar){*{scrollbar-width:thin;scrollbar-color:var(--scroll-grip) var(--scroll-track)}}
@media(forced-colors:active){*{scrollbar-color:auto}}
.seek progress{appearance:none;flex:1;height:5px;border:0;border-radius:20px;overflow:hidden;background:#414050;color:#ad9dff;pointer-events:none}.seek progress::-webkit-progress-bar{background:#414050;border-radius:20px}.seek progress::-webkit-progress-value{background:#ad9dff;border-radius:20px}.seek progress::-moz-progress-bar{background:#ad9dff}.movie-bar .speed{margin-left:auto;min-width:48px;font-weight:650}.movie-bar button,.movie-bar input,.seek,.brand,.filters button{user-select:none;-webkit-tap-highlight-color:transparent}.movie-bar button:focus:not(:focus-visible){outline:0;box-shadow:none}.movie-bar button:focus-visible{outline:0;box-shadow:inset 0 -2px #d6cdff}.movie-controls input[type=range],.glass input[type=range]{appearance:none;height:5px;background:#8274ad;border-radius:20px;cursor:pointer}.movie-controls input[type=range]::-webkit-slider-thumb,.glass input[type=range]::-webkit-slider-thumb{appearance:none;width:13px;height:13px;background:#e8e2ff;border-radius:100%}.movie-controls input[type=range]::-moz-range-thumb{background:#e8e2ff;border:0;border-radius:100%;width:13px;height:13px}fieldset input[type=radio]{appearance:none;display:inline-grid;place-items:center;width:17px;height:17px;vertical-align:middle;border:1.5px solid #9a94aa;border-radius:50%;background:#fff}fieldset input[type=radio]:checked{border:5px solid var(--accent)}button{font-family:inherit}::selection{background:#dcd6ff;color:#211347}
.brand-icon{border-radius:10px;flex:none}.movie-bar button[aria-label]:hover{outline:0}@media(max-width:570px){.brand-icon{width:29px;height:29px}}
:root[data-theme=dark]{color-scheme:dark;--ink:#f0eff6;--muted:#bbb7cd;--line:#3d394b;--accent:#a89aff;--scroll-track:#23212c;--scroll-grip:#746497;background:#17161d;color:var(--ink)}
:root[data-theme=dark] :is(.filters button,.bar,.bar button,.tools button,.search,.source,dialog,#cinema){background:#26242f;color:var(--ink)}
:root[data-theme=dark] .filters [aria-pressed=true]{background:#d8ceff;color:#211935}
:root[data-theme=dark] :is(.lesson-tabs,.forum-article){background:#211f2a}
:root[data-theme=dark] .resource-row:hover{background:#322d40}
:root[data-theme=dark] .primary{background:#6850d7;color:white}
:root[data-theme=dark] .glass:not(.login){background:#23212ee8;color:#f3efff}
:root[data-theme=dark] .glass:not(.login) :is(input,select,textarea,.preview){background:#322f41;color:#f3efff}
:root[data-theme=dark] .glass .preview p{color:#dfd9ee}
:root[data-theme=dark] #admin{background:linear-gradient(130deg,#292838,#37304b)}
.theme-switch{border:1px solid var(--line);width:39px;height:39px;border-radius:50%;display:grid;place-items:center;background:transparent;color:inherit;font-size:21px;line-height:1}.header-tools{display:flex;align-items:center;gap:16px}#grid.lesson-tabs{margin-top:36px;padding:8px;display:flex;gap:6px;flex-wrap:wrap;border:1px solid var(--line);border-radius:17px;background:#eeedf5}.lesson-tabs .resource-row{flex:1 1 170px;border:0;border-radius:11px;justify-content:center;padding:15px 10px;font-size:15px}.lesson-tabs .resource-row span{display:none}.lesson-tabs .resource-row[aria-pressed=true]{background:#5141ba;color:#fff}.forum-article{line-height:1.65}.forum-article h3{margin:12px 0;font-size:25px}.forum-article .primary{display:inline-block;margin-top:20px}
#viewer{width:min(1500px,97vw);max-width:97vw;max-height:96dvh}#viewer:has(.frame){height:94dvh}#viewer:has(.frame) #body{height:calc(100% - 68px)}#viewer .frame{display:block;height:100%}.academy-footer{margin-top:28px;padding-top:28px;border-radius:24px 24px 0 0;background:linear-gradient(150deg,#23223d,#222144 65%,#16172e);color:#f1edff}.academy-footer p,.academy-footer nav a{color:#d4cfe8}.academy-footer:after{display:block;flex:0 0 100%;content:"АУВД";font-family:Arial,sans-serif;font-size:clamp(60px,10vw,132px);line-height:1.15;font-weight:900;letter-spacing:-.055em;margin-top:14px;padding-top:14px;border-top:1px solid #ffffff2a;color:transparent;background:radial-gradient(#b4a8f1 1.1px,transparent 1.55px) 0 0/4px 4px;background-clip:text}.academy-footer:hover:after{filter:brightness(1.08);transition:filter .4s}.brand{white-space:nowrap}@media(max-width:570px){.header-tools{gap:8px}header{flex-wrap:wrap;gap:8px;padding-block:10px}.theme-switch{width:31px;height:31px}.lesson-tabs .resource-row{flex-basis:100%}}

/* The moving glass thumb marks the active colour scheme. */
:root {
  --switch-track: #e4e1ed;
  --switch-thumb: #fff;
  --switch-icon: #635e76;
  --switch-active: #5840c2;
  --lesson-bg: #efedf6;
  --lesson-text: #39354d;
  --lesson-hover: #e4dff1;
  --lesson-active: #5039be;
  --lesson-active-text: #fff;
}
:root[data-theme="dark"] {
  --switch-track: #292735;
  --switch-thumb: #494459;
  --switch-icon: #beb8d0;
  --switch-active: #eeeaff;
  --lesson-bg: #23222d;
  --lesson-text: #ece8fc;
  --lesson-hover: #373444;
  --lesson-active: #c5b8ff;
  --lesson-active-text: #21163e;
}
header .brand { gap: 11px; }
header .brand-icon { width: 40px; height: 40px; border-radius: 12px; box-shadow: 0 3px 8px #30206120; }
header .brand b { font-family: Inter,"Segoe UI",sans-serif; font-size: 29px; font-weight: 800; line-height: 1; letter-spacing: -.055em; }
header .brand i { display: inline-flex; align-items: center; font-size: 29px; font-weight: 300; }
header .brand span { color: var(--muted); font-size: 12px; font-weight: 600; line-height: 1.2; }
header .header-tools { gap: clamp(12px,2.2vw,34px); }
header .header-tools a { font-size: 14px; font-weight: 550; }
header .theme-switch {
  position: relative; isolation: isolate; flex: 0 0 auto; display: inline-grid; grid-template-columns: repeat(2,29px);
  align-items: center; justify-items: center; width: 66px; height: 36px; padding: 0 3px;
  border: 1px solid var(--line); border-radius: 99px; background: var(--switch-track);
  color: var(--switch-icon); box-shadow: inset 0 1px 3px #18132212; touch-action: manipulation;
}
.theme-switch::before {
  content: ""; position: absolute; z-index: -1; inset: 3px auto 3px 3px; width: 29px; border-radius: 50%;
  background: var(--switch-thumb); box-shadow: 0 1px 4px #1911242b;
  transition: transform .25s cubic-bezier(.2,.75,.25,1), background .2s;
}
.theme-switch svg { width: 17px; height: 17px; transition: color .2s; }
:root:not([data-theme="dark"]) .theme-switch .day, :root[data-theme="dark"] .theme-switch .night { color: var(--switch-active); }
:root[data-theme="dark"] .theme-switch::before { transform: translateX(29px); }
#grid.lesson-tabs {
  display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 5px; margin-block-start: clamp(24px,3.3vw,46px);
  padding: 6px; border-radius: 17px; background: var(--lesson-bg); border-color: var(--line);
}
#grid.lesson-tabs .resource-row {
  min-height: 49px; padding: 12px; border: 1px solid transparent; border-radius: 12px;
  color: var(--lesson-text); text-align: center; font-size: 15px; line-height: 1.35;
  transition: background-color .18s,color .18s,box-shadow .18s;
}
#grid.lesson-tabs .resource-row:hover { background: var(--lesson-hover); }
#grid.lesson-tabs .resource-row[aria-pressed="true"] {
  background: var(--lesson-active); color: var(--lesson-active-text);
  box-shadow: inset 0 1px 0 #ffffff29, 0 2px 4px #17132920;
}
#grid.lesson-tabs .resource-row:focus-visible, .theme-switch:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
:root[data-theme="dark"] .head .over, :root[data-theme="dark"] .type { color: #c7b9ff; }
@media (max-width: 620px) {
  header { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 0 12px; padding: 15px 0; }
  header .brand { gap: 7px; }
  header .brand-icon { width: 32px; height: 32px; border-radius: 9px; }
  header .brand b { font-size: 25px; }
  header .brand i { font-size: 24px; }
  header .brand span { font-size: 10px; }
  header .header-tools { display: contents; }
  header .theme-switch { grid-column: 2; grid-row: 1; }
  header .header-tools nav, header .header-tools > a { grid-column: 1 / -1; grid-row: 2; justify-self: start; margin-top: 10px; }
  header .header-tools nav { display: flex; gap: 18px; }
  header .header-tools a { font-size: 13px; line-height: 1.5; }
  #grid.lesson-tabs { grid-template-columns: 1fr; }
  #grid.lesson-tabs .resource-row { justify-content: flex-start; padding-inline: 18px; text-align: left; }
}
:root.changing-theme #grid.lesson-tabs .resource-row { transition: none; }
/* The launcher's light lift and press response, shared by academy actions. */
@media (prefers-reduced-motion: no-preference) {
  :is(.primary, #start, .ed-primary, .ed-secondary, .bar button, .movie-bar button) {
    transition: background-color 170ms ease, color 170ms ease,
      translate 170ms cubic-bezier(.2,.8,.2,1),
      scale 170ms cubic-bezier(.2,.8,.2,1), filter 170ms ease;
  }
  @media (hover:hover) {
    :is(.primary, #start, .ed-primary, .ed-secondary, .bar button, .movie-bar button):not(:disabled):hover {
      translate: 0 -1px;
      filter: brightness(1.04);
    }
  }
  :is(.primary, #start, .ed-primary, .ed-secondary, .bar button, .movie-bar button):not(:disabled):active {
    translate: 0 0;
    scale: .98;
  }
}

/* A free-standing refracted monogram keeps the navigation mark legible without an icon plate. */
header .brand-reveal {
  position: relative; display: grid; place-items: center; flex: none; width: 53px; height: 53px;
  margin-inline: -4px -3px; color: var(--accent); isolation: isolate;
}
.brand-reveal__mount, .brand-reveal .academy-glass {
  position: absolute; inset: 0; width: 100%; height: 100%; display: block; overflow: hidden;
}
.brand-glyph { width: 75%; height: 75%; }
.academy-glass[data-renderer="fallback"] > span {
  position: absolute; inset: 0; display: block; margin: auto;
  background-image: linear-gradient(115deg,#5936d6 10%,#987bfa 34%,#e4d8ff 46%,#7951db 64%,#4327a7 86%);
  background-size: 220% 100%; animation: academy-reflection 3.8s ease-in-out infinite alternate;
}
@keyframes academy-reflection { from { background-position: 0 50%; } to { background-position: 100% 50%; } }
@media (max-width:620px) { header .brand-reveal { width: 42px; height: 42px; } }
@media (prefers-reduced-motion: reduce) { .academy-glass { display: none; } }
#viewer .bar #close {
  display: inline-grid;
  place-items: center;
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: color-mix(in srgb, currentColor 7%, transparent);
  color: inherit;
}
#viewer .bar #close:hover { background: color-mix(in srgb, currentColor 13%, transparent); }
#viewer.form-dialog[open] {
  display: flex;
  flex-direction: column;
  width: min(700px, calc(100vw - 20px));
  max-width: calc(100vw - 20px);
  height: min(960px, 94dvh);
  padding: 0;
  overflow: hidden;
  background: #fff;
}
#viewer.form-dialog .bar { flex: none; padding: 10px 16px; }
#viewer.form-dialog .bar h2 { margin: 0; font-size: clamp(16px,2vw,20px); }
#viewer.form-dialog #body { flex: 1; min-height: 0; height: auto; }
#viewer.form-dialog iframe { display: block; width: 100%; height: 100%; background: white; color-scheme: light; }
:root[data-theme=dark] #viewer.form-dialog { background: #1e1d24; }
:root[data-theme=dark] #viewer.form-dialog iframe { filter: invert(.91) hue-rotate(180deg); }
