:root {
  --brand-red: #e31937;
  --brand-red-dark: #b9152d;
  --brand-yellow: #ffc928;
  --ink: #34373d;
  --muted: #7c8490;
  --line: #e7e8eb;
  --page: #f3f4f6;
  --surface: #ffffff;
  --soft-yellow: #fff8de;
  --soft-red: #fff0f2;
  --soft-green: #eaf7ef;
  --green: #248454;
  --shadow: 0 3px 12px rgba(31, 35, 41, .07);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--page); }
body { margin: 0; color: var(--ink); background: var(--page); font-size: 15px; }
button, input { font: inherit; }
a { color: inherit; }
[hidden] { display: none !important; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.topbar {
  position: sticky;
  z-index: 50;
  top: 0;
  display: grid;
  grid-template-columns: minmax(210px, 1fr) auto minmax(210px, 1fr);
  align-items: center;
  min-height: 72px;
  padding: 0 clamp(20px, 3vw, 54px);
  border-top: 3px solid var(--brand-yellow);
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, .97);
  backdrop-filter: blur(14px);
}

.brand { display: flex; width: max-content; align-items: center; gap: 11px; text-decoration: none; }
.brand img { width: 50px; height: 50px; object-fit: contain; }
.brand strong, .brand small { display: block; line-height: 1.1; }
.brand strong { font-size: 15px; }
.brand small { margin-top: 4px; color: var(--muted); font-size: 11px; }

