/* Сайт курса «Менеджер блогеров». Стиль — как у презентаций (исходники/стиль.css):
   молочный фон с фактурой бумаги, графит, пыльная роза, шалфейный; заголовки Playfair Display Black Italic,
   текст Inter; мазок кистью под ключевым словом, звёздочка с завитком, скотч на карточках. */

@font-face { font-family: "Playfair Display"; font-style: italic; font-weight: 900; font-display: swap;
  src: url("../fonts/PlayfairDisplay-BlackItalic.ttf") format("truetype"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("../fonts/Inter-Regular.ttf") format("truetype"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 600; font-display: swap;
  src: url("../fonts/Inter-SemiBold.ttf") format("truetype"); }

:root {
  --milk: #F7F3EE;
  --ink: #1F1F24;
  --rose: #E3A5BF;
  --rose-light: #F4DCE6;
  --rose-dark: #B9668A;
  --sage: #B7CFA3;
  --sage-light: #E3EDD9;
  --sage-dark: #5E7A4C;
  --card: #2A2D3A;
  --muted: #6F6B75;
  --line: rgba(31, 31, 36, 0.14);
  --line-strong: rgba(31, 31, 36, 0.32);
  --paper: rgba(255, 255, 255, 0.55);
  --radius: 22px;
  --serif: "Playfair Display", Georgia, serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: light;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 16px; }
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column;
  background: var(--milk); color: var(--ink);
  font: 400 17px/1.55 var(--sans); -webkit-font-smoothing: antialiased;
}
body::before {   /* фактура бумаги, как на слайдах */
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: var(--milk) url("../img/paper.jpg") center / cover no-repeat;
}
main { flex: 1 0 auto; padding-bottom: 72px; }
img { max-width: 100%; height: auto; }
a { color: inherit; text-decoration-color: var(--rose); text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--ink); }
p { margin: 0 0 0.7em; }
p:last-child { margin-bottom: 0; }
b, strong { font-weight: 600; }
.wrap { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 24px; }
.muted { color: var(--muted); }
.small { font-size: 14.5px; line-height: 1.5; }
.sr-only, .visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.inline { display: inline; }
:focus-visible { outline: 3px solid var(--rose); outline-offset: 2px; border-radius: 6px; }

/* ---------- типографика ---------- */
.title {
  margin: 0; font-family: var(--serif); font-style: italic; font-weight: 900;
  font-size: clamp(34px, 5.4vw, 58px); line-height: 1.1; letter-spacing: -0.004em;
}
.h2 { margin: 0 0 16px; font-family: var(--serif); font-style: italic; font-weight: 900;
  font-size: clamp(25px, 3.2vw, 34px); line-height: 1.15; }