.main-nav { align-self: stretch; display: flex; align-items: stretch; gap: 25px; }
.nav-link { position: relative; display: flex; align-items: center; color: #666d77; font-size: 14px; font-weight: 650; text-decoration: none; }
.nav-link::after { content: ""; position: absolute; right: 0; bottom: -1px; left: 0; height: 3px; border-radius: 2px 2px 0 0; background: transparent; }
.nav-link:hover, .nav-link.is-active { color: var(--brand-red-dark); }
.nav-link.is-active::after { background: var(--brand-yellow); }
.nav-notification { display: inline-grid; min-width: 18px; height: 18px; margin-left: 4px; padding: 0 5px; place-items: center; border-radius: 999px; color: #fff; background: var(--brand-red); font-size: 9px; font-weight: 900; line-height: 18px; }
.nav-notification[hidden] { display: none; }

.account { position: relative; justify-self: end; display: flex; align-items: center; gap: 10px; min-width: 0; }
.account__copy { text-align: right; }
.account__copy strong, .account__copy small { display: block; max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account__copy strong { font-size: 12px; }
.account__copy small { margin-top: 3px; color: var(--muted); font-size: 10px; }
.avatar { display: grid; place-items: center; width: 40px; height: 40px; flex: 0 0 auto; padding: 0; border: 0; border-radius: 50%; color: #fff; background: #aab0b8; font-size: 12px; font-weight: 850; cursor: pointer; }
.avatar:hover { background: #9299a3; }
.avatar--large { width: 48px; height: 48px; background: var(--brand-red); }
.login-button { padding: 10px 17px; border-radius: 9px; color: #fff; background: var(--brand-red); font-weight: 750; text-decoration: none; }
.profile-menu { position: absolute; z-index: 60; top: 54px; right: 0; width: 280px; overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: #fff; box-shadow: 0 20px 45px rgba(31, 35, 41, .16); }
.profile-menu__head { display: flex; align-items: center; gap: 12px; padding: 18px; border-bottom: 1px solid var(--line); }
.profile-menu__head strong, .profile-menu__head small { display: block; max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.profile-menu__head small { margin-top: 4px; color: var(--muted); font-size: 10px; }
.profile-menu > a { display: block; padding: 13px 18px; color: #555c65; font-size: 13px; text-decoration: none; }
.profile-menu > a:hover { background: #f7f7f8; }

main { width: min(1160px, calc(100% - 40px)); min-height: calc(100vh - 72px); margin: 0 auto; padding: 24px 0 60px; }
.screen { animation: screen-in .18s ease; }
@keyframes screen-in { from { opacity: .35; transform: translateY(4px); } to { opacity: 1; transform: none; } }

.page-hero {
  position: relative;
  isolation: isolate;
  display: flex;
  min-height: 158px;
  align-items: center;
  justify-content: space-between;
  overflow: hidden;
  padding: 28px 36px;
  border-radius: 14px 14px 0 0;
  color: #fff;
  background: linear-gradient(105deg, rgba(116, 10, 28, .95), rgba(211, 25, 53, .9)), url("./images/pattern-1.png") center / 540px auto repeat;
}
.page-hero::after { content: ""; position: absolute; z-index: -1; inset: 0; background: linear-gradient(90deg, rgba(80, 8, 20, .34), transparent 62%); }
.page-hero h1 { margin: 2px 0 8px; font-size: clamp(30px, 4vw, 44px); line-height: 1.08; letter-spacing: -.03em; }
.page-hero p:last-child { margin: 0; color: rgba(255,255,255,.82); font-size: 14px; }
.page-hero img { width: 104px; height: 104px; margin-right: 18px; border-radius: 20px; object-fit: contain; background: rgba(255,255,255,.95); box-shadow: 0 12px 28px rgba(0,0,0,.16); }
.eyebrow { margin: 0 0 8px; color: var(--brand-red); font-size: 10px; font-weight: 850; letter-spacing: .1em; text-transform: uppercase; }
.page-hero .eyebrow { color: var(--brand-yellow); }

.home-carousel { position: relative; min-height: 230px; overflow: hidden; border-radius: 18px; background: #7a0d21; box-shadow: 0 14px 38px rgba(62, 24, 30, .16); }
.home-carousel__slide { position: absolute; inset: 0; display: flex; align-items: center; justify-content: space-between; padding: 38px 52px; color: #fff; background: linear-gradient(105deg, rgba(116, 10, 28, .96), rgba(211, 25, 53, .88)), url("./images/pattern-1.png") center / 540px auto repeat; background-position: center; background-size: cover; text-decoration: none; transition: background-image .25s ease; }
.home-carousel__slide[data-has-link="true"] { cursor: pointer; }
.home-carousel__copy { position: relative; z-index: 2; max-width: 720px; padding-right: 56px; }
.home-carousel__copy .eyebrow { color: var(--brand-yellow); }
.home-carousel__copy h1 { margin: 2px 0 10px; color: #fff; font-size: clamp(34px, 5vw, 52px); line-height: 1.04; letter-spacing: -.035em; text-wrap: balance; }
.home-carousel__copy > p:last-of-type { max-width: 620px; margin: 0; color: rgba(255,255,255,.86); font-size: 15px; line-height: 1.5; }
.home-carousel__action { display: inline-flex; min-height: 42px; align-items: center; gap: 12px; margin-top: 21px; padding: 0 18px; border-radius: 999px; color: #4d3900; background: var(--brand-yellow); font-size: 12px; font-weight: 850; box-shadow: 0 8px 22px rgba(0,0,0,.16); }
.home-carousel__action b { font-size: 17px; }
.home-carousel__logo { position: relative; z-index: 2; width: 112px; height: 112px; margin-right: 24px; padding: 8px; border-radius: 22px; object-fit: contain; background: rgba(255,255,255,.96); box-shadow: 0 14px 32px rgba(0,0,0,.2); }
.home-carousel__arrow { position: absolute; z-index: 4; top: 50%; display: grid; width: 40px; height: 40px; margin-top: -20px; place-items: center; padding: 0 0 4px; border: 1px solid rgba(255,255,255,.5); border-radius: 50%; color: #fff; background: rgba(22, 18, 19, .34); font-size: 31px; line-height: 1; cursor: pointer; backdrop-filter: blur(5px); }
.home-carousel__arrow:hover { background: rgba(22, 18, 19, .62); }
.home-carousel__arrow--prev { left: 12px; }
.home-carousel__arrow--next { right: 12px; }
.home-carousel__dots { position: absolute; z-index: 4; right: 0; bottom: 14px; left: 0; display: flex; justify-content: center; gap: 7px; }
.home-carousel__dots button { width: 8px; height: 8px; padding: 0; border: 0; border-radius: 999px; background: rgba(255,255,255,.5); cursor: pointer; transition: width .18s ease, background .18s ease; }
.home-carousel__dots button.is-active { width: 28px; background: var(--brand-yellow); }
.home-carousel.has-custom-image { min-height: 0; aspect-ratio: 1920 / 520; background: #fff; }
.home-carousel__slide.has-custom-image { padding: 0; background-color: #fff; background-position: center; background-repeat: no-repeat; background-size: contain; }
.home-carousel__slide.has-custom-image .home-carousel__copy,
.home-carousel__slide.has-custom-image .home-carousel__logo { display: none; }
.home-carousel.has-custom-image .home-carousel__arrow { color: var(--ink); border-color: rgba(47, 48, 53, .18); background: rgba(255, 255, 255, .9); box-shadow: 0 5px 18px rgba(31, 35, 41, .14); }
.home-carousel.has-custom-image .home-carousel__arrow:hover { background: #fff; }
.home-carousel.has-custom-image .home-carousel__dots button { background: rgba(47, 48, 53, .32); }
.home-carousel.has-custom-image .home-carousel__dots button.is-active { background: var(--brand-red); }
.home-carousel-link { display: inline-flex; width: max-content; max-width: 100%; min-height: 44px; align-items: center; justify-content: center; gap: 10px; margin: 12px 2px 0 auto; padding: 0 20px; border-radius: 999px; color: #fff; background: var(--brand-red); font-size: 12px; font-weight: 850; text-decoration: none; box-shadow: 0 8px 22px rgba(211, 25, 53, .2); }
.home-carousel-link:hover { color: #fff; background: var(--brand-red-dark); }
.home-carousel-link b { font-size: 17px; }

.banner-admin-help { margin-bottom: 16px; padding: 16px 20px; border: 1px solid #f0d572; border-radius: 12px; color: #6b5207; background: var(--soft-yellow); }
.banner-admin-help strong { display: block; font-size: 13px; }
.banner-admin-help p { margin: 5px 0 0; font-size: 11px; line-height: 1.5; }
.banner-admin-list { display: grid; gap: 16px; }
.banner-admin-card { display: grid; grid-template-columns: 300px minmax(0, 1fr) auto; gap: 20px; padding: 20px; border: 1px solid var(--line); border-radius: 14px; background: #fff; box-shadow: var(--shadow); }
.banner-admin-card__preview { display: flex; min-height: 178px; flex-direction: column; align-items: center; justify-content: center; gap: 10px; overflow: hidden; padding: 12px; border: 1px dashed #cfd3d8; border-radius: 11px; color: var(--muted); background: #f7f7f8; text-align: center; }
.banner-admin-card__preview img { width: 100%; height: auto; aspect-ratio: 1920 / 520; border-radius: 8px; object-fit: contain; background: #fff; }
.banner-admin-card__preview > span { font-size: 11px; }
.banner-admin-card__preview .button { width: 100%; }
.banner-admin-card__fields { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; align-content: start; }
.banner-admin-card__checks { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 18px; padding-top: 4px; color: #5d646d; font-size: 11px; font-weight: 700; }
.banner-admin-card__checks label { display: flex; align-items: center; gap: 7px; }
.banner-admin-card__checks input { accent-color: var(--brand-red); }
.banner-admin-card__actions { display: flex; flex-direction: column; gap: 8px; }
.banner-admin-card__actions .button { min-width: 44px; padding: 0 12px; }
.banner-remove-button { color: var(--brand-red-dark); border: 1px solid #f2c8cf; background: var(--soft-red); }
.banner-remove-button:hover { color: #fff; background: var(--brand-red); }
.banner-upload-message { grid-column: 1 / -1; min-height: 0; margin: -8px 0 0; }
.banner-admin-footer { display: flex; align-items: center; justify-content: flex-end; gap: 18px; margin-top: 18px; padding: 18px 20px; border: 1px solid var(--line); border-radius: 12px; background: #fff; box-shadow: var(--shadow); }
.banner-admin-footer .form-message { flex: 1; margin: 0; }
.banner-admin-footer .button { min-width: 190px; }

.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 16px 4px 16px 2px; }
.tabs { display: flex; gap: 7px; }
.tab { padding: 9px 15px; border: 0; border-radius: 999px; color: #858c96; background: transparent; font-size: 13px; font-weight: 700; cursor: pointer; }
.tab span { display: inline-grid; min-width: 22px; height: 22px; place-items: center; margin-left: 4px; padding: 0 6px; border-radius: 999px; background: #e9ebee; font-size: 10px; }
.tab:hover { color: var(--ink); background: #e9ebee; }
.tab.is-active { color: var(--ink); background: #fff; box-shadow: var(--shadow); }
.tab.is-active span { color: var(--brand-red-dark); background: var(--soft-red); }

.search { display: flex; width: min(280px, 100%); min-height: 40px; align-items: center; gap: 8px; padding: 0 12px; border: 1px solid #d4d7db; border-radius: 8px; background: #fff; }
.search:focus-within { border-color: var(--brand-yellow); box-shadow: 0 0 0 3px rgba(255, 201, 40, .18); }
.search svg { width: 18px; height: 18px; flex: 0 0 auto; fill: none; stroke: #9299a3; stroke-linecap: round; stroke-width: 1.8; }
.search input { width: 100%; min-width: 0; padding: 0; border: 0; outline: 0; color: var(--ink); background: transparent; font-size: 13px; }
.search input::placeholder { color: #a0a6ae; }
.search--compact { width: 240px; }

.loading, .empty-state { display: grid; min-height: 280px; place-items: center; align-content: center; gap: 9px; padding: 38px; border: 1px solid var(--line); border-radius: 10px; color: var(--muted); background: #fff; text-align: center; box-shadow: var(--shadow); }
.loading { grid-auto-flow: column; min-height: 150px; font-size: 13px; }
.spinner { width: 20px; height: 20px; border: 2px solid #e5e7ea; border-top-color: var(--brand-red); border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.empty-state__icon { display: grid; width: 58px; height: 58px; place-items: center; border-radius: 50%; color: var(--brand-red); background: var(--soft-red); font-size: 24px; font-weight: 800; }
.empty-state strong { color: var(--ink); font-size: 17px; }
.empty-state p { max-width: 480px; margin: 0; font-size: 13px; line-height: 1.55; }
.empty-state .button { margin-top: 8px; }
.empty-state--inside { min-height: 230px; border: 0; box-shadow: none; }

.course-list { display: grid; gap: 14px; }
.course-row { display: grid; grid-template-columns: 220px minmax(0, 1fr) 250px; min-height: 186px; overflow: hidden; border: 1px solid var(--line); border-radius: 10px; background: #fff; box-shadow: var(--shadow); transition: transform .15s ease, box-shadow .15s ease; }
.course-row:hover { transform: translateY(-1px); box-shadow: 0 8px 22px rgba(31, 35, 41, .09); }
.course-row__image { display: flex; align-items: flex-end; padding: 15px; background: linear-gradient(135deg, var(--brand-red-dark), var(--brand-red)); background-position: center; background-size: cover; }
.course-row__image:not(.has-image) { background-image: linear-gradient(135deg, rgba(163, 13, 39, .92), rgba(227, 25, 55, .76)), url("./images/pattern-1.png"); background-size: auto, 340px auto; }
.image-label { display: inline-flex; max-width: 100%; padding: 6px 9px; overflow: hidden; border-radius: 5px; color: #fff; background: rgba(36, 36, 39, .72); font-size: 9px; font-weight: 800; letter-spacing: .04em; text-overflow: ellipsis; text-transform: uppercase; white-space: nowrap; backdrop-filter: blur(5px); }
.course-row__content { align-self: center; padding: 21px 24px; }
.course-kicker { margin: 0 0 7px; color: #979da6; font-size: 11px; }
.course-row h2 { margin: 0; font-size: 21px; line-height: 1.25; letter-spacing: -.015em; }
.course-description { display: -webkit-box; max-width: 610px; margin: 8px 0 0; overflow: hidden; color: #60666e; font-size: 12px; line-height: 1.5; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.course-meta { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 11px; color: #9399a2; font-size: 10px; }
.course-meta span { position: relative; }
.course-meta span + span::before { content: ""; position: absolute; top: 50%; left: -9px; width: 3px; height: 3px; border-radius: 50%; background: #c2c6cb; }
.button { display: inline-flex; min-height: 40px; align-items: center; justify-content: center; padding: 0 16px; border: 0; border-radius: 8px; font-size: 12px; font-weight: 750; text-decoration: none; cursor: pointer; }
.button--primary { color: #fff; background: var(--brand-red); }
.button--primary:hover { background: var(--brand-red-dark); }
.button--secondary { color: var(--ink); border: 1px solid var(--line); background: #f7f7f8; }
.button--soft { min-height: 34px; margin-top: 13px; color: #7b5a00; background: var(--soft-yellow); }
.button--soft:hover { color: #2d2f33; background: #ffedaa; }
.course-row__status { align-self: stretch; display: flex; flex-direction: column; justify-content: center; padding: 22px 26px; border-left: 1px solid #eef0f2; }
.status-badge { align-self: flex-start; padding: 5px 8px; border-radius: 5px; color: #666d76; background: #f0f1f3; font-size: 9px; font-weight: 800; text-transform: uppercase; }
.status-badge[data-status="progress"] { color: #846100; background: var(--soft-yellow); }
.status-badge[data-status="completed"] { color: var(--green); background: var(--soft-green); }
.status-copy { margin-top: 14px; font-size: 12px; }
.progress-track { height: 6px; overflow: hidden; margin-top: 9px; border-radius: 999px; background: #e7e9ec; }
.progress-track i { display: block; height: 100%; border-radius: inherit; background: var(--brand-yellow); }
.progress-copy { margin-top: 7px; color: var(--muted); font-size: 10px; }

.section-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 32px; padding: 20px 4px 23px; }
.section-header h1 { margin: 0; font-size: clamp(30px, 4vw, 42px); letter-spacing: -.03em; }
.section-header > div > p:last-child { margin: 8px 0 0; color: var(--muted); font-size: 13px; }
.catalog-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 15px; }
.catalog-card { overflow: hidden; border: 1px solid var(--line); border-radius: 10px; background: #fff; box-shadow: var(--shadow); }
.catalog-card__image { display: flex; min-height: 165px; align-items: flex-end; padding: 14px; background: linear-gradient(135deg, var(--brand-red-dark), var(--brand-red)); background-position: center; background-size: cover; }
.catalog-card__image:not(.has-image) { background-image: linear-gradient(135deg, rgba(163, 13, 39, .92), rgba(227, 25, 55, .76)), url("./images/pattern-1.png"); background-size: auto, 320px auto; }
.catalog-card__body { padding: 18px; }
.catalog-card__meta { margin: 0; color: #959ba4; font-size: 10px; }
.catalog-card h2 { min-height: 48px; margin: 9px 0 7px; font-size: 18px; line-height: 1.3; }
.catalog-card__description { display: -webkit-box; min-height: 54px; margin: 0; overflow: hidden; color: #626972; font-size: 12px; line-height: 1.5; -webkit-box-orient: vertical; -webkit-line-clamp: 3; }
.catalog-card__body > a { display: flex; align-items: center; justify-content: space-between; margin-top: 16px; padding-top: 13px; border-top: 1px solid var(--line); color: var(--brand-red-dark); font-size: 12px; font-weight: 750; text-decoration: none; }
.catalog-card__body > a span { font-size: 18px; }

.editor-guide { display: grid; grid-template-columns: repeat(5, 1fr); margin-bottom: 16px; overflow: hidden; border: 1px solid var(--line); border-radius: 10px; background: #fff; box-shadow: var(--shadow); }
.editor-guide span { display: flex; align-items: center; gap: 9px; padding: 15px 16px; color: #626972; font-size: 11px; font-weight: 700; }
.editor-guide span + span { border-left: 1px solid var(--line); }
.editor-guide b { display: grid; width: 26px; height: 26px; place-items: center; border-radius: 50%; color: #7d5d00; background: var(--soft-yellow); font-size: 10px; }
.panel { padding: 24px; border: 1px solid var(--line); border-radius: 10px; background: #fff; box-shadow: var(--shadow); }
.panel__head { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.panel__head h2 { margin: 0; font-size: 20px; }
.panel__head p { margin: 5px 0 0; color: var(--muted); font-size: 11px; }
.editor-list { display: grid; }
.editor-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto auto auto; align-items: center; gap: 12px; padding: 15px 0; border-bottom: 1px solid var(--line); }
.editor-row:last-child { border-bottom: 0; }
.editor-row__icon { display: grid; width: 38px; height: 38px; place-items: center; border-radius: 8px; color: #fff; background: var(--brand-red); font-size: 12px; font-weight: 850; }
.editor-row__copy strong, .editor-row__copy small { display: block; }
.editor-row__copy small { margin-top: 4px; color: var(--muted); font-size: 10px; }
.editor-row__status { padding: 6px 8px; border-radius: 5px; color: #7a5900; background: var(--soft-yellow); font-size: 9px; font-weight: 800; text-transform: uppercase; }
.button--copy { border: 1px solid #e7bd23; color: #6d5100; background: #fff8d9; }
.button--copy:hover { color: #503b00; background: #ffefae; }
.mobile-nav { display: none; }

@media (max-width: 940px) {
  .topbar { grid-template-columns: 1fr auto; }
  .main-nav { grid-row: 2; grid-column: 1 / -1; min-height: 46px; justify-content: center; }
  .topbar { min-height: 118px; }
  .course-row { grid-template-columns: 185px minmax(0, 1fr) 210px; }
  .catalog-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .editor-guide { grid-template-columns: repeat(3, 1fr); }
  .editor-guide span:nth-child(4) { border-left: 0; border-top: 1px solid var(--line); }
  .editor-guide span:nth-child(5) { border-top: 1px solid var(--line); }
}

@media (max-width: 720px) {
  body { padding-bottom: 68px; }
  .topbar { position: static; grid-template-columns: 1fr auto; min-height: 68px; padding: 5px 14px; }
  .brand img { width: 46px; height: 46px; }
  .brand span, .account__copy, .main-nav { display: none; }
  main { width: min(100% - 24px, 640px); padding: 12px 0 28px; }
  .home-carousel { min-height: 210px; border-radius: 13px; }
  .home-carousel.has-custom-image { min-height: 0; aspect-ratio: 1920 / 520; }
  .home-carousel-link { width: 100%; min-height: 40px; margin-top: 10px; }
  .home-carousel__slide { padding: 26px 40px 34px 20px; }
  .home-carousel__copy { padding-right: 0; }
  .home-carousel__copy h1 { font-size: 31px; }
  .home-carousel__copy > p:last-of-type { font-size: 12px; line-height: 1.45; }
  .home-carousel__action { min-height: 38px; margin-top: 15px; padding: 0 15px; }
  .home-carousel__logo { position: absolute; right: -22px; width: 98px; height: 98px; margin: 0; opacity: .2; }
  .home-carousel__arrow { width: 32px; height: 32px; margin-top: -16px; font-size: 25px; }
  .home-carousel__arrow--prev { left: 6px; }
  .home-carousel__arrow--next { right: 6px; }
  .banner-admin-card { display: block; padding: 14px; }
  .banner-admin-card__fields { grid-template-columns: 1fr; margin-top: 14px; }
  .banner-admin-card__checks { grid-column: 1; display: grid; gap: 10px; }
  .banner-admin-card__actions { flex-direction: row; margin-top: 14px; }
  .banner-admin-card__actions .banner-remove-button { flex: 1; }
  .banner-admin-footer { position: sticky; z-index: 8; bottom: 76px; display: grid; padding: 12px; }
  .banner-admin-footer .button { width: 100%; }
  .page-hero { min-height: 132px; padding: 24px 20px; border-radius: 12px 12px 0 0; }
  .page-hero h1 { font-size: 31px; }
  .page-hero p:last-child { max-width: 230px; font-size: 11px; }
  .page-hero img { position: absolute; right: -18px; width: 100px; height: 100px; margin: 0; opacity: .22; }
  .toolbar, .section-header { display: grid; gap: 13px; }
  .toolbar { padding: 14px 0; }
  .tabs { overflow-x: auto; }
  .tab { white-space: nowrap; }
  .search, .search--compact { width: 100%; }
  .course-row { display: block; }
  .course-row__image { min-height: 158px; }
  .course-row__content { padding: 18px; }
  .course-row h2 { font-size: 20px; }
  .course-description { -webkit-line-clamp: 3; }
  .course-row__status { padding: 16px 18px 18px; border-top: 1px solid #eef0f2; border-left: 0; }
  .button--soft { width: 100%; }
  .section-header { align-items: stretch; padding: 8px 1px 18px; }
  .section-header .button--primary { width: 100%; }
  .catalog-grid { grid-template-columns: 1fr; }
  .editor-guide { display: flex; overflow-x: auto; }
  .editor-guide span { min-width: 132px; }
  .editor-guide span + span { border-top: 0 !important; border-left: 1px solid var(--line) !important; }
  .panel { padding: 18px 14px; }
  .panel__head { display: grid; }
  .editor-row { grid-template-columns: auto minmax(0, 1fr); }
  .editor-row__status { grid-column: 2; justify-self: start; }
  .editor-row .button { grid-column: 1 / -1; width: 100%; }
  .mobile-nav { position: fixed; z-index: 70; right: 0; bottom: 0; left: 0; display: flex; min-height: 66px; justify-content: space-around; padding: 6px 8px max(6px, env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: rgba(255,255,255,.98); box-shadow: 0 -5px 20px rgba(31,35,41,.06); backdrop-filter: blur(12px); }
  .mobile-nav a { display: grid; min-width: 78px; place-items: center; gap: 2px; color: #858b94; font-size: 9px; font-weight: 700; text-decoration: none; }
  .mobile-nav a span { color: #9a9fa7; font-size: 17px; }
  .mobile-nav a.is-active { color: var(--brand-red-dark); }
  .mobile-nav a.is-active span { color: var(--brand-red); }
  .profile-menu { position: fixed; top: 68px; right: 12px; left: 12px; width: auto; }
}

/* v5.6 — единая оболочка и встроенное тестирование */
.quiz-shell { display: grid; gap: 18px; }
.quiz-hero { display: grid; grid-template-columns: minmax(0, 1fr) 270px; align-items: end; gap: 28px; min-height: 190px; padding: 36px 40px; overflow: hidden; border-radius: 18px; color: #fff; background: linear-gradient(115deg, rgba(17,28,51,.98), rgba(111,8,25,.93)), url("./images/pattern-1.png") center / 520px auto repeat; box-shadow: var(--shadow); }
.quiz-hero .eyebrow { color: var(--brand-yellow); }
.quiz-hero h1 { margin: 6px 0; color: #fff; font-size: clamp(30px, 4vw, 46px); }
.quiz-hero p:last-child { margin: 0; color: rgba(255,255,255,.76); }
.quiz-progress { display: grid; gap: 10px; }
.quiz-progress strong { font-size: 12px; }
.quiz-progress .progress-track { background: rgba(255,255,255,.2); }
.quiz-progress .progress-track i { background: var(--brand-yellow); }
.quiz-card { width: min(900px, 100%); margin: 0 auto; padding: clamp(24px, 4vw, 42px); }
.quiz-question-meta { display: flex; justify-content: space-between; gap: 20px; margin-bottom: 18px; color: var(--muted); font-size: 10px; font-weight: 800; text-transform: uppercase; }
.quiz-question-copy { color: var(--ink); font-size: clamp(18px, 2.6vw, 26px); font-weight: 800; line-height: 1.45; }
.quiz-question-copy p { margin: 0; }
.quiz-question-copy img, .quiz-option img { display: block; max-width: min(100%, 640px); max-height: 420px; margin: 16px auto; border-radius: 14px; object-fit: contain; }
.quiz-answers { display: grid; gap: 11px; margin-top: 26px; }
.quiz-option { display: grid; grid-template-columns: 22px minmax(0, 1fr); align-items: center; gap: 12px; min-height: 54px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 13px; background: #fff; cursor: pointer; transition: border-color .15s ease, background .15s ease; }
.quiz-option:hover { border-color: #e0b217; background: #fffdf3; }
.quiz-option:has(input:checked) { border-color: #dcae10; background: #fff6cf; box-shadow: inset 0 0 0 1px #e7bd27; }
.quiz-option.is-correct { border-color: #2b9b65; background: #effaf4; box-shadow: inset 0 0 0 1px #58b786; }
.quiz-option.is-incorrect { border-color: #d8344e; background: #fff1f3; box-shadow: inset 0 0 0 1px #e56a7d; }
.quiz-option.is-missed { border-style: dashed; }
.quiz-option:has(input:disabled) { cursor: default; }
.quiz-option input { width: 17px; height: 17px; accent-color: var(--brand-red); }
.quiz-option span { min-width: 0; font-size: 13px; line-height: 1.55; }
.quiz-option span p { margin: 0; }
.quiz-answers textarea { width: 100%; min-height: 120px; padding: 15px 16px; border: 1px solid var(--line); border-radius: 13px; color: var(--ink); background: #fff; font: inherit; resize: vertical; }
.quiz-answers textarea:focus { outline: 3px solid rgba(249,198,31,.25); border-color: #d9aa0d; }
.quiz-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 28px; padding-top: 22px; border-top: 1px solid var(--line); }
.quiz-actions #quiz-prev { margin-right: auto; }
.quiz-message { min-height: 20px; margin: 16px 0 0; color: var(--brand-red-dark); font-size: 11px; font-weight: 750; }
.quiz-message[data-status="success"] { color: #197647; }
.quiz-message[data-status="error"] { color: var(--brand-red-dark); }
.quiz-result { display: grid; width: min(720px, 100%); justify-items: center; gap: 12px; margin: 0 auto; padding: clamp(36px, 7vw, 70px) 28px; text-align: center; }
.quiz-result > span { display: grid; width: 72px; height: 72px; place-items: center; border-radius: 50%; color: #fff; background: #238555; font-size: 34px; font-weight: 900; }
.quiz-result[data-status="failed"] > span { background: var(--brand-red); }
.quiz-result h2 { margin: 7px 0 0; font-size: clamp(26px, 4vw, 38px); }
.quiz-result > strong { color: var(--brand-red); font-size: 22px; }
.quiz-result p { max-width: 520px; margin: 0 0 10px; color: var(--muted); line-height: 1.6; }
.sp-modal > .sp-modal__header { padding: 24px 24px 0; }
.sp-modal > .sp-field, .sp-modal > .sp-invite-help { margin-right: 24px; margin-left: 24px; }
.sp-modal > .sp-modal__actions { padding: 0 24px 24px; }
@media (max-width: 720px) {
  .quiz-hero { grid-template-columns: 1fr; min-height: 0; padding: 26px 20px; }
  .quiz-card { padding: 22px 16px; }
  .quiz-actions { flex-wrap: wrap; }
  .quiz-actions .button { flex: 1 1 140px; }
  .quiz-actions #quiz-prev { margin-right: 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation: none !important; transition: none !important; }
}


.back-link { display: inline-flex; margin: 2px 0 16px; color: #696f78; font-size: 12px; font-weight: 700; text-decoration: none; }
.back-link:hover { color: var(--brand-red-dark); }
.course-detail-hero { display: grid; grid-template-columns: minmax(0, 1fr) 250px; gap: 32px; align-items: center; min-height: 260px; overflow: hidden; padding: clamp(28px, 5vw, 54px); border-radius: 14px; color: #fff; background: linear-gradient(105deg, rgba(111, 8, 25, .97), rgba(217, 26, 55, .9)), url("./images/pattern-1.png") center / 560px auto repeat; box-shadow: var(--shadow); }
.course-detail-hero .eyebrow { color: var(--brand-yellow); }
.course-detail-hero h1 { max-width: 760px; margin: 5px 0 12px; font-size: clamp(32px, 5vw, 50px); line-height: 1.08; letter-spacing: -.035em; }
.course-detail-hero__copy > p:not(.eyebrow) { max-width: 700px; margin: 0; color: rgba(255,255,255,.82); line-height: 1.55; }
.course-detail-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; margin-top: 24px; }
.course-detail-actions .button--primary { color: #5b4100; background: var(--brand-yellow); }
.course-detail-actions span { color: rgba(255,255,255,.72); font-size: 11px; }
.course-progress-card { display: grid; align-content: center; min-height: 170px; padding: 26px; border: 1px solid rgba(255,255,255,.16); border-radius: 14px; background: rgba(255,255,255,.12); backdrop-filter: blur(12px); }
.course-progress-card > span { color: var(--brand-yellow); font-size: 42px; font-weight: 850; letter-spacing: -.04em; }
.course-progress-card > strong { margin-top: 3px; font-size: 13px; }
.course-progress-card .progress-track { background: rgba(255,255,255,.24); }
.course-progress-card small { margin-top: 8px; color: rgba(255,255,255,.68); font-size: 10px; }
.course-detail-layout { display: grid; grid-template-columns: minmax(0, .7fr) minmax(0, 1.3fr); gap: 16px; margin-top: 16px; align-items: start; }
.course-about { position: sticky; top: 96px; }
.course-about h2, .course-program h2 { margin: 0 0 14px; font-size: 20px; }
.course-about > div { color: #596069; font-size: 13px; line-height: 1.68; }
.course-about > div h2, .course-about > div h3 { margin: 20px 0 8px; color: var(--ink); }
.course-about > div > *:first-child { margin-top: 0; }
.course-about > div > *:last-child { margin-bottom: 0; }
.course-program .panel__head { margin: -2px 0 4px; }
.course-outline { display: grid; gap: 12px; padding-top: 14px; }
.outline-chapter { overflow: hidden; border: 1px solid var(--line); border-radius: 10px; }
.outline-chapter__head { display: flex; align-items: center; gap: 12px; padding: 16px 17px; background: #f8f8f9; }
.outline-chapter__head > span { display: grid; width: 30px; height: 30px; flex: 0 0 auto; place-items: center; border-radius: 50%; color: #755600; background: var(--soft-yellow); font-size: 11px; font-weight: 850; }
.outline-chapter__head h3 { margin: 0; font-size: 15px; }
.outline-chapter__head p { margin: 4px 0 0; color: var(--muted); font-size: 10px; }
.outline-lessons { display: grid; }
.outline-lesson { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; align-items: center; gap: 11px; min-height: 62px; padding: 11px 16px; border-top: 1px solid var(--line); text-decoration: none; transition: background .14s ease; }
.outline-lesson:hover { background: #fffaf0; }
.outline-lesson__number { display: grid; width: 30px; height: 30px; place-items: center; border-radius: 50%; color: #7f858e; background: #f0f1f3; font-size: 9px; font-weight: 800; }
.outline-lesson.is-complete .outline-lesson__number { color: var(--green); background: var(--soft-green); }
.outline-lesson strong, .outline-lesson small { display: block; }
.outline-lesson strong { font-size: 12px; }
.outline-lesson small { margin-top: 4px; color: var(--muted); font-size: 9px; }
.outline-lesson__status { color: var(--brand-red-dark); font-size: 10px; font-weight: 750; }
.outline-lesson.is-complete .outline-lesson__status { color: var(--green); }
.lesson-layout { display: grid; grid-template-columns: minmax(0, 1fr) 290px; gap: 16px; align-items: start; }
.lesson-player { padding: clamp(20px, 4vw, 40px); }
.lesson-heading { padding-bottom: 22px; border-bottom: 1px solid var(--line); }
.lesson-heading h1 { margin: 4px 0 8px; font-size: clamp(28px, 4vw, 40px); line-height: 1.15; letter-spacing: -.03em; }
.lesson-heading > p:last-child { margin: 0; color: var(--muted); font-size: 11px; }
.lesson-content { min-height: 300px; padding: 28px 0; color: #4e555e; font-size: 15px; line-height: 1.72; }
.lesson-content > *:first-child { margin-top: 0; }
.lesson-content h2, .lesson-content h3, .lesson-content h4 { margin: 30px 0 12px; color: var(--ink); line-height: 1.25; }
.lesson-content p { margin: 0 0 16px; }
.lesson-content blockquote { margin: 22px 0; padding: 16px 20px; border-left: 4px solid var(--brand-yellow); background: #fffaf0; }
.lesson-content hr { margin: 30px 0; border: 0; border-top: 1px solid var(--line); }
.lesson-content figure { margin: 24px 0; }
.lesson-content img { display: block; max-width: 100%; height: auto; border-radius: 10px; }
.lesson-content figcaption { margin-top: 8px; color: var(--muted); font-size: 10px; text-align: center; }
.lesson-content pre { overflow-x: auto; padding: 16px; border-radius: 9px; color: #f7f7f8; background: #292c31; }
.video-frame { position: relative; width: 100%; padding-top: 56.25%; overflow: hidden; border-radius: 12px; background: #1f2023; box-shadow: var(--shadow); }
.video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.lesson-table-wrap { overflow-x: auto; margin: 20px 0; }
.lesson-table-wrap table { width: 100%; border-collapse: collapse; font-size: 12px; }
.lesson-table-wrap th, .lesson-table-wrap td { padding: 10px; border: 1px solid var(--line); text-align: left; }
.lesson-table-wrap th { background: #f7f7f8; }
.lesson-checklist { padding: 0; list-style: none; }
.lesson-resource { display: inline-flex; padding: 12px 14px; border-radius: 8px; color: var(--brand-red-dark); background: var(--soft-red); font-weight: 750; text-decoration: none; }
.lesson-special { margin: 22px 0; padding: 20px; border: 1px solid #f2d777; border-radius: 10px; background: var(--soft-yellow); }
.lesson-special strong { color: #705300; }
.lesson-special p { margin: 7px 0 0; font-size: 12px; }
.lesson-special .button { display: inline-flex; width: auto; margin-top: 12px; }
.scorm-player { position: relative; overflow: hidden; border: 1px solid var(--line); border-radius: 18px; background: #f4f5f6; box-shadow: var(--shadow); }
body.scorm-open { overflow: hidden; }
.scorm-player--immersive { position: fixed; inset: 0; z-index: 1200; display: flex; width: 100vw; height: 100dvh; flex-direction: column; border: 0; border-radius: 0; background: #fff; box-shadow: none; }
.scorm-player__toolbar { position: relative; z-index: 3; display: flex; align-items: center; justify-content: space-between; gap: 18px; min-height: 66px; padding: 12px 16px; border-bottom: 1px solid var(--line); background: #fff; }
.scorm-player__toolbar > div:first-child { display: grid; gap: 3px; min-width: 0; }
.scorm-player__toolbar strong { color: var(--ink); font-size: 13px; }
.scorm-player__toolbar small { color: var(--muted); font-size: 10px; line-height: 1.4; }
.scorm-player__actions { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; }
.scorm-player__status { position: relative; z-index: 2; margin: 0; padding: 14px 16px; color: var(--muted); background: #fff; font-size: 12px; }
.scorm-player__status[data-status="error"] { color: var(--brand-red-dark); background: var(--soft-red); }
.scorm-player__fullscreen, .scorm-player__exit { flex: 0 0 auto; min-height: 42px; padding: 10px 16px; }
.scorm-player__frame { display: block; width: 100%; height: min(76vh, 920px); min-height: 620px; border: 0; background: #fff; }
.scorm-player--immersive .scorm-player__frame, .scorm-player:fullscreen .scorm-player__frame { flex: 1 1 auto; height: auto; min-height: 0; max-height: none; }
.scorm-player:fullscreen { display: flex; width: 100vw; height: 100vh; flex-direction: column; border: 0; border-radius: 0; background: #fff; }
.scorm-player__completion { position: absolute; z-index: 4; right: 22px; bottom: 22px; left: 22px; display: flex; max-width: 760px; margin: 0 auto; align-items: center; justify-content: space-between; gap: 18px; padding: 16px 18px; border: 1px solid #f2d777; border-radius: 16px; background: rgba(255, 249, 222, .97); box-shadow: 0 16px 48px rgba(38, 40, 45, .2); backdrop-filter: blur(8px); }
.scorm-player__completion[hidden] { display: none; }
.scorm-player__completion strong { display: block; color: #705300; font-size: 15px; }
.scorm-player__completion p { margin: 4px 0 0; color: #6d6350; font-size: 12px; }
.scorm-player__completion .button { flex: 0 0 auto; }
.lesson-content:has(.scorm-player) { padding-top: 18px; }
.lesson-text--small { font-size: 12px; }
.lesson-text--body { font-size: 15px; }
.lesson-text--lead { font-size: 19px; line-height: 1.55; }
.lesson-color--default { color: inherit; }
.lesson-color--red { color: var(--brand-red-dark); }
.lesson-color--green { color: #167544; }
.lesson-color--amber { color: #8a6500; }
.lesson-align--left { text-align: left; }
.lesson-align--center { text-align: center; }
.lesson-callout { margin: 22px 0; padding: 18px 20px; border: 1px solid transparent; border-left-width: 5px; border-radius: 10px; }
.lesson-callout strong { display: block; margin-bottom: 7px; color: var(--ink); font-size: 14px; }
.lesson-callout p { margin: 0; }
.lesson-callout--important { border-color: #f0b7b0; border-left-color: var(--brand-red); background: #fff4f2; }
.lesson-callout--info { border-color: #b8d8ef; border-left-color: #2b7db7; background: #f1f8fd; }
.lesson-callout--warning { border-color: #f1da89; border-left-color: var(--brand-yellow); background: var(--soft-yellow); }
.lesson-callout--success { border-color: #b8dec8; border-left-color: #218453; background: #f0faf4; }
.lesson-direct-video { display: block; width: 100%; max-height: 580px; margin: 24px 0; border-radius: 10px; background: #161719; }
.lesson-media-caption { margin-top: -15px !important; color: var(--muted); font-size: 11px; text-align: center; }
.lesson-content-button { min-height: 32px; padding: 7px 11px; color: #6e5200; background: #fff5c7; }

.lesson-actions { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; padding-top: 22px; border-top: 1px solid var(--line); }
.lesson-actions .button[disabled] { color: #707780; background: #eceef0; cursor: default; }
.lesson-save-message { min-height: 20px; margin: 12px 0 0; font-size: 11px; }
.lesson-save-message[data-status="success"] { color: var(--green); }
.lesson-save-message[data-status="error"] { color: var(--brand-red-dark); }
.lesson-sidebar { position: sticky; top: 96px; padding: 18px; }
.lesson-sidebar > strong { display: block; margin-bottom: 12px; font-size: 14px; }
#lesson-mini-outline { display: grid; gap: 3px; }
.mini-lesson { display: grid; grid-template-columns: 28px minmax(0, 1fr); align-items: center; gap: 8px; padding: 8px; border-radius: 7px; color: #686f78; text-decoration: none; }
.mini-lesson:hover, .mini-lesson.is-active { color: var(--ink); background: #f4f4f5; }
.mini-lesson.is-active { box-shadow: inset 3px 0 var(--brand-yellow); }
.mini-lesson > span { display: grid; width: 25px; height: 25px; place-items: center; border-radius: 50%; background: #eceef0; font-size: 8px; font-weight: 800; }
.mini-lesson.is-complete > span { color: var(--green); background: var(--soft-green); }
.mini-lesson strong { overflow: hidden; font-size: 10px; line-height: 1.3; text-overflow: ellipsis; white-space: nowrap; }

@media (max-width: 900px) {
  .course-detail-layout, .lesson-layout { grid-template-columns: 1fr; }
  .course-about, .lesson-sidebar { position: static; }
  .lesson-sidebar { order: -1; }
}

@media (max-width: 720px) {
  .course-detail-hero { grid-template-columns: 1fr; gap: 18px; padding: 26px 20px; }
  .course-detail-hero h1 { font-size: 32px; }
  .course-progress-card { min-height: 128px; }
  .course-detail-layout { margin-top: 12px; }
  .course-about, .course-program { padding: 18px 14px; }
  .outline-lesson { grid-template-columns: 32px minmax(0, 1fr); padding: 11px; }
  .outline-lesson__status { grid-column: 2; }
  .lesson-player { padding: 20px 16px; }
  .lesson-content { min-height: 220px; font-size: 14px; }
  .lesson-actions .button { flex: 1 1 100%; }
  .scorm-player { border-radius: 12px; }
  .scorm-player__toolbar { align-items: center; gap: 10px; padding: 10px 12px; }
  .scorm-player__toolbar small { display: none; }
  .scorm-player__actions { width: auto; }
  .scorm-player__fullscreen { display: none; }
  .scorm-player__exit { min-height: 40px; padding: 9px 12px; white-space: nowrap; }
  .scorm-player__frame { height: 70vh; min-height: 500px; }
  .scorm-player--immersive .scorm-player__frame, .scorm-player:fullscreen .scorm-player__frame { height: auto; min-height: 0; }
  .scorm-player__completion { right: 12px; bottom: 12px; left: 12px; flex-direction: column; align-items: stretch; padding: 14px; }
  .scorm-player__completion .button { width: 100%; }
}


.course-editor-hero { display: flex; min-height: 146px; align-items: center; justify-content: space-between; gap: 28px; padding: 28px 34px; border-radius: 14px; color: #fff; background: linear-gradient(105deg, rgba(111,8,25,.97), rgba(219,25,55,.9)), url("./images/pattern-1.png") center / 520px auto repeat; box-shadow: var(--shadow); }
.course-editor-hero .eyebrow { color: var(--brand-yellow); }
.course-editor-hero h1 { margin: 3px 0 7px; font-size: clamp(28px, 4vw, 42px); line-height: 1.1; letter-spacing: -.035em; }
.course-editor-hero > div:first-child > p:last-child { margin: 0; color: rgba(255,255,255,.78); font-size: 12px; }
.editor-save-area { display: grid; min-width: 190px; justify-items: end; gap: 9px; }
.editor-save-area .button { min-width: 150px; color: #5f4500; background: var(--brand-yellow); }
.editor-save-area .button:hover { background: #ffda63; }
.editor-save-state { color: rgba(255,255,255,.72); font-size: 10px; }
.editor-save-state[data-status="dirty"] { color: var(--brand-yellow); }
.editor-save-state[data-status="error"] { color: #ffd2d8; }
.editor-save-state[data-status="saved"] { color: #d9f8e5; }
.editor-workflow { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; margin: 16px 0; overflow: hidden; border: 1px solid var(--line); border-radius: 10px; background: #fff; box-shadow: var(--shadow); }
.editor-workflow > * { display: flex; min-width: 0; align-items: center; gap: 9px; padding: 13px 14px; border: 0; border-right: 1px solid var(--line); color: #6c737c; background: #fff; text-align: left; }
.editor-workflow > *:last-child { border-right: 0; }
.editor-workflow button { cursor: pointer; }
.editor-workflow button:hover { background: #fffaf0; }
.editor-workflow .is-active { color: var(--ink); background: var(--soft-yellow); box-shadow: inset 0 -3px var(--brand-yellow); }
.editor-workflow .is-locked { color: #a2a7ae; background: #fafafa; }
.editor-workflow b { display: grid; width: 27px; height: 27px; flex: 0 0 auto; place-items: center; border-radius: 50%; color: #765700; background: #fff0b5; font-size: 10px; }
.editor-workflow .is-locked b { color: #9da2aa; background: #eceef0; }
.editor-workflow strong, .editor-workflow small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.editor-workflow strong { font-size: 10px; }
.editor-workflow small { margin-top: 3px; color: #999fa7; font-size: 8px; }
.editor-workspace-layout { display: grid; grid-template-columns: minmax(0, 1fr) 250px; gap: 16px; align-items: start; }
.editor-workspace-main { min-width: 0; }
.editor-pane { animation: screen-in .16s ease; }
.course-edit-form, .program-editor-panel { padding: 26px; }
.course-edit-form .panel__head, .program-editor-panel .panel__head { margin-bottom: 22px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.form-control { display: grid; gap: 7px; color: #555c65; font-size: 12px; font-weight: 700; }
.form-control--wide { grid-column: 1 / -1; }
.form-control > span i { color: var(--brand-red); font-style: normal; }
.form-control input, .form-control textarea, .rich-editable { width: 100%; min-width: 0; border: 1px solid #d7dade; border-radius: 9px; outline: 0; color: var(--ink); background: #fff; font-family: inherit; font-size: 13px; font-weight: 400; line-height: 1.55; transition: border-color .15s ease, box-shadow .15s ease; }
.form-control input { min-height: 46px; padding: 0 13px; }
.form-control textarea { resize: vertical; padding: 11px 13px; }
.rich-editable { min-height: 210px; padding: 14px; overflow-y: auto; }
.rich-editable:empty::before { content: attr(data-placeholder); color: #a4a9b0; }
.form-control input:focus, .form-control textarea:focus, .rich-editable:focus { border-color: var(--brand-yellow); box-shadow: 0 0 0 4px rgba(255,201,40,.16); }
.form-control small { color: #969ca5; font-size: 9px; font-weight: 400; }
.editor-workspace-side { position: sticky; top: 96px; display: grid; gap: 12px; }
.editor-summary-card { padding: 20px; }
.editor-summary-card .eyebrow { margin-bottom: 7px; }
.editor-summary-card > strong { display: block; font-size: 18px; }
.editor-summary-card dl { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 18px 0; }
.editor-summary-card dl div { padding: 12px; border-radius: 8px; background: #f5f6f7; }
.editor-summary-card dt { color: var(--muted); font-size: 9px; }
.editor-summary-card dd { margin: 4px 0 0; font-size: 20px; font-weight: 800; }
.editor-summary-card .button { width: 100%; }
.editor-safety-note { padding: 17px; border: 1px solid #f1da89; border-radius: 10px; color: #6f5508; background: var(--soft-yellow); }
.editor-safety-note strong { font-size: 11px; }
.editor-safety-note p { margin: 6px 0 0; font-size: 9px; line-height: 1.5; }
.edit-outline { display: grid; gap: 12px; }
.edit-chapter-card { overflow: hidden; border: 1px solid var(--line); border-radius: 10px; }
.edit-chapter-card__head { display: grid; grid-template-columns: 32px minmax(0, 1fr) auto; align-items: center; gap: 11px; padding: 14px 15px; background: #f7f7f8; }
.edit-chapter-card__head > span { display: grid; width: 30px; height: 30px; place-items: center; border-radius: 50%; color: #765700; background: #fff0b5; font-size: 10px; font-weight: 850; }
.edit-chapter-card__head h3 { margin: 0; font-size: 14px; }
.edit-chapter-card__head p { margin: 4px 0 0; color: var(--muted); font-size: 9px; }
.edit-row-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 7px; }
.icon-action { padding: 7px 9px; border: 0; border-radius: 6px; color: #626972; background: transparent; font-size: 9px; font-weight: 700; text-decoration: none; cursor: pointer; }
.icon-action:hover { color: var(--brand-red-dark); background: var(--soft-red); }
.edit-chapter-card__head .button--soft { width: auto; min-height: 31px; margin: 0; font-size: 9px; }
.edit-lesson-list { display: grid; }
.edit-lesson-row { display: grid; grid-template-columns: 32px minmax(0, 1fr) auto; align-items: center; gap: 10px; min-height: 58px; padding: 10px 15px; border-top: 1px solid var(--line); background: #fff; }
.edit-lesson-row:hover { background: #fffdf7; }
.edit-lesson-row__number { display: grid; width: 28px; height: 28px; place-items: center; border-radius: 50%; color: #7c838c; background: #eef0f2; font-size: 8px; font-weight: 800; }
.edit-lesson-row strong, .edit-lesson-row small { display: block; }
.edit-lesson-row strong { font-size: 11px; }
.edit-lesson-row small { margin-top: 3px; color: var(--muted); font-size: 8px; }
.edit-chapter-empty { margin: 0; padding: 18px 15px; border-top: 1px solid var(--line); color: var(--muted); font-size: 10px; text-align: center; }
.editor-dialog { width: min(500px, calc(100% - 28px)); padding: 0; border: 0; border-radius: 14px; color: var(--ink); background: #fff; box-shadow: 0 28px 80px rgba(24,26,30,.25); }
.editor-dialog--large { width: min(680px, calc(100% - 28px)); }
.editor-dialog--templates { width: min(940px, calc(100% - 28px)); }
.editor-dialog--templates form { max-height: min(90vh, 860px); overflow-y: auto; }
.editor-dialog--templates .editor-dialog__head p:not(.eyebrow) { margin: 7px 0 0; color: var(--muted); font-size: 11px; }
.course-template-picker { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; margin: 0 0 24px; padding: 0; border: 0; }
.course-template-picker legend { grid-column: 1 / -1; margin-bottom: 9px; color: #555c65; font-size: 12px; font-weight: 800; }
.course-template-card { position: relative; display: grid; min-height: 146px; align-content: start; gap: 10px; padding: 15px; border: 1px solid #dfe2e5; border-radius: 13px; background: #fff; cursor: pointer; transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease; }
.course-template-card:hover { transform: translateY(-1px); border-color: #e3b81d; box-shadow: 0 10px 25px rgba(40,43,48,.08); }
.course-template-card.is-selected { border: 2px solid var(--brand-yellow); padding: 14px; background: #fffaf0; box-shadow: 0 0 0 3px rgba(255,201,40,.14); }
.course-template-card input { position: absolute; width: 1px; height: 1px; overflow: hidden; opacity: 0; pointer-events: none; }
.course-template-card__icon { display: grid; width: 42px; height: 42px; place-items: center; border-radius: 12px; color: #704f00; background: var(--soft-yellow); font-size: 20px; font-weight: 900; }
.course-template-card strong, .course-template-card small { display: block; }
.course-template-card strong { color: var(--ink); font-size: 12px; line-height: 1.3; }
.course-template-card small { margin-top: 5px; color: var(--muted); font-size: 9px; line-height: 1.4; }
.course-template-card i { align-self: end; color: #9a7410; font-size: 9px; font-style: normal; font-weight: 800; }
.course-template-card.is-selected i { color: #6f5300; }
.editor-dialog::backdrop { background: rgba(29,31,35,.48); backdrop-filter: blur(3px); }
.editor-dialog form { padding: 24px; }
.editor-dialog__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
.editor-dialog__head .eyebrow { margin: 0 0 6px; }
.editor-dialog__head h2 { margin: 0; font-size: 22px; }
.dialog-close { width: 34px; height: 34px; padding: 0; border: 0; border-radius: 8px; color: #777e87; background: #f1f2f3; font-size: 20px; cursor: pointer; }
.editor-dialog .form-message { min-height: 18px; margin: 10px 0 0; color: var(--brand-red-dark); font-size: 10px; }
.editor-dialog__actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); }
.course-copy-dialog { width: min(610px, calc(100% - 28px)); }
.course-copy-dialog .editor-dialog__head p:not(.eyebrow) { margin: 7px 0 0; color: var(--muted); font-size: 10px; line-height: 1.45; }
.course-copy-summary { display: grid; grid-template-columns: 44px minmax(0, 1fr); align-items: center; gap: 12px; padding: 14px; border: 1px solid #eee1ab; border-radius: 12px; background: #fffaf0; }
.course-copy-summary__icon { display: grid; width: 44px; height: 44px; place-items: center; border-radius: 12px; color: #fff; background: var(--brand-red); font-size: 14px; font-weight: 900; }
.course-copy-summary small, .course-copy-summary strong { display: block; }
.course-copy-summary small { margin-bottom: 4px; color: var(--muted); font-size: 9px; }
.course-copy-summary strong { font-size: 13px; line-height: 1.35; }
.course-copy-rules { display: grid; gap: 10px; margin: 18px 0; padding: 0; list-style: none; }
.course-copy-rules li { display: grid; grid-template-columns: 27px minmax(0, 1fr); align-items: start; gap: 10px; }
.course-copy-rules i { display: grid; width: 27px; height: 27px; place-items: center; border-radius: 50%; color: #fff; background: #27854f; font-size: 11px; font-style: normal; font-weight: 900; }
.course-copy-rules strong, .course-copy-rules small { display: block; }
.course-copy-rules strong { font-size: 11px; }
.course-copy-rules small { margin-top: 3px; color: var(--muted); font-size: 9px; line-height: 1.45; }
.course-copy-note { margin: 0; padding: 12px 14px; border-radius: 11px; color: #6d540b; background: var(--soft-yellow); font-size: 9px; line-height: 1.55; }
.course-copy-dialog .form-message[data-status="success"] { color: #1f7243; }
.version-history-panel { padding: 24px; }
.version-history-guide { display: grid; grid-template-columns: 32px minmax(0, 1fr); align-items: start; gap: 11px; margin-bottom: 18px; padding: 14px; border: 1px solid #f0d77d; border-radius: 12px; color: #684e00; background: #fff9df; }
.version-history-guide > span { display: grid; width: 32px; height: 32px; place-items: center; border-radius: 50%; color: #fff; background: #d7a900; font-size: 13px; font-weight: 900; }
.version-history-guide strong { font-size: 11px; }
.version-history-guide p { margin: 4px 0 0; font-size: 9px; line-height: 1.5; }
.version-history-loading { min-height: 120px; }
.version-history-error { padding: 14px; border-radius: 10px; color: var(--brand-red-dark); background: var(--soft-red); font-size: 10px; }
.version-history-list { display: grid; gap: 12px; }
.version-card { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px; padding: 17px; border: 1px solid var(--line); border-radius: 13px; background: #fff; }
.version-card__head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.version-card__head strong { font-size: 13px; }
.version-card__badge { padding: 5px 8px; border-radius: 999px; color: #6c5100; background: var(--soft-yellow); font-size: 8px; font-weight: 850; text-transform: uppercase; }
.version-card__meta { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 8px 0 0; color: var(--muted); font-size: 9px; }
.version-card__compare { margin: 12px 0 0; font-size: 10px; line-height: 1.45; }
.version-card__compare[data-status="same"] { color: #277649; }
.version-card__compare[data-status="changed"] { color: #7b5900; }
.version-card__sections { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 9px; }
.version-card__sections span { padding: 5px 7px; border-radius: 7px; color: #5b6169; background: #f2f3f4; font-size: 8px; font-weight: 750; }
.version-card details { margin-top: 10px; }
.version-card summary { color: #6e747c; font-size: 9px; font-weight: 750; cursor: pointer; }
.version-card ul { margin: 8px 0 0; padding-left: 18px; color: #5f6670; font-size: 9px; line-height: 1.55; }
.version-card__actions { display: grid; align-content: start; gap: 8px; min-width: 185px; }
.version-card__actions .button { width: 100%; }
.version-card__actions small { color: var(--muted); font-size: 8px; line-height: 1.4; text-align: center; }
@media (max-width: 700px) { .version-history-panel { padding: 18px 14px; } .version-card { grid-template-columns: 1fr; } .version-card__actions { min-width: 0; } }

.course-workflow-panel { padding: 24px; }
.course-workflow-loading { min-height: 160px; }
.course-workflow-error { padding: 16px; border: 1px solid #f0bec5; border-radius: 12px; color: var(--brand-red-dark); background: var(--soft-red); }
.course-workflow-error strong { display: block; font-size: 12px; }
.course-workflow-error p { margin: 5px 0 0; font-size: 9px; line-height: 1.5; }
.course-workflow-state { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 14px; padding: 16px 18px; border: 1px solid #eed67b; border-radius: 13px; background: #fff9df; }
.course-workflow-state span, .course-workflow-state strong { display: block; }
.course-workflow-state span { color: #86670f; font-size: 8px; font-weight: 800; text-transform: uppercase; }
.course-workflow-state strong { margin-top: 4px; font-size: 18px; }
.course-workflow-state strong[data-theme="green"] { color: #1f7445; }
.course-workflow-state strong[data-theme="blue"] { color: #1f5f9d; }
.course-workflow-state strong[data-theme="red"] { color: var(--brand-red-dark); }
.course-workflow-state p { max-width: 420px; margin: 0; color: #74611f; font-size: 9px; line-height: 1.5; text-align: right; }
.course-workflow-reviewer { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 14px; padding: 15px 17px; border: 1px solid var(--line); border-radius: 13px; background: #f7f8f9; }
.course-workflow-reviewer span, .course-workflow-reviewer strong { display: block; }
.course-workflow-reviewer span { color: var(--muted); font-size: 8px; text-transform: uppercase; }
.course-workflow-reviewer strong { margin-top: 5px; font-size: 12px; }
.course-workflow-reviewer__form { display: flex; gap: 8px; }
.course-workflow-reviewer select { min-width: 220px; min-height: 38px; padding: 0 10px; border: 1px solid #d7dade; border-radius: 9px; color: var(--ink); background: #fff; font: inherit; font-size: 10px; }
.course-workflow-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(220px, .75fr); gap: 14px; }
.course-workflow-card { padding: 18px; border: 1px solid var(--line); border-radius: 13px; background: #fff; }
.course-workflow-card__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.course-workflow-card__head span { color: var(--muted); font-size: 8px; font-weight: 800; text-transform: uppercase; }
.course-workflow-card__head h3 { margin: 4px 0 0; font-size: 13px; }
.course-workflow-card__head > strong { padding: 6px 9px; border-radius: 999px; color: #735600; background: var(--soft-yellow); font-size: 9px; }
.course-workflow-checklist { display: grid; gap: 8px; }
.course-workflow-checklist__item { display: grid; grid-template-columns: 25px minmax(0, 1fr); align-items: center; gap: 9px; padding: 9px 10px; border-radius: 9px; color: #5f6670; background: #f4f5f6; font-size: 9px; }
.course-workflow-checklist__item i { display: grid; width: 25px; height: 25px; place-items: center; border-radius: 50%; color: #fff; background: #9aa0a8; font-style: normal; font-weight: 900; }
.course-workflow-checklist__item.is-complete { color: #1f6c43; background: #edf8f1; }
.course-workflow-checklist__item.is-complete i { background: #27854f; }
.course-workflow-last-comment { margin: 0; padding: 13px; border-radius: 10px; color: #666d76; background: #f4f5f6; font-size: 10px; line-height: 1.55; }
.course-workflow-actions { display: flex; flex-wrap: wrap; gap: 9px; margin: 14px 0; padding: 14px; border: 1px solid #eed67b; border-radius: 13px; background: #fffaf0; }
.course-workflow-actions:empty { display: none; }
.course-workflow-actions .button--danger { color: #fff; background: var(--brand-red-dark); }
.course-workflow-history-card { margin-top: 14px; }
.course-workflow-history { display: grid; gap: 10px; }
.course-workflow-history > p { margin: 0; color: var(--muted); font-size: 9px; }
.course-workflow-history__item { position: relative; display: grid; grid-template-columns: 13px minmax(0, 1fr); gap: 10px; }
.course-workflow-history__item::before { content: ""; width: 10px; height: 10px; margin-top: 4px; border: 3px solid #fff; border-radius: 50%; background: var(--brand-yellow); box-shadow: 0 0 0 1px #d6b335; }
.course-workflow-history__item strong, .course-workflow-history__item small { display: block; }
.course-workflow-history__item strong { font-size: 10px; }
.course-workflow-history__item small { margin-top: 3px; color: var(--muted); font-size: 8px; }
.course-workflow-history__item p { margin: 6px 0 0; color: #616873; font-size: 9px; line-height: 1.5; }
.course-workflow-dialog .editor-dialog__head p:not(.eyebrow) { margin: 7px 0 0; color: var(--muted); font-size: 10px; line-height: 1.45; }
.is-workflow-readonly [data-editor-pane-content="program"] .edit-row-actions button,
.is-workflow-readonly [data-editor-pane-content="program"] .lesson-content-button,
.is-workflow-readonly #add-chapter-button,
.is-workflow-readonly #upload-scorm-button,
.is-workflow-readonly #bulk-scorm-button,
.is-workflow-readonly #delete-course-button { display: none; }
.is-workflow-readonly #course-edit-form input,
.is-workflow-readonly #course-edit-form textarea,
.is-workflow-readonly #course-edit-form .rich-editable { color: #767d86; background: #f3f4f5; cursor: not-allowed; }
@media (max-width: 760px) { .course-workflow-panel { padding: 18px 14px; } .course-workflow-state, .course-workflow-reviewer { display: grid; } .course-workflow-state p { text-align: left; } .course-workflow-reviewer__form { display: grid; } .course-workflow-reviewer select { min-width: 0; width: 100%; } .course-workflow-grid { grid-template-columns: 1fr; } .course-workflow-actions { display: grid; } .course-workflow-actions .button { width: 100%; } }

@media (max-width: 980px) {
  .editor-workspace-layout { grid-template-columns: 1fr; }
  .editor-workspace-side { position: static; grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  .course-editor-hero { display: grid; padding: 23px 19px; }
  .editor-save-area { width: 100%; justify-items: stretch; }
  .editor-save-area .button { width: 100%; }
  .editor-save-state { text-align: center; }
  .editor-workflow { display: flex; overflow-x: auto; }
  .editor-workflow > * { min-width: 150px; }
  .editor-workspace-side { grid-template-columns: 1fr; }
  .course-edit-form, .program-editor-panel { padding: 18px 14px; }
  .form-grid { grid-template-columns: 1fr; }
  .edit-chapter-card__head { grid-template-columns: 30px minmax(0, 1fr); }
  .edit-chapter-card__head .edit-row-actions { grid-column: 1 / -1; justify-content: stretch; }
  .edit-chapter-card__head .edit-row-actions > * { flex: 1; }
  .edit-lesson-row { grid-template-columns: 30px minmax(0, 1fr); }
  .edit-lesson-row .edit-row-actions { grid-column: 2; justify-content: flex-start; }
  .editor-dialog__actions .button { flex: 1; }
}
@media (max-width: 900px) { .course-template-picker { grid-template-columns: repeat(2, minmax(0, 1fr)); } .course-template-card { min-height: 124px; } }
@media (max-width: 540px) { .editor-dialog--templates form { padding: 18px 14px; } .course-template-picker { grid-template-columns: 1fr; } .course-template-card { grid-template-columns: 42px minmax(0, 1fr) auto; min-height: 0; align-items: center; } .course-template-card i { align-self: center; } }

/* v5.3 — фирменные лонгриды */
.lesson-section-cover { position: relative; display: grid; min-height: 250px; align-content: end; gap: 8px; margin: 32px 0; padding: clamp(28px, 6vw, 58px); overflow: hidden; border-radius: 18px; background-position: center; background-size: cover; box-shadow: var(--shadow); }
.lesson-section-cover > * { position: relative; z-index: 1; max-width: 720px; }
.lesson-section-cover > span { font-size: 11px; font-weight: 850; letter-spacing: .12em; text-transform: uppercase; }
.lesson-section-cover h2 { margin: 0; font-size: clamp(30px, 5vw, 54px); letter-spacing: -.035em; }
.lesson-section-cover p { margin: 0; font-size: clamp(15px, 2vw, 19px); line-height: 1.55; }
.lesson-section-cover--yellow { color: #272014; background: linear-gradient(125deg, #ffd84f, #f4bd16); }
.lesson-section-cover--yellow h2, .lesson-section-cover--light h2 { color: var(--ink); }
.lesson-section-cover--red { color: #fff; background: linear-gradient(125deg, var(--brand-red-dark), var(--brand-red)); }
.lesson-section-cover--dark { color: #fff; background: linear-gradient(125deg, #111827, #263247); }
.lesson-section-cover--light { color: #454b54; border: 1px solid var(--line); background: #f7f7f8; }
.lesson-section-cover.has-image { color: #fff; }
.lesson-section-cover.has-image h2 { color: #fff; }
.lesson-split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(24px, 5vw, 56px); align-items: center; margin: 42px 0; }
.lesson-split--image { grid-template-columns: 2fr 3fr; }
.lesson-split--text { grid-template-columns: 3fr 2fr; }
.lesson-split--image-left figure { grid-column: 1; grid-row: 1; }
.lesson-split--image-left > div { grid-column: 2; }
.lesson-split h2, .lesson-gallery-block > h2, .lesson-steps-block > h2, .lesson-accordion-block > h2 { position: relative; margin: 0 0 24px; padding-bottom: 13px; color: var(--ink); font-size: clamp(24px, 3.2vw, 36px); }
.lesson-split h2::after, .lesson-gallery-block > h2::after, .lesson-steps-block > h2::after, .lesson-accordion-block > h2::after { content: ""; position: absolute; bottom: 0; left: 0; width: 80px; height: 4px; border-radius: 9px; background: var(--brand-yellow); }
.lesson-split p { margin: 0; font-size: 16px; line-height: 1.72; }
.lesson-split figure { margin: 0; }
.lesson-split img { width: 100%; min-height: 280px; aspect-ratio: 4 / 3; object-fit: cover; box-shadow: 0 16px 38px rgba(28,31,35,.12); }
.lesson-gallery-block, .lesson-steps-block, .lesson-accordion-block { margin: 46px 0; }
.lesson-gallery { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.lesson-gallery figure { margin: 0; overflow: hidden; border-radius: 14px; background: #fff; box-shadow: 0 8px 24px rgba(30,33,38,.1); }
.lesson-gallery img { width: 100%; aspect-ratio: 4 / 3; border-radius: 0; object-fit: cover; transition: transform .22s ease; }
.lesson-gallery figure:hover img { transform: scale(1.025); }
.lesson-gallery figcaption { min-height: 48px; margin: 0; padding: 10px 12px; color: var(--ink); background: var(--brand-yellow); font-size: 11px; font-weight: 750; text-align: left; }
.lesson-steps { display: grid; gap: 0; }
.lesson-steps article { position: relative; display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 18px; padding: 0 0 28px; }
.lesson-steps article:not(:last-child)::before { content: ""; position: absolute; top: 48px; bottom: 0; left: 25px; width: 2px; background: #dfe2e5; }
.lesson-steps article > span { position: relative; z-index: 1; display: grid; width: 52px; height: 52px; place-items: center; border-radius: 50%; color: #5f4500; background: var(--brand-yellow); font-size: 16px; font-weight: 900; }
.lesson-steps article > div { padding: 11px 0; }
.lesson-steps strong { color: var(--ink); font-size: 18px; }
.lesson-steps p { margin: 6px 0 0; }
.lesson-accordion-block details { margin: 10px 0; border: 1px solid var(--line); border-radius: 12px; background: #fff; box-shadow: 0 4px 14px rgba(30,33,38,.04); }
.lesson-accordion-block summary { position: relative; padding: 18px 54px 18px 20px; color: var(--ink); font-size: 15px; font-weight: 800; list-style: none; cursor: pointer; }
.lesson-accordion-block summary::-webkit-details-marker { display: none; }
.lesson-accordion-block summary::after { content: "+"; position: absolute; top: 50%; right: 20px; transform: translateY(-50%); color: var(--brand-red); font-size: 25px; }
.lesson-accordion-block details[open] summary::after { content: "−"; }
.lesson-accordion-block details p { margin: 0; padding: 0 20px 20px; }
.lesson-cta-wrap { display: flex; margin: 28px 0; }
.lesson-cta-wrap--left { justify-content: flex-start; } .lesson-cta-wrap--center { justify-content: center; } .lesson-cta-wrap--right { justify-content: flex-end; }
.lesson-cta { display: inline-flex; min-height: 46px; align-items: center; justify-content: center; padding: 10px 26px; border: 2px solid transparent; border-radius: 9px; font-size: 13px; font-weight: 850; text-decoration: none; transition: transform .15s ease, box-shadow .15s ease; }
.lesson-cta:hover { transform: translateY(-1px); box-shadow: 0 8px 20px rgba(31,34,38,.12); }
.lesson-cta--primary { color: #544000; background: var(--brand-yellow); }
.lesson-cta--dark { color: #fff; background: #172033; }
.lesson-cta--outline { color: var(--ink); border-color: var(--brand-yellow); background: #fff; }
.lesson-audio { display: grid; gap: 11px; margin: 28px 0; padding: 22px; border-radius: 14px; color: #fff; background: linear-gradient(120deg, #172033, #313e56); }
.lesson-audio strong { font-size: 17px; } .lesson-audio audio { width: 100%; } .lesson-audio p { margin: 0; color: rgba(255,255,255,.72); }
.lesson-result { display: grid; justify-items: center; gap: 10px; margin: 46px 0 12px; padding: clamp(34px, 7vw, 68px) 24px; border-radius: 18px; text-align: center; }
.lesson-result > span { display: grid; width: 66px; height: 66px; place-items: center; border-radius: 50%; color: #fff; background: #218453; font-size: 30px; font-weight: 900; }
.lesson-result h2 { margin: 8px 0 0; font-size: clamp(28px, 4vw, 42px); } .lesson-result p { max-width: 650px; margin: 0; } .lesson-result .lesson-cta { margin-top: 12px; }
.lesson-result--success { background: #effaf3; } .lesson-result--yellow { background: var(--soft-yellow); } .lesson-result--dark { color: #fff; background: #172033; } .lesson-result--dark h2 { color: #fff; }
@media (max-width: 720px) {
  .lesson-section-cover { min-height: 220px; margin: 24px -4px; padding: 28px 22px; border-radius: 14px; }
  .lesson-split, .lesson-split--image, .lesson-split--text { grid-template-columns: 1fr; gap: 18px; margin: 32px 0; }
  .lesson-split--image-left figure, .lesson-split--image-left > div { grid-column: 1; grid-row: auto; }
  .lesson-split--image-left figure { order: 2; }
  .lesson-split img { min-height: 220px; }
  .lesson-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .lesson-gallery figcaption { min-height: 0; }
  .lesson-cta-wrap .lesson-cta { width: 100%; }
}
@media (max-width: 420px) { .lesson-gallery { grid-template-columns: 1fr; } .lesson-steps article { grid-template-columns: 44px minmax(0, 1fr); gap: 13px; } .lesson-steps article > span { width: 44px; height: 44px; } .lesson-steps article:not(:last-child)::before { top: 40px; left: 21px; } }

/* v5.3.1 — корпоративный профиль */
.profile-hero { display: grid; grid-template-columns: 76px minmax(0, 1fr) auto; align-items: center; gap: 22px; min-height: 180px; padding: 32px 38px; border-radius: 16px; color: #fff; background: linear-gradient(110deg, rgba(111,8,25,.97), rgba(218,25,55,.9)), url("./images/pattern-1.png") center / 520px auto repeat; box-shadow: var(--shadow); }
.profile-hero__avatar { display: grid; width: 76px; height: 76px; place-items: center; border: 3px solid rgba(255,255,255,.92); border-radius: 50%; color: #fff; background: rgba(255,255,255,.14); font-size: 24px; font-weight: 900; }
.profile-hero .eyebrow { margin: 0 0 5px; color: var(--brand-yellow); }
.profile-hero h1 { margin: 0; font-size: clamp(28px, 4vw, 42px); letter-spacing: -.035em; }
.profile-hero p:last-child { margin: 7px 0 0; color: rgba(255,255,255,.78); font-size: 12px; }
.profile-hero .button { color: #5f4500; background: var(--brand-yellow); }
.profile-layout { display: grid; grid-template-columns: 290px minmax(0, 1fr); gap: 18px; margin-top: 18px; align-items: start; }
.profile-identity { padding: 24px; }
.profile-identity > span { color: var(--brand-red); font-size: 9px; font-weight: 850; letter-spacing: .1em; text-transform: uppercase; }
.profile-identity h2 { margin: 8px 0 4px; font-size: 22px; line-height: 1.2; }
.profile-identity > p { overflow-wrap: anywhere; margin: 0; color: var(--muted); font-size: 11px; }
.profile-identity dl { display: grid; gap: 14px; margin: 24px 0 0; padding-top: 20px; border-top: 1px solid var(--line); }
.profile-identity dt { color: var(--muted); font-size: 9px; }
.profile-identity dd { margin: 5px 0 0; color: var(--ink); font-size: 12px; font-weight: 800; }
.profile-status { color: #167544 !important; }
.profile-main { display: grid; gap: 18px; min-width: 0; }
.profile-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.profile-stats article { display: grid; gap: 5px; min-height: 124px; align-content: center; padding: 20px; border: 1px solid var(--line); border-radius: 12px; background: #fff; box-shadow: var(--shadow); }
.profile-stats span { color: var(--muted); font-size: 9px; font-weight: 750; text-transform: uppercase; }
.profile-stats strong { color: var(--ink); font-size: 30px; line-height: 1; }
.profile-stats article:nth-child(4) strong { color: var(--brand-red); }
.profile-stats small { color: var(--muted); font-size: 9px; }
.profile-learning { padding: 24px; }
.profile-course-list { display: grid; }
.profile-course-row { display: grid; grid-template-columns: minmax(0, 1fr) 180px 24px; align-items: center; gap: 18px; min-height: 72px; padding: 13px 4px; border-top: 1px solid var(--line); color: inherit; text-decoration: none; }
.profile-course-row:first-child { border-top: 0; }
.profile-course-row:hover { background: #fffdf7; }
.profile-course-row strong, .profile-course-row small { display: block; }
.profile-course-row strong { color: var(--ink); font-size: 12px; }
.profile-course-row small { margin-top: 5px; color: var(--muted); font-size: 9px; }
.profile-course-progress { display: grid; grid-template-columns: 38px minmax(0, 1fr); align-items: center; gap: 8px; }
.profile-course-progress > span { color: #646b74; font-size: 10px; font-weight: 800; text-align: right; }
.profile-course-progress i { display: block; height: 5px; overflow: hidden; border-radius: 9px; background: #e7e9eb; }
.profile-course-progress b { display: block; height: 100%; border-radius: inherit; background: var(--brand-yellow); }
.profile-course-arrow { color: var(--brand-red); font-size: 18px; }
@media (max-width: 900px) { .profile-layout { grid-template-columns: 1fr; } .profile-identity { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 24px; } .profile-identity dl { grid-column: 1 / -1; grid-template-columns: 1fr 1fr; } .profile-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px) { .profile-hero { grid-template-columns: 58px minmax(0, 1fr); gap: 14px; padding: 24px 18px; } .profile-hero__avatar { width: 58px; height: 58px; font-size: 18px; } .profile-hero .button { grid-column: 1 / -1; width: 100%; } .profile-identity { display: block; padding: 19px; } .profile-identity dl { grid-template-columns: 1fr; } .profile-stats { grid-template-columns: 1fr 1fr; gap: 9px; } .profile-stats article { min-height: 108px; padding: 15px; } .profile-stats strong { font-size: 26px; } .profile-learning { padding: 18px 14px; } .profile-course-row { grid-template-columns: minmax(0, 1fr) 24px; gap: 10px; } .profile-course-progress { grid-column: 1 / -1; grid-row: 2; } .profile-course-arrow { grid-column: 2; grid-row: 1; } }


/* v5.3.2 — редактируемый профиль сотрудника */
.avatar.has-photo, .profile-hero__avatar.has-photo, .profile-photo-preview.has-photo { background-position: center; background-size: cover; background-repeat: no-repeat; }
.avatar.has-photo { box-shadow: inset 0 0 0 1px rgba(255,255,255,.72); }
.profile-hero__avatar.has-photo { background-color: #fff; }
.profile-edit-button { width: 100%; margin-top: 18px; }
.profile-about { padding: 24px; }
.profile-about__copy { margin: 0; color: #50565f; font-size: 12px; line-height: 1.72; white-space: pre-line; }

.assignment-alert { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin: 18px 0; padding: 18px 20px; border: 1px solid #f1b6be; border-radius: 18px; background: linear-gradient(120deg, #fff1f3, #fffaf0); box-shadow: 0 12px 28px rgba(157, 0, 24, .08); }
.assignment-alert[hidden] { display: none; }
.assignment-alert strong, .assignment-alert p { display: block; margin: 0; }
.assignment-alert strong { color: var(--brand-red-dark); font-size: 14px; }
.assignment-alert p { margin-top: 5px; color: #656b74; font-size: 10px; }
.profile-assignments { padding: 24px; }
.profile-assignment-count { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 11px; color: #6b5000; background: #fff2bd; font-size: 13px; font-weight: 900; }
.profile-assignment-list { display: grid; gap: 10px; }
.profile-assignment-card { padding: 16px; border: 1px solid var(--line); border-radius: 16px; background: #fff; }
.profile-assignment-card[data-status="Fail"] { border-color: #f1b6be; background: #fffafb; }
.profile-assignment-card__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.profile-assignment-card__head strong, .profile-assignment-card__head small { display: block; }
.profile-assignment-card__head strong { font-size: 13px; }
.profile-assignment-card__head small { margin-top: 5px; color: var(--muted); font-size: 9px; }
.assignment-status { flex: 0 0 auto; padding: 7px 10px; border-radius: 999px; color: #756000; background: #fff2bd; font-size: 9px; font-weight: 850; }
.assignment-status[data-status="Pass"] { color: #17613a; background: #e3f5ea; }
.assignment-status[data-status="Fail"] { color: var(--brand-red-dark); background: #ffe4e8; }
.assignment-status[data-status="Not Applicable"] { color: #5c626b; background: #eceef0; }
.assignment-feedback { margin-top: 16px; padding: 14px; border-radius: 14px; color: #5f4800; background: #fff5cf; }
.assignment-feedback strong, .assignment-feedback p { display: block; margin: 0; }
.assignment-feedback strong { font-size: 10px; }
.assignment-feedback p { margin-top: 6px; font-size: 11px; line-height: 1.55; white-space: pre-line; }
.assignment-feedback--inline { border-left: 4px solid var(--brand-yellow); }
.profile-assignment-card__actions { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 14px; }
.profile-assignment-card__actions details { min-width: 0; flex: 1; }
.profile-assignment-card__actions summary { color: var(--brand-red-dark); font-size: 10px; font-weight: 800; cursor: pointer; }
.assignment-history { display: grid; gap: 0; margin-top: 12px; }
.assignment-history-row { display: grid; grid-template-columns: 14px minmax(0, 1fr); gap: 10px; min-height: 48px; }
.assignment-history-row i { position: relative; width: 8px; height: 8px; margin-top: 4px; border: 2px solid #fff; border-radius: 50%; background: var(--brand-yellow); box-shadow: 0 0 0 1px #d7b525; }
.assignment-history-row:not(:last-child) i::after { position: absolute; top: 10px; left: 2px; width: 2px; height: 34px; background: #e1e3e6; content: ""; }
.assignment-history-row strong, .assignment-history-row small { display: block; }
.assignment-history-row strong { font-size: 10px; }
.assignment-history-row small { margin-top: 3px; color: var(--muted); font-size: 8px; }
.assignment-history-row p { margin: 6px 0 0; color: #555b64; font-size: 10px; line-height: 1.45; }
.assignment-resubmit-dialog .editor-dialog__head p:not(.eyebrow) { margin: 6px 0 0; color: var(--muted); font-size: 10px; }
.assignment-file-control input[type="file"] { width: 100%; min-height: 48px; padding: 10px; border: 1px dashed #c9cdd2; border-radius: 12px; background: #fafafa; }

@media (max-width: 620px) {
  .assignment-alert { display: grid; margin: 14px 0; padding: 16px; }
  .assignment-alert .button { width: 100%; }
  .profile-assignments { padding: 18px 14px; }
  .profile-assignment-card__head, .profile-assignment-card__actions { display: grid; }
  .assignment-status { width: max-content; }
  .profile-assignment-card__actions .button { width: 100%; }
}
.profile-interests { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.profile-interest-chip { display: inline-flex; align-items: center; min-height: 30px; padding: 6px 11px; border: 1px solid #f1d770; border-radius: 999px; color: #644b00; background: #fff8d9; font-size: 9px; font-weight: 800; }
.profile-interests__empty { color: var(--muted); font-size: 10px; }
.profile-edit-dialog { width: min(780px, calc(100% - 28px)); }
.profile-edit-dialog .editor-dialog__head p:last-child { max-width: 540px; margin: 7px 0 0; color: var(--muted); font-size: 10px; line-height: 1.5; }
.profile-photo-editor { display: grid; grid-template-columns: 92px minmax(0, 1fr); align-items: center; gap: 18px; margin-bottom: 22px; padding: 18px; border: 1px solid var(--line); border-radius: 12px; background: #fafafa; }
.profile-photo-preview { display: grid; width: 88px; height: 88px; place-items: center; overflow: hidden; border: 3px solid #fff; border-radius: 50%; color: #fff; background: var(--brand-red); box-shadow: 0 5px 16px rgba(40,43,48,.14); font-size: 23px; font-weight: 900; }
.profile-photo-editor strong, .profile-photo-editor p, .profile-photo-editor small { display: block; }
.profile-photo-editor strong { font-size: 12px; }
.profile-photo-editor p { margin: 5px 0 10px; color: var(--muted); font-size: 9px; line-height: 1.5; }
.profile-photo-editor small { min-height: 15px; margin-top: 8px; color: #6d7279; font-size: 8px; }
.profile-photo-button { display: inline-flex; width: auto; cursor: pointer; }
.profile-form-grid { align-items: start; }
.profile-form-grid textarea { resize: vertical; }
@media (max-width: 900px) { .profile-identity .profile-edit-button { grid-column: 1 / -1; } }
@media (max-width: 620px) { .profile-edit-button { width: 100%; } .profile-about { padding: 19px; } .profile-edit-dialog form { padding: 18px 14px; } .profile-photo-editor { grid-template-columns: 70px minmax(0, 1fr); gap: 13px; padding: 14px; } .profile-photo-preview { width: 68px; height: 68px; font-size: 18px; } .profile-photo-button { width: 100%; justify-content: center; } }


/* v5.4 — разделы, оформление, интерактивные вопросы и безопасное удаление */
.outline-chapter > summary { cursor: pointer; list-style: none; }
.outline-chapter > summary::-webkit-details-marker { display: none; }
.outline-chapter > summary::after { content: "⌄"; margin-left: auto; color: var(--brand-red); font-size: 18px; transition: transform .16s ease; }
.outline-chapter[open] > summary::after { transform: rotate(180deg); }
.lesson-color--blue { color: #1769aa; }
.lesson-color--purple { color: #7046a5; }
.lesson-content mark { padding: .08em .2em; border-radius: .28em; color: inherit; }
.lesson-content mark[data-tone="yellow"] { background: #ffe88a; }
.lesson-content mark[data-tone="red"] { background: #ffd0d5; }
.lesson-content mark[data-tone="green"] { background: #ccefd9; }
.lesson-content mark[data-tone="blue"] { background: #cfe8ff; }
.lesson-radius--small { border-radius: 4px; }
.lesson-radius--medium { border-radius: 12px; }
.lesson-radius--large { border-radius: 24px; }
.lesson-cta--radius-small { border-radius: 4px; }
.lesson-cta--radius-rounded { border-radius: 12px; }
.lesson-cta--radius-pill { border-radius: 999px; }
.program-editor-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.editor-delete-course { width: 100%; margin-top: 10px; border: 1px solid #efb2ba; color: var(--brand-red-dark); background: #fff4f5; }
.icon-action--danger { color: var(--brand-red-dark); }
.scorm-dropzone { display: grid; gap: 7px; margin-top: 16px; padding: 20px; border: 2px dashed #e1b21a; border-radius: 13px; color: #6f5200; background: #fff9df; cursor: pointer; }
.scorm-dropzone span { color: #817246; font-size: 10px; line-height: 1.5; }
.scorm-dropzone input { margin-top: 7px; }
.lesson-practice { display: grid; gap: 15px; margin: 30px 0; padding: clamp(20px, 4vw, 32px); border: 2px solid #f0c326; border-radius: 18px; background: #fffdf5; }
.lesson-practice > span { width: max-content; padding: 5px 9px; border-radius: 999px; color: #725400; background: #fff0b5; font-size: 9px; font-weight: 850; text-transform: uppercase; }
.lesson-practice h3 { margin: 0; color: var(--ink); font-size: clamp(20px, 3vw, 28px); }
.lesson-practice > img { max-height: 360px; margin: 0 auto; object-fit: contain; }
.lesson-practice__answers { display: grid; gap: 9px; }
.lesson-practice__answers label { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.lesson-practice__answers label:has(input:checked) { border-color: #e1b21a; background: #fff8d8; }
.lesson-practice__answers label strong { min-width: 35%; }
.lesson-practice__answers input[type="text"], .lesson-practice__answers select { width: 100%; min-height: 42px; padding: 9px 11px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.lesson-practice .button { width: max-content; }
.lesson-practice__feedback { min-height: 20px; margin: 0 !important; font-weight: 750; }
.lesson-practice__feedback[data-status="success"] { color: #167544; }
.lesson-practice__feedback[data-status="error"] { color: var(--brand-red-dark); }
.lesson-practice.is-passed { border-color: #79bf94; background: #f1faf4; }
@media (max-width: 720px) {
  .program-editor-actions { width: 100%; }
  .program-editor-actions .button { flex: 1; }
  .lesson-practice .button { width: 100%; }
  .lesson-practice__answers label { align-items: flex-start; flex-direction: column; }
  .lesson-practice__answers label strong { min-width: 0; }
}

/* v5.9.0 — проверка SCORM и перенос в редактируемые уроки */
.scorm-report { display: grid; gap: 10px; margin-top: 14px; padding: 16px; border: 1px solid #e4c14a; border-radius: 14px; background: #fffdf3; }
.scorm-report h3, .scorm-report p, .scorm-report ul, .scorm-report dl { margin: 0; }
.scorm-report h3 { font-size: 16px; }
.scorm-report p { color: var(--muted); font-size: 11px; }
.scorm-report dl { display: grid; grid-template-columns: minmax(120px, .7fr) minmax(0, 1.3fr); gap: 6px 12px; font-size: 11px; }
.scorm-report dt { color: var(--muted); }
.scorm-report dd { margin: 0; overflow-wrap: anywhere; font-weight: 750; }
.scorm-report ul { display: grid; gap: 6px; padding-left: 18px; font-size: 11px; }
.scorm-report li[data-status="error"] { color: var(--brand-red-dark); }
.scorm-report li[data-status="warning"] { color: #725400; }
@media (max-width: 620px) { .scorm-report dl { grid-template-columns: 1fr; } .scorm-report dd { margin-bottom: 5px; } }

.editor-dialog__actions--scorm { flex-wrap: wrap; }
#scorm-convert { border-color: #d5aa17; color: #6f5200; background: #fff8d8; }
@media (max-width: 620px) {
  .editor-dialog__actions--scorm .button { flex: 1 1 100%; width: 100%; }
}


/* v5.11.0 — безопасные редакции и пакетный SCORM-импорт */
.editor-dialog--wide { width: min(880px, calc(100vw - 32px)); }
.editor-dialog__head p:not(.eyebrow) { max-width: 680px; margin: 6px 0 0; color: var(--muted); font-size: 10px; line-height: 1.5; }
.scorm-update-control { margin-top: 14px; padding: 14px; border: 1px solid #ead06d; border-radius: 13px; background: #fffaf0; }
.scorm-update-control select { width: 100%; min-height: 42px; padding: 9px 11px; border: 1px solid var(--line); border-radius: 9px; background: #fff; color: var(--ink); }
.bulk-scorm-list { display: grid; gap: 10px; max-height: min(48vh, 520px); margin-top: 14px; overflow: auto; }
.bulk-scorm-item { display: grid; grid-template-columns: 30px minmax(0, .9fr) minmax(220px, 1.1fr); align-items: center; gap: 12px; padding: 12px; border: 1px solid #e8d785; border-radius: 13px; background: #fffdf5; }
.bulk-scorm-item > span { display: grid; width: 28px; height: 28px; place-items: center; border-radius: 50%; color: #fff; background: #27854f; font-weight: 900; }
.bulk-scorm-item strong, .bulk-scorm-item small { display: block; overflow-wrap: anywhere; }
.bulk-scorm-item strong { font-size: 10px; }
.bulk-scorm-item small { margin-top: 4px; color: var(--muted); font-size: 9px; }
.bulk-scorm-item label { display: grid; gap: 5px; color: #5f6670; font-size: 9px; font-weight: 750; }
.bulk-scorm-item input { min-width: 0; width: 100%; min-height: 40px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 9px; background: #fff; color: var(--ink); }
@media (max-width: 700px) {
  .bulk-scorm-item { grid-template-columns: 30px minmax(0, 1fr); }
  .bulk-scorm-item label { grid-column: 1 / -1; }
  .editor-dialog--wide { width: calc(100vw - 20px); }
}