.h2 a { text-decoration: none; }
.h3 { margin: 0 0 8px; font-weight: 600; font-size: 19px; line-height: 1.35; }
.eyebrow { margin: 0 0 10px; font-size: 13px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.lead { font-size: 19px; line-height: 1.5; max-width: 720px; margin-top: 18px; }
.lead p { margin-bottom: 0.5em; }
.lead p:first-child:not(:only-child) { font-weight: 600; }
.kw {   /* мазок кистью под ключевым словом */
  padding: 0 0.14em 0 0.08em; margin: 0 -0.14em 0 -0.08em;
  background: url("../img/brush.svg") no-repeat;
  background-size: 100% 0.4em; background-position: 0 calc(100% - 0.04em);
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
}
.doodle { display: block; width: 210px; height: 50px; background: url("../img/doodle.svg") center / contain no-repeat; }

/* списки, как на слайдах: короткие штрихи розы и номера курсивом */
ul.list { list-style: none; margin: 0.4em 0 0.8em; padding: 0; }
ul.list > li { position: relative; padding-left: 1.3em; margin: 0 0 0.35em; }
ul.list > li::before { content: ""; position: absolute; left: 0.05em; top: 0.72em; width: 0.65em; height: 0.14em;
  border-radius: 0.07em; background: var(--rose); }
ol.olist { list-style: none; margin: 0.4em 0 0.8em; padding: 0; }
ol.olist > li { display: grid; grid-template-columns: 1.5em 1fr; column-gap: 0.3em; align-items: baseline; margin: 0 0 0.4em; }
ol.olist .n { font-family: var(--serif); font-style: italic; font-weight: 900; font-size: 1.2em; line-height: 1; }
ol.olist.steps > li { grid-template-columns: 1.7em 1fr; margin-bottom: 0.8em; }
ol.olist.steps .n { font-size: 1.6em; }
p.note { color: var(--muted); font-size: 15px; }

/* ---------- шапка ---------- */
.top { border-bottom: 1px solid var(--line); background: rgba(247, 243, 238, 0.82); }
.top-in { display: flex; align-items: center; justify-content: space-between; gap: 12px 24px; flex-wrap: wrap; padding-top: 14px; padding-bottom: 14px; }
.logo { font-family: var(--serif); font-style: italic; font-weight: 900; font-size: 25px; line-height: 1.2; text-decoration: none; white-space: nowrap; }
.nav { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 20px; font-size: 15.5px; }
.nav a { text-decoration: none; }
.nav a:hover { text-decoration: underline; text-decoration-color: var(--rose); }
.nav-admin { font-weight: 600; }
.linklike { background: none; border: 0; padding: 0; font: inherit; color: var(--muted); cursor: pointer; }
.linklike:hover { color: var(--ink); text-decoration: underline; }
.badge { display: inline-block; min-width: 22px; padding: 1px 7px; border-radius: 99px; background: var(--rose);
  color: var(--ink); font-size: 13px; font-weight: 600; text-align: center; line-height: 20px; }
.subnav { border-top: 1px solid var(--line); background: rgba(244, 220, 230, 0.45); }
.subnav-in { display: flex; gap: 4px 6px; flex-wrap: wrap; padding-top: 8px; padding-bottom: 8px; font-size: 15px; }
.subnav a { padding: 6px 14px; border-radius: 99px; text-decoration: none; }
.subnav a:hover { background: rgba(255, 255, 255, 0.6); }
.subnav a.on { background: var(--ink); color: var(--milk); }
.subnav a.on .badge { background: var(--rose); }

.foot { border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; }
.foot-in { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 18px; padding-bottom: 18px; }
.foot .doodle { width: 150px; height: 36px; opacity: 0.9; }

/* ---------- кнопки, метки ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 24px; border-radius: 99px; border: 1.5px solid var(--ink);
  font: 600 16px/1.2 var(--sans); text-decoration: none; cursor: pointer; text-align: center;
  transition: transform 0.12s ease, background-color 0.12s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn[disabled] { opacity: 0.55; cursor: progress; transform: none; }
.btn-ink { background: var(--ink); color: var(--milk); }
.btn-ink:hover { background: #34343c; }
.btn-rose { background: var(--rose); color: var(--ink); border-color: var(--rose); }
.btn-rose:hover { background: #dc93b3; }
.btn-sage { background: var(--sage); color: var(--ink); border-color: var(--sage); }
.btn-ghost { background: rgba(255, 255, 255, 0.5); color: var(--ink); border-color: var(--line-strong); }
.btn-ghost:hover { border-color: var(--ink); background: #fff; }
.btn-small { padding: 8px 16px; font-size: 14.5px; }
.btn-danger { color: #9b2c4f; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

.chip { display: inline-block; padding: 3px 11px; border-radius: 99px; font-size: 13px; font-weight: 600; line-height: 1.5; white-space: nowrap; }
.chip-review { background: var(--rose-light); color: #7d3a58; }
.chip-accepted { background: var(--sage-light); color: #3f5a2f; }
.chip-redo { background: #fff; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--rose-dark); }
.chip-hidden { background: #E6E2DD; color: var(--muted); }
.check { display: inline-block; width: 1.05em; height: 1.05em; vertical-align: -0.15em; margin-right: 0.3em;
  background: url("../img/check.svg") center / contain no-repeat; }

/* ---------- сообщения ---------- */
.flashes { margin: 20px 0 0; display: grid; gap: 8px; }
.flash { padding: 12px 18px; border-radius: 14px; font-size: 15.5px; border: 1.5px solid transparent; }
.flash-ok { background: var(--sage-light); border-color: var(--sage); }
.flash-error { background: var(--rose-light); border-color: var(--rose-dark); }
.flash-info { background: #fff; border-color: var(--line-strong); }

/* ---------- плашки и карточки ---------- */
.panel { position: relative; border-radius: var(--radius); padding: 20px 24px; margin: 24px 0; }
.panel-rose { background: var(--rose); }
.panel-rose ul.list > li::before { background: var(--ink); }
.panel-line { border: 1.5px solid var(--line-strong); background: var(--paper); }
.announce { display: flex; gap: 18px; align-items: flex-start; }
.announce .sign { flex: none; padding: 4px 12px; border-radius: 10px; background: var(--milk); font-weight: 600; font-size: 14px;
  transform: rotate(-3deg); box-shadow: 0 2px 0 rgba(31, 31, 36, 0.15); }
.card-dark { position: relative; background: var(--card); color: #fff; border-radius: var(--radius); padding: 30px 28px 24px; margin: 40px 0 24px; }
.card-dark a { color: #fff; }
.tape { position: absolute; top: -20px; left: 50%; width: 170px; height: 42px; transform: translateX(-50%) rotate(-2.5deg);
  background: url("../img/tape.svg") center / 100% 100% no-repeat; pointer-events: none; }

/* ---------- вход ---------- */
.login { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 24px; min-height: calc(100vh - 140px); padding: 40px 0; }
.login-form { max-width: 420px; margin-top: 28px; }
.login-fox { width: clamp(220px, 32vw, 420px); }

/* ---------- главная ---------- */
.hero { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 16px 32px; padding: 40px 0 8px; }
.hero .btn { margin-top: 22px; }
.hero-fox { width: clamp(150px, 28vw, 340px); margin-right: -12px; }
.progress-line { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 22px; color: var(--muted); font-size: 15.5px; }
progress { -webkit-appearance: none; appearance: none; width: min(320px, 100%); height: 10px; border: 0; border-radius: 99px;
  background: rgba(31, 31, 36, 0.09); overflow: hidden; }
progress::-webkit-progress-bar { background: rgba(31, 31, 36, 0.09); border-radius: 99px; }
progress::-webkit-progress-value { background: var(--rose); border-radius: 99px; }
progress::-moz-progress-bar { background: var(--rose); border-radius: 99px; }

.replies { padding-top: 34px; }
.reply-list { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 8px; }
.reply-list a { font-weight: 600; }

.module { margin-top: 56px; }
.module-head { margin-bottom: 16px; }
.module-head .h2 { margin-bottom: 0; }
.lesson-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.lesson-row {
  display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; align-items: center; gap: 12px;
  padding: 14px 20px; border-radius: 16px; background: var(--paper); border: 1px solid var(--line);
  text-decoration: none; transition: border-color 0.12s ease, transform 0.12s ease;
}
.lesson-row:hover { border-color: var(--ink); transform: translateX(2px); }
.lesson-code { font-family: var(--serif); font-style: italic; font-weight: 900; font-size: 22px; line-height: 1; white-space: nowrap; }
.lesson-title { font-weight: 600; }
.lesson-meta { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.lesson-row.is-done .lesson-code::after { content: ""; display: inline-block; width: 18px; height: 18px; margin-left: 6px; vertical-align: -2px;
  background: url("../img/check.svg") center / contain no-repeat; }
.soon { display: flex; align-items: center; gap: 20px; padding: 18px 24px; border-radius: var(--radius); border: 1.5px dashed var(--line-strong); }
.soon-fox { width: 120px; flex: none; }
.soon-big { margin-top: 32px; }
.soon-big .soon-fox { width: 200px; }

/* ---------- карусели уроков на главной ---------- */
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; align-items: center; }
.hero-actions .btn { margin-top: 0; }
.jump { display: flex; flex-wrap: wrap; gap: 8px; margin: 36px 0 0; padding: 6px; border-radius: 99px; background: var(--paper);
  border: 1px solid var(--line); width: fit-content; max-width: 100%; }
.jump a { padding: 8px 18px; border-radius: 99px; text-decoration: none; font-weight: 600; font-size: 15px; }
.jump a:hover { background: #fff; }
.jump a.on { background: var(--ink); color: var(--milk); }
.module-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; }
.module-head .muted { margin: 2px 0 0; }
.rail-nav { display: flex; gap: 8px; align-items: center; flex: none; }
.rail-btn { width: 42px; height: 42px; border-radius: 50%; border: 1.5px solid var(--ink); background: rgba(255, 255, 255, 0.6);
  font: 600 18px/1 var(--sans); color: var(--ink); cursor: pointer; transition: background-color 0.12s ease; }
.rail-btn:hover { background: var(--rose); border-color: var(--rose); }
.rail-btn[disabled] { opacity: 0.3; cursor: default; background: transparent; }
.rail-nav.no-scroll .rail-btn { display: none; }
.rail-all { font-weight: 600; font-size: 15px; margin-left: 6px; }
.rail-track { list-style: none; margin: 0 -24px; padding: 4px 24px 14px; display: grid; grid-auto-flow: column;
  grid-auto-columns: calc((100% - 2 * 18px) / 3.15); gap: 18px; overflow-x: auto; scroll-snap-type: x mandatory;
  scroll-padding: 0 24px; scrollbar-width: none; overscroll-behavior-x: contain; }
.rail-track::-webkit-scrollbar { display: none; }
.rail-track > li { scroll-snap-align: start; min-width: 0; }

.lcard { display: flex; flex-direction: column; height: 100%; border-radius: var(--radius); overflow: hidden; background: var(--paper);
  border: 1px solid var(--line); text-decoration: none; transition: border-color 0.12s ease, transform 0.12s ease, box-shadow 0.12s ease; }
.lcard:hover { border-color: var(--ink); transform: translateY(-3px); box-shadow: 0 16px 30px -22px rgba(31, 31, 36, 0.6); }
.lcard-cover { position: relative; display: block; aspect-ratio: 16 / 9; border-bottom: 1px solid var(--line); background: var(--milk); overflow: hidden; }
.lcard-cover > img { display: block; width: 100%; height: 100%; object-fit: cover; }
.cover-blank { position: absolute; inset: 0; display: flex; align-items: flex-start; justify-content: space-between; gap: 8px;
  padding: 7% 6%; background: var(--milk) url("../img/paper.jpg") center / cover; }
.cover-blank-title { font-family: var(--serif); font-style: italic; font-weight: 900; font-size: 21px; line-height: 1.12;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; max-width: 68%; }
.cover-blank-fox { position: absolute; right: 4%; bottom: -6%; width: 34%; height: auto; }
.cover-chip { position: absolute; left: 10px; top: 10px; }
.cover-done { position: absolute; right: 10px; top: 10px; width: 34px; height: 34px; border-radius: 50%;
  background: var(--sage-light) url("../img/check.svg") center / 20px no-repeat; box-shadow: 0 2px 8px rgba(31, 31, 36, 0.2); }
.lcard-body { display: flex; flex-direction: column; gap: 6px; padding: 14px 18px 16px; flex: 1; }
.lcard-body .eyebrow { margin: 0; }
.lcard-title { font-weight: 600; font-size: 17px; line-height: 1.35; }
.lcard-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin-top: auto; padding-top: 8px; }
.icons { display: flex; gap: 6px; }
.ico { display: inline-flex; align-items: center; gap: 3px; height: 30px; min-width: 30px; padding: 0 7px; justify-content: center;
  border-radius: 9px; border: 1.5px solid var(--line-strong); color: var(--ink); background: rgba(255, 255, 255, 0.6); }
.ico small { font-size: 12.5px; font-weight: 600; }
.section-sep { margin-top: 64px; font-size: clamp(28px, 4vw, 40px); }
.new-section { margin-top: 36px; }
.pop-extra { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }

/* ---------- постепенное открытие модулей ---------- */
.lcard.is-locked .lcard-cover > img, .lcard.is-locked .cover-blank { filter: grayscale(0.7); opacity: 0.55; }
.lcard.is-locked .lcard-title { color: var(--muted); }
.cover-lock { position: absolute; left: 50%; top: 50%; width: 54px; height: 54px; margin: -27px 0 0 -27px; border-radius: 50%;
  display: grid; place-items: center; background: var(--milk); color: var(--ink); box-shadow: 0 4px 14px rgba(31, 31, 36, 0.25); }
.cover-lock svg { width: 26px; height: 26px; }
.lock-chip svg { width: 13px; height: 13px; vertical-align: -2px; }
.lock-note { margin: 6px 0 0; color: var(--ink); }
.lock-note a { font-weight: 600; }
.lock-panel { display: flex; align-items: center; gap: 18px; margin-top: 28px; }
.lock-fox { width: 90px; flex: none; }
.panel-sage { background: var(--sage-light); border: 1.5px solid var(--sage); }
.opened { display: flex; gap: 20px; align-items: center; }
.opened-fox { width: 110px; flex: none; }
.opened .btn { margin-top: 6px; }
.small-lead { font-size: 16px; }
.module-access { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 8px; }
.module-access li { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; justify-content: space-between;
  padding: 10px 14px; border-radius: 14px; background: #fff; border: 1px solid var(--line); }

/* ---------- страница модуля ---------- */
.crumbs { margin: 24px 0 0; font-size: 15px; }
.crumbs a { text-decoration: none; color: var(--muted); }
.crumbs a:hover { color: var(--ink); }
.page-head { position: relative; padding: 24px 0 8px; }
.page-head > .doodle { position: absolute; top: 30px; right: 0; }
.page-head > .title { max-width: 820px; }
.lesson-cards { list-style: none; margin: 32px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 20px; }
.lesson-card { display: flex; flex-direction: column; height: 100%; border-radius: var(--radius); overflow: hidden; background: var(--paper);
  border: 1px solid var(--line); text-decoration: none; transition: border-color 0.12s ease, transform 0.12s ease; }
.lesson-card:hover { border-color: var(--ink); transform: translateY(-2px); }
.lesson-cover { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-bottom: 1px solid var(--line); }
.lesson-cover-empty { display: flex; align-items: center; justify-content: center; background: var(--rose-light);
  font-family: var(--serif); font-style: italic; font-weight: 900; font-size: 48px; }
.lesson-card-body { display: flex; flex-direction: column; gap: 6px; padding: 16px 20px 20px; flex: 1; }
.lesson-card-body .eyebrow { margin: 0; }
.lesson-card-title { font-weight: 600; font-size: 18px; line-height: 1.35; }
.lesson-card-text { color: var(--muted); font-size: 15px; line-height: 1.5; }
.lesson-card .lesson-meta { justify-content: flex-start; margin-top: auto; padding-top: 6px; }

/* ---------- урок ---------- */
.admin-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 16px;
  padding: 10px 16px; border-radius: 14px; background: var(--rose-light); font-size: 15px; }
.block { margin-top: 40px; }
.block-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.block-head .h2 { margin: 0; }
.video-title { margin-top: 28px; }
.block > .video-title:first-child { margin-top: 0; }
.player { position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; background: var(--card);
  box-shadow: 0 18px 40px -24px rgba(31, 31, 36, 0.55); }
.player iframe, .player video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: #000; }
.facade { position: absolute; inset: 0; display: block; cursor: pointer; text-decoration: none; color: var(--ink); }
.facade img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.4s ease; }
.facade:hover img { transform: scale(1.015); }
.play { position: absolute; z-index: 1; left: 50%; top: 50%; width: 92px; height: 92px; margin: -46px 0 0 -46px; border-radius: 50%;
  background: var(--rose); box-shadow: 0 10px 30px rgba(31, 31, 36, 0.35); transition: transform 0.15s ease; }
.play::before { content: ""; position: absolute; left: 36px; top: 28px; border-style: solid; border-width: 18px 0 18px 28px;
  border-color: transparent transparent transparent var(--ink); }
.facade:hover .play { transform: scale(1.07); }
.facade-label { position: absolute; z-index: 1; left: 18px; bottom: 16px; max-width: calc(100% - 36px); padding: 8px 16px;
  border-radius: 99px; background: var(--ink); color: var(--milk); font-weight: 600; font-size: 15.5px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.facade-blank { position: absolute; inset: 0; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 6% 7%; background: var(--milk) url("../img/paper.jpg") center / cover; }
.facade-blank-title { font-family: var(--serif); font-style: italic; font-weight: 900; font-size: clamp(22px, 3.6vw, 42px); line-height: 1.12; max-width: 60%; }
.facade-fox { width: 32%; }
.video-alt { margin: 10px 4px 0; }
.empty-video { display: flex; align-items: center; gap: 24px; padding: 24px 28px; border-radius: var(--radius); border: 1.5px dashed var(--line-strong); background: var(--paper); }
.empty-fox { width: 150px; flex: none; }

.pres-row { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; padding: 16px 20px; border-radius: 18px; background: var(--paper); border: 1px solid var(--line); }
.pres-row .h3 { margin: 0; }
.pres-text { flex: 1 1 200px; }
.pres-text p { margin: 2px 0 0; }
.pdf-frame { margin-top: 14px; border-radius: 18px; overflow: hidden; border: 1px solid var(--line); background: #fff; }
.pdf-frame iframe { display: block; width: 100%; height: min(78vh, 760px); border: 0; }

.ficon { flex: none; display: inline-flex; align-items: flex-end; justify-content: center; width: 42px; height: 50px; padding-bottom: 7px;
  border-radius: 8px 14px 8px 8px; background: var(--ink); color: var(--milk); font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; }
.ficon-pdf { background: var(--rose); color: var(--ink); }
.ficon-xls, .ficon-xlsx, .ficon-csv { background: var(--sage); color: var(--ink); }
.ficon-doc, .ficon-docx, .ficon-txt { background: var(--card); }
.file-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.file-row { display: flex; align-items: center; gap: 16px; padding: 12px 18px; border-radius: 16px; background: var(--paper); border: 1px solid var(--line); text-decoration: none; }
.file-row:hover { border-color: var(--ink); }
.file-name { flex: 1 1 auto; font-weight: 600; min-width: 0; overflow-wrap: anywhere; }
.file-dl { font-weight: 600; white-space: nowrap; }

/* домашнее задание — как слайд ДЗ: чек-лист с пустыми квадратиками и лиса с блокнотом */
.hw-card { position: relative; margin-top: 28px; padding: 34px 36px 30px; padding-right: 250px; min-height: 290px;
  border-radius: var(--radius); background: rgba(255, 255, 255, 0.62); border: 1.5px solid var(--ink); }
.hw-card .h2 { margin-bottom: 18px; }
.hw-fox { position: absolute; right: 18px; bottom: 12px; width: 220px; }
.hw-card-small { padding: 24px 28px; padding-right: 28px; min-height: 0; margin-top: 12px; }
ul.check-list { list-style: none; margin: 0 0 0.8em; padding: 0; }
ul.check-list > li { display: grid; grid-template-columns: 26px minmax(0, 1fr); gap: 12px; margin: 0 0 0.75em; }
ul.check-list .box { width: 22px; height: 22px; margin-top: 2px; border: 2px solid var(--ink); border-radius: 6px; background: #fff; }
ul.check-list ul.list, ul.check-list ol.olist { margin: 0.4em 0 0; }

.hw-status { display: flex; gap: 18px; align-items: center; margin-top: 20px; padding: 20px 24px; border-radius: var(--radius); }
.hw-status > div { flex: 1; }
.hw-accepted { background: var(--sage-light); border: 1.5px solid var(--sage); }
.hw-review { background: var(--rose-light); display: block; }
.hw-redo { background: #fff; border: 2px solid var(--rose-dark); display: block; }
.status-fox { width: 120px; flex: none; }
.comment { margin: 10px 0; padding: 12px 16px; border-radius: 14px; background: rgba(255, 255, 255, 0.75); border-left: 4px solid var(--rose); }
.comment-by { display: block; font-weight: 600; font-size: 14px; color: var(--muted); }
.hw-form { margin-top: 24px; }
.hw-form details[open] summary { margin-bottom: 14px; }
.history { margin-top: 28px; }
.history > summary, .hw-brief > summary { cursor: pointer; font-weight: 600; }
.attempt { margin-top: 14px; padding: 16px 20px; border-radius: 18px; background: var(--paper); border: 1px solid var(--line); }
.attempt-head { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 8px; }
.answer { overflow-wrap: anywhere; }
.attach-list { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 18px; }
.attach-img { display: block; max-height: 220px; width: auto; border-radius: 12px; border: 1px solid var(--line); }

.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 56px; }
.pager a { display: flex; flex-direction: column; gap: 4px; padding: 16px 20px; border-radius: 18px; background: var(--paper); border: 1px solid var(--line); text-decoration: none; font-weight: 600; }
.pager a:hover { border-color: var(--ink); }
.pager-next { text-align: right; grid-column: 2; }

/* ---------- формы ---------- */
.form { display: grid; gap: 14px; }
.form label { display: block; font-weight: 600; font-size: 15px; }
.form label > input, .form label > textarea, .form label > select { display: block; margin-top: 6px; }
.form .radio, .form .check-label { display: flex; align-items: center; gap: 10px; font-weight: 400; font-size: 16px; }
input[type=text], input[type=email], input[type=password], input[type=date], input:not([type]), textarea, select {
  width: 100%; padding: 12px 14px; border: 1.5px solid var(--line-strong); border-radius: 12px; background: #fff;
  font: 400 16px/1.45 var(--sans); color: var(--ink);
}
textarea { resize: vertical; min-height: 90px; }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px var(--rose-light); }
input[type=checkbox], input[type=radio] { width: 20px; height: 20px; accent-color: var(--ink); margin: 0; flex: none; }
fieldset { border: 0; padding: 0; margin: 0; display: flex; gap: 8px 22px; flex-wrap: wrap; }
legend { font-weight: 600; font-size: 15px; margin-bottom: 6px; padding: 0; width: 100%; }
.form-row { display: flex; gap: 12px; flex-wrap: wrap; align-items: end; }
.form-row > label { flex: 0 1 auto; }
.w-grow { flex: 1 1 240px !important; }
.w-code { width: 110px; }
.form-inline { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: center; }
.form-inline .progress { flex-basis: 100%; }
.narrow { max-width: 460px; margin-top: 24px; }
.file-pick { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.form .btn { justify-self: start; }
.login-form .btn { justify-self: stretch; }
.progress { position: relative; height: 26px; margin-top: 34px; border-radius: 99px; background: rgba(31, 31, 36, 0.08); }
.progress-bar { position: absolute; inset: 0 auto 0 0; width: 0; border-radius: 99px; background: var(--rose); transition: width 0.2s ease; }
.progress-fox { position: absolute; bottom: calc(100% - 6px); left: 18px; width: 46px; height: auto; transform: translateX(-50%);
  transition: left 0.2s ease; animation: fox-run 0.5s ease-in-out infinite alternate; pointer-events: none; }
@keyframes fox-run { from { transform: translateX(-50%) translateY(0); } to { transform: translateX(-50%) translateY(-4px); } }
.progress-text { position: relative; display: block; text-align: center; font-size: 13.5px; font-weight: 600; line-height: 26px; }
details > summary { list-style: none; }
details > summary::-webkit-details-marker { display: none; }
details > summary.btn { display: inline-flex; }

/* ---------- админка ---------- */
.admin-head { padding-bottom: 0; }
.admin-head .actions { margin-top: 18px; }
.stats { list-style: none; margin: 28px 0 8px; padding: 0; display: flex; flex-wrap: wrap; gap: 12px; }
.stats li { padding: 14px 20px; border-radius: 16px; background: var(--paper); border: 1px solid var(--line); }
.stats a { text-decoration: none; }
.stats b { font-family: var(--serif); font-style: italic; font-weight: 900; font-size: 26px; margin-right: 4px; }
.admin-module { margin-top: 44px; }
.admin-module-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.admin-module-head .h2 { margin: 0; }
.pop { position: relative; }
.pop-body { position: absolute; right: 0; z-index: 5; width: min(420px, 88vw); margin-top: 8px; padding: 18px; border-radius: 18px; background: #fff; border: 1.5px solid var(--ink); box-shadow: 0 18px 40px -20px rgba(31, 31, 36, 0.5); }
.table-wrap { overflow-x: auto; border-radius: 16px; border: 1.5px solid var(--line-strong); }
.admin-table { width: 100%; border-collapse: collapse; font-size: 15.5px; }
.admin-table th { background: var(--rose); text-align: left; font-weight: 600; padding: 10px 14px; white-space: nowrap; }
.admin-table td { padding: 10px 14px; border-top: 1px solid var(--line); background: rgba(255, 255, 255, 0.5); vertical-align: middle; }
.admin-table .cell-title { min-width: 200px; }
.admin-table .cell-title a { text-decoration: none; font-weight: 600; }
.admin-table .cell-title .lesson-code { font-size: 18px; margin-right: 6px; }
.admin-table .cell-actions { text-align: right; white-space: nowrap; }
.lessons-table { table-layout: fixed; min-width: 640px; }
.lessons-table th:nth-child(2) { width: 130px; }
.lessons-table th:nth-child(3) { width: 64px; }
.lessons-table th:nth-child(4) { width: 76px; }
.lessons-table th:nth-child(5) { width: 130px; }
.row-hidden td { background: rgba(230, 226, 221, 0.6); color: var(--muted); }
.add-lesson { margin-top: 12px; }
.add-lesson[open] > summary { margin-bottom: 12px; }
.toc { display: flex; gap: 8px; flex-wrap: wrap; margin: 22px 0 0; }
.toc a { padding: 6px 14px; border-radius: 99px; border: 1px solid var(--line-strong); text-decoration: none; font-size: 14.5px; background: var(--paper); }
.edit-block { margin: 28px 0; padding: 26px 28px; border-radius: var(--radius); background: var(--paper); border: 1px solid var(--line); }
.edit-block > .h2 { display: flex; align-items: center; gap: 12px; }
.step { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 50%;
  background: var(--rose); font-size: 22px; flex: none; }
.edit-danger { background: transparent; border-style: dashed; }
.edit-danger summary { cursor: pointer; }
.video-item { display: grid; grid-template-columns: minmax(220px, 300px) minmax(0, 1fr); gap: 22px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.video-item:first-of-type { padding-top: 0; }
.video-preview { position: relative; aspect-ratio: 16 / 9; border-radius: 14px; overflow: hidden; background: var(--card); }
.video-preview iframe, .video-preview video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-info .h3 { margin-bottom: 2px; }
.source { color: var(--muted); overflow-wrap: anywhere; font-family: ui-monospace, Consolas, monospace; font-size: 13px; }
.replace-box { margin-top: 16px; padding: 18px; border-radius: 16px; background: #fff; border: 1.5px solid var(--ink); }
.add-more { margin-top: 18px; }
.add-more[open] > summary { margin-bottom: 14px; }
.add-first { display: grid; gap: 12px; }
.video-form { max-width: 720px; }
.pres-item { display: flex; gap: 18px; align-items: center; margin-bottom: 16px; flex-wrap: wrap; }
.pres-cover { width: 240px; border-radius: 10px; border: 1px solid var(--line); }
.hints { margin-bottom: 16px; padding: 12px 16px; border-radius: 14px; background: var(--rose-light); }
.hint-list { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 18px; font-size: 15px; }
.hint-list .ok { color: var(--sage-dark); }
.admin-files { list-style: none; margin: 0 0 18px; padding: 0; display: grid; gap: 10px; }
.admin-files > li { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; padding: 12px 14px; border-radius: 14px; background: #fff; border: 1px solid var(--line); }
.admin-files .rename { display: flex; gap: 8px; flex: 1 1 280px; }
.admin-files .rename input { padding: 8px 12px; }
.admin-files .replace-box { flex-basis: 100%; }
.tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 26px 0 18px; }
.tabs a { padding: 8px 16px; border-radius: 99px; border: 1px solid var(--line-strong); text-decoration: none; background: var(--paper); font-size: 15px; }
.tabs a.on { background: var(--ink); color: var(--milk); border-color: var(--ink); }
.tabs a.on .muted { color: var(--rose-light); }
.hw-rows { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.hw-rows a { font-weight: 600; text-decoration: none; }
.hw-rows .lesson-code { font-size: 18px; margin-right: 4px; }
.hw-brief { margin: 22px 0 8px; }
.attempt-admin { background: var(--paper); }
.attempt-admin.is-current { background: #fff; border: 1.5px solid var(--ink); padding: 22px 24px; }
.review-form { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line); }
.invite-list { display: grid; gap: 14px; margin-top: 24px; }
.invite-item { padding: 18px 22px; border-radius: 18px; background: #fff; border: 1px solid var(--line); }
.invite-head { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 10px; }
.invite-text { margin: 0 0 12px; padding: 12px 14px; border-radius: 12px; background: var(--milk); white-space: pre-wrap;
  overflow-wrap: anywhere; font: 400 15px/1.55 var(--sans); }
.cred-card pre { margin: 0 0 18px; white-space: pre-wrap; font: 400 17px/1.6 var(--sans); overflow-wrap: anywhere; }
.help-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 20px; }
.help-fox { width: clamp(140px, 22vw, 240px); }
.help { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; margin-top: 28px; }
.help-card { padding: 22px 24px; border-radius: var(--radius); background: var(--paper); border: 1px solid var(--line); }
.help-main { grid-column: 1 / -1; background: rgba(255, 255, 255, 0.72); border: 1.5px solid var(--ink); }
.help-main .panel { margin-bottom: 0; }

/* ---------- лисёнок на загрузке (заставка, страница, видео, презентация) ---------- */
.splash { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; text-align: center;
  background: var(--milk) url("../img/paper.jpg") center / cover; animation: splash-out 0.45s ease 2.6s forwards; }
.splash.out { animation: splash-out 0.45s ease forwards; }
.splash-box { display: grid; justify-items: center; padding: 0 16px; }
.splash .splash-fox { width: clamp(170px, 36vw, 240px); }
.splash-title { margin: 18px 0 0; font-family: var(--serif); font-style: italic; font-weight: 900; font-size: clamp(32px, 7vw, 50px); line-height: 1.1; }
.splash-sub { margin: 8px 0 0; color: var(--muted); font-size: 15px; }
@keyframes splash-out { to { opacity: 0; visibility: hidden; } }
.page-loader { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center;
  background: rgba(247, 243, 238, 0.86); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); animation: loader-in 0.2s ease both; }
.loader-box { display: grid; justify-items: center; }
.loader-fox { width: 150px; height: auto; transform-origin: 50% 92%; animation: fox-hop 1.5s ease-in-out infinite; }
.loader-shadow { width: 84px; height: 12px; margin-top: -10px; border-radius: 50%; background: rgba(31, 31, 36, 0.13);
  animation: fox-shadow 1.5s ease-in-out infinite; }
.loader-text { margin: 12px 0 0; font-family: var(--serif); font-style: italic; font-weight: 900; font-size: 22px; }
.media-loader { position: absolute; inset: 0; z-index: 3; display: grid; place-items: center; pointer-events: none;
  background: var(--milk) url("../img/paper.jpg") center / cover; transition: opacity 0.35s ease; }
.media-loader.done { opacity: 0; }
.media-loader .loader-fox { width: clamp(90px, 16vw, 140px); }
.media-loader .loader-text { font-size: clamp(17px, 2.2vw, 21px); }
.pdf-frame { position: relative; }
@keyframes fox-hop { 0%, 100% { transform: translateY(0) rotate(-3deg); } 50% { transform: translateY(-14px) rotate(3deg); } }
@keyframes fox-shadow { 0%, 100% { transform: scaleX(1); opacity: 0.9; } 50% { transform: scaleX(0.72); opacity: 0.45; } }
@keyframes loader-in { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .loader-fox, .loader-shadow, .page-loader, .progress-fox { animation: none; }
  .splash { animation-delay: 1.2s; }
  .lcard, .lesson-row, .btn, .facade img, .play { transition: none; }
}

/* ---------- ошибки ---------- */
.error-page { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 24px; padding: 64px 0; }
.error-page .btn { margin-top: 22px; }
.error-fox { width: clamp(160px, 26vw, 300px); }

/* ---------- телефон ---------- */
@media screen and (min-width: 761px) and (max-width: 980px) {
  .rail-track { grid-auto-columns: calc((100% - 18px) / 2.15); }
}
@media screen and (max-width: 760px) {
  .opened, .lock-panel { flex-direction: column; align-items: flex-start; }
  .rail-track { margin: 0 -16px; padding: 4px 16px 12px; scroll-padding: 0 16px; grid-auto-columns: 80%; gap: 14px; }
  .rail-btn { display: none; }
  .jump { margin-top: 28px; }
  .hero-actions .btn { flex: 1 1 auto; }
  .wrap { padding: 0 16px; }
  body { font-size: 16px; }
  .lead { font-size: 17px; }
  .top-in { padding-top: 10px; padding-bottom: 10px; }
  .logo { font-size: 21px; }
  .nav { gap: 4px 14px; font-size: 15px; }
  .page-head > .doodle { display: none; }
  .hero { position: relative; grid-template-columns: 1fr; padding-top: 24px; }
  .hero-fox { position: absolute; top: 4px; right: -8px; width: 112px; margin: 0; }
  .hero .title, .hero .eyebrow { padding-right: 104px; }
  .hero .btn { width: 100%; }
  .lesson-row { grid-template-columns: 48px minmax(0, 1fr); padding: 12px 14px; }
  .lesson-row .lesson-meta { grid-column: 2; justify-content: flex-start; }
  .lesson-row .lesson-meta:empty { display: none; }
  .lesson-code { font-size: 19px; }
  .login { grid-template-columns: 1fr; padding-top: 20px; min-height: 0; }
  .login-fox { order: -1; width: 150px; justify-self: end; margin-bottom: -30px; }
  .player, .video-preview { border-radius: 14px; }
  .play { width: 70px; height: 70px; margin: -35px 0 0 -35px; }
  .play::before { left: 27px; top: 21px; border-width: 14px 0 14px 22px; }
  .facade-label { font-size: 14px; left: 10px; bottom: 10px; padding: 6px 12px; }
  .empty-video { flex-direction: column; text-align: center; padding: 20px; }
  .empty-fox { width: 110px; }
  .hw-card { padding: 26px 20px 140px; min-height: 0; }
  .hw-fox { width: 140px; right: 10px; bottom: 6px; }
  .hw-card-small { padding: 20px; }
  .hw-status { flex-direction: column; align-items: flex-start; }
  .status-fox { width: 90px; }
  .pager { grid-template-columns: 1fr; }
  .pager-next { grid-column: 1; }
  .soon { flex-direction: column; text-align: center; }
  .edit-block { padding: 20px 16px; }
  .video-item { grid-template-columns: 1fr; }
  .help-head, .error-page { grid-template-columns: 1fr; }
  .help-fox, .error-fox { width: 140px; justify-self: end; }
  .help { grid-template-columns: 1fr; }
  .foot-in { flex-direction: column; align-items: flex-start; }
  .w-code { width: 90px; }
  .pop-body { right: auto; left: 0; }
}
